修复公章管理
This commit is contained in:
+13
-2
@@ -84,7 +84,7 @@ public class DeptIdentifyController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sealList")
|
@GetMapping("/sealList")
|
||||||
public TableDataInfo getSealList(DeptIdentify deptIdentify){
|
public TableDataInfo getSealList( DeptIdentify deptIdentify){
|
||||||
startPage();
|
startPage();
|
||||||
List<SealListVO> list = deptIdentifyService.getSealList(deptIdentify);
|
List<SealListVO> list = deptIdentifyService.getSealList(deptIdentify);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@@ -97,9 +97,20 @@ public class DeptIdentifyController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/updateSealLockStatus")
|
@PostMapping("/updateSealLockStatus")
|
||||||
public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
|
public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
|
||||||
if(sealManage.getId()==null ||sealManage.getSealStatus()==null){
|
if(sealManage.getId()==null ||sealManage.getIsUse()==null){
|
||||||
return error("参数校验失败");
|
return error("参数校验失败");
|
||||||
}
|
}
|
||||||
return deptIdentifyService.updateSealLockStatus(sealManage);
|
return deptIdentifyService.updateSealLockStatus(sealManage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 新增模板
|
||||||
|
// * @param deptIdentify
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @PostMapping("/insert")
|
||||||
|
// public AjaxResult insertDeptIdentify(@RequestBody DeptIdentify deptIdentify){
|
||||||
|
// return deptIdentifyService.insertDeptIdentify(deptIdentify);
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,11 @@ public class SealManage extends BaseEntity {
|
|||||||
private Integer annexId;
|
private Integer annexId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 印章状态(0禁用,1启用)
|
* 印章审核状态(0未通过,1通过)
|
||||||
*/
|
*/
|
||||||
private Integer sealStatus;
|
private Integer sealStatus;
|
||||||
|
/**
|
||||||
|
* 印章使用状态(0禁用,1启用)
|
||||||
|
*/
|
||||||
|
private Integer isUse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TemplateManage extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构关联id
|
||||||
|
*/
|
||||||
|
private Long identifyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板名称
|
||||||
|
*/
|
||||||
|
private String temName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板类型(1裁决书)
|
||||||
|
*/
|
||||||
|
private Integer temType;
|
||||||
|
/**
|
||||||
|
* 模板格式
|
||||||
|
*/
|
||||||
|
private String temFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原模板路径
|
||||||
|
*/
|
||||||
|
private String temOrigPath;
|
||||||
|
/**
|
||||||
|
* 修订后模板路径
|
||||||
|
*/
|
||||||
|
private String temRevisPath;
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private Integer delFlag;
|
||||||
|
}
|
||||||
@@ -9,9 +9,13 @@ public class SealListVO {
|
|||||||
/** 印章名称 */
|
/** 印章名称 */
|
||||||
private String sealName;
|
private String sealName;
|
||||||
/**
|
/**
|
||||||
* 印章状态 0禁用,1启用
|
* 印章审核状态(0未通过,1通过)
|
||||||
*/
|
*/
|
||||||
private Integer sealStatus;
|
private Integer sealStatus;
|
||||||
|
/**
|
||||||
|
* 印章使用状态(0禁用,1启用)
|
||||||
|
*/
|
||||||
|
private Integer isUse;
|
||||||
/**
|
/**
|
||||||
* 附件id
|
* 附件id
|
||||||
*/
|
*/
|
||||||
|
|||||||
+31
-25
@@ -119,7 +119,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
// 手机号正则
|
// 手机号正则
|
||||||
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}$");
|
||||||
// 邮箱正则
|
// 邮箱正则
|
||||||
private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
|
private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
|
||||||
|
|
||||||
|
|
||||||
@@ -1418,7 +1418,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
|
if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
|
||||||
failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
|
failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
|
||||||
} else if(!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()){
|
} else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
|
||||||
|
|
||||||
failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
|
failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
|
||||||
}
|
}
|
||||||
@@ -1524,7 +1524,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(caseApplication.getEmail())) {
|
if (StrUtil.isEmpty(caseApplication.getEmail())) {
|
||||||
failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
|
failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
|
||||||
} else if(!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()){
|
} else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
|
||||||
|
|
||||||
failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
|
failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
|
||||||
}
|
}
|
||||||
@@ -1687,9 +1687,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
for (CaseAttach caseAttach : caseAttachList) {
|
for (CaseAttach caseAttach : caseAttachList) {
|
||||||
if (caseAttach.getAnnexType() == 3) {
|
if (caseAttach.getAnnexType() == 3) {
|
||||||
String annexPath = caseAttach.getAnnexPath();
|
String annexPath = caseAttach.getAnnexPath();
|
||||||
String path = "/home/ruoyi/" + annexPath;
|
//String path = "/home/ruoyi" + annexPath;
|
||||||
System.out.println("这是查询到的裁决书路径" + path);
|
// System.out.println("这是查询到的裁决书路径" + path);
|
||||||
//String path ="D:\\home\\仲裁裁决书模板.docx";
|
String path = "D:\\home\\仲裁裁决书模板.docx";
|
||||||
//获取文件上传地址
|
//获取文件上传地址
|
||||||
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
||||||
String body = response.getBody();
|
String body = response.getBody();
|
||||||
@@ -1736,8 +1736,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
||||||
deptIdentifyselect = deptIdentifysnew.get(0);
|
deptIdentifyselect = deptIdentifysnew.get(0);
|
||||||
sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
|
sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
|
||||||
sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperName());
|
sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperPhone());
|
||||||
sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperPhone());
|
sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperName());
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("没有用印时的机构名称及经办人信息");
|
return AjaxResult.error("没有用印时的机构名称及经办人信息");
|
||||||
}
|
}
|
||||||
@@ -1815,27 +1815,33 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if (selectSealList != null && selectSealList.size() > 0) {
|
if (selectSealList != null && selectSealList.size() > 0) {
|
||||||
for (SealManage manage : selectSealList) {
|
for (SealManage manage : selectSealList) {
|
||||||
Integer sealStatus = manage.getSealStatus();
|
Integer sealStatus = manage.getSealStatus();
|
||||||
if (sealStatus == 1){
|
if (sealStatus == 1) {
|
||||||
sealIdList.add(manage.getSealId());
|
sealIdList.add(manage.getSealId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord,sealIdList);
|
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
|
||||||
|
|
||||||
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
||||||
if (jsonObject3.getIntValue("code") == 0) {
|
if (jsonObject3 != null){
|
||||||
//获取签署流程ID
|
if (jsonObject3.getIntValue("code") == 0) {
|
||||||
JSONObject data1 = jsonObject3.getJSONObject("data");
|
//获取签署流程ID
|
||||||
String signFlowId = data1.getString("signFlowId");
|
JSONObject data1 = jsonObject3.getJSONObject("data");
|
||||||
//保存案件id,文件id,文件名称.流程id到签署用印记录表里
|
String signFlowId = data1.getString("signFlowId");
|
||||||
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
//保存案件id,文件id,文件名称.流程id到签署用印记录表里
|
||||||
sealSignRecord.setSignFlowid(signFlowId);
|
sealSignRecord.setCaseAppliId(caseApplication.getId());
|
||||||
sealSignRecord.setSignFlowStatus(1);//待签名
|
sealSignRecord.setSignFlowid(signFlowId);
|
||||||
sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
|
sealSignRecord.setSignFlowStatus(1);//待签名
|
||||||
} else {
|
sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
|
||||||
throw new ServiceException("发起签署流程失败,请检查参数是否有误");
|
} else {
|
||||||
|
throw new ServiceException("发起签署流程失败,请检查参数是否有误");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2625,7 +2631,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
// 新增预约会议表
|
// 新增预约会议表
|
||||||
ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
|
ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
|
||||||
reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
|
reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
|
||||||
reservedConferenceMapper.insert(conference);
|
reservedConferenceMapper.insert(conference);
|
||||||
return AjaxResult.success("预约会议成功");
|
return AjaxResult.success("预约会议成功");
|
||||||
|
|
||||||
@@ -2653,7 +2659,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
String roomId = generateRoomId();
|
String roomId = generateRoomId();
|
||||||
// 新增预约会议表
|
// 新增预约会议表
|
||||||
ReservedConference conference = new ReservedConference(caseId, roomId,
|
ReservedConference conference = new ReservedConference(caseId, roomId,
|
||||||
null, null,0);
|
null, null, 0);
|
||||||
reservedConferenceMapper.insert(conference);
|
reservedConferenceMapper.insert(conference);
|
||||||
return roomId;
|
return roomId;
|
||||||
}
|
}
|
||||||
@@ -2667,7 +2673,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 查询最大房间号
|
// 查询最大房间号
|
||||||
Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
|
Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
|
||||||
|
|
||||||
if (null == maxRoomId || maxRoomId >999999) {
|
if (null == maxRoomId || maxRoomId > 999999) {
|
||||||
return "000001";
|
return "000001";
|
||||||
} else {
|
} else {
|
||||||
return String.format("%06d", maxRoomId);
|
return String.format("%06d", maxRoomId);
|
||||||
@@ -2715,7 +2721,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
@Override
|
@Override
|
||||||
public AjaxResult deleteRoom(String roomId) {
|
public AjaxResult deleteRoom(String roomId) {
|
||||||
|
|
||||||
return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
|
return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-4
@@ -145,7 +145,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
sealManage.setIdentifyId(identify.getId());
|
sealManage.setIdentifyId(identify.getId());
|
||||||
sealManage.setSealName(sealName);
|
sealManage.setSealName(sealName);
|
||||||
sealManage.setSealId(sealId);
|
sealManage.setSealId(sealId);
|
||||||
sealManage.setSealStatus(0); //默认为禁用
|
sealManage.setSealStatus(0); //默认为未审核
|
||||||
|
sealManage.setIsUse(0); //默认为禁用
|
||||||
int i = sealManageMapper.insertSealManage(sealManage);
|
int i = sealManageMapper.insertSealManage(sealManage);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
return AjaxResult.success("上传成功");
|
return AjaxResult.success("上传成功");
|
||||||
@@ -256,14 +257,14 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
List<SealListVO> sealListVOS = new ArrayList<>();
|
List<SealListVO> sealListVOS = new ArrayList<>();
|
||||||
if (selectSealList != null && selectSealList.size() > 0) {
|
if (selectSealList != null && selectSealList.size() > 0) {
|
||||||
for (SealManage sealManage1 : selectSealList) {
|
for (SealManage sealManage1 : selectSealList) {
|
||||||
Integer annexId = sealManage1.getAnnexId();
|
Integer sealStatus = sealManage1.getSealStatus();
|
||||||
if (annexId != null) { //附件id有值,证明是审核通过了的
|
if (sealStatus == 1) { //审核状态为启用
|
||||||
SealListVO sealListVO = new SealListVO();
|
SealListVO sealListVO = new SealListVO();
|
||||||
sealListVO.setSealId(sealManage1.getSealId());
|
sealListVO.setSealId(sealManage1.getSealId());
|
||||||
sealListVO.setSealName(sealManage1.getSealName());
|
sealListVO.setSealName(sealManage1.getSealName());
|
||||||
sealListVO.setSealStatus(sealManage1.getSealStatus());
|
sealListVO.setSealStatus(sealManage1.getSealStatus());
|
||||||
//根据附件id查询路径
|
//根据附件id查询路径
|
||||||
CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
|
CaseAttach caseAttach = caseAttachMapper.queryAnnexById(sealManage1.getAnnexId());
|
||||||
String annexName = caseAttach.getAnnexName();
|
String annexName = caseAttach.getAnnexName();
|
||||||
String prefix = "/profile";
|
String prefix = "/profile";
|
||||||
int startIndex = annexName.indexOf(prefix);
|
int startIndex = annexName.indexOf(prefix);
|
||||||
@@ -271,6 +272,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||||
sealListVO.setAnnexPath(annexPath);
|
sealListVO.setAnnexPath(annexPath);
|
||||||
sealListVO.setAnnexType(caseAttach.getAnnexType());
|
sealListVO.setAnnexType(caseAttach.getAnnexType());
|
||||||
|
sealListVO.setIsUse(sealManage1.getIsUse());
|
||||||
sealListVOS.add(sealListVO);
|
sealListVOS.add(sealListVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+78
-66
@@ -39,10 +39,11 @@ public class FixSelectFlowDetailUtils {
|
|||||||
private DeptIdentifyMapper deptIdentifyMapper;
|
private DeptIdentifyMapper deptIdentifyMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SealManageMapper sealManageMapper;
|
private SealManageMapper sealManageMapper;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
定时查询签署流程详情
|
定时查询签署流程详情
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0/10 * * * * ?")
|
//@Scheduled(cron = "0/10 * * * * ?")
|
||||||
@Transactional
|
@Transactional
|
||||||
public void fixExecuteSelectFlowDetailUtils() {
|
public void fixExecuteSelectFlowDetailUtils() {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
@@ -173,9 +174,10 @@ public class FixSelectFlowDetailUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时查询企业认证状态
|
* 定时查询企业认证状态
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0/30 * * * ?")
|
//@Scheduled(cron = "*/30 * * * * *")
|
||||||
@Transactional
|
@Transactional
|
||||||
public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
|
public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
@@ -185,76 +187,84 @@ public class FixSelectFlowDetailUtils {
|
|||||||
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
||||||
for (int i = 0; i < deptIdentifysnew.size(); i++) {
|
for (int i = 0; i < deptIdentifysnew.size(); i++) {
|
||||||
DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
|
DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
|
||||||
EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
|
String authFlowId = deptIdentify1.getAuthFlowId();
|
||||||
JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
|
if (authFlowId != null) {
|
||||||
int code = identifyInfoJsonObject.get("code").getAsInt();
|
EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
|
||||||
if (code == 0) {
|
JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
|
||||||
JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
|
int code = identifyInfoJsonObject.get("code").getAsInt();
|
||||||
int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
|
if (code == 0) {
|
||||||
if (realnameStatus == 1) {
|
JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
|
||||||
String orgId = identifyInfoData.get("orgId").getAsString();
|
int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
|
||||||
//查询企业内部印章
|
if (realnameStatus == 1) {
|
||||||
EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
|
String orgId = identifyInfoData.get("orgId").getAsString();
|
||||||
JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
|
//查询企业内部印章
|
||||||
int code1 = jsonObject.get("code").getAsInt();
|
EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
|
||||||
if (code1 == 0){
|
JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
|
||||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
int code1 = jsonObject.get("code").getAsInt();
|
||||||
JsonArray seals = data.get("seals").getAsJsonArray();
|
if (code1 == 0) {
|
||||||
if (seals.size() > 0) {
|
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||||
for (int j = 0; j < seals.size(); j++) {
|
JsonArray seals = data.get("seals").getAsJsonArray();
|
||||||
//保存印章信息到数据库
|
if (seals.size() > 0) {
|
||||||
JsonObject asJsonObject = seals.get(j).getAsJsonObject();
|
for (int j = 0; j < seals.size(); j++) {
|
||||||
SealManage sealManage = new SealManage();
|
//保存印章信息到数据库
|
||||||
String sealName = asJsonObject.get("sealName").toString();
|
JsonObject asJsonObject = seals.get(j).getAsJsonObject();
|
||||||
String sealId = asJsonObject.get("sealId").toString();
|
SealManage sealManage = new SealManage();
|
||||||
String url = asJsonObject.get("sealImageDownloadUrl").toString();
|
String sealName = asJsonObject.get("sealName").toString();
|
||||||
LocalDate now = LocalDate.now();
|
String sealId = asJsonObject.get("sealId").toString();
|
||||||
String year = Integer.toString(now.getYear());
|
String url = asJsonObject.get("sealImageDownloadUrl").toString();
|
||||||
String month = String.format("%02d", now.getMonthValue());
|
LocalDate now = LocalDate.now();
|
||||||
String day = String.format("%02d", now.getDayOfMonth());
|
String year = Integer.toString(now.getYear());
|
||||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
String month = String.format("%02d", now.getMonthValue());
|
||||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
String day = String.format("%02d", now.getDayOfMonth());
|
||||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
|
||||||
// 创建日期目录
|
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
File saveFolder = new File(saveFolderPath);
|
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||||
if (!saveFolder.exists()) {
|
// 创建日期目录
|
||||||
saveFolder.mkdirs();
|
File saveFolder = new File(saveFolderPath);
|
||||||
}
|
if (!saveFolder.exists()) {
|
||||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
saveFolder.mkdirs();
|
||||||
File resultFilePathFile = new File(resultFilePath);
|
}
|
||||||
if (!resultFilePathFile.exists()) {
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
resultFilePathFile.createNewFile();
|
File resultFilePathFile = new File(resultFilePath);
|
||||||
}
|
if (!resultFilePathFile.exists()) {
|
||||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(url, resultFilePath);
|
resultFilePathFile.createNewFile();
|
||||||
if (downLoadFile) {
|
}
|
||||||
CaseAttach caseAttach = new CaseAttach();
|
String fileDownloadUrlnew = url.substring(1, url.length() - 1);
|
||||||
caseAttach.setAnnexType(10); //10代表印章图片
|
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||||
caseAttach.setAnnexPath(savePath);
|
if (downLoadFile) {
|
||||||
caseAttach.setAnnexName(saveName);
|
CaseAttach caseAttach = new CaseAttach();
|
||||||
int i1 = caseAttachMapper.save(caseAttach);
|
caseAttach.setAnnexType(10); //10代表印章图片
|
||||||
if (i1 > 0) {
|
caseAttach.setAnnexPath(savePath);
|
||||||
//将印章信息保存到公章管理表里
|
caseAttach.setAnnexName(saveName);
|
||||||
Integer annexId1 = caseAttach.getAnnexId();
|
int i1 = caseAttachMapper.save(caseAttach);
|
||||||
sealManage.setAnnexId(annexId1);
|
if (i1 > 0) {
|
||||||
sealManage.setSealId(sealId);
|
//将印章信息保存到公章管理表里
|
||||||
sealManage.setSealName(sealName);
|
String sealName1 = sealName.substring(1, sealName.length() - 1);
|
||||||
sealManage.setIdentifyId(deptIdentify1.getId());
|
String sealId1 = sealId.substring(1, sealId.length() - 1);
|
||||||
sealManage.setSealStatus(1);
|
Integer annexId1 = caseAttach.getAnnexId();
|
||||||
sealManageMapper.insertSealManage(sealManage);
|
sealManage.setAnnexId(annexId1);
|
||||||
|
sealManage.setSealId(sealId1);
|
||||||
|
sealManage.setSealName(sealName1);
|
||||||
|
sealManage.setIdentifyId(deptIdentify1.getId());
|
||||||
|
sealManage.setSealStatus(1);
|
||||||
|
sealManage.setIsUse(1);
|
||||||
|
sealManageMapper.insertSealManage(sealManage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//将orgId保存到数据库里
|
||||||
|
deptIdentify1.setOrgId(orgId);
|
||||||
|
deptIdentify1.setIdentifyStatus(1);
|
||||||
|
deptIdentify1.setIsUse(0); //默认机构为未启用
|
||||||
|
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
||||||
}
|
}
|
||||||
//将orgId保存到数据库里
|
|
||||||
deptIdentify1.setOrgId(orgId);
|
|
||||||
deptIdentify1.setIdentifyStatus(1);
|
|
||||||
deptIdentify1.setIsUse(0); //默认机构为未启用
|
|
||||||
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,7 +303,7 @@ public class FixSelectFlowDetailUtils {
|
|||||||
int sealStatus = data.getIntValue("sealStatus");
|
int sealStatus = data.getIntValue("sealStatus");
|
||||||
if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
|
if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
|
||||||
//已启用证明审核通过,下载到数据库
|
//已启用证明审核通过,下载到数据库
|
||||||
String sealImageDownloadUrl = data.getString("sealImageDownloadUrl ");
|
String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
String year = Integer.toString(now.getYear());
|
String year = Integer.toString(now.getYear());
|
||||||
String month = String.format("%02d", now.getMonthValue());
|
String month = String.format("%02d", now.getMonthValue());
|
||||||
@@ -323,6 +333,8 @@ public class FixSelectFlowDetailUtils {
|
|||||||
//将附件id保存到公章管理表里
|
//将附件id保存到公章管理表里
|
||||||
Integer annexId1 = caseAttach.getAnnexId();
|
Integer annexId1 = caseAttach.getAnnexId();
|
||||||
sealManage1.setAnnexId(annexId1);
|
sealManage1.setAnnexId(annexId1);
|
||||||
|
sealManage1.setSealStatus(1);
|
||||||
|
sealManage1.setIsUse(1); //默认使用状态都是未启用
|
||||||
sealManageMapper.updateSealManage(sealManage1);
|
sealManageMapper.updateSealManage(sealManage1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ public class SignAward {
|
|||||||
/* " \"availableSealIds\": [\n" +
|
/* " \"availableSealIds\": [\n" +
|
||||||
" \"" + availableSealId + "\"\n" +
|
" \"" + availableSealId + "\"\n" +
|
||||||
" ],\n" +*/
|
" ],\n" +*/
|
||||||
" \"availableSealIds\": " + new Gson().toJson(sealIdList) + "\n" +
|
" \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" +
|
||||||
|
|
||||||
" \"signFieldPosition\": {\n" +
|
" \"signFieldPosition\": {\n" +
|
||||||
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach">
|
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||||
select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||||
from case_attach
|
from case_attach
|
||||||
<where>
|
<where>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
where annex_id = #{annexId}
|
where annex_id = #{annexId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach">
|
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
|
||||||
update case_attach
|
update case_attach
|
||||||
<set>
|
<set>
|
||||||
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||||
|
|||||||
@@ -55,8 +55,9 @@
|
|||||||
<if test="orgId != null and orgId != ''">org_id,</if>
|
<if test="orgId != null and orgId != ''">org_id,</if>
|
||||||
<if test="operName != null and operName != ''">oper_name,</if>
|
<if test="operName != null and operName != ''">oper_name,</if>
|
||||||
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
|
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
|
||||||
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
|
|
||||||
<if test="identifyType != null">identify_type</if>
|
<if test="identifyType != null">identify_type</if>
|
||||||
|
<if test="authFlowId != null and authFlowId != ''">auth_flow_id</if>
|
||||||
|
|
||||||
)values(
|
)values(
|
||||||
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
|
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
|
||||||
<if test="identifyStatus != null">#{identifyStatus},</if>
|
<if test="identifyStatus != null">#{identifyStatus},</if>
|
||||||
@@ -65,8 +66,8 @@
|
|||||||
<if test="orgId != null and orgId != ''">#{orgId},</if>
|
<if test="orgId != null and orgId != ''">#{orgId},</if>
|
||||||
<if test="operName != null and operName != ''">#{operName},</if>
|
<if test="operName != null and operName != ''">#{operName},</if>
|
||||||
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
|
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
|
||||||
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
|
|
||||||
<if test="identifyType != null ">#{identifyType}</if>
|
<if test="identifyType != null ">#{identifyType}</if>
|
||||||
|
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId}</if>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,11 @@
|
|||||||
<result property="sealId" column="seal_id" />
|
<result property="sealId" column="seal_id" />
|
||||||
<result property="annexId" column="annex_id" />
|
<result property="annexId" column="annex_id" />
|
||||||
<result property="sealStatus" column="seal_status" />
|
<result property="sealStatus" column="seal_status" />
|
||||||
|
<result property="isUse" column="is_use" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
|
<select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
|
||||||
SELECT id, identify_id ,seal_name , seal_id,annex_id,seal_status
|
SELECT id, identify_id ,seal_name , seal_id,annex_id,seal_status,is_use
|
||||||
FROM seal_manage
|
FROM seal_manage
|
||||||
<where>
|
<where>
|
||||||
<if test="identifyId != null">
|
<if test="identifyId != null">
|
||||||
@@ -32,24 +33,27 @@
|
|||||||
<if test="sealName != null and sealName != ''">seal_name,</if>
|
<if test="sealName != null and sealName != ''">seal_name,</if>
|
||||||
<if test="sealId != null and sealId != ''">seal_id,</if>
|
<if test="sealId != null and sealId != ''">seal_id,</if>
|
||||||
<if test="annexId != null">annex_id,</if>
|
<if test="annexId != null">annex_id,</if>
|
||||||
<if test="sealStatus != null">seal_status</if>
|
<if test="sealStatus != null">seal_status,</if>
|
||||||
|
<if test="isUse != null">is_use</if>
|
||||||
)values(
|
)values(
|
||||||
<if test="identifyId != null">#{identifyId},</if>
|
<if test="identifyId != null">#{identifyId},</if>
|
||||||
<if test="sealName != null and sealName != ''">#{sealName},</if>
|
<if test="sealName != null and sealName != ''">#{sealName},</if>
|
||||||
<if test="sealId != null and sealId != ''">#{sealId},</if>
|
<if test="sealId != null and sealId != ''">#{sealId},</if>
|
||||||
<if test="annexId != null">#{annexId},</if>
|
<if test="annexId != null">#{annexId},</if>
|
||||||
<if test="sealStatus != null">#{sealStatus}</if>
|
<if test="sealStatus != null">#{sealStatus},</if>
|
||||||
|
<if test="isUse != null">#{isUse}</if>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSealManage" parameterType="SealManage">
|
<update id="updateSealManage" parameterType="SealManage">
|
||||||
update dept_identify
|
update seal_manage
|
||||||
<set>
|
<set>
|
||||||
<if test="identifyId != null">identify_id = #{identifyId},</if>
|
<if test="identifyId != null">identify_id = #{identifyId},</if>
|
||||||
<if test="sealName != null">seal_name = #{sealName},</if>
|
<if test="sealName != null">seal_name = #{sealName},</if>
|
||||||
<if test="sealId != null ">seal_id = #{sealId},</if>
|
<if test="sealId != null ">seal_id = #{sealId},</if>
|
||||||
<if test="annexId != null ">annex_id = #{annexId},</if>
|
<if test="annexId != null ">annex_id = #{annexId},</if>
|
||||||
<if test="sealStatus != null ">seal_status = #{sealStatus}</if>
|
<if test="sealStatus != null ">seal_status = #{sealStatus},</if>
|
||||||
|
<if test="isUse != null ">is_use = #{isUse}</if>
|
||||||
</set>
|
</set>
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
|||||||
Reference in New Issue
Block a user