diff --git a/src/main/java/com/inspect/simulator/service/impl/AlgorithmServiceImpl.java b/src/main/java/com/inspect/simulator/service/impl/AlgorithmServiceImpl.java index 6c5a634..759171a 100644 --- a/src/main/java/com/inspect/simulator/service/impl/AlgorithmServiceImpl.java +++ b/src/main/java/com/inspect/simulator/service/impl/AlgorithmServiceImpl.java @@ -132,6 +132,7 @@ public class AlgorithmServiceImpl implements AlgorithmService { List analyseResItems = new ArrayList<>(); analyseResItems.add(analyseResItem); analyseResult.setResultList(analyseResItems); + // 红外算法且配备了红外分析地址 if (MiscUtils.checkInfraredType(typeList) && !"null".equals(infraredPath)) { if (testMode) { try { @@ -162,6 +163,7 @@ public class AlgorithmServiceImpl implements AlgorithmService { log.error("BIG_MODEL_INFRARED continue to call infrared EXCEPTION: {}", e.getMessage()); } } + // 表计算法且配备了表计分析地址 } else if (MiscUtils.checkMeterType(typeList) && !"null".equals(meterPath)) { if (testMode) { try { @@ -184,6 +186,7 @@ public class AlgorithmServiceImpl implements AlgorithmService { log.error("BIG_MODEL_METER continue to call meter EXCEPTION: {}", e.getMessage()); } } + // 其他情况 } else { try { log.info(Color.MAGENTA + "BIG_MODEL_COMMON filterPicAnalyse: nacos file.infraredPath not config, feedback to caller, analyseResult={}" + Color.END, new Gson().toJson(analyseResult)); @@ -274,10 +277,17 @@ public class AlgorithmServiceImpl implements AlgorithmService { // analyseResPoint.setValue("1");//失败 // } // analyseResPoint.setConf(String.format("%.2f", (double) infraredInfo.getFrameMax())); - analyseResPoint.setValue(String.format("%.2f", (double) infraredInfo.getFrameMax())); analyseResPoint.setResImageUrl(infraredInfo.getOutPath()); analyseResPoint.setType(typeListStr); - analyseResPoint.setCode("2000"); + if (infraredInfo.getFrameMax() == -1 && infraredInfo.getFrameMin() == -1) { + analyseResPoint.setCode("2002"); + analyseResPoint.setValue("--"); + analyseResPoint.setDesc("分析失败"); + } else { + analyseResPoint.setCode("2000"); + analyseResPoint.setDesc("正常"); + analyseResPoint.setValue(String.format("%.2f", (double) infraredInfo.getFrameMax())); + } if (StringUtils.isNotBlank(analyseResPoint.getImageNormalUrlPath())) { String imageNormalUrlPath = resultAnalysisMapper.selectImg(patrolPointId); if (StringUtils.isBlank(imageNormalUrlPath)) { diff --git a/src/main/java/com/inspect/simulator/service/impl/HikVisionServiceImpl.java b/src/main/java/com/inspect/simulator/service/impl/HikVisionServiceImpl.java index cfdea38..43cc7af 100644 --- a/src/main/java/com/inspect/simulator/service/impl/HikVisionServiceImpl.java +++ b/src/main/java/com/inspect/simulator/service/impl/HikVisionServiceImpl.java @@ -1542,7 +1542,7 @@ public class HikVisionServiceImpl implements HikVisionService { //画框标注 String s = ImageOverlays(infraPictureInfo, infraredInfo); infraredInfo.setOutPath(s); - log.info("计算过后最高温{}",infraredInfo.getFrameMax()); + log.info("计算过后最高温{}",infraredInfo.getFrameMax(), infraredInfo.getFrameMin()); log.info("计算过后最高温 ->是否等于0.0f{}",infraredInfo.getFrameMax() == 0.0f); //温度未取到 if(StringUtils.isNull(maxTemperature)){