|
|
@ -13,6 +13,7 @@ import com.inspect.insreport.domain.InspectionReport; |
|
|
import com.inspect.insreport.service.IInspectionReportService; |
|
|
import com.inspect.insreport.service.IInspectionReportService; |
|
|
import com.inspect.insreportdata.domain.InspectionReportData; |
|
|
import com.inspect.insreportdata.domain.InspectionReportData; |
|
|
import com.inspect.insreportdata.service.IInspectionReportDataService; |
|
|
import com.inspect.insreportdata.service.IInspectionReportDataService; |
|
|
|
|
|
import com.inspect.insreporttask.mapper.InspectionReportTaskMapper; |
|
|
import com.inspect.message.MessageUtils; |
|
|
import com.inspect.message.MessageUtils; |
|
|
import com.inspect.partrolresult.domain.PatrolResult; |
|
|
import com.inspect.partrolresult.domain.PatrolResult; |
|
|
import com.inspect.partrolresult.service.IPatrolResultService; |
|
|
import com.inspect.partrolresult.service.IPatrolResultService; |
|
|
@ -279,6 +280,7 @@ public class DonghuanReportExportController extends BaseController { |
|
|
private final IInspectionReportDataService inspectionReportDataService; |
|
|
private final IInspectionReportDataService inspectionReportDataService; |
|
|
private final IInspectionReportImgService inspectionReportImgService; |
|
|
private final IInspectionReportImgService inspectionReportImgService; |
|
|
private final IInspectionReportService inspectionReportService; |
|
|
private final IInspectionReportService inspectionReportService; |
|
|
|
|
|
private final InspectionReportTaskMapper inspectionReportTaskMapper; |
|
|
private final SftpClient sftpClient; |
|
|
private final SftpClient sftpClient; |
|
|
private final ReportPushService reportPushService; |
|
|
private final ReportPushService reportPushService; |
|
|
private final ReportPushProperties reportPushProperties; |
|
|
private final ReportPushProperties reportPushProperties; |
|
|
@ -294,6 +296,7 @@ public class DonghuanReportExportController extends BaseController { |
|
|
IInspectionReportDataService inspectionReportDataService, |
|
|
IInspectionReportDataService inspectionReportDataService, |
|
|
IInspectionReportImgService inspectionReportImgService, |
|
|
IInspectionReportImgService inspectionReportImgService, |
|
|
IInspectionReportService inspectionReportService, |
|
|
IInspectionReportService inspectionReportService, |
|
|
|
|
|
InspectionReportTaskMapper inspectionReportTaskMapper, |
|
|
SftpClient sftpClient, |
|
|
SftpClient sftpClient, |
|
|
ReportPushService reportPushService, |
|
|
ReportPushService reportPushService, |
|
|
ReportPushProperties reportPushProperties, |
|
|
ReportPushProperties reportPushProperties, |
|
|
@ -303,6 +306,7 @@ public class DonghuanReportExportController extends BaseController { |
|
|
this.inspectionReportDataService = inspectionReportDataService; |
|
|
this.inspectionReportDataService = inspectionReportDataService; |
|
|
this.inspectionReportImgService = inspectionReportImgService; |
|
|
this.inspectionReportImgService = inspectionReportImgService; |
|
|
this.inspectionReportService = inspectionReportService; |
|
|
this.inspectionReportService = inspectionReportService; |
|
|
|
|
|
this.inspectionReportTaskMapper = inspectionReportTaskMapper; |
|
|
this.sftpClient = sftpClient; |
|
|
this.sftpClient = sftpClient; |
|
|
this.reportPushService = reportPushService; |
|
|
this.reportPushService = reportPushService; |
|
|
this.reportPushProperties = reportPushProperties; |
|
|
this.reportPushProperties = reportPushProperties; |
|
|
@ -589,6 +593,11 @@ public class DonghuanReportExportController extends BaseController { |
|
|
try { |
|
|
try { |
|
|
inspectionReport.setFilePath(basePath + reportName + ".docx"); |
|
|
inspectionReport.setFilePath(basePath + reportName + ".docx"); |
|
|
inspectionReport.setLineIds(reportIds); |
|
|
inspectionReport.setLineIds(reportIds); |
|
|
|
|
|
// 报告的 task_patrolled_id:按 report_line_id 取 inspection_report_task 下所有任务执行标识 |
|
|
|
|
|
List<String> taskPatrolledIds = inspectionReportTaskMapper |
|
|
|
|
|
.selectTaskPatrolledIdsByReportLineId(lineId); |
|
|
|
|
|
inspectionReport.setTaskPatrolledId( |
|
|
|
|
|
taskPatrolledIds == null ? null : StringUtils.join(taskPatrolledIds, ",")); |
|
|
inspectionReportService.updateInspectionReportFilePath(inspectionReport); |
|
|
inspectionReportService.updateInspectionReportFilePath(inspectionReport); |
|
|
// 报告生成并上传完成后,发布消息到 RabbitMQ,由消费者异步 HTTP 上传外部平台(自动归档与手动归档均推送) |
|
|
// 报告生成并上传完成后,发布消息到 RabbitMQ,由消费者异步 HTTP 上传外部平台(自动归档与手动归档均推送) |
|
|
reportPushService.pushReport(inspectionReport, username); |
|
|
reportPushService.pushReport(inspectionReport, username); |
|
|
|