eight
2024-09-14 d23a6a1722af159dddb3b2e485901a35dd721034
buf fix: 准备中 没有 诊室名的 问题
已修改5个文件
25 ■■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/service/queue/BedOpenCallable.java 6 ●●●●● 补丁 | 查看 | 原始文档 | 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/queueService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
@@ -185,6 +185,8 @@
    public CommonResult<String> appointmentConfirm(@RequestBody AppointmentConfirmReqVO confirmReqVO) {
        //TODO 先从预约表取数据,后续对接数据平台查预约数据
        AppointmentDO appointment = appointmentService.getAppointment(confirmReqVO.getId());
        if (null == appointment)
            return error(PATIENT_NOT_EXISTS);
        if ( !DateUtils.isToday(appointment.getBookDate()) )
            return error( APPOINTMENT_NOT_TODAY);
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
@@ -110,9 +110,10 @@
    @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')")
    public CommonResult<Integer> bedOpen(
        @RequestParam("roomId") Long roomId,
        @RequestParam("roomName") String roomName,
        @RequestParam("bedNo") String bedNo)
    {
        ErrorCode result = queueService.startBedOpen(roomId, bedNo);
        ErrorCode result = queueService.startBedOpen(roomId, roomName, bedNo);
        if (result.equals(SUCCESS))
            return success(0);
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedOpenCallable.java
@@ -9,18 +9,20 @@
    QueueService queueService;
    private Long roomId;
    private String roomName;
    private String bedNo;
    public BedOpenCallable(QueueService queueService, Long roomId, String bedNo)
    public BedOpenCallable(QueueService queueService, Long roomId, String roomName, String bedNo)
    {
        super();
        this.roomId = roomId;
        this.roomName = roomName;
        this.bedNo = bedNo;
        this.queueService = queueService;
    }
    public ErrorCode call() throws Exception {
        ErrorCode ec = queueService.bedOpen(roomId, bedNo);
        ErrorCode ec = queueService.bedOpen(roomId, roomName, bedNo);
        if (GlobalErrorCodeConstants.SUCCESS.equals(ec)) {
            queueService.hurryup();
        }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -89,8 +89,8 @@
    }
    @Override
    public ErrorCode startBedOpen(Long roomId, String bedNo) {
        Future<ErrorCode> future = singleThreadExecutor.submit( new BedOpenCallable(this, roomId, bedNo));
    public ErrorCode startBedOpen(Long roomId, String roomName, String bedNo) {
        Future<ErrorCode> future = singleThreadExecutor.submit( new BedOpenCallable(this, roomId, roomName, bedNo));
        try {
            ErrorCode ret = future.get();
@@ -249,7 +249,7 @@
     * @return
     */
    @Override
    public ErrorCode bedOpen(Long roomId, String bedNo) {
    public ErrorCode bedOpen(Long roomId, String roomName, String bedNo) {
        BedQueueBO bedQueueBO2 = mapBedVsQueue.get(String.format("%09d%s", roomId, bedNo));
        if (null != bedQueueBO2) {
            log.error("bedOpen mapBedVsQueue has existed. " + roomId + " " + bedNo);
@@ -272,6 +272,7 @@
        // 新增工位 优先队列
        BedQueueBO bedQueueBO = new BedQueueBO();
        bedQueueBO.setRoomId(roomId);
        bedQueueBO.setRoomName(roomName);
        bedQueueBO.setBedNo(bedNo);
        bedQueueBO.setMaxQueueNum(queueReadyMax);
        bedQueueBO.setQueueNum(new AtomicInteger(queueDOList.size()));
@@ -502,8 +503,7 @@
    }
    /**
     * TODO 新开队列时,需要把排队中的人 转到 就诊准备 状态
     * 等到取下一个 排队中人员 的逻辑完成后,再回来不错
     *
     */
    public void hurryup() {
        if (0 == openingFlag.get())
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueService.java
@@ -52,7 +52,7 @@
    void startBedReload();
    MonitorInfoVO getMonitorInfo();
    ErrorCode startBedOpen(Long roomId, String bedNo);
    ErrorCode startBedOpen(Long roomId, String roomName, String bedNo);
    ErrorCode startBedClose(Long roomId, String bedNo);
    ErrorCode startBedDoctorPause(Long roomId, String bedNo, Long docId, String docName);
    ErrorCode startBedDoctorResume(Long roomId, String bedNo, Long docId, String docName);
@@ -60,7 +60,7 @@
    ErrorCode startBedDoctorOff(Long roomId, String bedNo, Long docId, String docName);
    ErrorCode startNextPatient(Long roomId, String bedNo);
    ErrorCode bedOpen(Long roomId, String bedNo);
    ErrorCode bedOpen(Long roomId, String roomName, String bedNo);
    ErrorCode bedClose(Long roomId, String bedNo);
    ErrorCode bedDoctorPause(Long roomId, String bedNo, Long docId, String docName);
    ErrorCode bedDoctorResume(Long roomId, String bedNo, Long docId, String docName);