| | |
| | | } |
| | | Double erpAnfme = anfme*mat.getSafeQty(); |
| | | Order order1 = orderService.selectByNo( billNo); |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order1.getId()); |
| | | boolean sign = false; |
| | | for (OrderDetl orderDetl : orderDetls){ |
| | | if (orderDetl.getMatnr().equals(matnr)){ |
| | | sign = true; |
| | | break; |
| | | } |
| | | } |
| | | if (sign){ |
| | | continue; |
| | | } |
| | | List<OrderDetl> orderDetls = |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | LocSupp locSupp = null; |
| | | String supp =null; |
| | | locSupp = locSuppService.selectByUuid(suppCode); |
| | |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | | |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> o.getMatnr().equals(matnr)); |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | // // ========= 供应商 ========= |
| | | String supp = null; |
| | |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | | |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> o.getMatnr().equals(matnr)); |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | // // ========= 供应商 ========= |
| | | String supp = null; |
| | |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | | |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> o.getMatnr().equals(matnr)); |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | // // ========= 供应商 ========= |
| | | String supp = null; |
| | |
| | | |
| | | |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> o.getMatnr().equals(matnr)); |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | // // ========= 供应商 ========= |
| | | String supp = null; |
| | |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | | |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> o.getMatnr().equals(matnr)); |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | // // ========= 供应商 ========= |
| | | String supp = null; |
| | |
| | | // ========= 明细去重 ========= |
| | | List<OrderDetl> orderDetls = |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | | |
| | | boolean exists = orderDetls.stream() |
| | | .anyMatch(o -> o.getMatnr().equals(matnr)); |
| | | .anyMatch(o -> |
| | | o.getMatnr().equals(matnr) && |
| | | o.getBoxType3().equals(pOrderNo) |
| | | ); |
| | | if (exists) continue; |
| | | // // ========= 供应商 ========= |
| | | String supp = null; |
| | |
| | | orderDetl.setSupp(supp); |
| | | orderDetl.setSuppCode(suppCode); |
| | | orderDetl.setSku(matnr); |
| | | orderDetl.setStandby1(s1 != null? s1:"1"); |
| | | orderDetl.setStandby2(s2 != null? s2:"1"); |
| | | orderDetl.setStandby3(s3 != null? s3:"1"); |
| | | orderDetl.setStandby1(Cools.isEmpty(s1) ? "1" : s1); |
| | | orderDetl.setStandby2(Cools.isEmpty(s2) ? "1" : s2); |
| | | orderDetl.setStandby3(Cools.isEmpty(s3) ? "1" : s3); |
| | | orderDetl.setBoxType1(owner); |
| | | orderDetl.setBoxType2(ownerUuid); |
| | | orderDetl.setBoxType3(pOrderNo); |