#
Junjie
2024-08-13 fc464a48c95cc0710d89501d9df99312c3efa603
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java
@@ -3,15 +3,17 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.common.utils.Synchro;
import com.zy.asrs.common.wms.service.DocTypeService;
import com.zy.asrs.common.wms.service.LocMastService;
import com.zy.asrs.common.wms.service.MatService;
import com.zy.asrs.common.wms.service.OrderService;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -33,12 +35,13 @@
    @ApiModelProperty(value= "")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Long id;
    /**
     * 库位号
     */
    @ApiModelProperty(value= "库位号")
    @TableField("loc_no")
    private String locNo;
    /**
@@ -69,6 +72,7 @@
    private String batch;
    @ApiModelProperty(value= "")
    @TableField("order_no")
    private String orderNo;
    /**
@@ -114,12 +118,15 @@
    private String manu;
    @ApiModelProperty(value= "")
    @TableField("manu_date")
    private String manuDate;
    @ApiModelProperty(value= "")
    @TableField("item_num")
    private String itemNum;
    @ApiModelProperty(value= "")
    @TableField("safe_qty")
    private Double safeQty;
    @ApiModelProperty(value= "")
@@ -132,21 +139,26 @@
    private Double volume;
    @ApiModelProperty(value= "")
    @TableField("three_code")
    private String threeCode;
    @ApiModelProperty(value= "")
    private String supp;
    @ApiModelProperty(value= "")
    @TableField("supp_code")
    private String suppCode;
    @ApiModelProperty(value= "")
    @TableField("be_batch")
    private Integer beBatch;
    @ApiModelProperty(value= "")
    @TableField("dead_time")
    private String deadTime;
    @ApiModelProperty(value= "")
    @TableField("dead_warn")
    private Integer deadWarn;
    @ApiModelProperty(value= "")
@@ -162,6 +174,7 @@
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @TableField("modi_user")
    private Long modiUser;
    /**
@@ -169,12 +182,14 @@
     */
    @ApiModelProperty(value= "修改时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("modi_time")
    private Date modiTime;
    /**
     * 创建者
     */
    @ApiModelProperty(value= "创建者")
    @TableField("appe_user")
    private Long appeUser;
    /**
@@ -182,6 +197,7 @@
     */
    @ApiModelProperty(value= "添加时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("appe_time")
    private Date appeTime;
    /**
@@ -194,11 +210,15 @@
     * 授权商户
     */
    @ApiModelProperty(value= "授权商户")
    @TableField("host_id")
    private Long hostId;
    @ApiModelProperty(value= "货主")
    private String owner;
    public LocDetl() {}
    public LocDetl(String locNo,String zpallet,Double anfme,String matnr,String maktx,String batch,String orderNo,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo,Long hostId) {
    public LocDetl(String locNo,String zpallet,Double anfme,String matnr,String maktx,String batch,String orderNo,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo,Long hostId,String owner) {
        this.locNo = locNo;
        this.zpallet = zpallet;
        this.anfme = anfme;
@@ -238,6 +258,7 @@
        this.appeTime = appeTime;
        this.memo = memo;
        this.hostId = hostId;
        this.owner = owner;
    }
//    LocDetl locDetl = new LocDetl(
@@ -281,6 +302,15 @@
//            null,    // 备注
//            null    // 授权商户
//    );
    public Mat getMat$(){
        MatService service = SpringUtils.getBean(MatService.class);
        Mat mat = service.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, matnr));
        if (!Cools.isEmpty(mat)){
            return mat;
        }
        return null;
    }
    public String getLocNo$(){
        LocMastService service = SpringUtils.getBean(LocMastService.class);
@@ -332,5 +362,21 @@
        return null;
    }
    public String getOrderType() {
        if (Cools.isEmpty(this.orderNo)){
            return "";
        }
        OrderService orderService = SpringUtils.getBean(OrderService.class);
        DocTypeService docTypeService = SpringUtils.getBean(DocTypeService.class);
        Order order = orderService.selectByNo(orderNo, hostId);
        if (order != null) {
            return order.getDocType$();
        }
        return this.orderNo;
    }
    public void sync(Object source) {
        Synchro.Copy(source, this);
    }
}