| | |
| | | |
| | | @Schema(description = "诊疗床编号") |
| | | private String bedNo; |
| | | |
| | | @Schema(description = "亲和的检查项") |
| | | private List<Integer> affinityItems; |
| | | } |
| | | |
| | |
| | | * 诊疗床编号 |
| | | */ |
| | | private String bedNo; |
| | | /** |
| | | * 亲和项 |
| | | */ |
| | | @TableField(typeHandler = JacksonTypeHandler.class) |
| | | private List<Integer> affinityItems; |
| | | } |
| | | |
| | |
| | | @Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(Now()) limit 1") |
| | | AppointmentDO getCurrentByPatAndCheckType(@Param("patId") String patId, @Param("checkType") Integer checkType); |
| | | |
| | | @Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(book_date) limit 1") |
| | | @Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(#{book_date}) limit 1") |
| | | AppointmentDO getByPatAndCheckTypeAndBookDate(@Param("patId") String patId, @Param("checkType") Integer checkType, @Param("book_date") LocalDate book_date); |
| | | } |
| | | |
| | |
| | | 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.checktype.CheckTypeDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.*; |
| | | import cn.lihu.jh.module.ecg.controller.admin.checktype.vo.*; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * 检查类型 Mapper |
| | |
| | | .orderByDesc(CheckTypeDO::getId)); |
| | | } |
| | | |
| | | @Select("<script> " + |
| | | "SELECT * FROM lihu.check_type;" + |
| | | "</script>") |
| | | @Select("SELECT * FROM lihu.check_type;") |
| | | @Results({ |
| | | @Result(property = "affinityCheckTypes", column = "affinity_check_types", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class) |
| | | }) |
| | | List<CheckTypeDO> simpleCheckTypeList(); |
| | | |
| | | } |
| | | } |
| | |
| | | " </foreach> )" + |
| | | " and TO_DAYS(book_date) = TO_DAYS(NOW()) " + |
| | | "</script>") |
| | | List<QueueDO> getCurPatGivenCheckTypes(@Param("patId")String patId, @Param("checkTypeList")Integer[] arrCheckType); |
| | | List<QueueDO> getCurPatGivenCheckTypes(@Param("patId")String patId, @Param("arrCheckType")Integer[] arrCheckType); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue " + |
| | |
| | | " and status = #{status} " + |
| | | " and TO_DAYS(book_date) = TO_DAYS(NOW()) " + |
| | | "</script>") |
| | | List<QueueDO> getCurPatGivenCheckTypesAndStatus(@Param("patId")String patId, @Param("checkTypeList")Integer[] arrCheckType, @Param("status")Integer status); |
| | | List<QueueDO> getCurPatGivenCheckTypesAndStatus(@Param("patId")String patId, @Param("arrCheckType")Integer[] arrCheckType, @Param("status")Integer status); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue " + |
| | |
| | | CheckTypeDO checkTypeDO = queueServiceTxFunctions.getCheckTypeItem( queueSaveReqVO.getBookCheckType() ); |
| | | if ( checkTypeDO.getAffinityCheckTypes().length > 0) { |
| | | List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckTypes(queueSaveReqVO.getPatId(), checkTypeDO.getAffinityCheckTypes()); |
| | | //List<Integer> affinityItemIDs = affinityItems.stream().map(queueItem -> queueItem.getId()).toList(); |
| | | //queueSaveReqVO.setAffinityItems(affinityItemIDs); |
| | | |
| | | for (int i=0; i < affinityItems.size(); i++) { |
| | | QueueDO queueItem = affinityItems.get(i); |