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,