eight
2024-11-06 913587c63ac1a475b37e21b7f1fa160a23a286ef
检查类型相关
已添加1个文件
已修改9个文件
74 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/CheckTypeController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/vo/CheckTypePageReqVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/vo/CheckTypeRespVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/vo/CheckTypeSaveReqVO.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/checktype/CheckTypeDO.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/checktype/CheckTypeService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/checktype/CheckTypeServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/mysql/update.sql 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/CheckTypeController.java
@@ -1,16 +1,12 @@
package cn.lihu.jh.module.ecg.controller.admin.checktype;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.constraints.*;
import jakarta.validation.*;
import jakarta.servlet.http.*;
import java.util.*;
import java.io.IOException;
@@ -29,6 +25,11 @@
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
import cn.lihu.jh.module.ecg.service.checktype.CheckTypeService;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@Tag(name = "管理后台 - æ£€æŸ¥ç±»åž‹")
@RestController
@RequestMapping("/ecg/check-type")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/vo/CheckTypePageReqVO.java
@@ -47,6 +47,6 @@
    private Integer timeslotReservedNum;
    @Schema(description = "亲和的检查类型")
    private String affinityCheckTypes;
    private Integer[] affinityCheckTypes;
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/vo/CheckTypeRespVO.java
@@ -61,6 +61,5 @@
    @Schema(description = "亲和的检查类型")
    @ExcelProperty("亲和的检查类型")
    private String affinityCheckTypes;
    private Integer[] affinityCheckTypes;
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/checktype/vo/CheckTypeSaveReqVO.java
@@ -3,7 +3,6 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
@Schema(description = "管理后台 - æ£€æŸ¥ç±»åž‹æ–°å¢ž/修改 Request VO")
@Data
@@ -40,6 +39,5 @@
    private Integer timeslotReservedNum;
    @Schema(description = "亲和的检查类型")
    private String affinityCheckTypes;
    private Integer[] affinityCheckTypes;
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/checktype/CheckTypeDO.java
@@ -1,5 +1,6 @@
package cn.lihu.jh.module.ecg.dal.dataobject.checktype;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
@@ -12,7 +13,7 @@
 *
 * @author majianbo
 */
@TableName("check_type")
@TableName(value="check_type", autoResultMap = true)
@KeySequence("check_type_seq") // ç”¨äºŽ Oracle、PostgreSQL、Kingbase、DB2、H2 æ•°æ®åº“的主键自增。如果是 MySQL ç­‰æ•°æ®åº“,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@@ -42,7 +43,6 @@
    /**
     * éœ€è¦è®¾å¤‡é¢†ç”¨
     *
     * æžšä¸¾ {@link TODO infra_boolean_string å¯¹åº”的类}
     */
    private Integer needDevReady;
    /**
@@ -68,6 +68,6 @@
    /**
     * äº²å’Œçš„æ£€æŸ¥ç±»åž‹
     */
    private String affinityCheckTypes;
}
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Integer[] affinityCheckTypes;
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/checktype/CheckTypeService.java
@@ -1,12 +1,13 @@
package cn.lihu.jh.module.ecg.service.checktype;
import java.util.*;
import jakarta.validation.*;
import cn.lihu.jh.module.ecg.controller.admin.checktype.vo.*;
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.pojo.PageParam;
import javax.validation.Valid;
/**
 * æ£€æŸ¥ç±»åž‹ Service æŽ¥å£
 *
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/checktype/CheckTypeServiceImpl.java
@@ -1,19 +1,18 @@
package cn.lihu.jh.module.ecg.service.checktype;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import cn.lihu.jh.module.ecg.controller.admin.checktype.vo.*;
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.pojo.PageParam;
import cn.lihu.jh.framework.common.util.object.BeanUtils;
import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper;
import javax.annotation.Resource;
import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -268,6 +268,7 @@
            queueServiceTxFunctions.resetRoom(needCloseBed);
            queueServiceTxFunctions.bedReload();
            queueServiceTxFunctions.monitorInfo();
            queueServiceTxFunctions.resetQueueSequenceTable();
        });
    }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java
@@ -16,6 +16,7 @@
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;
import cn.lihu.jh.module.infra.api.config.ConfigApi;
import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -29,6 +30,7 @@
import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
import static cn.lihu.jh.module.ecg.Constants.*;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
/**
@@ -40,6 +42,9 @@
@Validated
@Slf4j
public class QueueServiceTxFunctions {
    @Resource
    private ConfigApi configApi;
    @Resource
    private OAuth2TokenApi oAuth2TokenApi;
@@ -454,6 +459,13 @@
        log.info(" opening " + openingFlag.get() + " " + monitorInfoVO.getQueueNum() + " " + monitorInfoVO.getActiveQueueNum() + " " + monitorInfoVO.getCheckTypeBedInfo().toString() );
    }
    public void resetQueueSequenceTable() {
        String strBookTimeslotLength = configApi.getConfigValueByKey(BOOK_TIMESLOT_LENGTH);
        String strBookTimeslotList = configApi.getConfigValueByKey(BOOK_TIMESLOT_LIST);
    }
    private Integer getBedReadyMax(Long roomId, String bedNo) {
        RoomDO roomDO = roomMapper.getRoom(roomId, bedNo);
        Integer[] checkTypes = roomDO.getCheckTypes();
sql/mysql/update.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
ALTER TABLE `lihu`.`check_type`
ADD COLUMN `display_barcode` INT NULL DEFAULT 0 COMMENT '是否显示患者条码' AFTER `deleted`,
ADD COLUMN `expense_recognition` INT NULL DEFAULT 0 COMMENT '是否需要确费' AFTER `display_barcode`,
ADD COLUMN `timeslot_book_num` INT NULL DEFAULT 0 COMMENT '时段预约规定人数' AFTER `expense_recognition`,
ADD COLUMN `timeslot_reserved_num` INT NULL DEFAULT 0 COMMENT '每时段预留人数' AFTER `timeslot_book_num`,
ADD COLUMN `affinity_check_types` VARCHAR(45) NULL DEFAULT '' COMMENT '亲和的检查类型' AFTER `timeslot_reserved_num`;
CREATE TABLE `queue_sequence` (
  `id` int NOT NULL AUTO_INCREMENT,
  `check_type` int DEFAULT NULL,
  `time_slot` int DEFAULT NULL,
  `queue_no` int DEFAULT NULL,
  `queue_vip_no` int DEFAULT NULL,
  `queue_full` int DEFAULT NULL,
  `queue_vip_full` int DEFAULT NULL,
  `creator` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `create_time` datetime NOT NULL,
  `updater` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `update_time` datetime NOT NULL,
  `deleted` bit(1) DEFAULT b'0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
SELECT * FROM lihu.check_type;