From 83ae80c0c71fec76973205f6ab25ce8b2199705e Mon Sep 17 00:00:00 2001 From: chenfei <18955928961@163.com> Date: Tue, 9 Aug 2022 09:27:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=E8=AE=B0=E5=BD=95=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E5=88=B0=E5=B7=B2=E8=AF=8A=E7=8A=B6=E6=80=81=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/api/AppController.java | 15 ++++++++++++--- .../web/controller/pc/TRecordController.java | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 49959cd..547d77b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.api; +import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain.TDoctor; @@ -10,9 +11,7 @@ import com.ruoyi.system.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @@ -101,4 +100,14 @@ public class AppController extends BaseController } return AjaxResult.success(); } + + @PutMapping("updateStatus/{id}") + @Log(title = "修改患者记录至已诊状态") + public AjaxResult updateStatus(@PathVariable("id") Long id){ + TRecord tRecord = new TRecord(); + tRecord.setId(id); + tRecord.setStatus("1"); + tRecordService.updateTRecord(tRecord); + return AjaxResult.success("更新状态成功",null); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java index be9d8d0..aaec73b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java @@ -104,4 +104,6 @@ public class TRecordController extends BaseController { return toAjax(tRecordService.deleteTRecordByIds(ids)); } + + }