eight
2024-10-11 111ded437886aa10072434f8b0a459da24f8545a
update
已修改8个文件
已重命名1个文件
53 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentSaveReqVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/resources/mapper/queue/queueMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java
@@ -21,7 +21,8 @@
    RECALLED((byte)15, "已召回"),
    READY((byte)20, "候诊中"),
    ONSTAGE((byte)30, "就诊中"),
    FINISH((byte)40, "已就诊");
    RECEIVED((byte)40, "已领用"),
    FINISH((byte)50, "已就诊");
    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(QueueStatusEnum::getStatus).toArray();
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java
@@ -3,6 +3,7 @@
import cn.lihu.jh.framework.common.util.exception.ExceptionUtils;
import cn.lihu.jh.module.ecg.dal.dataobject.devmanage.DeviceDO;
import cn.lihu.jh.module.ecg.service.devmanage.DeviceService;
import cn.lihu.jh.module.ecg.service.queue.QueueService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
@@ -46,15 +47,20 @@
    @Resource
    private DeviceService deviceService;
    @Resource
    private QueueService queueService;
    @PostMapping("/dev-ready")
    @Operation(summary = "设备准备")
    @Operation(summary = "设备领用")
    @PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
    public CommonResult<Long> devReady(@Valid @RequestBody DevRentSaveReqVO createReqVO) {
        try {
            return devRentService.readyOperation(createReqVO);
            CommonResult<Long> result = devRentService.readyOperation(createReqVO);
            queueService.startHurryUpOneBed(createReqVO.getRoomId(), createReqVO.getBedNo());
            return result;
        } catch ( RuntimeException runtimeException ) {
            String err = ExceptionUtils.formatException( runtimeException );
            log.error("devInstall: " + err);
            log.error("devReady: " + err);
            return CommonResult.error(DEV_INSTALL_EXCEPTION);
        }
    }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentSaveReqVO.java
@@ -3,6 +3,7 @@
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;
@@ -52,4 +53,10 @@
    @Schema(description = "已付款")
    private Integer paid;
    @Schema(description = "诊室编号")
    Long roomId;
    @Schema(description = "诊床编号")
    String bedNo;
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java
ÎļþÃû´Ó jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper2.java ÐÞ¸Ä
@@ -17,7 +17,7 @@
 * @author èŠ‹é“æºç 
 */
@Mapper
public interface queueMapper2 extends BaseMapperX<QueueDO> {
public interface QueueMapper extends BaseMapperX<QueueDO> {
    default PageResult<QueueDO> selectPage(QueuePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<QueueDO>()
@@ -112,6 +112,9 @@
            " (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )")
    Integer updateQueueStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus);
    @Update("update lihu.queue set status = #{newStatus} where pat_id = #{patId} and status = #{curStatus}")
    Integer updatePatientQueueStatus(@Param("patId")String patId, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus);
    @Update("update lihu.queue set status = #{newStatus}, room_id = #{roomId}, room_name = #{roomName}, \n" +
            " bed_no = #{bedNo}, seq_num = #{seqNum} where id = \n" +
            "  (select a.id from \n" +
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
@@ -2,7 +2,7 @@
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2;
import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper;
import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
import lombok.extern.slf4j.Slf4j;
@@ -24,7 +24,7 @@
public class CallingScreenServiceImpl implements CallingScreenService {
    @Resource
    private queueMapper2 queueMapper;
    private QueueMapper queueMapper;
    @Resource
    private RoomMapper roomMapper;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
@@ -7,8 +7,10 @@
import cn.lihu.jh.module.ecg.dal.dataobject.jobrecord.JobRecordDO;
import cn.lihu.jh.module.ecg.dal.mysql.devmanage.DeviceMapper;
import cn.lihu.jh.module.ecg.dal.mysql.jobrecord.JobRecordMapper;
import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
import cn.lihu.jh.module.ecg.enums.DevRentStateEnum;
import cn.lihu.jh.module.ecg.enums.DevStateEnum;
import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
@@ -119,7 +121,8 @@
        }
        // æ‚£è€…排队状态 æ›´æ–°ä¸º å·²é¢†ç”¨
        queueMapper.
        queueMapper.updatePatientQueueStatus( createReqVO.getPatId(),
                QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.RECEIVED.getStatus());
        return CommonResult.success(rent_id);
    }
@@ -185,6 +188,11 @@
            jobRecordDO.setUpdateTime(LocalDateTime.now());
            jobRecordMapper.updateById(jobRecordDO);
        }
        // æ‚£è€…排队状态 æ›´æ–°ä¸º å·²å°±è¯Š
        queueMapper.updatePatientQueueStatus( createReqVO.getPatId(),
                QueueStatusEnum.RECEIVED.getStatus(), QueueStatusEnum.FINISH.getStatus());
        return CommonResult.success(rent_id);
    }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -26,7 +26,7 @@
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.util.object.BeanUtils;
import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2;
import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
@@ -49,7 +49,7 @@
    private OAuth2TokenApi oAuth2TokenApi;
    @Resource
    private queueMapper2 queueMapper;
    private QueueMapper queueMapper;
    @Resource
    private RoomMapper roomMapper;
@@ -303,7 +303,7 @@
        devRent.setState( DevRentStateEnum.FREE.getState() );
        devRentMapper.insert(devRent);
        startHurryUpOneCheckType(Integer.valueOf(queue.getBookCheckType()));
        startHurryUpOneCheckType( queue.getBookCheckType() );
    }
    public void finishNextPatient(Long roomId, String bedNo) {
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java
@@ -11,7 +11,7 @@
import cn.lihu.jh.module.ecg.dal.mysql.call.CallMapper;
import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper;
import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper;
import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2;
import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper;
import cn.lihu.jh.module.ecg.enums.BedStatusEnum;
import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
@@ -44,7 +44,7 @@
    private OAuth2TokenApi oAuth2TokenApi;
    @Resource
    private queueMapper2 queueMapper;
    private QueueMapper queueMapper;
    @Resource
    private RoomMapper roomMapper;
jh-module-ecg/jh-module-ecg-biz/src/main/resources/mapper/queue/queueMapper.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper2">
<mapper namespace="cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper">
    <!--
        ä¸€èˆ¬æƒ…况下,尽可能使用 Mapper è¿›è¡Œ CRUD å¢žåˆ æ”¹æŸ¥å³å¯ã€‚