From 78059e7355b1ac02ef9853b9ee1830e63cb82488 Mon Sep 17 00:00:00 2001 From: wangguangyuan Date: Tue, 16 Sep 2025 18:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=8D=E5=85=B4=E6=8A=A5=E5=91=8A=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gateway/filter/RequestParamGlobalFilter.java | 3 ++- .../service/impl/PatrolResultServiceImpl.java | 12 +++++++----- .../resources/mapper/task/PatrolResultMapper.xml | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java b/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java index 6808f76..29859b5 100644 --- a/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java +++ b/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java @@ -30,8 +30,9 @@ public class RequestParamGlobalFilter implements GlobalFilter, Ordered { private static final List PATH_WHITE_LIST = Arrays.asList( "/patrol/task/add", "/patrol/task/save", - "patrol/resultmain/reportExport", + "/patrol/resultmain/reportExport", "/patrol/task/taskInfoExport", + "/basedata/prodevmnt/device/treeProMainDevicePatrolEquSelect", "/example/path2" ); diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/impl/PatrolResultServiceImpl.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/impl/PatrolResultServiceImpl.java index 70a159b..940e9d8 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/impl/PatrolResultServiceImpl.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/impl/PatrolResultServiceImpl.java @@ -797,7 +797,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService { // 只导出缺陷 patrolResultRefs = patrolResultRefs.stream().filter((item) -> "0".equals(item.getResultType())).collect(Collectors.toList()); // 分组,按点位ID和算法类型进行分组 - Map> groupKeyListMap = patrolResultRefs.stream().collect(Collectors.groupingBy(item -> new GroupKey(item.getDeviceId(), item.getAlgType()))); + Map> groupKeyListMap = patrolResultRefs.stream().collect(Collectors.groupingBy(item -> new GroupKey(item.getDeviceId(), item.getAlgType(), item.getTaskPatrolledId()))); groupKeyListMap.forEach((key, value) -> { PatrolResultRef patrolResultRef = new PatrolResultRef(); patrolResultRef.setDeviceId(key.objectId); @@ -1345,7 +1345,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService { // 只导出缺陷 patrolResultRefs = patrolResultRefs.stream().filter((item) -> "0".equals(item.getResultType())).collect(Collectors.toList()); // 分组,按点位ID和算法类型进行分组 - Map> groupKeyListMap = patrolResultRefs.stream().collect(Collectors.groupingBy(item -> new GroupKey(item.getDeviceId(), item.getAlgType()))); + Map> groupKeyListMap = patrolResultRefs.stream().collect(Collectors.groupingBy(item -> new GroupKey(item.getDeviceId(), item.getAlgType(), item.getTaskPatrolledId()))); groupKeyListMap.forEach((key, value) -> { PatrolResultRef patrolResultRef = new PatrolResultRef(); patrolResultRef.setDeviceId(key.objectId); @@ -1471,10 +1471,12 @@ public class PatrolResultServiceImpl implements IPatrolResultService { private static class GroupKey { private final String objectId; private final String algType; + private final String taskPatrolled; - public GroupKey(String objectId, String algType) { + public GroupKey(String objectId, String algType, String taskPatrolled) { this.objectId = objectId; this.algType = algType; + this.taskPatrolled = taskPatrolled; } @Override @@ -1482,13 +1484,13 @@ public class PatrolResultServiceImpl implements IPatrolResultService { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GroupKey groupKey = (GroupKey) o; - return Objects.equals(objectId, groupKey.objectId) && Objects.equals(algType, groupKey.algType); + return Objects.equals(objectId, groupKey.objectId) && Objects.equals(algType, groupKey.algType) && Objects.equals(taskPatrolled, groupKey.taskPatrolled); } @Override public int hashCode() { - return Objects.hash(objectId, algType); + return Objects.hash(objectId, algType, taskPatrolled); } } diff --git a/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml b/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml index 72ff175..4464044 100644 --- a/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml +++ b/inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml @@ -611,6 +611,7 @@ + @@ -647,6 +648,7 @@ b.description, b.point_status, b.result_type, + b.task_patrol_id, a.value_unit, b.result_content, b.alg_type,