Commit 962bbcf3 by lujunyi

药品限购兼容脏数据

parent c2f2fb31
......@@ -125,7 +125,7 @@ public function drugLimit(Request $request)
$drugInfos = $prescription->drug_info ?? [];
foreach ($drugInfos as $drugInfo) {
$drugId = $drugInfo['drug_id'];
$drugCounts[$drugId] = ($drugCounts[$drugId] ?? 0) + $drugInfo['num'];
$drugCounts[$drugId] = ($drugCounts[$drugId] ?? 0) + ($drugInfo['num'] ?? 0);
}
}
......
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