|
|
@@ -6,6 +6,7 @@ import com.google.gson.JsonObject;
|
|
6
|
6
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
7
|
7
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
8
|
8
|
import com.ruoyi.common.exception.EsignDemoException;
|
|
|
9
|
+import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
|
9
|
10
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
|
10
|
11
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
|
11
|
12
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
|
|
@@ -29,8 +30,7 @@ public class FixSelectFlowDetailUtils {
|
|
29
|
30
|
Gson gson = new Gson();
|
|
30
|
31
|
|
|
31
|
32
|
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
|
32
|
|
- sealSignRecordselect.setSignFlowStatus(1);
|
|
33
|
|
-
|
|
|
33
|
+// sealSignRecordselect.setSignFlowStatus(1);
|
|
34
|
34
|
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
|
35
|
35
|
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
36
|
36
|
for (int i = 0; i < sealSignRecords.size(); i++) {
|
|
|
@@ -39,9 +39,6 @@ public class FixSelectFlowDetailUtils {
|
|
39
|
39
|
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
40
|
40
|
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
41
|
41
|
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
42
|
|
-
|
|
43
|
|
- System.out.println("signFlowDetailJsonObject-----------"+signFlowDetailJsonObject.toString());
|
|
44
|
|
-
|
|
45
|
42
|
Integer psnsignStatus = null;
|
|
46
|
43
|
Integer orgsignStatus = null;
|
|
47
|
44
|
for (int j = 0; j < signersArray.size(); j++) {
|
|
|
@@ -61,84 +58,54 @@ public class FixSelectFlowDetailUtils {
|
|
61
|
58
|
}
|
|
62
|
59
|
|
|
63
|
60
|
}
|
|
64
|
|
-
|
|
65
|
|
- System.out.println("psnsignStatus-----------"+psnsignStatus);
|
|
66
|
|
- System.out.println("orgsignStatus-----------"+orgsignStatus);
|
|
67
|
|
-
|
|
68
|
61
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
|
69
|
62
|
//更新立案申请状态为待用印
|
|
70
|
63
|
CaseApplication caseApplication = new CaseApplication();
|
|
71
|
64
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
|
72
|
|
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
73
|
|
- caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
74
|
65
|
|
|
75
|
|
- //修改"签署用印记录表"的状态为待用印
|
|
76
|
|
- sealSignRecord.setSignFlowStatus(2);
|
|
77
|
|
- sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
|
66
|
+ CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
67
|
+ if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION){
|
|
|
68
|
+ caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
|
69
|
+ caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
70
|
+
|
|
|
71
|
+ //修改"签署用印记录表"的状态为待用印
|
|
|
72
|
+ sealSignRecord.setSignFlowStatus(2);
|
|
|
73
|
+ sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
|
74
|
+ }
|
|
|
75
|
+
|
|
|
76
|
+
|
|
78
|
77
|
}
|
|
79
|
78
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
|
80
|
79
|
//更新立案申请状态为待送达
|
|
81
|
80
|
CaseApplication caseApplication = new CaseApplication();
|
|
82
|
81
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
|
83
|
|
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
84
|
|
- caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
85
|
|
-
|
|
86
|
|
- //修改"签署用印记录表"的状态为签署完成
|
|
87
|
|
- sealSignRecord.setSignFlowStatus(3);
|
|
88
|
|
- sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
89
|
82
|
|
|
90
|
|
- //下载审核完成的裁决书,
|
|
91
|
|
-// SaaSAPIFileUtils.fileDownloadUrl();
|
|
|
83
|
+ CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
84
|
+ if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
|
|
|
85
|
+ caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
|
86
|
+ caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
87
|
+
|
|
|
88
|
+ //下载审核完成的裁决书,
|
|
|
89
|
+ String signFlowId = sealSignRecord.getSignFlowid();
|
|
|
90
|
+ EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
|
|
91
|
+ JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
|
|
|
92
|
+ JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
|
|
93
|
+ JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
|
|
94
|
+ if(filesArray!=null&&filesArray.size()>0){
|
|
|
95
|
+ JsonObject fileObject = (JsonObject)filesArray.get(0);
|
|
|
96
|
+ String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
|
|
97
|
+ //修改"签署用印记录表"的状态为签署完成
|
|
|
98
|
+ sealSignRecord.setSignFlowStatus(3);
|
|
|
99
|
+ sealSignRecord.setFileDownloadUrl(fileDownloadUrl);
|
|
|
100
|
+ sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
92
|
101
|
|
|
93
|
|
-
|
|
94
|
|
-
|
|
|
102
|
+ }
|
|
|
103
|
+ }
|
|
95
|
104
|
}
|
|
96
|
105
|
}
|
|
97
|
106
|
|
|
98
|
107
|
}
|
|
99
|
108
|
|
|
100
|
|
-// Gson gson = new Gson();
|
|
101
|
|
-//
|
|
102
|
|
-// SealSignRecord sealSignRecord = new SealSignRecord();
|
|
103
|
|
-// sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
|
104
|
|
-// EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
105
|
|
-// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
106
|
|
-// JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
107
|
|
-// JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
108
|
|
-// for (int i = 0; i < signersArray.size(); i++) {
|
|
109
|
|
-// JsonObject signerObject = (JsonObject)signersArray.get(i);
|
|
110
|
|
-// Integer psnsignStatus ;
|
|
111
|
|
-// Integer orgsignStatus ;
|
|
112
|
|
-// if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
113
|
|
-// JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
114
|
|
-// if(psnSignerData!=null){
|
|
115
|
|
-// psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
116
|
|
-// sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
117
|
|
-//
|
|
118
|
|
-// if(psnsignStatus.intValue()==2){
|
|
119
|
|
-// //更新立案申请状态为待用印
|
|
120
|
|
-// CaseApplication caseApplication = new CaseApplication();
|
|
121
|
|
-// caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
122
|
|
-// caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
123
|
|
-//
|
|
124
|
|
-//
|
|
125
|
|
-//
|
|
126
|
|
-// }
|
|
127
|
|
-//
|
|
128
|
|
-//
|
|
129
|
|
-//
|
|
130
|
|
-// }
|
|
131
|
|
-// }
|
|
132
|
|
-// if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
133
|
|
-// JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
134
|
|
-// if(orgSignerData!=null){
|
|
135
|
|
-// orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
136
|
|
-// sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
137
|
|
-// }
|
|
138
|
|
-//
|
|
139
|
|
-// }
|
|
140
|
|
-//
|
|
141
|
|
-// }
|
|
142
|
109
|
|
|
143
|
110
|
|
|
144
|
111
|
}
|