Commit b40fea59 by 赵增煜

增加后端判断

parent 1342dd29
......@@ -474,7 +474,7 @@ public function enter(Request $request)
// 用药信息 西药:[['pharmacy_drug_id'=>2,'dosage_id'=>1,'dosage_desc'=>'500ml tid po','num'=>1]]
$drug_info = [];
foreach ($drugs as $drug) {
if(intval($drug['dosage_id']) <= 0){
if(!is_int($drug['dosage_id']) && intval($drug['dosage_id']) <= 0){
return $this->failed('请输入正确的数量!');
}
$pharmacyDrugQueryInfo = PharmacyDrugModel::with(['drug', 'dosage'])->find($drug['pharmacy_drug_id']);
......
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