| | |
| | | @Select("select * from lihu.appointment where pat_id = #{patId} and to_days(book_date) = to_days(Now())") |
| | | List<AppointmentDO> getCurrentPatId(String patId); |
| | | |
| | | @Select("select * from lihu.appointment where (apply_no = #{code} or episode_id= #{code} or hospital_no =#{code} or pat_identity_id=#{code}) and to_days(book_date) = to_days(Now())") |
| | | @Select("select * from lihu.appointment where (apply_no = #{code} or episode_id= #{code} or hospital_no =#{code} or pat_identity_id=#{code}) and book_date >= DATE_ADD(CURDATE(), INTERVAL -5 DAY) AND book_date <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)") |
| | | List<AppointmentDO> getCurrentCode(String code); |
| | | |
| | | @Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(Now()) limit 1") |
| | |
| | | |
| | | @Select("select * from lihu.appointment where apply_no = #{applyNo} limit 1") |
| | | AppointmentDO getByApplyNo(@Param("applyNo") String applyNo); |
| | | |
| | | /** |
| | | * 【需求1】按申请号批量查询,供列表页一次性回填患者信息,避免 N+1 查询。 |
| | | * |
| | | * @param applyNoList 申请号列表(调用方需保证非空,MySQL 的 IN () 会语法错误) |
| | | */ |
| | | @Select("<script>" + |
| | | "select * from lihu.appointment where deleted = 0 and apply_no in (" + |
| | | " <foreach collection='applyNoList' separator=',' item='_applyNo'>" + |
| | | " #{_applyNo} " + |
| | | " </foreach> )" + |
| | | "</script>") |
| | | List<AppointmentDO> getByApplyNoList(@Param("applyNoList") List<String> applyNoList); |
| | | } |
| | | |