Browse Source

修改不满意信件立即处理按钮显示与权限绑定

master
21819 2 years ago
parent
commit
01a9d190e3
  1. 8
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java
  2. 17
      mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java
  3. 2
      mailbox-lan/src/main/resources/mapper/WorkMapper.xml

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

@ -116,4 +116,12 @@ public class QueryMailVo {
* 现在登陆的部门
*/
private Integer nowDeptId;
/**
* 是否显示立即处理按钮
*/
private Integer ifHandle;
/**
* 当前处理步骤
*/
private String step;
}

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

@ -479,6 +479,23 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
Page<QueryMailVo> result = baseMapper.selectDissatisfiedPage(page, queryWrapper);
for (QueryMailVo workVo : result.getRecords()) {
workVo.setNowDeptId(AdminThreadLocal.getDeptId());
workVo.setIfHandle(0);
//如果step为null则赋值”0“
if (workVo.getStep() == null) {
workVo.setStep("0");
}
switch (workVo.getStep()) {
case "1":
if (AdminThreadLocal.getRoleId().equals(2)) {
workVo.setIfHandle(1);
}
break;
case "2":
if (AdminThreadLocal.getRoleId().equals(1)) {
workVo.setIfHandle(1);
}
break;
}
}
return result;
}

2
mailbox-lan/src/main/resources/mapper/WorkMapper.xml

@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDissatisfiedPage" resultType="com.biutag.lan.domain.vo.QueryMailVo">
select distinct m.contact_name,m.contact_phone,m.contact_id_card,m.contact_sex,m.content,m.source,m.mail_time,m.id,m.mail_state,
m.mail_category ,m.mail_level,m.three_dept_id,m.three_dept_name,m.flow_key,m.flow_before_name,m.mail_labels,m.flow_name,
ma.appeal_state,ma.handling_dept,
ma.appeal_state,ma.handling_dept,ma.step,
f.limited_time - ROUND(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) flow_limited_remaining_time
from mail m
left join mail_appeal ma on ma.mail_id = m.id

Loading…
Cancel
Save