Commit 115f5f59 by 赵增煜

药品限购

parent ed25d4f7
...@@ -96,8 +96,11 @@ public function drugLimit(Request $request) ...@@ -96,8 +96,11 @@ public function drugLimit(Request $request)
$limit_num = $drug->limit_buy_7; $limit_num = $drug->limit_buy_7;
} }
$patient_id = $request->input('patient_id'); $patient_id = $request->input('patient_id');
$pharmacy_id = $request->input('pharmacy_id');
$sevenDaysAgo = Carbon::now()->subDays(7); $sevenDaysAgo = Carbon::now()->subDays(7);
$prescriptions = PrescriptionModel::where('patient_id', $patient_id) $prescriptions = PrescriptionModel::where('patient_id', $patient_id)
->where('pharmacy_id', $pharmacy_id)
->where('created_at', '>=', $sevenDaysAgo) ->where('created_at', '>=', $sevenDaysAgo)
->get(); ->get();
......
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