Commit 7196e7ea by 赵增煜

fix

parent 26fca44f
......@@ -263,10 +263,12 @@ public function create(Request $request)
$prescription->pharmacy_name = $pharmacy->name;
// 分派药师,先搜索是否存在默认药师,如果不存在则随机抽取一个
$pharmacist = PharmacistModel::where('status', PharmacistModel::IS_STATUS_TRUE)
->where('pharmacy_id', $pharmacy_id)
->where('is_default', PharmacistModel::IS_DEFAULT_TRUE)
->first();
if (! $pharmacist) {
$pharmacist = PharmacistModel::where('status', PharmacistModel::IS_STATUS_TRUE)
->where('pharmacy_id', $pharmacy_id)
->inRandomOrder()
->first();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment