Browse Source

优化完善

厅长信箱
wxc 3 months ago
parent
commit
2b31bf4fc2
  1. 1
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java
  2. 1
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java
  3. 3
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeContactWriterFlow.java
  4. 7
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java
  5. 1
      mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java
  6. 11
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java
  7. BIN
      mailbox-lan/src/main/resources/templates/湖南省公安厅厅长信箱即接即办系统平台-操作手册V1.pdf
  8. 13
      mailbox-lan/src/test/java/com/biutag/lan/TestCase.java
  9. 2
      mailbox-outer/src/main/java/com/biutag/outer/service/MailService.java

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

@ -88,7 +88,6 @@ public class FirstDistributeFlow extends Flow {
.setFlowName(nextNode.getFlowNode().getBeforeName()) .setFlowName(nextNode.getFlowNode().getBeforeName())
// 下一节点操作人 // 下一节点操作人
.setCurrentOperator(String.format("%s专班", deptVo.getShortName())) .setCurrentOperator(String.format("%s专班", deptVo.getShortName()))
.setFlowLimitedLastHandlerTime(now)
.setSecondDeptId(mainDeptId) .setSecondDeptId(mainDeptId)
.setSecondDeptName(deptVo.getShortName()) .setSecondDeptName(deptVo.getShortName())
.setFirstDistributeInfo(firstDistributeInfo.toJSONString()) .setFirstDistributeInfo(firstDistributeInfo.toJSONString())

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

@ -118,7 +118,6 @@ public class SecondDistributeFlow extends Flow {
.setFlowKey(nextNode.getFlowNode().getKey()) .setFlowKey(nextNode.getFlowNode().getKey())
.setFlowName(nextNode.getFlowNode().getBeforeName()) .setFlowName(nextNode.getFlowNode().getBeforeName())
.setCurrentOperator(String.format("%s专班", deptVo.getShortName())) .setCurrentOperator(String.format("%s专班", deptVo.getShortName()))
.setFlowLimitedLastHandlerTime(now)
.setThreeDeptId(mainDeptId) .setThreeDeptId(mainDeptId)
.setThreeDeptName(deptVo.getShortName()) .setThreeDeptName(deptVo.getShortName())
.setSecondDistributeFiles(data.getString("files")) .setSecondDistributeFiles(data.getString("files"))

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

@ -74,8 +74,7 @@ public class ThreeContactWriterFlow extends Flow {
.setContactDuration(data.getLong("contactDuration")) .setContactDuration(data.getLong("contactDuration"))
.setContactFlag(data.getBoolean("contactFlag")) .setContactFlag(data.getBoolean("contactFlag"))
.setFlowKey(nextNode.getFlowNode().getKey()) .setFlowKey(nextNode.getFlowNode().getKey())
.setFlowName(nextNode.getFlowNode().getBeforeName()) .setFlowName(nextNode.getFlowNode().getBeforeName());
.setFlowLimitedLastHandlerTime(mail.getFirstDistributeTime());
// 如果是简易流程 // 如果是简易流程
if (mail.getSimpleFlowFlag()) { if (mail.getSimpleFlowFlag()) {
mail.setFlowKey(FlowNodeEnum.VERIFY.getKey()) mail.setFlowKey(FlowNodeEnum.VERIFY.getKey())

7
mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java

@ -23,7 +23,6 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Objects; import java.util.Objects;
@ -93,12 +92,12 @@ public class ThreeSignFlow extends Flow {
.set(Mail::getFlowName, FlowNameEnum.MAIL_RETURN.getName()) .set(Mail::getFlowName, FlowNameEnum.MAIL_RETURN.getName())
.set(Mail::getFlowLimitedLastHandlerTime, now) .set(Mail::getFlowLimitedLastHandlerTime, now)
.set(Mail::getExtensionDays, null) .set(Mail::getExtensionDays, null)
.set(Mail::getExtensionDays, 0)
.set(Mail::getSecondDistributeTime, now); .set(Mail::getSecondDistributeTime, now);
// 如果在申请延期中 // 如果在申请延期中
if (ExtensionState.applying.name().equals(mail.getExtensionState())) { if (ExtensionState.applying.name().equals(mail.getExtensionState())) {
updateWrapper.set(Mail::getExtensionReason, null) updateWrapper.set(Mail::getExtensionReason, null)
.set(Mail::getExtensionState, null) .set(Mail::getExtensionState, null)
.set(Mail::getExtensionDays, 0)
.set(Mail::getExtensionRequestId, null) .set(Mail::getExtensionRequestId, null)
.set(Mail::getExtensionFlag, false); .set(Mail::getExtensionFlag, false);
} }
@ -141,9 +140,7 @@ public class ThreeSignFlow extends Flow {
// 更新信件 // 更新信件
mail.setUpdateTime(now) mail.setUpdateTime(now)
.setFlowKey(nextNode.getFlowNode().getKey()) .setFlowKey(nextNode.getFlowNode().getKey())
.setFlowName(nextNode.getFlowNode().getBeforeName()) .setFlowName(nextNode.getFlowNode().getBeforeName());
// 更新操作时间
.setFlowLimitedLastHandlerTime(now);
mailService.updateById(mail); mailService.updateById(mail);
// 通知 // 通知
noticeService.sendNoticeDoneByRole(); noticeService.sendNoticeDoneByRole();

1
mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java

@ -30,6 +30,7 @@ public interface IDeptService {
List<DeptTree> treeByDeptId(String deptId); List<DeptTree> treeByDeptId(String deptId);
// 获取所有子节点ID
List<String> getAllIds(String deptId); List<String> getAllIds(String deptId);
List<String> getAllDeptIdsByAuth(); List<String> getAllDeptIdsByAuth();

11
mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java

@ -9,6 +9,8 @@ import com.biutag.entity.setting.DictData;
import com.biutag.entity.system.Dept; import com.biutag.entity.system.Dept;
import com.biutag.entity.system.Duty; import com.biutag.entity.system.Duty;
import com.biutag.entity.system.PoliceUser; import com.biutag.entity.system.PoliceUser;
import com.biutag.enums.RoleEnum;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.domain.validate.commons.PageValidate; import com.biutag.lan.domain.validate.commons.PageValidate;
import com.biutag.lan.domain.validate.system.DutyCreateValidate; import com.biutag.lan.domain.validate.system.DutyCreateValidate;
import com.biutag.lan.domain.validate.system.DutySearchValidate; import com.biutag.lan.domain.validate.system.DutySearchValidate;
@ -17,6 +19,7 @@ import com.biutag.lan.domain.vo.system.DutyDetailVo;
import com.biutag.lan.domain.vo.system.DutyListedVo; import com.biutag.lan.domain.vo.system.DutyListedVo;
import com.biutag.lan.mapper.DataScreenMapper; import com.biutag.lan.mapper.DataScreenMapper;
import com.biutag.lan.mapper.PoliceUserMapper; import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.lan.service.IDeptService;
import com.biutag.lan.service.IDutyService; import com.biutag.lan.service.IDutyService;
import com.biutag.mapper.setting.DictDataMapper; import com.biutag.mapper.setting.DictDataMapper;
import com.biutag.mapper.system.DeptMapper; import com.biutag.mapper.system.DeptMapper;
@ -48,9 +51,13 @@ public class DutyServiceImpl implements IDutyService {
@Resource @Resource
DeptMapper deptMapper; DeptMapper deptMapper;
@Resource
IDeptService deptService;
@Resource @Resource
DictDataMapper dictDataMapper; DictDataMapper dictDataMapper;
/** /**
* 值班列表 * 值班列表
* *
@ -68,6 +75,10 @@ public class DutyServiceImpl implements IDutyService {
.like(StrUtil.isNotBlank(searchValidate.getEmpNo()), Duty::getEmpNo, searchValidate.getEmpNo()) .like(StrUtil.isNotBlank(searchValidate.getEmpNo()), Duty::getEmpNo, searchValidate.getEmpNo())
.like(StrUtil.isNotBlank(searchValidate.getMobile()), Duty::getMobile, searchValidate.getMobile()) .like(StrUtil.isNotBlank(searchValidate.getMobile()), Duty::getMobile, searchValidate.getMobile())
.eq(StrUtil.isNotBlank(searchValidate.getDeptType()), Duty::getDeptType, searchValidate.getDeptType()); .eq(StrUtil.isNotBlank(searchValidate.getDeptType()), Duty::getDeptType, searchValidate.getDeptType());
if (!RoleEnum.PROVINCIAL_CLASSES.getRoleId().equals(AdminThreadLocal.getRoleId())) {
List<String> deptIds = deptService.getAllIds(AdminThreadLocal.getDeptId());
queryWrapper.in(Duty::getDepartId, deptIds);
}
Page<Duty> dutyPage = dutyMapper.selectPage(Page.of(page, limit), queryWrapper); Page<Duty> dutyPage = dutyMapper.selectPage(Page.of(page, limit), queryWrapper);
List<DutyListedVo> records = dutyPage.getRecords().stream().map(item -> { List<DutyListedVo> records = dutyPage.getRecords().stream().map(item -> {
DutyListedVo vo = new DutyListedVo(); DutyListedVo vo = new DutyListedVo();

BIN
mailbox-lan/src/main/resources/templates/湖南省公安厅厅长信箱即接即办系统平台-操作手册V1.pdf

Binary file not shown.

13
mailbox-lan/src/test/java/com/biutag/lan/TestCase.java

@ -1,5 +1,7 @@
package com.biutag.lan; package com.biutag.lan;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileTypeUtil; import cn.hutool.core.io.FileTypeUtil;
import cn.hutool.core.util.TypeUtil; import cn.hutool.core.util.TypeUtil;
import com.biutag.util.NumberUtils; import com.biutag.util.NumberUtils;
@ -10,14 +12,21 @@ import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
public class TestCase { public class TestCase {
@Test @Test
public void test1() throws Exception { public void test1() throws Exception {
Long total = 0L; Date date = new Date();
NumberUtils.rate(1, total); date.setTime(1757585640575L);
Date date1 = new Date();
date1.setTime(1757585665596L);
System.out.println(DateUtil.format(date, "yyyy-MM-dd HH:mm:ss"));
System.out.println(DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"));
long between = DateUtil.between(date, date1, DateUnit.SECOND);
System.out.println(between);
} }
private static String recover(String text, String sourceCharset, String targetCharset) { private static String recover(String text, String sourceCharset, String targetCharset) {

2
mailbox-outer/src/main/java/com/biutag/outer/service/MailService.java

@ -41,7 +41,7 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
.eq(Mail::getContactPhone, mailBo.getContactPhone()) .eq(Mail::getContactPhone, mailBo.getContactPhone())
.between(Mail::getCreateTime, DateUtil.beginOfDay(now), DateUtil.endOfDay(now))); .between(Mail::getCreateTime, DateUtil.beginOfDay(now), DateUtil.endOfDay(now)));
if (count >= 3) { if (count >= 3) {
throw new RuntimeException("您当日的写信次数已达最大限制!"); throw new RuntimeException("您当日的写信次数已达最大限制!请勿重复投诉!");
} }
Mail mail = mailBo.toEntity(); Mail mail = mailBo.toEntity();
mail.setId(generateMailId()); mail.setId(generateMailId());

Loading…
Cancel
Save