Browse Source

修改 提交并生成报告 接口

tags/v1.1.0
wanghaoran 2 years ago
parent
commit
0830322c85
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java

+ 2
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java View File

@@ -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);

Loading…
Cancel
Save