|
|
@@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
5
|
5
|
import cn.hutool.core.util.StrUtil;
|
|
6
|
6
|
|
|
7
|
7
|
import com.google.gson.Gson;
|
|
8
|
|
-import com.google.gson.JsonArray;
|
|
9
|
8
|
import com.google.gson.JsonObject;
|
|
10
|
9
|
import com.ruoyi.common.annotation.DataScope;
|
|
11
|
10
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
|
@@ -13,8 +12,6 @@ import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
13
|
12
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
14
|
13
|
import com.ruoyi.common.exception.EsignDemoException;
|
|
15
|
14
|
import com.ruoyi.common.exception.ServiceException;
|
|
16
|
|
-import com.ruoyi.common.utils.SignAward;
|
|
17
|
|
-import com.ruoyi.common.utils.bean.SealSignRecord;
|
|
18
|
15
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
19
|
16
|
import com.ruoyi.common.utils.DateUtils;
|
|
20
|
17
|
import com.ruoyi.common.utils.SmsUtils;
|
|
|
@@ -25,6 +22,7 @@ import com.ruoyi.wisdomarbitrate.domain.*;
|
|
25
|
22
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
|
26
|
23
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
|
27
|
24
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
|
|
25
|
+import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
|
28
|
26
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
29
|
27
|
import org.springframework.stereotype.Service;
|
|
30
|
28
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -54,6 +52,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
54
|
52
|
private CaseAttachMapper caseAttachMapper;
|
|
55
|
53
|
@Autowired
|
|
56
|
54
|
private SysDeptMapper sysDeptMapper;
|
|
|
55
|
+
|
|
|
56
|
+ @Autowired
|
|
|
57
|
+ private SealSignRecordMapper sealSignRecordMapper;
|
|
57
|
58
|
// 手机号正则
|
|
58
|
59
|
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
|
59
|
60
|
|
|
|
@@ -794,6 +795,43 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
794
|
795
|
return "短信发送成功";
|
|
795
|
796
|
}
|
|
796
|
797
|
|
|
|
798
|
+ @Override
|
|
|
799
|
+ public SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException {
|
|
|
800
|
+ SealSignRecord sealSignRecord = new SealSignRecord();
|
|
|
801
|
+ sealSignRecord.setCaseAppliId(caseApplication.getId());
|
|
|
802
|
+ Gson gson = new Gson();
|
|
|
803
|
+ List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
|
|
804
|
+ SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
|
|
805
|
+ if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
|
806
|
+ SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
|
|
807
|
+ EsignHttpResponse signUrl = SignAward.signUrl(sealSignRecordselect);
|
|
|
808
|
+ JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
|
|
809
|
+ JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
|
|
810
|
+ String url = signUrlData.get("url").getAsString();
|
|
|
811
|
+ sealSignRecordReslt.setSignUrl(url);
|
|
|
812
|
+ }
|
|
|
813
|
+
|
|
|
814
|
+ return sealSignRecordReslt;
|
|
|
815
|
+ }
|
|
|
816
|
+
|
|
|
817
|
+ @Override
|
|
|
818
|
+ public SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException {
|
|
|
819
|
+ SealSignRecord sealSignRecord = new SealSignRecord();
|
|
|
820
|
+ sealSignRecord.setCaseAppliId(caseApplication.getId());
|
|
|
821
|
+ Gson gson = new Gson();
|
|
|
822
|
+ List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
|
|
823
|
+ SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
|
|
824
|
+ if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
|
825
|
+ SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
|
|
826
|
+ EsignHttpResponse signUrl = SignAward.usesealUrl(sealSignRecordselect);
|
|
|
827
|
+ JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
|
|
828
|
+ JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
|
|
829
|
+ String url = signUrlData.get("url").getAsString();
|
|
|
830
|
+ sealSignRecordReslt.setSealUrl(url);
|
|
|
831
|
+ }
|
|
|
832
|
+ return sealSignRecordReslt;
|
|
|
833
|
+ }
|
|
|
834
|
+
|
|
797
|
835
|
@Override
|
|
798
|
836
|
@Transactional
|
|
799
|
837
|
public int pendTralSure(CaseApplication caseApplication) {
|
|
|
@@ -991,62 +1029,75 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
991
|
1029
|
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
|
992
|
1030
|
}
|
|
993
|
1031
|
|
|
994
|
|
- @Transactional
|
|
995
|
|
- public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
|
996
|
|
-
|
|
997
|
|
- Gson gson = new Gson();
|
|
998
|
|
-
|
|
999
|
|
-
|
|
1000
|
|
-
|
|
1001
|
|
- SealSignRecord sealSignRecord = new SealSignRecord();
|
|
1002
|
|
- sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
|
1003
|
|
- EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
1004
|
|
- JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
1005
|
|
- JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
1006
|
|
- JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
1007
|
|
- for (int i = 0; i < signersArray.size(); i++) {
|
|
1008
|
|
- JsonObject signerObject = (JsonObject)signersArray.get(i);
|
|
1009
|
|
- Integer psnsignStatus ;
|
|
1010
|
|
- Integer orgsignStatus ;
|
|
1011
|
|
- if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
1012
|
|
- JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
1013
|
|
- if(psnSignerData!=null){
|
|
1014
|
|
- psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
1015
|
|
- sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
1016
|
|
-
|
|
1017
|
|
- if(psnsignStatus.intValue()==2){
|
|
1018
|
|
- //更新立案申请状态为待用印
|
|
1019
|
|
- CaseApplication caseApplication = new CaseApplication();
|
|
1020
|
|
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
1021
|
|
- caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
1022
|
|
-
|
|
1023
|
|
- //修改"签署用印记录表"的状态为待用印
|
|
1024
|
|
-
|
|
1025
|
|
- }
|
|
1026
|
|
- }
|
|
1027
|
|
- }
|
|
1028
|
|
- if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
1029
|
|
- JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
1030
|
|
- if(orgSignerData!=null){
|
|
1031
|
|
- orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
1032
|
|
- sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
1033
|
|
- //更新立案申请状态为待送达
|
|
1034
|
|
- CaseApplication caseApplication = new CaseApplication();
|
|
1035
|
|
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
1036
|
|
- caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
1037
|
|
-
|
|
1038
|
|
- //修改"签署用印记录表"的状态为签署完成
|
|
1039
|
|
-
|
|
1040
|
|
- //下载审核完成的裁决书,
|
|
1041
|
|
-// SaaSAPIFileUtils.fileDownloadUrl();
|
|
1042
|
|
-
|
|
1043
|
|
- }
|
|
|
1032
|
+// @Transactional
|
|
|
1033
|
+// public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
|
|
1034
|
+//
|
|
|
1035
|
+// Gson gson = new Gson();
|
|
|
1036
|
+//
|
|
|
1037
|
+// SealSignRecord sealSignRecordselect = new SealSignRecord();
|
|
|
1038
|
+// sealSignRecordselect.setSignFlowStatus(1);
|
|
|
1039
|
+//
|
|
|
1040
|
+// List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecordselect);
|
|
|
1041
|
+// if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
|
1042
|
+// for (int i = 0; i < sealSignRecords.size(); i++) {
|
|
|
1043
|
+// SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
|
|
1044
|
+// EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
|
1045
|
+// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
|
1046
|
+// JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
|
1047
|
+// JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
|
1048
|
+// for (int j = 0; j < signersArray.size(); j++) {
|
|
|
1049
|
+// JsonObject signerObject = (JsonObject)signersArray.get(j);
|
|
|
1050
|
+// Integer psnsignStatus ;
|
|
|
1051
|
+// Integer orgsignStatus ;
|
|
|
1052
|
+// if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
|
1053
|
+// JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
|
1054
|
+// if(psnSignerData!=null){
|
|
|
1055
|
+// psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
|
1056
|
+// sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
|
1057
|
+//
|
|
|
1058
|
+// if(psnsignStatus.intValue()==2){
|
|
|
1059
|
+// //更新立案申请状态为待用印
|
|
|
1060
|
+// CaseApplication caseApplication = new CaseApplication();
|
|
|
1061
|
+// caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
|
1062
|
+// caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
1063
|
+//
|
|
|
1064
|
+// //修改"签署用印记录表"的状态为待用印
|
|
|
1065
|
+// sealSignRecord.setSignFlowStatus(2);
|
|
|
1066
|
+// sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
|
1067
|
+//
|
|
|
1068
|
+// }
|
|
|
1069
|
+// }
|
|
|
1070
|
+// }
|
|
|
1071
|
+// if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
|
1072
|
+// JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
|
1073
|
+// if(orgSignerData!=null){
|
|
|
1074
|
+// orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
|
1075
|
+// sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
|
1076
|
+// //更新立案申请状态为待送达
|
|
|
1077
|
+// CaseApplication caseApplication = new CaseApplication();
|
|
|
1078
|
+// caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
|
1079
|
+// caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
1080
|
+//
|
|
|
1081
|
+// //修改"签署用印记录表"的状态为签署完成
|
|
|
1082
|
+// sealSignRecord.setSignFlowStatus(3);
|
|
|
1083
|
+// sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
|
1084
|
+//
|
|
|
1085
|
+// //下载审核完成的裁决书,
|
|
|
1086
|
+//// SaaSAPIFileUtils.fileDownloadUrl();
|
|
|
1087
|
+//
|
|
|
1088
|
+// }
|
|
|
1089
|
+//
|
|
|
1090
|
+// }
|
|
|
1091
|
+//
|
|
|
1092
|
+// }
|
|
|
1093
|
+//
|
|
|
1094
|
+// }
|
|
|
1095
|
+//
|
|
|
1096
|
+// }
|
|
1044
|
1097
|
|
|
1045
|
|
- }
|
|
1046
|
1098
|
|
|
1047
|
|
- }
|
|
1048
|
1099
|
|
|
1049
|
|
- }
|
|
|
1100
|
+// }
|
|
1050
|
1101
|
|
|
1051
|
1102
|
|
|
1052
|
1103
|
|