diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/controller/ResultAnalysisController.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/controller/ResultAnalysisController.java index 22d1602..660b994 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/controller/ResultAnalysisController.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/controller/ResultAnalysisController.java @@ -528,6 +528,8 @@ public class ResultAnalysisController extends BaseController { ResultAnalysis resultAnalysis = new ResultAnalysis(); resultAnalysis.setTaskPatrolId(patrolTaskStatus.getTaskPatrolledId()); resultAnalysis.setFilter(patrolTaskStatus.getFilter()); + resultAnalysis.setResCode("2000"); + resultAnalysis.setPointStatus("0"); resultAnalysis.setResultType("0"); // 0缺陷 startPage(); List filterList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); @@ -553,6 +555,15 @@ public class ResultAnalysisController extends BaseController { // item.setImg(item.getImgAnalyse()); //// item.setImgAnalyse(""); // } + AlgValue algValue = new AlgValue(); + if(item.getResValue() != null) { + String str = algValue.formatValue(item.getResValue()); + if ("meter".equals(item.getAlgType())) { + if (str.equals("-1")) { + item.setResValue("空值"); + } + } + } }); // logger.info("[RES ANALYZE] filterList2: {}", JSONObject.toJSONString(filterList, true)); Collections.sort(filterList); @@ -631,7 +642,8 @@ public class ResultAnalysisController extends BaseController { resultAnalysis.setTaskPatrolId(patrolTaskStatus.getTaskPatrolledId()); startPage(); resultAnalysis.setFilter(patrolTaskStatus.getFilter()); -// resultAnalysis.setResCode("2000"); + resultAnalysis.setResCode("2000"); + resultAnalysis.setPointStatus("0"); resultAnalysis.setResultType("2"); // 2异常 resultAnalysis.setPosType(patrolTaskStatus.getPosType()); List list = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); @@ -641,6 +653,15 @@ public class ResultAnalysisController extends BaseController { item.setAlgName((algInfos.stream().filter((alg) -> { return alg.getAlgSubtypeCode().equals(item.getAlgType()); }).findFirst().get()).getAlgSubtypeName()); + AlgValue algValue = new AlgValue(); + if(item.getResValue() != null) { + String str = algValue.formatValue(item.getResValue()); + if ("meter".equals(item.getAlgType())) { + if (str.equals("-1")) { + item.setResValue("空值"); + } + } + } } catch (Exception e) { logger.error("list_exception: algType: {}, exception: {}", item.getAlgType(), e.getMessage()); } diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java index ded728f..bfe74e5 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java @@ -204,9 +204,9 @@ public class PatrolTaskController extends BaseController { // 大模型数据 List newList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); logger.info("----------------[TASK] query newList {}", newList); - if (newList == null) { - return getDataTable(2, new ArrayList<>(), new ArrayList<>()); - } +// if (newList == null) { +// return getDataTable(2, new ArrayList<>(), new ArrayList<>()); +// } long t3 = System.currentTimeMillis(); for (PatrolData item : newList) { // item.setAlgName((algInfos.stream().filter((alg) -> { @@ -240,7 +240,25 @@ public class PatrolTaskController extends BaseController { } } } - + } + for (PatrolData item : filterList) { + item.setAlgName( + algInfos.stream().anyMatch((alg) -> { + return alg.getAlgSubtypeCode().equals(item.getAlgType()); + }) ? + algInfos.stream().filter((alg) -> { + return alg.getAlgSubtypeCode().equals(item.getAlgType()); + }).findFirst().get().getAlgSubtypeName() : "" + ); + AlgValue algValue = new AlgValue(); + if(item.getResValue() != null) { + String str = algValue.formatValue(item.getResValue()); + if ("meter".equals(item.getAlgType())) { + if (str.equals("-1")) { + item.setResValue("空值"); + } + } + } } newList.addAll(filterList); if (StringUtils.isNotEmpty(resultAnalysis.getAlgName())) { 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 3d8820d..419f279 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 @@ -252,10 +252,15 @@ and b.result_type = #{resultType} - and b.filter = #{filter} and b.point_status - = '0' and b.res_code='2000' + + and b.filter = #{filter} + + + and b.res_code=#{resCode} + + + and b.point_status = #{pointStatus} - and b.filter = #{filter} and b.res_code!=#{resCode} and a.device_name like concat('%', #{pointName}, '%') and d.device_name like concat('%', #{deviceName}, '%') @@ -276,9 +281,6 @@ and b.description like concat('%', #{desc}, '%') - and b.point_status like concat('%', #{pointStatus}, - '%') - ORDER BY d.device_name,a.device_name ORDER BY b.point_status