From 2130c169f218ef5311f496e8d2e9f900c271297f Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Tue, 26 Aug 2025 16:40:50 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/20250826.sql | 2 ++ .../books/NegativeBookController.java | 11 +++++--- .../flow/action/ApplyCompletionAction.java | 13 +++++++-- .../flow/action/SecondDistributeAction.java | 27 ++++++++++++------- .../supervision/pojo/domain/NegativeVo.java | 16 +++++++++++ .../supervision/pojo/dto/flow/VerifyData.java | 3 +++ .../supervision/pojo/entity/Negative.java | 3 +++ .../pojo/vo/DataPetition12337ExportVo.java | 2 +- .../mapper/DataPetition12337Mapper.xml | 2 +- 9 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 sql/20250826.sql diff --git a/sql/20250826.sql b/sql/20250826.sql new file mode 100644 index 0000000..4e50619 --- /dev/null +++ b/sql/20250826.sql @@ -0,0 +1,2 @@ +ALTER TABLE `negative`.`negative` + ADD COLUMN `process_result` varchar(255) NULL COMMENT '办理结果(12337)' AFTER `verified_is_leader`; \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java b/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java index 82d73fe..1899f9a 100644 --- a/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java +++ b/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java @@ -2,6 +2,7 @@ package com.biutag.supervision.controller.books; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSON; @@ -256,13 +257,15 @@ public class NegativeBookController { } // 核查时间 if (Objects.nonNull(item.getVerifyTime())) { - item.setReviewTime(item.getVerifyTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))); + item.setReviewTime(item.getVerifyTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); } // 是否核查完结 item.setVerifiedIsover(overProcessings.contains(item.getProcessingStatus()) ? "核查完结" : null); - // 是否处分处理 - List blames = negativeBlames.stream().filter(blame -> blame.getNegativeId().equals(item.getId())).toList(); - if (InspectCaseEnum.isItTure(item.getCheckStatus()) && blames.stream().anyMatch(blame -> !blame.getHandleResultName().contains("不予追责"))) { + + if (!negativeBlames.isEmpty() && NumberUtil.isInteger(negativeBlames.get(0).getBlameEmpNo())) { + item.setVerifiedPersonType("在编人员"); + } + if (!"免予处分".equals(item.getHandleResult12337()) && !"不予处分".equals(item.getHandleResult12337())) { item.setIsPunish("是"); } else { item.setIsPunish("否"); diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index 3c4c5c5..71ab243 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -90,9 +90,15 @@ public class ApplyCompletionAction implements Action { .set(Negative::getResolveStatus, verifyData.getResolveStatus()) .set(Negative::getVisitingLeaderName, verifyData.getVisitingLeaderName()) .set(Negative::getVisitingLeaderEmpNo, verifyData.getVisitingLeaderEmpNo()) - .set(Negative::getHandleResult12337, verifyData.getHandleResult12337()) - .set(Negative::getHandleResult12337Group, verifyData.getHandleResult12337Group()) + .set(Negative::getProcessResult, verifyData.getProcessResult()) .set(Negative::getVerifiedIsLeader, verifyData.getVerifiedIsLeader()); + if ("具有违纪违法情况".equals(verifyData.getProcessResult())) { + updateWrapper.set(Negative::getHandleResult12337, verifyData.getHandleResult12337()) + .set(Negative::getHandleResult12337Group, verifyData.getHandleResult12337Group()); + } else { + updateWrapper.set(Negative::getHandleResult12337, null) + .set(Negative::getHandleResult12337Group, null); + } // 属实 if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) { updateWrapper @@ -121,6 +127,9 @@ public class ApplyCompletionAction implements Action { // 涉及单位 SupDepart depart = departService.getById(verifyData.getInvolveDepartId()); if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { + if (HostLevelEnums.THREE.getValue().equals(negative.getHostLevel())) { + throw new RuntimeException("主办层级为三级机构主办,涉及单位请选择三级机构"); + } updateWrapper.set(Negative::getSecondInvolveDepartId, depart.getId()) .set(Negative::getThreeInvolveDepartId, null); } else if (DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) { diff --git a/src/main/java/com/biutag/supervision/flow/action/SecondDistributeAction.java b/src/main/java/com/biutag/supervision/flow/action/SecondDistributeAction.java index ddbb56c..609c99d 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SecondDistributeAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SecondDistributeAction.java @@ -1,8 +1,10 @@ package com.biutag.supervision.flow.action; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.biutag.supervision.constants.enums.HostLevelEnums; import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.WorkStatusEnum; import com.biutag.supervision.pojo.dto.ActionDto; @@ -34,13 +36,14 @@ public class SecondDistributeAction implements Action { @Override public void next(ActionDto actionDto) { SecondDistributeData secondDistributeData = BeanUtil.toBean(actionDto.getData(), SecondDistributeData.class); - updateNegative(actionDto.getNegativeId(), actionDto.getNextFlowKey(), secondDistributeData); + Negative negative = negativeService.getById(actionDto.getNegativeId()); + updateNegative(negative, actionDto.getNextFlowKey(), secondDistributeData); doneWork(actionDto.getWorkId()); - addWork(actionDto.getNegativeId(), RoleCodeEnum.THREE_ADMIN.getCode(), secondDistributeData.getDepartId()); + addWork(negative, RoleCodeEnum.THREE_ADMIN.getCode(), secondDistributeData.getDepartId()); } - public void updateNegative(String negativeId, String nextFlowKey, SecondDistributeData secondDistributeData) { - negativeService.update(new LambdaUpdateWrapper() + public void updateNegative(Negative negative, String nextFlowKey, SecondDistributeData secondDistributeData) { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() .set(Negative::getFlowKey, nextFlowKey) .set(Negative::getHandleThreeDepartId, secondDistributeData.getDepartId()) .set(Negative::getHandleThreeDepartName, secondDistributeData.getDepartName()) @@ -48,7 +51,13 @@ public class SecondDistributeAction implements Action { .set(Negative::getUpdTime, LocalDateTime.now()) // 当前处理对象 .set(Negative::getCurrentProcessingObject, String.format("%s专班", secondDistributeData.getDepartName())) - .eq(Negative::getId, negativeId)); + .eq(Negative::getId, negative.getId()); + if (HostLevelEnums.THREE.getValue().equals(negative.getHostLevel()) && StrUtil.isBlank(negative.getThreeInvolveDepartId())) { + updateWrapper + .set(Negative::getInvolveDepartId, secondDistributeData.getDepartId()) + .set(Negative::getThreeInvolveDepartId, secondDistributeData.getDepartId()); + } + negativeService.update(updateWrapper); } public void doneWork(Integer workId) { @@ -58,15 +67,15 @@ public class SecondDistributeAction implements Action { .eq(NegativeWork::getId, workId)); } - public void addWork(String negativeId, String roleCode, String departId) { + public void addWork(Negative negative, String roleCode, String departId) { SupDepart depart = departService.getById(departId); workService.remove(new LambdaQueryWrapper() - .eq(NegativeWork::getNegativeId, negativeId) + .eq(NegativeWork::getNegativeId, negative.getId()) .eq(NegativeWork::getRoleCode, roleCode) .eq(NegativeWork::getDepartId, departId)); - Negative negative = negativeService.getById(negativeId); + NegativeWork work = new NegativeWork() - .setNegativeId(negativeId) + .setNegativeId(negative.getId()) .setRoleCode(roleCode) .setDepartId(departId) .setDepartName(depart.getShortName()) diff --git a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java index 22bf001..d4f110d 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java @@ -215,6 +215,12 @@ public class NegativeVo { // 涉及问题金额 private Double involveMoney; + // 二级部门 + private String secondInvolveDepartId; + + // 三级部门 + private String threeInvolveDepartId; + // 化解情况 private String resolveSituation; @@ -226,6 +232,16 @@ public class NegativeVo { private String visitingLeaderEmpNo; + // 办理结果 + private String processResult; + + private String handleResult12337; + + private String handleResult12337Group; + + // 涉及人员是否属于领导班子成员 + private String verifiedIsLeader; + // 下发选择的问题类型 private List problems = new ArrayList<>(); diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java index ab8d7e1..9145757 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java @@ -81,6 +81,9 @@ public class VerifyData { private String handleResult12337Group; + // 办理结果 + private String processResult; + private String verifiedIsLeader; @Setter diff --git a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java index 35923bc..1e07a49 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java @@ -331,4 +331,7 @@ public class Negative { // 涉及人员是否属于领导班子成员 private String verifiedIsLeader; + // 办理结果 + private String processResult; + } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java b/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java index 7cd755b..a7ebeb7 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java @@ -306,7 +306,7 @@ public class DataPetition12337ExportVo implements Serializable { * 办理结果 */ @ExcelProperty("办理结果") - private String processResult; + private String processResult1; /** * 是否进行线索初核 diff --git a/src/main/resources/mapper/DataPetition12337Mapper.xml b/src/main/resources/mapper/DataPetition12337Mapper.xml index 8455d35..3292eb9 100644 --- a/src/main/resources/mapper/DataPetition12337Mapper.xml +++ b/src/main/resources/mapper/DataPetition12337Mapper.xml @@ -168,7 +168,7 @@