zhou zhou
13 小时以前 10776dd6f7f9ef9e47419427fcb1b692ed73d54d
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Task.java
@@ -34,7 +34,7 @@
import java.io.Serializable;
import java.util.Date;
import java.util.stream.Collectors;
import com.vincent.rsf.server.manager.service.BasStationService;
@Data
@Accessors(chain = true)
@TableName("man_task")
@@ -52,6 +52,9 @@
     */
    @ApiModelProperty(value= "任务号")
    private String taskCode;
    @ApiModelProperty("任务来源")
    private Short resource;
    /**
     * 任务状态
@@ -197,6 +200,24 @@
     */
    @ApiModelProperty(value= "备注")
    private String memo;
    /**
     * 路径ID
     */
    @ApiModelProperty(value= "路径ID")
    private Long deviceSiteId;
    /**
     * 步序起点
     */
    @ApiModelProperty(value= "步序起点")
    private String souStep;
    /**
     * 步序终点
     */
    @ApiModelProperty(value= "步序终点")
    private String endStep;
    public Task() {}
@@ -369,5 +390,36 @@
                return null;
        }
    }
    /**
     * 获取源站点名称(站点编号 + 站点名称)
     */
    public String getOrgSite$(){
        if (Cools.isEmpty(this.orgSite)) {
            return this.orgSite;
        }
        BasStationService basStationService = SpringUtils.getBean(BasStationService.class);
        BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                .eq(BasStation::getStationName, this.orgSite));
        if (!Cools.isEmpty(station) && !Cools.isEmpty(station.getStationId())) {
            return this.orgSite + "(" + station.getStationId() + ")";
        }
        return this.orgSite;
    }
    /**
     * 获取目标站点名称(站点编号 + 站点名称)
     */
    public String getTargSite$(){
        if (Cools.isEmpty(this.targSite)) {
            return this.targSite;
        }
        BasStationService basStationService = SpringUtils.getBean(BasStationService.class);
        BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                .eq(BasStation::getStationName, this.targSite));
        if (!Cools.isEmpty(station) && !Cools.isEmpty(station.getStationId())) {
            return this.targSite + "(" + station.getStationId() + ")";
        }
        return this.targSite;
    }
}