76 lines
2.6 KiB
Java
76 lines
2.6 KiB
Java
package com.ruoyi.wisdomarbitrate.utils;
|
|||
|
|
|
||
|
|
import com.google.gson.Gson;
|
||
|
|
import com.google.gson.JsonArray;
|
||
|
|
import com.google.gson.JsonObject;
|
||
|
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||
|
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||
|
|
import com.ruoyi.common.exception.EsignDemoException;
|
||
|
|
import com.ruoyi.common.utils.SignAward;
|
||
|
|
import com.ruoyi.common.utils.bean.SealSignRecord;
|
||
|
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||
|
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
|
||
|
|
public class FixSelectFlowDetailUtils {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private CaseApplicationMapper caseApplicationMapper;
|
||
|
|
|
||
|
|
|
||
|
|
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
||
|
|
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|