| | |
| | | |
| | | List<OrderItemsParam> reportOrderParams = new ArrayList<>(); |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | Mat material = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getSuppCode())); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | TaskDetlLog taskDetlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | .eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getStandby1()) |
| | | .eq("supp_code", detl.getSuppCode()) |
| | | .eq("order_no", detl.getOrderNo())); |
| | | if (Objects.isNull(taskDetlLog) || Objects.isNull(taskDetlLog.getAreaType())) { |
| | | orderParam.setTarget_location("2"); |
| | |
| | | .eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getStandby1()) |
| | | .eq("order_no", detl.getOrderNo())); |
| | | detlLog.forEach(item -> { |
| | | if (Objects.isNull(detlLog) || detlLog.isEmpty()) { |
| | | OrderItemsParam itemParam = new OrderItemsParam(); |
| | | if (Objects.isNull(item)) { |
| | | itemParam.setLocation_no("LX99999999"); |
| | | } else { |
| | | itemParam.setLocation_no(item.getZpallet()); |
| | | } |
| | | itemParam.setLocation_no("LX99999999"); |
| | | itemParam |
| | | // 上报时,默认产品类型是null |
| | | .setPro_type(material.getProType()) |
| | |
| | | // // 上报时,默认来源位置是null |
| | | // .setLocation_no(detlLog.getZpallet()) |
| | | // 上报时,默认上报数量是订单数量 |
| | | .setPick_qty(item.getAnfme().intValue()); |
| | | .setPick_qty(0); |
| | | // .setPick_qty(Objects.isNull(detl.getQty()) ? 0 : detl.getQty().intValue()); |
| | | reportOrderParams.add(itemParam); |
| | | }); |
| | | } else { |
| | | detlLog.forEach(item -> { |
| | | OrderItemsParam itemParam = new OrderItemsParam(); |
| | | itemParam.setLocation_no(item.getZpallet()); |
| | | itemParam |
| | | // 上报时,默认产品类型是null |
| | | .setPro_type(material.getProType()) |
| | | // 上报时,默认产品编码 |
| | | .setPro_komcode(detl.getMatnr()) |
| | | // 上报时,默认产品id是供应商编码 |
| | | .setPro_id(detl.getSuppCode()) |
| | | // // 上报时,默认来源位置是null |
| | | // .setLocation_no(detlLog.getZpallet()) |
| | | // 上报时,默认上报数量是订单数量 |
| | | .setPick_qty(item.getAnfme().intValue()); |
| | | // .setPick_qty(Objects.isNull(detl.getQty()) ? 0 : detl.getQty().intValue()); |
| | | reportOrderParams.add(itemParam); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //目标库区 |