소스 검색

Merge branch 'qtz' of SH-Arbitrate/Mediation-Backend into dev

qtz 2 년 전
부모
커밋
bc58e807bc

+ 1
- 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsSignSealController.java 파일 보기

@@ -75,13 +75,7 @@ public class MsSignSealController  extends BaseController {
75 75
         return AjaxResult.success(list);
76 76
     }
77 77
 
78
-    /**
79
-     * test
80
-     */
81
-    @PostMapping("/testSeal")
82
-    public AjaxResult testSeal(@Validated @RequestBody MsSignSealDTO dto) throws EsignDemoException {
83
-        return msSignSealService.testSeal(dto);
84
-    }
78
+
85 79
 
86 80
 
87 81
 

+ 0
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsSignSealService.java 파일 보기

@@ -23,5 +23,4 @@ public interface MsSignSealService {
23 23
 
24 24
     List<MsCaseLogRecordVO> selectCaseLogRecordList(MsSignSealDTO dto);
25 25
 
26
-    AjaxResult testSeal(MsSignSealDTO dto);
27 26
 }

+ 4
- 101
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java 파일 보기

@@ -97,8 +97,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
97 97
             for (MsCaseAttach caseAttach : caseAttachList) {
98 98
                 if (caseAttach.getAnnexType() == 3) {
99 99
                     String annexPath = caseAttach.getAnnexPath();
100
-//                    String path = "/home/ruoyi" + annexPath;
101
-                    String path = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\12\\调解书测试.docx";
100
+                    String path = "/home/ruoyi" + annexPath;
102 101
                     //获取文件上传地址
103 102
                     EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
104 103
                     String body = response.getBody();
@@ -129,9 +128,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
129 128
                                 //发起签署
130 129
                                 sealSignRecord.setFilename(fileName);
131 130
 
132
-                                Long arbitratorId = caseApplication.getMediatorId();
133
-                                if (arbitratorId != null) {
134
-                                    SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
131
+                                String arbitratorId = caseApplication.getMediatorId();
132
+                                if (StringUtils.isNotEmpty(arbitratorId)) {
133
+                                    SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
135 134
                                     if (sysUser == null) {
136 135
                                         return AjaxResult.error();
137 136
                                     }
@@ -689,103 +688,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
689 688
 
690 689
     }
691 690
 
692
-    @Override
693
-    @Transactional
694
-    public AjaxResult testSeal(MsSignSealDTO dto) {
695
-
696
-        Gson gson = new Gson();
697
-
698
-        List<MsSealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat();
699
-
700
-        try {
701
-            if (sealSignRecords != null && sealSignRecords.size() > 0) {
702
-                for (int i = 0; i < sealSignRecords.size(); i++) {
703
-                    MsSealSignRecord mssealSignRecord = sealSignRecords.get(i);
704
-                    SealSignRecord sealSignRecord = new SealSignRecord();
705
-                    BeanUtil.copyProperties(mssealSignRecord, sealSignRecord);
706
-
707
-                    String signFlowId = mssealSignRecord.getSignFlowId();
708
-                    if(StringUtils.isNotEmpty(signFlowId) && "819e60824fe241e9b862bd787403fa5e".equals(signFlowId)){
709
-                        sealSignRecord.setSignFlowid(mssealSignRecord.getSignFlowId());
710
-                        EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
711
-                        JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(), JsonObject.class);
712
-                        JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
713
-                        JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
714
-                        List<Integer> psnsignStatusList = new ArrayList<>();
715
-                        Integer psnsignStatus = null;
716
-                        Integer orgsignStatus = null;
717
-                        for (int j = 0; j < signersArray.size(); j++) {
718
-                            JsonObject signerObject = (JsonObject) signersArray.get(j);
719
-
720
-                            if (!(signerObject.get("psnSigner").toString()).equals("null")) {
721
-                                JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
722
-                                if (psnSignerData != null) {
723
-                                    psnsignStatus = signerObject.get("signStatus").getAsInt();
724
-                                    psnsignStatusList.add(psnsignStatus);
725
-                                }
726
-                            }
727
-                            if (!(signerObject.get("orgSigner").toString()).equals("null")) {
728
-                                JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
729
-                                if (orgSignerData != null) {
730
-                                    orgsignStatus = signerObject.get("signStatus").getAsInt();
731
-                                }
732
-                            }
733
-
734
-                        }
735
-
736
-                        List<Integer> psnsignStatusListnew = psnsignStatusList.stream().distinct().collect(Collectors.toList());
737
-
738
-                        if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2)) && (orgsignStatus.intValue() == 1)) {
739
-                            //更新立案申请状态为待用印
740
-                            MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
741
-                            if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 1)) {
742
-                                // 根据流程id查找下一个流程节点
743
-                                MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
744
-                                MsCaseApplication application = new MsCaseApplication();
745
-                                application.setId(caseApplicationselect.getId());
746
-                                application.setCaseFlowId(nextFlow.getId());
747
-                                application.setCaseStatusName(nextFlow.getCaseStatusName());
748
-                                caseApplicationMapper.updateByPrimaryKeySelective(application);
749
-
750
-                                //修改"签署用印记录表"的状态为待用印
751
-                                mssealSignRecord.setSignFlowStatus(2);
752
-                                sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
753
-                            }
754
-                        }
755
-                        if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2))  && (orgsignStatus.intValue() == 2)) {
756
-                            //更新立案申请状态为待送达
757
-                            MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
758
-
759
-                            if ((mssealSignRecord.getSignFlowStatus() != null) && (mssealSignRecord.getSignFlowStatus().intValue() == 2)) {
760
-                                //修改"签署用印记录表"的状态为签署完成
761
-                                mssealSignRecord.setSignFlowStatus(3);
762
-                                sealSignRecordMapper.updateByPrimaryKeySelective(mssealSignRecord);
763
-
764
-                                // 根据流程id查找下一个流程节点
765
-                                MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
766
-                                MsCaseApplication application = new MsCaseApplication();
767
-                                application.setId(caseApplicationselect.getId());
768
-                                application.setCaseFlowId(nextFlow.getId());
769
-                                application.setCaseStatusName(nextFlow.getCaseStatusName());
770
-                                caseApplicationMapper.updateByPrimaryKeySelective(application);
771
-                            }
772
-                        }
773
-
774
-                    }
775
-
776
-
777
-                }
778 691
 
779
-            }
780
-        } catch (EsignDemoException e) {
781
-            e.printStackTrace();
782
-        }
783
-
784
-        return AjaxResult.success();
785
-
786
-
787
-
788
-    }
789 692
 
790 693
 
791 694
 }