Commit 8b77c687 by lujunyi

格式化

parent 3d2e3fe9
...@@ -213,19 +213,20 @@ public function getDefault(Request $request) ...@@ -213,19 +213,20 @@ public function getDefault(Request $request)
return $this->failed('暂无默认问诊人'); return $this->failed('暂无默认问诊人');
} }
} }
public function duplicate(Request $request) public function duplicate(Request $request)
{ {
$data = $request->all(); $data = $request->all();
$authInfo = auth('api')->user(); $authInfo = auth('api')->user();
// 确保传递了 ID 参数 // 确保传递了 ID 参数
if (!isset($data['id']) || empty($data['id'])) { if (! isset($data['id']) || empty($data['id'])) {
return $this->failed('ID 参数缺失'); return $this->failed('ID 参数缺失');
} }
// 根据传递的 ID 查找对应患者数据 // 根据传递的 ID 查找对应患者数据
$existingPatient = PatientModel::find($data['id']); $existingPatient = PatientModel::find($data['id']);
if (!$existingPatient) { if (! $existingPatient) {
return $this->failed('未找到对应的患者记录'); return $this->failed('未找到对应的患者记录');
} }
......
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