新增功能
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\tcm;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\tcm\BloodRecordLogic;
|
||||
|
||||
/**
|
||||
* 血糖血压记录控制器
|
||||
* Class BloodRecordController
|
||||
* @package app\adminapi\controller\tcm
|
||||
*/
|
||||
class BloodRecordController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 添加记录
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = BloodRecordLogic::add($params);
|
||||
if ($result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BloodRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑记录
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = BloodRecordLogic::edit($params);
|
||||
if ($result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BloodRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除记录
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = BloodRecordLogic::delete($params);
|
||||
if ($result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BloodRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 记录详情
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = BloodRecordLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取患者的记录列表
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function getRecordsByPatient()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = BloodRecordLogic::getRecordsByPatient($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user