@ -16,6 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN b_tour_info t2 on t1.external_id = t2.resource_code
WHERE 1=1
and DATE_FORMAT(t1.appointment_date,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
and t1.source_type=1
GROUP BY t2.resource_code, t1.organ_code
</select>
<select id= "getHourAppointmentLiveData" resultType= "java.util.Map" >
@ -29,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN b_tour_info t2 on t1.external_id = t2.resource_code
WHERE
1 = 1
and t1.source_type=1
-- AND DATE_FORMAT( t1.appointment_date, '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( t1.create_time, '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND (DATE_FORMAT(t1.create_time, '%H:%i:%s') >= #{startTime} AND DATE_FORMAT(t1.create_time, '%H:%i:%s') < = #{endTime})
@ -42,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
appointment_center_data t1
LEFT JOIN b_tour_info t2 on t1.external_id = t2.resource_code
where t2.resource_code=#{resourceCode} and t1.del_flag !='2' and t1.state !=3 and certificate_type='5501'
where t2.resource_code=#{resourceCode} and t1.del_flag !='2' and t1.state !=3 and certificate_type='5501' and t1.source_type=1
</select>
<select id= "getResourceCodeList" resultType= "java.util.Map" >
@ -53,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
appointment_center_data t1
LEFT JOIN b_tour_info t2 on t1.external_id = t2.resource_code
where t1.del_flag!=2 and t1.certificate_type ='5501'
where t1.del_flag!=2 and t1.certificate_type ='5501' and t1.source_type=1
GROUP BY
t2.resource_code,
t1.organ_code,
@ -66,18 +69,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
appointment_center_data
WHERE
state = 1
and DATE_FORMAT(write_off_time, '%Y-%m-%d') = DATE_FORMAT( NOW(), '%Y-%m-%d' ) and external_id=#{resourceCode} and del_flag!=2
and DATE_FORMAT(write_off_time, '%Y-%m-%d') = DATE_FORMAT( NOW(), '%Y-%m-%d' ) and external_id=#{resourceCode} and del_flag!=2 and source_type=1
</select>
<select id= "getWriteOffYesterDayDate" resultType= "java.lang.Integer" >
SELECT COUNT(*) FROM appointment_center_data WHERE DATE(write_off_time) = DATE_SUB(CURDATE(), INTERVAL 1 DAY) and external_id=#{resourceCode} and del_flag!=2
SELECT COUNT(*) FROM appointment_center_data WHERE DATE(write_off_time) = DATE_SUB(CURDATE(), INTERVAL 1 DAY) and external_id=#{resourceCode} and del_flag!=2 and source_type=1
</select>
<select id= "getWriteOffPreviousHourDate" resultType= "java.lang.Integer" >
select COUNT(*) FROM appointment_center_data t1
where 1=1
AND DATE_FORMAT( t1.appointment_date, '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT (t1.write_off_time,'%H:00') BETWEEN #{startTime} AND #{endTime}
and t1.external_id=#{resourceCode}
and t1.del_flag!=2
and t1.external_id=#{resourceCode}
and t1.del_flag!=2
and source_type=1
</select>
<select id= "getWriteOffPreviousMonthDate" resultType= "java.lang.Integer" >
@ -92,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
'%Y-%m')
and external_id=#{resourceCode}
and del_flag!=2
and source_type=1
</select>
<select id= "getWriteOffPreviousYearDate" resultType= "java.lang.Integer" >
SELECT count(*)
@ -101,8 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
write_off_time) = YEAR (CURDATE()) - 1
and external_id=#{resourceCode}
and del_flag!=2
and source_type=1
</select>
<select id= "selectTouristVerification" resultType= "java.lang.String" >
select documents_number from appointment_center_data where state =1 and certificate_type ='5501' and external_id = #{resourceCode} and DATE_FORMAT(write_off_time,'%Y-%m-%d') = ( CURDATE() - INTERVAL 1 DAY)
select documents_number from appointment_center_data where state =1 and certificate_type ='5501' and external_id = #{resourceCode} and source_type=1 and source_type=1 and DATE_FORMAT(write_off_time,'%Y-%m-%d') = ( CURDATE() - INTERVAL 1 DAY)
</select>
</mapper>