|
@@ -321,75 +321,70 @@
|
|
|
</select>
|
|
|
<select id="getDayAbnormalNum" resultType="java.lang.Integer">
|
|
|
<![CDATA[
|
|
|
-
|
|
|
- select count(DISTINCT person_id) from base_person_device_filter_log
|
|
|
- where record_time >=#{startTime}
|
|
|
- and record_time <= #{endTime}
|
|
|
- and temperature_>#{temperatureMax}
|
|
|
-
|
|
|
+ select count(DISTINCT person_id) from base_person_device_filter_log
|
|
|
+ where record_time >=#{startTime}
|
|
|
+ and record_time <= #{endTime}
|
|
|
+ and temperature_>#{temperatureMax}
|
|
|
]]>
|
|
|
</select>
|
|
|
<select id="getDayAbnormalNumByCompanyList" resultType="Integer">
|
|
|
- <![CDATA[
|
|
|
select count(DISTINCT person_id) from base_person_device_filter_log a left join base_person_info b
|
|
|
on a.person_id = b.id_
|
|
|
+ <foreach collection="list" index="index" item="item" open="and b.company_id in(" separator="," close=")">
|
|
|
+ #{item.id}
|
|
|
+ </foreach>
|
|
|
+ <![CDATA[
|
|
|
where a.record_time >=#{startTime}
|
|
|
and a.record_time <= #{endTime}
|
|
|
and a.temperature_>#{temperatureMax}
|
|
|
- ]]>
|
|
|
- <foreach collection="list" index="index" item="item" open="and b.company_id in(" separator="," close=")">#{item.id}
|
|
|
- </foreach>
|
|
|
and a.del_flag = 0
|
|
|
+ ]]>
|
|
|
</select>
|
|
|
|
|
|
<select id="getDayCheckedPersonNumByCompanyList" resultType="Integer">
|
|
|
select count(DISTINCT person_id) from base_person_device_log a left join base_person_info b
|
|
|
- on a.person_id = b.id_
|
|
|
- where a.record_time >=#{startTime}
|
|
|
- and a.record_time <= #{endTime}
|
|
|
- and b.guest_enabled is not true
|
|
|
- and b.company_id in
|
|
|
+ on a.person_id = b.id_ and b.company_id in
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">#{item.id}
|
|
|
</foreach>
|
|
|
- and a.del_flag = 0
|
|
|
- and b.del_flag = 0
|
|
|
- AND a.temperature_ > 0
|
|
|
<if test="popedom!=null">
|
|
|
and b.popedom_ like #{popedom}
|
|
|
</if>
|
|
|
+ and b.guest_enabled is not true
|
|
|
+ and b.del_flag = 0
|
|
|
+ where a.record_time >=#{startTime}
|
|
|
+ and a.record_time <= #{endTime}
|
|
|
+ and a.del_flag = 0
|
|
|
+ and a.temperature_ > 0
|
|
|
</select>
|
|
|
|
|
|
<select id="getDayNormalNumByCompanyId" resultType="Integer">
|
|
|
- select count(DISTINCT person_id) from base_person_device_filter_log a left join base_person_info b
|
|
|
- on a.person_id = b.id_
|
|
|
+ select count(DISTINCT person_id) from base_person_device_filter_log a
|
|
|
+ left join base_person_info b
|
|
|
+ on a.person_id = b.id_ and b.company_id = #{companyId}
|
|
|
where a.record_time >=#{startTime}
|
|
|
and a.record_time <= #{endTime}
|
|
|
and a.temperature_<= #{temperatureMax}
|
|
|
- and b.company_id = #{companyId}
|
|
|
and a.del_flag = 0
|
|
|
</select>
|
|
|
<select id="countDayByPersonIdAndDate" resultType="Integer">
|
|
|
<![CDATA[
|
|
|
-
|
|
|
- select count(distinct(DATE_FORMAT(a.record_time,'%y-%m-%d'))) from base_person_device_filter_log a
|
|
|
- where a.person_id=#{personId}
|
|
|
- and a.record_time>=#{startDate}
|
|
|
- and a.record_time<#{endDate}
|
|
|
- and a.del_flag=0
|
|
|
-
|
|
|
+ select count(distinct(DATE_FORMAT(a.record_time,'%y-%m-%d'))) from base_person_device_filter_log a
|
|
|
+ where a.person_id=#{personId}
|
|
|
+ and a.record_time>=#{startDate}
|
|
|
+ and a.record_time<#{endDate}
|
|
|
+ and a.del_flag=0
|
|
|
]]>
|
|
|
</select>
|
|
|
<select id="countDetectedByCompanyId" resultType="int">
|
|
|
<![CDATA[
|
|
|
-
|
|
|
- select count(distinct(a.person_id)) from base_person_device_filter_log a
|
|
|
- left join base_person_info b on a.person_id = b.id_
|
|
|
- where b.company_id=#{companyId}
|
|
|
- and a.record_time>=#{startDate}
|
|
|
- and a.record_time<#{endDate}
|
|
|
- and a.del_flag=0
|
|
|
- and b.del_flag=0
|
|
|
-
|
|
|
+ select count(distinct(a.person_id)) from base_person_device_filter_log a
|
|
|
+ left join base_person_info b
|
|
|
+ on a.person_id = b.id_ and b.company_id=#{companyId}
|
|
|
+ where
|
|
|
+ a.record_time>=#{startDate}
|
|
|
+ and a.record_time<#{endDate}
|
|
|
+ and a.del_flag=0
|
|
|
+ and b.del_flag=0
|
|
|
]]>
|
|
|
</select>
|
|
|
<select id="findUndetectedByCompanyCode"
|