|  |  | 
 |  |  | package com.zy.asrs.utils; | 
 |  |  |  | 
 |  |  | import com.zy.asrs.entity.LocDetl; | 
 |  |  | import com.zy.asrs.entity.MatCode; | 
 |  |  | import com.zy.asrs.entity.WrkDetl; | 
 |  |  | import com.zy.asrs.entity.LocMast; | 
 |  |  | import com.zy.common.model.LocTypeDto; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * Created by vincent on 2020/7/14 | 
 |  |  | 
 |  |  |  | 
 |  |  |     // 业务 ---------------------------------------------------------------------- | 
 |  |  |  | 
 |  |  |     public static void setWrkDetl(WrkDetl wrkDetl, MatCode matCode) { | 
 |  |  |         wrkDetl.setMatnr(matCode.getMatNo()); // 物料编号 | 
 |  |  |         wrkDetl.setMaktx(matCode.getMatName()); // 物料描述 | 
 |  |  |         wrkDetl.setLgnum(matCode.getStr2()); // 规格 | 
 |  |  |         wrkDetl.setColor(matCode.getStr3()); // 助记码 | 
 |  |  |         wrkDetl.setAltme(matCode.getStr1()); // 单位 | 
 |  |  |         wrkDetl.setBname(matCode.getStr4()); // 客户 | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      *  库位移转时类型检测 | 
 |  |  |      **/ | 
 |  |  |     public static void locMoveCheckLocType(LocMast sourceLoc, LocMast loc){ | 
 |  |  |         // 如果源库位是高库位,目标库位是低库位 | 
 |  |  | //        if (sourceLoc.getLocType1() == 2 && loc.getLocType1() == 1) { | 
 |  |  | //            throw new CoolException("高库位不能移转至低库位"); | 
 |  |  | //        } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public static void setWrkDetl(WrkDetl wrkDetl, LocDetl locDetl) { | 
 |  |  |         wrkDetl.setMatnr(locDetl.getMatnr()); // 物料编号 | 
 |  |  |         wrkDetl.setMaktx(locDetl.getMaktx()); // 物料描述 | 
 |  |  |         wrkDetl.setLgnum(locDetl.getLgnum()); // 规格 | 
 |  |  |         wrkDetl.setColor(locDetl.getColor()); // 助记码 | 
 |  |  |         wrkDetl.setBname(locDetl.getBname()); // 客户 | 
 |  |  |         wrkDetl.setAltme(locDetl.getAltme()); // 单位 | 
 |  |  |         wrkDetl.setZpallet(locDetl.getZpallet()); // 托盘条码 | 
 |  |  |     } | 
 |  |  |     /** | 
 |  |  |      *  库位移转时类型检测 | 
 |  |  |      **/ | 
 |  |  |     public static boolean locMoveCheckLocType(LocMast loc, LocTypeDto dto){ | 
 |  |  |  | 
 |  |  |     public static void setLocDetl(LocDetl locDetl, MatCode matCode) { | 
 |  |  |         locDetl.setMatnr(matCode.getMatNo()); // 物料编号 | 
 |  |  |         locDetl.setMaktx(matCode.getMatName()); // 物料描述 | 
 |  |  |         locDetl.setLgnum(matCode.getStr2()); // 规格 | 
 |  |  |         locDetl.setColor(matCode.getStr3()); // 助记码 | 
 |  |  |         locDetl.setBname(matCode.getStr4()); // 客户 | 
 |  |  |         locDetl.setAltme(matCode.getStr1()); // 单位 | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public static void setLocDetl(LocDetl locDetl, WrkDetl wrkDetl) { | 
 |  |  |         locDetl.setMatnr(wrkDetl.getMatnr()); // 物料编号 | 
 |  |  |         locDetl.setMaktx(wrkDetl.getMaktx()); // 物料描述 | 
 |  |  |         locDetl.setLgnum(wrkDetl.getLgnum()); // 规格 | 
 |  |  |         locDetl.setColor(wrkDetl.getColor()); // 助记码 | 
 |  |  |         locDetl.setBname(wrkDetl.getBname()); // 客户 | 
 |  |  |         locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 | 
 |  |  |         locDetl.setAltme(wrkDetl.getAltme()); // 单位 | 
 |  |  |         locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 | 
 |  |  |         return true; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  |