自动化立体仓库 - WMS系统
#
yxFwq
1 天以前 c643491fffa78a9210abfa7cbdd9e0851648a3d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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;
 
/**
 * Created by vincent on 2022/4/21
 */
@Data
public class YXErpPakinParam {
    // 单据日期
    private String dAVDate; //必填
    private String dTVDate; //必填
    private String dVerifyDate;
    private String cODepCode = "01"; //必填
    private String cIRdCode = "107"; //必填
    private String cORdCode = "207"; //必填
    // 转入仓库编码
    private String cMaker = "WMS管理员";
    // 转出部门编码
    private String cVerifyPerson = "WMS管理员";
    // 转出仓库编码
    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 cbMemo; //必填
 
        // 物料编码  存货编码
        private String cAVCode; //必填
        private String cWhCode; //必填
        private String cInvCode; //必填
        private double iAVQuantity; //必填
        private String cAVBatch; //必填
        private String bAVType; //必填
        private Integer iGroupNO; //必填
 
        public Detl() {
        }
 
        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;
        }
    }
 
}