自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-08-17 e62e7a23106aaab8e643ec44ee90b608f2405b03
src/main/java/com/zy/asrs/utils/VersionUtils.java
@@ -3,28 +3,31 @@
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.MatCode;
import com.zy.asrs.entity.WrkDetl;
import com.zy.common.utils.excel.matcode.MatCodeExcel;
/**
 * Created by vincent on 2020/7/14
 */
public class VersionUtils {
    // 业务 ----------------------------------------------------------------------
    public static void setWrkDetl(WrkDetl wrkDetl, MatCode matCode) {
        wrkDetl.setMatnr(matCode.getMatNo()); // 物料编号
        wrkDetl.setMaktx(matCode.getMatName()); // 物料描述
        wrkDetl.setLgnum(matCode.getStr2()); // 规格
        wrkDetl.setZmatid(matCode.getStr3()); // 颜色
        wrkDetl.setColor(matCode.getStr3()); // 助记码
        wrkDetl.setAltme(matCode.getStr1()); // 单位
        wrkDetl.setBname(matCode.getStr4()); // 用户ID
        wrkDetl.setBname(matCode.getStr4()); // 客户
    }
    public static void setWrkDetl(WrkDetl wrkDetl, LocDetl locDetl) {
        wrkDetl.setMatnr(locDetl.getMatnr()); // 物料编号
        wrkDetl.setMaktx(locDetl.getMaktx()); // 物料描述
        wrkDetl.setLgnum(locDetl.getLgnum()); // 规格
        wrkDetl.setZmatid(locDetl.getZmatid()); // 颜色
        wrkDetl.setColor(locDetl.getColor()); // 助记码
        wrkDetl.setBname(locDetl.getBname()); // 客户
        wrkDetl.setAltme(locDetl.getAltme()); // 单位
        wrkDetl.setBname(locDetl.getBname()); // 用户ID
        wrkDetl.setZpallet(locDetl.getZpallet()); // 托盘条码
    }
@@ -32,20 +35,95 @@
        locDetl.setMatnr(matCode.getMatNo()); // 物料编号
        locDetl.setMaktx(matCode.getMatName()); // 物料描述
        locDetl.setLgnum(matCode.getStr2()); // 规格
        locDetl.setZmatid(matCode.getStr3()); // 颜色
        locDetl.setColor(matCode.getStr3()); // 助记码
        locDetl.setBname(matCode.getStr4()); // 客户
        locDetl.setAltme(matCode.getStr1()); // 单位
        locDetl.setBname(matCode.getStr4()); // 用户ID
    }
    public static void setLocDetl(LocDetl locDetl, WrkDetl wrkDetl) {
        locDetl.setMatnr(wrkDetl.getMatnr()); // 物料编号
        locDetl.setMaktx(wrkDetl.getMaktx()); // 物料描述
        locDetl.setLgnum(wrkDetl.getLgnum()); // 规格
        locDetl.setZmatid(wrkDetl.getZmatid()); // 颜色
        locDetl.setColor(wrkDetl.getColor()); // 助记码
        locDetl.setBname(wrkDetl.getBname()); // 客户
        locDetl.setAnfme(wrkDetl.getAnfme()); // 数量
        locDetl.setAltme(wrkDetl.getAltme()); // 单位
        locDetl.setBname(wrkDetl.getBname()); // 用户ID
        locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码
    }
    // excel ----------------------------------------------------------------------
    public static MatCodeExcel getExcel(MatCode matCode) {
        return new MatCodeExcel(
                matCode.getMatNo(),
                matCode.getBarcode(),
                matCode.getMatName(),
                matCode.getStr1(),
                matCode.getStr2(),
                matCode.getStr3(),
                matCode.getStr4(),
                matCode.getStr5(),
                matCode.getStr6(),
                matCode.getStr7(),
                matCode.getStr8(),
                matCode.getStr9(),
                matCode.getStr10(),
                matCode.getStr11(),
                matCode.getStr12(),
                matCode.getStr13(),
                matCode.getStr14(),
                matCode.getStr15(),
                matCode.getStr16(),
                matCode.getStr17(),
                matCode.getStr18(),
                matCode.getStr19(),
                matCode.getStr20(),
                matCode.getStr21(),
                matCode.getStr22(),
                matCode.getStr23(),
                matCode.getNum1(),
                matCode.getNum2(),
                matCode.getNum3(),
                matCode.getNum4(),
                matCode.getNum5(),
                matCode.getNum6()
        );
    }
    public static void setMatCode(MatCode matCode, MatCodeExcel excel) {
        matCode.setMatNo(excel.getMatNo());
        matCode.setMatName(excel.getMatName());
        matCode.setBarcode(excel.getBarcode());
        matCode.setStr1(excel.getStr1());
        matCode.setStr2(excel.getStr2());
        matCode.setStr3(excel.getStr3());
        matCode.setStr4(excel.getStr4());
        matCode.setStr5(excel.getStr5());
        matCode.setStr6(excel.getStr6());
        matCode.setStr7(excel.getStr7());
        matCode.setStr8(excel.getStr8());
        matCode.setStr9(excel.getStr9());
        matCode.setStr10(excel.getStr10());
        matCode.setStr11(excel.getStr11());
        matCode.setStr12(excel.getStr12());
        matCode.setStr13(excel.getStr13());
        matCode.setStr14(excel.getStr14());
        matCode.setStr15(excel.getStr15());
        matCode.setStr16(excel.getStr16());
        matCode.setStr17(excel.getStr17());
        matCode.setStr18(excel.getStr18());
        matCode.setStr19(excel.getStr19());
        matCode.setStr20(excel.getStr20());
        matCode.setStr21(excel.getStr21());
        matCode.setStr22(excel.getStr22());
        matCode.setStr23(excel.getStr23());
        matCode.setNum1(excel.getNum1());
        matCode.setNum2(excel.getNum2());
        matCode.setNum3(excel.getNum3());
        matCode.setNum4(excel.getNum4());
        matCode.setNum5(excel.getNum5());
        matCode.setNum6(excel.getNum6());
    }
}