18792927508 2 лет назад
Родитель
Сommit
e4fe52ad70

+ 4
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java Просмотреть файл

@@ -72,11 +72,11 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
72 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 73
             "a.application_organ_name applicationOrganName,a.respondent_name respondentName,c.mediator_name mediatorName," +
74 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 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 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 80
             "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
81 81
             "#{caseStatus}" +
82 82
             "</foreach>" +
@@ -95,11 +95,11 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
95 95
             "    AND a1.application_organ_id = #{req.applicationOrganId} " +
96 96
             "</if> "
97 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 99
             "</if> "
100 100
             +
101 101
             "<if test=\"req.hearDateFlag != null \">" +
102
-            "    AND c.mediation_method = '1'" +
102
+            "    AND c1.mediation_method = '1'" +
103 103
             "</if> "
104 104
             +
105 105
 

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseLogRecordMapper.java Просмотреть файл

@@ -18,7 +18,8 @@ public interface MsCaseLogRecordMapper extends Mapper<MsCaseLogRecord> {
18 18
 
19 19
     @Select("<script> select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId," +
20 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 23
             "   when 3 then '确认缴费' when 4 then '受理分配' when 5 then '选择调解员'  " +
23 24
             "   when 6 then '核实调解员' when 7 then '确认调解员' when 8 then '确定调解时间'  " +
24 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,7 +344,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
344 344
                 columnValueMapper.batchSave(columnValueList);
345 345
             }
346 346
             // todo 发送短信
347
-            CaseLogUtils.insertCaseLog(caseApplication.getId(), caseFlow.getNodeId(), caseFlow.getCaseStatusName(), "");
347
+            CaseLogUtils.insertCaseLog(caseApplication.getId(), 0, "新增案件", "");
348 348
             return 1;
349 349
         }
350 350
 
@@ -786,6 +786,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
786 786
      * @param affiliateMap
787 787
      */
788 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 792
         application.setUpdateBy(SecurityUtils.getUsername());
790 793
         application.setUpdateTime(new Date());
791 794
         application.setBatchNumber(null);
@@ -879,8 +882,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
879 882
             mediatorVO.setMediatorId(user.getUserId());
880 883
             mediatorVO.setMediatorName(user.getNickName());
881 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 889
                 List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
885 890
                 // 已办案件
886 891
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
@@ -1077,8 +1082,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1077 1082
             mediatorVO.setMediatorId(user.getUserId());
1078 1083
             mediatorVO.setMediatorName(user.getNickName());
1079 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 1091
                 List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
1083 1092
                 // 已办案件
1084 1093
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
@@ -1739,6 +1748,11 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1739 1748
      */
1740 1749
     @Override
1741 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 1756
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseFlowId);
1743 1757
         if (nextFlow == null) {
1744 1758
             throw new ServiceException("未找到下一个流程节点");
@@ -1752,7 +1766,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1752 1766
         application.setLockStatus(lockStatus);
1753 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 1770
         return nextFlow;
1757 1771
     }
1758 1772
 

+ 19
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCasePaymentServiceImpl.java Просмотреть файл

@@ -143,6 +143,11 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
143 143
     @Transactional
144 144
     @Override
145 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 151
         // 根据流程id查找下一个流程节点
147 152
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
148 153
         if (nextFlow == null) {
@@ -156,7 +161,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
156 161
                 return AjaxResult.error("该批号下未找到案件");
157 162
             }
158 163
             for (MsCaseApplication application : applicationList) {
159
-                confirmPayment(nextFlow, application, dto);
164
+                confirmPayment(currentFlow,nextFlow, application, dto);
160 165
 
161 166
             }
162 167
         } else {
@@ -164,7 +169,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
164 169
             MsCaseApplication application = new MsCaseApplication();
165 170
             application.setId(dto.getCaseId());
166 171
             application.setLockStatus(YesOrNoEnum.YES.getCode());
167
-            confirmPayment(nextFlow, application, dto);
172
+            confirmPayment(currentFlow,nextFlow, application, dto);
168 173
 
169 174
         }
170 175
         return AjaxResult.success("确认缴费成功");
@@ -253,6 +258,12 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
253 258
     @Transactional
254 259
     @Override
255 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 267
         // 根据流程id查找下一个流程节点
257 268
         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
258 269
         if (nextFlow == null) {
@@ -266,13 +277,13 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
266 277
                 return AjaxResult.error("该批号下未找到案件");
267 278
             }
268 279
             for (MsCaseApplication application : applicationList) {
269
-                confirmPaid(nextFlow, application);
280
+                confirmPaid(currentFlow,nextFlow, application);
270 281
             }
271 282
         }else {
272 283
             MsCaseApplication caseApplication=new MsCaseApplication();
273 284
             caseApplication.setId(dto.getCaseId());
274 285
             caseApplication.setLockStatus(YesOrNoEnum.YES.getCode());
275
-            confirmPaid(nextFlow,caseApplication );
286
+            confirmPaid(currentFlow,nextFlow,caseApplication );
276 287
         }
277 288
 
278 289
 
@@ -285,7 +296,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
285 296
      * @param application
286 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 301
         MsCasePaymentRecord casePaymentRecord = new MsCasePaymentRecord();
291 302
         casePaymentRecord.setPaymentStatus(1);
@@ -300,7 +311,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
300 311
         application.setCaseStatusName(nextFlow.getCaseStatusName());
301 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 315
         // todo 发送短信
305 316
 
306 317
 
@@ -314,7 +325,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
314 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 329
         application.setPayType(dto.getPayType());
319 330
         // 修改缴费附件
320 331
         if (CollectionUtil.isNotEmpty(dto.getPayOrderList())) {
@@ -327,7 +338,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
327 338
         application.setCaseFlowId(nextFlow.getId());
328 339
         application.setCaseStatusName(nextFlow.getCaseStatusName());
329 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,6 +186,8 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
186 186
                 null, null);
187 187
         // 先删除之前的会议
188 188
         reservedConferenceMapper.deletByCaseId(caseId);
189
+        // 新增会议
190
+        reservedConferenceMapper.insert(conference);
189 191
         return String.valueOf(roomId);
190 192
     }
191 193