|
|
|
|
@ -36,14 +36,20 @@ public class MailAppealService {
|
|
|
|
|
*/ |
|
|
|
|
public AjaxResult<Void> launchAppeal(MailAppeal appeal) { |
|
|
|
|
long count = mailAppealMapper.selectCount(new LambdaQueryWrapper<MailAppeal>().eq(MailAppeal::getMailId, appeal.getMailId())); |
|
|
|
|
String appealState = mailAppealMapper.selectOne(new QueryWrapper<MailAppeal>().eq("mail_id", appeal.getMailId())).getAppealState(); |
|
|
|
|
String appealState = ""; |
|
|
|
|
try { |
|
|
|
|
appealState = mailAppealMapper.selectOne(new QueryWrapper<MailAppeal>().eq("mail_id", appeal.getMailId())).getAppealState(); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
appealState = ""; |
|
|
|
|
} |
|
|
|
|
if (count > 0 && !("3".equals(appealState))) { |
|
|
|
|
return AjaxResult.failed("此邮件您已发起过申诉,请勿重复申诉"); |
|
|
|
|
} else { |
|
|
|
|
if (StringUtils.isNotEmpty(appealState)) { |
|
|
|
|
if (!appealState.isEmpty()) { |
|
|
|
|
mailAppealMapper.delete(new QueryWrapper<MailAppeal>().eq("mail_id", appeal.getMailId())); |
|
|
|
|
} |
|
|
|
|
appeal.setHandlingDept(AdminThreadLocal.getDeptId()) |
|
|
|
|
Dept dept = deptMapper.selectById(AdminThreadLocal.getDeptId()); |
|
|
|
|
appeal.setHandlingDept(dept.getPid()) |
|
|
|
|
.setAppealState("1") |
|
|
|
|
.setThreeDept(AdminThreadLocal.getDeptId()); |
|
|
|
|
|
|
|
|
|
@ -100,15 +106,14 @@ public class MailAppealService {
|
|
|
|
|
Mail mail = mailMapper.selectById(appeal.getMailId()); |
|
|
|
|
Integer deptId = AdminThreadLocal.getDeptId(); |
|
|
|
|
Dept dept = deptMapper.selectById(deptId); |
|
|
|
|
appeal.setHandlingDept(deptId); |
|
|
|
|
switch (dept.getLevel()) { |
|
|
|
|
case 1: |
|
|
|
|
appeal.setStep("3").setAppealState("2"); |
|
|
|
|
appeal.setStep("3").setAppealState("2").setHandlingDept(deptId); |
|
|
|
|
mail.setVerifyFeedback("基本满意").setSatisfactionStatus("基本满意"); |
|
|
|
|
mailMapper.updateById(mail); |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
appeal.setSecondDept(deptId).setStep("2"); |
|
|
|
|
appeal.setSecondDept(deptId).setStep("2").setHandlingDept(dept.getPid()); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
mailAppealMapper.updateById(appeal); |
|
|
|
|
|