diff --git a/mailbox-common/src/main/java/com/biutag/entity/system/PoliceUser.java b/mailbox-common/src/main/java/com/biutag/entity/system/PoliceUser.java index 57aec82..54da55f 100644 --- a/mailbox-common/src/main/java/com/biutag/entity/system/PoliceUser.java +++ b/mailbox-common/src/main/java/com/biutag/entity/system/PoliceUser.java @@ -2,6 +2,8 @@ package com.biutag.entity.system; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.biutag.constants.AppConstants; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -95,9 +97,9 @@ public class PoliceUser implements Serializable { @Schema(name = "是否禁用: [0=否, 1=是]") private Integer isDisable; + @TableLogic(value = AppConstants.FALSE, delval = AppConstants.TRUE) @Schema(name = "是否删除: [0=否, 1=是]") - private Integer isDelete; - + private String isDelete; @Schema(name = "最后登录IP") private String lastLoginIp; diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java index 88cb6d3..8e0eaa6 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java @@ -9,6 +9,7 @@ import com.alibaba.excel.read.metadata.ReadSheet; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.aop.NotPower; +import com.biutag.constants.AppConstants; import com.biutag.core.AjaxResult; import com.biutag.core.PageResult; import com.biutag.entity.system.Dept; @@ -121,10 +122,13 @@ public class DutyController { duty.setPoliceName(item.getPoliceName()); duty.setEmpNo(item.getEmpNo()); duty.setMobile(item.getMobile()); - PoliceUser policeUser = policeUserMapper.selectOne(new LambdaQueryWrapper().eq(PoliceUser::getEmpNo, item.getEmpNo())); - if (Objects.isNull(policeUser)) { + List policeUsers = policeUserMapper.selectList(new LambdaQueryWrapper() + .eq(PoliceUser::getIsDelete, AppConstants.FALSE) + .eq(PoliceUser::getEmpNo, item.getEmpNo())); + if (policeUsers.isEmpty()) { throw new RuntimeException(String.format("警号[%s]无该警员信息", item.getEmpNo())); } + PoliceUser policeUser = policeUsers.get(0); Dept dept = deptMapper.selectById(policeUser.getDataDeptId()); if (Objects.isNull(dept)) { throw new RuntimeException("未找到单位信息"); 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 074c06b..eade483 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 @@ -62,7 +62,7 @@ public class FirstApprovalFlow extends Flow { * 认定办结 */ public void approved(String mailId, JSONObject data) { - // 更新信件(信件已办结) + Mail mail = mailService.getById(mailId); // 校验 valid(mail); @@ -104,7 +104,7 @@ public class FirstApprovalFlow extends Flow { } mailService.update(updateWrapper); // 审批意见 - mailApprovalService.saveOrUpdate(mail.getId(), mail.getFlowKey(), data.getString("approvalComment"), null, now); + mailApprovalService.saveOrUpdate(mail.getId(), mail.getFlowKey(), data.getString("completionComment"), null, now); } public Flow mailReturn(String mailId, JSONObject data) { 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 cc75657..f93a29c 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 @@ -286,6 +286,8 @@ public class MailService extends ServiceImpl { mailFlow.setRemark(flowAction.getData().getString("comments")); } else if (Objects.nonNull(flowAction.getData().getString("reason"))) { mailFlow.setRemark(flowAction.getData().getString("reason")); + } else if (Objects.nonNull(flowAction.getData().getString("completionComment"))) { + mailFlow.setRemark(flowAction.getData().getString("completionComment")); } // 附件 if (Objects.nonNull(flowAction.getData().getString("attachments"))) {