chenrj-PC\chenrj 8 年 前
コミット
ee8a3dc8c0

+ 4 - 2
VisualInspection/js/statistics/change_work.js

@@ -70,11 +70,13 @@ function getFsWorkInfo(){
     }
 
     post_common_service("statistics/fs/unregular/work/person",param,function(data){
-   
+        var seq = 1 ;
         $(".table-tbody").empty();
         if(data.length >0){
             for(var i=0;i< data.length;i++){
-                $(".table-tbody").append( getTableContent(data[i],i+1));
+                if(data[i].userName != undefined){
+                    $(".table-tbody").append( getTableContent(data[i],seq++));
+                }
             }
         }
     },function(error){

+ 4 - 1
VisualInspection/js/statistics/common_work.js

@@ -73,8 +73,11 @@ function getFsWorkInfo(){
    
         $(".table-tbody").empty();
         if(data.length >0){
+            var seq = 1;
             for(var i=0;i< data.length;i++){
-                $(".table-tbody").append( getTableContent(data[i],i+1));
+                if(data[i].userName != undefined){
+                    $(".table-tbody").append( getTableContent(data[i],seq++));
+                }
             }
         }
     },function(error){

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

@@ -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>