Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b77c687
authored
Dec 06, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化
parent
3d2e3fe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
app/Api/Controllers/PatientController.php
+3
-2
No files found.
app/Api/Controllers/PatientController.php
View file @
8b77c687
...
@@ -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
(
'未找到对应的患者记录'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment