Merge branch 'qtz3' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #85.
This commit is contained in:
@@ -23,6 +23,17 @@ public class SealSignRecord extends BaseEntity {
|
|||||||
private String orgnizeNamePsnAccount;
|
private String orgnizeNamePsnAccount;
|
||||||
/** 机构经办人名称 */
|
/** 机构经办人名称 */
|
||||||
private String orgnizeNamepsnName;
|
private String orgnizeNamepsnName;
|
||||||
|
|
||||||
|
String fileDownloadUrl;
|
||||||
|
|
||||||
|
public String getFileDownloadUrl() {
|
||||||
|
return fileDownloadUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileDownloadUrl(String fileDownloadUrl) {
|
||||||
|
this.fileDownloadUrl = fileDownloadUrl;
|
||||||
|
}
|
||||||
|
|
||||||
/** 流程状态 */
|
/** 流程状态 */
|
||||||
private Integer signFlowStatus;
|
private Integer signFlowStatus;
|
||||||
/** 签名状态 */
|
/** 签名状态 */
|
||||||
|
|||||||
+32
-65
@@ -6,6 +6,7 @@ import com.google.gson.JsonObject;
|
|||||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
|
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||||
@@ -29,8 +30,7 @@ public class FixSelectFlowDetailUtils {
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
||||||
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
||||||
sealSignRecordselect.setSignFlowStatus(1);
|
// sealSignRecordselect.setSignFlowStatus(1);
|
||||||
|
|
||||||
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
||||||
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||||
for (int i = 0; i < sealSignRecords.size(); i++) {
|
for (int i = 0; i < sealSignRecords.size(); i++) {
|
||||||
@@ -39,9 +39,6 @@ public class FixSelectFlowDetailUtils {
|
|||||||
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
||||||
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
||||||
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
||||||
|
|
||||||
System.out.println("signFlowDetailJsonObject-----------"+signFlowDetailJsonObject.toString());
|
|
||||||
|
|
||||||
Integer psnsignStatus = null;
|
Integer psnsignStatus = null;
|
||||||
Integer orgsignStatus = null;
|
Integer orgsignStatus = null;
|
||||||
for (int j = 0; j < signersArray.size(); j++) {
|
for (int j = 0; j < signersArray.size(); j++) {
|
||||||
@@ -61,84 +58,54 @@ public class FixSelectFlowDetailUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("psnsignStatus-----------"+psnsignStatus);
|
|
||||||
System.out.println("orgsignStatus-----------"+orgsignStatus);
|
|
||||||
|
|
||||||
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
||||||
//更新立案申请状态为待用印
|
//更新立案申请状态为待用印
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
|
|
||||||
//修改"签署用印记录表"的状态为待用印
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
sealSignRecord.setSignFlowStatus(2);
|
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION){
|
||||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
//修改"签署用印记录表"的状态为待用印
|
||||||
|
sealSignRecord.setSignFlowStatus(2);
|
||||||
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
||||||
//更新立案申请状态为待送达
|
//更新立案申请状态为待送达
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
|
|
||||||
//修改"签署用印记录表"的状态为签署完成
|
|
||||||
sealSignRecord.setSignFlowStatus(3);
|
|
||||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
||||||
|
|
||||||
//下载审核完成的裁决书,
|
|
||||||
// SaaSAPIFileUtils.fileDownloadUrl();
|
|
||||||
|
|
||||||
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
//下载审核完成的裁决书,
|
||||||
|
String signFlowId = sealSignRecord.getSignFlowid();
|
||||||
|
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||||
|
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
|
||||||
|
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||||
|
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||||
|
if(filesArray!=null&&filesArray.size()>0){
|
||||||
|
JsonObject fileObject = (JsonObject)filesArray.get(0);
|
||||||
|
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||||
|
//修改"签署用印记录表"的状态为签署完成
|
||||||
|
sealSignRecord.setSignFlowStatus(3);
|
||||||
|
sealSignRecord.setFileDownloadUrl(fileDownloadUrl);
|
||||||
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gson gson = new Gson();
|
|
||||||
//
|
|
||||||
// SealSignRecord sealSignRecord = new SealSignRecord();
|
|
||||||
// sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
|
||||||
// EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
||||||
// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
||||||
// JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
||||||
// JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
||||||
// for (int i = 0; i < signersArray.size(); i++) {
|
|
||||||
// JsonObject signerObject = (JsonObject)signersArray.get(i);
|
|
||||||
// Integer psnsignStatus ;
|
|
||||||
// Integer orgsignStatus ;
|
|
||||||
// if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
||||||
// JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
||||||
// if(psnSignerData!=null){
|
|
||||||
// psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
||||||
// sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
||||||
//
|
|
||||||
// if(psnsignStatus.intValue()==2){
|
|
||||||
// //更新立案申请状态为待用印
|
|
||||||
// CaseApplication caseApplication = new CaseApplication();
|
|
||||||
// caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
||||||
// caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
||||||
// JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
||||||
// if(orgSignerData!=null){
|
|
||||||
// orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
||||||
// sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,28 +27,6 @@ public class SignAward {
|
|||||||
|
|
||||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||||
|
|
||||||
sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
|
|
||||||
sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
|
|
||||||
sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
|
||||||
|
|
||||||
|
|
||||||
sealSignRecord.setPensonAccount("18209231185");
|
|
||||||
sealSignRecord.setPensonName("秦桃则");
|
|
||||||
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
||||||
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
|
||||||
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
|
||||||
sealSignRecord.setPositionPagepsn("2");
|
|
||||||
|
|
||||||
sealSignRecord.setPositionXpsn(279+20);
|
|
||||||
sealSignRecord.setPositionYpsn(216.336-20);
|
|
||||||
|
|
||||||
sealSignRecord.setPositionPageorg("2");
|
|
||||||
|
|
||||||
sealSignRecord.setPositionXorg(342+30);
|
|
||||||
sealSignRecord.setPositionYorg(185.136);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 发起签署*/
|
/* 发起签署*/
|
||||||
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
|
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
|
||||||
@@ -159,15 +137,10 @@ public class SignAward {
|
|||||||
double positionXorg = sealSignRecord.getPositionXorg();
|
double positionXorg = sealSignRecord.getPositionXorg();
|
||||||
double positionYorg = sealSignRecord.getPositionYorg();
|
double positionYorg = sealSignRecord.getPositionYorg();
|
||||||
|
|
||||||
|
|
||||||
String jsonParm = "{\n" +
|
String jsonParm = "{\n" +
|
||||||
" \"docs\": [\n" +
|
" \"docs\": [\n" +
|
||||||
" {\n" +
|
" {\n" +
|
||||||
|
|
||||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
|
||||||
" \"fileId\": \"" + fileId + "\",\n" +
|
" \"fileId\": \"" + fileId + "\",\n" +
|
||||||
|
|
||||||
// " \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
|
|
||||||
" \"fileName\": \"" + fileName + "\"\n" +
|
" \"fileName\": \"" + fileName + "\"\n" +
|
||||||
|
|
||||||
" }\n" +
|
" }\n" +
|
||||||
@@ -194,24 +167,16 @@ public class SignAward {
|
|||||||
" {\n" +
|
" {\n" +
|
||||||
|
|
||||||
" \"psnSignerInfo\": {\n" +
|
" \"psnSignerInfo\": {\n" +
|
||||||
|
|
||||||
// " \"psnAccount\": \"18209231185\",\n" +
|
|
||||||
" \"psnAccount\": \"" + psnAccount + "\",\n" +
|
" \"psnAccount\": \"" + psnAccount + "\",\n" +
|
||||||
|
|
||||||
" \"psnInfo\": {\n" +
|
" \"psnInfo\": {\n" +
|
||||||
|
|
||||||
// " \"psnName\": \"秦桃则\"\n" +
|
|
||||||
" \"psnName\": \"" + psnName + "\"\n" +
|
" \"psnName\": \"" + psnName + "\"\n" +
|
||||||
" }\n" +
|
" }\n" +
|
||||||
|
|
||||||
|
|
||||||
" },\n" +
|
" },\n" +
|
||||||
|
|
||||||
|
|
||||||
" \"signFields\": [\n" +
|
" \"signFields\": [\n" +
|
||||||
" {\n" +
|
" {\n" +
|
||||||
|
|
||||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
|
||||||
" \"fileId\": \"" + fileId + "\",\n" +
|
" \"fileId\": \"" + fileId + "\",\n" +
|
||||||
|
|
||||||
" \"normalSignFieldConfig\": {\n" +
|
" \"normalSignFieldConfig\": {\n" +
|
||||||
@@ -219,16 +184,9 @@ public class SignAward {
|
|||||||
" \"freeMode\": false,\n" +
|
" \"freeMode\": false,\n" +
|
||||||
" \"movableSignField\": false,\n" +
|
" \"movableSignField\": false,\n" +
|
||||||
" \"signFieldPosition\": {\n" +
|
" \"signFieldPosition\": {\n" +
|
||||||
|
|
||||||
// " \"positionPage\": \"2\",\n" +
|
|
||||||
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
|
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
|
||||||
|
|
||||||
// " \"positionX\": 310.0,\n" +
|
|
||||||
" \"positionX\": " + positionXpsn + ",\n" +
|
" \"positionX\": " + positionXpsn + ",\n" +
|
||||||
|
|
||||||
// " \"positionY\": 247.536\n" +
|
|
||||||
" \"positionY\": " + positionYpsn + "\n" +
|
" \"positionY\": " + positionYpsn + "\n" +
|
||||||
|
|
||||||
" },\n" +
|
" },\n" +
|
||||||
" \"signFieldStyle\": 1\n" +
|
" \"signFieldStyle\": 1\n" +
|
||||||
" },\n" +
|
" },\n" +
|
||||||
@@ -241,19 +199,12 @@ public class SignAward {
|
|||||||
|
|
||||||
" {\n" +
|
" {\n" +
|
||||||
" \"orgSignerInfo\": {\n" +
|
" \"orgSignerInfo\": {\n" +
|
||||||
|
|
||||||
// " \"orgName\": \"西安云美电子科技有限公司\",\n" +
|
|
||||||
" \"orgName\": \"" + orgName + "\",\n" +
|
" \"orgName\": \"" + orgName + "\",\n" +
|
||||||
|
|
||||||
" \"transactorInfo\": {\n" +
|
" \"transactorInfo\": {\n" +
|
||||||
|
|
||||||
|
|
||||||
// " \"psnAccount\": \"17691338406\",\n" +
|
|
||||||
" \"psnAccount\": \"" + orgNamePsnAccount + "\",\n" +
|
" \"psnAccount\": \"" + orgNamePsnAccount + "\",\n" +
|
||||||
|
|
||||||
" \"psnInfo\": {\n" +
|
" \"psnInfo\": {\n" +
|
||||||
|
|
||||||
// " \"psnName\": \"韩超勃\"\n" +
|
|
||||||
" \"psnName\": \"" + orgNamepsnName + "\"\n" +
|
" \"psnName\": \"" + orgNamepsnName + "\"\n" +
|
||||||
" }\n" +
|
" }\n" +
|
||||||
|
|
||||||
@@ -262,8 +213,6 @@ public class SignAward {
|
|||||||
|
|
||||||
" \"signFields\": [\n" +
|
" \"signFields\": [\n" +
|
||||||
" {\n" +
|
" {\n" +
|
||||||
|
|
||||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
|
||||||
" \"fileId\": \"" + fileId + "\",\n" +
|
" \"fileId\": \"" + fileId + "\",\n" +
|
||||||
|
|
||||||
" \"normalSignFieldConfig\": {\n" +
|
" \"normalSignFieldConfig\": {\n" +
|
||||||
@@ -272,13 +221,8 @@ public class SignAward {
|
|||||||
|
|
||||||
" \"signFieldPosition\": {\n" +
|
" \"signFieldPosition\": {\n" +
|
||||||
|
|
||||||
// " \"positionPage\": \"2\",\n" +
|
|
||||||
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
||||||
|
|
||||||
// " \"positionX\": 340.0,\n" +
|
|
||||||
" \"positionX\": " + positionXorg + ",\n" +
|
" \"positionX\": " + positionXorg + ",\n" +
|
||||||
|
|
||||||
// " \"positionY\": 340.736\n" +
|
|
||||||
" \"positionY\": " + positionYorg + "\n" +
|
" \"positionY\": " + positionYorg + "\n" +
|
||||||
" },\n" +
|
" },\n" +
|
||||||
" \"signFieldStyle\": 1\n" +
|
" \"signFieldStyle\": 1\n" +
|
||||||
@@ -313,7 +257,6 @@ public class SignAward {
|
|||||||
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
|
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
|
||||||
String jsonParm = "{\n" +
|
String jsonParm = "{\n" +
|
||||||
" \"operator\": {\n" +
|
" \"operator\": {\n" +
|
||||||
// " \"psnAccount\":\"18209231185\"\n" +
|
|
||||||
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
||||||
" }\n" +
|
" }\n" +
|
||||||
"}";
|
"}";
|
||||||
@@ -338,15 +281,11 @@ public class SignAward {
|
|||||||
String orgName = sealSignRecord.getOrgnizeName();
|
String orgName = sealSignRecord.getOrgnizeName();
|
||||||
|
|
||||||
String jsonParm = "{\n" +
|
String jsonParm = "{\n" +
|
||||||
// " \"needLogin\": true,\n" +
|
|
||||||
" \"operator\": {\n" +
|
" \"operator\": {\n" +
|
||||||
|
|
||||||
// " \"psnAccount\":\"17691338406\"\n" +
|
|
||||||
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
||||||
" },\n" +
|
" },\n" +
|
||||||
" \"organization\": {\n" +
|
" \"organization\": {\n" +
|
||||||
|
|
||||||
// " \"orgName\": \"西安云美电子科技有限公司\"\n" +
|
|
||||||
" \"orgName\": \"" + orgName + "\"\n" +
|
" \"orgName\": \"" + orgName + "\"\n" +
|
||||||
|
|
||||||
" }\n" +
|
" }\n" +
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
||||||
update seal_sign_record
|
update seal_sign_record
|
||||||
<set>
|
<set>
|
||||||
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus}</if>
|
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
|
||||||
|
<if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user