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); } }