|
|
|
@ -1422,7 +1422,7 @@ public class PatrolResultController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<PatrolResult> resultList = new ArrayList<>(); |
|
|
|
List<PatrolResult> algrithomPatrolResultList = new ArrayList<>(); |
|
|
|
for (PatrolResult patrolResult : patrolResultList) { |
|
|
|
logger.info(Color.CYAN + "PatrolResult: {}" + Color.END, patrolResult); |
|
|
|
datetype = ""; |
|
|
|
@ -1485,7 +1485,9 @@ public class PatrolResultController extends BaseController { |
|
|
|
List<PatrolResult> results = patrolResultService.selectPatrolResultList(patrolResultParam); |
|
|
|
if (!results.isEmpty()) { |
|
|
|
//patrol_result记录已存在则更新 |
|
|
|
logger.info("SEND_MESSAGE UPDATE dateType: {}, patrol_result: {}", datetype, patrolResult); |
|
|
|
PatrolResult patrolResult2 = results.get(0); |
|
|
|
patrolResult2.setCoordinatePixel(patrolResult.getCoordinatePixel()); |
|
|
|
if (StringUtils.isNotEmpty(patrolResult.getFilePath())) { |
|
|
|
patrolResult2.setFilePath(patrolResult.getFilePath()); |
|
|
|
} |
|
|
|
@ -1547,12 +1549,14 @@ public class PatrolResultController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
logger.info("SEND_MESSAGE UPDATE patrolResult2: {}", patrolResult2); |
|
|
|
i = patrolResultService.updatePatrolResult(patrolResult2); |
|
|
|
// if (!"2".equals(Jqtype)) { |
|
|
|
resultList.add(patrolResult2); |
|
|
|
algrithomPatrolResultList.add(patrolResult2); |
|
|
|
// } |
|
|
|
} else { |
|
|
|
//patrol_result记录不存在则新增 |
|
|
|
logger.info("SEND_MESSAGE NEW dateType: {}, patrol_result: {}", datetype, patrolResult); |
|
|
|
patrolResult.setMainId(mainID + ""); |
|
|
|
Map<String, String> stringStringMap = patrolResultService.selectThresholdByPointId(patrolResult.getDeviceId()); |
|
|
|
if (stringStringMap != null && StringUtils.isNotEmpty(stringStringMap.get("alarm_threshold"))) { |
|
|
|
@ -1605,18 +1609,19 @@ public class PatrolResultController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
logger.info("SEND_MESSAGE NEW patrolResult: {}", patrolResult); |
|
|
|
i = patrolResultService.insertPatrolResult(patrolResult);// |
|
|
|
resultStatistics.compare(patrolResult); |
|
|
|
// if (!"2".equals(Jqtype)) { |
|
|
|
resultList.add(patrolResult); |
|
|
|
algrithomPatrolResultList.add(patrolResult); |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!resultList.isEmpty()) { |
|
|
|
if (!algrithomPatrolResultList.isEmpty()) { |
|
|
|
logger.info(Color.CYAN + "+++++++ callAlgorithm start +++++++" + Color.END); |
|
|
|
if (jsonRootBean.getTotalNumber() == null && !tasks.isEmpty()) { |
|
|
|
logger.info("jsonRootBean.getTotalNumber() == null"); |
|
|
|
logger.info("jsonRootBean.getTotalNumber not NULL: {}", algrithomPatrolResultList); |
|
|
|
String taskId = String.valueOf(tasks.get(0).getTaskId()); |
|
|
|
logger.info("taskId: {}", taskId); |
|
|
|
List<String> algList = patrolResultMapper.selectAlgList(taskId); |
|
|
|
@ -1630,7 +1635,7 @@ public class PatrolResultController extends BaseController { |
|
|
|
jsonRootBean.setTotalNumber(algCount); |
|
|
|
} |
|
|
|
if (!tasks.isEmpty()) { |
|
|
|
callRemoteAlgorithm(jsonRootBean.getTotalNumber(), resultList); |
|
|
|
callRemoteAlgorithm(jsonRootBean.getTotalNumber(), algrithomPatrolResultList); |
|
|
|
} else { |
|
|
|
logger.info(Color.CYAN + "callAlgorithm task: {} not exist!!!" + Color.END, code); |
|
|
|
} |
|
|
|
|