From daae43ac2557fbc47aff56f2a92225f55cbb0686 Mon Sep 17 00:00:00 2001 From: wangguangyuan Date: Thu, 29 May 2025 15:04:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BB=BB=E5=8A=A1=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=E6=8A=A5=E5=91=8A=E6=9F=A5=E7=9C=8B=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectionReportController.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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 a29dd53..4af7984 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 @@ -47,6 +47,8 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import com.inspect.taskstatus.domain.PatrolTaskStatus; +import com.inspect.taskstatus.service.IPatrolTaskStatusService; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFClientAnchor; @@ -76,6 +78,9 @@ public class InspectionReportController extends BaseController { private final SftpClient sftpClient; private final IPatrolTaskFtpService patrolTaskFtpService; + @Autowired + private IPatrolTaskStatusService patrolTaskStatusService; + @Autowired private MessageUtils MessageUtils; @@ -140,7 +145,19 @@ public class InspectionReportController extends BaseController { Map map = getImgMap(); InspectionReport inspectionReport = inspectionReportService.selectInspectionReportByLineId(lineId); if(inspectionReport == null) { - return AjaxResult.error("报告不存在: " + lineId); + // 暂时这么处理(进度条报告入口,lineId传的是patrolTaskStatus的lineId) + PatrolTaskStatus patrolTaskStatus = patrolTaskStatusService.selectPatrolTaskStatusByLineId(lineId); + String taskPatrolledId = patrolTaskStatus.getTaskPatrolledId(); + inspectionReport = new InspectionReport(); + inspectionReport.setTaskPatrolledId(taskPatrolledId); + logger.info("进度条报告查看,taskPatrolledId:{}", taskPatrolledId); + List inspectionReports = inspectionReportService.selectInspectionReportList(inspectionReport); + if (inspectionReports.size() > 0) { + inspectionReport = inspectionReports.get(0); + lineId = inspectionReport.getLineId(); + } else { + return AjaxResult.error("报告不存在: " + lineId); + } } InspectionReportData inspectionReportData = new InspectionReportData(); inspectionReportData.setReportId(String.valueOf(lineId));