Browse Source

任务详情列表,导出新增点位id字段

master
WangGuangYuan 5 months ago
parent
commit
a553833fab
3 changed files with 23 additions and 11 deletions
  1. +8
    -7
      inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java
  2. +13
    -4
      inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java
  3. +2
    -0
      inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml

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

@ -2545,7 +2545,7 @@ public class PatrolTaskController extends BaseController {
private void createHeaderRow(Sheet sheet) {
String[] headers = {
"编号", "设备", "相机名", "系统", "点位名称", "状态",
"编号", "设备", "相机名", "系统", "点位id", "点位名称", "状态",
"算法名称", "读数", "初筛图片", "初筛结果", "分析图片", "分析结果"
};
@ -2569,6 +2569,7 @@ public class PatrolTaskController extends BaseController {
row.createCell(col++).setCellValue(item.getDeviceName());
row.createCell(col++).setCellValue(item.getChannelName());
row.createCell(col++).setCellValue(item.getDeviceSource());
row.createCell(col++).setCellValue(item.getPointId());
row.createCell(col++).setCellValue(item.getPointName());
// 状态
String status = "1".equals(item.getPointStatus()) ? MessageUtils.get("正常") :
@ -2579,8 +2580,8 @@ public class PatrolTaskController extends BaseController {
row.createCell(col++).setCellValue(item.getAlgName());
row.createCell(col++).setCellValue(item.getResValue());
// 文本信息
row.createCell(9).setCellValue(item.getFilterDesc()); // 筛选结果
row.createCell(11).setCellValue(item.getDesc()); // 分析结果
row.createCell(10).setCellValue(item.getFilterDesc()); // 筛选结果
row.createCell(12).setCellValue(item.getDesc()); // 分析结果
}
private void insertImages(SXSSFWorkbook workbook, Drawing<?> drawing, Sheet sheet,
@ -2591,16 +2592,16 @@ public class PatrolTaskController extends BaseController {
String firstImage = getFirstImage(item.getImg());
if (firstImage != null) {
byte[] imageData = imageCache.getOrDefault(firstImage, new byte[0]);
// 插入筛选图片8
insertImage(workbook, drawing, row, 8, imageData);
// 插入筛选图片9
insertImage(workbook, drawing, row, 9, imageData);
}
// 获取第一张分析图片如果有
String firstImgAnalyse = getFirstImage(item.getImgAnalyse());
if (firstImgAnalyse != null) {
byte[] imageData = imageCache.getOrDefault(firstImgAnalyse, new byte[0]);
// 插入分析图片第10
insertImage(workbook, drawing, row, 10, imageData);
// 插入分析图片第11
insertImage(workbook, drawing, row, 11, imageData);
}
} catch (Exception e) {
logger.warn("图片插入失败", e);


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

@ -21,6 +21,10 @@ public class PatrolData implements Comparable<PatrolData> {
name = "点位名称"
)
private String pointName;
@Excel(
name = "点位ID"
)
private String pointId;
@Excel(
name = "状态"
)
@ -127,7 +131,9 @@ public class PatrolData implements Comparable<PatrolData> {
public String getPointName() {
return this.pointName;
}
public String getPointId() {
return pointId;
}
public String getWarnStatus() {
return this.warnStatus;
}
@ -223,7 +229,9 @@ public class PatrolData implements Comparable<PatrolData> {
public void setPointName(String pointName) {
this.pointName = pointName;
}
public void setPointId(String pointId) {
this.pointId = pointId;
}
public void setWarnStatus(String warnStatus) {
this.warnStatus = warnStatus;
}
@ -316,12 +324,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(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(imgAnalyse, that.imgAnalyse) && 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(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(imgAnalyse, that.imgAnalyse) && 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(areaName, that.areaName) && Objects.equals(algType, that.algType) && Objects.equals(objectId, that.objectId) && Objects.equals(imageNormalUrlPath, that.imageNormalUrlPath) && Objects.equals(suggestion, that.suggestion);
}
@Override
public int hashCode() {
return Objects.hash(deviceName, channelName, deviceSource, pointName, warnStatus, algName, resValue, img, filterDesc, imgAnalyse, desc, lineId, patrolTime, pointStatus, imgType, dataType, filter, requestId, resStatus, areaName, algType, objectId, imageNormalUrlPath, suggestion);
return Objects.hash(deviceName, channelName, deviceSource, pointName, pointId, warnStatus, algName, resValue, img, filterDesc, imgAnalyse, desc, lineId, patrolTime, pointStatus, imgType, dataType, filter, requestId, resStatus, areaName, algType, objectId, imageNormalUrlPath, suggestion);
}
@Override
@ -331,6 +339,7 @@ public class PatrolData implements Comparable<PatrolData> {
", channelName='" + channelName + '\'' +
", deviceSource='" + deviceSource + '\'' +
", pointName='" + pointName + '\'' +
", pointId='" + pointId + '\'' +
", warnStatus='" + warnStatus + '\'' +
", algName='" + algName + '\'' +
", resValue='" + resValue + '\'' +


+ 2
- 0
inspect-main/inspect-main-task/src/main/resources/mapper/task/PatrolResultMapper.xml View File

@ -149,6 +149,7 @@
<resultMap type="PatrolData" id="PatrolDataResult">
<result property="lineId" column="line_id"/>
<result property="pointName" column="point_name"/>
<result property="pointId" column="point_id"/>
<result property="patrolTime" column="patrol_time"/>
<result property="pointStatus" column="point_status"/>
<result property="warnStatus" column="warn_status"/>
@ -203,6 +204,7 @@
select
b.line_id ,
a.device_name as point_name,
a.device_id as point_id,
a.create_time as patrol_time,
b.point_status ,
b.result_type as warn_status,


Loading…
Cancel
Save