You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
713 B
23 lines
713 B
|
5 years ago
|
<?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.ccsens.wisdomcar.persist.dao.WisdomCarDao">
|
||
|
|
|
||
|
|
<select id="queryFreeCar" resultType="com.ccsens.wisdomcar.bean.vo.WisdomCarVo$FreeCar">
|
||
|
|
( SELECT id, car_number FROM t_wisdom_car WHERE hospital_id = #{hospitalId} AND rec_status = 0 ) EXCEPT
|
||
|
|
(
|
||
|
|
SELECT
|
||
|
|
c.id,
|
||
|
|
c.car_number
|
||
|
|
FROM
|
||
|
|
t_patient_wisdom_car pc,
|
||
|
|
t_wisdom_car c
|
||
|
|
WHERE
|
||
|
|
pc.car_id = c.id
|
||
|
|
AND c.hospital_id = #{hospitalId}
|
||
|
|
AND pc.end_time = 0
|
||
|
|
AND pc.start_time >= ( unix_timestamp( ) - 2 * 60 * 60 ) * 1000
|
||
|
|
AND pc.rec_status = 0
|
||
|
|
AND c.rec_status = 0
|
||
|
|
)
|
||
|
|
</select>
|
||
|
|
</mapper>
|