Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
+35
-17
@@ -524,6 +524,22 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
if (caseApplication1 == null) {
|
||||
return AjaxResult.error("未查询到相关案件");
|
||||
}
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
String prefix = "/profile/upload/";
|
||||
int startIndex = prefix.length();
|
||||
String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
|
||||
File file = new File(path);
|
||||
if(!file.exists()){
|
||||
return AjaxResult.error("未生成裁决书");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
@@ -545,7 +561,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
}
|
||||
}
|
||||
//发送邮件
|
||||
boolean b = sendCaseEmail(caseApplication1, appEmail, resEmail);
|
||||
boolean b = sendCaseEmail(caseApplication1, appEmail, resEmail,caseAttachList);
|
||||
SendMailRecord sendMailRecord = new SendMailRecord();
|
||||
sendMailRecord.setCaseId(id);
|
||||
sendMailRecord.setMailAddress(appEmail);
|
||||
@@ -575,11 +591,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
if(affiliate.getIdentityType() == 1) {
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
||||
}else {
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
||||
}
|
||||
// if(affiliate.getIdentityType() == 1) {
|
||||
// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
||||
// }else {
|
||||
// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
||||
// }
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum()});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
|
||||
// 保存短信发送记录
|
||||
@@ -589,14 +606,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
// 尊敬的{1}用户,您的{2}仲裁案件,裁决书已送达至{3}邮箱,请知晓,如非本人操作,请忽略本短信。
|
||||
if(affiliate.getIdentityType() == 1) {
|
||||
smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +appEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||
}else {
|
||||
smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||
}
|
||||
// // 尊敬的{1}用户,您的{2}仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。
|
||||
// if(affiliate.getIdentityType() == 1) {
|
||||
// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +appEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||
// }else {
|
||||
// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||
// }
|
||||
smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。");
|
||||
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
@@ -627,11 +646,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
* @param appEmail
|
||||
* @param resEmail
|
||||
*/
|
||||
private boolean sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
|
||||
private boolean sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail, List<CaseAttach> caseAttachList) {
|
||||
List<File> fileList = new ArrayList<>();
|
||||
File file = null;
|
||||
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
@@ -645,7 +662,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file != null) {
|
||||
|
||||
if (file != null && file.exists()) {
|
||||
try {
|
||||
Boolean aBoolean = emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
||||
Boolean aBoolean1 = emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
||||
|
||||
+19
-10
@@ -183,8 +183,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
if (role.getRoleName().equals("代理人")) {
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
caseApplication.setAgentDeptIds(agentDeptIds);
|
||||
// List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
List<Long> agentDeptIds = new ArrayList<>();
|
||||
agentDeptIds.add(sysUser.getDeptId());
|
||||
caseApplication.setAgentDeptIds(agentDeptIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,6 +248,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
//
|
||||
caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
||||
}
|
||||
if (role.getRoleName().equals("代理人")) {
|
||||
// 查询角色有关的用户部门
|
||||
// List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
List<Long> agentDeptIds = new ArrayList<>();
|
||||
agentDeptIds.add(sysUser.getDeptId());
|
||||
caseApplication.setAgentDeptIds(agentDeptIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1389,7 +1398,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
|
||||
failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
|
||||
} else if (validateIdCard(caseApplication.getDebtorIdentityNumAgent())) {
|
||||
} else if (!validateIdCard(caseApplication.getDebtorIdentityNumAgent())) {
|
||||
failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
|
||||
}
|
||||
String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
|
||||
@@ -1419,7 +1428,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
|
||||
failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
|
||||
} else if (validateIdCard(caseApplication.getDebtorIdentityNum())) {
|
||||
} else if (!validateIdCard(caseApplication.getDebtorIdentityNum())) {
|
||||
failureMsg.append("【被申请人主体信息-身份证号】不合法;");
|
||||
}
|
||||
String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
|
||||
@@ -1456,7 +1465,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("【被申请人主体信息-邮箱】字段不合法;");
|
||||
}
|
||||
@@ -1562,7 +1571,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("【申请人主体信息-邮箱】字段不合法;");
|
||||
}
|
||||
@@ -2671,7 +2680,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("预约会议成功");
|
||||
|
||||
@@ -2699,7 +2708,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;
|
||||
}
|
||||
@@ -2713,7 +2722,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);
|
||||
@@ -2761,7 +2770,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
@Override
|
||||
public AjaxResult deleteRoom(String roomId) {
|
||||
|
||||
return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
|
||||
return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user