Browse Source

fit: 信件查询新增是否一把手接访查询条件

fit: 历史信件跳转信件查询
fit: 市局、二级机构下发意见新增附件
fix: 修复信件详情页面无接访情况
fix: 修复签收总超时统计错误
master
wxc 1 year ago
parent
commit
59b8534a14
  1. 1
      mailbox-common/src/main/java/com/biutag/util/IOUtil.java
  2. 7
      mailbox-lan/pom.xml
  3. 9
      mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java
  4. 9
      mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java
  5. 3
      mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailQuery.java
  6. 3
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailQueryParam.java
  7. 6
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
  8. 2
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java
  9. 1
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java
  10. 1
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java
  11. 11
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java
  12. 3
      mailbox-lan/src/main/java/com/biutag/lan/service/MailQueryService.java
  13. 11
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  14. 3
      mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java
  15. 9
      mailbox-lan/src/main/resources/mapper/WorkMapper.xml
  16. 8
      mailbox-lan/src/test/java/com/biutag/lan/ExcelImportTests.java

1
mailbox-common/src/main/java/com/biutag/util/IOUtil.java

@ -15,4 +15,5 @@ public class IOUtil {
byte[] decodedBytes = Base64.getDecoder().decode(base64); byte[] decodedBytes = Base64.getDecoder().decode(base64);
return new ByteArrayInputStream(decodedBytes); return new ByteArrayInputStream(decodedBytes);
} }
} }

7
mailbox-lan/pom.xml

@ -17,6 +17,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
@ -55,6 +56,12 @@
<artifactId>VastbaseG100_jdbc</artifactId> <artifactId>VastbaseG100_jdbc</artifactId>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>org.postgresql</groupId>-->
<!-- <artifactId>postgresql</artifactId>-->
<!-- <version>42.7.4</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>

9
mailbox-lan/src/main/java/com/biutag/lan/controller/system/DutyController.java

@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@RestController @RestController
@RequestMapping("api/duty") @RequestMapping("api/duty")
@ -67,4 +68,12 @@ public class DutyController {
return AjaxResult.success(); return AjaxResult.success();
} }
@Log(title = "值班导入")
@PostMapping("/import")
@Operation(summary = "值班导入")
public AjaxResult<Void> dataImport(@RequestPart("file") MultipartFile file) {
return AjaxResult.success();
}
} }

9
mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java

@ -173,7 +173,7 @@ public class Mail {
*/ */
private String interviewType; private String interviewType;
/** /**
* 是否是否接访一把手 * 是否接访一把手
*/ */
private Boolean interviewIsLeader; private Boolean interviewIsLeader;
/** /**
@ -388,11 +388,18 @@ public class Mail {
*/ */
private String firstDistributeComment; private String firstDistributeComment;
/**
* 市局下发意见
*/
private String firstDistributeFiles;
/** /**
* 二级机构下发意见 * 二级机构下发意见
*/ */
private String secondDistributeComment; private String secondDistributeComment;
private String secondDistributeFiles;
/** /**
* 二级机构下发时间 * 二级机构下发时间
*/ */

3
mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailQuery.java

@ -98,6 +98,9 @@ public class MailQuery {
// 是否申请延期 // 是否申请延期
private Boolean extensionFlag; private Boolean extensionFlag;
// 是否一把手接访
private Boolean interviewIsLeader;
/** /**
* 办结时间 * 办结时间
*/ */

3
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailQueryParam.java

@ -39,4 +39,7 @@ public class MailQueryParam {
private String flowKey; private String flowKey;
private String mailTimeout; private String mailTimeout;
// 是否一把手接访
private Boolean interviewIsLeader;
} }

6
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java

@ -384,11 +384,17 @@ public class MailVo {
*/ */
private String firstDistributeComment; private String firstDistributeComment;
// 市局下发意见 附件
private String firstDistributeFiles;
/** /**
* 二级机构下发意见 * 二级机构下发意见
*/ */
private String secondDistributeComment; private String secondDistributeComment;
// 二级机构下发 附件
private String secondDistributeFiles;
/** /**
* 合并信件的数量 * 合并信件的数量
*/ */

2
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java

@ -62,6 +62,8 @@ public class QueryMailVo {
@ExcelProperty("信件分类") @ExcelProperty("信件分类")
private String mailCategory = "未分类"; private String mailCategory = "未分类";
private String mailFirstCategory;
/** /**
* 信件状态 * 信件状态
*/ */

1
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java

@ -89,6 +89,7 @@ public class FirstDistributeFlow extends Flow {
.setFirstDistributeInfo(firstDistributeInfo.toJSONString()) .setFirstDistributeInfo(firstDistributeInfo.toJSONString())
.setFirstDistributeTime(now) .setFirstDistributeTime(now)
.setMainDeptLevel(mainDeptLevel) .setMainDeptLevel(mainDeptLevel)
.setFirstDistributeFiles(data.getString("files"))
.setFirstDistributeComment(data.getString("comments")); .setFirstDistributeComment(data.getString("comments"));
mailService.updateById(mail); mailService.updateById(mail);

1
mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondDistributeFlow.java

@ -122,6 +122,7 @@ public class SecondDistributeFlow extends Flow {
.setFlowLimitedLastHandlerTime(now) .setFlowLimitedLastHandlerTime(now)
.setThreeDeptId(mainDeptId) .setThreeDeptId(mainDeptId)
.setThreeDeptName(deptVo.getName()) .setThreeDeptName(deptVo.getName())
.setSecondDistributeFiles(data.getString("files"))
.setSecondDistributeComment(data.getString("comments")) .setSecondDistributeComment(data.getString("comments"))
.setSecondDistributeTime(now); .setSecondDistributeTime(now);
} }

11
mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeSignFlow.java

@ -1,5 +1,6 @@
package com.biutag.lan.flow.node; package com.biutag.lan.flow.node;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.biutag.enums.RoleEnum; import com.biutag.enums.RoleEnum;
import com.biutag.exception.BusinessException; import com.biutag.exception.BusinessException;
@ -110,13 +111,13 @@ public class ThreeSignFlow extends Flow {
// 主责单位 // 主责单位
if (work.getMainDeptFlag()) { if (work.getMainDeptFlag()) {
MailMark mailMark = mailMarkService.getById(mailId); MailMark mailMark = mailMarkService.getById(mailId);
long seconds = Duration.between(mail.getFlowLimitedLastHandlerTime(), now).getSeconds() - 600;
// 签收超过10分钟则签收超时
mailMark.setSignTimeout(seconds > 0)
.setSignTimeoutDuration(seconds);
if (Objects.nonNull(mail.getSecondDistributeTime())) { if (Objects.nonNull(mail.getSecondDistributeTime())) {
long duration = Duration.between(mail.getSecondDistributeTime(), now).getSeconds() - 300; long duration = Duration.between(mail.getSecondDistributeTime(), now).getSeconds() - 600;
mailMark.setThreeTimeoutDuration(duration < 0? 0 : duration); mailMark.setThreeTimeoutDuration(duration < 0? 0 : duration);
long signTimeout = mailMark.getThreeTimeoutDuration() + NumberUtil.nullToZero(mailMark.getSecondSignTimeoutDuration());
// 签收超过10分钟则签收超时
mailMark.setSignTimeout(signTimeout > 0)
.setSignTimeoutDuration(signTimeout > 0 ? signTimeout : 0);
} }
mailMarkService.updateById(mailMark); mailMarkService.updateById(mailMark);
} }

3
mailbox-lan/src/main/java/com/biutag/lan/service/MailQueryService.java

@ -203,7 +203,8 @@ public class MailQueryService {
.eq(Objects.nonNull(queryParam.getVerifyNeedAccountability()), "m.verify_need_accountability", queryParam.getVerifyNeedAccountability()) .eq(Objects.nonNull(queryParam.getVerifyNeedAccountability()), "m.verify_need_accountability", queryParam.getVerifyNeedAccountability())
.eq(Objects.nonNull(queryParam.getExtensionFlag()), "m.extension_flag", queryParam.getExtensionFlag()) .eq(Objects.nonNull(queryParam.getExtensionFlag()), "m.extension_flag", queryParam.getExtensionFlag())
.eq(StrUtil.isNotBlank(queryParam.getMailState()), "m.mail_state", queryParam.getMailState()) .eq(StrUtil.isNotBlank(queryParam.getMailState()), "m.mail_state", queryParam.getMailState())
.eq(StrUtil.isNotBlank(queryParam.getFlowKey()), "m.flow_key", queryParam.getFlowKey()); .eq(StrUtil.isNotBlank(queryParam.getFlowKey()), "m.flow_key", queryParam.getFlowKey())
.eq(Objects.nonNull(queryParam.getInterviewIsLeader()), "m.interview_is_leader", queryParam.getInterviewIsLeader());
// 信件标签 // 信件标签
if (!queryParam.getMailLabel().isEmpty()) { if (!queryParam.getMailLabel().isEmpty()) {
String sql = queryParam.getMailLabel().stream() String sql = queryParam.getMailLabel().stream()

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

@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.constants.AppConstants; import com.biutag.constants.AppConstants;
import com.biutag.entity.setting.DictData; import com.biutag.entity.setting.DictData;
import com.biutag.entity.system.Dept; import com.biutag.entity.system.Dept;
import com.biutag.entity.system.PoliceDepart;
import com.biutag.enums.DetermineType; import com.biutag.enums.DetermineType;
import com.biutag.enums.MailState; import com.biutag.enums.MailState;
import com.biutag.enums.RoleEnum; import com.biutag.enums.RoleEnum;
@ -30,6 +31,8 @@ import com.biutag.lan.mapper.MailMapper;
import com.biutag.lan.mapper.WorkMapper; import com.biutag.lan.mapper.WorkMapper;
import com.biutag.lan.domain.validate.commons.MailIdValidate; import com.biutag.lan.domain.validate.commons.MailIdValidate;
import com.biutag.mapper.MailNlpMapper; import com.biutag.mapper.MailNlpMapper;
import com.biutag.mapper.system.DeptMapper;
import com.biutag.mapper.system.PoliceDepartMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -63,6 +66,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
private final IDeptService deptService; private final IDeptService deptService;
private final DeptMapper deptMapper;
private final MailReturnService mailReturnService; private final MailReturnService mailReturnService;
private final MailExtensionApprovalService mailExtensionApprovalService; private final MailExtensionApprovalService mailExtensionApprovalService;
@ -100,6 +105,12 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
} }
Mail mail = getByMailSource(mailSource); Mail mail = getByMailSource(mailSource);
if (Objects.nonNull(mail.getSecondDeptId())) {
mail.setSecondDeptName(deptMapper.selectById(mail.getSecondDeptId()).getName());
}
if (Objects.nonNull(mail.getThreeDeptId())) {
mail.setThreeDeptName(deptMapper.selectById(mail.getThreeDeptId()).getName());
}
Flow flow = getFlow(mailSource.getSignFlag(), mail.getFlowKey()); Flow flow = getFlow(mailSource.getSignFlag(), mail.getFlowKey());
List<MailFlow> flows = mailFlowService.list(mailId) List<MailFlow> flows = mailFlowService.list(mailId)

3
mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java

@ -406,7 +406,8 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
.eq(StrUtil.isNotBlank(mailQuery.getVerifyIsTrue()), "m.verify_is_true", mailQuery.getVerifyIsTrue()) .eq(StrUtil.isNotBlank(mailQuery.getVerifyIsTrue()), "m.verify_is_true", mailQuery.getVerifyIsTrue())
.eq(Objects.nonNull(mailQuery.getVerifyNeedAccountability()), "m.verify_need_accountability", mailQuery.getVerifyNeedAccountability()) .eq(Objects.nonNull(mailQuery.getVerifyNeedAccountability()), "m.verify_need_accountability", mailQuery.getVerifyNeedAccountability())
.eq(Objects.nonNull(mailQuery.getSimpleFlowFlag()), "m.simple_flow_flag", mailQuery.getSimpleFlowFlag()) .eq(Objects.nonNull(mailQuery.getSimpleFlowFlag()), "m.simple_flow_flag", mailQuery.getSimpleFlowFlag())
.eq(Objects.nonNull(mailQuery.getExtensionFlag()), "m.extension_flag", mailQuery.getExtensionFlag()); .eq(Objects.nonNull(mailQuery.getExtensionFlag()), "m.extension_flag", mailQuery.getExtensionFlag())
.eq(Objects.nonNull(mailQuery.getInterviewIsLeader()), "m.interview_is_leader", mailQuery.getInterviewIsLeader());
if (StrUtil.isNotBlank(mailQuery.getQueryByContent())) { if (StrUtil.isNotBlank(mailQuery.getQueryByContent())) {
queryWrapper.and(query -> { queryWrapper.and(query -> {
query.like("m.content", mailQuery.getQueryByContent()) query.like("m.content", mailQuery.getQueryByContent())

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

@ -48,11 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<choose> <choose>
<when test="countMails != null"> <when test="countMails != null">
m.contact_name,m.contact_phone,m.contact_id_card,m.contact_sex,m.content,m.source,m.mail_time,m.id,m.mail_state, m.contact_name,m.contact_phone,m.contact_id_card,m.contact_sex,m.content,m.source,m.mail_time,m.id,m.mail_state,
m.mail_category ,m.mail_level,m.three_dept_id,m.three_dept_name, m.second_dept_name, m.flow_key,m.flow_before_name,m.mail_labels,m.flow_name,m.current_operator, m.mail_category ,m.mail_first_category ,m.mail_level,m.three_dept_id,m.three_dept_name, m.second_dept_name, m.flow_key,m.flow_before_name,
m.mail_labels,m.flow_name,m.current_operator,
m.flow_limited_last_handler_time,m.second_dept_id,m.mail_first_category,m.mail_second_category,m.mail_three_category, m.flow_limited_last_handler_time,m.second_dept_id,m.mail_first_category,m.mail_second_category,m.mail_three_category,
f.limited_time,m.flow_limited_last_handler_time,m.extension_flag, f.limited_time,m.flow_limited_last_handler_time,m.extension_flag,
m.extension_days, m.extension_days, max_w.create_time AS create_time
max_w.create_time AS create_time
from mail m from mail m
</when> </when>
<otherwise> <otherwise>
@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
COALESCE(a.contact_id_card, ms.contact_id_card) AS contact_id_card,COALESCE(a.contact_sex, ms.contact_sex) AS contact_sex, COALESCE(a.contact_id_card, ms.contact_id_card) AS contact_id_card,COALESCE(a.contact_sex, ms.contact_sex) AS contact_sex,
COALESCE(a.content, ms.content) AS content,COALESCE(a.source, ms.source) AS source, COALESCE(a.content, ms.content) AS content,COALESCE(a.source, ms.source) AS source,
COALESCE(a.mail_time, ms.mail_time) AS mail_time,COALESCE(a.id, ms.id) AS id, COALESCE(a.mail_time, ms.mail_time) AS mail_time,COALESCE(a.id, ms.id) AS id,
a.mail_state,a.mail_category,a.mail_level,a.three_dept_id,a.three_dept_name, a.second_dept_name, a.flow_key,a.flow_before_name, a.mail_state,a.mail_category, a.mail_level,a.three_dept_id,a.three_dept_name, a.second_dept_name, a.flow_key,a.flow_before_name,
a.mail_labels,a.flow_name,a.current_operator,a.flow_limited_last_handler_time,a.second_dept_id,a.mail_first_category, a.mail_labels,a.flow_name,a.current_operator,a.flow_limited_last_handler_time,a.second_dept_id,a.mail_first_category,
a.mail_second_category,a.mail_three_category,a.flow_limited_last_handler_time,a.extension_flag, a.mail_second_category,a.mail_three_category,a.flow_limited_last_handler_time,a.extension_flag,
a.extension_days, a.extension_days,
@ -74,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.verify_is_true, a.verify_is_true,
a.verify_need_accountability, a.verify_need_accountability,
a.simple_flow_flag, a.simple_flow_flag,
a.interview_is_leader,
ms.state ms.state
FROM FROM
mail_source ms mail_source ms

8
mailbox-lan/src/test/java/com/biutag/lan/ExcelImportTests.java

@ -0,0 +1,8 @@
package com.biutag.lan;
public class ExcelImportTests {
public void readR() {
}
}
Loading…
Cancel
Save