Browse Source

绍兴站样本图片修改

master
wangguangyuan 3 months ago
parent
commit
8f245bccbd
4 changed files with 24 additions and 4 deletions
  1. +1
    -0
      inspect-job/src/main/java/com/inspect/job/task/JobMainTask.java
  2. +7
    -1
      inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java
  3. +13
    -2
      inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java
  4. +3
    -1
      inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml

+ 1
- 0
inspect-job/src/main/java/com/inspect/job/task/JobMainTask.java View File

@ -2073,6 +2073,7 @@ public class JobMainTask {
if (keywords.length == 3) {
String taskCode = keywords[1];
if (isTaskSlotEmpty(taskCode)) {
log.info(Color.YELLOW + "[JOB] TASK_CODE: {}" + Color.END, taskCode);
// long currentTime = System.currentTimeMillis();
// long currentDays = TimeUnit.MILLISECONDS.toDays(currentTime);
// long currentMinutes = TimeUnit.MILLISECONDS.toMinutes(currentTime);


+ 7
- 1
inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java View File

@ -262,6 +262,9 @@ public class PatrolTaskController extends BaseController {
if (!filterDatas.isEmpty()) {
item.setImg((filterDatas.get(0)).getImgAnalyse());
item.setFilterDesc((filterDatas.get(0)).getDesc());
if (StringUtils.isEmpty(item.getImageNormalUrlPath())) {
item.setImageNormalUrlPath((filterDatas.get(0)).getImageNormalUrlPath());
}
// filterList.remove(filterDatas.get(0));
filterList.removeAll(filterDatas);
}
@ -2468,6 +2471,9 @@ public class PatrolTaskController extends BaseController {
if (!filterDatas.isEmpty()) {
item.setImg((filterDatas.get(0)).getImgAnalyse());
item.setFilterDesc((filterDatas.get(0)).getDesc());
if (StringUtils.isEmpty(item.getImageNormalUrlPath())) {
item.setImageNormalUrlPath((filterDatas.get(0)).getImageNormalUrlPath());
}
// filterList.remove(filterDatas.get(0));
filterList.removeAll(filterDatas);
}
@ -2674,7 +2680,7 @@ public class PatrolTaskController extends BaseController {
});
return output.toByteArray();
} catch (Exception e) {
logger.warn("图片下载压缩失败: {}", imagePath, e);
logger.warn("图片下载压缩失败: {}", imagePath);
return new byte[0];
}
}


+ 13
- 2
inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java View File

@ -77,6 +77,8 @@ public class PatrolData implements Comparable<PatrolData> {
private String algType;
private String objectId;
private String imageNormalUrlPath;
private String filePath;
private String suggestion;
@ -233,6 +235,10 @@ public class PatrolData implements Comparable<PatrolData> {
return this.imageNormalUrlPath;
}
public String getFilePath() {
return this.filePath;
}
public String getSuggestion() {
return this.suggestion;
}
@ -341,6 +347,10 @@ public class PatrolData implements Comparable<PatrolData> {
this.imageNormalUrlPath = imageNormalUrlPath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public void setSuggestion(String suggestion) {
this.suggestion = suggestion;
}
@ -357,12 +367,12 @@ public class PatrolData implements Comparable<PatrolData> {
if (this == object) return true;
if (object == null || getClass() != object.getClass()) return false;
PatrolData that = (PatrolData) object;
return Objects.equals(deviceName, that.deviceName) && Objects.equals(channelName, that.channelName) && Objects.equals(deviceSource, that.deviceSource) && Objects.equals(pointName, that.pointName) && Objects.equals(pointId, that.pointId) && Objects.equals(warnStatus, that.warnStatus) && Objects.equals(algName, that.algName) && Objects.equals(resValue, that.resValue) && Objects.equals(img, that.img) && Objects.equals(filterDesc, that.filterDesc) && Objects.equals(brightDesc, that.brightDesc) && Objects.equals(imgAnalyse, that.imgAnalyse) && Objects.equals(brightImgAnalyse, that.brightImgAnalyse) && Objects.equals(desc, that.desc) && Objects.equals(lineId, that.lineId) && Objects.equals(patrolTime, that.patrolTime) && Objects.equals(pointStatus, that.pointStatus) && Objects.equals(imgType, that.imgType) && Objects.equals(dataType, that.dataType) && Objects.equals(filter, that.filter) && Objects.equals(requestId, that.requestId) && Objects.equals(resStatus, that.resStatus) && Objects.equals(brightResStatus, that.brightResStatus) && Objects.equals(areaName, that.areaName) && Objects.equals(algType, that.algType) && Objects.equals(objectId, that.objectId) && Objects.equals(imageNormalUrlPath, that.imageNormalUrlPath) && Objects.equals(suggestion, that.suggestion);
return Objects.equals(deviceName, that.deviceName) && Objects.equals(channelName, that.channelName) && Objects.equals(deviceSource, that.deviceSource) && Objects.equals(pointName, that.pointName) && Objects.equals(pointId, that.pointId) && Objects.equals(warnStatus, that.warnStatus) && Objects.equals(algName, that.algName) && Objects.equals(resValue, that.resValue) && Objects.equals(img, that.img) && Objects.equals(filterDesc, that.filterDesc) && Objects.equals(brightDesc, that.brightDesc) && Objects.equals(imgAnalyse, that.imgAnalyse) && Objects.equals(brightImgAnalyse, that.brightImgAnalyse) && Objects.equals(desc, that.desc) && Objects.equals(lineId, that.lineId) && Objects.equals(patrolTime, that.patrolTime) && Objects.equals(pointStatus, that.pointStatus) && Objects.equals(imgType, that.imgType) && Objects.equals(dataType, that.dataType) && Objects.equals(filter, that.filter) && Objects.equals(requestId, that.requestId) && Objects.equals(resStatus, that.resStatus) && Objects.equals(brightResStatus, that.brightResStatus) && Objects.equals(areaName, that.areaName) && Objects.equals(algType, that.algType) && Objects.equals(objectId, that.objectId) && Objects.equals(imageNormalUrlPath, that.imageNormalUrlPath) && Objects.equals(suggestion, that.suggestion) && Objects.equals(filePath, that.filePath);
}
@Override
public int hashCode() {
return Objects.hash(deviceName, channelName, deviceSource, pointName, pointId, warnStatus, algName, resValue, img, filterDesc, brightDesc, imgAnalyse, brightImgAnalyse, desc, lineId, patrolTime, pointStatus, imgType, dataType, filter, requestId, resStatus, brightResStatus, areaName, algType, objectId, imageNormalUrlPath, suggestion);
return Objects.hash(deviceName, channelName, deviceSource, pointName, pointId, warnStatus, algName, resValue, img, filterDesc, brightDesc, imgAnalyse, brightImgAnalyse, desc, lineId, patrolTime, pointStatus, imgType, dataType, filter, requestId, resStatus, brightResStatus, areaName, algType, objectId, imageNormalUrlPath, suggestion, filePath);
}
@Override
@ -395,6 +405,7 @@ public class PatrolData implements Comparable<PatrolData> {
", algType='" + algType + '\'' +
", objectId='" + objectId + '\'' +
", imageNormalUrlPath='" + imageNormalUrlPath + '\'' +
", filePath='" + filePath + '\'' +
", suggestion='" + suggestion + '\'' +
'}';
}


+ 3
- 1
inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml View File

@ -182,6 +182,7 @@
<result property="deviceSource" column="device_source"/>
<result property="channelName" column="channel_name"/>
<result property="imageNormalUrlPath" column="image_normal_url_path"/>
<result property="filePath" column="file_path"/>
</resultMap>
<select id="selectPatrolDataResultByTaskCode" parameterType="PatrolResult" resultMap="PatrolDataResult">
@ -225,7 +226,8 @@
<if test="filter == null or filter ==''">
case when b.filter = 0 then a.file_path else b.res_img_url end as img,
</if>
case when b.image_normal_url_path is null or b.image_normal_url_path = '' then a.file_path else b.image_normal_url_path end as image_normal_url_path,
b.image_normal_url_path as image_normal_url_path,
a.file_path as file_path,
a.file_type as img_type,
a.data_type,
b.filter,


Loading…
Cancel
Save