zhang
2025-05-20 1313906bb1eb983d3beece810035e7fc28d6a92f
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Segment.java
@@ -8,6 +8,7 @@
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;
@@ -88,6 +89,12 @@
    private Integer backpack;
    /**
     * 算法耗时
     */
    @ApiModelProperty(value= "算法耗时")
    private Integer algoTime;
    /**
     * 进度
     */
    @ApiModelProperty(value= "进度")
@@ -143,43 +150,14 @@
    public Segment() {}
    public Segment(String uuid,Long travelId,Long taskId,Long agvId,Integer serial,Long startNode,Long endNode,String state,Integer status,Integer deleted,Long tenantId,Long createBy,Date createTime,Long 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);
@@ -203,7 +181,7 @@
        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;
    }
@@ -212,24 +190,10 @@
        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$(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return "正常";
            case 0:
                return "冻结";
            default:
                return String.valueOf(this.status);
        }
    }
    public Boolean getStatusBool(){
        if (null == this.status){ return null; }
@@ -243,4 +207,9 @@
        }
    }
}
    public String getSegDesc() {
        return "";
    }
}