Browse Source

优化完善

厅长信箱
wxc 2 months ago
parent
commit
2a27d0e840
  1. 6
      mailbox-common/src/main/java/com/biutag/entity/system/PoliceUser.java
  2. 8
      mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java
  3. 4
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java
  4. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

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

8
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<PoliceUser>().eq(PoliceUser::getEmpNo, item.getEmpNo()));
if (Objects.isNull(policeUser)) {
List<PoliceUser> policeUsers = policeUserMapper.selectList(new LambdaQueryWrapper<PoliceUser>()
.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("未找到单位信息");

4
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) {

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

@ -286,6 +286,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
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"))) {

Loading…
Cancel
Save