| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.nc.SendUtil; |
| | | import com.zy.nc.entity.*; |
| | | import com.zy.nc.service.NccSaleXsfhmxWmsService; |
| | |
| | | |
| | | cwarehouseid = wrkDetls.get(0).getStandby1(); |
| | | |
| | | //计算辅数量 |
| | | Double weight = MatUtils.calcWeight(inventoryCheckOrderDetl.getMatnr(), inventoryCheckOrderDetl.getCheckAnfme()); |
| | | |
| | | InvCountBodyVO invCountBodyVO = new InvCountBodyVO(); |
| | | invCountBodyVO.setCmaterialoid(inventoryCheckOrderDetl.getMatnr()); |
| | | invCountBodyVO.setVbatchcode(inventoryCheckOrderDetl.getBatch()); |
| | | invCountBodyVO.setNcountastnum(inventoryCheckOrderDetl.getCheckAnfme()); |
| | | invCountBodyVO.setNcountnum(inventoryCheckOrderDetl.getCheckAnfme()); |
| | | invCountBodyVO.setNcountastnum(weight); |
| | | invCountBodyVO.setCstateid(nccScPcdaWms.getPkStorestate()); |
| | | invCountBodyVO.setPk_batchcode(nccScPcdaWms.getPkBatchcode()); |
| | | invCountBodyVOList.add(invCountBodyVO); |
| | |
| | | } |
| | | |
| | | whsTransBillBodyVO = new WhsTransBillBodyVO(); |
| | | whsTransBillBodyVO.setCstateid(nccScPcdaWms.getPkBatchcode()); |
| | | whsTransBillBodyVO.setCstateid(nccScPcdaWms.getPkStorestate()); |
| | | |
| | | String remark = orderDetl.getRemark(); |
| | | //if (!Cools.isEmpty(remark)) { |
| | |
| | | whsTransBillBodyVO.setNnum(orderDetl.getQty()); |
| | | whsTransBillBodyVO.setCmaterialoid(orderDetl.getMatnr()); |
| | | whsTransBillBodyVO.setVbatchcode(orderDetl.getBatch()); |
| | | whsTransBillBodyVO.setPk_batchcode(nccScPcdaWms.getPkBatchcode()); |
| | | //} |
| | | whsTransBillHeaderVO.setCwarehouseid(orderDetl.getStandby1()); |
| | | whsTransBillBodyVOS.add(whsTransBillBodyVO); |
| | |
| | | ic_generalout_b generalout_b = null; |
| | | List<ic_generalout_b> ic_purchasein_bs = new ArrayList<>(); |
| | | for (int i = 0; i < orderDetls.size(); i++) { |
| | | // NccScPcdaWms nccScPcdaWms = nccScPcdaWmsService.selectOne(new EntityWrapper<NccScPcdaWms>().eq("vbatchcode", orderDetls.get(i).getBatch()).eq("wlbm", orderDetls.get(i).getMatnr())); |
| | | // if (nccScPcdaWms == null) { |
| | | // throw new CoolException("批次[{}]物料[{}]未找到" + orderDetls.get(i).getBatch() + orderDetls.get(i).getMatnr()); |
| | | // } |
| | | NccScPcdaWms nccScPcdaWms = nccScPcdaWmsService.selectOne(new EntityWrapper<NccScPcdaWms>().eq("vbatchcode", orderDetls.get(i).getBatch()).eq("wlbm", orderDetls.get(i).getMatnr())); |
| | | if (nccScPcdaWms == null) { |
| | | throw new CoolException("批次[{}]物料[{}]未找到" + orderDetls.get(i).getBatch() + orderDetls.get(i).getMatnr()); |
| | | } |
| | | |
| | | OrderDetl orderDetl = orderDetls.get(i); |
| | | generalout_h.setCwarehouseid(orderDetl.getStandby1()); |
| | | generalout_b = new ic_generalout_b(); |
| | |
| | | generalout_b.setCsourcetype("4K-01"); |
| | | generalout_b.setCsourcebillhid(cspecialhid); |
| | | generalout_b.setCmaterialvid(orderDetl.getMatnr()); |
| | | //generalout_b.setCstateid(nccScPcdaWms.getVcode()); |
| | | generalout_b.setCstateid(nccScPcdaWms.getPkStorestate()); |
| | | generalout_b.setPk_batchcode(nccScPcdaWms.getPkBatchcode()); |
| | | StoreType storeType = storeTypeService.selectOne(new EntityWrapper<StoreType>().eq("store_id", orderDetl.getStandby1())); |
| | | generalout_b.setCdptvid(storeType.getDepartmentId()); |
| | | generalout_b.setBillmaker(renyuan); |