修复公章管理
This commit is contained in:
+12
-1
@@ -97,9 +97,20 @@ public class DeptIdentifyController extends BaseController {
|
||||
*/
|
||||
@PostMapping("/updateSealLockStatus")
|
||||
public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
|
||||
if(sealManage.getId()==null ||sealManage.getSealStatus()==null){
|
||||
if(sealManage.getId()==null ||sealManage.getIsUse()==null){
|
||||
return error("参数校验失败");
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* 印章状态(0禁用,1启用)
|
||||
* 印章审核状态(0未通过,1通过)
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* 印章状态 0禁用,1启用
|
||||
* 印章审核状态(0未通过,1通过)
|
||||
*/
|
||||
private Integer sealStatus;
|
||||
/**
|
||||
* 印章使用状态(0禁用,1启用)
|
||||
*/
|
||||
private Integer isUse;
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
|
||||
+11
-5
@@ -1687,9 +1687,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
String annexPath = caseAttach.getAnnexPath();
|
||||
String path = "/home/ruoyi/" + annexPath;
|
||||
System.out.println("这是查询到的裁决书路径" + path);
|
||||
//String path ="D:\\home\\仲裁裁决书模板.docx";
|
||||
//String path = "/home/ruoyi" + annexPath;
|
||||
// System.out.println("这是查询到的裁决书路径" + path);
|
||||
String path = "D:\\home\\仲裁裁决书模板.docx";
|
||||
//获取文件上传地址
|
||||
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
||||
String body = response.getBody();
|
||||
@@ -1736,8 +1736,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
||||
deptIdentifyselect = deptIdentifysnew.get(0);
|
||||
sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
|
||||
sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperName());
|
||||
sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperPhone());
|
||||
sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperPhone());
|
||||
sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperName());
|
||||
} else {
|
||||
return AjaxResult.error("没有用印时的机构名称及经办人信息");
|
||||
}
|
||||
@@ -1820,7 +1820,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
}
|
||||
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
|
||||
|
||||
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
||||
if (jsonObject3 != null){
|
||||
if (jsonObject3.getIntValue("code") == 0) {
|
||||
//获取签署流程ID
|
||||
JSONObject data1 = jsonObject3.getJSONObject("data");
|
||||
@@ -1834,8 +1836,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
throw new ServiceException("发起签署流程失败,请检查参数是否有误");
|
||||
}
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -145,7 +145,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
sealManage.setIdentifyId(identify.getId());
|
||||
sealManage.setSealName(sealName);
|
||||
sealManage.setSealId(sealId);
|
||||
sealManage.setSealStatus(0); //默认为禁用
|
||||
sealManage.setSealStatus(0); //默认为未审核
|
||||
sealManage.setIsUse(0); //默认为禁用
|
||||
int i = sealManageMapper.insertSealManage(sealManage);
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("上传成功");
|
||||
@@ -256,14 +257,14 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
List<SealListVO> sealListVOS = new ArrayList<>();
|
||||
if (selectSealList != null && selectSealList.size() > 0) {
|
||||
for (SealManage sealManage1 : selectSealList) {
|
||||
Integer annexId = sealManage1.getAnnexId();
|
||||
if (annexId != null) { //附件id有值,证明是审核通过了的
|
||||
Integer sealStatus = sealManage1.getSealStatus();
|
||||
if (sealStatus == 1) { //审核状态为启用
|
||||
SealListVO sealListVO = new SealListVO();
|
||||
sealListVO.setSealId(sealManage1.getSealId());
|
||||
sealListVO.setSealName(sealManage1.getSealName());
|
||||
sealListVO.setSealStatus(sealManage1.getSealStatus());
|
||||
//根据附件id查询路径
|
||||
CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
|
||||
CaseAttach caseAttach = caseAttachMapper.queryAnnexById(sealManage1.getAnnexId());
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
@@ -271,6 +272,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
sealListVO.setAnnexPath(annexPath);
|
||||
sealListVO.setAnnexType(caseAttach.getAnnexType());
|
||||
sealListVO.setIsUse(sealManage1.getIsUse());
|
||||
sealListVOS.add(sealListVO);
|
||||
}
|
||||
}
|
||||
|
||||
+18
-6
@@ -39,10 +39,11 @@ public class FixSelectFlowDetailUtils {
|
||||
private DeptIdentifyMapper deptIdentifyMapper;
|
||||
@Autowired
|
||||
private SealManageMapper sealManageMapper;
|
||||
|
||||
/*
|
||||
定时查询签署流程详情
|
||||
*/
|
||||
@Scheduled(cron = "0/10 * * * * ?")
|
||||
//@Scheduled(cron = "0/10 * * * * ?")
|
||||
@Transactional
|
||||
public void fixExecuteSelectFlowDetailUtils() {
|
||||
Gson gson = new Gson();
|
||||
@@ -173,9 +174,10 @@ public class FixSelectFlowDetailUtils {
|
||||
|
||||
/**
|
||||
* 定时查询企业认证状态
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Scheduled(cron = "0 0/30 * * * ?")
|
||||
//@Scheduled(cron = "*/30 * * * * *")
|
||||
@Transactional
|
||||
public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
|
||||
Gson gson = new Gson();
|
||||
@@ -185,6 +187,8 @@ public class FixSelectFlowDetailUtils {
|
||||
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
||||
for (int i = 0; i < deptIdentifysnew.size(); i++) {
|
||||
DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
|
||||
String authFlowId = deptIdentify1.getAuthFlowId();
|
||||
if (authFlowId != null) {
|
||||
EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
|
||||
JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
|
||||
int code = identifyInfoJsonObject.get("code").getAsInt();
|
||||
@@ -213,7 +217,7 @@ public class FixSelectFlowDetailUtils {
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
// 创建日期目录
|
||||
@@ -226,7 +230,8 @@ public class FixSelectFlowDetailUtils {
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(url, resultFilePath);
|
||||
String fileDownloadUrlnew = url.substring(1, url.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setAnnexType(10); //10代表印章图片
|
||||
@@ -235,12 +240,15 @@ public class FixSelectFlowDetailUtils {
|
||||
int i1 = caseAttachMapper.save(caseAttach);
|
||||
if (i1 > 0) {
|
||||
//将印章信息保存到公章管理表里
|
||||
String sealName1 = sealName.substring(1, sealName.length() - 1);
|
||||
String sealId1 = sealId.substring(1, sealId.length() - 1);
|
||||
Integer annexId1 = caseAttach.getAnnexId();
|
||||
sealManage.setAnnexId(annexId1);
|
||||
sealManage.setSealId(sealId);
|
||||
sealManage.setSealName(sealName);
|
||||
sealManage.setSealId(sealId1);
|
||||
sealManage.setSealName(sealName1);
|
||||
sealManage.setIdentifyId(deptIdentify1.getId());
|
||||
sealManage.setSealStatus(1);
|
||||
sealManage.setIsUse(1);
|
||||
sealManageMapper.insertSealManage(sealManage);
|
||||
}
|
||||
}
|
||||
@@ -256,6 +264,8 @@ public class FixSelectFlowDetailUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,6 +333,8 @@ public class FixSelectFlowDetailUtils {
|
||||
//将附件id保存到公章管理表里
|
||||
Integer annexId1 = caseAttach.getAnnexId();
|
||||
sealManage1.setAnnexId(annexId1);
|
||||
sealManage1.setSealStatus(1);
|
||||
sealManage1.setIsUse(1); //默认使用状态都是未启用
|
||||
sealManageMapper.updateSealManage(sealManage1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ public class SignAward {
|
||||
/* " \"availableSealIds\": [\n" +
|
||||
" \"" + availableSealId + "\"\n" +
|
||||
" ],\n" +*/
|
||||
" \"availableSealIds\": " + new Gson().toJson(sealIdList) + "\n" +
|
||||
" \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" +
|
||||
|
||||
" \"signFieldPosition\": {\n" +
|
||||
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</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
|
||||
from case_attach
|
||||
<where>
|
||||
|
||||
@@ -55,8 +55,9 @@
|
||||
<if test="orgId != null and orgId != ''">org_id,</if>
|
||||
<if test="operName != null and operName != ''">oper_name,</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="authFlowId != null and authFlowId != ''">auth_flow_id</if>
|
||||
|
||||
)values(
|
||||
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
|
||||
<if test="identifyStatus != null">#{identifyStatus},</if>
|
||||
@@ -65,8 +66,8 @@
|
||||
<if test="orgId != null and orgId != ''">#{orgId},</if>
|
||||
<if test="operName != null and operName != ''">#{operName},</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="authFlowId != null and authFlowId != '' ">#{authFlowId}</if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
<result property="sealId" column="seal_id" />
|
||||
<result property="annexId" column="annex_id" />
|
||||
<result property="sealStatus" column="seal_status" />
|
||||
<result property="isUse" column="is_use" />
|
||||
</resultMap>
|
||||
|
||||
<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
|
||||
<where>
|
||||
<if test="identifyId != null">
|
||||
@@ -32,24 +33,27 @@
|
||||
<if test="sealName != null and sealName != ''">seal_name,</if>
|
||||
<if test="sealId != null and sealId != ''">seal_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(
|
||||
<if test="identifyId != null">#{identifyId},</if>
|
||||
<if test="sealName != null and sealName != ''">#{sealName},</if>
|
||||
<if test="sealId != null and sealId != ''">#{sealId},</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>
|
||||
|
||||
<update id="updateSealManage" parameterType="SealManage">
|
||||
update dept_identify
|
||||
update seal_manage
|
||||
<set>
|
||||
<if test="identifyId != null">identify_id = #{identifyId},</if>
|
||||
<if test="sealName != null">seal_name = #{sealName},</if>
|
||||
<if test="sealId != null ">seal_id = #{sealId},</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>
|
||||
<where>
|
||||
<if test="id != null">
|
||||
|
||||
Reference in New Issue
Block a user