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;