| | |
| | | import com.zy.acs.manager.manager.service.AgvService; |
| | | import com.zy.acs.manager.manager.service.CodeService; |
| | | import com.zy.acs.manager.manager.service.TaskService; |
| | | import com.zy.acs.manager.manager.service.TravelService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer backpack; |
| | | |
| | | /** |
| | | * 算法耗时 |
| | | */ |
| | | @ApiModelProperty(value= "算法耗时") |
| | | private Integer algoTime; |
| | | |
| | | /** |
| | | * 进度 |
| | | */ |
| | | @ApiModelProperty(value= "进度") |
| | |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | private Long tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Integer createBy; |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Integer updateBy; |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | |
| | | |
| | | public Segment() {} |
| | | |
| | | public Segment(String uuid,Long travelId,Long taskId,Long agvId,Integer serial,Long startNode,Long endNode,String state,Integer status,Integer deleted,Integer tenantId,Integer createBy,Date createTime,Integer updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | this.travelId = travelId; |
| | | this.taskId = taskId; |
| | | this.agvId = agvId; |
| | | this.serial = serial; |
| | | this.startNode = startNode; |
| | | this.endNode = endNode; |
| | | this.state = state; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | public String getTravelId$(){ |
| | | TravelService service = SpringUtils.getBean(TravelService.class); |
| | | Travel travel = service.getById(this.travelId); |
| | | if (!Cools.isEmpty(travel)){ |
| | | return String.valueOf(travel.getUuid()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // Segment segment = new Segment( |
| | | // null, // 编号 |
| | | // null, // 任务组 |
| | | // null, // 任务 |
| | | // null, // AGV |
| | | // null, // 序号 |
| | | // null, // 起始节点 |
| | | // null, // 目标节点 |
| | | // null, // 进度 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getTaskId$(){ |
| | | TaskService service = SpringUtils.getBean(TaskService.class); |
| | |
| | | CodeService service = SpringUtils.getBean(CodeService.class); |
| | | Code code = service.getById(this.startNode); |
| | | if (!Cools.isEmpty(code)){ |
| | | return String.valueOf(code.getUuid()); |
| | | return String.valueOf(code.getData()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | CodeService service = SpringUtils.getBean(CodeService.class); |
| | | Code code = service.getById(this.endNode); |
| | | if (!Cools.isEmpty(code)){ |
| | | return String.valueOf(code.getUuid()); |
| | | return String.valueOf(code.getData()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | return true; |
| | | case 0: |
| | | return "冻结"; |
| | | return false; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public String getDeleted$(){ |
| | | if (null == this.deleted){ return null; } |
| | | switch (this.deleted){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.deleted); |
| | | } |
| | | public String getSegDesc() { |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |