From 43bac1af0905c5df70b11f1ebbb519f01167645b Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Sat, 3 Feb 2024 14:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=80=E9=95=BF=E4=BF=A1=E7=AE=B1(=E5=86=85?= =?UTF-8?q?=E7=BD=91=E7=AB=AF)=20=E4=BF=A1=E4=BB=B6=E7=AD=BE=E6=94=B6=2024?= =?UTF-8?q?0203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lan/controller/system/DeptController.java | 9 +++- .../system/PoliceUserController.java | 2 +- .../java/com/biutag/lan/domain/FlowNode.java | 5 +-- .../main/java/com/biutag/lan/domain/Mail.java | 9 +++- .../main/java/com/biutag/lan/domain/Work.java | 5 +++ .../java/com/biutag/lan/domain/vo/WorkVo.java | 9 +--- .../com/biutag/lan/enums/CompleteMethod.java | 7 ++++ .../main/java/com/biutag/lan/flow/Action.java | 8 ++-- .../java/com/biutag/lan/flow/FlowConfig.java | 41 ++++++++++++++----- .../com/biutag/lan/flow/FlowNodeEnum.java | 10 ++++- .../flow/node/ThreeLeaderApprovalFlow.java | 19 +++++++++ .../biutag/lan/flow/node/ThreeVerifyFlow.java | 17 +++++++- .../com/biutag/lan/service/IDeptService.java | 2 + .../com/biutag/lan/service/MailService.java | 5 ++- .../lan/service/impl/DeptServiceImpl.java | 6 +++ .../service/impl/PoliceUserServiceImpl.java | 3 +- .../src/main/resources/mapper/WorkMapper.xml | 10 +++-- 17 files changed, 131 insertions(+), 36 deletions(-) create mode 100644 mailbox-lan/src/main/java/com/biutag/lan/enums/CompleteMethod.java create mode 100644 mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java index e1491e0..ea52d5b 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java @@ -79,9 +79,16 @@ public class DeptController { @NotPower @GetMapping("/three/list") - @ApiOperation(value="三级部门列表") + @ApiOperation(value="三级部门列表(通过二级单位人员查询)") public AjaxResult> listThree() { return AjaxResult.success(iDeptService.listThree()); } + @NotPower + @GetMapping("/three/listByThree") + @ApiOperation(value="三级部门列表(通过三级单位人员查询)") + public AjaxResult> listByThree() { + return AjaxResult.success(iDeptService.listByThree()); + } + } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/PoliceUserController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/PoliceUserController.java index ad83375..e94ab09 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/PoliceUserController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/PoliceUserController.java @@ -43,7 +43,7 @@ public class PoliceUserController { return AjaxResult.success(list); } - + @NotPower @GetMapping("/all") @ApiOperation(value="管理员列表") public AjaxResult> all(@Validated PoliceUserSearchValidate searchValidate) { diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/FlowNode.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/FlowNode.java index 6c80d48..d0bf59f 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/FlowNode.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/FlowNode.java @@ -15,10 +15,7 @@ public class FlowNode { * 流程节点名称(下一节点开始之前) */ private String beforeName; - /** - * 流程节点名称(完成之后) - */ - private String afterName; + /** * 完整名称 */ 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 f2e445c..5b574f3 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 @@ -182,9 +182,9 @@ public class Mail { /** * 核办-是否属实 */ - private String verifyIsTrue; + private Boolean verifyIsTrue; /** - * 核办-被举报对象(String) + * 核办-被举报对象(json) */ private String verifyReportedPolices; /** @@ -216,4 +216,9 @@ public class Mail { */ private String verifyAttachments; + /** + * 办结方式 + */ + private String completeMethod; + } 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 3d6355b..044ee79 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 @@ -77,6 +77,11 @@ public class Work { */ private String contactPhone; + /** + * 信件-联系人身份证号码 + */ + private String contactIdCard; + /** * 信件-内容 */ 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 8d3efa7..c7504bc 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 @@ -69,14 +69,9 @@ public class WorkVo { private String flowBeforeName; /** - * 当前流程限时(秒) + * 当前流程剩余多少时间(秒) */ - private Long flowLimitedTime; - - /** - * 流程限时最后操作时间 - */ - private LocalDateTime flowLimitedLastHandlerTime; + private Long flowLimitedRemainingTime; /** * 办理单位ID(三级单位) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/enums/CompleteMethod.java b/mailbox-lan/src/main/java/com/biutag/lan/enums/CompleteMethod.java new file mode 100644 index 0000000..e3f0d38 --- /dev/null +++ b/mailbox-lan/src/main/java/com/biutag/lan/enums/CompleteMethod.java @@ -0,0 +1,7 @@ +package com.biutag.lan.enums; + +public enum CompleteMethod { + + offline, + online; +} diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/Action.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/Action.java index 20884ba..955a9d5 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/Action.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/Action.java @@ -15,10 +15,12 @@ public class Action { private String btnType; - private Boolean plain; + private Boolean btnPlain; - public static Action of(String key, String btnLabel, String btnType, Boolean plain) { - return new Action().setKey(key).setBtnLabel(btnLabel).setBtnType(btnType).setPlain(plain); + private String flowAfterName; + + public static Action of(String key, String btnLabel, String btnType, Boolean btnPlain, String flowAfterName) { + return new Action().setKey(key).setBtnLabel(btnLabel).setBtnType(btnType).setBtnPlain(btnPlain).setFlowAfterName(flowAfterName); } } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowConfig.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowConfig.java index 0018a69..c270e21 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowConfig.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowConfig.java @@ -19,13 +19,25 @@ public class FlowConfig { ThreeSigneFlow threeSigneFlow, ThreeContactWriterFlow threeContactWriterFlow, ThreeInterviewWriterFlow threeInterviewWriterFlow, - ThreeVerifyFlow threeVerifyFlow) { + ThreeVerifyFlow threeVerifyFlow, + ThreeLeaderApprovalFlow threeLeaderApprovalFlow) { List flowNodes = flowNodeService.list(); // 所有操作 - Action signAction = Action.of("sign", "确认签收", "primary", false); - Action distributeAction = Action.of("distribute", "下发信件", "primary", false); - Action returnAction = Action.of("return", "信件退回", "danger", true); - Action saveAction = Action.of("sign", "确认保存", "primary", false); + Action signAction = Action.of("sign", "确认签收", "primary", false, "已签收"); + Action distributeAction = Action.of("distribute", "下发信件", "primary", false, "已下发"); + Action returnAction = Action.of("return", "信件退回", "danger", true, ""); + Action contactSaveAction = Action.of("save", "确认保存", "primary", false, "联系群众"); + Action interviewSaveAction = Action.of("save", "确认保存", "primary", false, "接访群众"); + + Action saveAction = Action.of("save", "确认保存", "primary", false, ""); + + Action secondSaveAction = Action.of("save", "确认保存", "primary", true, ""); + + // 申请办结 + Action applicationCompletedAction = Action.of("applicationCompleted", "申请办结", "primary", false, ""); + + Action applyExtensionAction = Action.of("applyExtension", "申请延期", "primary", true, ""); + // 市局专班签收 firstSignFlow .setFlowNode(getFlowNode(flowNodes, FlowNodeEnum.FIRST_SIGN)) @@ -62,23 +74,30 @@ public class FlowConfig { // 三级机构联系群众 threeContactWriterFlow .setFlowNode(getFlowNode(flowNodes, FlowNodeEnum.CONTACT_WRITER)) - .setActions(Arrays.asList(returnAction, saveAction)) - .next(saveAction.getKey(), threeInterviewWriterFlow) + .setActions(Arrays.asList(returnAction, contactSaveAction)) + .next(contactSaveAction.getKey(), threeInterviewWriterFlow) .next(returnAction.getKey(), secondDistributeFlow); // 三级机构接访群众 threeInterviewWriterFlow .setFlowNode(getFlowNode(flowNodes, FlowNodeEnum.INTERVIEW_WRITER)) - .setActions(Arrays.asList(returnAction, saveAction)) - .next(saveAction.getKey(), threeVerifyFlow) + .setActions(Arrays.asList(returnAction, interviewSaveAction)) + .next(interviewSaveAction.getKey(), threeVerifyFlow) .next(returnAction.getKey(), secondDistributeFlow); // 三级机构核查办理 threeVerifyFlow .setFlowNode(getFlowNode(flowNodes, FlowNodeEnum.VERIFY)) - .setActions(Arrays.asList(returnAction, saveAction)) + .setActions(Arrays.asList(applyExtensionAction, secondSaveAction, applicationCompletedAction)) + .next(applyExtensionAction.getKey(), null) + // 线上申请办结 + .next("online", threeLeaderApprovalFlow) + // 线下申请办结 + .next("offline", threeLeaderApprovalFlow); - .next(returnAction.getKey(), secondDistributeFlow); + // 三级机构核查办理 + threeLeaderApprovalFlow + .setFlowNode(getFlowNode(flowNodes, FlowNodeEnum.THREE_LEADER_APPROVAL)); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNodeEnum.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNodeEnum.java index 2909f58..021029f 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNodeEnum.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNodeEnum.java @@ -14,7 +14,15 @@ public enum FlowNodeEnum { THREE_SIGN("three_sign", "三级机构专班签收"), CONTACT_WRITER("contact_writer", "联系群众"), INTERVIEW_WRITER("interview_writer", "接访群众"), - VERIFY("verify", "核查办理"); + VERIFY("verify", "核查办理"), + THREE_LEADER_APPROVAL("three_leader_approval", "三级机构领导审批"), + SECOND_APPROVAL("second_approval", "二级机构专班审批"), + SECOND_DEPUTY_APPROVAL("second_deputy_approval", "二级机构分管领导审批"), + SECOND_LEADER_APPROVAL("second_leader_approval", "二级机构正职领导审批"), + SECOND_REPORTING("second_reporting", "二级机构专班呈报"), + FIRST_APPROVAL("first_approval", "市局专班审批"), + COUNTERSIGN("countersign", "部门会签"), + COMPLETION("completion", "认定办结"); private String key; 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 new file mode 100644 index 0000000..4760962 --- /dev/null +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java @@ -0,0 +1,19 @@ +package com.biutag.lan.flow.node; + +import com.alibaba.fastjson2.JSONObject; +import com.biutag.lan.flow.Flow; +import com.biutag.lan.service.MailService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +@RequiredArgsConstructor +@Component +public class ThreeLeaderApprovalFlow extends Flow { + + private final MailService mailService; + + @Override + public Flow next(String nextActionKey, String mailId, JSONObject data) { + return null; + } +} 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 ab44798..a6d981c 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 @@ -1,7 +1,9 @@ package com.biutag.lan.flow.node; import com.alibaba.fastjson2.JSONObject; +import com.biutag.exception.BusinessException; import com.biutag.lan.domain.Mail; +import com.biutag.lan.enums.CompleteMethod; import com.biutag.lan.flow.Flow; import com.biutag.lan.service.MailService; import lombok.RequiredArgsConstructor; @@ -16,15 +18,28 @@ public class ThreeVerifyFlow extends Flow { private final MailService mailService; @Override public Flow next(String nextActionKey, String mailId, JSONObject data) { + if (!CompleteMethod.online.name().equals(nextActionKey)) { + throw new BusinessException("功能开发中..."); + } LocalDateTime now = LocalDateTime.now(); // 更新信件 Mail mail = mailService.getById(mailId); Flow nextNode = next.get(nextActionKey); mail.setUpdateTime(now) - .setContactPoliceEmpNo(data.getString("contactDuration")) + .setVerifyDetails(data.getString("verifyDetails")) + .setVerifyIsTrue(data.getBoolean("verifyIsTrue")) + .setVerifyReportedPolices(data.getString("verifyReportedPolices")) + .setVerifyProblem(data.getString("verifyProblem")) + .setVerifyNeedAccountability(data.getBoolean("verifyNeedAccountability")) + .setVerifyPunish(data.getString("verifyPunish")) + .setVerifyIsResolved(data.getBoolean("verifyIsResolved")) + .setVerifyFeedback(data.getString("verifyFeedback")) + .setVerifyFollowupPolice(data.getString("verifyFollowupPolice")) + .setVerifyAttachments(data.getString("verifyAttachments")) .setFlowKey(nextNode.getFlowNode().getKey()) .setFlowBeforeName(nextNode.getFlowNode().getBeforeName()); mailService.updateById(mail); return nextNode; } + } 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 b627d59..2012a93 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 @@ -35,6 +35,8 @@ public interface IDeptService { List listThree(); + List listByThree(); + /** * 部门详情 * 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 6dee875..b8e7cf4 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 @@ -13,6 +13,7 @@ import com.biutag.lan.domain.MailSource; import com.biutag.lan.domain.bo.FlowAction; import com.biutag.lan.domain.vo.MailFlowDetail; import com.biutag.lan.domain.vo.MailVo; +import com.biutag.lan.flow.Action; import com.biutag.lan.flow.Flow; import com.biutag.lan.flow.node.FirstSignFlow; import com.biutag.lan.mapper.MailMapper; @@ -90,11 +91,13 @@ public class MailService extends ServiceImpl { LocalDateTime lastHandlerTime = mailFlowService.getMailLastHandlerTime(flowAction.getMailId()); long consumingTime = DateUtil.between(Date.from(lastHandlerTime.atZone(ZoneId.systemDefault()).toInstant()), new Date(), DateUnit.SECOND); + + Action action = flow.getActions().stream().filter(item -> item.getKey().equals(flowAction.getNextActionKey())).findFirst().get(); // 保存当前流程数据 MailFlow mailFlow = new MailFlow() .setMailId(flowAction.getMailId()) .setFlowKey(flow.getFlowNode().getKey()) - .setFlowAfterName(flow.getFlowNode().getAfterName()) + .setFlowAfterName(action.getFlowAfterName()) .setHandlerName(AdminThreadLocal.getPoliceName()) .setHandlerEmpNo(AdminThreadLocal.getEmpNo()) .setHandlerDeptId(AdminThreadLocal.getDeptId()) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java index dfbc640..b7d2fef 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java @@ -122,6 +122,12 @@ class DeptServiceImpl implements IDeptService { return deptMapper.selectList(new LambdaQueryWrapper().eq(Dept::getPid, AdminThreadLocal.getDeptId()).eq(Dept::getLevel, 3)); } + @Override + public List listByThree() { + DeptVo deptVo = detail(AdminThreadLocal.getDeptId()); + return deptMapper.selectList(new LambdaQueryWrapper().eq(Dept::getPid, deptVo.getPid()).eq(Dept::getLevel, 3)); + } + /** * 部门详情 * 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 8f122d2..57215c9 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 @@ -188,7 +188,8 @@ public class PoliceUserServiceImpl implements IPoliceUserService { "like:empNo@emp_no:str", "like:name:str", "like:mobile:str", - "like:idCode@id_code:str" + "like:idCode@id_code:str", + "like:deptId@dept_ids:str" }); return policeUserMapper.selectList(mpjQueryWrapper); } diff --git a/mailbox-lan/src/main/resources/mapper/WorkMapper.xml b/mailbox-lan/src/main/resources/mapper/WorkMapper.xml index dab62a5..67355b1 100644 --- a/mailbox-lan/src/main/resources/mapper/WorkMapper.xml +++ b/mailbox-lan/src/main/resources/mapper/WorkMapper.xml @@ -5,9 +5,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"