自动化立体仓库 - WMS系统
skyouc
5 天以前 08915b05c42b2ba97a8bb0809aeb48802ae63b46
src/main/java/com/zy/asrs/entity/WrkDetlLog.java
@@ -2,8 +2,13 @@
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.BasAreasService;
import com.zy.asrs.service.LocCacheService;
import com.zy.asrs.service.TaskLogService;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
@@ -12,6 +17,7 @@
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Objects;
@Data
@TableName("asr_wrk_detl_log")
@@ -69,6 +75,10 @@
    @ApiModelProperty(value= "单据编号")
    @TableField("order_no")
    private String orderNo;
    @ApiModelProperty(value= "单据id")
    @TableField("order_id")
    private Long orderId;
    /**
     * 规格
@@ -167,7 +177,8 @@
     * 长度
     */
    @ApiModelProperty(value= "长度")
    private Double length;
    @TableField("man_length")
    private Double manLength;
    /**
     * 体积
@@ -226,7 +237,7 @@
     * 要求检验 1: 是  0: 否
     */
    @ApiModelProperty(value= "要求检验 1: 是  0: 否  ")
    private Integer check;
    private Integer inspect;
    /**
     * 危险品 1: 是  0: 否
@@ -268,6 +279,95 @@
    @ApiModelProperty(value= "备注")
    private String memo;
    /**
     * 备用1
     */
    @ApiModelProperty(value= "备用1")
    private String standby1 = "";
    /**
     * 备用2
     */
    @ApiModelProperty(value= "备用2")
    private String standby2 = "";
    /**
     * 备用3
     */
    @ApiModelProperty(value= "备用3")
    private String standby3 = "";
    /**
     * 备用1
     */
    @ApiModelProperty(value= "备用1")
    @TableField("box_type1")
    private String boxType1 = "1";
    /**
     * 备用2
     */
    @ApiModelProperty(value= "备用2")
    @TableField("box_type2")
    private String boxType2 = "1";
    /**
     * 备用3
     */
    @ApiModelProperty(value= "备用3")
    @TableField("box_type3")
    private String boxType3 = "1";
    @ApiModelProperty("破损数")
    @TableField("adjust_qty")
    private Double adjustQty;
    @ApiModelProperty("上架数")
    @TableField("work_qty")
    private Double workQty;
    @ApiModelProperty("差异数")
    @TableField("splus_qty")
    private Double splusQty;
    /**
     * 获取库区类型
     *
     * @return java.lang.String
     * @author Ryan
     * @date 2026/1/19 14:07
     */
    public String getAreaType() {
        if (null == this.wrkNo) {
            return null;
        }
        TaskLogService taskLogService = SpringUtils.getBean(TaskLogService.class);
        TaskLog taskLog = taskLogService.selectOne(new EntityWrapper<TaskLog>().eq("wrk_no", this.wrkNo));
        if (Objects.isNull(taskLog)) {
            return null;
        }
        LocCacheService locCacheService = SpringUtils.getBean(LocCacheService.class);
        LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", taskLog.getLocNo()));
        if (Objects.isNull(locCache)) {
            return null;
        }
        BasAreasService basAreasService = SpringUtils.getBean(BasAreasService.class);
        BasAreas basAreas = basAreasService.selectById(locCache.getAreaId());
        if (Objects.isNull(basAreas)) {
            return null;
        }
        if (basAreas.getAreaNo().equals("SO")) {
            return "2";
        } else if (basAreas.getAreaNo().equals("EO")) {
            return "3";
        } else if (basAreas.getAreaNo().equals("LK")) {
            return "1";
        } else {
            return "4";
        }
    }
    public String getIoTime$(){
        if (Cools.isEmpty(this.ioTime)){
            return "";
@@ -301,15 +401,15 @@
        }
    }
    public String getCheck$(){
        if (null == this.check){ return null; }
        switch (this.check){
    public String getInspect$(){
        if (null == this.inspect){ return null; }
        switch (this.inspect){
            case 1:
                return "是";
            case 0:
                return "否";
            default:
                return String.valueOf(this.check);
                return String.valueOf(this.inspect);
        }
    }
@@ -357,5 +457,7 @@
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
    }
    public void sync(Object source) {
        Synchro.Copy(source, this);
    }
}