Browse Source

申诉流程初始化

master
21819 2 years ago
parent
commit
f0cad2574c
  1. 2
      mailbox-lan/src/main/java/com/biutag/lan/domain/MailAppeal.java
  2. 20
      mailbox-lan/src/main/java/com/biutag/lan/service/MailAppealService.java

2
mailbox-lan/src/main/java/com/biutag/lan/domain/MailAppeal.java

@ -44,7 +44,7 @@ public class MailAppeal {
/** /**
* 申诉状态0未审诉1正在申诉2申诉成功3申诉失败 * 申诉状态0未审诉1正在申诉2申诉成功3申诉失败
*/ */
private String appealStatus; private String appealState;
/** /**
* 申诉步骤1发起2二级机构3市局 * 申诉步骤1发起2二级机构3市局
*/ */

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

@ -1,5 +1,6 @@
package com.biutag.lan.service; package com.biutag.lan.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.core.AjaxResult; import com.biutag.core.AjaxResult;
import com.biutag.entity.system.Dept; import com.biutag.entity.system.Dept;
import com.biutag.lan.config.AdminThreadLocal; import com.biutag.lan.config.AdminThreadLocal;
@ -26,12 +27,17 @@ public class MailAppealService {
* @return * @return
*/ */
public AjaxResult<Void> launchAppeal(MailAppeal appeal) { public AjaxResult<Void> launchAppeal(MailAppeal appeal) {
appeal.setHandlingDept(AdminThreadLocal.getDeptId()) long count = mailAppealMapper.selectCount(new LambdaQueryWrapper<MailAppeal>().eq(MailAppeal::getMailId, appeal.getMailId()));
.setAppealStatus("1") if (count > 0) {
.setThreeDept(AdminThreadLocal.getDeptId()); return AjaxResult.failed("此邮件您已发起过申诉,请勿重复申诉");
} else {
appeal.setHandlingDept(AdminThreadLocal.getDeptId())
.setAppealState("1")
.setThreeDept(AdminThreadLocal.getDeptId());
mailAppealMapper.insert(appeal); mailAppealMapper.insert(appeal);
return AjaxResult.success(); return AjaxResult.success();
}
} }
/** /**
@ -65,7 +71,7 @@ public class MailAppealService {
} }
appeal.setHandlingDept(deptId) appeal.setHandlingDept(deptId)
.setOverruleReason(overruleReason) .setOverruleReason(overruleReason)
.setAppealStatus("3"); .setAppealState("3");
mailAppealMapper.updateById(appeal); mailAppealMapper.updateById(appeal);
return AjaxResult.success(); return AjaxResult.success();
@ -84,7 +90,7 @@ public class MailAppealService {
appeal.setHandlingDept(deptId); appeal.setHandlingDept(deptId);
switch (dept.getLevel()) { switch (dept.getLevel()) {
case 1: case 1:
appeal.setStep("3").setAppealStatus("2"); appeal.setStep("3").setAppealState("2");
break; break;
case 2: case 2:
appeal.setSecondDept(deptId).setStep("2"); appeal.setSecondDept(deptId).setStep("2");

Loading…
Cancel
Save