修改参数
This commit is contained in:
parent
0bafff1d97
commit
d830046c00
|
|
@ -28,7 +28,7 @@ public class TaskStatControllerConvert {
|
||||||
dto.setTaskCategory(apiDTO.getTaskCategory());
|
dto.setTaskCategory(apiDTO.getTaskCategory());
|
||||||
dto.setTaskType(apiDTO.getTaskType());
|
dto.setTaskType(apiDTO.getTaskType());
|
||||||
dto.setStatusList(apiDTO.getStatusList());
|
dto.setStatusList(apiDTO.getStatusList());
|
||||||
dto.setRouteId(apiDTO.getRouteId());
|
dto.setRouteIdList(apiDTO.getRouteIdList());
|
||||||
dto.setUavId(apiDTO.getUavId());
|
dto.setUavId(apiDTO.getUavId());
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ public class TaskStatQueryServiceDTO {
|
||||||
/** 状态列表 */
|
/** 状态列表 */
|
||||||
private List<StatusEnum> statusList;
|
private List<StatusEnum> statusList;
|
||||||
|
|
||||||
/** 航线ID */
|
/** 航线ID列表 */
|
||||||
private Long routeId;
|
private List<Long> routeIdList;
|
||||||
|
|
||||||
/** 无人机ID */
|
/** 无人机ID */
|
||||||
private String uavId;
|
private String uavId;
|
||||||
|
|
@ -75,12 +75,12 @@ public class TaskStatQueryServiceDTO {
|
||||||
this.statusList = statusList;
|
this.statusList = statusList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getRouteId() {
|
public List<Long> getRouteIdList() {
|
||||||
return routeId;
|
return routeIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRouteId(Long routeId) {
|
public void setRouteIdList(List<Long> routeIdList) {
|
||||||
this.routeId = routeId;
|
this.routeIdList = routeIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUavId() {
|
public String getUavId() {
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,6 @@ public class TaskServiceImpl implements ITaskService {
|
||||||
@Override
|
@Override
|
||||||
public TaskStatByYearServiceDTO getTaskStatByYear(TaskStatQueryServiceDTO queryDTO) {
|
public TaskStatByYearServiceDTO getTaskStatByYear(TaskStatQueryServiceDTO queryDTO) {
|
||||||
Task task = new Task();
|
Task task = new Task();
|
||||||
task.setRouteId(queryDTO.getRouteId());
|
|
||||||
task.setUavId(queryDTO.getUavId());
|
task.setUavId(queryDTO.getUavId());
|
||||||
task.setTaskCategory(queryDTO.getTaskCategory());
|
task.setTaskCategory(queryDTO.getTaskCategory());
|
||||||
task.setTaskType(queryDTO.getTaskType());
|
task.setTaskType(queryDTO.getTaskType());
|
||||||
|
|
@ -212,6 +211,12 @@ public class TaskServiceImpl implements ITaskService {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果指定了航线ID列表,则过滤航线
|
||||||
|
if (queryDTO.getRouteIdList() != null && !queryDTO.getRouteIdList().isEmpty()
|
||||||
|
&& !queryDTO.getRouteIdList().contains(t.getRouteId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
calendar.setTime(t.getStartTime());
|
calendar.setTime(t.getStartTime());
|
||||||
int year = calendar.get(Calendar.YEAR);
|
int year = calendar.get(Calendar.YEAR);
|
||||||
if (year == queryDTO.getYear()) {
|
if (year == queryDTO.getYear()) {
|
||||||
|
|
@ -231,7 +236,6 @@ public class TaskServiceImpl implements ITaskService {
|
||||||
@Override
|
@Override
|
||||||
public TaskStatByMonthServiceDTO getTaskStatByMonth(TaskStatQueryServiceDTO queryDTO) {
|
public TaskStatByMonthServiceDTO getTaskStatByMonth(TaskStatQueryServiceDTO queryDTO) {
|
||||||
Task task = new Task();
|
Task task = new Task();
|
||||||
task.setRouteId(queryDTO.getRouteId());
|
|
||||||
task.setUavId(queryDTO.getUavId());
|
task.setUavId(queryDTO.getUavId());
|
||||||
task.setTaskCategory(queryDTO.getTaskCategory());
|
task.setTaskCategory(queryDTO.getTaskCategory());
|
||||||
task.setTaskType(queryDTO.getTaskType());
|
task.setTaskType(queryDTO.getTaskType());
|
||||||
|
|
@ -250,6 +254,12 @@ public class TaskServiceImpl implements ITaskService {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果指定了航线ID列表,则过滤航线
|
||||||
|
if (queryDTO.getRouteIdList() != null && !queryDTO.getRouteIdList().isEmpty()
|
||||||
|
&& !queryDTO.getRouteIdList().contains(t.getRouteId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
calendar.setTime(t.getStartTime());
|
calendar.setTime(t.getStartTime());
|
||||||
int year = calendar.get(Calendar.YEAR);
|
int year = calendar.get(Calendar.YEAR);
|
||||||
int month = calendar.get(Calendar.MONTH) + 1;
|
int month = calendar.get(Calendar.MONTH) + 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue