自动化立体仓库 - WMS系统
skyouc
3 天以前 88fc713144a877a4257b4173fbfadafd926c94de
src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -1,22 +1,29 @@
package com.zy.asrs.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.BasProcessProceduresService;
import com.zy.asrs.service.BasQualityTestingService;
import com.zy.asrs.service.OrderService;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@Data
@TableName("man_order_detl")
@@ -42,6 +49,7 @@
     * 单据编号
     */
    @ApiModelProperty(value= "单据编号")
    @ExcelProperty(index = 0, value = "单号")
    @TableField("order_no")
    private String orderNo;
@@ -50,6 +58,7 @@
     * 数量
     */
    @ApiModelProperty(value= "数量")
    @ExcelProperty(value = "数量")
    private Double anfme;
    /**
@@ -75,30 +84,35 @@
     * 商品编码
     */
    @ApiModelProperty(value= "商品编码")
    @ExcelProperty(value = "商品编码")
    private String matnr;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    @ExcelProperty(value = "商品名称")
    private String maktx;
    /**
     * 批号
     */
    @ApiModelProperty(value= "批号")
    @ExcelProperty(value = "批号")
    private String batch;
    /**
     * 规格
     */
    @ApiModelProperty(value= "规格")
    @ExcelProperty(value = "规格")
    private String specs;
    /**
     * 型号
     */
    @ApiModelProperty(value= "型号")
    @ExcelProperty(value = "型号")
    private String model;
    /**
@@ -111,12 +125,14 @@
     * 品牌
     */
    @ApiModelProperty(value= "品牌")
    @ExcelProperty(value = "品牌")
    private String brand;
    /**
     * 单位
     */
    @ApiModelProperty(value= "单位")
    @ExcelProperty(value = "单位")
    private String unit;
    /**
@@ -141,6 +157,7 @@
     * 条码
     */
    @ApiModelProperty(value= "条码")
    @ExcelProperty(value = "SN码")
    private String barcode;
    /**
@@ -174,6 +191,7 @@
     */
    @ApiModelProperty(value= "安全库存量")
    @TableField("safe_qty")
    @ExcelProperty(value = "归零阀值")
    private Double safeQty;
    /**
@@ -193,6 +211,7 @@
     * 体积
     */
    @ApiModelProperty(value= "体积")
    @ExcelProperty(value = "km/cm")
    private Double volume;
    /**
@@ -308,25 +327,46 @@
     */
    @ApiModelProperty(value= "行号")
    @TableField("line_number")
    private Integer lineNumber;
    private Long lineNumber;
    /**
     * 备用1
     */
    @ApiModelProperty(value= "备用1")
    private String standby1;
    private String standby1 = "";
    /**
     * 备用2
     */
    @ApiModelProperty(value= "备用2")
    private String standby2;
    private String standby2 = "";
    /**
     * 备用3
     */
    @ApiModelProperty(value= "备用3")
    private String standby3;
    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";
    public OrderDetl() {}
@@ -549,7 +589,27 @@
                        && this.standby1.equals(orderDetl.getStandby1())
                        && this.standby2.equals(orderDetl.getStandby2())
                        && this.standby3.equals(orderDetl.getStandby3())
                        && this.boxType1.equals(orderDetl.getBoxType1())
                        && this.boxType2.equals(orderDetl.getBoxType2())
                        && this.boxType3.equals(orderDetl.getBoxType3())
        );
    }
    public static OrderDetl find(List<OrderDetl> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) {
        if (Cools.isEmpty(matnr)) {
            return null;
        }
        for (OrderDetl detlDto : detlDtos) {
            if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())
                    && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1())
                    && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3())
                    && boxType1.equals(detlDto.getBoxType1())
                    && boxType2.equals(detlDto.getBoxType2()) && boxType3.equals(detlDto.getBoxType3())
            ) {
                return detlDto;
            }
        }
        return null;
    }
    public String getPakinPakoutStatus$(){
@@ -564,9 +624,28 @@
        }
    }
    public String getBoxType1$(){
        BasProcessProceduresService service = SpringUtils.getBean(BasProcessProceduresService.class);
        BasProcessProcedures processProcedures = service.selectOne(new EntityWrapper<BasProcessProcedures>().eq("box_type", this.boxType1));
        if (!Cools.isEmpty(processProcedures)){
            return String.valueOf(processProcedures.getBoxSpecs());
        }
        return this.boxType1;
    }
    public String getBoxType2$(){
        BasQualityTestingService service = SpringUtils.getBean(BasQualityTestingService.class);
        BasQualityTesting basQualityTesting = service.selectOne(new EntityWrapper<BasQualityTesting>().eq("box_type", this.boxType1));
        if (!Cools.isEmpty(basQualityTesting)){
            return String.valueOf(basQualityTesting.getBoxSpecs());
        }
        return this.boxType1;
    }
    public void sync(Object source) {
        Synchro.Copy(source, this);
        if (!Objects.isNull(source)) {
            BeanUtils.copyProperties(source, this);
        }
    }
}