修正分配医生逻辑,修改搜索医生列表新增是否参加公益图文问诊字段
This commit is contained in:
@@ -253,6 +253,8 @@ class UserPatientService extends BaseService
|
||||
/**
|
||||
* 修改购物车药品数据
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function putShoppingCart(): array
|
||||
{
|
||||
@@ -260,22 +262,22 @@ class UserPatientService extends BaseService
|
||||
$product_id = $this->request->input("product_id");
|
||||
$shopping_cart_num = $this->request->input("shopping_cart_num");
|
||||
|
||||
// if ($shopping_cart_num > 0){
|
||||
// // 验证商品数据
|
||||
// $params =array();
|
||||
// $params['product_id'] = $product_id;
|
||||
// $product = Product::getOne($params);
|
||||
// if (empty($product)){
|
||||
// return fail();
|
||||
// }
|
||||
// // 获取商品库存
|
||||
// $params =array();
|
||||
// $params['product_platform_id'] = $product['product_platform_id'];
|
||||
// $product_platform_amount = ProductPlatformAmount::getOne($params);
|
||||
// if ($product_platform_amount['stock'] <= 0){
|
||||
// return fail(HttpEnumCode::HTTP_ERROR,"商品库存不足");
|
||||
// }
|
||||
// }
|
||||
if ($shopping_cart_num > 0){
|
||||
// 验证商品数据
|
||||
$params =array();
|
||||
$params['product_id'] = $product_id;
|
||||
$product = Product::getOne($params);
|
||||
if (empty($product)){
|
||||
return fail();
|
||||
}
|
||||
// 获取商品库存
|
||||
$params =array();
|
||||
$params['product_platform_id'] = $product['product_platform_id'];
|
||||
$product_platform_amount = ProductPlatformAmount::getOne($params);
|
||||
if ($product_platform_amount['stock'] <= 0){
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"商品库存不足");
|
||||
}
|
||||
}
|
||||
|
||||
// 读取缓存数据
|
||||
$redis = $this->container->get(Redis::class);
|
||||
@@ -392,34 +394,4 @@ class UserPatientService extends BaseService
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取患者未完成订单
|
||||
* @param string $patient_id
|
||||
* @param string $family_id
|
||||
* @return string
|
||||
*/
|
||||
public function getNotFinishedOrdeInquiry(string $patient_id = '',string $family_id = ''): string
|
||||
{
|
||||
$params = array();
|
||||
if (!empty($patient_id)){
|
||||
$params[] = ['patient_id','=',$patient_id];
|
||||
}
|
||||
|
||||
if (!empty($family_id)){
|
||||
$params[] = ['family_id','=',$family_id];
|
||||
}
|
||||
|
||||
$params[] = ['inquiry_mode','=',1];
|
||||
$params[] = ['inquiry_refund_status','=',0];
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (!empty($order_inquiry)) {
|
||||
// 1:待支付 2:待分配 3:待接诊 4:已接诊
|
||||
if (in_array($order_inquiry['inquiry_status'], [2, 3, 4])) {
|
||||
return $order_inquiry['order_inquiry_id'];
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user