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
0e000050
authored
Dec 07, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化代码
parent
2cd51921
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/Api/Controllers/PatientController.php
+5
-5
app/Api/Controllers/PharmacyController.php
+1
-1
app/Models/DiagnosiModel.php
+1
-1
No files found.
app/Api/Controllers/PatientController.php
View file @
0e000050
...
...
@@ -8,9 +8,9 @@
use
App\Models\PharmacyModel
;
use
App\Models\User
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Log
;
use
Jxlwqq\IdValidator\IdValidator
;
use
Milon\Barcode\DNS2D
;
use
Illuminate\Support\Facades\Log
;
// 问诊人控制器
class
PatientController
extends
BaseApiController
...
...
@@ -239,12 +239,12 @@ public function duplicate(Request $request)
$newPatient
->
user_id
=
$authInfo
->
id
;
}
elseif
(
$authInfo
->
last_login_type
==
User
::
LOGIN_TYPE_PHARMACY
)
{
// 药店
$pharmacy
=
PharmacyModel
::
query
()
->
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
#
校验该药店是否已经存在手机号+用户名
//
校验该药店是否已经存在手机号+用户名
$patientInfo
=
PatientModel
::
where
(
'mobile'
,
$existingPatient
->
mobile
)
->
where
(
'name'
,
$existingPatient
->
name
)
->
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
first
();
#
Log::info('patient=>'. json_encode($patientInfo).'=='.json_encode($existingPatient).'=='. $pharmacy->id);
//
Log::info('patient=>'. json_encode($patientInfo).'=='.json_encode($existingPatient).'=='. $pharmacy->id);
if
(
$patientInfo
)
{
#
return $this->failed('该问诊人信息已存在');
#
return $this->failed('该问诊人信息已存在', ['data' => false], 200);
//
return $this->failed('该问诊人信息已存在');
//
return $this->failed('该问诊人信息已存在', ['data' => false], 200);
return
$this
->
success
(
$patientInfo
);
}
if
(
$pharmacy
)
{
...
...
app/Api/Controllers/PharmacyController.php
View file @
0e000050
...
...
@@ -34,7 +34,7 @@ public function PharmacyList(Request $request)
if
(
$limit_test_id
)
{
$limit_ids
=
explode
(
','
,
$limit_test_id
);
}
$query
=
PharmacyModel
::
query
()
->
whereNotIn
(
'id'
,
$limit_ids
);
$query
=
PharmacyModel
::
query
()
->
whereNotIn
(
'id'
,
$limit_ids
);
if
(
$search_input
)
{
$query
->
where
(
'name'
,
'like'
,
"%
{
$search_input
}
%"
);
// ->orWhere('address','like',"%{$search_input}%");
...
...
app/Models/DiagnosiModel.php
View file @
0e000050
...
...
@@ -13,7 +13,6 @@ class DiagnosiModel extends Model
use
HasDateTimeFormatter
;
use
SoftDeletes
;
const
DIAGNOSI_TYPE_WM
=
0
;
const
DIAGNOSI_TYPE_TCM
=
1
;
...
...
@@ -23,6 +22,7 @@ class DiagnosiModel extends Model
self
::
DIAGNOSI_TYPE_WM
=>
'西医'
,
self
::
DIAGNOSI_TYPE_TCM
=>
'中医'
,
];
protected
$table
=
'diagnosis'
;
public
function
setNameAttribute
(
$value
)
...
...
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