新增处方增加限制最大可开方数
This commit is contained in:
parent
992dac2c1b
commit
b6012b245c
@ -1443,6 +1443,13 @@ class UserDoctorService extends BaseService
|
|||||||
return fail(HttpEnumCode::HTTP_ERROR,"药品" . $product['product_name'] . "已被删除,无法开具");
|
return fail(HttpEnumCode::HTTP_ERROR,"药品" . $product['product_name'] . "已被删除,无法开具");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检测药品是否超出最大可开数
|
||||||
|
if ($item['prescription_product_num'] > $product['prescription_num']) {
|
||||||
|
// 库存不足
|
||||||
|
Db::rollBack();
|
||||||
|
return fail(HttpEnumCode::HTTP_ERROR, "药品" . $product['product_name'] . "超出最大可开方数");
|
||||||
|
}
|
||||||
|
|
||||||
// 获取商品库存
|
// 获取商品库存
|
||||||
$params =array();
|
$params =array();
|
||||||
$params['product_platform_id'] = $product['product_platform_id'];
|
$params['product_platform_id'] = $product['product_platform_id'];
|
||||||
@ -1458,6 +1465,8 @@ class UserDoctorService extends BaseService
|
|||||||
return fail(HttpEnumCode::HTTP_ERROR,"商品库存不足");
|
return fail(HttpEnumCode::HTTP_ERROR,"商品库存不足");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 检测药品库存数据
|
// 检测药品库存数据
|
||||||
if ($item['prescription_product_num'] > $product['ProductPlatformAmount']['stock']) {
|
if ($item['prescription_product_num'] > $product['ProductPlatformAmount']['stock']) {
|
||||||
// 库存不足
|
// 库存不足
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user