소스 검색

优化调解功能

qitz 2 년 전
부모
커밋
8e235b6135
1개의 변경된 파일15개의 추가작업 그리고 6개의 파일을 삭제
  1. 15
    6
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java

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

@@ -2485,11 +2485,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2485 2485
                         CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
2486 2486
                         application.setCaseFlowId(caseFlow.getId());
2487 2487
                         application.setCaseStatusName(caseFlow.getCaseStatusName());
2488
+                        application.setMediaResult(mediaResult);
2488 2489
                         msCaseApplicationMapper.updateByPrimaryKey(application);
2489 2490
                     }
2490
-
2491
-                    application.setMediaResult(mediaResult);
2492
-                    msCaseApplicationMapper.updateByPrimaryKeySelective(application);
2493 2491
                     return AjaxResult.success();
2494 2492
                 }else if(mediaResult.intValue()==3){
2495 2493
                     //未达成调解但不再争议
@@ -2500,14 +2498,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2500 2498
                     if(caseFlow != null){
2501 2499
                         application.setCaseFlowId(caseFlow.getId());
2502 2500
                         application.setCaseStatusName(caseFlow.getCaseStatusName());
2501
+                        application.setMediaResult(mediaResult);
2503 2502
                         msCaseApplicationMapper.updateByPrimaryKey(application);
2504 2503
                         // 新增日志
2505 2504
                         CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
2506 2505
 
2507 2506
                     }
2508
-
2509
-                    application.setMediaResult(mediaResult);
2510
-                    msCaseApplicationMapper.updateByPrimaryKeySelective(application);
2511 2507
                     return AjaxResult.success();
2512 2508
                 }else if(mediaResult.intValue()==4){
2513 2509
                     //未达成调解但同意引入仲裁
@@ -2532,6 +2528,19 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2532 2528
                             .header("signstr", signStr)
2533 2529
                             .body(paramsbody)
2534 2530
                             .execute();
2531
+                    // 修改案件状态为结束
2532
+                    Example flowExample = new Example(MsCaseFlow.class);
2533
+                    flowExample.createCriteria().andEqualTo("caseStatusName", "结束");
2534
+                    MsCaseFlow caseFlow = caseFlowMapper.selectOneByExample(flowExample);
2535
+                    if(caseFlow != null){
2536
+                        // 新增日志
2537
+                        CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
2538
+                        application.setCaseFlowId(caseFlow.getId());
2539
+                        application.setCaseStatusName(caseFlow.getCaseStatusName());
2540
+                        application.setMediaResult(mediaResult);
2541
+                        msCaseApplicationMapper.updateByPrimaryKey(application);
2542
+                    }
2543
+
2535 2544
                     return AjaxResult.success();
2536 2545
                 }else if(mediaResult.intValue()==5){
2537 2546
                     // 达成和解