修改返回的数据
This commit is contained in:
parent
c7d6d1015e
commit
060d24d16e
12
pom.xml
12
pom.xml
|
|
@ -83,6 +83,18 @@
|
||||||
<artifactId>tuoheng-api-task</artifactId>
|
<artifactId>tuoheng-api-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Tuoheng AIRLINE API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>tuoheng-api-airline</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Tuoheng DEVICE API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>tuoheng-api-device</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Flyway Database Migration -->
|
<!-- Flyway Database Migration -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.flywaydb</groupId>
|
<groupId>org.flywaydb</groupId>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ruoyi.task.service.dto;
|
package com.ruoyi.task.service.dto;
|
||||||
|
|
||||||
|
import com.ruoyi.task.api.enums.CycleTypeEnum;
|
||||||
|
import com.ruoyi.task.api.enums.PlanTypeEnum;
|
||||||
import com.ruoyi.task.api.enums.StatusEnum;
|
import com.ruoyi.task.api.enums.StatusEnum;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
@ -15,6 +17,22 @@ public class TaskStatItemServiceDTO {
|
||||||
private Long planId;
|
private Long planId;
|
||||||
private String taskName;
|
private String taskName;
|
||||||
private String planName;
|
private String planName;
|
||||||
|
private PlanTypeEnum planType;
|
||||||
|
private CycleTypeEnum cycleType;
|
||||||
|
private Date planStartDate;
|
||||||
|
private Date planEndDate;
|
||||||
|
private String routeName;
|
||||||
|
private String airVendor;
|
||||||
|
private String airType;
|
||||||
|
|
||||||
|
public String getAirType() {
|
||||||
|
return airType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAirType(String airType) {
|
||||||
|
this.airType = airType;
|
||||||
|
}
|
||||||
|
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
private Date actualStartTime;
|
private Date actualStartTime;
|
||||||
|
|
@ -53,6 +71,54 @@ public class TaskStatItemServiceDTO {
|
||||||
this.planName = planName;
|
this.planName = planName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PlanTypeEnum getPlanType() {
|
||||||
|
return planType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlanType(PlanTypeEnum planType) {
|
||||||
|
this.planType = planType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CycleTypeEnum getCycleType() {
|
||||||
|
return cycleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCycleType(CycleTypeEnum cycleType) {
|
||||||
|
this.cycleType = cycleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getPlanStartDate() {
|
||||||
|
return planStartDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlanStartDate(Date planStartDate) {
|
||||||
|
this.planStartDate = planStartDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getPlanEndDate() {
|
||||||
|
return planEndDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlanEndDate(Date planEndDate) {
|
||||||
|
this.planEndDate = planEndDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRouteName() {
|
||||||
|
return routeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRouteName(String routeName) {
|
||||||
|
this.routeName = routeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAirVendor() {
|
||||||
|
return airVendor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAirVendor(String airVendor) {
|
||||||
|
this.airVendor = airVendor;
|
||||||
|
}
|
||||||
|
|
||||||
public Date getStartTime() {
|
public Date getStartTime() {
|
||||||
return startTime;
|
return startTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
package com.ruoyi.task.service.impl;
|
package com.ruoyi.task.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.airline.api.RemoteAirlineService;
|
||||||
|
import com.ruoyi.airline.api.domain.AirlineFileVO;
|
||||||
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.device.api.RemoteAircraftService;
|
||||||
import com.ruoyi.task.api.enums.StatusEnum;
|
import com.ruoyi.task.api.enums.StatusEnum;
|
||||||
import com.ruoyi.task.domain.api.ITaskDomain;
|
import com.ruoyi.task.domain.api.ITaskDomain;
|
||||||
import com.ruoyi.task.domain.api.ITaskPlanDomain;
|
import com.ruoyi.task.domain.api.ITaskPlanDomain;
|
||||||
|
|
@ -27,6 +32,12 @@ public class TaskServiceImpl implements ITaskService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITaskPlanDomain taskPlanDomain;
|
private ITaskPlanDomain taskPlanDomain;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RemoteAirlineService remoteAirlineService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RemoteAircraftService remoteAircraftService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createTaskWithoutPlan(TaskDTO taskDTO) {
|
public Long createTaskWithoutPlan(TaskDTO taskDTO) {
|
||||||
Task task = TaskDTOConvert.toDomain(taskDTO);
|
Task task = TaskDTOConvert.toDomain(taskDTO);
|
||||||
|
|
@ -313,9 +324,40 @@ public class TaskServiceImpl implements ITaskService {
|
||||||
TaskPlan plan = taskPlanDomain.getTaskPlanById(t.getPlanId());
|
TaskPlan plan = taskPlanDomain.getTaskPlanById(t.getPlanId());
|
||||||
if (plan != null) {
|
if (plan != null) {
|
||||||
item.setPlanName(plan.getPlanName());
|
item.setPlanName(plan.getPlanName());
|
||||||
|
item.setPlanType(plan.getPlanType());
|
||||||
|
item.setCycleType(plan.getCycleType());
|
||||||
|
item.setPlanStartDate(plan.getStartDate());
|
||||||
|
item.setPlanEndDate(plan.getEndDate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询航线名称
|
||||||
|
if (t.getRouteId() != null && t.getRouteId()>0L) {
|
||||||
|
try {
|
||||||
|
R<AirlineFileVO> airlineResult = remoteAirlineService.getFileById(t.getRouteId(), SecurityConstants.INNER);
|
||||||
|
if (airlineResult != null && airlineResult.getData() != null) {
|
||||||
|
item.setRouteName(airlineResult.getData().getName());
|
||||||
|
item.setAirVendor(airlineResult.getData().getAirVendor());
|
||||||
|
item.setAirType(airlineResult.getData().getAirType());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 忽略远程调用异常
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// // 查询无人机型号
|
||||||
|
// if (t.getUavId() != null) {
|
||||||
|
// try {
|
||||||
|
// Long aircraftId = Long.parseLong(t.getUavId());
|
||||||
|
// R<AircraftDetailVO> aircraftResult = remoteAircraftService.getAircraftDetail(aircraftId, SecurityConstants.INNER);
|
||||||
|
// if (aircraftResult != null && aircraftResult.getData() != null) {
|
||||||
|
// item.setAircraftModel(aircraftResult.getData().getAircraftModel());
|
||||||
|
// }
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// // 忽略远程调用异常或类型转换异常
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
days.computeIfAbsent(day, k -> new ArrayList<>()).add(item);
|
days.computeIfAbsent(day, k -> new ArrayList<>()).add(item);
|
||||||
total++;
|
total++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue