查询流程状态
This commit is contained in:
@@ -3,6 +3,7 @@ package com.ruoyi;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||||
|
@EnableScheduling
|
||||||
public class RuoYiApplication
|
public class RuoYiApplication
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
|||||||
+22
@@ -6,7 +6,9 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -95,6 +97,26 @@ public class CaseApplicationController extends BaseController {
|
|||||||
return success(caseApplicationselect);
|
return success(caseApplicationselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询签名链接
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
|
||||||
|
@PostMapping("/selectSignUrl")
|
||||||
|
public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
|
||||||
|
SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
|
||||||
|
return success(sealSignRecordselect);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用印链接
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
|
||||||
|
@PostMapping("/selectSealUrl")
|
||||||
|
public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
|
||||||
|
SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
|
||||||
|
return success(sealUrlRecordselect);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 立案申请导入模板下载
|
* 立案申请导入模板下载
|
||||||
*/
|
*/
|
||||||
|
|||||||
+33
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.common.utils.bean;
|
package com.ruoyi.wisdomarbitrate.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
@@ -30,6 +30,38 @@ public class SealSignRecord extends BaseEntity {
|
|||||||
/** 用印状态 */
|
/** 用印状态 */
|
||||||
private Integer orgsignStatus;
|
private Integer orgsignStatus;
|
||||||
|
|
||||||
|
/** 签名链接 */
|
||||||
|
private String signUrl;
|
||||||
|
|
||||||
|
public String getSignUrl() {
|
||||||
|
return signUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignUrl(String signUrl) {
|
||||||
|
this.signUrl = signUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSealUrl() {
|
||||||
|
return sealUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSealUrl(String sealUrl) {
|
||||||
|
this.sealUrl = sealUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 用印链接 */
|
||||||
|
private String sealUrl;
|
||||||
|
|
||||||
|
private Long caseAppliId;
|
||||||
|
|
||||||
|
public Long getCaseAppliId() {
|
||||||
|
return caseAppliId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaseAppliId(Long caseAppliId) {
|
||||||
|
this.caseAppliId = caseAppliId;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getPsnsignStatus() {
|
public Integer getPsnsignStatus() {
|
||||||
return psnsignStatus;
|
return psnsignStatus;
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,16 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.mapper;
|
package com.ruoyi.wisdomarbitrate.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface SealSignRecordMapper {
|
public interface SealSignRecordMapper {
|
||||||
|
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
|
||||||
|
|
||||||
|
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
|
||||||
|
|
||||||
|
int updataSealSignRecord(SealSignRecord sealSignRecord);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service;
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -40,4 +42,8 @@ public interface ICaseApplicationService {
|
|||||||
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
|
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
|
||||||
|
|
||||||
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
|
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
|
||||||
|
|
||||||
|
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||||
|
|
||||||
|
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||||
}
|
}
|
||||||
|
|||||||
+107
-56
@@ -5,7 +5,6 @@ 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.Gson;
|
||||||
import com.google.gson.JsonArray;
|
|
||||||
import com.google.gson.JsonObject;
|
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;
|
||||||
@@ -13,8 +12,6 @@ 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.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;
|
||||||
@@ -25,6 +22,7 @@ import com.ruoyi.wisdomarbitrate.domain.*;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||||
|
import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -54,6 +52,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
private CaseAttachMapper caseAttachMapper;
|
private CaseAttachMapper caseAttachMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDeptMapper sysDeptMapper;
|
private SysDeptMapper sysDeptMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SealSignRecordMapper sealSignRecordMapper;
|
||||||
// 手机号正则
|
// 手机号正则
|
||||||
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}$");
|
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}$");
|
||||||
|
|
||||||
@@ -794,6 +795,43 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
return "短信发送成功";
|
return "短信发送成功";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException {
|
||||||
|
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||||
|
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
||||||
|
Gson gson = new Gson();
|
||||||
|
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
||||||
|
SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
||||||
|
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||||
|
SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
||||||
|
EsignHttpResponse signUrl = SignAward.signUrl(sealSignRecordselect);
|
||||||
|
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||||
|
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||||
|
String url = signUrlData.get("url").getAsString();
|
||||||
|
sealSignRecordReslt.setSignUrl(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sealSignRecordReslt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException {
|
||||||
|
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||||
|
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
||||||
|
Gson gson = new Gson();
|
||||||
|
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
||||||
|
SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
||||||
|
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||||
|
SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
||||||
|
EsignHttpResponse signUrl = SignAward.usesealUrl(sealSignRecordselect);
|
||||||
|
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||||
|
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||||
|
String url = signUrlData.get("url").getAsString();
|
||||||
|
sealSignRecordReslt.setSealUrl(url);
|
||||||
|
}
|
||||||
|
return sealSignRecordReslt;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int pendTralSure(CaseApplication caseApplication) {
|
public int pendTralSure(CaseApplication caseApplication) {
|
||||||
@@ -991,62 +1029,75 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
// @Transactional
|
||||||
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
// public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
||||||
|
//
|
||||||
Gson gson = new Gson();
|
// Gson gson = new Gson();
|
||||||
|
//
|
||||||
|
// SealSignRecord sealSignRecordselect = new SealSignRecord();
|
||||||
|
// sealSignRecordselect.setSignFlowStatus(1);
|
||||||
|
//
|
||||||
|
// List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecordselect);
|
||||||
|
// if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||||
|
// for (int i = 0; i < sealSignRecords.size(); i++) {
|
||||||
|
// SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
||||||
|
// 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 j = 0; j < signersArray.size(); j++) {
|
||||||
|
// JsonObject signerObject = (JsonObject)signersArray.get(j);
|
||||||
|
// 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);
|
||||||
|
//
|
||||||
|
// //修改"签署用印记录表"的状态为待用印
|
||||||
|
// sealSignRecord.setSignFlowStatus(2);
|
||||||
|
// sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// 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);
|
||||||
|
//
|
||||||
|
// //修改"签署用印记录表"的状态为签署完成
|
||||||
|
// sealSignRecord.setSignFlowStatus(3);
|
||||||
|
// sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
//
|
||||||
|
// //下载审核完成的裁决书,
|
||||||
|
//// SaaSAPIFileUtils.fileDownloadUrl();
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+102
-26
@@ -6,64 +6,140 @@ 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.SignAward;
|
|
||||||
import com.ruoyi.common.utils.bean.SealSignRecord;
|
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
public class FixSelectFlowDetailUtils {
|
public class FixSelectFlowDetailUtils {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseApplicationMapper caseApplicationMapper;
|
private CaseApplicationMapper caseApplicationMapper;
|
||||||
|
@Autowired
|
||||||
|
private SealSignRecordMapper sealSignRecordMapper;
|
||||||
|
|
||||||
|
@Scheduled(cron = "0/3 * * * * ?")
|
||||||
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
||||||
|
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
||||||
|
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
||||||
|
sealSignRecordselect.setSignFlowStatus(1);
|
||||||
|
|
||||||
|
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
||||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||||
sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
for (int i = 0; i < sealSignRecords.size(); i++) {
|
||||||
|
SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
||||||
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
||||||
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();
|
||||||
for (int i = 0; i < signersArray.size(); i++) {
|
|
||||||
JsonObject signerObject = (JsonObject)signersArray.get(i);
|
System.out.println("signFlowDetailJsonObject-----------"+signFlowDetailJsonObject.toString());
|
||||||
Integer psnsignStatus ;
|
|
||||||
Integer orgsignStatus ;
|
Integer psnsignStatus = null;
|
||||||
|
Integer orgsignStatus = null;
|
||||||
|
for (int j = 0; j < signersArray.size(); j++) {
|
||||||
|
JsonObject signerObject = (JsonObject)signersArray.get(j);
|
||||||
|
|
||||||
if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
||||||
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
||||||
if(psnSignerData!=null){
|
if(psnSignerData!=null){
|
||||||
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
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")){
|
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
||||||
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||||
if(orgSignerData!=null){
|
if(orgSignerData!=null){
|
||||||
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||||
sealSignRecord.setOrgsignStatus(orgsignStatus);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("psnsignStatus-----------"+psnsignStatus);
|
||||||
|
System.out.println("orgsignStatus-----------"+orgsignStatus);
|
||||||
|
|
||||||
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
||||||
|
//更新立案申请状态为待用印
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
//修改"签署用印记录表"的状态为待用印
|
||||||
|
sealSignRecord.setSignFlowStatus(2);
|
||||||
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
}
|
}
|
||||||
|
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
||||||
|
//更新立案申请状态为待送达
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||||
|
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
|
||||||
|
//修改"签署用印记录表"的状态为签署完成
|
||||||
|
sealSignRecord.setSignFlowStatus(3);
|
||||||
|
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||||
|
|
||||||
|
//下载审核完成的裁决书,
|
||||||
|
// SaaSAPIFileUtils.fileDownloadUrl();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.common.utils;
|
package com.ruoyi.wisdomarbitrate.utils;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
@@ -6,9 +6,10 @@ import com.google.gson.JsonObject;
|
|||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
import com.ruoyi.common.enums.EsignRequestType;
|
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.EsignApplicaConfig;
|
||||||
|
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class SignAward {
|
public class SignAward {
|
||||||
@@ -106,8 +107,8 @@ public class SignAward {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(signFlowDetailJsonObject);
|
System.out.println(signFlowDetailJsonObject);
|
||||||
|
|
||||||
|
|
||||||
@@ -4,8 +4,45 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
|
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
|
||||||
|
|
||||||
|
<resultMap type="SealSignRecord" id="SealSignRecordResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="caseAppliId" column="case_appli_id" />
|
||||||
|
<result property="fileid" column="file_id" />
|
||||||
|
<result property="signFlowid" column="sign_flow_id" />
|
||||||
|
<result property="signFlowStatus" column="sign_flow_status" />
|
||||||
|
|
||||||
|
<result property="pensonAccount" column="penson_account" />
|
||||||
|
<result property="orgnizeName" column="orgnize_name" />
|
||||||
|
<result property="orgnizeNamePsnAccount" column="orgn_name_psn_acc" />
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||||
|
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
|
||||||
|
from seal_sign_record s
|
||||||
|
<where>
|
||||||
|
<if test="signFlowStatus != null ">
|
||||||
|
AND s.sign_flow_status = #{signFlowStatus}
|
||||||
|
</if>
|
||||||
|
<if test="caseAppliId != null ">
|
||||||
|
AND s.case_appli_id = #{caseAppliId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||||
|
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id
|
||||||
|
from seal_sign_record s
|
||||||
|
where s.sign_flow_status in (1,2)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
||||||
|
update seal_sign_record
|
||||||
|
<set>
|
||||||
|
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus}</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user