eight
2024-11-14 9abd695cac8c79a41b6497e0e9c8414138210f90
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
@@ -28,8 +28,7 @@
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;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.ECG_INNER_ERROR;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.PATIENT_NOT_EXISTS;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
@Tag(name = "管理后台 - 医生叫号")
@RestController
@@ -184,7 +183,7 @@
    {
        queueService.finishInstallNextPatient(roomId, bedNo);
        List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo);
        List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo); // 待安装的患者
        List<QueueDO> installingQueueDOList = queueDOList.stream().filter(queueDO -> queueDO.getStatus() == QueueStatusEnum.INSTALLING.getStatus()).toList();
        // 过滤出  [安装中] 的,准备叫号   该工位应该 最多只有一个 [安装中]
@@ -259,7 +258,7 @@
            @RequestParam("roomId") Long roomId,
            @RequestParam("bedNo") String bedNo)
    {
        List<Byte> queueStatusList = new ArrayList<>();
        List<Integer> queueStatusList = new ArrayList<>();
        queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus());
        List<QueueDO> queueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList);
@@ -289,7 +288,7 @@
            @RequestParam("roomId") Long roomId,
            @RequestParam("bedNo") String bedNo)
    {
        List<Byte> queueStatusList = new ArrayList<>();
        List<Integer> queueStatusList = new ArrayList<>();
        queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus());
        List<QueueDO> queueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList);
@@ -385,9 +384,12 @@
    public CommonResult<String> recallPatient(
            @RequestParam("roomId") Long roomId,
            @RequestParam("bedNo") String bedNo,
            @RequestParam("patId") String patId )
            @RequestParam("patId") String patId,
            @RequestParam("checkType") Integer checkType,
            @RequestParam("roomId_operator") Long roomId_operator,
            @RequestParam("bedNo_operator") String bedNo_operator )
    {
        Integer result = queueService.recallPatient(roomId, bedNo, patId);
        Integer result = queueService.recallPatient(roomId, bedNo, patId, checkType);
        if (null == result || 0 == result)
            return error(PATIENT_NOT_EXISTS);
@@ -399,13 +401,20 @@
    @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116")
    @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2")
    @Parameter(name = "patId", description = "患者编号", required = true, example = "B2")
    @Parameter(name = "checkType", description = "检查类型", required = true, example = "100")
    @PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
    public CommonResult<String> recallInstallPatient(
            @RequestParam("roomId") Long roomId,
            @RequestParam("bedNo") String bedNo,
            @RequestParam("patId") String patId )
            @RequestParam("patId") String patId,
            @RequestParam("checkType") Integer checkType,
            @RequestParam("roomId_operator") Long roomId_operator,
            @RequestParam("bedNo_operator") String bedNo_operator )
    {
        Integer result = queueService.recallInstallPatient(roomId, bedNo, patId);
        if (roomId != roomId_operator)
            return error(QUEUE_RECALL_INSTALL_NOT_CUR_ROOM);
        Integer result = queueService.recallInstallPatient(roomId, bedNo, patId, checkType, bedNo_operator);
        if (null == result || 0 == result)
            return error(PATIENT_NOT_EXISTS);