| | |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.time.LocalDateTime; |
| | |
| | | @ExcelProperty("患者性别") |
| | | private Integer patGender; |
| | | |
| | | @Schema(description = "预约日期") |
| | | @ExcelProperty("预约日期") |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "排队序号") |
| | | @ExcelProperty("排队序号") |
| | | private Integer seqNum; |
| | |
| | | import lombok.*; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | @Schema(description = "管理后台 - 叫号新增/修改 Request VO") |
| | |
| | | @Schema(description = "患者性别") |
| | | private Integer patGender; |
| | | |
| | | @Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "排队序号") |
| | | private Integer seqNum; |
| | | |
| | |
| | | package cn.lihu.jh.module.ecg.dal.dataobject.call; |
| | | |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalDateTime; |
| | |
| | | */ |
| | | private Integer patGender; |
| | | /** |
| | | * 预约日期 |
| | | */ |
| | | private LocalDate bookDate; |
| | | /** |
| | | * 排队序号 |
| | | */ |
| | | private Integer seqNum; |
| | |
| | | import cn.lihu.jh.framework.mybatis.core.query.LambdaQueryWrapperX; |
| | | import cn.lihu.jh.framework.mybatis.core.mapper.BaseMapperX; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.call.CallDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.*; |
| | | import cn.lihu.jh.module.ecg.controller.admin.call.vo.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * 叫号 Mapper |
| | |
| | | |
| | | @Select("select * from lihu.call_patient where called = 0 order by id limit 1") |
| | | CallDO getNextCall(); |
| | | |
| | | @Update("TRUNCATE TABLE lihu.call_patient") |
| | | void clearCall(); |
| | | } |
| | |
| | | " where status = #{curStatus} and pat_id = #{patId}") |
| | | Integer queueJump(@Param("patId")String patId, @Param("curStatus")Byte curStatus, @Param("jumped")Byte jumped ); |
| | | |
| | | @Delete("delete from lihu.queue where TO_DAYS(book_date) != TO_DAYS(NOW())") |
| | | Integer clearQueue(); |
| | | //@Delete("delete from lihu.queue where TO_DAYS(book_date) != TO_DAYS(NOW())") |
| | | @Update("TRUNCATE TABLE lihu.queue") |
| | | void clearQueue(); |
| | | } |
| | | |
| | |
| | | if (listWaiting.size() < bigScreenConfig.waitingSize && waitingFrom != 0) { |
| | | List<QueueDO> listWaiting_next = queueMapper.getPartialQueueByStatus( queueStatusList, 0, bigScreenConfig.waitingSize - listWaiting.size()); |
| | | listWaiting.addAll(listWaiting_next); |
| | | waitingFrom = listWaiting.getLast().getId() + 1; |
| | | } |
| | | if (listWaiting.size() < bigScreenConfig.waitingSize) { |
| | | waitingFrom = 0; |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.call.CallMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | |
| | | |
| | | @Resource |
| | | private RoomMapper roomMapper; |
| | | |
| | | @Resource |
| | | private CallMapper callMapper; |
| | | |
| | | AtomicInteger openingFlag = new AtomicInteger(0); |
| | | AtomicInteger curSeqNum = new AtomicInteger(0); |
| | |
| | | |
| | | // 清除非当天的排队人员 |
| | | queueMapper.clearQueue(); |
| | | // 清除非当天的语音叫号记录 |
| | | callMapper.clearCall(); |
| | | |
| | | // 从DB 获取 工位列表 |
| | | List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>(); |
| | |
| | | `pat_id` varchar(30) NOT NULL COMMENT '患者编号', |
| | | `pat_name` varchar(10) NOT NULL COMMENT '患者姓名', |
| | | `pat_gender` int DEFAULT NULL COMMENT '患者性别', |
| | | `book_date` date NOT NULL COMMENT '预约日期', |
| | | `seq_num` int DEFAULT NULL COMMENT '排队序号', |
| | | `passed` int DEFAULT '0' COMMENT '过号标记', |
| | | `expired` int DEFAULT '0' COMMENT '预约过期标记', |