Browse Source

局长信箱(内网端) 信件签收 240203

dev_ycq
wxc 2 years ago
parent
commit
43bac1af09
  1. 9
      mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java
  2. 2
      mailbox-lan/src/main/java/com/biutag/lan/controller/system/PoliceUserController.java
  3. 5
      mailbox-lan/src/main/java/com/biutag/lan/domain/FlowNode.java
  4. 9
      mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java
  5. 5
      mailbox-lan/src/main/java/com/biutag/lan/domain/Work.java
  6. 9
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java
  7. 7
      mailbox-lan/src/main/java/com/biutag/lan/enums/CompleteMethod.java
  8. 8
      mailbox-lan/src/main/java/com/biutag/lan/flow/Action.java
  9. 41
      mailbox-lan/src/main/java/com/biutag/lan/flow/FlowConfig.java
  10. 10
      mailbox-lan/src/main/java/com/biutag/lan/flow/FlowNodeEnum.java
  11. 19
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeLeaderApprovalFlow.java
  12. 17
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java
  13. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/IDeptService.java
  14. 5
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  15. 6
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java
  16. 3
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java
  17. 10
      mailbox-lan/src/main/resources/mapper/WorkMapper.xml

9
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<List<Dept>> listThree() {
return AjaxResult.success(iDeptService.listThree());
}
@NotPower
@GetMapping("/three/listByThree")
@ApiOperation(value="三级部门列表(通过三级单位人员查询)")
public AjaxResult<List<Dept>> listByThree() {
return AjaxResult.success(iDeptService.listByThree());
}
}

2
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<List<PoliceUser>> all(@Validated PoliceUserSearchValidate searchValidate) {

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

@ -15,10 +15,7 @@ public class FlowNode {
* 流程节点名称下一节点开始之前
*/
private String beforeName;
/**
* 流程节点名称完成之后
*/
private String afterName;
/**
* 完整名称
*/

9
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;
}

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

@ -77,6 +77,11 @@ public class Work {
*/
private String contactPhone;
/**
* 信件-联系人身份证号码
*/
private String contactIdCard;
/**
* 信件-内容
*/

9
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三级单位

7
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;
}

8
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);
}
}

41
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<FlowNode> 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));
}

10
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;

19
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;
}
}

17
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;
}
}

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

@ -35,6 +35,8 @@ public interface IDeptService {
List<Dept> listThree();
List<Dept> listByThree();
/**
* 部门详情
*

5
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<MailMapper, Mail> {
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())

6
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<Dept>().eq(Dept::getPid, AdminThreadLocal.getDeptId()).eq(Dept::getLevel, 3));
}
@Override
public List<Dept> listByThree() {
DeptVo deptVo = detail(AdminThreadLocal.getDeptId());
return deptMapper.selectList(new LambdaQueryWrapper<Dept>().eq(Dept::getPid, deptVo.getPid()).eq(Dept::getLevel, 3));
}
/**
* 部门详情
*

3
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);
}

10
mailbox-lan/src/main/resources/mapper/WorkMapper.xml

@ -5,9 +5,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.biutag.lan.mapper.WorkMapper">
<select id="selectPageTodo" resultType="com.biutag.lan.domain.vo.WorkVo">
select w.id, w.contact_name, w.contact_phone, w.content, w.source, w.mail_time, w.mail_id,
m.mail_category, m.three_dept_id, m.three_dept_name, m.flow_key, m.flow_before_name, m.flow_limited_last_handler_time, f.limited_time flow_limited_time
from work w left join mail m on w.mail_id = m.id left join flow_node f on m.flow_key = f.key
select w.id, w.contact_name, w.contact_phone, w.contact_id_card, w.content, w.source, w.mail_time, w.mail_id,
m.mail_state, m.mail_category, m.mail_level, m.three_dept_id, m.three_dept_name, m.flow_key, m.flow_before_name,
<!-- 当前流程剩余多少时间(秒) -->
f.limited_time - ROUND(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) flow_limited_remaining_time
from work w
left join mail m on w.mail_id = m.id
left join flow_node f on m.flow_key = f.key
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save