Browse Source

Merge branch 'develop' of gitadmin/tuoheng_lc into release

tags/v1.2.0^2
wanjing 1 year ago
parent
commit
ad60fc22d0
2 changed files with 12 additions and 4 deletions
  1. +0
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java
  2. +12
    -3
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/warningrecord/query/QueryWarningRecordListByWarningIdService.java

+ 0
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java View File



// 创建应急任务 // 创建应急任务
ThMission mission = this.createMission(user, request); ThMission mission = this.createMission(user, request);
log.info("进入调用机场平台,创建应急任务,mission={}", mission);


// 调用机场平台 // 调用机场平台
// 修改原巡检任务状态为已完成 // 修改原巡检任务状态为已完成

+ 12
- 3
tuoheng-admin/src/main/java/com/tuoheng/admin/service/warningrecord/query/QueryWarningRecordListByWarningIdService.java View File

import com.tuoheng.admin.entity.vo.warning.WarningListVo; import com.tuoheng.admin.entity.vo.warning.WarningListVo;
import com.tuoheng.admin.entity.vo.warning.WarningRecordVo; import com.tuoheng.admin.entity.vo.warning.WarningRecordVo;
import com.tuoheng.admin.enums.MarkEnum; import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.enums.MarkTypeEnum;
import com.tuoheng.admin.enums.TaskStatusEnum; import com.tuoheng.admin.enums.TaskStatusEnum;
import com.tuoheng.admin.enums.UpdateOrCreateEnum; import com.tuoheng.admin.enums.UpdateOrCreateEnum;
import com.tuoheng.admin.mapper.ThMissionMapper; import com.tuoheng.admin.mapper.ThMissionMapper;
// 构造返回结果对象 // 构造返回结果对象
List<WarningRecordVo> warningRecordVoList = this.buildWarningRecordVoList(warningRecordList); List<WarningRecordVo> warningRecordVoList = this.buildWarningRecordVoList(warningRecordList);


for (WarningRecordVo warningRecordVo : warningRecordVoList) {
log.info("预警记录, warningRecordVo = {}", warningRecordVo);
}

return JsonResult.success(warningRecordVoList); return JsonResult.success(warningRecordVoList);
} }


for (WarningRecordVo warningRecordVo : warningRecordVoList) { for (WarningRecordVo warningRecordVo : warningRecordVoList) {
oldMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() oldMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>()
.eq(ThMission::getId, warningRecordVo.getMissionId()) .eq(ThMission::getId, warningRecordVo.getMissionId())
.eq(ThMission::getMark, 1));
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode()));
newMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() newMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>()
.eq(ThMission::getId, warningRecordVo.getEmergencyMissionId()) .eq(ThMission::getId, warningRecordVo.getEmergencyMissionId())
.eq(ThMission::getMark, 1));
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode()));
if (oldMission.getAirportId().equals(newMission.getAirportId())) { if (oldMission.getAirportId().equals(newMission.getAirportId())) {
warningRecordVo.setStatus(oldMission.getStatus());
if (0 == oldMission.getEmergencyDataMissionId()) {
warningRecordVo.setStatus(oldMission.getStatus());
} else {
warningRecordVo.setStatus(newMission.getStatus());
}
} else { } else {
warningRecordVo.setStatus(newMission.getStatus()); warningRecordVo.setStatus(newMission.getStatus());
} }

Loading…
Cancel
Save