Commit cb14a2a1 by lujunyi

默认php开128个进程

parent f8ade1c8
......@@ -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');
});
......
......@@ -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();
......
......@@ -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('处方作废失败');
}
}
......@@ -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;
}
// 生成审方日志
......
......@@ -14,7 +14,7 @@ protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
# $schedule->command('mohe:prescription')->everyMinute();
// $schedule->command('mohe:prescription')->everyMinute();
}
......
......@@ -34,6 +34,7 @@ class PharmacistModel extends Model
// 是否启用[0=否,1=是]
const IS_STATUS_FALSE = 0;
const IS_STATUS_TRUE = 1;
const IS_STATUS_MAP = [
......
......@@ -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';
}
<?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
{
......
......@@ -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 = dynamic
pm = static
; 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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment