소스 검색

bug修复

18792927508 2 년 전
부모
커밋
e4fe52ad70

+ 4
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java 파일 보기

72
             "union  select c.id id,c.room_id roomId,c.mediation_method mediationMethod,1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
72
             "union  select c.id id,c.room_id roomId,c.mediation_method mediationMethod,1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
73
             "a.application_organ_name applicationOrganName,a.respondent_name respondentName,c.mediator_name mediatorName," +
73
             "a.application_organ_name applicationOrganName,a.respondent_name respondentName,c.mediator_name mediatorName," +
74
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
74
             "c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
75
-            "join ms_case_application c on r.case_appli_id=c.id and r.case_status_name!=c.case_status_name " +
75
+            "join ms_case_application c on r.case_appli_id=c.id  " +
76
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
76
             "join ms_case_affiliate a on c.id=a.case_appli_id  <where> r.create_by=#{req.userName}  and c.id not in (" +
77
             "select c1.id from  ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
77
             "select c1.id from  ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
78
             +
78
             +
79
-            "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c.case_status_name in" +
79
+            "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and  c1.case_status_name in" +
80
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
80
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
81
             "#{caseStatus}" +
81
             "#{caseStatus}" +
82
             "</foreach>" +
82
             "</foreach>" +
95
             "    AND a1.application_organ_id = #{req.applicationOrganId} " +
95
             "    AND a1.application_organ_id = #{req.applicationOrganId} " +
96
             "</if> "
96
             "</if> "
97
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
97
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
98
-            "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
98
+            "    AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
99
             "</if> "
99
             "</if> "
100
             +
100
             +
101
             "<if test=\"req.hearDateFlag != null \">" +
101
             "<if test=\"req.hearDateFlag != null \">" +
102
-            "    AND c.mediation_method = '1'" +
102
+            "    AND c1.mediation_method = '1'" +
103
             "</if> "
103
             "</if> "
104
             +
104
             +
105
 
105
 

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseLogRecordMapper.java 파일 보기

18
 
18
 
19
     @Select("<script> select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId," +
19
     @Select("<script> select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId," +
20
             "    cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime, " +
20
             "    cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime, " +
21
-            "   CASE cl.case_node when 1 then '提交案件' when 2 then '缴费'  " +
21
+            "   CASE cl.case_node when 0 then '新增案件' " +
22
+            "when 1 then '提交案件' when 2 then '缴费'  " +
22
             "   when 3 then '确认缴费' when 4 then '受理分配' when 5 then '选择调解员'  " +
23
             "   when 3 then '确认缴费' when 4 then '受理分配' when 5 then '选择调解员'  " +
23
             "   when 6 then '核实调解员' when 7 then '确认调解员' when 8 then '确定调解时间'  " +
24
             "   when 6 then '核实调解员' when 7 then '确认调解员' when 8 then '确定调解时间'  " +
24
             "   when 9 then '调解' when 10 then '确认调解书' when 11 then '签名'  " +
25
             "   when 9 then '调解' when 10 then '确认调解书' when 11 then '签名'  " +

+ 19
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java 파일 보기

344
                 columnValueMapper.batchSave(columnValueList);
344
                 columnValueMapper.batchSave(columnValueList);
345
             }
345
             }
346
             // todo 发送短信
346
             // todo 发送短信
347
-            CaseLogUtils.insertCaseLog(caseApplication.getId(), caseFlow.getNodeId(), caseFlow.getCaseStatusName(), "");
347
+            CaseLogUtils.insertCaseLog(caseApplication.getId(), 0, "新增案件", "");
348
             return 1;
348
             return 1;
349
         }
349
         }
350
 
350
 
786
      * @param affiliateMap
786
      * @param affiliateMap
787
      */
787
      */
788
     private void accept(MsCaseApplication application, MsCaseApplication req, Map<Long, MsCaseAffiliate> affiliateMap) {
788
     private void accept(MsCaseApplication application, MsCaseApplication req, Map<Long, MsCaseAffiliate> affiliateMap) {
789
+        application.setPaperFlag(req.getPaperFlag());
790
+        application.setArbitrateConfirm(req.getArbitrateConfirm());
791
+        application.setMediationMethod(req.getMediationMethod());
789
         application.setUpdateBy(SecurityUtils.getUsername());
792
         application.setUpdateBy(SecurityUtils.getUsername());
790
         application.setUpdateTime(new Date());
793
         application.setUpdateTime(new Date());
791
         application.setBatchNumber(null);
794
         application.setBatchNumber(null);
879
             mediatorVO.setMediatorId(user.getUserId());
882
             mediatorVO.setMediatorId(user.getUserId());
880
             mediatorVO.setMediatorName(user.getNickName());
883
             mediatorVO.setMediatorName(user.getNickName());
881
             mediatorVO.setSpecialty(user.getSpecialty());
884
             mediatorVO.setSpecialty(user.getSpecialty());
882
-
883
-            if(caseMap!=null&&caseMap.containsKey(String.valueOf(user.getUserId()))) {
885
+            if(caseMap==null){
886
+                mediatorVO.setTodoAmount(0L);
887
+                mediatorVO.setCompleteAmount(0L);
888
+            } else if(caseMap.containsKey(String.valueOf(user.getUserId()))) {
884
                 List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
889
                 List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
885
                 // 已办案件
890
                 // 已办案件
886
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
891
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
1077
             mediatorVO.setMediatorId(user.getUserId());
1082
             mediatorVO.setMediatorId(user.getUserId());
1078
             mediatorVO.setMediatorName(user.getNickName());
1083
             mediatorVO.setMediatorName(user.getNickName());
1079
             mediatorVO.setSpecialty(user.getSpecialty());
1084
             mediatorVO.setSpecialty(user.getSpecialty());
1085
+            if(caseMap==null){
1086
+                mediatorVO.setTodoAmount(0L);
1087
+                mediatorVO.setCompleteAmount(0L);
1088
+            }
1080
 
1089
 
1081
-            if(caseMap!=null&&caseMap.containsKey(String.valueOf(user.getUserId()))) {
1090
+            else if(caseMap.containsKey(String.valueOf(user.getUserId()))) {
1082
                 List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
1091
                 List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
1083
                 // 已办案件
1092
                 // 已办案件
1084
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
1093
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
1739
      */
1748
      */
1740
     @Override
1749
     @Override
1741
     public MsCaseFlow nextFlow(Long caseId,Integer caseFlowId,Integer lockStatus) {
1750
     public MsCaseFlow nextFlow(Long caseId,Integer caseFlowId,Integer lockStatus) {
1751
+        // 查询当前流程节点
1752
+        MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseFlowId);
1753
+        if (currentFlow == null) {
1754
+            throw new ServiceException("未找到当前流程节点");
1755
+        }
1742
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseFlowId);
1756
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseFlowId);
1743
         if (nextFlow == null) {
1757
         if (nextFlow == null) {
1744
             throw new ServiceException("未找到下一个流程节点");
1758
             throw new ServiceException("未找到下一个流程节点");
1752
         application.setLockStatus(lockStatus);
1766
         application.setLockStatus(lockStatus);
1753
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);
1767
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);
1754
         // 新增日志
1768
         // 新增日志
1755
-        CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"");
1769
+        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
1756
         return nextFlow;
1770
         return nextFlow;
1757
     }
1771
     }
1758
 
1772
 

+ 19
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java 파일 보기

143
     @Transactional
143
     @Transactional
144
     @Override
144
     @Override
145
     public AjaxResult confirmPayment(CaseConfirmPayDTO dto) {
145
     public AjaxResult confirmPayment(CaseConfirmPayDTO dto) {
146
+        // 根据流程id查找当前流程节点
147
+        MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(dto.getCaseFlowId());
148
+        if (currentFlow == null) {
149
+            return AjaxResult.error("未找到当前流程节点");
150
+        }
146
         // 根据流程id查找下一个流程节点
151
         // 根据流程id查找下一个流程节点
147
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
152
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
148
         if (nextFlow == null) {
153
         if (nextFlow == null) {
156
                 return AjaxResult.error("该批号下未找到案件");
161
                 return AjaxResult.error("该批号下未找到案件");
157
             }
162
             }
158
             for (MsCaseApplication application : applicationList) {
163
             for (MsCaseApplication application : applicationList) {
159
-                confirmPayment(nextFlow, application, dto);
164
+                confirmPayment(currentFlow,nextFlow, application, dto);
160
 
165
 
161
             }
166
             }
162
         } else {
167
         } else {
164
             MsCaseApplication application = new MsCaseApplication();
169
             MsCaseApplication application = new MsCaseApplication();
165
             application.setId(dto.getCaseId());
170
             application.setId(dto.getCaseId());
166
             application.setLockStatus(YesOrNoEnum.YES.getCode());
171
             application.setLockStatus(YesOrNoEnum.YES.getCode());
167
-            confirmPayment(nextFlow, application, dto);
172
+            confirmPayment(currentFlow,nextFlow, application, dto);
168
 
173
 
169
         }
174
         }
170
         return AjaxResult.success("确认缴费成功");
175
         return AjaxResult.success("确认缴费成功");
253
     @Transactional
258
     @Transactional
254
     @Override
259
     @Override
255
     public AjaxResult confirmPaid(CaseConfirmPayDTO dto) {
260
     public AjaxResult confirmPaid(CaseConfirmPayDTO dto) {
261
+        // 根据流程id查找当前流程节点
262
+        MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(dto.getCaseFlowId());
263
+        if (currentFlow == null) {
264
+            return AjaxResult.error("未找到当前流程节点");
265
+        }
266
+
256
         // 根据流程id查找下一个流程节点
267
         // 根据流程id查找下一个流程节点
257
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
268
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
258
         if (nextFlow == null) {
269
         if (nextFlow == null) {
266
                 return AjaxResult.error("该批号下未找到案件");
277
                 return AjaxResult.error("该批号下未找到案件");
267
             }
278
             }
268
             for (MsCaseApplication application : applicationList) {
279
             for (MsCaseApplication application : applicationList) {
269
-                confirmPaid(nextFlow, application);
280
+                confirmPaid(currentFlow,nextFlow, application);
270
             }
281
             }
271
         }else {
282
         }else {
272
             MsCaseApplication caseApplication=new MsCaseApplication();
283
             MsCaseApplication caseApplication=new MsCaseApplication();
273
             caseApplication.setId(dto.getCaseId());
284
             caseApplication.setId(dto.getCaseId());
274
             caseApplication.setLockStatus(YesOrNoEnum.YES.getCode());
285
             caseApplication.setLockStatus(YesOrNoEnum.YES.getCode());
275
-            confirmPaid(nextFlow,caseApplication );
286
+            confirmPaid(currentFlow,nextFlow,caseApplication );
276
         }
287
         }
277
 
288
 
278
 
289
 
285
      * @param application
296
      * @param application
286
      * @param
297
      * @param
287
      */
298
      */
288
-    private void confirmPaid(MsCaseFlow nextFlow, MsCaseApplication application) {
299
+    private void confirmPaid(MsCaseFlow currentFlow,MsCaseFlow nextFlow, MsCaseApplication application) {
289
         //更改记录表里的支付状态和支付时间
300
         //更改记录表里的支付状态和支付时间
290
         MsCasePaymentRecord casePaymentRecord = new MsCasePaymentRecord();
301
         MsCasePaymentRecord casePaymentRecord = new MsCasePaymentRecord();
291
         casePaymentRecord.setPaymentStatus(1);
302
         casePaymentRecord.setPaymentStatus(1);
300
         application.setCaseStatusName(nextFlow.getCaseStatusName());
311
         application.setCaseStatusName(nextFlow.getCaseStatusName());
301
         caseApplicationMapper.updateByPrimaryKeySelective(application);
312
         caseApplicationMapper.updateByPrimaryKeySelective(application);
302
         // 新增日志
313
         // 新增日志
303
-        CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"确认已缴费");
314
+        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"确认已缴费");
304
         // todo 发送短信
315
         // todo 发送短信
305
 
316
 
306
 
317
 
314
      * @param dto
325
      * @param dto
315
      */
326
      */
316
 
327
 
317
-    private void confirmPayment(MsCaseFlow nextFlow, MsCaseApplication application, CaseConfirmPayDTO dto) {
328
+    private void confirmPayment(MsCaseFlow currentFlow,MsCaseFlow nextFlow, MsCaseApplication application, CaseConfirmPayDTO dto) {
318
         application.setPayType(dto.getPayType());
329
         application.setPayType(dto.getPayType());
319
         // 修改缴费附件
330
         // 修改缴费附件
320
         if (CollectionUtil.isNotEmpty(dto.getPayOrderList())) {
331
         if (CollectionUtil.isNotEmpty(dto.getPayOrderList())) {
327
         application.setCaseFlowId(nextFlow.getId());
338
         application.setCaseFlowId(nextFlow.getId());
328
         application.setCaseStatusName(nextFlow.getCaseStatusName());
339
         application.setCaseStatusName(nextFlow.getCaseStatusName());
329
         caseApplicationMapper.updateByPrimaryKeySelective(application);
340
         caseApplicationMapper.updateByPrimaryKeySelective(application);
330
-        CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"确认缴费");
341
+        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"确认缴费");
331
     }
342
     }
332
 
343
 
333
 
344
 

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java 파일 보기

186
                 null, null);
186
                 null, null);
187
         // 先删除之前的会议
187
         // 先删除之前的会议
188
         reservedConferenceMapper.deletByCaseId(caseId);
188
         reservedConferenceMapper.deletByCaseId(caseId);
189
+        // 新增会议
190
+        reservedConferenceMapper.insert(conference);
189
         return String.valueOf(roomId);
191
         return String.valueOf(roomId);
190
     }
192
     }
191
 
193