| | |
| | | return data; |
| | | } |
| | | |
| | | private Object processZKCK(Order order, List<OrderDetl> orderDetls) { |
| | | //组装对象数据 |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | WhsTransBillHeaderVO whsTransBillHeaderVO = new WhsTransBillHeaderVO(); |
| | | whsTransBillHeaderVO.setPk_org("FYT"); |
| | | whsTransBillHeaderVO.setCotherwhid(order.getItemId()); |
| | | whsTransBillHeaderVO.setCtrantypeid("4K-01"); |
| | | WhsTransBillBodyVO whsTransBillBodyVO = null; |
| | | List<WhsTransBillBodyVO> whsTransBillBodyVOS = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | whsTransBillBodyVO = new WhsTransBillBodyVO(); |
| | | String remark = orderDetl.getRemark(); |
| | | //if (!Cools.isEmpty(remark)) { |
| | | //NccSaleXsfhmxWms nccSaleXsfhmxWms = JSONObject.parseObject(remark, NccSaleXsfhmxWms.class); |
| | | whsTransBillBodyVO.setNnum(orderDetl.getQty()); |
| | | whsTransBillBodyVO.setCmaterialoid(orderDetl.getMatnr()); |
| | | whsTransBillBodyVO.setVbatchcode(orderDetl.getBatch()); |
| | | //} |
| | | whsTransBillHeaderVO.setCwarehouseid(orderDetl.getStandby1()); |
| | | whsTransBillBodyVOS.add(whsTransBillBodyVO); |
| | | } |
| | | data.put("WhsTransBillHeaderVO", whsTransBillHeaderVO); |
| | | data.put("WhsTransBillBodyVO", whsTransBillBodyVOS); |
| | | return data; |
| | | } |
| | | |
| | | |
| | | |
| | | private Object processCGDH(List<OrderDetl> orderDetls) { |
| | |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | ic_purchasein_h ic_purchasein_h = new ic_purchasein_h(); |
| | | ic_purchasein_h.setPk_org("FYT"); |
| | | ic_purchasein_h.setCwarehouseid("6301"); |
| | | //ic_purchasein_h.setCwarehouseid("6301"); |
| | | ic_purchasein_h.setCfanaceorgoid("FYT"); |
| | | ic_purchasein_b ic_purchasein_b = null; |
| | | List<ic_purchasein_b> ic_purchasein_bs = new ArrayList<>(); |
| | |
| | | ic_purchasein_b.setCsourcetype(nccCgCgdhdWms.getDhlxbm()); |
| | | ic_purchasein_b.setVbatchcode(orderDetl.getBatch()); |
| | | } |
| | | ic_purchasein_h.setCwarehouseid(orderDetl.getStandby1()); |
| | | ic_purchasein_bs.add(ic_purchasein_b); |
| | | } |
| | | data.put("ic_purchasein_h", ic_purchasein_h); |
| | |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * @param orderDetls |
| | | * @return |
| | | */ |
| | | private Object processGENERALOUT(List<OrderDetl> orderDetls) { |
| | | |
| | | private Object processZKCK(Order order, List<OrderDetl> orderDetls) { |
| | | //组装对象数据 |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | ic_generalout_h generalout_h = new ic_generalout_h(); |
| | | generalout_h.setPk_org("FYT"); |
| | | generalout_h.setCwarehouseid("6101"); |
| | | ic_generalout_b generalout_b = null; |
| | | List<ic_generalout_b> ic_purchasein_bs = new ArrayList<>(); |
| | | WhsTransBillHeaderVO whsTransBillHeaderVO = new WhsTransBillHeaderVO(); |
| | | whsTransBillHeaderVO.setPk_org("FYT"); |
| | | whsTransBillHeaderVO.setCotherwhid(order.getItemId()); |
| | | whsTransBillHeaderVO.setCtrantypeid("4K-01"); |
| | | WhsTransBillBodyVO whsTransBillBodyVO = null; |
| | | List<WhsTransBillBodyVO> whsTransBillBodyVOS = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | generalout_b = new ic_generalout_b(); |
| | | String remark = orderDetl.getRemark(); |
| | | if (!Cools.isEmpty(remark)) { |
| | | NccSaleXsfhmxWms nccSaleXsfhmxWms = JSONObject.parseObject(remark, NccSaleXsfhmxWms.class); |
| | | generalout_b.setCmaterialvid(orderDetl.getMatnr()); |
| | | generalout_b.setNshouldassistnum(orderDetl.getQty()); |
| | | generalout_b.setVbatchcode(orderDetl.getBatch()); |
| | | } |
| | | ic_purchasein_bs.add(generalout_b); |
| | | } |
| | | data.put("ic_generalout_h", generalout_h); |
| | | data.put("ic_generalout_b", ic_purchasein_bs); |
| | | return data; |
| | | NccScPcdaWms nccScPcdaWms = nccScPcdaWmsService.selectOne(new EntityWrapper<NccScPcdaWms>().eq("vbatchcode", orderDetl.getBatch()).eq("wlbm", orderDetl.getMatnr())); |
| | | if (nccScPcdaWms == null) { |
| | | throw new CoolException("批次[{}]物料[{}]未找到" + orderDetl.getBatch() + orderDetl.getMatnr()); |
| | | } |
| | | |
| | | whsTransBillBodyVO = new WhsTransBillBodyVO(); |
| | | whsTransBillBodyVO.setCstateid(nccScPcdaWms.getVcode()); |
| | | |
| | | String remark = orderDetl.getRemark(); |
| | | //if (!Cools.isEmpty(remark)) { |
| | | //NccSaleXsfhmxWms nccSaleXsfhmxWms = JSONObject.parseObject(remark, NccSaleXsfhmxWms.class); |
| | | whsTransBillBodyVO.setNnum(orderDetl.getQty()); |
| | | whsTransBillBodyVO.setCmaterialoid(orderDetl.getMatnr()); |
| | | whsTransBillBodyVO.setVbatchcode(orderDetl.getBatch()); |
| | | //} |
| | | whsTransBillHeaderVO.setCwarehouseid(orderDetl.getStandby1()); |
| | | whsTransBillBodyVOS.add(whsTransBillBodyVO); |
| | | } |
| | | data.put("WhsTransBillHeaderVO", whsTransBillHeaderVO); |
| | | data.put("WhsTransBillBodyVO", whsTransBillBodyVOS); |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * @param orderDetls |
| | |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | ic_generalout_h generalout_h = new ic_generalout_h(); |
| | | generalout_h.setPk_org("FYT"); |
| | | generalout_h.setCwarehouseid("6101"); |
| | | //generalout_h.setCwarehouseid("6101"); |
| | | 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.setCsourcebillbid(s.get(i)); |
| | | generalout_b.setCsourcetype("4K-01"); |
| | | generalout_b.setCsourcebillhid(cspecialhid); |
| | | generalout_b.setCmaterialvid(orderDetl.getMatnr()); |
| | | generalout_b.setCstateid(nccScPcdaWms.getVcode()); |
| | | //generalout_b.setCstateid(nccScPcdaWms.getVcode()); |
| | | StoreType storeType = storeTypeService.selectOne(new EntityWrapper<StoreType>().eq("store_id", orderDetl.getStandby1())); |
| | | generalout_b.setCdptvid(storeType.getDepartmentId()); |
| | | generalout_b.setBillmaker(renyuan); |
| | | StoreType storeType2 = storeTypeService.selectOne(new EntityWrapper<StoreType>().eq("store_id", rukucangku)); |
| | | generalout_b.setCotherwhid(rukucangku); |
| | | generalout_b.setCothercalbodyvid(storeType2.getDepartmentId()); |
| | | |
| | | generalout_b.setNshouldassistnum(orderDetl.getQty()); |
| | | generalout_b.setVbatchcode(orderDetl.getBatch()); |
| | | ic_purchasein_bs.add(generalout_b); |