20230922-ljl-fixBug
ljl 1 year ago
parent 8c34fb1c81
commit cebcab0be4

@ -404,7 +404,13 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
OpOrderRedpackInfo redpackInfo = opOrderRedpackInfoService.getByOrderId(opOrder.getOrderId()); OpOrderRedpackInfo redpackInfo = opOrderRedpackInfoService.getByOrderId(opOrder.getOrderId());
PurchaseSetting purchaseSetting = purchaseSettingService.getByShopId(opOrder.getShopId()); PurchaseSetting purchaseSetting = purchaseSettingService.getByShopId(opOrder.getShopId());
List<PurchaseOrder> purchaseOrders = purchaseOrderService.getListByOrderId(opOrder.getShopId(), opOrder.getOpOrderId().toString(), StatusConst.normal,false); List<PurchaseOrder> 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(); 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) { private boolean checkPurchaseOrderStatusCanOutStorage(PurchaseOrderRequestDTO purchaseOrderInfo, OpOrder opOrder) {

@ -577,7 +577,25 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
if (purchaseOrders.isEmpty()) { if (purchaseOrders.isEmpty()) {
return purchaseOrders; return purchaseOrders;
} }
// TODO if (needItems) {
List<String> shopIds = new ArrayList<>();
shopIds.add(String.valueOf(shopId));
List<String> purchaseOrderIds = purchaseOrders.stream().map(x -> x.getPurchaseOrderId().toString()).collect(Collectors.toList());
List<PurchaseOrderItem> allItems = getPurchaseOrderItemsMapByPurchaseOrderIds(shopIds, purchaseOrderIds, status);
Map<Integer, List<PurchaseOrderItem>> purchaseOrderIdAndItemMap = new HashMap<>();
for (PurchaseOrderItem item: allItems) {
List<PurchaseOrderItem> 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; return purchaseOrders;
} }

Loading…
Cancel
Save