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