You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.shibofu.spring.db1.dao.ArchiveMasterDao">
<update id="updatePacsCompenSate">
update pacs_compensate set compensateState=1 where masterId=#{masterId}
</update>
<select id="PollingPacs" resultType="com.shibofu.spring.vo.ArchiveMasterVo">
SELECT
id,
name,
visit_id AS visitId,
inp_no AS inpNo,
admission_date_time AS admissionDateTime,
discharge_date_time AS dischargeDateTime
FROM
archive_master
WHERE
discharge_date_time BETWEEN DATEADD( hh, - 24,GETDATE() ) AND GETDATE()
</select>
<select id="PacsEveryWeekPolling" resultType="com.shibofu.spring.vo.ArchiveMasterVo">
SELECT
id,
name,
visit_id AS visitId,
inp_no AS inpNo,
admission_date_time AS admissionDateTime,
discharge_date_time AS dischargeDateTime
FROM
archive_master
WHERE
discharge_date_time BETWEEN DATEADD( hh, - 168,GETDATE() ) AND GETDATE()
</select>
<select id="makeUpPacsByMasterId" resultType="com.shibofu.spring.vo.ArchiveMasterVo">
SELECT
id,
name,
visit_id AS visitId,
inp_no AS inpNo,
admission_date_time AS admissionDateTime,
discharge_date_time AS dischargeDateTime
FROM
archive_master
WHERE
id=#{masterId}
</select>
<select id="PollingPacsAnXu" resultType="com.shibofu.spring.vo.ArchiveMasterVo">
SELECT
id,
name,
visit_id AS visitId,
inp_no AS inpNo,
admission_date_time AS admissionDateTime,
discharge_date_time AS dischargeDateTime
FROM
archive_master
where discharge_date_time BETWEEN '2024-04-01 00:00:00' AND '2024-05-14 23:59:59'
order by discharge_date_time ASC
</select>
<select id="selectPacsPush" resultType="java.lang.String">
select top 1 masterId from pacs_compensate where compensateState=0
</select>
</mapper>