修复公章管理

This commit is contained in:
hejinbo
2023-11-16 19:23:01 +08:00
parent e18e47f31f
commit c644fb3142
11 changed files with 198 additions and 109 deletions
@@ -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 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())) {
failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
} else if(!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()){
} else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
}
@@ -1524,7 +1524,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
if (StrUtil.isEmpty(caseApplication.getEmail())) {
failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
} else if(!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()){
} else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
}
@@ -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("没有用印时的机构名称及经办人信息");
}
@@ -1815,27 +1815,33 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
if (selectSealList != null && selectSealList.size() > 0) {
for (SealManage manage : selectSealList) {
Integer sealStatus = manage.getSealStatus();
if (sealStatus == 1){
if (sealStatus == 1) {
sealIdList.add(manage.getSealId());
}
}
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord,sealIdList);
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
if (jsonObject3.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);
} else {
throw new ServiceException("发起签署流程失败,请检查参数是否有误");
if (jsonObject3 != null){
if (jsonObject3.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);
} 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,
reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
reservedConferenceMapper.insert(conference);
return AjaxResult.success("预约会议成功");
@@ -2653,7 +2659,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
String roomId = generateRoomId();
// 新增预约会议表
ReservedConference conference = new ReservedConference(caseId, roomId,
null, null,0);
null, null, 0);
reservedConferenceMapper.insert(conference);
return roomId;
}
@@ -2667,7 +2673,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 查询最大房间号
Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
if (null == maxRoomId || maxRoomId >999999) {
if (null == maxRoomId || maxRoomId > 999999) {
return "000001";
} else {
return String.format("%06d", maxRoomId);
@@ -2715,7 +2721,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Override
public AjaxResult deleteRoom(String roomId) {
return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
}
}
@@ -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);
}
}