Commit 8e4760bf by lujunyi

合并代码,解决冲突

parents 2cfc1903 b3878737
......@@ -62,6 +62,7 @@ protected function grid()
$filter->like('drug.name', '药品名称')->width(3);
$filter->like('drug.code', '药品简码')->width(3);
$filter->like('drug.factory', '生产厂家')->width(3);
$filter->in('drug.drug_type')->checkbox(DrugModel::DRUG_TYPE_MAP)->width(3);
});
// 行按钮控制
......
......@@ -80,12 +80,14 @@ public function add(Request $request)
}
$mobile = $data['mobile'];
$verificationCode = cache()->get("sms_verification_code_{$mobile}");
$code = $data['code'];
if ($verificationCode != $code) {
return $this->failed('验证码错误');
}
// $verificationCode = cache()->get("sms_verification_code_{$mobile}");
// $code = $data['code'];
// if ($verificationCode != $code) {
// return $this->failed('验证码错误');
// }
// $idCardInfo = Util::getIdCardInfo($data['id_card']);
$patient->name = $data['name'];
$patient->id_card = $data['id_card'];
$patient->mobile = $mobile;
......@@ -130,11 +132,11 @@ public function update(Request $request)
return $this->failed('该问诊人不存在');
}
$mobile = $request->input('mobile');
$verificationCode = cache()->get("sms_verification_code_{$mobile}");
$code = $request->input('code');
if ($verificationCode != $code) {
return $this->failed('验证码错误');
}
// $verificationCode = cache()->get("sms_verification_code_{$mobile}");
// $code = $request->input('code');
// if ($verificationCode != $code) {
// return $this->failed('验证码错误');
// }
$data->name = $request->input('name');
$data->id_card = $id_card;
......
......@@ -454,7 +454,7 @@ public function enter(Request $request)
'unit' => $pharmacyDrugQueryInfo->unit,
// 'dosage_id' => 0, // $pharmacyDrugQueryInfo->dosage_id,
// 'dosage_desc' => '等待药师录入', // $pharmacyDrugQueryInfo->dosage->dosage_desc,
'num' => $drug['num'], // 中药为药师录入数量
'num' => '', // 中药为药师录入数量
];
}
$prescription->doses = $request->input('doses'); // 剂量
......
......@@ -40,12 +40,18 @@ public function handle()
// }
// 刷新存量问诊人年龄
$patients = PatientModel::query()->whereNotNull('id_card')->where('age', 0)->get();
$query = PatientModel::query()->whereNotNull('id_card')->where('age', '<=', 0)->withTrashed();
$sql = $query->toSql();
var_dump($sql);
$patients = $query->get();
if ($patients->count() > 0) {
foreach ($patients as $patient) {
$patient->age = getAgeByIdCard($patient->id_card);
$patient->save();
}
} else {
echo '没有需要更新的数据';
}
}
}
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