|
|
|
@ -232,6 +232,9 @@ public class PatrolTaskController extends BaseController { |
|
|
|
long t2 = System.currentTimeMillis(); |
|
|
|
// 大模型数据 |
|
|
|
List<PatrolData> newList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); |
|
|
|
// 光明大模型数据 |
|
|
|
resultAnalysis.setFilter("2"); |
|
|
|
List<PatrolData> brightNewList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); |
|
|
|
// logger.info("----------------[TASK] query newList {}", newList); |
|
|
|
// if (newList == null) { |
|
|
|
// return getDataTable(2, new ArrayList<>(), new ArrayList<>()); |
|
|
|
@ -250,6 +253,7 @@ public class PatrolTaskController extends BaseController { |
|
|
|
}).findFirst().get().getAlgSubtypeName() : "" |
|
|
|
); |
|
|
|
if ("0".equals(item.getFilter())) { |
|
|
|
// 初筛数据 |
|
|
|
List<PatrolData> filterDatas = filterList.stream().filter((data) -> { |
|
|
|
return data.getObjectId().equals(item.getObjectId()) && data.getAlgType().equals(item.getAlgType()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
@ -258,6 +262,15 @@ public class PatrolTaskController extends BaseController { |
|
|
|
item.setFilterDesc((filterDatas.get(0)).getDesc()); |
|
|
|
filterList.remove(filterDatas.get(0)); |
|
|
|
} |
|
|
|
// 光明大模型数据 |
|
|
|
List<PatrolData> brightDatas = brightNewList.stream().filter((bright) -> { |
|
|
|
return bright.getObjectId().equals(item.getObjectId()) && bright.getAlgType().equals(item.getAlgType()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
if (!brightDatas.isEmpty()) { |
|
|
|
item.setBrightDesc(brightDatas.get(0).getDesc()); |
|
|
|
item.setBrightResStatus(brightDatas.get(0).getResStatus()); |
|
|
|
brightNewList.remove(brightDatas.get(0)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
AlgValue algValue = new AlgValue(); |
|
|
|
@ -271,6 +284,15 @@ public class PatrolTaskController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
for (PatrolData item : filterList) { |
|
|
|
// 光明大模型数据 |
|
|
|
List<PatrolData> brightDatas = brightNewList.stream().filter((bright) -> { |
|
|
|
return bright.getObjectId().equals(item.getObjectId()) && bright.getAlgType().equals(item.getAlgType()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
if (!brightDatas.isEmpty()) { |
|
|
|
item.setBrightDesc(brightDatas.get(0).getDesc()); |
|
|
|
item.setBrightResStatus(brightDatas.get(0).getResStatus()); |
|
|
|
brightNewList.remove(brightDatas.get(0)); |
|
|
|
} |
|
|
|
item.setAlgName( |
|
|
|
algInfos.stream().anyMatch((alg) -> { |
|
|
|
return alg.getAlgSubtypeCode().equals(item.getAlgType()); |
|
|
|
@ -291,7 +313,30 @@ public class PatrolTaskController extends BaseController { |
|
|
|
item.setFilterDesc(item.getDesc()); |
|
|
|
item.setDesc(""); |
|
|
|
} |
|
|
|
for (PatrolData item : brightNewList) { |
|
|
|
item.setAlgName( |
|
|
|
algInfos.stream().anyMatch((alg) -> { |
|
|
|
return alg.getAlgSubtypeCode().equals(item.getAlgType()); |
|
|
|
}) ? |
|
|
|
algInfos.stream().filter((alg) -> { |
|
|
|
return alg.getAlgSubtypeCode().equals(item.getAlgType()); |
|
|
|
}).findFirst().get().getAlgSubtypeName() : "" |
|
|
|
); |
|
|
|
AlgValue algValue = new AlgValue(); |
|
|
|
if (item.getResValue() != null) { |
|
|
|
String str = algValue.formatValue(item.getResValue()); |
|
|
|
if ("meter".equals(item.getAlgType())) { |
|
|
|
if (str.equals("-1")) { |
|
|
|
item.setResValue("空值"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
item.setBrightDesc(item.getDesc()); |
|
|
|
item.setBrightResStatus(item.getResStatus()); |
|
|
|
item.setDesc(""); |
|
|
|
} |
|
|
|
newList.addAll(filterList); |
|
|
|
newList.addAll(brightNewList); |
|
|
|
if (StringUtils.isNotEmpty(resultAnalysis.getAlgName())) { |
|
|
|
newList = newList.stream().filter((element) -> { |
|
|
|
return resultAnalysis.getAlgName().equals(element.getAlgName()); |
|
|
|
@ -2378,6 +2423,9 @@ public class PatrolTaskController extends BaseController { |
|
|
|
List<AlgInfo> algInfos = patrolResultService.selectAlgInfo(new PatrolResult()); |
|
|
|
resultAnalysis.setFilter("0"); |
|
|
|
List<PatrolData> newList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); |
|
|
|
// 光明大模型数据 |
|
|
|
resultAnalysis.setFilter("2"); |
|
|
|
List<PatrolData> brightNewList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); |
|
|
|
int maxNum = Integer.parseInt(patrolTaskService.selectConfigByKey("MAX_NUM")); |
|
|
|
for (PatrolData item : newList) { |
|
|
|
item.setAlgName( |
|
|
|
@ -2397,6 +2445,15 @@ public class PatrolTaskController extends BaseController { |
|
|
|
item.setFilterDesc((filterDatas.get(0)).getDesc()); |
|
|
|
filterList.remove(filterDatas.get(0)); |
|
|
|
} |
|
|
|
// 光明大模型数据 |
|
|
|
List<PatrolData> brightDatas = brightNewList.stream().filter((bright) -> { |
|
|
|
return bright.getObjectId().equals(item.getObjectId()) && bright.getAlgType().equals(item.getAlgType()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
if (!brightDatas.isEmpty()) { |
|
|
|
item.setBrightDesc(brightDatas.get(0).getDesc()); |
|
|
|
item.setBrightResStatus(brightDatas.get(0).getResStatus()); |
|
|
|
brightNewList.remove(brightDatas.get(0)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
AlgValue algValue = new AlgValue(); |
|
|
|
@ -2410,6 +2467,15 @@ public class PatrolTaskController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
for (PatrolData item : filterList) { |
|
|
|
// 光明大模型数据 |
|
|
|
List<PatrolData> brightDatas = brightNewList.stream().filter((bright) -> { |
|
|
|
return bright.getObjectId().equals(item.getObjectId()) && bright.getAlgType().equals(item.getAlgType()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
if (!brightDatas.isEmpty()) { |
|
|
|
item.setBrightDesc(brightDatas.get(0).getDesc()); |
|
|
|
item.setBrightResStatus(brightDatas.get(0).getResStatus()); |
|
|
|
brightNewList.remove(brightDatas.get(0)); |
|
|
|
} |
|
|
|
item.setAlgName( |
|
|
|
algInfos.stream().anyMatch((alg) -> { |
|
|
|
return alg.getAlgSubtypeCode().equals(item.getAlgType()); |
|
|
|
@ -2430,8 +2496,30 @@ public class PatrolTaskController extends BaseController { |
|
|
|
item.setFilterDesc(item.getDesc()); |
|
|
|
item.setDesc(""); |
|
|
|
} |
|
|
|
for (PatrolData item : brightNewList) { |
|
|
|
item.setAlgName( |
|
|
|
algInfos.stream().anyMatch((alg) -> { |
|
|
|
return alg.getAlgSubtypeCode().equals(item.getAlgType()); |
|
|
|
}) ? |
|
|
|
algInfos.stream().filter((alg) -> { |
|
|
|
return alg.getAlgSubtypeCode().equals(item.getAlgType()); |
|
|
|
}).findFirst().get().getAlgSubtypeName() : "" |
|
|
|
); |
|
|
|
AlgValue algValue = new AlgValue(); |
|
|
|
if (item.getResValue() != null) { |
|
|
|
String str = algValue.formatValue(item.getResValue()); |
|
|
|
if ("meter".equals(item.getAlgType())) { |
|
|
|
if (str.equals("-1")) { |
|
|
|
item.setResValue("空值"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
item.setBrightDesc(item.getDesc()); |
|
|
|
item.setBrightResStatus(item.getResStatus()); |
|
|
|
item.setDesc(""); |
|
|
|
} |
|
|
|
newList.addAll(filterList); |
|
|
|
|
|
|
|
newList.addAll(brightNewList); |
|
|
|
if (StringUtils.isNotEmpty(resultAnalysis.getAlgName())) { |
|
|
|
newList = newList.stream().filter((element) -> resultAnalysis.getAlgName().equals(element.getAlgName())).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
@ -2546,7 +2634,8 @@ public class PatrolTaskController extends BaseController { |
|
|
|
private void createHeaderRow(Sheet sheet) { |
|
|
|
String[] headers = { |
|
|
|
"编号", "设备", "相机名", "系统", "点位id", "点位名称", "状态", |
|
|
|
"算法名称", "读数", "初筛图片", "初筛结果", "分析图片", "分析结果" |
|
|
|
"算法名称", "读数", "初筛图片", "初筛结果", "分析图片", "分析结果", |
|
|
|
"缺陷类型", "描述信息" |
|
|
|
}; |
|
|
|
|
|
|
|
Row headerRow = sheet.createRow(0); |
|
|
|
@ -2582,6 +2671,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()); // 描述信息 |
|
|
|
} |
|
|
|
|
|
|
|
private void insertImages(SXSSFWorkbook workbook, Drawing<?> drawing, Sheet sheet, |
|
|
|
|