chenrj-PC\chenrj 8 years ago
parent
commit
6f266feefc

+ 2 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml

@@ -457,7 +457,8 @@
     
     <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
+    		LEFT JOIN check_task ct ON (t.id = ct.user_class_unregular_id OR ( ct.start_time > t.start_time AND ct.end_time  &lt; t.end_time  ) )
+    		AND ct.check_status != 22 AND t.class_type = ct.class_type AND t.user_id = ct.checked_person
     		WHERE 1=1   AND t.user_id IS NOT NULL
     		<include refid="select_Fswork_condition" />
     		ORDER BY t.work_date