diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java index 7e744a8..156d674 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java @@ -53,13 +53,21 @@ public class HomeController { Integer contactWriterTotal = workService.count(FlowNodeEnum.CONTACT_WRITER.getKey(), deptId); Integer interviewWriterTotal = workService.count(FlowNodeEnum.INTERVIEW_WRITER.getKey(), deptId); Integer verifyTotal = workService.count(FlowNodeEnum.VERIFY.getKey(), deptId); + // 已申请延期 + Integer extensionTotal = workService.count(true, deptId); + Integer approvalTotal = workService.count(Arrays.asList(FlowNodeEnum.THREE_LEADER_APPROVAL.getKey(), + FlowNodeEnum.SECOND_DEPUTY_APPROVAL.getKey(), + FlowNodeEnum.SECOND_LEADER_APPROVAL.getKey(), + FlowNodeEnum.SECOND_REPORTING.getKey(), + FlowNodeEnum.FIRST_APPROVAL.getKey(), + FlowNodeEnum.COUNTERSIGN.getKey()), deptId); return AjaxResult.success(Arrays.asList(MailTotal.of("未签收", "un_sign", unSignTotal), MailTotal.of("联系群众", "contact_writer", contactWriterTotal), MailTotal.of("待接访群众", "interview_writer", interviewWriterTotal), MailTotal.of("待核查办理", "verify", verifyTotal), // TODO - MailTotal.of("申请延期", "extension", 0), - MailTotal.of("待办结审批", "approval", 0) + MailTotal.of("申请延期", "extension", extensionTotal), + MailTotal.of("待办结审批", "approval", approvalTotal) )); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java index d23a402..b8a1da3 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java @@ -349,4 +349,9 @@ public class Mail { */ private String secondDistributeInfo; + /** + * 主办层级 + */ + private Integer mainDeptLevel; + } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/Work.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/Work.java index 2a598b0..a60f8a7 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/Work.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/Work.java @@ -89,10 +89,15 @@ public class Work { private String content; /** - * + * 工作类型 */ private String workType; + /** + * + */ + private String flowName; + @AllArgsConstructor public enum State { todo, diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java index 477a56f..1a301e0 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java @@ -223,6 +223,8 @@ public class MailVo { */ private Integer threeDeptId; + private String threeDeptName; + /** * 涉及单位ID */ @@ -308,6 +310,16 @@ public class MailVo { */ private JSONObject secondDistributeInfo; + /** + * 办结方式 + */ + private String completeMethod; + + /** + * 主办层级 + */ + private Integer mainDeptLevel; + /** * 部门会签 */ diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java index 4887c5d..e76efa9 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java @@ -78,12 +78,6 @@ public class WorkVo { @ExcelProperty("流程节点ID") private String flowKey; - /** - * 信件当前流程节点 - */ - @ExcelProperty("流程节点") - private String flowBeforeName; - /** * 当前流程剩余多少时间(秒) */ @@ -110,4 +104,16 @@ public class WorkVo { */ @ExcelProperty("信件标签") private String mailLabels; + + private String flowName; + + /** + * 会签部门总数 + */ + private Integer countersignTotal; + + /** + * 会签完成部门数量 + */ + private Integer countersignCompleted; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNameEnum.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNameEnum.java new file mode 100644 index 0000000..f33e008 --- /dev/null +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNameEnum.java @@ -0,0 +1,33 @@ +package com.biutag.lan.flow; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +public enum FlowNameEnum { + + PENDING_SIGN("待签收"), + PENDING_SIGN_CO("待签收(协办)"), + PENDING_DISTRIBUTE("待下发"), + + PENDING_DISTRIBUTE_CO("待下发(协办)"), + + CONTACT_WRITER("联系群众"), + INTERVIEW_WRITER("接访群众"), + + VERIFY("核查办理"), + + PENDING_APPROVAL("待审批"), + + PENDING_REPORT("待呈报"), + + COUNTERSIGNING("会签中"), + + PENDING_COUNTERSIGN("待会签"), + MAIL_RETURN("信件退回"), + RETURN_RECTIFICATION("退回整改"); + + @Getter + private String name; + +} diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java index 950f010..bb62bbf 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java @@ -32,7 +32,6 @@ public class CountersignFlow extends Flow { public Flow next(String nextActionKey, String mailId, JSONObject data) { String comments = data.getString("comments"); Assert.hasText(comments, "参数错误"); - Integer deptId = AdminThreadLocal.getDeptId(); LocalDateTime now = LocalDateTime.now(); List list = mailCountersignService.list(mailId); @@ -49,7 +48,6 @@ public class CountersignFlow extends Flow { workService.updateById(work); Mail mail = mailService.getById(mailId); mail.setCountersignCompleted(count + 1).setUpdateTime(now); - if (mail.getCountersignCompleted() < mail.getCountersignTotal()) { mailService.updateById(mail); return null; diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java index 0e84c0e..52843d6 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java @@ -11,6 +11,7 @@ import com.biutag.lan.domain.MailReturn; import com.biutag.lan.enums.MailState; 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.MailMarkService; import com.biutag.lan.service.MailReturnService; @@ -103,7 +104,7 @@ public class FirstApprovalFlow extends Flow { // 更新已办 workService.updateDone(mailId, AdminThreadLocal.getEmpNo(), now); // 更新三级机构专班的待办 - workService.updateTodo(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.RETURN_RECTIFICATION.getName()); // 更新信件 Mail mail = mailService.getById(mailId); mail.setUpdateTime(now) 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 1105235..5df0f9c 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 @@ -2,13 +2,10 @@ package com.biutag.lan.flow.node; import com.alibaba.fastjson2.JSONObject; import com.biutag.enums.RoleEnum; -import com.biutag.exception.BusinessException; import com.biutag.lan.domain.Mail; -import com.biutag.lan.domain.MailMark; -import com.biutag.lan.domain.Work; import com.biutag.lan.flow.Flow; +import com.biutag.lan.flow.FlowNameEnum; 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; @@ -38,6 +35,8 @@ public class FirstDistributeFlow extends Flow { public Flow next(String nextActionKey, String mailId, JSONObject data) { Integer mainDeptId = data.getInteger("mainDeptId"); Assert.notNull(mainDeptId, "未选择主责单位"); + Integer mainDeptLevel = data.getInteger("mainDeptLevel"); + Assert.notNull(mainDeptId, "未选择主办层级"); LocalDateTime now = LocalDateTime.now(); Mail mail = mailService.getById(mailId); // 将我的工作待办改成已办 @@ -47,17 +46,17 @@ public class FirstDistributeFlow extends Flow { JSONObject firstDistributeInfo = JSONObject.of("mainDept", JSONObject.of("id", mainDeptId), "secondDept", secondDept); // 下发信件(主责单位) - workService.saveOrUpdate(mail, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), mainDeptId, now, true); + workService.saveOrUpdate(mail, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), mainDeptId, now, true, FlowNameEnum.PENDING_SIGN.getName()); Integer secondDeptId1 = data.getInteger("secondDeptId1"); if (Objects.nonNull(secondDeptId1)) { // 下发信件(次责单位1) - workService.saveOrUpdate(mail, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), secondDeptId1, now, false); + workService.saveOrUpdate(mail, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), secondDeptId1, now, false, FlowNameEnum.PENDING_SIGN_CO.getName()); firstDistributeInfo.put("secondDept1", JSONObject.of("id", secondDeptId1)); } Integer secondDeptId2 = data.getInteger("secondDeptId2"); if (Objects.nonNull(secondDeptId2)) { // 下发信件(次责单位2) - workService.saveOrUpdate(mail, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), secondDeptId2, now, false); + workService.saveOrUpdate(mail, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), secondDeptId2, now, false, FlowNameEnum.PENDING_SIGN_CO.getName()); firstDistributeInfo.put("secondDept2", JSONObject.of("id", secondDeptId2)); } Flow nextNode = next.get(nextActionKey); @@ -69,7 +68,8 @@ public class FirstDistributeFlow extends Flow { .setFlowLimitedLastHandlerTime(now) .setSecondDeptId(mainDeptId) .setSecondDeptName(deptVo.getName()) - .setFirstDistributeInfo(firstDistributeInfo.toJSONString()); + .setFirstDistributeInfo(firstDistributeInfo.toJSONString()) + .setMainDeptLevel(mainDeptLevel); mailService.updateById(mail); return nextNode; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java index c596cb6..45981af 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java @@ -9,6 +9,7 @@ import com.biutag.lan.domain.Work; import com.biutag.lan.enums.MailCategory; import com.biutag.lan.enums.MailState; import com.biutag.lan.flow.Flow; +import com.biutag.lan.flow.FlowNameEnum; import com.biutag.lan.flow.FlowNodeEnum; import com.biutag.lan.service.MailService; import com.biutag.lan.service.MailSourceService; @@ -63,6 +64,7 @@ public class FirstSignFlow extends Flow { String empNo = AdminThreadLocal.getEmpNo(); // 更新我的工作 work.setPoliceEmpNo(empNo) + .setFlowName(FlowNameEnum.PENDING_DISTRIBUTE.getName()) .setUpdateTime(LocalDateTime.now()); workService.updateById(work); @@ -84,7 +86,6 @@ public class FirstSignFlow extends Flow { .setFlowBeforeName(nextNode.getFlowNode().getBeforeName()) .setFlowLimitedLastHandlerTime(mailSource.getCreateTime()); mailService.save(mail); - return nextNode; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondApprovalFlow.java index e6dcdff..8ff6cb8 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondApprovalFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondApprovalFlow.java @@ -9,6 +9,7 @@ import com.biutag.lan.domain.MailReturn; import com.biutag.lan.enums.CompleteMethod; 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.MailApprovalService; import com.biutag.lan.service.MailReturnService; @@ -70,7 +71,7 @@ public class SecondApprovalFlow extends Flow { // 更新已办 workService.updateDone(mailId, AdminThreadLocal.getEmpNo(), now); // 更新三级机构专班的待办 - workService.updateTodo(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.RETURN_RECTIFICATION.getName()); // 更新信件 Mail mail = mailService.getById(mailId); mail.setUpdateTime(now) @@ -89,7 +90,7 @@ public class SecondApprovalFlow extends Flow { // 将二级专班角色的信件改为已办 workService.updateDone(mail.getId(), RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); // 将市局专班信件改为待办 - workService.updateTodo(mail.getId(), RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mail.getId(), RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.PENDING_APPROVAL.getName()); // 更新信件 mail.setUpdateTime(now) .setFlowKey(FlowNodeEnum.FIRST_APPROVAL.getKey()) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDeputyApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDeputyApprovalFlow.java index 5c5846a..3d8bb59 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDeputyApprovalFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDeputyApprovalFlow.java @@ -6,6 +6,7 @@ import com.biutag.lan.config.AdminThreadLocal; import com.biutag.lan.domain.Mail; 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.MailApprovalService; import com.biutag.lan.service.MailService; @@ -69,7 +70,7 @@ public class SecondDeputyApprovalFlow extends Flow { // 将我的信件改为已办 workService.updateDone(mailId, AdminThreadLocal.getEmpNo(), now); // 更新二级机构专班的待办 - workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.PENDING_APPROVAL.getName()); // 更新信件 mail.setUpdateTime(now) .setFlowKey(FlowNodeEnum.SECOND_APPROVAL.getKey()) 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 72874ac..2b51379 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 @@ -7,6 +7,7 @@ import com.biutag.lan.domain.Mail; 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.service.IDeptService; import com.biutag.lan.service.MailService; import com.biutag.lan.service.WorkService; @@ -56,18 +57,18 @@ public class SecondDistributeFlow extends Flow { JSONObject secondDistributeInfo = JSONObject.of("mainDept", JSONObject.of("id", mainDeptId), "secondDept", secondDept); // 下发信件(主责单位) - workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), mainDeptId, now, true); + workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), mainDeptId, now, true, FlowNameEnum.PENDING_SIGN.getName()); Integer secondDeptId1 = data.getInteger("secondDeptId1"); if (Objects.nonNull(secondDeptId1)) { // 下发信件(次责单位1) - workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), secondDeptId1, now, false); + workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), secondDeptId1, now, false, FlowNameEnum.PENDING_SIGN_CO.getName()); secondDept.add(JSONObject.of("id", secondDeptId1)); } Integer secondDeptId2 = data.getInteger("secondDeptId2"); if (Objects.nonNull(secondDeptId2)) { // 下发信件(次责单位2) - workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), secondDeptId2, now, false); + workService.saveOrUpdate(mail, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), secondDeptId2, now, false, FlowNameEnum.PENDING_SIGN_CO.getName()); secondDept.add(JSONObject.of("id", secondDeptId1)); } Flow nextNode = next.get(nextActionKey); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondLeaderApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondLeaderApprovalFlow.java index dcea1c7..3b6ebf2 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondLeaderApprovalFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondLeaderApprovalFlow.java @@ -6,6 +6,7 @@ import com.biutag.lan.config.AdminThreadLocal; import com.biutag.lan.domain.Mail; import com.biutag.lan.flow.ActionEnum; import com.biutag.lan.flow.Flow; +import com.biutag.lan.flow.FlowNameEnum; import com.biutag.lan.service.MailApprovalService; import com.biutag.lan.service.MailService; import com.biutag.lan.service.WorkService; @@ -43,7 +44,7 @@ public class SecondLeaderApprovalFlow extends Flow { // 将我的信件改为已办 workService.updateDone(mailId, AdminThreadLocal.getEmpNo(), now); // 转给二级专班 - workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.PENDING_REPORT.getName()); Flow nextNode = next.get(nextActionKey); // 更新信件 mail.setUpdateTime(now) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondReportingFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondReportingFlow.java index 2a460c9..bab4e88 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondReportingFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondReportingFlow.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject; import com.biutag.enums.RoleEnum; import com.biutag.lan.domain.Mail; import com.biutag.lan.flow.Flow; +import com.biutag.lan.flow.FlowNameEnum; import com.biutag.lan.service.MailService; import com.biutag.lan.service.WorkService; import lombok.RequiredArgsConstructor; @@ -26,7 +27,7 @@ public class SecondReportingFlow extends Flow { // 将二级专班信件改为已办 workService.updateDone(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); // 将市局专班信件改为待办 - workService.updateTodo(mailId, RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.PENDING_APPROVAL.getName()); Flow nextNode = next.get(nextActionKey); // 更新信件 mail.setUpdateTime(now) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondSignFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondSignFlow.java index 26d324e..780b1d7 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondSignFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondSignFlow.java @@ -1,7 +1,6 @@ package com.biutag.lan.flow.node; import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.biutag.enums.RoleEnum; import com.biutag.exception.BusinessException; @@ -11,6 +10,7 @@ import com.biutag.lan.domain.MailReturn; 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.MailReturnService; import com.biutag.lan.service.MailService; @@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import java.time.LocalDateTime; -import java.util.List; import java.util.Objects; /** @@ -68,7 +67,7 @@ public class SecondSignFlow extends Flow { work.setUpdateTime(now).setWorkState(Work.State.done.name()); workService.updateById(work); // 更新市局专班的待办 - workService.updateTodo(mailId, RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.MAIL_RETURN.getName()); Mail mail = mailService.getById(mailId); // 主责单位 if (work.getMainDeptFlag()) { @@ -103,7 +102,8 @@ public class SecondSignFlow extends Flow { String empNo = AdminThreadLocal.getEmpNo(); // 更新我的工作 work.setPoliceEmpNo(empNo) - .setUpdateTime(now); + .setUpdateTime(now) + .setFlowName(FlowNameEnum.PENDING_DISTRIBUTE.getName()); workService.updateById(work); // 更新信件 Mail mail = mailService.getById(mailId); 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 1d9f7e8..e654eb0 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 @@ -3,11 +3,16 @@ package com.biutag.lan.flow.node; import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DateUtil; 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.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.MailService; +import com.biutag.lan.service.WorkService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -24,6 +29,8 @@ public class ThreeContactWriterFlow extends Flow { private final MailService mailService; + private final WorkService workService; + private final ThreeSignFlow threeSignFlow; @Override @@ -61,6 +68,10 @@ public class ThreeContactWriterFlow extends Flow { .setFlowBeforeName(FlowNodeEnum.VERIFY.getFullName()); } mailService.updateById(mail); + // 更新我的工作 + Work work = workService.getOne(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), AdminThreadLocal.getDeptId()); + work.setFlowName(FlowNameEnum.INTERVIEW_WRITER.getName()).setUpdateTime(now); + workService.updateById(work); return nextNode; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeInterviewWriterFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeInterviewWriterFlow.java index 9b4829a..a709d90 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeInterviewWriterFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeInterviewWriterFlow.java @@ -1,9 +1,15 @@ package com.biutag.lan.flow.node; 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.Work; +import com.biutag.lan.flow.ActionEnum; import com.biutag.lan.flow.Flow; +import com.biutag.lan.flow.FlowNameEnum; import com.biutag.lan.service.MailService; +import com.biutag.lan.service.WorkService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -17,9 +23,21 @@ import java.time.LocalDateTime; public class ThreeInterviewWriterFlow extends Flow { private final MailService mailService; + + private final WorkService workService; + + private final ThreeSignFlow threeSignFlow; + @Override public Flow next(String nextActionKey, String mailId, JSONObject data) { + if (ActionEnum.mailReturn.getValue().equals(nextActionKey)) { + return threeSignFlow.mailReturn(mailId, data); + } LocalDateTime now = LocalDateTime.now(); + // 更新我的工作 + Work work = workService.getOne(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), AdminThreadLocal.getDeptId()); + work.setFlowName(FlowNameEnum.VERIFY.getName()).setUpdateTime(now); + workService.updateById(work); // 更新信件 Mail mail = mailService.getById(mailId); Flow nextNode = next.get(nextActionKey); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java index 19e2b4b..558f757 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java @@ -7,6 +7,7 @@ import com.biutag.lan.domain.Mail; import com.biutag.lan.domain.MailReturn; 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.MailApprovalService; import com.biutag.lan.service.MailReturnService; @@ -43,7 +44,7 @@ public class ThreeLeaderApprovalFlow extends Flow { // 将我的信件改为已办 workService.updateDone(mailId, empNo, now); // 将二级专班的信件改为待办 - workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.PENDING_APPROVAL.getName()); Flow nextNode = next.get(nextActionKey); // 更新信件 mail.setUpdateTime(now) @@ -69,7 +70,7 @@ public class ThreeLeaderApprovalFlow extends Flow { // 更新已办 workService.updateDone(mailId, AdminThreadLocal.getEmpNo(), now); // 更新三级机构专班的待办 - workService.updateTodo(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.RETURN_RECTIFICATION.getName()); // 更新信件 Mail mail = mailService.getById(mailId); mail.setUpdateTime(now) 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 9b7cb64..db4b383 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 @@ -9,6 +9,7 @@ import com.biutag.lan.domain.MailReturn; 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.MailReturnService; import com.biutag.lan.service.MailService; @@ -64,7 +65,7 @@ public class ThreeSignFlow extends Flow { work.setUpdateTime(now).setWorkState(Work.State.done.name()); workService.updateById(work); // 更新二级机构专班的待办 - workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.MAIL_RETURN.getName()); // 更新信件 Mail mail = mailService.getById(mailId); mail.setUpdateTime(now) @@ -85,7 +86,8 @@ public class ThreeSignFlow extends Flow { } // 更新我的工作 work.setPoliceEmpNo(empNo) - .setUpdateTime(now); + .setUpdateTime(now) + .setFlowName(FlowNameEnum.CONTACT_WRITER.getName()); workService.updateById(work); Mail mail = mailService.getById(mailId); Flow nextNode = next.get(nextActionKey); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java index 2d8b3bf..90fff0f 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java @@ -13,6 +13,7 @@ import com.biutag.lan.enums.ExtensionState; import com.biutag.lan.enums.WorkType; import com.biutag.lan.flow.ActionEnum; import com.biutag.lan.flow.Flow; +import com.biutag.lan.flow.FlowNameEnum; import com.biutag.lan.service.MailService; import com.biutag.lan.service.WorkService; import lombok.RequiredArgsConstructor; @@ -57,7 +58,7 @@ public class ThreeVerifyFlow extends Flow { LocalDateTime now = LocalDateTime.now(); // 给二级机构增加待办 - workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), WorkType.extension_approval.name(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), WorkType.extension_approval.name(), now, FlowNameEnum.PENDING_APPROVAL.getName()); Mail mail = mailService.getById(mailId); mail.setUpdateTime(now) @@ -86,7 +87,7 @@ public class ThreeVerifyFlow extends Flow { .setContactDuration(data.getLong("contactDuration")) .setContactPoliceEmpNo(data.getString("contactDuration")) .setContactFlag(data.getBoolean("contactFlag")) - // 群众接访 + // 接访群众 .setInterviewType(data.getString("interviewType")) .setInterviewIsLeader(data.getBoolean("interviewIsLeader")) .setInterviewPoliceEmpNo(data.getString("interviewPoliceEmpNo")) @@ -110,11 +111,9 @@ public class ThreeVerifyFlow extends Flow { } public void applicationCompleted(String nextActionKey, Mail mail, JSONObject data, LocalDateTime now) { - JSONObject verifyFollowupPoliceObj = data.getJSONObject("verifyFollowupPolice"); Assert.notNull(verifyFollowupPoliceObj, "参数异常"); - Flow nextNode = next.get(nextActionKey); JSONObject contactPolice = data.getJSONObject("contactPolice"); @@ -131,7 +130,7 @@ public class ThreeVerifyFlow extends Flow { .setContactDuration(data.getLong("contactDuration")) .setContactPoliceEmpNo(data.getString("contactDuration")) .setContactFlag(data.getBoolean("contactFlag")) - // 群众接访 + // 接访群众 .setInterviewType(data.getString("interviewType")) .setInterviewIsLeader(data.getBoolean("interviewIsLeader")) .setInterviewPoliceEmpNo(data.getString("interviewPoliceEmpNo")) @@ -166,7 +165,7 @@ public class ThreeVerifyFlow extends Flow { Mail mail = mailService.getById(mailId); applicationCompleted(nextActionKey, mail, data, now); // 给二级机构专班增加待办 - workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now); + workService.updateTodo(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), now, FlowNameEnum.PENDING_APPROVAL.getName()); return null; } @@ -178,7 +177,7 @@ public class ThreeVerifyFlow extends Flow { Mail mail = mailService.getById(mailId); applicationCompleted(nextActionKey, mail, data, now); // 给三级部门领导增加待办 - workService.saveOrUpdate(mail, leaderEmpNo, now); + workService.saveOrUpdate(mail, leaderEmpNo, now, FlowNameEnum.PENDING_APPROVAL.getName()); return null; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/mapper/WorkMapper.java b/mailbox-lan/src/main/java/com/biutag/lan/mapper/WorkMapper.java index 6192540..aee4977 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/mapper/WorkMapper.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/mapper/WorkMapper.java @@ -9,13 +9,21 @@ import com.biutag.lan.domain.vo.WorkVo; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; +import java.util.Collection; +import java.util.List; + public interface WorkMapper extends BaseMapper { Page selectPageTodo(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + Integer selectCountByFlowKey(Collection flowKeys, Integer deptId); + @Select("select count(w.id) from work w left join mail m on w.mail_id = m.id where m.flow_key = #{flowKey} and w.sign_dept_id = #{deptId}") Integer selectCount(String flowKey, Integer deptId); + @Select("select count(w.id) from work w left join mail m on w.mail_id = m.id where m.extension_flag = #{extensionFlag} and w.sign_dept_id = #{deptId}") + Integer selectCountByExtensionFlag(Boolean extensionFlag, Integer deptId); + @Select("select count(w.mail_id) from work w where w.mail_id = #{mailId}") Integer countByFilter(String mailId); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java index 599176f..3d4f73b 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java @@ -21,10 +21,7 @@ import com.biutag.lan.enums.CompleteMethod; import com.biutag.lan.enums.ExtensionState; import com.biutag.lan.enums.MailState; import com.biutag.lan.enums.WorkType; -import com.biutag.lan.flow.ActionEnum; -import com.biutag.lan.flow.Flow; -import com.biutag.lan.flow.FlowConfig; -import com.biutag.lan.flow.FlowNodeEnum; +import com.biutag.lan.flow.*; import com.biutag.lan.flow.node.FirstSignFlow; import com.biutag.lan.mapper.MailMapper; import lombok.RequiredArgsConstructor; @@ -239,6 +236,16 @@ public class MailService extends ServiceImpl { .setCountersignCompleted(0); updateById(mail); + Integer roleId = AdminThreadLocal.getRoleId(); + Work work; + if (RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId().equals(roleId) || RoleEnum.SECOND_DEPT_CLASSES.getRoleId().equals(roleId)) { + work = workService.getxByUnSign(mailId, roleId, AdminThreadLocal.getDeptId()); + } else { + work = workService.getOne(mailId, AdminThreadLocal.getEmpNo()); + } + work.setFlowName(FlowNameEnum.COUNTERSIGNING.getName()).setUpdateTime(now); + workService.updateById(work); + // 给相关部门新增会签待办 workService.saveByCountersign(mail, countersignDeptIds, now); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java index a308aeb..23e552a 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java @@ -17,6 +17,8 @@ import com.biutag.lan.domain.Work; import com.biutag.lan.domain.bo.MailQuery; import com.biutag.lan.domain.vo.WorkVo; import com.biutag.lan.enums.WorkType; +import com.biutag.lan.flow.FlowNameEnum; +import com.biutag.lan.flow.FlowNodeEnum; import com.biutag.lan.mapper.MailLabelMapper; import com.biutag.lan.mapper.WorkMapper; import jakarta.annotation.Resource; @@ -30,6 +32,7 @@ import org.springframework.web.multipart.MultipartFile; import java.io.IOException; import java.net.URLEncoder; import java.time.LocalDateTime; +import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -56,7 +59,8 @@ public class WorkService extends ServiceImpl { .setSignRoleId(RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId()) .setMainDeptFlag(true) .setCreateTime(now) - .setUpdateTime(now); + .setUpdateTime(now) + .setFlowName(FlowNameEnum.PENDING_SIGN.getName()); return work; }).collect(Collectors.toList()); return saveBatch(list); @@ -64,7 +68,6 @@ public class WorkService extends ServiceImpl { @Transactional(rollbackFor = Exception.class) public boolean saveExcelBatch(List mailSources) { - LocalDateTime now = LocalDateTime.now(); List list = mailSources.stream().map(mail -> { Work work = new Work(); BeanUtils.copyProperties(mail, work); @@ -84,7 +87,7 @@ public class WorkService extends ServiceImpl { return save(work); } - public boolean saveOrUpdate(Mail mail, Integer roleId, Integer deptId, LocalDateTime time, Boolean mainDeptFlag) { + public boolean saveOrUpdate(Mail mail, Integer roleId, Integer deptId, LocalDateTime time, Boolean mainDeptFlag, String flowName) { Work work = getOne(mail.getId(), roleId, deptId); if (Objects.isNull(work)) { work = new Work(); @@ -94,11 +97,11 @@ public class WorkService extends ServiceImpl { .setSignDeptId(deptId) .setCreateTime(time); } - work.setWorkState(Work.State.todo.name()).setUpdateTime(time).setMainDeptFlag(mainDeptFlag); + work.setWorkState(Work.State.todo.name()).setUpdateTime(time).setMainDeptFlag(mainDeptFlag).setFlowName(flowName); return saveOrUpdate(work); } - public boolean saveOrUpdate(Mail mail, String empNo, LocalDateTime time) { + public boolean saveOrUpdate(Mail mail, String empNo, LocalDateTime time, String flowName) { Work work = getOne(mail.getId(), empNo); if (Objects.isNull(work)) { work = new Work(); @@ -107,7 +110,7 @@ public class WorkService extends ServiceImpl { .setPoliceEmpNo(empNo) .setCreateTime(time); } - work.setWorkState(Work.State.todo.name()).setUpdateTime(time); + work.setWorkState(Work.State.todo.name()).setUpdateTime(time).setFlowName(flowName); return saveOrUpdate(work); } @@ -124,7 +127,8 @@ public class WorkService extends ServiceImpl { .setCreateTime(time) .setUpdateTime(time) // 部门会签 - .setWorkType(WorkType.dept_countersign.name()); + .setWorkType(WorkType.dept_countersign.name()) + .setFlowName(FlowNameEnum.PENDING_COUNTERSIGN.getName()); return work; }).collect(Collectors.toList()); return saveBatch(collect); @@ -160,15 +164,15 @@ public class WorkService extends ServiceImpl { } - public boolean updateTodo(String mailId, Integer roleId, LocalDateTime time) { + public boolean updateTodo(String mailId, Integer roleId, LocalDateTime time, String flowName) { Work work = getByRoleId(mailId, roleId); - work.setUpdateTime(time).setWorkState(Work.State.todo.name()).setPoliceEmpNo(null); + work.setUpdateTime(time).setWorkState(Work.State.todo.name()).setPoliceEmpNo(null).setFlowName(flowName); return updateById(work); } - public boolean updateTodo(String mailId, Integer roleId, String workType, LocalDateTime time) { + public boolean updateTodo(String mailId, Integer roleId, String workType, LocalDateTime time, String flowName) { Work work = getByRoleId(mailId, roleId); - work.setUpdateTime(time).setWorkState(Work.State.todo.name()).setPoliceEmpNo(null).setWorkType(workType); + work.setUpdateTime(time).setWorkState(Work.State.todo.name()).setPoliceEmpNo(null).setWorkType(workType).setFlowName(flowName); return updateById(work); } @@ -181,7 +185,10 @@ public class WorkService extends ServiceImpl { .eq(StrUtil.isNotBlank(todoQuery.getMailLevel()), "m.mail_level", todoQuery.getMailLevel()) .eq(StrUtil.isNotBlank(todoQuery.getMailCategory()), "m.mail_category", todoQuery.getMailCategory()) .like(StrUtil.isNotBlank(todoQuery.getThreeDeptName()), "m.three_dept_name", todoQuery.getThreeDeptName()) - .eq(StrUtil.isNotBlank(todoQuery.getFlowKey()), "m.flow_key", todoQuery.getFlowKey()); + .eq(StrUtil.isNotBlank(todoQuery.getFlowKey()), "m.flow_key", todoQuery.getFlowKey()) + .and(query -> { + query.isNull("m.flow_key").or().ne("m.flow_key", FlowNodeEnum.COMPLETION.getKey()); + }); Integer roleId = AdminThreadLocal.getRoleId(); // 与角色相关的件 if (roleId.equals(RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId()) || @@ -210,7 +217,14 @@ public class WorkService extends ServiceImpl { } // 排序 queryWrapper.orderByDesc("w.update_time"); - return baseMapper.selectPageTodo(page, queryWrapper); + Page workVoPage = baseMapper.selectPageTodo(page, queryWrapper); + workVoPage.getRecords().forEach(item -> { + // 会签中 + if (FlowNameEnum.COUNTERSIGNING.getName().equals(item.getFlowName())) { + item.setFlowName(String.format("%s(%s/%s)", item.getFlowName(), item.getCountersignCompleted(), item.getCountersignTotal())); + } + }); + return workVoPage; } public Work getOne(String mailId, String empNo) { @@ -253,7 +267,6 @@ public class WorkService extends ServiceImpl { public Work getxByUnSign(String mailId, Integer roleId, Integer deptId) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() .eq(Work::getMailId, mailId) - .isNull(Work::getPoliceEmpNo) .eq(Work::getSignRoleId, roleId) // 如果不是市局专班,则需要查询签收部门ID .eq(!RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId().equals(roleId), Work::getSignDeptId, deptId); @@ -264,6 +277,14 @@ public class WorkService extends ServiceImpl { return baseMapper.selectCount(flowKey, deptId); } + public Integer count(Collection flowKeys, Integer deptId) { + return baseMapper.selectCountByFlowKey(flowKeys, deptId); + } + + public Integer count(Boolean extensionFlag, Integer deptId) { + return baseMapper.selectCountByExtensionFlag(extensionFlag, deptId); + } + public List list(String mailId, Integer roleId, String workType) { return list(new LambdaQueryWrapper().eq(Work::getMailId, mailId).eq(Work::getSignRoleId, roleId).eq(Work::getWorkType, workType)); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java index f1e6248..49ab0d1 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java @@ -294,7 +294,7 @@ public class PoliceUserServiceImpl implements IPoliceUserService { PoliceUserDetailVo vo = new PoliceUserDetailVo(); BeanUtils.copyProperties(sysAdmin, vo); if(StringUtils.isNotNull(sysAdmin.getRoleIds())) { - vo.setRoleIds(ListUtils.stringToListAsInt(sysAdmin.getRoleIds(), ",")); + vo.setRoleIds(Integer.parseInt(sysAdmin.getRoleIds())); } if(StringUtils.isNotNull(sysAdmin.getDeptIds())) { vo.setDeptIds(ListUtils.stringToListAsInt(sysAdmin.getDeptIds(), ",")); @@ -397,10 +397,10 @@ public class PoliceUserServiceImpl implements IPoliceUserService { Assert.notNull(policeUser, "警号已存在换一个吧!"); PoliceUser model = new PoliceUser(); model.setId(updateValidate.getId()); - if(StringUtils.isNotNull(updateValidate.getRoleIds())) { - model.setRoleIds(ListUtils.listToStringByInt(updateValidate.getRoleIds(), ",")); + if(Objects.nonNull(updateValidate.getRoleIds())) { + model.setRoleIds(updateValidate.getRoleIds().toString()); if(!policeUser.getRoleIds().equals(model.getRoleIds())){ - this.batchSaveRoleByEmpNo(updateValidate.getEmpNo(),updateValidate.getRoleIds()); + this.batchSaveRoleByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getRoleIds())); } } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserUpdateValidate.java b/mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserUpdateValidate.java index e9f20d5..fbb9bbf 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserUpdateValidate.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/validate/system/PoliceUserUpdateValidate.java @@ -68,7 +68,7 @@ public class PoliceUserUpdateValidate implements Serializable { @NotNull(message = "请选择角色") @ApiModelProperty(value = "角色ID") - private List roleIds; + private Integer roleIds; @ApiModelProperty(value = "部门ID") private List deptIds; diff --git a/mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserDetailVo.java b/mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserDetailVo.java index 855797c..c966882 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserDetailVo.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/vo/system/PoliceUserDetailVo.java @@ -17,7 +17,7 @@ public class PoliceUserDetailVo implements Serializable { private Integer id; @ApiModelProperty(value = "角色ID") - private List roleIds; + private Integer roleIds; @ApiModelProperty(value = "部门ID") private List deptIds; diff --git a/mailbox-lan/src/main/resources/application.yml b/mailbox-lan/src/main/resources/application.yml index 90fc7a2..c723dde 100644 --- a/mailbox-lan/src/main/resources/application.yml +++ b/mailbox-lan/src/main/resources/application.yml @@ -18,6 +18,10 @@ spring: pool-name: DateSourceHikariCP # 连接池名称 max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放,默认30分钟(1800000ms) connection-init-sql: SELECT 1 # 连接时发起SQL测试脚本 + servlet: + multipart: + max-file-size: 100MB + max-request-size: 100MB # Sa-token配置 sa-token: diff --git a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml index e0b3a7d..ae3f808 100644 --- a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml +++ b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml @@ -17,26 +17,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/mailbox-lan/src/main/resources/mapper/WorkMapper.xml b/mailbox-lan/src/main/resources/mapper/WorkMapper.xml index 08418b6..b1a8631 100644 --- a/mailbox-lan/src/main/resources/mapper/WorkMapper.xml +++ b/mailbox-lan/src/main/resources/mapper/WorkMapper.xml @@ -5,8 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + +