自动化立体仓库 - WMS系统
#
yxFwq
1 天以前 c643491fffa78a9210abfa7cbdd9e0851648a3d7
src/main/java/com/zy/common/model/YXErpPakinParam.java
@@ -1,7 +1,10 @@
package com.zy.common.model;
import com.core.common.DateUtils;
import com.zy.asrs.entity.OrderDetl;
import lombok.Data;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -11,55 +14,106 @@
 */
@Data
public class YXErpPakinParam {
    // 库存调拨单号
    private String cTVCode; //必填
    // 单据日期
    private String dAVDate; //必填
    private String dTVDate; //必填
    // 转出仓库编码
    private String cOWhCode = "100";
    private String dVerifyDate;
    private String cODepCode = "01"; //必填
    private String cIRdCode = "107"; //必填
    private String cORdCode = "207"; //必填
    // 转入仓库编码
    private String cIWhCode = "201";
    // 转出部门编码
    private String cODepCode;
    // 转入部门编码
    private String cIDepCode;
    // 入库类别编码
    private String cIRdCode = "105";
    // 出库类别编码
    private String cORdCode = "205";
    // 制单人
    private String cMaker = "WMS管理员";
    // 审核人
    // 转出部门编码
    private String cVerifyPerson = "WMS管理员";
    // 审核日期
    private String dVerifyDate; //必填
    // 转出仓库编码
    private String cAVMemo = "备注";
    private String cAVCode;
    private List<Detl> detail = new ArrayList<>();
    public YXErpPakinParam() {
        this.dTVDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dAVDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dVerifyDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
    }
    public YXErpPakinParam(String cAVCod, String cAVMemo) {
        this.dTVDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dAVDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dVerifyDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.cAVCode = cAVCod;
        this.cAVMemo = cAVMemo;
    }
    public YXErpPakinParam(String dTVDate, String cAVMemo, String cAVCod, List<Detl> detail) {
        this.dTVDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dAVDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dVerifyDate = DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F);
        this.dTVDate = dTVDate;
        this.cAVMemo = cAVMemo;
        this.cAVCode = cAVCod;
        this.detail = detail;
    }
    public YXErpPakinParam(String cODepCode, String cIRdCode, String cORdCode, String cAVMemo, String cMaker, String cVerifyPerson, List<Detl> detail) {
        this.dTVDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        this.dAVDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        this.dVerifyDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        this.cODepCode = cODepCode;
        this.cIRdCode = cIRdCode;
        this.cORdCode = cORdCode;
        this.cAVMemo = cAVMemo;
        this.cMaker = cMaker;
        this.cVerifyPerson = cVerifyPerson;
        this.detail = detail;
    }
    @Data
    public static class Detl {
        // 库存调拨单号
        private String cTVCode; //必填
        private String cbMemo; //必填
        // 物料编码  存货编码
        private String cAVCode; //必填
        private String cWhCode; //必填
        private String cInvCode; //必填
        // 物料条码
//        private String barcode;
        // 数量
//        private Double anfme;
        private Double iTVQuantity; //必填
        private double iAVQuantity; //必填
        private String cAVBatch; //必填
        private String bAVType; //必填
        private Integer iGroupNO; //必填
        public Detl() {
        }
        public Detl(String cTVCode, String cInvCode, Double iTVQuantity) {
            this.cTVCode = cTVCode;
            this.cInvCode = cInvCode;
            this.iTVQuantity = iTVQuantity;
        public Detl(OrderDetl orderDetl,boolean bool) {
            if (bool){
                Detl1(orderDetl);
            } else {
                Detl2(orderDetl);
            }
        }
        public void Detl1(OrderDetl orderDetl) {
            this.cbMemo = orderDetl.getMemo();
            this.cAVCode = orderDetl.getOrderNo();
            this.cWhCode = "100";
            this.cInvCode = orderDetl.getMatnr$();
            this.iAVQuantity = orderDetl.getWeight();
            this.cAVBatch = orderDetl.getBatch();
            this.bAVType = "转换前";
            this.iGroupNO = 1;
        }
        public void Detl2(OrderDetl orderDetl) {
            this.cbMemo = orderDetl.getMemo();
            this.cAVCode = orderDetl.getOrderNo();
            this.cWhCode = "201";
            this.cInvCode = orderDetl.getMatnr();
            this.iAVQuantity = orderDetl.getWeight();
            this.cAVBatch = orderDetl.getBatch();
            this.bAVType = "转换后";
            this.iGroupNO = 1;
        }
    }