diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java index 2521f8a..b5bade6 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java +++ b/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()) // 下一节点操作人 .setCurrentOperator(String.format("%s专班", deptVo.getShortName())) - .setFlowLimitedLastHandlerTime(now) .setSecondDeptId(mainDeptId) .setSecondDeptName(deptVo.getShortName()) .setFirstDistributeInfo(firstDistributeInfo.toJSONString()) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java index ddecbbd..d70ebcb 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java +++ b/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()) .setFlowName(nextNode.getFlowNode().getBeforeName()) .setCurrentOperator(String.format("%s专班", deptVo.getShortName())) - .setFlowLimitedLastHandlerTime(now) .setThreeDeptId(mainDeptId) .setThreeDeptName(deptVo.getShortName()) .setSecondDistributeFiles(data.getString("files")) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeContactWriterFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeContactWriterFlow.java index 1d70ae7..4ac945d 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeContactWriterFlow.java +++ b/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")) .setContactFlag(data.getBoolean("contactFlag")) .setFlowKey(nextNode.getFlowNode().getKey()) - .setFlowName(nextNode.getFlowNode().getBeforeName()) - .setFlowLimitedLastHandlerTime(mail.getFirstDistributeTime()); + .setFlowName(nextNode.getFlowNode().getBeforeName()); // 如果是简易流程 if (mail.getSimpleFlowFlag()) { mail.setFlowKey(FlowNodeEnum.VERIFY.getKey()) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java index 8de56e1..b8ee961 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java +++ b/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.util.Assert; -import java.time.Duration; import java.time.LocalDateTime; import java.util.Objects; @@ -93,12 +92,12 @@ public class ThreeSignFlow extends Flow { .set(Mail::getFlowName, FlowNameEnum.MAIL_RETURN.getName()) .set(Mail::getFlowLimitedLastHandlerTime, now) .set(Mail::getExtensionDays, null) + .set(Mail::getExtensionDays, 0) .set(Mail::getSecondDistributeTime, now); // 如果在申请延期中 if (ExtensionState.applying.name().equals(mail.getExtensionState())) { updateWrapper.set(Mail::getExtensionReason, null) .set(Mail::getExtensionState, null) - .set(Mail::getExtensionDays, 0) .set(Mail::getExtensionRequestId, null) .set(Mail::getExtensionFlag, false); } @@ -141,9 +140,7 @@ public class ThreeSignFlow extends Flow { // 更新信件 mail.setUpdateTime(now) .setFlowKey(nextNode.getFlowNode().getKey()) - .setFlowName(nextNode.getFlowNode().getBeforeName()) - // 更新操作时间 - .setFlowLimitedLastHandlerTime(now); + .setFlowName(nextNode.getFlowNode().getBeforeName()); mailService.updateById(mail); // 通知 noticeService.sendNoticeDoneByRole(); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java index 975d850..b46f393 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java @@ -30,6 +30,7 @@ public interface IDeptService { List treeByDeptId(String deptId); + // 获取所有子节点ID List getAllIds(String deptId); List getAllDeptIdsByAuth(); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java index 42fa959..8b28e5c 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java +++ b/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.Duty; 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.system.DutyCreateValidate; 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.mapper.DataScreenMapper; import com.biutag.lan.mapper.PoliceUserMapper; +import com.biutag.lan.service.IDeptService; import com.biutag.lan.service.IDutyService; import com.biutag.mapper.setting.DictDataMapper; import com.biutag.mapper.system.DeptMapper; @@ -48,9 +51,13 @@ public class DutyServiceImpl implements IDutyService { @Resource DeptMapper deptMapper; + @Resource + IDeptService deptService; + @Resource DictDataMapper dictDataMapper; + /** * 值班列表 * @@ -68,6 +75,10 @@ public class DutyServiceImpl implements IDutyService { .like(StrUtil.isNotBlank(searchValidate.getEmpNo()), Duty::getEmpNo, searchValidate.getEmpNo()) .like(StrUtil.isNotBlank(searchValidate.getMobile()), Duty::getMobile, searchValidate.getMobile()) .eq(StrUtil.isNotBlank(searchValidate.getDeptType()), Duty::getDeptType, searchValidate.getDeptType()); + if (!RoleEnum.PROVINCIAL_CLASSES.getRoleId().equals(AdminThreadLocal.getRoleId())) { + List deptIds = deptService.getAllIds(AdminThreadLocal.getDeptId()); + queryWrapper.in(Duty::getDepartId, deptIds); + } Page dutyPage = dutyMapper.selectPage(Page.of(page, limit), queryWrapper); List records = dutyPage.getRecords().stream().map(item -> { DutyListedVo vo = new DutyListedVo(); diff --git a/mailbox-lan/src/main/resources/templates/湖南省公安厅厅长信箱即接即办系统平台-操作手册V1.pdf b/mailbox-lan/src/main/resources/templates/湖南省公安厅厅长信箱即接即办系统平台-操作手册V1.pdf index d3eff9b..29c0335 100644 Binary files a/mailbox-lan/src/main/resources/templates/湖南省公安厅厅长信箱即接即办系统平台-操作手册V1.pdf and b/mailbox-lan/src/main/resources/templates/湖南省公安厅厅长信箱即接即办系统平台-操作手册V1.pdf differ diff --git a/mailbox-lan/src/test/java/com/biutag/lan/TestCase.java b/mailbox-lan/src/test/java/com/biutag/lan/TestCase.java index afbf694..ddc255f 100644 --- a/mailbox-lan/src/test/java/com/biutag/lan/TestCase.java +++ b/mailbox-lan/src/test/java/com/biutag/lan/TestCase.java @@ -1,5 +1,7 @@ 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.util.TypeUtil; import com.biutag.util.NumberUtils; @@ -10,14 +12,21 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.LocalDateTime; +import java.util.Date; public class TestCase { @Test public void test1() throws Exception { - Long total = 0L; - NumberUtils.rate(1, total); + Date date = new Date(); + 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) { diff --git a/mailbox-outer/src/main/java/com/biutag/outer/service/MailService.java b/mailbox-outer/src/main/java/com/biutag/outer/service/MailService.java index b06d527..ce8f0d1 100644 --- a/mailbox-outer/src/main/java/com/biutag/outer/service/MailService.java +++ b/mailbox-outer/src/main/java/com/biutag/outer/service/MailService.java @@ -41,7 +41,7 @@ public class MailService extends ServiceImpl { .eq(Mail::getContactPhone, mailBo.getContactPhone()) .between(Mail::getCreateTime, DateUtil.beginOfDay(now), DateUtil.endOfDay(now))); if (count >= 3) { - throw new RuntimeException("您当日的写信次数已达到最大限制!"); + throw new RuntimeException("您当日的写信次数已达最大限制!请勿重复投诉!"); } Mail mail = mailBo.toEntity(); mail.setId(generateMailId());