|
|
@@ -37,16 +37,14 @@ Class OrderCommodityService
|
|
|
$dataHandlerService = app('DataHandlerService');
|
|
|
$orderNos = data_get($orderHeaders,'*.orderno');
|
|
|
$owner_codes = [];$sku_codes = [];
|
|
|
- $count = 0;
|
|
|
foreach ($orderHeaders as $orderHeader) {
|
|
|
$actAllocationDetails = $orderHeader->actAllocationDetails;
|
|
|
foreach ($actAllocationDetails as $actAllocationDetail) {
|
|
|
$owner_codes[$actAllocationDetail['customerid']] = $actAllocationDetail['customerid'];
|
|
|
$sku_codes[$actAllocationDetail['sku']] = $actAllocationDetail['sku'];
|
|
|
- $count++;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if(count($sku_codes) ==0)return;
|
|
|
$owners = $ownerService->getOwnerByCodes($owner_codes);
|
|
|
$owner_id_maps = $dataHandlerService->dataHeader(['id'],$owners);
|
|
|
$commodities = $commodityService->get_(data_get($owners,'*.id'),$sku_codes,[],true);
|