eight
2025-03-31 c663b36cebeed7b40498a4e676559b62c0d4bee6
预约确认、加急  都触发 抢排队中 患者
已修改5个文件
33 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/QueueController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/QueueController.java
@@ -135,9 +135,10 @@
    @PreAuthorize("@ss.hasPermission('ecg:queue:jump')")
    public CommonResult<String> queueJump(
            @RequestParam("patId") String patId,
            @RequestParam("bookCheckType") Integer bookCheckType,
            @RequestParam("jumpFlag") Byte jumpFlag)
    {
        Integer result = queueService.patientJump(patId, jumpFlag);
        Integer result = queueService.patientJump(patId, bookCheckType, jumpFlag);
        if (null == result || 0 == result)
            return error( new ErrorCode(201, "找不到患者") );
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java
@@ -42,8 +42,8 @@
    @Select("SELECT * FROM lihu.queue where seq_num = #{seqNum}")
    QueueDO getQueueItemBySeqNum(@Param("seqNum")Integer seqNum);
    @Select("SELECT * FROM lihu.queue where pat_id = #{patId}")
    QueueDO getQueueByPatId(@Param("patId")String patId);
    @Select("SELECT * FROM lihu.queue where pat_id = #{patId} and book_check_type = #{bookCheckType}")
    QueueDO getQueueByPatId(@Param("patId")String patId, @Param("bookCheckType")Integer bookCheckType);
    @Select("<script>" +
            "SELECT * FROM lihu.queue " +
@@ -286,8 +286,9 @@
                                @Param("curStatus")Integer curStatus, @Param("newStatus")Integer newStatus);
    @Update("update lihu.queue set jump_flag = #{jumped} " +
            " where status = #{curStatus} and pat_id = #{patId}")
    Integer queueJump(@Param("patId")String patId, @Param("curStatus")Integer curStatus, @Param("jumped")Byte jumped );
            " where status = #{curStatus} and pat_id = #{patId} and book_check_type=#{bookCheckType}")
    Integer queueJump(@Param("patId")String patId, @Param("bookCheckType")Integer bookCheckType,
                      @Param("curStatus")Integer curStatus, @Param("jumped")Byte jumped );
    //@Update("TRUNCATE TABLE lihu.queue")
    @Delete("delete from lihu.queue where TO_DAYS(book_date) != TO_DAYS(NOW())")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
@@ -137,7 +137,7 @@
    Integer recallInstallPatient(Long roomId, String bedNo, String patId, Integer checkType, Long roomId_operator, String bedNo_operator);
    Integer patientJump(String patId, Byte jumped );
    Integer patientJump(String patId, Integer bookCheckType, Byte jumped );
    List<RoomDO> getDocRoomInfo(Long docId);
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -338,7 +338,7 @@
        devRent.setCheckType( queueSaveReqVO.getBookCheckType() );
        devRentMapper.insert(devRent);
        //startHurryUpOneCheckType( queue.getBookCheckType() );
        startHurryUpOneCheckType( queue.getBookCheckType() );
    }
    @Override
@@ -570,11 +570,11 @@
     * @return
     */
    @Override
    public Integer patientJump(String patId, Byte jumped) {
        Integer updateNum = queueMapper.queueJump(patId, QueueStatusEnum.WAITING.getStatus(), jumped);
    public Integer patientJump(String patId, Integer bookCheckType, Byte jumped) {
        Integer updateNum = queueMapper.queueJump(patId, bookCheckType, QueueStatusEnum.WAITING.getStatus(), jumped);
        //QueueDO queueDO = queueMapper.getQueueByPatId(patId);
        //startHurryUpOneCheckType(Integer.valueOf(queueDO.getBookCheckType()));
        QueueDO queueDO = queueMapper.getQueueByPatId(patId, bookCheckType);
        startHurryUpOneCheckType(Integer.valueOf(queueDO.getBookCheckType()));
        return updateNum;
    }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java
@@ -422,9 +422,10 @@
    }
    /**
     * Deprecated  代码保留,实际已经不再使用
     * 原因: 同一工位可以同时处理多个检查项目,所以需要保证多个检查项目的就诊时间先后顺序
     * 一个工位可以支持多个检查项目,所以需要保证多个检查项目的就诊时间先后顺序
     * 按照一个检查项目来处理,就不能保证同一个工位的多个检查项目的就诊时间的先后顺序
     * 所以实现逻辑是 让支持该检查项目的所有工位去抢占 【排队中】【工位支持的检查项目】的患者
     * 实际抢占的未必是 参数中的检查项目的患者,可能是其他检查项目的患者
     * @param checkType
     */
    public void hurryupOneCheckType(Integer checkType) {
@@ -446,14 +447,14 @@
                return;
            // 查看 是否有排队中的患者
            Integer updateNum = queueMapper.preemptWaitingPatient(
            Integer updateNum = queueMapper.preemptWaitingPatientWithBedCheckTypes(
                    bedQueueBO.getRoomId(),
                    bedQueueBO.getRoomName(),
                    bedQueueBO.getBedNo(),
                    curSeqNum.get() + 1,
                    QueueStatusEnum.WAITING.getStatus(),
                    QueueStatusEnum.READY.getStatus(),
                    checkType);
                    bedQueueBO.checkTypes);  //关键点 关键点 关键点 checkType
            // 没有抢到排队患者
            if (null == updateNum || 0 == updateNum) {