Преглед изворни кода

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

qtz пре 2 година
родитељ
комит
b8ad0dfc8c

+ 32
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Прегледај датотеку

@@ -741,6 +741,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
741 741
         MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
742 742
         Integer organizeFlag = caseAffiliate.getOrganizeFlag();
743 743
 
744
+        MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(caseId);
745
+
744 746
         SysUser user = new SysUser();
745 747
         Long userId = SecurityUtils.getUserId();
746 748
         user.setUserId(userId);
@@ -809,6 +811,36 @@ public class MsSignSealServiceImpl implements MsSignSealService {
809 811
             }else {
810 812
                 return AjaxResult.error();
811 813
             }
814
+        }else if(roleNames.contains("调解员")){
815
+            SealSignRecord sealSignRecordres = new SealSignRecord();
816
+            MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
817
+            mssealSignRecord.setCaseAppliId(caseId);
818
+            List<MsSealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(mssealSignRecord);
819
+            if (sealSignRecords != null && sealSignRecords.size() > 0) {
820
+                String signFlowid = sealSignRecords.get(0).getSignFlowId();
821
+                SealSignRecord sealSignRecord = new SealSignRecord();
822
+
823
+                Long arbitratorId = caseApplication.getMediatorId();
824
+                if (arbitratorId!=null) {
825
+                    SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
826
+                    if (sysUser == null) {
827
+                        return AjaxResult.error();
828
+                    }
829
+                    sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
830
+                }
831
+                sealSignRecord.setSignFlowid(signFlowid);
832
+
833
+                Gson gson = new Gson();
834
+                EsignHttpResponse signUrl = SignAward.signUrl(sealSignRecord);
835
+                JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
836
+                JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
837
+                String urlapply = signUrlData.get("shortUrl").getAsString();
838
+                sealSignRecordres.setSealUrl(urlapply);
839
+                return AjaxResult.success(sealSignRecordres);
840
+            }else {
841
+                return AjaxResult.error();
842
+            }
843
+
812 844
         }
813 845
         return AjaxResult.success();
814 846
     }