diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java index b8f5e412..bc1de6d1 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/DistributionOrderServiceImpl.java @@ -404,7 +404,13 @@ public class DistributionOrderServiceImpl implements DistributionOrderService { OpOrderRedpackInfo redpackInfo = opOrderRedpackInfoService.getByOrderId(opOrder.getOrderId()); PurchaseSetting purchaseSetting = purchaseSettingService.getByShopId(opOrder.getShopId()); List purchaseOrders = purchaseOrderService.getListByOrderId(opOrder.getShopId(), opOrder.getOpOrderId().toString(), StatusConst.normal,false); + if (purchaseSetting.getIsAppendShopNote() == 0 && purchaseSetting.getIsAppendShopRemark() == 0 && purchaseSetting.getShopRemarkFlag() > 0) { + return; + } int orderPayment = opOrder.getOrderTotalAmount().intValue() + opOrder.getPostAmount().intValue() + opOrder.getCouponAmount().intValue() + amountDetail.getTalentCouponAmount() + redpackInfo.getPlatformRedpackAmount() + redpackInfo.getTalentRedpackAmount(); + // TODO 元 + + purchaseOrderService.getListByOrderId(opOrder.getShopId(), opOrder.getOrderId(), StatusConst.normal, true); } private boolean checkPurchaseOrderStatusCanOutStorage(PurchaseOrderRequestDTO purchaseOrderInfo, OpOrder opOrder) { diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java index 29a10c4c..29591f9d 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java @@ -577,7 +577,25 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService { if (purchaseOrders.isEmpty()) { return purchaseOrders; } - // TODO + if (needItems) { + List shopIds = new ArrayList<>(); + shopIds.add(String.valueOf(shopId)); + List purchaseOrderIds = purchaseOrders.stream().map(x -> x.getPurchaseOrderId().toString()).collect(Collectors.toList()); + List allItems = getPurchaseOrderItemsMapByPurchaseOrderIds(shopIds, purchaseOrderIds, status); + Map> purchaseOrderIdAndItemMap = new HashMap<>(); + for (PurchaseOrderItem item: allItems) { + List subItems; + if (purchaseOrderIdAndItemMap.containsKey(item.getPurchaseOrderId())) { + subItems = purchaseOrderIdAndItemMap.get(item.getPurchaseOrderId()); + } else { + subItems = new ArrayList<>(); + } + subItems.add(item); + purchaseOrderIdAndItemMap.put(item.getPurchaseOrderId(), subItems); + } + for (PurchaseOrder purchaseOrder : purchaseOrders) { + } + } return purchaseOrders; }