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