|
@@ -417,37 +417,28 @@
|
|
|
|
|
|
<select id="getDayCheckedPersonByCompanyList" resultMap="PersonDeviceFilterLogMap">
|
|
|
<![CDATA[
|
|
|
-
|
|
|
- select * from base_person_device_filter_log a left join base_person_info b
|
|
|
- on a.person_id = b.id_
|
|
|
- where a.record_time>=#{startDate}
|
|
|
- and a.record_time<#{endDate}
|
|
|
- and a.del_flag=0
|
|
|
- and b.company_id = #{companyInfo.id}
|
|
|
-
|
|
|
- ]]>
|
|
|
-
|
|
|
- group by a.person_id order by a.record_time desc
|
|
|
-</select>
|
|
|
-
|
|
|
+ select * from base_person_device_filter_log a left join base_person_info b
|
|
|
+ on a.person_id = b.id_
|
|
|
+ where a.record_time>=#{startDate}
|
|
|
+ and a.record_time<#{endDate}
|
|
|
+ and a.del_flag=0
|
|
|
+ and b.company_id = #{companyInfo.id}
|
|
|
+ ]]>
|
|
|
+ group by a.person_id order by a.record_time desc
|
|
|
+ </select>
|
|
|
<select id="countDetectedByCompanyIds" resultType="long">
|
|
|
<![CDATA[
|
|
|
- select count(*) from (
|
|
|
- SELECT count(*) from base_person_device_filter_log a ,base_person_info b
|
|
|
+ SELECT count(distinct(b.id_)) from base_person_device_filter_log a ,base_person_info b
|
|
|
where a.person_id = b.id_
|
|
|
and a.del_flag = 0
|
|
|
and b.del_flag = 0
|
|
|
and a.record_time>=#{startTime}
|
|
|
and a.record_time<=#{endTime}
|
|
|
]]>
|
|
|
-
|
|
|
- <foreach collection="companyIds" index="index" item="item" open="and b.company_id in(" separator=","
|
|
|
- close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- group by person_id ) m
|
|
|
-
|
|
|
-
|
|
|
+ <foreach collection="companyIds" index="index" item="item" open="and b.company_id in(" separator=","
|
|
|
+ close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
</select>
|
|
|
|
|
|
<select id="findUndetectedPersonListByCompanyIds" resultMap="com.jpsoft.smart.modules.base.dao.PersonInfoDAO.PersonInfoMap">
|