瀏覽代碼

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_lc into feature_v1.0

tags/v1.2.0^2
chengwang 1 年之前
父節點
當前提交
bb99350144
共有 5 個檔案被更改,包括 7 行新增16 行删除
  1. +1
    -6
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThMission.java
  2. +2
    -4
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java
  3. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/mission/query/QueryEmergencyListService.java
  4. +1
    -4
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/UpdateEmergencyMissionStatusService.java
  5. +2
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java

+ 1
- 6
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThMission.java 查看文件

@@ -49,7 +49,7 @@ public class ThMission extends BaseEntity implements Serializable {
private String name;

/**
* 巡检任务类型 1 日常,2 应急巡检
* 任务类型:1:巡检任务 2:应急任务
*/
private Integer type;

@@ -193,11 +193,6 @@ public class ThMission extends BaseEntity implements Serializable {
*/
private String requestId;

/**
* 任务类型:0:巡检任务 1:应急任务
*/
private Integer accidentTask;

/**
* 应急任务关联数据任务ID
*/

+ 2
- 4
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java 查看文件

@@ -80,13 +80,11 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper,
public List<InspectionVO> track(Integer id) {
ThMission mission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>()
.eq(ThMission::getId, id)
.eq(ThMission::getMark, 1));
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode()));
if (ObjectUtil.isNull(mission)) {
throw new ServiceException("没有该任务记录");
}
if (ObjectUtil.isNotNull(mission.getAccidentTask())
&& AccidentTaskEnum.ACCIDENT_TASK.getCode() == mission.getAccidentTask()
&& mission.getEmergencyDataMissionId() != 0) {
if (2 == mission.getType() && mission.getEmergencyDataMissionId() != 0) {
id = mission.getEmergencyDataMissionId();
}
LambdaQueryWrapper<ThInspection> lambdaQueryWrapper = new LambdaQueryWrapper<>();

+ 1
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/mission/query/QueryEmergencyListService.java 查看文件

@@ -51,7 +51,7 @@ public class QueryEmergencyListService {
List<ThMission> missionList = thMissionMapper.selectList(new LambdaQueryWrapper<ThMission>()
.eq(ThMission::getMark, MarkEnum.VALID.getCode())
.eq(ThMission::getTenantId, tenantId)
.eq(ThMission::getAccidentTask, AccidentTaskEnum.ACCIDENT_TASK.getCode())
.eq(ThMission::getType, 2)
.in(CollectionUtil.isNotEmpty(request.getStatusList()), ThMission::getStatus, request.getStatusList()));

if (CollectionUtil.isEmpty(missionList)) {

+ 1
- 4
tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/UpdateEmergencyMissionStatusService.java 查看文件

@@ -24,10 +24,7 @@ public class UpdateEmergencyMissionStatusService {
*/
public void updateStatus(ThMission oldMission, Integer status) {
log.info("进入修改应急任务数据");
if (ObjectUtil.isNull(oldMission.getAccidentTask())) {
return;
}
if (AccidentTaskEnum.INSPECTION_TASK.getCode() == oldMission.getAccidentTask()) {
if (1 == oldMission.getType()) {
return;
}
if (0 == oldMission.getEmergencyDataMissionId()) {

+ 2
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java 查看文件

@@ -58,6 +58,7 @@ public class PointFlightService {
// 创建应急任务
ThMission mission = this.createMission(user, request);


// 调用机场平台
// 修改原巡检任务状态为已完成
if (TaskStatusEnum.COMPLETE.getCode() == mission.getStatus()) {
@@ -239,6 +240,7 @@ public class PointFlightService {
mission.setCode(code);
mission.setName("应急任务" + code);
mission.setTenantId(user.getTenantId());
mission.setStatus(2);
mission.setInspectionType(InspectionTypeEnum.AIRPORT.getCode());
mission.setAirportId(request.getAirportId());
mission.setAirportName(request.getAirportName());
@@ -246,7 +248,6 @@ public class PointFlightService {
mission.setInspectionLineName("");
mission.setExecutionStartTime(DateUtils.now());
mission.setStatus(TaskStatusEnum.FLIGHT.getCode()); // 设置应急任务状态为飞行中
mission.setAccidentTask(AccidentTaskEnum.ACCIDENT_TASK.getCode());
mission.setCreateUser(user.getId());
mission.setCreateTime(DateUtils.now());
Integer count = missionMapper.insert(mission);

Loading…
取消
儲存