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
d9713bda
authored
Nov 23, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处方药
parent
cc54a7c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/Api/Controllers/DrugController.php
+2
-2
app/Models/DrugModel.php
+2
-2
No files found.
app/Api/Controllers/DrugController.php
View file @
d9713bda
...
...
@@ -79,7 +79,7 @@ public function drugList(Request $request)
$data
=
PharmacyDrugModel
::
where
(
'pharmacy_id'
,
$pharmacy_id
)
->
whereNotNull
(
'dosage_id'
)
->
whereHas
(
'drug'
,
function
(
$query
)
use
(
$search_input
)
{
$query
->
where
(
'is_rx'
,
1
)
$query
->
where
(
'is_rx'
,
DrugModel
::
RX_TRUE
)
->
where
(
function
(
$subQuery
)
use
(
$search_input
)
{
if
(
$search_input
)
{
$subQuery
->
where
(
'name'
,
'LIKE'
,
"%
{
$search_input
}
%"
)
...
...
@@ -88,7 +88,7 @@ public function drugList(Request $request)
});
})
->
paginate
(
10
);
#
Log::info('drug list sql=>'.$data->toSql());
//
Log::info('drug list sql=>'.$data->toSql());
$data
->
map
(
function
(
$row
)
{
return
$row
->
drug
;
});
...
...
app/Models/DrugModel.php
View file @
d9713bda
...
...
@@ -35,9 +35,9 @@ class DrugModel extends Model
];
// 是否处方药[0=否,1=是]
const
RX_TRUE
=
0
;
const
RX_TRUE
=
1
;
const
RX_FALSE
=
1
;
const
RX_FALSE
=
0
;
// 是否处方药-文字映射
const
RX_MAP
=
[
...
...
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