eight
2024-11-28 28322b650e29e06d5276742979615691fd233d07
排队中  允许过号操作
已修改5个文件
58 ■■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java
@@ -15,7 +15,7 @@
@AllArgsConstructor
public enum QueueStatusEnum implements IntArrayValuable {
    //5:过号 10:排队中 15:已召回 20:候诊准备 30:就诊中 40:就诊完成
    PASSED_WAITING(3, "已过号-排队中"),
    PASSED(5, "已过号"),
    PASSED_INSTALL(7, "已过号-安装"),
    WAITING(10, "排队中"),
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
@@ -205,6 +205,20 @@
    }
    // 常规检查过号、领用过号
    @GetMapping("/pass-waiting-patient")
    @Operation(summary = "过号排队中患者")
    @Parameter(name = "patId", description = "患者编号", required = true, example = "20247845")
    @Parameter(name = "checkType", description = "预约检查类型", required = true, example = "100")
    @PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
    public CommonResult<Integer> passWaitingPatient(
            @RequestParam("patId") String patId,
            @RequestParam("checkType") Integer checkType)
    {
        queueService.passWaitingPatient( patId, checkType );
        return success(0);
    }
    // 常规检查过号、领用过号
    @GetMapping("/pass-next-patient")
    @Operation(summary = "过号、下一位患者")
    @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116")
@@ -381,6 +395,22 @@
        return success(patientStatisticVO);
    }
    @GetMapping("/recall-pass-waiting-patient")
    @Operation(summary = "过号-排队中 患者召回")
    @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> recallPatient(
            @RequestParam("patId") String patId,
            @RequestParam("checkType") Integer checkType)
    {
        Integer result = queueService.recallPassWaitingPatient(patId, checkType);
        if (null == result || 0 == result)
            return error(PATIENT_NOT_EXISTS);
        return success("操作成功");
    }
    @GetMapping("/recall-patient")
    @Operation(summary = "过号病人召回")
    @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java
@@ -210,6 +210,9 @@
                                       @Param("curStatus")Integer curStatus);
*/
    @Update("update lihu.queue set status = #{newStatus} where pat_id = #{patId} and book_check_type = #{checkType} and status = #{curStatus}; " )
    Integer updatePatientQueueStatus(@Param("patId")String patId, @Param("checkType")Integer checkType, @Param("curStatus")Integer curStatus, @Param("newStatus")Integer newStatus);
    @Update("update lihu.queue set status = #{newStatus} where status = #{curStatus} and seq_num = \n" +
            "(select a.min_seq_num from \n" +
            " (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
@@ -107,6 +107,11 @@
    void finishInstallNextPatient(Long roomId, String bedNo);
    /**
     * 过号排队中患者
     */
    void passWaitingPatient( String patId, Integer bookCheckType );
    /**
     * 常规过号、领用过号
     */
    void passNextPatient(Long roomId, String bedNo);
@@ -126,6 +131,8 @@
    PatientStatisticVO getBedDevInstallStatistic(Long roomId, String bedNo);
    Integer recallPassWaitingPatient(String patId, Integer checkType);
    Integer recallPatient(Long roomId, String bedNo, String patId, Integer checkType);
    Integer recallInstallPatient(Long roomId, String bedNo, String patId, Integer checkType, Long roomId_operator, String bedNo_operator);
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -387,6 +387,13 @@
        startNextInstallPatient(roomId, bedNo);
    }
    @Override
    public void passWaitingPatient(String patId, Integer bookCheckType) {
        // 从 DB 把 排队中的人 设置为 过号-排队中
        Integer ret =  queueMapper.updatePatientQueueStatus(patId, bookCheckType,
                QueueStatusEnum.WAITING.getStatus(), QueueStatusEnum.PASSED_WAITING.getStatus());
    }
    public void passNextPatient(Long roomId, String bedNo) {
        // 从 DB 把 就诊中的人 设置为过号
        Integer ret =  queueMapper.updateBedQueueStatus(roomId, bedNo,
@@ -463,6 +470,15 @@
        return patientStatisticVO;
    }
    @Override
    public Integer recallPassWaitingPatient(String patId, Integer bookCheckType) {
        // 从 DB 把 过号-排队中的人 设置为 排队中
        Integer ret =  queueMapper.updatePatientQueueStatus(patId, bookCheckType,
                QueueStatusEnum.PASSED_WAITING.getStatus(), QueueStatusEnum.WAITING.getStatus());
        return ret;
    }
    public PatientStatisticVO getBedDevReadyStatistic(Long roomId, String bedNo) {
        PatientStatisticVO patientStatisticVO = new PatientStatisticVO();
        List<BedQueueStatisticDO> bedQueueStatisticDOList = queueMapper.bedQueueStatistic(roomId, bedNo);