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
d2702f2d
authored
Nov 24, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问诊问题增加日志
parent
d19f21c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
app/Api/Controllers/InquiryController.php
+5
-1
No files found.
app/Api/Controllers/InquiryController.php
View file @
d2702f2d
...
...
@@ -7,6 +7,7 @@
use
App\Models\DrugTagRelatedInquiryModel
;
use
App\Models\InquiryModel
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Log
;
// 问诊问题控制器
class
InquiryController
extends
BaseApiController
...
...
@@ -19,14 +20,17 @@ public function InquirytList(Request $request)
// 通过药品id获取标签
$inquiry_list_2
=
[];
$drug_ids
=
$request
->
input
(
'drug_ids'
);
Log
::
info
(
'drug_ids=>'
.
$drug_ids
);
if
(
$drug_ids
)
{
$tag_ids
=
DrugRelatedTagModel
::
whereIn
(
'drug_id'
,
explode
(
','
,
$drug_ids
))
->
pluck
(
'tag_id'
)
->
toArray
();
Log
::
info
(
'tag_ids=>'
.
$tag_ids
);
// 获取标签关联的问题
if
(
$tag_ids
)
{
$inquiry_ids
=
DrugTagRelatedInquiryModel
::
whereIn
(
'tag_id'
,
$tag_ids
)
->
pluck
(
'inquiry_id'
)
->
toArray
();
Log
::
info
(
'inquiry_ids=>'
.
$inquiry_ids
);
// 获取非通用问题
if
(
$inquiry_ids
)
{
$inquiry_list_2
=
InquiryModel
::
whereIn
(
'id'
,
array_column
(
$inquiry_ids
,
'inquiry_id'
)
)
->
get
()
->
toArray
();
$inquiry_list_2
=
InquiryModel
::
whereIn
(
'id'
,
$inquiry_ids
)
->
get
()
->
toArray
();
}
}
}
...
...
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