|
|
@@ -88,6 +88,7 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp |
|
|
|
//查询巡检信息 |
|
|
|
ThMission mission = missionMapper.selectById(missionId); |
|
|
|
Assert.notNull(mission,"任务不能为空!"); |
|
|
|
|
|
|
|
//如果报告已经生成,就修改,如果未生成就创建 |
|
|
|
if(mission.getReportStatus() == ReportStatusEnum.GENERATE.getCode()){ |
|
|
|
//生成报告 |
|
|
@@ -101,6 +102,7 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp |
|
|
|
Report report = setInfo(missionId, reportNo, mission); |
|
|
|
reportMapper.insert(report); |
|
|
|
}else{ |
|
|
|
update.setWeather(mission.getWeather()); |
|
|
|
update.setGenerateTime(new Date()); |
|
|
|
//修改报告 |
|
|
|
reportMapper.updateById(update); |