Browse Source

BUG修复

master
wxc 2 years ago
parent
commit
d7d991b729
  1. 4
      mailbox-lan/sql/0329.sql
  2. 4
      mailbox-lan/src/main/java/com/biutag/lan/cache/UserCatch.java
  3. 5
      mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailQuery.java
  4. 8
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/LedgerExcel.java
  5. 5
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java
  6. 3
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java
  7. 12
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java
  8. 7
      mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java
  9. 3
      mailbox-lan/src/main/resources/application.yml
  10. 2
      mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

4
mailbox-lan/sql/0329.sql

@ -0,0 +1,4 @@
update mailbox.mail_mark mm set mm.three_dept_id = m.three_dept_id, mm.three_dept_name = m.three_dept_name
from mailbox.mail m where m.id = mm.mail_id and mm.three_dept_id is null;
update mailbox.mail_mark mm set mm.completion_time = null where mm.completed = 0;

4
mailbox-lan/src/main/java/com/biutag/lan/cache/UserCatch.java vendored

@ -8,8 +8,8 @@ import java.util.concurrent.TimeUnit;
public class UserCatch {
private static final Cache<Integer, LoginUser> cache = Caffeine.newBuilder()
// 8 * 60分钟
.expireAfterWrite(480, TimeUnit.MINUTES) // 设置写入后过期时间
// 24 小时
.expireAfterWrite(24, TimeUnit.HOURS) // 设置写入后过期时间
.maximumSize(1000) // 最多1000人
.build();
public static Integer set(Integer key, LoginUser user) {

5
mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailQuery.java

@ -72,6 +72,11 @@ public class MailQuery {
private String timeout;
/**
* 办结时间
*/
private List<String> completionTime = new ArrayList<>();
public List<String> handleMailLabels() {
if (mailLabels == null) {
return null;

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

@ -24,10 +24,18 @@ public class LedgerExcel {
@ExcelProperty({"局长信箱即接即办工作汇总台账", "线索来源"})
private String source;
@DateTimeFormat("yyyy/MM/dd HH:mm")
@ExcelProperty({"局长信箱即接即办工作汇总台账", "来信时间"})
private LocalDateTime mailTime;
@DateTimeFormat("yyyy/MM/dd HH:mm")
@ExcelProperty({"局长信箱即接即办工作汇总台账", "受理时间"})
private LocalDateTime createTime;
@DateTimeFormat("yyyy/MM/dd HH:mm")
@ExcelProperty({"局长信箱即接即办工作汇总台账", "办结时间"})
private LocalDateTime completionTime;
@ExcelProperty({"局长信箱即接即办工作汇总台账", "信访人姓名"})
private String contactName;

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

@ -144,4 +144,9 @@ public class QueryMailVo {
* 延期天数
*/
private Integer extensionDays;
/**
* 办结时间
*/
private LocalDateTime completionTime;
}

3
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java

@ -90,8 +90,7 @@ public class FirstDistributeFlow extends Flow {
.setMailId(mailId)
.setSecondDeptId(mail.getSecondDeptId())
.setSecondDeptName(mail.getSecondDeptName())
.setCompleted(AppConstants.FALSE)
.setCompletionTime(now);
.setCompleted(AppConstants.FALSE);
mailMarkService.save(mailMark);
return nextNode;
}

12
mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java

@ -6,12 +6,14 @@ import com.alibaba.fastjson2.JSONObject;
import com.biutag.enums.RoleEnum;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.domain.Mail;
import com.biutag.lan.domain.MailMark;
import com.biutag.lan.domain.Work;
import com.biutag.lan.flow.ActionEnum;
import com.biutag.lan.flow.Flow;
import com.biutag.lan.flow.FlowNameEnum;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.service.IDeptService;
import com.biutag.lan.service.MailMarkService;
import com.biutag.lan.service.MailService;
import com.biutag.lan.service.WorkService;
import com.biutag.lan.vo.system.DeptVo;
@ -31,6 +33,7 @@ public class SecondDistributeFlow extends Flow {
private final WorkService workService;
private final IDeptService deptService;
private final SecondSignFlow secondSignFlow;
private final MailMarkService mailMarkService;
@Override
@Transactional(rollbackFor = Exception.class)
@ -77,7 +80,8 @@ public class SecondDistributeFlow extends Flow {
workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), secondDeptId1, now, false,
FlowNameEnum.PENDING_SIGN_CO.getName(),
FlowNodeEnum.SECONDARY_VERIFY.getKey());
secondDistributeInfo.put("secondDept1", JSONObject.of("id", secondDeptId1));
DeptVo secondDept = deptService.detail(secondDeptId1);
secondDistributeInfo.put("secondDept1", JSONObject.of("id", secondDeptId1, "name", secondDept.getName()));
}
Integer secondDeptId2 = data.getInteger("secondDeptId2");
if (Objects.nonNull(secondDeptId2)) {
@ -85,7 +89,8 @@ public class SecondDistributeFlow extends Flow {
workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), secondDeptId2, now, false,
FlowNameEnum.PENDING_SIGN_CO.getName(),
FlowNodeEnum.SECONDARY_VERIFY.getKey());
secondDistributeInfo.put("secondDept2", JSONObject.of("id", secondDeptId2));
DeptVo secondDept2 = deptService.detail(secondDeptId2);
secondDistributeInfo.put("secondDept2", JSONObject.of("id", secondDeptId2, "name", secondDept2.getName()));
}
Flow nextNode = next.get(nextActionKey);
mail.setSecondDistributeInfo(secondDistributeInfo.toJSONString());
@ -102,6 +107,9 @@ public class SecondDistributeFlow extends Flow {
if (Objects.nonNull(mainDeptLevel)) {
mail.setMainDeptLevel(mainDeptLevel);
}
MailMark mailMark = mailMarkService.getById(mailId);
mailMark.setThreeDeptId(mainDeptId).setThreeDeptName(deptVo.getName());
mailMarkService.updateById(mailMark);
}
mailService.updateById(mail);
return null;

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

@ -482,6 +482,11 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
break;
}
}
// 办结时间
if (!mailQuery.getCompletionTime().isEmpty()) {
queryWrapper.ge("mm.completion_time", mailQuery.getCompletionTime().get(0))
.le("mm.completion_time", mailQuery.getCompletionTime().get(1));
}
// 排序
queryWrapper.orderByDesc("m.mail_time");
@ -693,7 +698,6 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
List<Mail> mailList = mailMapper.selectBatchIds(mailIds);
List<MailAppeal> appealList = mailAppealMapper.selectList(null);
List<DictData> dictData = dictDataMapper.selectList(null);
List<LedgerExcel> list = new ArrayList<>();
int i = 1;
for (QueryMailVo q : data) {
@ -704,6 +708,7 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
ledgerExcel.setSource((dictData.stream()
.filter(r -> r.getValue().equals(nullToEmpty(q.getSource())))
.collect(Collectors.toList()).get(0).getName()));
ledgerExcel.setMailTime(m.getMailTime());
ledgerExcel.setCreateTime(m.getCreateTime());
ledgerExcel.setContactName(nullToEmpty(q.getContactName()));
ledgerExcel.setContactPhone(nullToEmpty(q.getContactPhone()));

3
mailbox-lan/src/main/resources/application.yml

@ -30,7 +30,7 @@ mybatis-plus:
# Sa-token配置
sa-token:
token-name: admin # token的名称
timeout: 28800 # token有效期单位s(默认30天,-1代表永不过期)
timeout: 86400 # token有效期单位s 默认24小时(24 * 60 * 60)
active-timeout: -1 # token临时有效期(指定时间无操作掉线)
is-concurrent: false # 是否允许同一账号并发登录
is-share: false # 多人同登账号共用token
@ -38,7 +38,6 @@ sa-token:
is-print: false # 打印版本字符画
is-log: false # 是否输出操作日志
logging:
level:
root: INFO

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

@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
COUNT ( b.mail_id ) SUM,
CASE
WHEN SUM = 0 THEN
0 ELSE ROUND( SUM * 100 / SUM, 0 )
0 ELSE ROUND( SUM ( COALESCE ( b.completed, 0 ) ) * 100 / SUM, 0 )
END rateNumber,
CONCAT ( rateNumber, '%' ) rate
from dept a left join mail_mark b on a.id=b.three_dept_id where a.pid=#{deptId}

Loading…
Cancel
Save