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
03463ec0
authored
Nov 21, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加处方单开方类型
parent
7a37a5c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
app/Api/Controllers/PrescriptionController.php
+3
-1
No files found.
app/Api/Controllers/PrescriptionController.php
View file @
03463ec0
...
@@ -96,10 +96,12 @@ public function create(Request $request)
...
@@ -96,10 +96,12 @@ public function create(Request $request)
$inquirys
=
$request
->
input
(
'inquirys'
);
// [['inquiry_id'=>1,'answer'=>1]]
$inquirys
=
$request
->
input
(
'inquirys'
);
// [['inquiry_id'=>1,'answer'=>1]]
$drugs
=
$request
->
input
(
'drugs'
);
// [['pharmacy_drug_id'=>2,'num'=>1]]
$drugs
=
$request
->
input
(
'drugs'
);
// [['pharmacy_drug_id'=>2,'num'=>1]]
$pharmacy
=
null
;
$pharmacy
=
null
;
$open_source
=
0
;
// 获取当前用户信息,如果是药店则无需传pharmacy_id参数
// 获取当前用户信息,如果是药店则无需传pharmacy_id参数
if
(
$authInfo
->
last_login_type
==
User
::
LOGIN_TYPE_PHARMACY
)
{
if
(
$authInfo
->
last_login_type
==
User
::
LOGIN_TYPE_PHARMACY
)
{
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy
=
PharmacyModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
$pharmacy_id
=
$pharmacy
->
id
;
$pharmacy_id
=
$pharmacy
->
id
;
$open_source
=
1
;
}
elseif
(
$authInfo
->
last_login_type
==
User
::
LOGIN_TYPE_USER
)
{
}
elseif
(
$authInfo
->
last_login_type
==
User
::
LOGIN_TYPE_USER
)
{
$pharmacy
=
PharmacyModel
::
find
(
$pharmacy_id
);
$pharmacy
=
PharmacyModel
::
find
(
$pharmacy_id
);
if
(
!
$pharmacy
)
{
if
(
!
$pharmacy
)
{
...
@@ -234,7 +236,7 @@ public function create(Request $request)
...
@@ -234,7 +236,7 @@ public function create(Request $request)
$prescription
->
prescription_at
=
$prescription_at
;
$prescription
->
prescription_at
=
$prescription_at
;
$prescription
->
review_at
=
$review_at
;
$prescription
->
review_at
=
$review_at
;
$prescription
->
is_abnormal
=
$is_abnormal
;
$prescription
->
is_abnormal
=
$is_abnormal
;
$prescription
->
open_source
=
$open_source
;
$prescription_number
=
0
;
$prescription_number
=
0
;
if
(
$prescription
->
save
())
{
if
(
$prescription
->
save
())
{
$prescription_number
=
$prescription
->
id
;
$prescription_number
=
$prescription
->
id
;
...
...
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