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
cb14a2a1
authored
Dec 02, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
默认php开128个进程
parent
f8ade1c8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
25 deletions
+21
-25
app/Admin/Controllers/SymptomController.php
+5
-6
app/Api/Controllers/PharmacistController.php
+2
-3
app/Api/Controllers/PrescriptionController.php
+4
-4
app/Console/Commands/PrescriptionCommand.php
+2
-2
app/Console/Kernel.php
+1
-1
app/Models/PharmacistModel.php
+1
-0
app/Models/Symptom.php
+2
-5
database/migrations/2024_12_02_113556_create_symptom_table.php
+2
-2
docker/php/php-fpm.d/www.conf
+2
-2
No files found.
app/Admin/Controllers/SymptomController.php
View file @
cb14a2a1
...
...
@@ -5,8 +5,8 @@
use
App\Admin\Repositories\Symptom
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Show
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Show
;
class
SymptomController
extends
AdminController
{
...
...
@@ -22,10 +22,10 @@ protected function grid()
$grid
->
column
(
'name'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
});
});
}
...
...
@@ -33,8 +33,7 @@ protected function grid()
/**
* Make a show builder.
*
* @param mixed $id
*
* @param mixed $id
* @return Show
*/
protected
function
detail
(
$id
)
...
...
@@ -58,7 +57,7 @@ protected function form()
return
Form
::
make
(
new
Symptom
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
);
$form
->
text
(
'name'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
});
...
...
app/Api/Controllers/PharmacistController.php
View file @
cb14a2a1
...
...
@@ -206,12 +206,11 @@ public function delete(Request $request)
return
$this
->
failed
(
'该药店不存在'
);
}
#
判断该药店下是否有几个开启的药师
//
判断该药店下是否有几个开启的药师
$pharmacist
=
PharmacistModel
::
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
where
(
'status'
,
1
)
->
count
();
if
(
$pharmacist
<=
1
)
{
if
(
$pharmacist
<=
1
)
{
return
$this
->
failed
(
'无法删除,至少需要一个开启的药师!'
);
}
$id
=
$request
->
input
(
'id'
);
$data
=
PharmacistModel
::
where
(
'id'
,
$id
)
->
where
(
'pharmacy_id'
,
$pharmacy
->
id
)
->
first
();
...
...
app/Api/Controllers/PrescriptionController.php
View file @
cb14a2a1
...
...
@@ -141,7 +141,7 @@ public function create(Request $request)
// 诊断信息
$prescription
->
diagnosis_id
=
$diagnosis_id
;
$diagnosis
=
DiagnosiModel
::
whereIn
(
'id'
,
explode
(
','
,
$diagnosis_id
))
->
pluck
(
'name'
)
->
toArray
();
$diagnosis
=
DiagnosiModel
::
whereIn
(
'id'
,
explode
(
','
,
$diagnosis_id
))
->
pluck
(
'name'
)
->
toArray
();
$diagnosis_name
=
implode
(
','
,
$diagnosis
);
$prescription
->
diagnosis_name
=
$diagnosis_name
;
// 问诊问题
...
...
@@ -398,18 +398,17 @@ public function invalid(Request $request)
}
public
function
reject
(
Request
$request
)
{
$authInfo
=
auth
(
'api'
)
->
user
();
// 获取医师信息
$doctor
=
DoctorModel
::
where
(
'user_id'
,
$authInfo
->
id
)
->
first
();
if
(
!
$doctor
)
{
if
(
!
$doctor
)
{
return
$this
->
failed
(
'你的账号可能在其他设备登录,请退出重新登录'
);
}
$prescription_id
=
$request
->
input
(
'prescription_id'
);
$prescription
=
PrescriptionModel
::
where
(
'id'
,
$prescription_id
)
->
where
(
'doctor_id'
,
$doctor
->
id
)
->
first
();
if
(
!
$prescription
)
{
if
(
!
$prescription
)
{
return
$this
->
success
(
'处方单不存在!'
);
}
$reject_reason
=
$request
->
input
(
'reject_reason'
);
...
...
@@ -421,6 +420,7 @@ public function reject(Request $request)
if
(
$prescription
->
save
())
{
return
$this
->
success
(
'驳回成功'
);
}
return
$this
->
failed
(
'处方作废失败'
);
}
}
app/Console/Commands/PrescriptionCommand.php
View file @
cb14a2a1
...
...
@@ -74,7 +74,7 @@ public function autoPrescriptionGen()
// 获取患者信息
$patient
=
PatientModel
::
where
(
'id'
,
$prescriptionInfo
->
patient_id
)
->
first
();
if
(
$patient
==
null
)
{
if
(
$patient
==
null
)
{
continue
;
}
...
...
@@ -124,7 +124,7 @@ public function autoPrescriptionReview()
$prescriptionInfo
->
save
();
// 获取患者信息
$patient
=
PatientModel
::
where
(
'id'
,
$prescriptionInfo
->
patient_id
)
->
first
();
if
(
$patient
==
null
)
{
if
(
$patient
==
null
)
{
continue
;
}
// 生成审方日志
...
...
app/Console/Kernel.php
View file @
cb14a2a1
...
...
@@ -14,7 +14,7 @@ protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
#
$schedule->command('mohe:prescription')->everyMinute();
//
$schedule->command('mohe:prescription')->everyMinute();
}
...
...
app/Models/PharmacistModel.php
View file @
cb14a2a1
...
...
@@ -34,6 +34,7 @@ class PharmacistModel extends Model
// 是否启用[0=否,1=是]
const
IS_STATUS_FALSE
=
0
;
const
IS_STATUS_TRUE
=
1
;
const
IS_STATUS_MAP
=
[
...
...
app/Models/Symptom.php
View file @
cb14a2a1
...
...
@@ -3,16 +3,13 @@
namespace
App\Models
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
class
Symptom
extends
Model
{
use
HasDateTimeFormatter
;
use
HasDateTimeFormatter
;
use
SoftDeletes
;
protected
$table
=
'symptom'
;
}
database/migrations/2024_12_02_113556_create_symptom_table.php
View file @
cb14a2a1
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateSymptomTable
extends
Migration
{
...
...
docker/php/php-fpm.d/www.conf
View file @
cb14a2a1
...
...
@@ -102,7 +102,7 @@ listen = 127.0.0.1:9000
;
pm
.
process_idle_timeout
-
The
number
of
seconds
after
which
;
an
idle
process
will
be
killed
.
;
Note
:
This
value
is
mandatory
.
pm
=
dynam
ic
pm
=
stat
ic
;
The
number
of
child
processes
to
be
created
when
pm
is
set
to
'static'
and
the
;
maximum
number
of
child
processes
when
pm
is
set
to
'dynamic'
or
'ondemand'
.
...
...
@@ -113,7 +113,7 @@ pm = dynamic
;
forget
to
tweak
pm
.*
to
fit
your
needs
.
;
Note
:
Used
when
pm
is
set
to
'static'
,
'dynamic'
or
'ondemand'
;
Note
:
This
value
is
mandatory
.
pm
.
max_children
=
50
pm
.
max_children
=
128
;
The
number
of
child
processes
created
on
startup
.
;
Note
:
Used
only
when
pm
is
set
to
'dynamic'
...
...
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