diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java index e1091cb..b976062 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/task/controller/PatrolTaskController.java @@ -269,6 +269,7 @@ public class PatrolTaskController extends BaseController { if (!brightDatas.isEmpty()) { item.setBrightDesc(brightDatas.get(0).getDesc()); item.setBrightResStatus(brightDatas.get(0).getResStatus()); + item.setBrightImgAnalyse(brightDatas.get(0).getImgAnalyse()); brightNewList.remove(brightDatas.get(0)); } } @@ -291,6 +292,7 @@ public class PatrolTaskController extends BaseController { if (!brightDatas.isEmpty()) { item.setBrightDesc(brightDatas.get(0).getDesc()); item.setBrightResStatus(brightDatas.get(0).getResStatus()); + item.setBrightImgAnalyse(brightDatas.get(0).getImgAnalyse()); brightNewList.remove(brightDatas.get(0)); } item.setAlgName( @@ -333,6 +335,7 @@ public class PatrolTaskController extends BaseController { } item.setBrightDesc(item.getDesc()); item.setBrightResStatus(item.getResStatus()); + item.setBrightImgAnalyse(item.getImgAnalyse()); item.setDesc(""); } newList.addAll(filterList); @@ -2452,6 +2455,7 @@ public class PatrolTaskController extends BaseController { if (!brightDatas.isEmpty()) { item.setBrightDesc(brightDatas.get(0).getDesc()); item.setBrightResStatus(brightDatas.get(0).getResStatus()); + item.setBrightImgAnalyse(brightDatas.get(0).getImgAnalyse()); brightNewList.remove(brightDatas.get(0)); } } @@ -2474,6 +2478,7 @@ public class PatrolTaskController extends BaseController { if (!brightDatas.isEmpty()) { item.setBrightDesc(brightDatas.get(0).getDesc()); item.setBrightResStatus(brightDatas.get(0).getResStatus()); + item.setBrightImgAnalyse(brightDatas.get(0).getImgAnalyse()); brightNewList.remove(brightDatas.get(0)); } item.setAlgName( @@ -2516,6 +2521,7 @@ public class PatrolTaskController extends BaseController { } item.setBrightDesc(item.getDesc()); item.setBrightResStatus(item.getResStatus()); + item.setBrightImgAnalyse(item.getImgAnalyse()); item.setDesc(""); } newList.addAll(filterList); @@ -2540,6 +2546,9 @@ public class PatrolTaskController extends BaseController { if (StringUtils.isNotEmpty(data.getImgAnalyse())) { Collections.addAll(uniqueImages, data.getImgAnalyse().split(StringUtils.COMMA)); } + if (StringUtils.isNotEmpty(data.getBrightImgAnalyse())) { + Collections.addAll(uniqueImages, data.getBrightImgAnalyse().split(StringUtils.COMMA)); + } } logger.info("图片总数: {}", uniqueImages.size()); logger.info("数据处理耗时: {} ms", (System.currentTimeMillis() - start)); @@ -2635,7 +2644,7 @@ public class PatrolTaskController extends BaseController { String[] headers = { "编号", "设备", "相机名", "系统", "点位id", "点位名称", "状态", "算法名称", "读数", "初筛图片", "初筛结果", "分析图片", "分析结果", - "缺陷类型", "描述信息" + "复核结果", "复核详情" }; Row headerRow = sheet.createRow(0); @@ -2671,8 +2680,8 @@ public class PatrolTaskController extends BaseController { // 文本信息 row.createCell(10).setCellValue(item.getFilterDesc()); // 筛选结果 row.createCell(12).setCellValue(item.getDesc()); // 分析结果 - row.createCell(13).setCellValue(item.getBrightResStatus()); // 缺陷类型 - row.createCell(14).setCellValue(item.getBrightDesc()); // 描述信息 + row.createCell(13).setCellValue(item.getBrightResStatus()); // 复核结果 +// row.createCell(14).setCellValue(item.getBrightDesc()); // 复核详情 } private void insertImages(SXSSFWorkbook workbook, Drawing drawing, Sheet sheet, @@ -2694,6 +2703,14 @@ public class PatrolTaskController extends BaseController { // 插入分析图片(第11列) insertImage(workbook, drawing, row, 11, imageData); } + + // 获取第一张光明大模型复核结果图(如果有) + String firstBrightImgAnalyse = getFirstImage(item.getBrightImgAnalyse()); + if (firstBrightImgAnalyse != null) { + byte[] imageData = imageCache.getOrDefault(firstBrightImgAnalyse, new byte[0]); + // 插入筛选图片(第14列) + insertImage(workbook, drawing, row, 14, imageData); + } } catch (Exception e) { logger.warn("图片插入失败", e); } diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java index 862ba3e..fdf522a 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/task/domain/PatrolData.java @@ -54,6 +54,11 @@ public class PatrolData implements Comparable { name = "分析图片" ) private String imgAnalyse; + + @Excel( + name = "光明大模型分析图片" + ) + private String brightImgAnalyse; @Excel( name = "分析结果" ) @@ -169,6 +174,10 @@ public class PatrolData implements Comparable { return this.imgAnalyse; } + public String getBrightImgAnalyse() { + return this.brightImgAnalyse; + } + public String getDesc() { return this.desc; } @@ -273,6 +282,9 @@ public class PatrolData implements Comparable { public void setImgAnalyse(String imgAnalyse) { this.imgAnalyse = imgAnalyse; } + public void setBrightImgAnalyse(String brightImgAnalyse) { + this.brightImgAnalyse = brightImgAnalyse; + } public void setDesc(String desc) { this.desc = desc; @@ -345,12 +357,12 @@ public class PatrolData implements Comparable { 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(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); } @Override public int hashCode() { - return Objects.hash(deviceName, channelName, deviceSource, pointName, pointId, warnStatus, algName, resValue, img, filterDesc, brightDesc, imgAnalyse, 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); } @Override @@ -368,6 +380,7 @@ public class PatrolData implements Comparable { ", filterDesc='" + filterDesc + '\'' + ", brightDesc='" + brightDesc + '\'' + ", imgAnalyse='" + imgAnalyse + '\'' + + ", brightImgAnalyse='" + brightImgAnalyse + '\'' + ", desc='" + desc + '\'' + ", lineId='" + lineId + '\'' + ", patrolTime='" + patrolTime + '\'' + 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 767ccf9..0b4adf1 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 @@ -211,7 +211,7 @@ b.description as 'desc', a.file_path as img, b.res_img_url as img, - case when b.image_normal_url_path is null then a.file_path else b.image_normal_url_path end as image_normal_url_path, + 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, a.file_type as img_type, a.data_type, b.filter,