@@ -144,7 +144,6 @@ public class UpdateFlightStatusService { | |||
} | |||
private void updateReport(Inspection inspection) { | |||
log.info("修改报告状态和开始时间,同时使用机场ID作为设备ID, 机场名称作为设备名称"); | |||
Report report = reportMapper.selectOne(Wrappers.<Report>lambdaQuery() | |||
.eq(Report::getInspectionId, inspection.getId()) | |||
.eq(Report::getMark, 1)); | |||
@@ -152,10 +151,6 @@ public class UpdateFlightStatusService { | |||
log.info("该任务还没有生成报告,不需要修改报告的完成时间和状态"); | |||
return; | |||
} | |||
// 机场任务没有设备名称,暂定使用机场ID作为设备ID, 机场名称作为设备名称 | |||
report.setEquipmentId(inspection.getAirportId().toString()); | |||
report.setEquipmentName(inspection.getAirportName()); | |||
report.setStatus(inspection.getStatus()); | |||
report.setExecutionStartTime(inspection.getExecutionStartTime()); | |||
reportMapper.updateById(report); |
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.lowagie.text.*; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.enums.InspectionFileStatusEnum; | |||
import com.tuoheng.admin.enums.InspectionTypeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.service.report.query.GetInspectionFileStatusList; | |||
import com.tuoheng.admin.utils.WordUtils; | |||
@@ -142,7 +143,12 @@ public class GenerateReportWordService { | |||
} else if (i == 10) { | |||
str = "巡查设备"; | |||
} else if (i == 11) { | |||
str = report.getEquipmentName(); | |||
// 机场任务没有设备名称,暂定使用机场名称作为设备名称 | |||
if (InspectionTypeEnum.AIRPORT.getCode() == report.getInspectionType()) { | |||
str = report.getAirportName(); | |||
} else { | |||
str = report.getEquipmentName(); | |||
} | |||
} else if (i == 12) { | |||
str = "巡查开始时间"; | |||
} else if (i == 13) { |
@@ -7,6 +7,7 @@ import com.tuoheng.admin.conver.InspectionFileConverMapper; | |||
import com.tuoheng.admin.conver.ReportConverMapper; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.enums.InspectionFileStatusEnum; | |||
import com.tuoheng.admin.enums.InspectionTypeEnum; | |||
import com.tuoheng.admin.enums.code.report.QueryInspectionReportCodeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
@@ -147,6 +148,10 @@ public class QueryInspectionHandleReportService { | |||
inspectionReportVo.setInspectionResultVoList(inspectionResultVoList); | |||
inspectionReportVo.setInspectionFileReportVoList(inspectionFileHandleVoList); | |||
// 机场任务没有设备名称,暂定使用机场名称作为设备名称 | |||
if (InspectionTypeEnum.AIRPORT.getCode() == report.getInspectionType()) { | |||
inspectionReportVo.setEquipmentName(report.getAirportName()); | |||
} | |||
return inspectionReportVo; | |||
} | |||
@@ -6,6 +6,7 @@ import com.tuoheng.admin.conver.InspectionFileConverMapper; | |||
import com.tuoheng.admin.conver.ReportConverMapper; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.enums.InspectionFileStatusEnum; | |||
import com.tuoheng.admin.enums.InspectionTypeEnum; | |||
import com.tuoheng.admin.enums.code.report.QueryInspectionReportCodeEnum; | |||
import com.tuoheng.admin.mapper.DeptMapper; | |||
import com.tuoheng.admin.mapper.InspectionFileMapper; | |||
@@ -50,10 +51,7 @@ public class QueryInspectionReportService { | |||
public JsonResult getInspectionReport(String id) { | |||
log.info("进入查看巡检报告业务"); | |||
String userId = CurrentUserUtil.getUserId(); | |||
String tenantId = CurrentUserUtil.getTenantId(); | |||
JsonResult result = this.check(tenantId, id); | |||
if (0 != result.getCode()) { | |||
log.info("进入查看巡检报告业务:校验失败:{}", result.getMsg()); | |||
@@ -112,6 +110,10 @@ public class QueryInspectionReportService { | |||
inspectionFileReportVo.setFileOriginal(CommonConfig.imageURL + inspectionFileReportVo.getFileOriginal()); | |||
} | |||
} | |||
// 机场任务没有设备名称,暂定使用机场名称作为设备名称 | |||
if (InspectionTypeEnum.AIRPORT.getCode() == report.getInspectionType()) { | |||
inspectionReportVo.setEquipmentName(report.getAirportName()); | |||
} | |||
inspectionReportVo.setDeptName(deptName); | |||
inspectionReportVo.setInspectionResultVoList(inspectionResultVoList); | |||
inspectionReportVo.setInspectionFileReportVoList(inspectionFileHandleVoList); |