feat: 获取任务列表及图片根据当前登录人查询
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
package com.central.order.mission.vo;
|
||||
|
||||
import com.central.order.mission.model.Mission;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 任务VO类(用于返回,时间格式化)
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-12-22
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "任务VO")
|
||||
public class MissionVO {
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "任务编码(J前缀)")
|
||||
private String missionCode;
|
||||
|
||||
@Schema(description = "任务名称")
|
||||
private String missionName;
|
||||
|
||||
@Schema(description = "任务类型(1:航线任务, 2:一键起飞任务)")
|
||||
private Integer missionType;
|
||||
|
||||
@Schema(description = "设备序列号(机库SN)")
|
||||
private String deviceSn;
|
||||
|
||||
@Schema(description = "航线ID(航线任务必填)")
|
||||
private String waylineId;
|
||||
|
||||
@Schema(description = "航线名称")
|
||||
private String waylineName;
|
||||
|
||||
@Schema(description = "无人船航线ID(无人船任务必填)")
|
||||
private String boatRouteId;
|
||||
|
||||
@Schema(description = "无人船航线名称")
|
||||
private String boatRouteName;
|
||||
|
||||
@Schema(description = "工作区ID")
|
||||
private String workspaceId;
|
||||
|
||||
@Schema(description = "景区ID")
|
||||
private Long tourismId;
|
||||
|
||||
@Schema(description = "任务状态(1:待执行, 2:已取消, 3:执行完成, 4:执行中, 5:图片上传中, 6:图片上传完成)")
|
||||
private Integer missionStatus;
|
||||
|
||||
@Schema(description = "目标纬度(一键起飞任务)")
|
||||
private BigDecimal targetLatitude;
|
||||
|
||||
@Schema(description = "目标经度(一键起飞任务)")
|
||||
private BigDecimal targetLongitude;
|
||||
|
||||
@Schema(description = "目标高度(一键起飞任务,米)")
|
||||
private BigDecimal targetHeight;
|
||||
|
||||
@Schema(description = "任务开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "任务结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "创建人ID")
|
||||
private Long creatorId;
|
||||
|
||||
@Schema(description = "创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
@Schema(description = "删除标记(0:正常, 1:已删除)")
|
||||
private Integer isDel;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "景区名称(联表查询)")
|
||||
private String tourismName;
|
||||
|
||||
@Schema(description = "任务图片数量")
|
||||
private Integer imageCount;
|
||||
|
||||
@Schema(description = "任务类型描述")
|
||||
private String missionTypeDesc;
|
||||
|
||||
@Schema(description = "任务状态描述")
|
||||
private String missionStatusDesc;
|
||||
|
||||
/**
|
||||
* 从Mission实体转换为VO
|
||||
*/
|
||||
public static MissionVO fromMission(Mission mission) {
|
||||
if (mission == null) {
|
||||
return null;
|
||||
}
|
||||
MissionVO vo = new MissionVO();
|
||||
vo.setId(mission.getId());
|
||||
vo.setMissionCode(mission.getMissionCode());
|
||||
vo.setMissionName(mission.getMissionName());
|
||||
vo.setMissionType(mission.getMissionType());
|
||||
vo.setDeviceSn(mission.getDeviceSn());
|
||||
vo.setWaylineId(mission.getWaylineId());
|
||||
vo.setWaylineName(mission.getWaylineName());
|
||||
vo.setBoatRouteId(mission.getBoatRouteId());
|
||||
vo.setBoatRouteName(mission.getBoatRouteName());
|
||||
vo.setWorkspaceId(mission.getWorkspaceId());
|
||||
vo.setTourismId(mission.getTourismId());
|
||||
vo.setMissionStatus(mission.getMissionStatus());
|
||||
vo.setTargetLatitude(mission.getTargetLatitude());
|
||||
vo.setTargetLongitude(mission.getTargetLongitude());
|
||||
vo.setTargetHeight(mission.getTargetHeight());
|
||||
vo.setStartTime(mission.getStartTime());
|
||||
vo.setEndTime(mission.getEndTime());
|
||||
vo.setCreatorId(mission.getCreatorId());
|
||||
vo.setCreatorName(mission.getCreatorName());
|
||||
vo.setRemark(mission.getRemark());
|
||||
vo.setTenantId(mission.getTenantId());
|
||||
vo.setIsDel(mission.getIsDel());
|
||||
vo.setCreateTime(mission.getCreateTime());
|
||||
vo.setUpdateTime(mission.getUpdateTime());
|
||||
vo.setTourismName(mission.getTourismName());
|
||||
vo.setImageCount(mission.getImageCount());
|
||||
vo.setMissionTypeDesc(mission.getMissionTypeDesc());
|
||||
vo.setMissionStatusDesc(mission.getMissionStatusDesc());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user