| | |
| | | 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; |
| | |
| | | throw new CoolException("工作档明细不存在"); |
| | | } |
| | | |
| | | NccScPcdaWms nccScPcdaWms = nccScPcdaWmsService.selectOne(new EntityWrapper<NccScPcdaWms>() |
| | | .eq("WLBM", inventoryCheckOrderDetl.getMatnr()) |
| | | .eq("VBATCHCODE", inventoryCheckOrderDetl.getBatch()) |
| | | ); |
| | | if(null == nccScPcdaWms) { |
| | | throw new CoolException("ERP数据库无法查询到盘点上报数据"); |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | |
| | |
| | | |
| | | data.put("InvCountHeaderVO", invCountHeaderVO); |
| | | data.put("InvCountBodyVO", invCountBodyVOList); |
| | | data.put("paper", 2); |
| | | data.put("splr", 1); |
| | | data.put("paper", "1"); |
| | | data.put("splr", "0"); |
| | | |
| | | // HashMap<String, Object> urlParam = new HashMap<>(); |
| | | // urlParam.put("paper", 2); |
| | | // urlParam.put("splr", 1); |
| | | // |
| | | // ArrayList<Map<String, Object>> list = new ArrayList<>(); |
| | | // list.add(urlParam); |
| | | // list.add(data); |
| | | return data; |
| | | ArrayList<Map<String, Object>> list = new ArrayList<>(); |
| | | list.add(data); |
| | | return list; |
| | | } |
| | | |
| | | private Object processZKRK(List<OrderDetl> orderDetls) { |
| | |
| | | } |
| | | |
| | | 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); |