修正获取服务包关联问诊订单消息内页基础数据5
This commit is contained in:
@@ -1248,7 +1248,7 @@ class OrderServicePackageService extends BaseService
|
||||
{
|
||||
$params = array();
|
||||
$params['package_id'] = $package_id;
|
||||
$health_package_products = HealthPackage::getList($params);
|
||||
$health_package_products = HealthPackageProduct::getList($params);
|
||||
if (empty($health_package_products)){
|
||||
return [];
|
||||
}
|
||||
@@ -1258,22 +1258,16 @@ class OrderServicePackageService extends BaseService
|
||||
|
||||
/**
|
||||
* 获取服务包内某一药品的总数量
|
||||
* @param string|int $package_id
|
||||
* @param string|int $product_id
|
||||
* @return int
|
||||
*/
|
||||
public function getOrderServiceProductTotalQuantity(string|int $product_id): int
|
||||
public function getOrderServiceProductTotalQuantity(string|int $package_id,string|int $product_id): int
|
||||
{
|
||||
$total_quantity = 0;
|
||||
|
||||
// 获取健康包内容
|
||||
$params = array();
|
||||
$health_package = HealthPackage::getOne($params);
|
||||
if (empty($health_package)){
|
||||
return $total_quantity;
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params['package_id'] = $health_package['package_id'];
|
||||
$params['package_id'] = $package_id;
|
||||
$params['product_id'] = $product_id;
|
||||
$health_package_product = HealthPackage::getOne($params);
|
||||
if (empty($health_package_product)){
|
||||
|
||||
Reference in New Issue
Block a user