Browse Source

申诉流程部门记录优化

master
21819 2 years ago
parent
commit
3c88b35b5e
  1. 4
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java
  2. 17
      mailbox-lan/src/main/java/com/biutag/lan/service/MailAppealService.java
  3. 6
      mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java

4
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java

@ -108,4 +108,8 @@ public class QueryMailVo {
* 处理部门 * 处理部门
*/ */
private Integer handlingDept; private Integer handlingDept;
/**
* 现在登陆的部门
*/
private Integer nowDeptId;
} }

17
mailbox-lan/src/main/java/com/biutag/lan/service/MailAppealService.java

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

6
mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java

@ -442,7 +442,11 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
} }
// 排序 // 排序
queryWrapper.orderByDesc("m.mail_time"); queryWrapper.orderByDesc("m.mail_time");
return baseMapper.selectDissatisfiedPage(page, queryWrapper); Page<QueryMailVo> result = baseMapper.selectDissatisfiedPage(page, queryWrapper);
for (QueryMailVo workVo : result.getRecords()) {
workVo.setNowDeptId(AdminThreadLocal.getDeptId());
}
return result;
} }
/** /**

Loading…
Cancel
Save