From 896e6debf24f26039ae0cfac51a0a6ba62a8b777 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期五, 30 八月 2024 11:16:15 +0800 Subject: [PATCH] update --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java | 81 -------------------- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java | 95 ++++++++++++++++++++++- README.md | 5 + 3 files changed, 94 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index cfb07d5..f3b974f 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,8 @@ | 瀛楀吀 & 鏁忔劅璇� |  |  |  | - | + +## 鏉冮檺 +### 鍖荤敓鏉冮檺 +* ecg:doctor:state +* ecg:doctor:task \ No newline at end of file diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java index ab7e56f..daa8274 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java @@ -3,8 +3,10 @@ import cn.lihu.jh.framework.common.exception.ErrorCode; import cn.lihu.jh.framework.common.pojo.CommonResult; import cn.lihu.jh.framework.common.util.object.BeanUtils; +import cn.lihu.jh.framework.security.core.util.SecurityFrameworkUtils; import cn.lihu.jh.module.ecg.controller.admin.queue.vo.PatientStatisticVO; import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueRespVO; +import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomRespVO; import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO; import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; import cn.lihu.jh.module.ecg.service.queue.QueueService; @@ -19,6 +21,7 @@ import java.util.ArrayList; import java.util.List; +import static cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; import static cn.lihu.jh.framework.common.pojo.CommonResult.error; import static cn.lihu.jh.framework.common.pojo.CommonResult.success; @@ -31,11 +34,92 @@ @Resource private QueueService queueService; + @GetMapping("/bed-doctor-pause") + @Operation(summary = "鍖荤敓鏆傚仠") + @PreAuthorize("@ss.hasPermission('ecg:doctor:state')") + public CommonResult<Integer> bedPause( + @RequestParam("roomId") Long roomId, + @RequestParam("bedNo") String bedNo) + { + Long userId = SecurityFrameworkUtils.getLoginUserId(); + String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); + + ErrorCode result = queueService.startBedDoctorPause(roomId, bedNo, userId, userNickname); + if (result.equals(SUCCESS)) + return success(SUCCESS.getCode()); + + return error(result); + } + + @GetMapping("/bed-doctor-resume") + @Operation(summary = "鍖荤敓鎭㈠") + @PreAuthorize("@ss.hasPermission('ecg:doctor:state')") + public CommonResult<Integer> bedResume( + @RequestParam("roomId") Long roomId, + @RequestParam("bedNo") String bedNo) + { + Long userId = SecurityFrameworkUtils.getLoginUserId(); + String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); + + ErrorCode result = queueService.startBedDoctorResume(roomId, bedNo, userId, userNickname); + if (result.equals(SUCCESS)) + return success(SUCCESS.getCode()); + + return error(result); + } + + @GetMapping("/bed-doctor-on") + @Operation(summary = "鍖荤敓鍏ュ骇") + @PreAuthorize("@ss.hasPermission('ecg:doctor:state')") + public CommonResult<Integer> bedDoctorOn( + @RequestParam("roomId") Long roomId, + @RequestParam("bedNo") String bedNo) + { + Long userId = SecurityFrameworkUtils.getLoginUserId(); + String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); + + ErrorCode result = queueService.startBedDoctorOn(roomId, bedNo, userId, userNickname); + if (result.equals(SUCCESS)) + return success(0); + + return error(result); + } + + @GetMapping("/bed-doctor-off") + @Operation(summary = "鍖荤敓绂诲骇") + @PreAuthorize("@ss.hasPermission('ecg:doctor:state')") + public CommonResult<Integer> bedDoctorOff( + @RequestParam("roomId") Long roomId, + @RequestParam("bedNo") String bedNo) + { + Long userId = SecurityFrameworkUtils.getLoginUserId(); + String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); + + ErrorCode result = queueService.startBedDoctorOff(roomId, bedNo, userId, userNickname); + if (result.equals(SUCCESS)) + return success(SUCCESS.getCode()); + + return error(result); + } + + @GetMapping("/bed-doctor-get") + @Operation(summary = "鍖荤敓宸ヤ綅鑾峰彇") + @PreAuthorize("@ss.hasPermission('ecg:doctor:state')") + public CommonResult<RoomRespVO> bedDoctorGet( + @RequestParam("roomId") Long roomId, + @RequestParam("bedNo") String bedNo) + { + Long userId = SecurityFrameworkUtils.getLoginUserId(); + + CommonResult<RoomRespVO> result = queueService.getRoom(roomId, bedNo, userId); + return result; + } + @GetMapping("/finish-next-patient") @Operation(summary = "瀹屾垚銆佷笅涓�浣嶆偅鑰�") @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116") @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2") - @PreAuthorize("@ss.hasPermission('ecg:doctor:nextpatient')") + @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") public CommonResult<List<QueueRespVO>> finishNextPatient( @RequestParam("roomId") Long roomId, @RequestParam("bedNo") String bedNo) @@ -54,7 +138,7 @@ @Operation(summary = "杩囧彿銆佷笅涓�浣嶆偅鑰�") @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116") @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2") - @PreAuthorize("@ss.hasPermission('ecg:doctor:nextpatient')") + @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") public CommonResult<List<QueueRespVO>> passNextPatient( @RequestParam("roomId") Long roomId, @RequestParam("bedNo") String bedNo) @@ -73,7 +157,7 @@ @Operation(summary = "鍙栨偅鑰呭垪琛�") @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116") @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2") - @PreAuthorize("@ss.hasPermission('ecg:doctor:patientlist')") + @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") public CommonResult<List<QueueRespVO>> getPatientList( @RequestParam("roomId") Long roomId, @RequestParam("bedNo") String bedNo) @@ -90,7 +174,7 @@ @Operation(summary = "鍙栨偅鑰呯粺璁�") @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116") @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2") - @PreAuthorize("@ss.hasPermission('ecg:doctor:patientstatistic')") + @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") public CommonResult<PatientStatisticVO> getPatientStatistic( @RequestParam("roomId") Long roomId, @RequestParam("bedNo") String bedNo) @@ -104,7 +188,7 @@ @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116") @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2") @Parameter(name = "patId", description = "鎮h�呯紪鍙�", required = true, example = "B2") - @PreAuthorize("@ss.hasPermission('ecg:doctor:patient')") + @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") public CommonResult<String> recallPatient( @RequestParam("roomId") Long roomId, @RequestParam("bedNo") String bedNo, @@ -116,6 +200,5 @@ return success("success"); } - } diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java index bd0b7c6..4c774eb 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java @@ -127,87 +127,6 @@ return error(result); } - @GetMapping("/bed-doctor-pause") - @Operation(summary = "鍖荤敓鏆傚仠") - @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')") - public CommonResult<Integer> bedPause( - @RequestParam("roomId") Long roomId, - @RequestParam("bedNo") String bedNo) - { - Long userId = SecurityFrameworkUtils.getLoginUserId(); - String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); - - ErrorCode result = queueService.startBedDoctorPause(roomId, bedNo, userId, userNickname); - if (result.equals(SUCCESS)) - return success(SUCCESS.getCode()); - - return error(result); - } - - @GetMapping("/bed-doctor-resume") - @Operation(summary = "鍖荤敓鏆傚仠") - @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')") - public CommonResult<Integer> bedResume( - @RequestParam("roomId") Long roomId, - @RequestParam("bedNo") String bedNo) - { - Long userId = SecurityFrameworkUtils.getLoginUserId(); - String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); - - ErrorCode result = queueService.startBedDoctorResume(roomId, bedNo, userId, userNickname); - if (result.equals(SUCCESS)) - return success(SUCCESS.getCode()); - - return error(result); - } - - @GetMapping("/bed-doctor-on") - @Operation(summary = "鍖荤敓鍏ュ骇") - @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')") - public CommonResult<Integer> bedDoctorOn( - @RequestParam("roomId") Long roomId, - @RequestParam("bedNo") String bedNo) - { - Long userId = SecurityFrameworkUtils.getLoginUserId(); - String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); - - ErrorCode result = queueService.startBedDoctorOn(roomId, bedNo, userId, userNickname); - if (result.equals(SUCCESS)) - return success(0); - - return error(result); - } - - @GetMapping("/bed-doctor-off") - @Operation(summary = "鍖荤敓绂诲骇") - @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')") - public CommonResult<Integer> bedDoctorOff( - @RequestParam("roomId") Long roomId, - @RequestParam("bedNo") String bedNo) - { - Long userId = SecurityFrameworkUtils.getLoginUserId(); - String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); - - ErrorCode result = queueService.startBedDoctorOff(roomId, bedNo, userId, userNickname); - if (result.equals(SUCCESS)) - return success(SUCCESS.getCode()); - - return error(result); - } - - @GetMapping("/bed-doctor-get") - @Operation(summary = "鍖荤敓宸ヤ綅鑾峰彇") - @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')") - public CommonResult<RoomRespVO> bedDoctorGet( - @RequestParam("roomId") Long roomId, - @RequestParam("bedNo") String bedNo) - { - Long userId = SecurityFrameworkUtils.getLoginUserId(); - - CommonResult<RoomRespVO> result = queueService.getRoom(roomId, bedNo, userId); - return result; - } - @GetMapping("/startbiz") @Operation(summary = "鎵嬪姩寮�璇�") @PreAuthorize("@ss.hasPermission('ecg:queue:setting')") -- Gitblit v1.9.3