自动化立体仓库 - WMS系统
whycq
2023-01-30 4f4559efbe2d2f20f2c37d8582b74f0a558a54c7
src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -6,6 +6,8 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.OrderDetlService;
import com.zy.asrs.service.OrderService;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
@@ -74,9 +76,9 @@
    private String maktx;
    /**
     * 批号
     * 序列码
     */
    @ApiModelProperty(value= "批号")
    @ApiModelProperty(value= "序列码")
    private String batch;
    /**
@@ -285,6 +287,12 @@
    @ApiModelProperty(value= "备注")
    private String memo;
    /**
     * 库存汇总数量
     */
    @TableField(exist=false)
    private Double sum;
    public OrderDetl() {}
    public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, 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, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
@@ -443,4 +451,12 @@
        Synchro.Copy(source, this);
    }
    public Double getSum(){
        LocDetlService service = SpringUtils.getBean(LocDetlService.class);
        if (!Cools.isEmpty(this.getMatnr())) {
            return service.selectSumByMatnr(this.getMatnr());
        } else {
            return null;
        }
    }
}