| | |
| | | @ApiModelProperty(value = "任务处理时限(分钟)") |
| | | private Integer processingTimeLimit; |
| | | |
| | | |
| | | @ApiModelProperty(value = "可以操作到达的配置范围,单位米") |
| | | private Double canArriveRange; |
| | | } |
| | |
| | | private Integer status; |
| | | @ApiModelProperty(value = "车牌号") |
| | | private String plateNumber; |
| | | |
| | | @ApiModelProperty(value = "当前位置经度") |
| | | private Double longitude; |
| | | |
| | | @ApiModelProperty(value = "当前位置纬度") |
| | | private Double latitude; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiModelProperty(value = "任务紧急程度 0=P0 1=P1 2=P2 3=P3") |
| | | private Integer taskUrgencyLevel; |
| | | @ApiModelProperty(value = "任务处理时限") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime endTime; |
| | | @ApiModelProperty(value = "车牌号") |
| | | private String plateNumber; |
| | |
| | | @ApiModelProperty(value = "任务创建人") |
| | | private String createBy; |
| | | @ApiModelProperty(value = "任务创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "任务编号") |
| | |
| | | private String taskDescription; |
| | | @ApiModelProperty(value = "任务描述图片") |
| | | private String taskImage; |
| | | |
| | | @ApiModelProperty(value = "车辆经度") |
| | | private BigDecimal vehicleLon; |
| | | |
| | | @ApiModelProperty(value = "车辆纬度") |
| | | private BigDecimal vehicleLat; |
| | | |
| | | @ApiModelProperty(value = "可以操作到达的配置范围,单位米") |
| | | private Double canArriveRange = 200D; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "任务紧急程度 0=P0 1=P1 2=P2 3=P3") |
| | | private Integer taskUrgencyLevel; |
| | | @ApiModelProperty(value = "任务处理时限") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime endTime; |
| | | @ApiModelProperty(value = "车辆位置") |
| | | private String vehicleLocation; |
| | |
| | | |
| | | @ApiModelProperty(value = "状态 0=待到达 1=待处理 2=已完成 3=已取消") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "可以操作到达的配置范围,单位米") |
| | | private Double canArriveRange = 200D; |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | private XpVehicleClient xpVehicleClient; |
| | | @Autowired |
| | | private XpTaskRuleMapper xpTaskRuleMapper; |
| | | @Override |
| | | public PageInfo<WorkBenchVO> workbench(WorkBenchQuery query) { |
| | | PageInfo<WorkBenchVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | |
| | | } |
| | | PageInfo<TaskPageListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TaskPageListVO> list = this.baseMapper.pageList(pageInfo, query); |
| | | XpTaskRule xpTaskRule = xpTaskRuleMapper.selectOne(new LambdaQueryWrapper<XpTaskRule>().last("limit 1")); |
| | | if (Objects.nonNull(xpTaskRule)) { |
| | | list.stream().filter(item -> item.getTaskCategory().equals(2)).forEach(item->{ |
| | | item.setCanArriveRange(xpTaskRule.getCanArriveRange()); |
| | | }); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | res.setTaskCode(task.getTaskCode()); |
| | | res.setTaskCategory(task.getTaskCategory()); |
| | | res.setTaskTypeId(task.getTaskTypeId()); |
| | | res.setVehicleLon(task.getVehicleLon()); |
| | | res.setVehicleLat(task.getVehicleLat()); |
| | | Map<Long, List<XpErrorType>> errorType = errorTypeMapper.selectList(new LambdaQueryWrapper<XpErrorType>() |
| | | .in(XpErrorType::getId, Arrays.asList(task.getTaskTypeId().split(",")))) |
| | | .stream().collect(Collectors.groupingBy(XpErrorType::getParentId)); |
| | |
| | | res.setStatus(task.getStatus()); |
| | | res.setTaskDescription(task.getTaskDescription()); |
| | | res.setTaskImage(task.getTaskImage()); |
| | | XpTaskRule xpTaskRule = xpTaskRuleMapper.selectOne(new LambdaQueryWrapper<XpTaskRule>().last("limit 1")); |
| | | if (Objects.nonNull(xpTaskRule)) { |
| | | res.setCanArriveRange(xpTaskRule.getCanArriveRange()); |
| | | } |
| | | return R.ok(res); |
| | | } |
| | | |
| | |
| | | </select> |
| | | <select id="pageList" resultType="com.xiaopeng.maintenance.model.vo.TaskPageListVO"> |
| | | select t1.id,t1.task_code as taskCode,t1.end_time as endTime,t1.task_category as taskCategory,t1.task_type_id as taskTypeId,t1.task_urgency_level as taskUrgencyLevel,t1.task_description as taskDescription,t1.vehicle_location as vehicleLocation,t1.vehicle_id as vehicleId,t1.vehicle_lon as vehicleLon,t1.vehicle_lat as vehicleLat,t1.handle_user_id as handleUserId,t1.handle_time as handleTime,t1.assignee_user_id as assigneeUserId |
| | | ,t1.assignee_time as assigneeTime,t1.task_image,taskImage,t1.report_user_id as reportUserId,t1.report_time as reportTime,t1.status as status,t1.is_deleted as isDeleted,t1.create_time as createTime,t1.update_time as updateTime,t1.create_by as createBy,t1.update_by as updateBy,t2.plate_number as plateNumber |
| | | ,t1.assignee_time as assigneeTime,t1.task_image as taskImage,t1.report_user_id as reportUserId,t1.report_time as reportTime,t1.status as status,t1.is_deleted as isDeleted,t1.create_time as createTime,t1.update_time as updateTime,t1.create_by as createBy,t1.update_by as updateBy,t2.plate_number as plateNumber |
| | | from xp_task t1 |
| | | left join xp_vehicle t2 on t1.vehicle_id = t2.id |
| | | where t1.is_deleted = 0 |