Browse Source

优化签收功能

qitz 2 years ago
parent
commit
31b6e6a4be

+ 39
- 16
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java View File

@@ -607,29 +607,52 @@ public class MsSignSealServiceImpl implements MsSignSealService {
607 607
         Long caseId = dto.getCaseId();
608 608
         MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
609 609
         MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseId);
610
+//        if (dto.getIsSignApply() != null && dto.getIsSignApply().intValue() == 1) {
611
+//            caseAffiliate.setIsSignApply(1);
612
+//            msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
613
+//            if (caseAffiliate.getIsSignRespon() != null && caseAffiliate.getIsSignRespon().intValue() == 1) {
614
+//                // 根据流程id查找下一个流程节点
615
+//                MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
616
+//                caseApplicationselect.setCaseFlowId(nextFlow.getId());
617
+//                caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
618
+//                caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
619
+//                CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
620
+//            }
621
+//        }
610 622
         if (dto.getIsSignApply() != null && dto.getIsSignApply().intValue() == 1) {
611 623
             caseAffiliate.setIsSignApply(1);
612 624
             msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
613
-            if (caseAffiliate.getIsSignRespon() != null && caseAffiliate.getIsSignRespon().intValue() == 1) {
614
-                // 根据流程id查找下一个流程节点
615
-                MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
616
-                caseApplicationselect.setCaseFlowId(nextFlow.getId());
617
-                caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
618
-                caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
619
-                CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
620
-            }
625
+
626
+            // 根据流程id查找下一个流程节点
627
+            MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
628
+            caseApplicationselect.setCaseFlowId(nextFlow.getId());
629
+            caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
630
+            caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
631
+            CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
621 632
         }
633
+//        if (dto.getIsSignRespon() != null && dto.getIsSignRespon().intValue() == 1) {
634
+//            caseAffiliate.setIsSignRespon(1);
635
+//            msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
636
+//            if (caseAffiliate.getIsSignApply() != null && caseAffiliate.getIsSignApply().intValue() == 1) {
637
+//                // 根据流程id查找下一个流程节点
638
+//                MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
639
+//                caseApplicationselect.setCaseFlowId(nextFlow.getId());
640
+//                caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
641
+//                caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
642
+//                CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
643
+//            }
644
+//        }
645
+
622 646
         if (dto.getIsSignRespon() != null && dto.getIsSignRespon().intValue() == 1) {
623 647
             caseAffiliate.setIsSignRespon(1);
624 648
             msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
625
-            if (caseAffiliate.getIsSignApply() != null && caseAffiliate.getIsSignApply().intValue() == 1) {
626
-                // 根据流程id查找下一个流程节点
627
-                MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
628
-                caseApplicationselect.setCaseFlowId(nextFlow.getId());
629
-                caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
630
-                caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
631
-                CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
632
-            }
649
+
650
+            // 根据流程id查找下一个流程节点
651
+            MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
652
+            caseApplicationselect.setCaseFlowId(nextFlow.getId());
653
+            caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
654
+            caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
655
+            CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
633 656
         }
634 657
 
635 658
         return AjaxResult.success("签收成功");