@@ -48,7 +48,8 @@ class getProductStockCommand extends HyperfCommand
|
||||
|
||||
foreach ($product['data'] as $item){
|
||||
if (!empty($item['product_pharmacy_code'])){
|
||||
$result = $prescription->getProdStock($item['product_pharmacy_code']);
|
||||
$pharmacy_code = $item['pharmacy_code'] ?? '';
|
||||
$result = $prescription->getProdStock($item['product_pharmacy_code'], $pharmacy_code);
|
||||
$this->handleData($item['product_platform_id'],$item['product_platform_code'],$result[0]);
|
||||
}
|
||||
}
|
||||
@@ -57,6 +58,7 @@ class getProductStockCommand extends HyperfCommand
|
||||
for ($i = 2; $i <= $product['last_page']; $i++) {
|
||||
// 获取商品
|
||||
$params = array();
|
||||
$params['product_status'] = 1;
|
||||
$product = Product::getPage($params,['*'],$i,10);
|
||||
if (empty($product['data'])){
|
||||
$this->line("商品库存更新成功,无可更新库存商品");
|
||||
@@ -67,7 +69,8 @@ class getProductStockCommand extends HyperfCommand
|
||||
|
||||
foreach ($product['data'] as $item){
|
||||
if (!empty($item['product_pharmacy_code'])){
|
||||
$result = $prescription->getProdStock($item['product_pharmacy_code']);
|
||||
$pharmacy_code = $item['pharmacy_code'] ?? '';
|
||||
$result = $prescription->getProdStock($item['product_pharmacy_code'], $pharmacy_code);
|
||||
$this->handleData($item['product_platform_id'],$item['product_platform_code'],$result[0]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user