更新
This commit is contained in:
@@ -32,6 +32,7 @@ class AppointmentController extends BaseAdminController
|
||||
public function create()
|
||||
{
|
||||
$params = (new AppointmentValidate())->post()->goCheck('create');
|
||||
$params['assistant_id'] = $this->adminId;
|
||||
$result = AppointmentLogic::create($params);
|
||||
if ($result === false) {
|
||||
return $this->fail(AppointmentLogic::getError());
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\doctor;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\doctor\MedicineLists;
|
||||
use app\adminapi\logic\doctor\MedicineLogic;
|
||||
use app\adminapi\validate\doctor\MedicineValidate;
|
||||
|
||||
/**
|
||||
* 药品库控制器
|
||||
*/
|
||||
class MedicineController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 药品列表
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new MedicineLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加药品
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new MedicineValidate())->post()->goCheck('add');
|
||||
$result = MedicineLogic::add($params);
|
||||
if ($result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(MedicineLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑药品
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new MedicineValidate())->post()->goCheck('edit');
|
||||
$result = MedicineLogic::edit($params);
|
||||
if ($result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(MedicineLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new MedicineValidate())->post()->goCheck('delete');
|
||||
MedicineLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 药品详情
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new MedicineValidate())->goCheck('detail');
|
||||
$result = MedicineLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,17 @@ class RosterController extends BaseAdminController
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$params = (new RosterValidate())->post()->goCheck('save');
|
||||
$post = request()->post();
|
||||
$defaults = [];
|
||||
if (empty($post['period'])) {
|
||||
$defaults['period'] = 'segment';
|
||||
}
|
||||
$params = (new RosterValidate())->post()->goCheck('save', $defaults);
|
||||
$result = RosterLogic::save($params);
|
||||
if ($result === false) {
|
||||
return $this->fail(RosterLogic::getError());
|
||||
}
|
||||
|
||||
return $this->success('保存成功', $result);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\doctor;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\doctor\StatisticsLists;
|
||||
|
||||
/**
|
||||
* 医生统计控制器
|
||||
* Class StatisticsController
|
||||
* @package app\adminapi\controller\doctor
|
||||
*/
|
||||
class StatisticsController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 医生诊单统计列表
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new StatisticsLists());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user