diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/domain/PatrolResultRef.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/domain/PatrolResultRef.java
index 1f81682..4c69913 100644
--- a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/domain/PatrolResultRef.java
+++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/domain/PatrolResultRef.java
@@ -11,6 +11,7 @@ public class PatrolResultRef {
private String lineId;
private String deviceId;
private String devType;
+ private String deviceSource;
private String time;
private String value;
private String algType;
@@ -42,12 +43,12 @@ public class PatrolResultRef {
if (this == object) return true;
if (object == null || getClass() != object.getClass()) return false;
PatrolResultRef that = (PatrolResultRef) object;
- return Objects.equals(lineId, that.lineId) && Objects.equals(deviceId, that.deviceId) && Objects.equals(devType, that.devType) && Objects.equals(time, that.time) && Objects.equals(value, that.value) && Objects.equals(algType, that.algType) && Objects.equals(algName, that.algName) && Objects.equals(threshold, that.threshold) && Objects.equals(filePath, that.filePath) && Objects.equals(description, that.description) && Objects.equals(pointStatus, that.pointStatus) && Objects.equals(valueUnit, that.valueUnit) && Objects.equals(resultContent, that.resultContent);
+ return Objects.equals(lineId, that.lineId) && Objects.equals(deviceId, that.deviceId) && Objects.equals(devType, that.devType) && Objects.equals(deviceSource, deviceSource) && Objects.equals(time, that.time) && Objects.equals(value, that.value) && Objects.equals(algType, that.algType) && Objects.equals(algName, that.algName) && Objects.equals(threshold, that.threshold) && Objects.equals(filePath, that.filePath) && Objects.equals(description, that.description) && Objects.equals(pointStatus, that.pointStatus) && Objects.equals(valueUnit, that.valueUnit) && Objects.equals(resultContent, that.resultContent);
}
@Override
public int hashCode() {
- return Objects.hash(lineId, deviceId, devType, time, value, algType, algName, threshold, filePath, description, pointStatus, valueUnit, resultContent);
+ return Objects.hash(lineId, deviceId, devType, deviceSource, time, value, algType, algName, threshold, filePath, description, pointStatus, valueUnit, resultContent);
}
@Override
@@ -56,6 +57,7 @@ public class PatrolResultRef {
"lineId='" + lineId + '\'' +
", deviceId='" + deviceId + '\'' +
", devType='" + devType + '\'' +
+ ", deviceSource='" + deviceSource + '\'' +
", time='" + time + '\'' +
", value='" + value + '\'' +
", algType='" + algType + '\'' +
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 c9c72d5..3b5888a 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
@@ -819,6 +819,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService {
}
}
patrolResultRef.setDevType(value.stream().map(item -> item.getDevType() != null ? item.getDevType() : "").distinct().findFirst().orElse(""));
+ patrolResultRef.setDeviceSource(value.stream().map(item -> item.getDeviceSource() != null ? item.getDeviceSource() : "").distinct().findFirst().orElse(""));
patrolResultRef.setTime(value.stream().map(item -> item.getTime() != null ? item.getTime() : "").distinct().findFirst().orElse(""));
patrolResultRef.setThreshold(value.stream().map(item -> item.getThreshold() != null ? item.getThreshold() : "").distinct().findFirst().orElse(""));
patrolResultRef.setAlgName(value.get(0).getAlgName());
@@ -860,7 +861,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService {
reportData.setEqName(basePointAreaInfo.getMainName());
reportData.setParts(basePointAreaInfo.getDeviceName());
reportData.setPointName(basePointAreaInfo.getPatrolPointName());
- reportData.setDataSources("0".equals(devType) ? messageUtils.get("无人机") : "1".equals(devType) ? messageUtils.get("机器人") : messageUtils.get("高清视频"));
+ reportData.setDataSources(patrolResultRef.getDeviceSource());
reportData.setAcquisitionTime(DateUtils.parse(DateUtils.yyyyMMddHHmmss2, patrolResultRef.getTime()));
if ("1".equals(patrolResultRef.getResultType()) && validAlgTypes.contains(patrolResultRef.getAlgType())) {
reportData.setInspectionResults(patrolResultRef.getValue());
@@ -1366,6 +1367,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService {
}
}
patrolResultRef.setDevType(value.stream().map(item -> item.getDevType() != null ? item.getDevType() : "").distinct().findFirst().orElse(""));
+ patrolResultRef.setDeviceSource(value.stream().map(item -> item.getDeviceSource() != null ? item.getDeviceSource() : "").distinct().findFirst().orElse(""));
patrolResultRef.setTime(value.stream().map(item -> item.getTime() != null ? item.getTime() : "").distinct().findFirst().orElse(""));
patrolResultRef.setThreshold(value.stream().map(item -> item.getThreshold() != null ? item.getThreshold() : "").distinct().findFirst().orElse(""));
patrolResultRef.setAlgName(value.get(0).getAlgName());
@@ -1401,7 +1403,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService {
reportData.setEqName(basePointAreaInfo.getMainName());
reportData.setParts(basePointAreaInfo.getDeviceName());
reportData.setPointName(basePointAreaInfo.getPatrolPointName());
- reportData.setDataSources("0".equals(devType) ? messageUtils.get("无人机") : "1".equals(devType) ? messageUtils.get("机器人") : messageUtils.get("高清视频"));
+ reportData.setDataSources(patrolResultRef.getDeviceSource());
reportData.setAcquisitionTime(DateUtils.parse(DateUtils.yyyyMMddHHmmss2, patrolResultRef.getTime()));
if ("1".equals(patrolResultRef.getResultType()) && validAlgTypes.contains(patrolResultRef.getAlgType())) {
reportData.setInspectionResults(patrolResultRef.getValue());
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 a1e9b98..72ff175 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
@@ -600,6 +600,7 @@
+
@@ -637,6 +638,7 @@
select a.line_id,
a.device_id,
c.dev_type,
+ COALESCE(e.device_source, h.device_source) as device_source,
a.time,
b.res_value value,
a.threshold,
@@ -655,6 +657,10 @@
left join patrol_task_info c on a.task_code = c.task_major_id
and a.device_id = c.device_id
and a.patrol_device_code = c.dev_no
+ left join patrol_preset_pos f1 on c.device_id = f1.patrol_point_id and c.dev_type not in ('0', '1')
+ left join basedata_eqpbook_channel e on f1.channel_id = e.channel_id and c.dev_type not in ('0', '1')
+ left join basedata_patrolpoint_preset f2 on c.device_id = f2.patrol_point_id and c.dev_type in ('0', '1')
+ left join basedata_eqpbook h on f2.eqp_book_id = h.eqp_book_id and c.dev_type in ('0', '1')
where
a.main_id in