From 2d13ed97b94e1f3cc5d6fa7b9a5a056718ea9f85 Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Wed, 13 Nov 2024 14:49:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=B5=8B=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biutag/supervision/config/InterceptorConfig.java | 1 + .../sensitivePerception/ScoreController.java | 5 +++-- .../biutag/supervision/pojo/entity/DepartScore.java | 3 ++- .../biutag/supervision/pojo/entity/PoliceScore.java | 3 ++- src/main/resources/mapper/ProfileDepartMapper.xml | 11 ++++------- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java index 37ee69d..32a62c9 100644 --- a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java +++ b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java @@ -34,6 +34,7 @@ public class InterceptorConfig implements WebMvcConfigurer { .excludePathPatterns("/login") .excludePathPatterns("/auth/self") .excludePathPatterns("/file/stream/**", "/templates/**") + .excludePathPatterns("/score/police", "/score/depart") .excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**")); registry.addInterceptor(new ApiInterceptor()) diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java index 0bd5ef2..be5fde3 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java @@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; @@ -44,7 +45,7 @@ public class ScoreController { List result = negativeScoreService.calculatePoliceScore(beginTime, endTime, item.getIdCode()); PoliceScore score = new PoliceScore(); score.setIdCode(item.getIdCode()); - score.setScore((Double) result.get(0)); + score.setScore((BigDecimal) result.get(0)); score.setExpression((String) result.get(1)); score.setBeginTime(beginTime); score.setEndTime(endTime); @@ -64,7 +65,7 @@ public class ScoreController { List result = negativeScoreService.calculateDepartScore(beginTime, endTime, item.getId()); DepartScore score = new DepartScore(); score.setDepartId(item.getId()); - score.setScore((Double) result.get(0)); + score.setScore((BigDecimal) result.get(0)); score.setExpression((String) result.get(1)); score.setBeginTime(beginTime); score.setEndTime(endTime); diff --git a/src/main/java/com/biutag/supervision/pojo/entity/DepartScore.java b/src/main/java/com/biutag/supervision/pojo/entity/DepartScore.java index ea4e503..b96f1b4 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/DepartScore.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/DepartScore.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import lombok.Getter; import lombok.Setter; +import java.math.BigDecimal; import java.util.Date; @Setter @@ -17,7 +18,7 @@ public class DepartScore { // @TableField("score") - private Double score; + private BigDecimal score; // @TableField("expression") diff --git a/src/main/java/com/biutag/supervision/pojo/entity/PoliceScore.java b/src/main/java/com/biutag/supervision/pojo/entity/PoliceScore.java index f425bd1..44af249 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/PoliceScore.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/PoliceScore.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import lombok.Getter; import lombok.Setter; +import java.math.BigDecimal; import java.util.Date; @Setter @@ -17,7 +18,7 @@ public class PoliceScore { // @TableField("score") - private Double score; + private BigDecimal score; // @TableField("expression") diff --git a/src/main/resources/mapper/ProfileDepartMapper.xml b/src/main/resources/mapper/ProfileDepartMapper.xml index d73ef2f..ec93598 100644 --- a/src/main/resources/mapper/ProfileDepartMapper.xml +++ b/src/main/resources/mapper/ProfileDepartMapper.xml @@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT d.*, - count( DISTINCT n.id_code ) verify_police_size, - count( n.id ) verify_size, + count( DISTINCT nb.blameIdCode ) verify_police_size, + count( n.negative_id ) verify_size, dc.score FROM ( @@ -24,13 +24,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN sup_depart_police_size p ON p.depart_id = d.id WHERE d.LEVEL = 3 - and d.statistics_group_id = #{departGroupId} + + and d.statistics_group_id = #{departGroupId} + + ) d LEFT JOIN negative_score_depart n ON d.depart_id = n.depart_id + LEFT JOIN negative_blame nb ON n.negative_id = nb.blameId left join depart_score dc on d.depart_id = dc.depart_id WHERE n.depart_id is not null - AND n.discoveryTime BETWEEN #{beginTime} AND #{endTime} + AND n.discovery_time BETWEEN #{beginTime} AND #{endTime} AND d.short_name like concat('%', #{departName}, '%') diff --git a/src/main/resources/mapper/ProfilePoliceMapper.xml b/src/main/resources/mapper/ProfilePoliceMapper.xml index de3b114..a13a5cd 100644 --- a/src/main/resources/mapper/ProfilePoliceMapper.xml +++ b/src/main/resources/mapper/ProfilePoliceMapper.xml @@ -25,7 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE n.id_code is not null AND n.discovery_time BETWEEN #{beginTime} AND #{endTime} - AND d.statistics_group_id = #{departGroupId} + + AND d.statistics_group_id = #{departGroupId} + AND pc.score > 0 AND p.name like concat('%', #{name}, '%') From 371c5cabe1a8d83c74f0d7fde79a17c1031f85f8 Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Wed, 13 Nov 2024 16:16:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=AC=E7=BA=A7?= =?UTF-8?q?=E5=8A=9E=E7=90=86=E5=AF=BC=E8=87=B4=E7=9A=84=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supervision/flow/action/ApplyCompletionAction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 60f8b11..6cf3fb7 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -49,7 +49,7 @@ public class ApplyCompletionAction implements Action { //validator.validate(verifyData); // 新增审批数据 Negative negative = negativeService.getById(actionDto.getNegativeId()); - updateNegative(actionDto.getNegativeId(), actionDto.getNextFlowKey(), verifyData, negative); + updateNegative(actionDto.getNegativeId(), verifyData, negative); doneWork(actionDto.getWorkId()); addWork(actionDto.getNegativeId(), actionDto.getWorkId(), // 是否是本级办理 @@ -57,11 +57,11 @@ public class ApplyCompletionAction implements Action { negative); } - public void updateNegative(String negativeId, String nextFlowKey, VerifyData verifyData, Negative negative) { + public void updateNegative(String negativeId, VerifyData verifyData, Negative negative) { LocalDateTime now = LocalDateTime.now(); LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() .eq(Negative::getId, negativeId) - .set(Negative::getFlowKey, nextFlowKey) + .set(Negative::getFlowKey, negative.getIsSecondHandle() ? FlowNodeEnum.FIRST_APPROVE.getKey() : FlowNodeEnum.SECOND_APPROVE.getKey()) .set(Negative::getUpdTime, now) .set(Negative::getProcessingStatus, ProcessingStatusEnum.approval.name()) .set(Negative::getCheckStatus, verifyData.getCheckStatus())