diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/mapper/ResultAnalysisMapper.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/mapper/ResultAnalysisMapper.java index 18711c0..7461fd7 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/mapper/ResultAnalysisMapper.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/mapper/ResultAnalysisMapper.java @@ -71,4 +71,6 @@ public interface ResultAnalysisMapper { int selectResultAnalysisByMainIds(@Param("lineIds") List lineIds); List selectResultAnalysisListByMainIds(@Param("lineIds") List lineIds); + + List selectResultAnalysisListByMainIdsNew(@Param("lineIds") List lineIds, @Param("filter") String filter); } diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java index 4af7984..93d06e3 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java @@ -140,8 +140,8 @@ public class InspectionReportController extends BaseController { return map; } - @GetMapping({"/{lineId}"}) - public AjaxResult getInfo(@PathVariable("lineId") Long lineId) { + @GetMapping({"/{lineId}/{filter}"}) + public AjaxResult getInfo(@PathVariable("lineId") Long lineId, @PathVariable(value = "filter",required = false) String filter) { Map map = getImgMap(); InspectionReport inspectionReport = inspectionReportService.selectInspectionReportByLineId(lineId); if(inspectionReport == null) { @@ -150,7 +150,8 @@ public class InspectionReportController extends BaseController { String taskPatrolledId = patrolTaskStatus.getTaskPatrolledId(); inspectionReport = new InspectionReport(); inspectionReport.setTaskPatrolledId(taskPatrolledId); - logger.info("进度条报告查看,taskPatrolledId:{}", taskPatrolledId); + inspectionReport.setFilter(filter); + logger.info("进度条报告查看,filter:{},taskPatrolledId:{}", filter, taskPatrolledId); List inspectionReports = inspectionReportService.selectInspectionReportList(inspectionReport); if (inspectionReports.size() > 0) { inspectionReport = inspectionReports.get(0); diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/message/MessageUtils.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/message/MessageUtils.java index 70bd0cd..e74ad51 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/message/MessageUtils.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/message/MessageUtils.java @@ -195,6 +195,8 @@ public class MessageUtils { return "noDefects"; case "总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。": return "Total points: %d, checked points: %d, unchecked points: 0, normal points: %d, abnormal points: %d, manual confirmation points: %d."; + case "缺陷总数:%d个": + return "Total defects: %d"; case "高清视频": return "video"; case "空值": @@ -223,8 +225,16 @@ public class MessageUtils { return "patrol abnormal"; case "识别完成": return "recognition complete"; - case "读数失败 ": + case "读数失败": return "reading failed"; + case "初筛": + return "filter"; + case "大模型": + return "AI"; + case "汇总": + return "summary"; + case "缺陷": + return "defect"; default: return key; } 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 2b99cfd..1f81682 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 @@ -19,6 +19,8 @@ public class PatrolResultRef { private String filePath; private String description; private String pointStatus; + + private String resultType; private String valueUnit; private String resultContent; private String resStatus; diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/mapper/PatrolResultMapper.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/mapper/PatrolResultMapper.java index acb9401..3d3147a 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/mapper/PatrolResultMapper.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/mapper/PatrolResultMapper.java @@ -106,7 +106,7 @@ public interface PatrolResultMapper { List selectPatrolResultListByMainIds(@Param("mainIds") List mainIds); - List selectResultRefByLineIds(@Param("mainIds") List mainIds); + List selectResultRefByLineIds(@Param("mainIds") List mainIds, @Param("filter") String filter); List selectBaseInfoByMainIds(@Param("mainIds") List mainIds); diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/IPatrolResultService.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/IPatrolResultService.java index c29c67e..ab80fb3 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/IPatrolResultService.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/partrolresult/service/IPatrolResultService.java @@ -79,7 +79,7 @@ public interface IPatrolResultService { List select6FsResultValue(PatrolResult patrolResult); - Long saveReport(PatrolTaskResultMain resultMain, List lineIds, Long currentLineId, List resultList); + List saveReport(PatrolTaskResultMain resultMain, List lineIds, Long currentLineId, List resultList); List saveReportV2(PatrolTaskResultMain patrolTaskResultMain, List patrolResultList); 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 1b6f74b..788f99e 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 @@ -305,7 +305,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService { } @Transactional - public Long saveReport(PatrolTaskResultMain resultMain, List lineIds, Long currentLineId, List resultList) { + public List saveReport(PatrolTaskResultMain resultMain, List lineIds, Long currentLineId, List resultList) { long startTime = System.currentTimeMillis(); // String mainId = String.valueOf(resultMain.getLineId()); for (Long lineId : lineIds) { @@ -333,10 +333,13 @@ public class PatrolResultServiceImpl implements IPatrolResultService { return reportIds; } - public Long saveReportData(List resultList, PatrolTaskResultMain resultMain, List lineIds) { + public List saveReportData(List resultList, PatrolTaskResultMain resultMain, List lineIds) { long startTime = System.currentTimeMillis(); String mainId = String.valueOf(resultMain.getLineId()); - String analyseNum = statisticsAnalyseNum(lineIds, resultList.size()); +// String analyseNum = statisticsAnalyseNum(lineIds, resultList.size()); + String filterNum = statisticsAnalyseNumV3(lineIds, "1"); + String AiNum = statisticsAnalyseNumV3(lineIds, "0"); + String[] nums = new String[]{AiNum, filterNum}; startTime = PrintUtil.useTime("STATISTICS ANALYZE DATA", startTime); if (resultList.isEmpty()) { throw new ServiceException("LACK INSPECT RESULT: " + mainId); @@ -358,21 +361,23 @@ public class PatrolResultServiceImpl implements IPatrolResultService { if (list.isEmpty()) { throw new ServiceException("TASK PLAN LOST: " + taskCode); } else { + List reportIds = new ArrayList<>(); PatrolTask task = list.get(0); - List reports = inspectionReportMapper.selectInspectionReportList(new InspectionReport(mainId)); - startTime = PrintUtil.useTime("INQUIRY TASK REPORT", startTime); - InspectionReport report; - if (!reports.isEmpty()) { - report = reports.get(0); - resetReport(report, analyseNum, mainId, task, taskStatus); - inspectionReportMapper.updateInspectionReport(report); - PrintUtil.useTime("MODIFY TASK REPORT", startTime); - } else { - Map stationMap = patrolResultMapper.selectBasedataStation(); - String stationName = stationMap.get("station_name"); - String stationType = stationMap.get("station_type"); - report = new InspectionReport(); - resetReport(report, analyseNum, mainId, task, taskStatus); +// List reports = inspectionReportMapper.selectInspectionReportList(new InspectionReport(mainId)); +// startTime = PrintUtil.useTime("INQUIRY TASK REPORT", startTime); +// InspectionReport report; +// if (!reports.isEmpty()) { +// report = reports.get(0); +// resetReport(report, analyseNum, mainId, task, taskStatus); +// inspectionReportMapper.updateInspectionReport(report); +// PrintUtil.useTime("MODIFY TASK REPORT", startTime); +// } else { + Map stationMap = patrolResultMapper.selectBasedataStation(); + String stationName = stationMap.get("station_name"); + String stationType = stationMap.get("station_type"); + for (int i = 0; i < nums.length; i++) { + InspectionReport report = new InspectionReport(); + resetReport(report, nums[i], mainId, task, taskStatus); report.setTaskId(String.valueOf(task.getTaskId())); report.setTaskPatrolledId(taskPatrolId); report.setInspectionTaskName(task.getTaskName()); @@ -381,15 +386,18 @@ public class PatrolResultServiceImpl implements IPatrolResultService { report.setCheckTime(resultMain.getCheckTime()); report.setStationName(stationName); report.setVoltLevel(voltage); + report.setFilter(String.valueOf(i)); report.setStationType(stationType); inspectionReportMapper.insertInspectionReport(report); PrintUtil.useTime("NEW TASK REPORT", startTime); - batchInsertReportData(String.valueOf(report.getLineId()), lineIds); + batchInsertReportData(String.valueOf(report.getLineId()), lineIds, String.valueOf(i)); PrintUtil.useTime("BATCH INSERT DETAIL", startTime); + log.info("[ARCHIVE] reportId: {}", report.getLineId()); + Long lineId = report.getLineId(); + reportIds.add(lineId); } - - log.info("[ARCHIVE] reportId: {}", report.getLineId()); - return report.getLineId(); +// } + return reportIds; } } } @@ -495,11 +503,11 @@ public class PatrolResultServiceImpl implements IPatrolResultService { report.setInspectionEndTime(DateUtil.parseDateTime(taskStatus.getEndTime())); } - public void batchInsertReportData(String reportId, List mainIds) { - log.info("batchInsertReportData reportId:" + reportId + ", mainIds:" + mainIds); + public void batchInsertReportData(String reportId, List mainIds, String filter) { + log.info("batchInsertReportData reportId:" + reportId + ", mainIds:" + mainIds + ", filter:" + filter); long startTime = System.currentTimeMillis(); // List patrolResultRefs = patrolResultMapper.selectResultRefByLineId(mainId); - List patrolResultRefs = patrolResultMapper.selectResultRefByLineIds(mainIds); + List patrolResultRefs = patrolResultMapper.selectResultRefByLineIds(mainIds, filter); log.info("batchInsertReportData patrolResultRefs:" + patrolResultRefs); startTime = PrintUtil.useTime("SELECT RESULT", startTime); // List basePointAreaInfoList = patrolResultMapper.selectBaseInfoByMainId(mainId); @@ -535,6 +543,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService { reportData.setDataSources("0".equals(devType) ? messageUtils.get("无人机") : "1".equals(devType) ? messageUtils.get("机器人") : messageUtils.get("高清视频")); reportData.setAcquisitionTime(DateUtils.parse(DateUtils.yyyyMMddHHmmss2, patrolResultRef.getTime())); reportData.setInspectionResults(patrolResultRef.getDescription()); + reportData.setAlgName(patrolResultRef.getAlgName()); String threshold = patrolResultRef.getThreshold(); if(StringUtils.isBlank(threshold)) { threshold = ""; @@ -552,21 +561,31 @@ public class PatrolResultServiceImpl implements IPatrolResultService { } String pointStatus = patrolResultRef.getPointStatus(); - log.info("[RESULT] pointStatus: {}, patrolResultRef: {}", pointStatus, patrolResultRef); - if(pointStatus == null) { + String resultType = patrolResultRef.getResultType(); +// log.info("[RESULT] pointStatus: {}, patrolResultRef: {}", pointStatus, patrolResultRef); +// if(pointStatus == null) { +// continue; +// } else if (pointStatus.equals("0")) { +// reportData.setPointStatus(messageUtils.get("异常")); +// reportData.setCode(failNum); +// ++failNum; +// } else if (pointStatus.equals("1")) { +// reportData.setPointStatus(messageUtils.get("待人工确认")); +// reportData.setCode(confirmNum); +// ++confirmNum; +// } else { +// reportData.setPointStatus(messageUtils.get("正常")); +// reportData.setCode(okNum); +// ++okNum; +// } + log.info("[RESULT] resultType: {}, patrolResultRef: {}", resultType, patrolResultRef); + if(resultType == null) { continue; - } else if (pointStatus.equals("0")) { - reportData.setPointStatus(messageUtils.get("异常")); + } else if (resultType.equals("0")) { + reportData.setPointStatus(messageUtils.get("缺陷")); + // 缺陷编号 reportData.setCode(failNum); ++failNum; - } else if (pointStatus.equals("1")) { - reportData.setPointStatus(messageUtils.get("待人工确认")); - reportData.setCode(confirmNum); - ++confirmNum; - } else { - reportData.setPointStatus(messageUtils.get("正常")); - reportData.setCode(okNum); - ++okNum; } final String reportDataId = reportId + "_" + (100000 + index); @@ -772,6 +791,36 @@ public class PatrolResultServiceImpl implements IPatrolResultService { return String.format(messageUtils.get("总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。"), totalNum, totalNum, okNum, failNum, confirmNum); } + public String statisticsAnalyseNumV3(List lineIds, String filter) { +// int okNum = 0; +// int failNum = 0; +// int confirmNum = 0; + List analyses = resultAnalysisMapper.selectResultAnalysisListByMainIdsNew(lineIds, filter); + int totalNum = analyses.size(); + log.info("lineIds:{},statisticsAnalyseNum analyses:{}", lineIds, analyses); +// for (ResultAnalysis analyse : analyses) { +// String pointStatus = analyse.getPointStatus(); +// if (pointStatus.equals("0")) { +// ++failNum; +// } else if (pointStatus.equals("1")) { +// ++okNum; +// } else if (pointStatus.equals("2")) { +// ++confirmNum; +// } else { +// log.error("【归档-统计分析数量】异常分析类型:{}", analyse.getPointStatus()); +// } +// } +// +// int lastNum = totalNum - failNum - confirmNum; +// if (lastNum != okNum) { +// okNum = lastNum; +// } + +// return String.format("总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。", totalNum, totalNum, okNum, failNum, confirmNum); +// return String.format(messageUtils.get("总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。"), totalNum, totalNum, okNum, failNum, confirmNum); + return String.format(messageUtils.get("缺陷总数:%d个"), totalNum); + } + public String statisticsAnalyseNumV2(String mainId, String filter) { int okNum = 0; int failNum = 0; diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/resultmain/controller/PatrolTaskResultMainController.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/resultmain/controller/PatrolTaskResultMainController.java index c5cbc18..39f7c3e 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/resultmain/controller/PatrolTaskResultMainController.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/resultmain/controller/PatrolTaskResultMainController.java @@ -212,17 +212,19 @@ public class PatrolTaskResultMainController extends BaseController { analyseNum = resultAnalysisService.selectResultAnalysisByMainIds(lineIds); startTime = PrintUtil.useTime("INQUIRY ANALYZE DATA", startTime); logger.info("[ARCHIVE] Id: {}, collectNum: {}, analyseNum: {}, modifyNum:{}", mainId, collectNum, analyseNum, modifyNum.get()); - if (modifyNum.get() + analyseNum != collectNum) { - final String failMsg = "-------------------------------------[ARCHIVE] FAIL! Analyse number equals not gather number!"; - logger.info(failMsg); - } +// if (modifyNum.get() + analyseNum != collectNum) { +// final String failMsg = "-------------------------------------[ARCHIVE] FAIL! Analyse number equals not gather number!"; +// logger.info(failMsg); +// } - Long reportId = patrolResultService.saveReport(resultMain, lineIds, lineId, resultList); + List reportIds = patrolResultService.saveReport(resultMain, lineIds, lineId, resultList); PrintUtil.useTime("ARCHIVE END", startTime); (new Thread(() -> { long beginTime = (new Date()).getTime(); - logger.info("[EXPORT REPORTS] StartTime: {}, reportId: {}", DateUtil.now(), reportId); - exportExcelWordAndZip(String.valueOf(reportId)); + for (int i = 0; i < reportIds.size(); ++i) { + logger.info("[EXPORT REPORTS] StartTime: {}, reportId: {}", DateUtil.now(), reportIds.get(i)); + exportExcelWordAndZip(String.valueOf(reportIds.get(i))); + } PrintUtil.useTime("EXPORT REPORTS END", beginTime); })).start(); return toAjax(1); @@ -329,7 +331,8 @@ public class PatrolTaskResultMainController extends BaseController { // 点位汇总 - List statusList = Arrays.asList(MessageUtils.get("异常"), MessageUtils.get("待人工确认"), MessageUtils.get("正常")); +// List statusList = Arrays.asList(MessageUtils.get("异常"), MessageUtils.get("待人工确认"), MessageUtils.get("正常")); + List statusList = Collections.singletonList(MessageUtils.get("缺陷")); for (String status : statusList) { addStatusSection(doc, report, status, images); } @@ -495,7 +498,8 @@ public class PatrolTaskResultMainController extends BaseController { private void addStatusSection(XWPFDocument doc, InspectionReport report, String status, Map images) { - addSectionHeader(doc, status + MessageUtils.get("点位汇总")); +// addSectionHeader(doc, status + MessageUtils.get("点位汇总")); + addSectionHeader(doc, status + MessageUtils.get("汇总")); XWPFTable table = doc.createTable(1, 9); table.setWidth("100%"); @@ -503,7 +507,7 @@ public class PatrolTaskResultMainController extends BaseController { // 创建表头 String[] headers = {MessageUtils.get("编号"), MessageUtils.get("区域"), MessageUtils.get("设备"), MessageUtils.get("点位"), MessageUtils.get("数据来源"), - MessageUtils.get("采集时间"), MessageUtils.get("巡视结果"), MessageUtils.get("点位状态"), MessageUtils.get("巡视图像")}; + MessageUtils.get("采集时间"), MessageUtils.get("巡视结果"), MessageUtils.get("算法名称"), MessageUtils.get("巡视图像")}; XWPFTableRow headerRow = table.getRow(0); for (int i = 0; i < headers.length; i++) { XWPFTableCell cell = headerRow.getCell(i); @@ -513,9 +517,7 @@ public class PatrolTaskResultMainController extends BaseController { } setTableHeaderStyle(table); // 填充数据 - List dataList = report.getReportDatalist().stream() - .filter(d -> status.equals(d.getPointStatus())) - .collect(Collectors.toList()); + List dataList = report.getReportDatalist(); for (InspectionReportData data : dataList) { XWPFTableRow row = table.createRow(); @@ -595,7 +597,7 @@ public class PatrolTaskResultMainController extends BaseController { data.getDataSources(), formatDateTime(data.getAcquisitionTime()), data.getInspectionResults(), - data.getPointStatus(), + data.getAlgName(), "" // 图片占位 }; @@ -795,7 +797,13 @@ public class PatrolTaskResultMainController extends BaseController { Date startTime = inspectionReport.getInspectionStartTime() != null ? inspectionReport.getInspectionStartTime() : new Date(); String timestamp = DateUtils.format(DateUtils.yyyyMMddHHmmss2, startTime) + "_" + System.currentTimeMillis(); - String reportName = inspectionReport.getInspectionTaskName() + "_" + timestamp; + String namePrefix = ""; + if ("1".equals(inspectionReport.getFilter())) { + namePrefix = MessageUtils.get("初筛") + "_"; + } else if ("0".equals(inspectionReport.getFilter())) { + namePrefix = MessageUtils.get("大模型") + "_"; + } + String reportName = namePrefix + inspectionReport.getInspectionTaskName() + "_" + timestamp; // 上传媒体包 uploadFile(basePath, reportName, ".zip", outputStream -> { try (ZipOutputStream zipOut = new ZipOutputStream(outputStream)) { @@ -1072,16 +1080,20 @@ public class PatrolTaskResultMainController extends BaseController { } } +// InspectionReportData inspectionReportData = new InspectionReportData(); +// List list = new ArrayList<>(); +// inspectionReportData.setPointStatus(MessageUtils.get("异常")); +// list.add(inspectionReportData); +// InspectionReportData inspection = new InspectionReportData(); +// inspection.setPointStatus(MessageUtils.get("待人工确认")); +// list.add(inspection); +// InspectionReportData reportData = new InspectionReportData(); +// reportData.setPointStatus(MessageUtils.get("正常")); +// list.add(reportData); InspectionReportData inspectionReportData = new InspectionReportData(); List list = new ArrayList<>(); - inspectionReportData.setPointStatus(MessageUtils.get("异常")); + inspectionReportData.setPointStatus(MessageUtils.get("缺陷")); list.add(inspectionReportData); - InspectionReportData inspection = new InspectionReportData(); - inspection.setPointStatus(MessageUtils.get("待人工确认")); - list.add(inspection); - InspectionReportData reportData = new InspectionReportData(); - reportData.setPointStatus(MessageUtils.get("正常")); - list.add(reportData); int total = 0; HSSFPatriarch patriarch = hssfSheet.createDrawingPatriarch(); @@ -1092,7 +1104,7 @@ public class PatrolTaskResultMainController extends BaseController { hssfSheet.addMergedRegion(cellRangeAddress); HSSFRow rowa1 = hssfSheet.createRow(9 + total); HSSFCell cella1 = rowa1.createCell(0); - cella1.setCellValue(arr.getPointStatus() + MessageUtils.get("点位汇总")); + cella1.setCellValue(arr.getPointStatus() + MessageUtils.get("汇总")); HSSFCellStyle hssfCellStyle1 = hssfWorkbook.createCellStyle(); hssfCellStyle1.setAlignment(HorizontalAlignment.CENTER); hssfCellStyle1.setVerticalAlignment(VerticalAlignment.CENTER); @@ -1145,7 +1157,7 @@ public class PatrolTaskResultMainController extends BaseController { cella1 = rowa1.createCell(10); cella1.setCellStyle(colStyle); cella1 = rowa1.createCell(11); - cella1.setCellValue(MessageUtils.get("点位状态")); + cella1.setCellValue(MessageUtils.get("算法类型")); cella1.setCellStyle(colStyle2); cella1 = rowa1.createCell(12); cella1.setCellValue(MessageUtils.get("巡视图像")); @@ -1159,7 +1171,7 @@ public class PatrolTaskResultMainController extends BaseController { reportData1.setPointStatus(arr.getPointStatus()); List objectArrayList = new ArrayList<>(); if (inspectionReport.getReportDatalist() != null && !inspectionReport.getReportDatalist().isEmpty()) { - objectArrayList = inspectionReport.getReportDatalist().stream().filter((a) -> arr.getPointStatus().equals(a.getPointStatus())).collect(Collectors.toList()); + objectArrayList = inspectionReport.getReportDatalist(); logger.info("[HSSF] STATISTICS RECORD Number: {}, Origin Number: {}", objectArrayList.size(), inspectionReport.getReportDatalist().size()); } @@ -1221,7 +1233,7 @@ public class PatrolTaskResultMainController extends BaseController { cella1 = rowb1.createCell(10); cella1.setCellStyle(colStyle); cella1 = rowb1.createCell(11); - cella1.setCellValue(brr.getPointStatus()); + cella1.setCellValue(brr.getAlgName()); cella1.setCellStyle(colStyle2); String str = ""; cella1 = rowb1.createCell(12); diff --git a/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportDataMapper.xml b/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportDataMapper.xml index 1e41405..0dedcfc 100644 --- a/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportDataMapper.xml +++ b/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportDataMapper.xml @@ -18,6 +18,7 @@ + @@ -33,7 +34,8 @@ acquisition_time, inspection_results, point_status, - inspection_img + inspection_img, + alg_name from inspection_report_data @@ -151,11 +153,11 @@ insert into inspection_report_data - (line_id,code,report_id,area,time_interval,eq_name,parts,point_name,data_sources,acquisition_time,inspection_results,point_status,inspection_img) + (line_id,code,report_id,area,time_interval,eq_name,parts,point_name,data_sources,acquisition_time,inspection_results,point_status,inspection_img,alg_name) values (#{t.lineId}, #{t.code}, #{t.reportId}, #{t.area}, #{t.timeInterval}, #{t.eqName}, #{t.parts}, - #{t.pointName},#{t.dataSources},#{t.acquisitionTime},#{t.inspectionResults},#{t.pointStatus},#{t.inspectionImg}) + #{t.pointName},#{t.dataSources},#{t.acquisitionTime},#{t.inspectionResults},#{t.pointStatus},#{t.inspectionImg},#{t.algName}) diff --git a/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportMapper.xml b/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportMapper.xml index 003cb34..d3475f3 100644 --- a/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportMapper.xml +++ b/inspect-main/inspect-main-task/src/main/resources/mapper/task/InspectionReportMapper.xml @@ -22,6 +22,7 @@ + @@ -71,6 +72,7 @@ and task_patrolled_id = #{taskPatrolledId} and file_path = #{filePath} + and filter = #{filter} ORDER BY line_id desc @@ -123,6 +125,7 @@ task_patrolled_id, task_result_id, file_path, + filter, #{stationName}, @@ -141,6 +144,7 @@ #{taskPatrolledId}, #{taskResultId}, #{filePath}, + #{filter}, 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 c116eff..366c4cf 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 @@ -585,6 +585,9 @@ + + + + +