|
|
|
@ -1351,17 +1351,21 @@ public class PatrolResultController extends BaseController { |
|
|
|
String code; |
|
|
|
if (!patrolResultList.isEmpty()) { |
|
|
|
code = ""; |
|
|
|
|
|
|
|
String sendCode = parseObject.getString("SendCode"); |
|
|
|
for (PatrolResult arr : patrolResultList) { |
|
|
|
Map<String, String> map = resultAnalysisService.selectPointInfoById(arr.getDeviceId()); |
|
|
|
if (map == null) { |
|
|
|
Map<String, Object> maps = resultAnalysisService.selectPointInfoByCode(arr.getDeviceId()); |
|
|
|
if (maps != null && maps.get("patrol_point_id") != null) { |
|
|
|
String patrolPointId = String.valueOf(maps.get("patrol_point_id")); |
|
|
|
arr.setDeviceId(patrolPointId); |
|
|
|
} |
|
|
|
} else { |
|
|
|
arr.setDeviceId(String.valueOf(map.get("patrol_point_id"))); |
|
|
|
// Map<String, String> map = resultAnalysisService.selectPointInfoById(arr.getDeviceId()); |
|
|
|
// if (map == null) { |
|
|
|
// Map<String, Object> maps = resultAnalysisService.selectPointInfoByCode(arr.getDeviceId()); |
|
|
|
// if (maps != null && maps.get("patrol_point_id") != null) { |
|
|
|
// String patrolPointId = String.valueOf(maps.get("patrol_point_id")); |
|
|
|
// arr.setDeviceId(patrolPointId); |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// arr.setDeviceId(String.valueOf(map.get("patrol_point_id"))); |
|
|
|
// } |
|
|
|
Long patrolPointId = baseDataClient.queryPatrolPointId(sendCode + "|" + arr.getDeviceId()); |
|
|
|
if (patrolPointId != null) { |
|
|
|
arr.setDeviceId(patrolPointId.toString()); |
|
|
|
} |
|
|
|
code = arr.getTaskCode(); |
|
|
|
patrolDeviceCodeList.add(arr.getPatrolDeviceCode()); |
|
|
|
|