实现定时查询流程详情
This commit is contained in:
@@ -8,6 +8,7 @@ import com.ruoyi.common.enums.EsignRequestType;
|
|||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.utils.bean.SealSignRecord;
|
import com.ruoyi.common.utils.bean.SealSignRecord;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class SignAward {
|
public class SignAward {
|
||||||
@@ -56,11 +57,11 @@ public class SignAward {
|
|||||||
// System.err.println("流程id:"+signFlowId);
|
// System.err.println("流程id:"+signFlowId);
|
||||||
|
|
||||||
/* 获取文件签名印章位置*/
|
/* 获取文件签名印章位置*/
|
||||||
EsignHttpResponse positions = getPositions(sealSignRecord);
|
// EsignHttpResponse positions = getPositions(sealSignRecord);
|
||||||
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
// JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
||||||
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
// JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
||||||
JsonArray keywordPositions = positionsData.get("keywordPositions").getAsJsonArray();
|
// JsonArray keywordPositions = positionsData.get("keywordPositions").getAsJsonArray();
|
||||||
System.out.println("获取文件签名印章位置:" +keywordPositions.toString());
|
// System.out.println("获取文件签名印章位置:" +keywordPositions.toString());
|
||||||
|
|
||||||
// String signFlowId = "c9955453716344f9971d308abdc13464";
|
// String signFlowId = "c9955453716344f9971d308abdc13464";
|
||||||
//获取合同文件签名链接
|
//获取合同文件签名链接
|
||||||
@@ -82,13 +83,38 @@ public class SignAward {
|
|||||||
// System.out.println("签署短链接:"+sealUrl);
|
// System.out.println("签署短链接:"+sealUrl);
|
||||||
|
|
||||||
//查询签署流程详情
|
//查询签署流程详情
|
||||||
// EsignHttpResponse signFlowDetail = signFlowDetail(sealSignRecord);
|
EsignHttpResponse signFlowDetail = signFlowDetail(sealSignRecord);
|
||||||
// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
||||||
// System.out.println(signFlowDetailJsonObject);
|
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(!(signerObject.get("orgSigner").toString()).equals("null")){
|
||||||
|
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||||
|
if(orgSignerData!=null){
|
||||||
|
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||||
|
sealSignRecord.setOrgsignStatus(orgsignStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
System.out.println(signFlowDetailJsonObject);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询签署流程详情
|
* 查询签署流程详情
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@@ -25,6 +25,26 @@ public class SealSignRecord extends BaseEntity {
|
|||||||
private String orgnizeNamepsnName;
|
private String orgnizeNamepsnName;
|
||||||
/** 流程状态 */
|
/** 流程状态 */
|
||||||
private Integer signFlowStatus;
|
private Integer signFlowStatus;
|
||||||
|
/** 签名状态 */
|
||||||
|
private Integer psnsignStatus;
|
||||||
|
/** 用印状态 */
|
||||||
|
private Integer orgsignStatus;
|
||||||
|
|
||||||
|
public Integer getPsnsignStatus() {
|
||||||
|
return psnsignStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPsnsignStatus(Integer psnsignStatus) {
|
||||||
|
this.psnsignStatus = psnsignStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrgsignStatus() {
|
||||||
|
return orgsignStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrgsignStatus(Integer orgsignStatus) {
|
||||||
|
this.orgsignStatus = orgsignStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getSignFlowStatus() {
|
public Integer getSignFlowStatus() {
|
||||||
return signFlowStatus;
|
return signFlowStatus;
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.mapper;
|
||||||
|
|
||||||
|
public interface SealSignRecordMapper {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+69
@@ -4,10 +4,17 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
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.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.SignAward;
|
||||||
|
import com.ruoyi.common.utils.bean.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.SmsUtils;
|
import com.ruoyi.common.utils.SmsUtils;
|
||||||
@@ -984,4 +991,66 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
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);
|
||||||
|
//更新立案申请状态为待送达
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
//修改"签署用印记录表"的状态为签署完成
|
||||||
|
|
||||||
|
//下载审核完成的裁决书,
|
||||||
|
// SaaSAPIFileUtils.fileDownloadUrl();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user