From cc9e9559da91853fafc783ccee3b5cb36dadd579 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Tue, 16 Dec 2025 18:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E8=AE=A1=E6=95=B4=E6=94=B9=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=A0=B8=E5=AF=B9=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supervision/mapper/NegativeMapper.java | 41 ++++++++++++++----- .../service/NegativeQueryService.java | 17 ++++---- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java index 1d38503..157abfd 100644 --- a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java @@ -202,21 +202,40 @@ public interface NegativeMapper extends BaseMapper { SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); +// @Select("SELECT " + +// " sd.short_name as label, " + +// "COUNT(DISTINCT ng.id) AS denominator, " + +// "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + +// "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " + +// "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS value " + +// "FROM negative ng " + +// "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + +// "WHERE problemSourcesCode IN (27,28,29,30) " + +// "AND sd.statistics_group_id=#{groupId} " + +// "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + +// " GROUP BY sd.short_name " + +// " ORDER BY value desc ") +// List getAuditNegativeVo(Date beginTime, Date endTime,String groupId); + + @Select("SELECT " + - " sd.short_name as label, " + - "COUNT(DISTINCT ng.id) AS denominator, " + - "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + - "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " + - "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS value " + + " sd.short_name AS label, " + + " COUNT(DISTINCT ng.id) AS denominator, " + + " COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) AS numerator, " + + " COUNT( DISTINCT IF(COALESCE(ng.isRectifyCode, 0) != 1, ng.id, NULL)) AS processingNumber, " + + " IFNULL( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 0 ), 0 ) AS value " + "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + - "WHERE problemSourcesCode IN (27,28,29,30) " + - "AND sd.statistics_group_id=#{groupId} " + - "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + - " GROUP BY sd.short_name " + - " ORDER BY value desc ") + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " + + "LEFT JOIN sup_depart sd2 ON ng.three_involve_depart_id = sd2.id " + + "WHERE ng.problemSourcesCode IN (27, 28, 29, 30) " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + + "AND sd.statistics_group_id = #{groupId} " + + "GROUP BY second_involve_depart_id, sd.short_name " + + "ORDER BY VALUE DESC;") List getAuditNegativeVo(Date beginTime, Date endTime,String groupId); + + @Select("SELECT " + "sd.short_name AS `name`, " + "sd.id AS departId, " + diff --git a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java index 3d8eb48..c4c39d5 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java @@ -178,14 +178,15 @@ public class NegativeQueryService { queryWrapper.orderByDesc(Negative::getUpdTime); Page page = negativeService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper); long l = System.currentTimeMillis(); - List list = page.getRecords().stream().map(item -> { - NegativeQueryVo vo = new NegativeQueryVo(); - BeanUtils.copyProperties(item, vo); - if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) { - vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())); - } - return vo; - }).toList(); +// List list = page.getRecords().stream().map(item -> { +// NegativeQueryVo vo = new NegativeQueryVo(); +// BeanUtils.copyProperties(item, vo); +// if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) { +// vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())); +// } +// return vo; +// }).toList(); + List list = new ArrayList<>(); System.out.printf("耗时:%sms", System.currentTimeMillis() - l); return new Page().setRecords(list).setTotal(page.getTotal()); }