查询流程状态 #81
@@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 立案申请导入模板下载
|
* 立案申请导入模板下载
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://121.40.189.20:3306/smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
url: jdbc:mysql://121.40.189.20:3306/arbitrate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: YMzc157#
|
password: root123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|||||||
+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;
|
||||||
}
|
}
|
||||||
+11
-5
@@ -1,10 +1,16 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.mapper;
|
package com.ruoyi.wisdomarbitrate.mapper;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.bean.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface SealSignRecordMapper {
|
public interface SealSignRecordMapper {
|
||||||
int insertSealSignRecord(SealSignRecord SealSignRecord);
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
+124
-210
@@ -4,26 +4,14 @@ 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.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
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;
|
||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
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.core.domain.entity.SysUser;
|
|
||||||
|
|
||||||
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.common.utils.file.SaaSAPIFileUtils;
|
|
||||||
import com.ruoyi.system.mapper.SysUserMapper;
|
|
||||||
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;
|
||||||
@@ -34,11 +22,10 @@ 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;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -65,13 +52,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
private CaseAttachMapper caseAttachMapper;
|
private CaseAttachMapper caseAttachMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDeptMapper sysDeptMapper;
|
private SysDeptMapper sysDeptMapper;
|
||||||
@Autowired
|
|
||||||
private ICaseApplicationService caseApplicationService;
|
|
||||||
@Autowired
|
|
||||||
private SysUserMapper sysUserMapper;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SealSignRecordMapper sealSignRecordMapper;
|
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}$");
|
||||||
|
|
||||||
@@ -112,7 +95,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||||
// 将组织机构id设为申请人名称
|
// 将组织机构id设为申请人名称
|
||||||
if (deptMap.containsKey(caseAffiliate.getName())) {
|
if (deptMap.containsKey(caseApplication.getName())) {
|
||||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||||
} else {
|
} else {
|
||||||
// 如果不存在则新增
|
// 如果不存在则新增
|
||||||
@@ -195,7 +178,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||||
// 将组织机构id设为申请人名称
|
// 将组织机构id设为申请人名称
|
||||||
if (deptMap.containsKey(caseAffiliate.getName())) {
|
if (deptMap.containsKey(caseApplication.getName())) {
|
||||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||||
} else {
|
} else {
|
||||||
// 如果不存在则新增
|
// 如果不存在则新增
|
||||||
@@ -679,7 +662,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
}else {
|
}else {
|
||||||
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
||||||
// 仲裁员信息
|
|
||||||
if(arbitrators!=null&&arbitrators.size()>0){
|
if(arbitrators!=null&&arbitrators.size()>0){
|
||||||
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
||||||
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
||||||
@@ -716,123 +698,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
||||||
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
|
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
|
||||||
if(agreeOrNotCheck.intValue()==1){//同意审核
|
if(agreeOrNotCheck.intValue()==1){//同意审核
|
||||||
try {
|
|
||||||
//获取当前案件的裁决书
|
|
||||||
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
|
|
||||||
List<CaseAttach> caseAttachList = caseApplication2.getCaseAttachList();
|
|
||||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
|
||||||
for (CaseAttach caseAttach : caseAttachList) {
|
|
||||||
if (caseAttach.getAnnexType() == 3) {
|
|
||||||
String annexPath = caseAttach.getAnnexPath();
|
|
||||||
//String path = "/home/ruoyi/" + annexPath;
|
|
||||||
String path ="D:\\home\\仲裁裁决书模板.docx";
|
|
||||||
//获取文件上传地址
|
|
||||||
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
|
||||||
String body = response.getBody();
|
|
||||||
if (body != null){
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(body);
|
|
||||||
String fileId = jsonObject.getJSONObject("data").getString("fileId");
|
|
||||||
String fileUploadUrl = jsonObject.getJSONObject("data").getString("fileUploadUrl");
|
|
||||||
//上传文件流
|
|
||||||
EsignHttpResponse response1 = SaaSAPIFileUtils.uploadFile(fileUploadUrl, path);
|
|
||||||
JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
|
|
||||||
if (jsonObject1.getIntValue("errCode")==0){
|
|
||||||
//查看文件上传状态
|
|
||||||
Thread.sleep(5000);
|
|
||||||
EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
|
|
||||||
JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
|
|
||||||
JSONObject data = jsonObject2.getJSONObject("data");
|
|
||||||
int fileStatus =data.getIntValue("fileStatus");
|
|
||||||
if (fileStatus == 2 || fileStatus == 5){
|
|
||||||
String fileName = data.getString("fileName");
|
|
||||||
//上传成功,获取文件签名印章位置
|
|
||||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
|
||||||
sealSignRecord.setFileid(fileId);
|
|
||||||
EsignHttpResponse positions = SignAward.getPositions(sealSignRecord);
|
|
||||||
Gson gson = new Gson();
|
|
||||||
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
|
||||||
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
|
||||||
String keywordPositions = positionsData.get("keywordPositions").getAsString();
|
|
||||||
//发起签署
|
|
||||||
sealSignRecord.setFilename(fileName);
|
|
||||||
String arbitratorId = caseApplication2.getArbitratorId();
|
|
||||||
if (arbitratorId!=null){
|
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
|
|
||||||
if (sysUser == null){
|
|
||||||
return rows;
|
|
||||||
}
|
|
||||||
sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
|
|
||||||
sealSignRecord.setPensonName(sysUser.getNickName());
|
|
||||||
}
|
|
||||||
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
||||||
sealSignRecord.setOrgnizeNamePsnAccount("秦桃则");
|
|
||||||
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
||||||
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
|
||||||
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
|
||||||
//解析文件签名印章位置
|
|
||||||
JSONArray jsonArray = JSONArray.parseArray(keywordPositions);
|
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
|
||||||
JSONObject jsonObject3 = jsonArray.getJSONObject(i);
|
|
||||||
String keyword = jsonObject3.getString("keyword");
|
|
||||||
if (keyword.equals("仲裁员")){
|
|
||||||
//签名
|
|
||||||
JSONArray positionsArray = jsonObject3.getJSONArray("positions");
|
|
||||||
// 遍历 positionsArray 中的每个元素
|
|
||||||
for (int j = 0; j < positionsArray.size(); j++){
|
|
||||||
JSONObject positionObj = positionsArray.getJSONObject(j);
|
|
||||||
int pageNum = positionObj.getIntValue("pageNum");
|
|
||||||
sealSignRecord.setPositionPagepsn(String.valueOf(pageNum));
|
|
||||||
JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
|
|
||||||
JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
|
|
||||||
double positionX = coordinateObj.getDoubleValue("positionX");
|
|
||||||
double positionY = coordinateObj.getDoubleValue("positionY");
|
|
||||||
sealSignRecord.setPositionXpsn(positionX);
|
|
||||||
sealSignRecord.setPositionYpsn(positionY);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
//用印
|
|
||||||
JSONArray positionsArray = jsonObject3.getJSONArray("positions");
|
|
||||||
// 遍历 positionsArray 中的每个元素
|
|
||||||
for (int j = 0; j < positionsArray.size(); j++) {
|
|
||||||
JSONObject positionObj = positionsArray.getJSONObject(j);
|
|
||||||
int pageNum = positionObj.getIntValue("pageNum");
|
|
||||||
sealSignRecord.setPositionPageorg(String.valueOf(pageNum));
|
|
||||||
JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
|
|
||||||
JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
|
|
||||||
double positionX = coordinateObj.getDoubleValue("positionX");
|
|
||||||
double positionY = coordinateObj.getDoubleValue("positionY");
|
|
||||||
sealSignRecord.setPositionXorg(positionX);
|
|
||||||
sealSignRecord.setPositionYorg(positionY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
|
|
||||||
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
|
||||||
if (jsonObject1.getIntValue("code")==0){
|
|
||||||
//获取签署流程ID
|
|
||||||
JSONObject data1 = jsonObject3.getJSONObject("data");
|
|
||||||
String signFlowId = data1.getString("signFlowId");
|
|
||||||
//保存案件id,文件id,文件名称.流程id到签署用印记录表里
|
|
||||||
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
|
||||||
sealSignRecord.setSignFlowid(signFlowId);
|
|
||||||
sealSignRecord.setSignFlowStatus(1);//待签名
|
|
||||||
sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (EsignDemoException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
|
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||||
// 新增日志
|
// 新增日志
|
||||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
|
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
|
||||||
|
|
||||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
}else if(agreeOrNotCheck.intValue()==2){//拒绝审核
|
}else if(agreeOrNotCheck.intValue()==2){//拒绝审核
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||||
@@ -926,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) {
|
||||||
@@ -943,32 +849,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
String hearDatestr = dateFormat.format(hearDate);
|
String hearDatestr = dateFormat.format(hearDate);
|
||||||
|
|
||||||
String arbitratorId = caseApplicationselect.getArbitratorId();
|
String arbitratorId = caseApplicationselect.getArbitratorId();
|
||||||
// List<Arbitrator> arbitratorList = new ArrayList<>();
|
List<Arbitrator> arbitratorList = new ArrayList<>();
|
||||||
if(StringUtils.isNotEmpty(arbitratorId)){
|
if(StringUtils.isNotEmpty(arbitratorId)){
|
||||||
String[] idStrList = arbitratorId.split(",");
|
String[] idStrList = arbitratorId.split(",");
|
||||||
List<Long> idList = new ArrayList<>();
|
List<Long> idList = new ArrayList<>();
|
||||||
for(int i = 0;i < idStrList.length;i ++ ){
|
for(int i = 0;i < idStrList.length;i ++ ){
|
||||||
idList.add(Long.parseLong(idStrList[i]));
|
idList.add(Long.parseLong(idStrList[i]));
|
||||||
}
|
}
|
||||||
//
|
Arbitrator arbitrator = new Arbitrator();
|
||||||
|
arbitrator.setIdList(idList);
|
||||||
// 查询仲裁员电话号
|
arbitratorList = arbitratorMapper.selectArbitratorList(arbitrator);
|
||||||
List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
if(arbitratorList!=null) {
|
||||||
if(CollectionUtil.isNotEmpty(userList)) {
|
for (int i = 0; i < arbitratorList.size(); i++) {
|
||||||
for (SysUser user : userList) {
|
Arbitrator arbitratorselect = arbitratorList.get(i);
|
||||||
|
//给仲裁员发送短信通知
|
||||||
|
request.setPhone(arbitratorselect.getTelephone());
|
||||||
//给仲裁员发送短信通知
|
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
||||||
request.setPhone(user.getPhonenumber());
|
String name = arbitratorselect.getArbitratorName();
|
||||||
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
||||||
String name = user.getNickName();
|
SmsUtils.sendSms(request);
|
||||||
request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
}
|
||||||
SmsUtils.sendSms(request);
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
@@ -990,7 +891,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
||||||
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
||||||
}
|
}
|
||||||
|
caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
||||||
}
|
}
|
||||||
//给申请人、被申请人发送短信通知
|
//给申请人、被申请人发送短信通知
|
||||||
request.setPhone(caseAffiliateselect.getContactTelphone());
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|
||||||
@@ -1128,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();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+110
-34
@@ -6,65 +6,141 @@ 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);
|
||||||
|
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();
|
||||||
|
|
||||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
System.out.println("signFlowDetailJsonObject-----------"+signFlowDetailJsonObject.toString());
|
||||||
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);
|
|
||||||
|
|
||||||
|
|
||||||
|
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")){
|
||||||
|
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
||||||
|
if(psnSignerData!=null){
|
||||||
|
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
||||||
|
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||||
|
if(orgSignerData!=null){
|
||||||
|
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
||||||
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
||||||
if(orgSignerData!=null){
|
|
||||||
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
||||||
sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
|
||||||
@@ -3,14 +3,52 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"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">
|
||||||
<insert id="insertSealSignRecord" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
INSERT INTO seal_sign_record (file_id, file_name, sign_flow_id , penson_account
|
<resultMap type="SealSignRecord" id="SealSignRecordResult">
|
||||||
,penson_name,orgnize_name,org_name_psn_acc,org_name_psn_name,position_page_psn
|
<id property="id" column="id" />
|
||||||
,position_xpsn,position_ypsn,position_pageorg,position_xorg,position_yorg,case_appli_id
|
<result property="caseAppliId" column="case_appli_id" />
|
||||||
,sign_flow_status)
|
<result property="fileid" column="file_id" />
|
||||||
VALUES (#{fileid}, #{filename}, #{signFlowid},#{pensonAccount},#{pensonName},#{orgnizeName}
|
<result property="signFlowid" column="sign_flow_id" />
|
||||||
,#{orgnizeNamePsnAccount},#{orgnizeNamepsnName},#{positionPagepsn},#{positionXpsn},#{positionYpsn}
|
<result property="signFlowStatus" column="sign_flow_status" />
|
||||||
,#{positionPageorg},#{positionXorg},#{positionYorg},#{caseAppliId},#{signFlowStatus})
|
|
||||||
</insert>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user