Commit c9bd53cd authored by 耿迪迪's avatar 耿迪迪

二道门在场人员修改 gengdidi

parent 8d1a0a13
...@@ -111,9 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -111,9 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="statisticsStayInPersons" resultType="java.lang.String"> <select id="statisticsStayInPersons" resultType="java.lang.String">
SELECT SELECT
COUNT(*) COUNT(import.person_num)
FROM FROM
(
( (
SELECT SELECT
* *
...@@ -126,10 +125,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -126,10 +125,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_entrance_guard_person_info t_entrance_guard_person_info
WHERE WHERE
action_type = '0' action_type = '0'
ORDER BY action_time DESC ORDER BY action_time DESC LIMIT 10000
)a )a
GROUP BY a.person_num GROUP BY a.person_num
)import, )import
LEFT JOIN
( (
SELECT SELECT
* *
...@@ -142,12 +142,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -142,12 +142,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_entrance_guard_person_info t_entrance_guard_person_info
WHERE WHERE
action_type = '1' action_type = '1'
ORDER BY action_time DESC ORDER BY action_time DESC LIMIT 10000
)b )b
GROUP BY b.person_num GROUP BY b.person_num
)export )export ON import.person_num = export.person_num
) WHERE (unix_timestamp(import.importTime) - IFNULL(unix_timestamp(export.exportTime),0)) > 0
WHERE import.person_num = export.person_num AND (export.exportTime - import.importTime) > 0
</select> </select>
<select id="lastImportAndExportData" resultMap="TEntranceGuardPersonInfoResult"> <select id="lastImportAndExportData" resultMap="TEntranceGuardPersonInfoResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment