|
|
@ -76,6 +76,12 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Set<String> purOrderIds = new HashSet<>(orderIdAndPurOrderIdMap.values());
|
|
|
|
Set<String> purOrderIds = new HashSet<>(orderIdAndPurOrderIdMap.values());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PlatformPurchaseOrder> platformPurchaseOrders = platformPurchaseOrderMapper.getListByPurOrderIds(new ArrayList<>(purOrderIds));
|
|
|
|
|
|
|
|
if (platformPurchaseOrders.isEmpty()) {
|
|
|
|
|
|
|
|
storeCreateOrders(shopId, param.getOrders(), purOrderIds);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
storeCreateOrders(shopId, param.getOrders(), purOrderIds);
|
|
|
|
storeCreateOrders(shopId, param.getOrders(), purOrderIds);
|
|
|
|
|
|
|
|
|
|
|
|
BatchCreateDistributionOrdersRequestDTO request = buildBatchCreateDistributionOrdersRequestDTO(param);
|
|
|
|
BatchCreateDistributionOrdersRequestDTO request = buildBatchCreateDistributionOrdersRequestDTO(param);
|
|
|
@ -109,9 +115,11 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
data.setOrderResults(orderResults);
|
|
|
|
data.setOrderResults(orderResults);
|
|
|
|
|
|
|
|
PurchaseOrder purchaseOrder = purchaseOrderMapper.getByPurOrderId(purOrderIds.iterator().next());
|
|
|
|
purchaseOrderMapper.insertBatch(purchaseOrders);
|
|
|
|
if (purchaseOrder == null) {
|
|
|
|
purchaseOrderItemMapper.insertBatch(purchaseOrderItems);
|
|
|
|
purchaseOrderMapper.insertBatch(purchaseOrders);
|
|
|
|
|
|
|
|
purchaseOrderItemMapper.insertBatch(purchaseOrderItems);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private PurchaseOrder buildPurchaseOrderByDTO(Long shopId, PurchaseOrderDTO purchaseOrderDTO, String purOrderId) {
|
|
|
|
private PurchaseOrder buildPurchaseOrderByDTO(Long shopId, PurchaseOrderDTO purchaseOrderDTO, String purOrderId) {
|
|
|
|