|
|
@@ -370,7 +370,7 @@
|
|
|
<select id="selectFsWork" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
|
|
|
SELECT t.* , ct.id AS check_id FROM sys_user_class t
|
|
|
LEFT JOIN check_task ct ON t.id = ct.user_class_id AND ct.check_status != 22 AND t.class_type = ct.class_type AND t.user_id = ct.checked_person
|
|
|
- WHERE 1=1
|
|
|
+ WHERE 1=1 AND t.user_id IS NOT NULL
|
|
|
<include refid="select_Fswork_condition" />
|
|
|
ORDER BY t.work_date , t.user_id
|
|
|
</select>
|
|
|
@@ -378,7 +378,7 @@
|
|
|
<select id="selectFsWorkGather" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultType="com.xintong.visualinspection.bean.StatisticsFsWork">
|
|
|
SELECT COUNT(DISTINCT(work_date)) AS work_days , SUM( TIMESTAMPDIFF(MINUTE, t.start_time,t.end_time)) AS work_minutes , t.*
|
|
|
FROM sys_user_class t
|
|
|
- WHERE 1=1
|
|
|
+ WHERE 1=1 AND t.user_id IS NOT NULL
|
|
|
<include refid="select_Fswork_condition"/>
|
|
|
GROUP BY t.user_id
|
|
|
</select>
|
|
|
@@ -386,7 +386,7 @@
|
|
|
<select id="selectFsUnregularWork" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
|
|
|
SELECT t.* , ct.id AS check_id FROM sys_user_class_unregular t
|
|
|
LEFT JOIN check_task ct ON t.id = ct.user_class_unregular_id AND ct.check_status != 22 AND t.class_type = ct.class_type AND t.user_id = ct.checked_person
|
|
|
- WHERE 1=1
|
|
|
+ WHERE 1=1 AND t.user_id IS NOT NULL
|
|
|
<include refid="select_Fswork_condition" />
|
|
|
ORDER BY t.work_date
|
|
|
</select>
|
|
|
@@ -394,7 +394,7 @@
|
|
|
<select id="selectFsUnregularWorkGather" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultType="com.xintong.visualinspection.bean.StatisticsFsWork">
|
|
|
SELECT COUNT(DISTINCT(work_date)) AS work_days , SUM( TIMESTAMPDIFF(MINUTE, t.start_time,t.end_time)) AS work_minutes , t.*
|
|
|
FROM sys_user_class_unregular t
|
|
|
- WHERE 1=1
|
|
|
+ WHERE 1=1 AND t.user_id IS NOT NULL
|
|
|
<include refid="select_Fswork_condition"/>
|
|
|
GROUP BY t.user_id
|
|
|
</select>
|
|
|
@@ -402,7 +402,7 @@
|
|
|
<select id="selectFsWorkGatherGroupByWorkType" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork" >
|
|
|
SELECT COUNT(DISTINCT(work_date)) AS work_days , t.*
|
|
|
FROM sys_user_class t
|
|
|
- WHERE 1=1
|
|
|
+ WHERE 1=1 AND t.user_id IS NOT NULL
|
|
|
<include refid="select_Fswork_condition"/>
|
|
|
GROUP BY t.user_id , t.class_type
|
|
|
</select>
|
|
|
@@ -410,7 +410,7 @@
|
|
|
<select id="selectFsUnregularWorkGatherGroupByWorkType" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
|
|
|
SELECT COUNT(DISTINCT(work_date)) AS work_days , t.*
|
|
|
FROM sys_user_class_unregular t
|
|
|
- WHERE 1=1
|
|
|
+ WHERE 1=1 AND t.user_id IS NOT NULL
|
|
|
<include refid="select_Fswork_condition"/>
|
|
|
GROUP BY t.user_id , t.class_type
|
|
|
</select>
|