#
whycq
2024-07-15 b058b8c8be2267c2a0ba4e3916871ede64f53c47
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasConveyorSta.java
@@ -3,7 +3,9 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import com.zy.asrs.wcs.core.model.enums.SiteStatusType;
import com.zy.asrs.wcs.core.service.BasConveyorService;
import com.zy.asrs.wcs.rcs.model.enums.WorkModeType;
import com.zy.asrs.wcs.system.entity.Host;
import com.zy.asrs.wcs.system.entity.User;
import org.springframework.format.annotation.DateTimeFormat;
@@ -165,6 +167,30 @@
    @ApiModelProperty(value= "四向穿梭车所识别的二维码")
    private String qrCodeValue;
    /**
     * 工作号
     */
    @ApiModelProperty(value= "工作号")
    private Integer taskNo;
    /**
     * 工作模式
     */
    @ApiModelProperty(value= "工作模式")
    private Integer workMode;
    /**
     * 目标站
     */
    @ApiModelProperty(value= "目标站")
    private Integer staNo;
    /**
     * 条码器ID
     */
    @ApiModelProperty(value= "条码器ID")
    private Long barcodeId;
    public BasConveyorSta() {}
    public BasConveyorSta(Long conveyorId,Integer conveyorNo,Long updateBy,Long createBy,Date createTime,Date updateTime,String memo,Integer deleted,Long hostId,Integer siteNo,String inEnable,String outEnable,String autoing,String loading,String canining,String canouting,Integer locType1,Integer locType2,Integer locType3,String locNo,String qrCodeValue) {
@@ -319,5 +345,29 @@
        }
    }
    public String getWorkMode$() {
        if (null == this.workMode){ return null; }
        WorkModeType workModeType = WorkModeType.get(this.workMode.shortValue());
        if(!Cools.isEmpty(workModeType)){
            return workModeType.desc;
        }
        return null;
    }
    public String getSiteStatusType$() {
        String siteStatus = String.valueOf(SiteStatusType.process(this));
        return siteStatus.toLowerCase().replaceAll("_", "-");
    }
    public Long getConveyorDeviceId() {
        if (null == this.conveyorId){ return null; }
        BasConveyorService basConveyorService = SpringUtils.getBean(BasConveyorService.class);
        BasConveyor basConveyor = basConveyorService.getById(this.conveyorId);
        if (basConveyor == null) {
            return null;
        }
        return basConveyor.getDeviceId();
    }
}