Explorar el Código

清障功能开发

chenrj-PC\chenrj hace 8 años
padre
commit
4e354245e6

+ 3 - 1
VisualInspection/css/statistics/assess_situation.css

@@ -91,7 +91,9 @@ table{
     padding-top: 6px;
 }
 
-
+.special-style td{
+    border:  1px solid #c7c6c5;
+}
 
 
 

+ 2 - 2
VisualInspection/js/statistics/wrecker.js

@@ -84,7 +84,7 @@ function gethtml(data,i){
                 +"</td><td width='5%'>"+data.onsite_check_num+"</td><td width='5%'>"+data.onsite_total_score
                 +"</td><td width='5%'>"+data.other_check_num+"</td><td width='5%'>"+data.other_total_score
                  +"</td><td width='5%'>"+data.check_all_score+"</td><td width='8%'>"
-                + calculate_avg(data.check_all_score,data.checked_num) +"</td>"
+                + calculate_avg( data.check_all_score,data.checked_num) +"</td>"
                 +"<td width='7%'></td><tr>";
     return strTbody;
 }
@@ -93,7 +93,7 @@ function calculate_avg(score,num){
     if(num == 0){
         return '/';
     }
-    return (score/num).toFixed(2) ;
+    return 1000 -  (score/num).toFixed(2) ;
 }
 
 

+ 27 - 164
VisualInspection/js/statistics/wrecker_person.js

@@ -9,7 +9,7 @@ $(function() {
     }
 
     // 初始化查询
-    initQueryEmp(null, null);
+    initQueryEmp();
 })
 
 function queryEmpClick() {
@@ -45,45 +45,18 @@ function queryEmpClick() {
         return;
     }
     var param = {
-        "parent_dept_id": GV("#center-manager"),
-        "dept_id": GV("#fsList"),
+        "positionid": $("#jobSelect").val(),
+        "dept_id": $("#select-dept").val(),
         "start_date": start_date,
         "end_date": end_date,
     }
-    var url = "statistics/business/feedback";
+    var url = "statistics/check/wrecker/staff";
     getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num)
 }
 
-function initQueryEmp(parent_dept_id, dept_id) {
-    setJobSelect("#jobSelect");
-    var p_m = $.zui.store.get('store_param_' + current_url)
-    $.zui.store.set('store_param_' + current_url, null);
-    if (p_m) {
-
-        $("#center-manager").val(p_m.parent_dept_id);
-        $("#fsList").val(p_m.dept_id);
-        $("#start-time").val(p_m.start_date);
-        $("#end-time").val(p_m.end_date);
-        $("#start-num").val(p_m.start_num);
-        $("#end-num").val(p_m.end_num);
-        $("#start-score").val(p_m.start_score);
-        $("#end-score").val(p_m.end_score);
-        $("#jobSelect").val(p_m.job_select);
-
-
-        parent_dept_id = p_m.parent_dept_id;
-        dept_id = p_m.dept_id;
-        setJobSelect("#jobSelect", p_m.job_select);
-
-        getFsStationList(GV("#center_manage"), function(options) {
-            $("#fsList").append(options);
-            var dept;
-            if (roleContains("STATION")) {
-                dept = getCurrentUser().organid;
-            }
-            $("#fsList").val(p_m.dept_id);
-        });
-    }
+function initQueryEmp() {
+   
+     setJobSelect("#jobSelect");
 
     //默认初始化前一周查所有
     var endD = new Date();
@@ -108,15 +81,13 @@ function initQueryEmp(parent_dept_id, dept_id) {
     start_date = start.toDate().Format("yyyy-MM-dd HH:mm:ss");
 
     var param = {
-        "parent_dept_id": parent_dept_id,
-        "dept_id": dept_id,
+        "positionid": $("#jobSelect").val(),
+        "dept_id": $("#select-dept").val(),
         "start_date": start_date,
         "end_date": end_date,
     }
 
-
-
-    var url = "statistics/business/feedback";
+    var url = "statistics/check/wrecker/staff";
     getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num);
 }
 /**
@@ -126,66 +97,38 @@ function initQueryEmp(parent_dept_id, dept_id) {
  */
 function getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num) {
     post_common_service(url, param, function(data) {
-
         var strTbody = '';
-        var count = 0;
-        var start_date_time = moment(param.end_date + "Z");
-        var now_date_time = moment();
-        var current_start_date = null;
-
-        if (now_date_time.date() >= 26) {
-            current_start_date = moment(now_date_time.format("YYYY-MM") + "-25 23:00:00Z").subtract(1, "month");
-        } else {
-            current_start_date = moment(now_date_time.format("YYYY-MM") + "-25 23:00:00Z").subtract(2, "month");
-        }
-
-        if (start_date_time.valueOf() <= current_start_date.valueOf()) {
-            isshownumber = true;
-
-        }
-
         for (var i = 0; i < data.length; i++) {
-            var score = 1000 - filterByZeroHandle(data[i].check_score_avg, '0');
-            var check_number = filter(data[i].checked_num, '0');
-            var flag = judgeParamFilter(data, i, score, start_score, end_score, check_number, start_num, end_num)
-            if (flag) {
-                html = "";
-                if (hasRole(ROLE_JICHA_ADMIN) || hasRole(ROLE_ADMIN) || hasRole(ROLE_ROAD_MANAGER)) {
-                    isshownumber = true;
-                    if (hasRole(ROLE_JICHA_ADMIN) || hasRole(ROLE_ADMIN)) {
-                        // html += "<button id=\"user_" + data[i].user.id + "\" onClick='addTask(" + data[i].user.id + ",\"" + data[i].user.truename + "\",\"" + data[i].user.fee_station_name + "\",\"" + data[i].checked_num + "\",\"" + param.start_date + "\",\"" + param.end_date + "\")'  class=\"btn\" style='margin-left: 10px;padding: 0px;border: 0;background: none;' type=\"button\"><i class=\"icon icon-plus-sign\"></i></button>"
-                    }
+            var agv = filterSlash( data[i].all_check_score, data[i].check_num) ;
+            if( !(start_score ==0 && end_score ==1000)){
+                 if(agv ==  '/' || agv< start_score || agv > end_score ){
+                    continue ;
                 }
-
-                strTbody += "<tr><td width='4%;'>" + (count + 1) + "</td><td width='6%;'>" + data[i].user.fee_station_name + "</td>" +
-                    "<td width='6%;'>" + data[i].user.truename + "</td><td width='6%;'>" + data[i].user.position_name + "</td>" +
-                     "<td width='7%;'>" + data[i].user.workno + "</td>"+
-                     //<td width='4%;'>" + filter(data[i].company_ranking, '/') + "</td>" 
-                    // "<td width='4%;'>" + filter(data[i].center_ranking, '/') + "</td><td width='4%;'>" + filter(data[i].fee_station_ranking, '/') +
-                    "</td><td width='4%;'>" +filter(data[i].checked_num, '0') + "</td>" +
-                    "<td width='4%;'>" + filter(data[i].score, '0') + "</td><td width='4%;'>" + filter(data[i].check_t_num, '0') + "</td>" +
-                    "<td width='4%;'>" + filter(data[i].check_t_score, '0') + "</td><td width='4%;'>" + filter(data[i].check_x_num, '0') + "</td>" +
-                    "<td width='4%;'>" + filter(data[i].check_x_score, '0') + "</td><td width='4%'>" + filter(data[i].check_s_num, '0') + "</td><td width='4%;'>" +
-                    filter(data[i].check_s_score, '0') + "</td><td width='4%;'>" + filter(data[i].check_all_num, '0') + "</td>" +
-                    "<td width='4%;'>" +  filter(data[i].check_all_score, '0') + "</td><td width='4%;'>" + filterSlash(filterByZeroHandle(data[i].check_score_avg, '0'), filter(data[i].checked_num  + data[i].check_t_num  + data[i].check_x_num + data[i].check_s_num, '0')) + "</td>" +
-                    "<td width='4%;'>" + filterSlash(score.toFixed(2), filter(data[i].score + data[i].check_t_score + data[i].check_x_score + data[i].check_s_score, '0')) + "</td>" + "<td width='4%;'>" + "</td></tr>";
-                count++;
             }
+            strTbody += "<tr><td width='4%;'>" + (i + 1) + "</td><td width='6%;'>" + data[i].dept_name + "</td>" +
+                "<td width='5%;'>" + data[i].name + "</td><td width='5%;'>" + data[i].work_no + "</td>" +
+                    "<td width='5%;'>" + data[i].position_name + "</td>"+
+
+                "</td><td width='4%;'>" + data[i].chu_jing + "</td>" +
+                "<td width='4%;'>" +  data[i].xian_chang + "</td><td width='4%;'>" + data[i].chang_tong + "</td>" +
+                "<td width='4%;'>" + data[i].zuo_ye + "</td><td width='4%;'>" + data[i].xin_xi + "</td>" +
+                "<td width='4%;'>" + data[i].zhuo_zhuang + "</td><td width='4%'>" +data[i].zuo_ye_xian_chang + "</td><td width='4%;'>" +
+                data[i].wen_ming + "</td><td width='4%;'>" + data[i].cao_zuo + "</td>" +
+                "<td width='4%;'>" +   data[i].gong_zuo + "</td><td width='5%;'>" + data[i].private_check + "</td>" +
+                "<td width='5%;'>" + data[i].in_check + "</td>" + "<td width='5%;'>"+  data[i].other_check +"</td><td width='5%;'>"+data[i].all_check_score +"</td><td width='5%;'>"+ agv+"</td><td width='5%;'></td><td width='5%;'>" + "</td></tr>";
         }
+         $(".table-tbody").empty();
         $(".table-tbody").append(strTbody);
-        $("tr:gt(1):odd").css("background", "#EFEFEF");
     }, function(error) {
         return "";
     });
 }
 
-
 function getOrganList(){
     var  organList = $.zui.store.get("cache_wrecker_group_list");
     return organList;
 }
 
-
 /**
  * 对于受检次数为0,扣分和得分都为 /
  * @param {*} value , check_num 受此次数
@@ -195,92 +138,12 @@ function filterSlash(value, check_num) {
     if (check_num == 0) {
         return '/';
     } else {
-        return value;
-    }
-}
-
-function judgeParamFilter(data, i, score, start_score, end_score, check_number, start_num, end_num) {
-    var flag1 = false;
-    if (score >= parseFloat(start_score) && score <= parseFloat(end_score)) {
-        flag1 = true;
-    } else {
-        flag1 = false;
-    }
-    var flag2 = false;
-    if (check_number >= parseFloat(start_num) && check_number <= parseFloat(end_num)) {
-        flag2 = true;
-    } else {
-        flag2 = false;
-    }
-
-    var jobSelect = $("#jobSelect").val();
-    if (jobSelect) {
-        if (data[i].user.positionid == jobSelect) {
-            flag3 = true;
-        } else {
-            flag3 = false;
-        }
-    } else {
-        flag3 = true;
+        return 1000- (value/check_num).toFixed(2);
     }
-    return flag1 & flag2 & flag3;
 }
 
-function average(obj) {
-    if (filter(obj.checked_num + obj.checked_m_num, '0') == 0) {
-        return 0;
-    } else {
-        return (obj.check_all_score + obj.check_all_m_score) / filter(obj.checked_num + obj.checked_m_num, '1')
-    }
-}
 
-/**
- * 过滤undefined
- * @param {*} value
- * @param {*} default_display_value
- */
-function filter(value, default_display_value) {
-    if (value != '' && value != undefined) {
-        return value;
-    } else if (default_display_value != undefined) {
-        return default_display_value;
-    } else {
-        return "";
-    }
-}
 
-/**
- * 获取扣分详情
- * @param {*} obj
- * @param {*} check_item_name
- */
-function getItemScore(obj, check_item_name) {
-    var names = obj.checked_socre_name;
-    var scores = obj.checked_score;
-
-    for (var i = 0; i < names.length; i++) {
-        if (names[i].indexOf(check_item_name) > -1) {
-            return scores[i];
-        }
-    }
-    return 0;
-}
-
-/**
- * 过滤除数为0和保留二位小数时出现的0.00
- * @param {*} value
- * @param {*} default_display_value
- */
-function filterByZeroHandle(value, default_display_value) {
-    if (isNaN(value)) {
-        return default_display_value;
-    } else {
-        if ((value + '').endsWith('.00')) {
-            return value.substring(0, value.length - 3);
-        }
-        return value;
-    }
-}
 
 function exportExcel() {
     var dept_id = $("#fsList").val();

+ 1 - 1
VisualInspection/view/statistics/wrecker.html

@@ -58,7 +58,7 @@
           <div id="scrollTable" style="height:300px;overflow:scroll;margin-right:-10px;">
               <div class="table-head" style="margin:0px;">
                   <table border="1" width="100%" height="90px" align="center" style="border-top:0px;">
-                    <tbody class="table-tbody" style="background:white" align="center">
+                    <tbody class="table-tbody " style="background:white" align="center">
                
                     </tbody>
                   </table></div>

+ 25 - 25
VisualInspection/view/statistics/wrecker_person.html

@@ -64,42 +64,42 @@
                         <tr>
                             <th rowspan="3" width="4%;" id='th_1'>序号</th>
                             <th rowspan="3" width="6%" id='th_2'>单位</th>
-                            <th rowspan="3" width="6%" id='th_3'>姓名</th>
-                            <th rowspan="3" width="7%" id='th_5'>工号</th>
-                            <th rowspan="3" width="6%" id='th_4'>岗位</th>
+                            <th rowspan="3" width="5%" id='th_3'>姓名</th>
+                            <th rowspan="3" width="5%" id='th_5'>工号</th>
+                            <th rowspan="3" width="5%" id='th_4'>岗位</th>
                             <th colspan="13" height="40px" id='th_9'>考核扣分</th>
-                            <th rowspan="3" width="4%" id='th_13'>合计扣分</th>
-                            <th rowspan="3" width="4%" id='th_11'>平均得分(千分制)</th>
-                            <th rowspan="3" width="4%" id='th_12'>服务评价</th>
-                            <th rowspan="3" width="4%" id='th_14'>备注</th>
+                            <th rowspan="3" width="5%" id='th_13'>合计扣分</th>
+                            <th rowspan="3" width="5%" id='th_11'>平均得分(千分制)</th>
+                            <th rowspan="3" width="5%" id='th_12'>服务评价</th>
+                            <th rowspan="3" width="5%" id='th_14'>备注</th>
                         </tr>
                         <tr>
-                            <th colspan="5" width="20%" id='th_9_1'>中心实时检查</th>
-                            <th colspan="5" width="20%" id='th_9_2'>视频稽查</th>
-                            <th rowspan="2" width="4%" id='th_9_3'>暗访</th>
-                            <th rowspan="2" width="4%" id='th_9_4'>现场检查</th>
-                            <th rowspan="2" width="4%" id='th_9_5'>其他</th>
+                            <th colspan="5"  id='th_9_1'>中心实时检查</th>
+                            <th colspan="5" id='th_9_2'>视频稽查</th>
+                            <th rowspan="2" width="5%"  id='th_9_3'>暗访</th>
+                            <th rowspan="2" width="5%"  id='th_9_4'>现场检查</th>
+                            <th rowspan="2" width="5%"  id='th_9_5'>其他</th>
                         </tr>
                         <tr>
-                            <th>出警<br>时性</th>
-                            <th>现场<br>达率</th>
-                            <th>畅通率</th>
-                            <th>作业现场<br>安全管理</th>
-                            <th>信息上报</th>
+                            <th width="4%">出警<br><br>性</th>
+                            <th width="4%">现场<br><br>率</th>
+                            <th width="4%">畅通<br>率</th>
+                            <th width="4%">作业<br>现场<br>安全<br>管理</th>
+                            <th width="4%">信息<br>上报</th>
 
-                            <th>着装<br>规范</th>
-                            <th>作业现场<br>安全管理</th>
-                            <th>文明<br>服务</th>
-                            <th>操作<br>规范</th>
-                            <th>工作<br>纪律</th>
+                            <th width="4%">着装<br>规范</th>
+                            <th width="4%">作业<br>现场<br>安全<br>管理</th>
+                            <th width="4%">文明<br>服务</th>
+                            <th width="4%">操作<br>规范</th>
+                            <th width="4%">工作<br>纪律</th>
                         </tr>
                     </thead>
                 </table>
             </div>
         </div>
-        <div id="scrollTable" style="height:300px;overflow:scroll;">
+        <div id="scrollTable" style="height:200px;overflow:scroll;">
             <table style="border-top:0;" border="0" width="100%" align="center">
-                <tbody class="table-tbody" style="background:white; " align="center">
+                <tbody class="table-tbody special-style" style="background:white; " align="center">
 
                 </tbody>
             </table>
@@ -109,7 +109,7 @@
 <script>
     $(document).ready(function() {
         // 设置滚动表格的高度
-        $("#scrollTable").height($(window).height() - 360);
+        $("#scrollTable").height($(window).height() - 410);
 
         // 仅选择日期 开始 ,结束时间
         $("#start-time,#end-time").datetimepicker({

+ 112 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/WreckerStatisticsBO.java

@@ -0,0 +1,112 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class WreckerStatisticsBO {
+	
+	 //编号
+    private Integer id;
+ 
+    private String dept_name ;
+    
+    // 部门id
+    private Long dept_id;
+    
+    //开始日期
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date start_date ;
+    
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date end_date ;
+
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date update_time ;
+
+    private Long work_no;
+
+    private Integer positionid ;
+    
+    private Long user_id ;
+    
+    private String name ;
+    
+    private String position_name ;
+    
+    private int score;
+    
+    private Integer item_id ;
+
+    private String item_name ;
+    
+    private int chu_jing ;
+    
+    private int xian_chang;
+    
+    private int chang_tong ;
+    
+    private int zuo_ye;
+    
+    private int xin_xi ;
+    
+    private int zhuo_zhuang;
+    
+    private int zuo_ye_xian_chang;
+    
+    private int wen_ming ;
+    
+    private int cao_zuo ;
+    
+    private int gong_zuo;
+    
+    //
+    private int private_check ;
+    
+    private int in_check ;
+    
+    private int other_check ;
+    
+    private int all_check_score ;
+    
+    private int check_num;
+    
+    private Integer wrecker_check_type ;
+
+    
+    public int compareTo(WreckerStatisticsBO o2){
+    	if(this.getCheck_num() !=0  && o2.getCheck_num() !=0){
+    		double a=this.getAll_check_score()/this.getCheck_num();
+    		double b= o2.getAll_check_score() /  this.getCheck_num()  ;
+    		if(a>b){
+    			return 1;
+    		}else if(a<b){
+    			return -1 ;
+    		}else{
+    			return 0 ;
+    		}
+    	}else{
+    		if(this.getCheck_num() == 0 && o2.getCheck_num() !=0){
+    			return 1 ;
+    		}else if(this.getCheck_num() != 0 && o2.getCheck_num() ==0){
+    			return -1 ;
+    		}else{
+    			return 0 ;
+    		}
+    	}
+    }
+    
+}

+ 8 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java

@@ -17,6 +17,7 @@ import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.StatisticsFsWork;
+import com.xintong.visualinspection.bean.WreckerStatisticsBO;
 import com.xintong.visualinspection.service.StatisticsService;
 import com.xintong.visualinspection.util.CodeUtil;
 
@@ -367,4 +368,11 @@ public class StatisticsController extends BaseController {
     	List<StatisticsBean> lists=  statisticsService.getWreckerCheckInfo(obj);
     	return super.returnSuccessResult(lists);
     }
+    
+    @RequestMapping(value = "/check/wrecker/staff")
+    public String getCheckWreckerStaff(@RequestBody WreckerStatisticsBO obj){
+    	List<WreckerStatisticsBO> lists=  statisticsService.getWreckerStaffInfo(obj);
+    	return super.returnSuccessResult(lists);
+    }
+    
 }

+ 7 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java

@@ -75,4 +75,11 @@ public interface StatisticsDao  {
 	
 	public List<WreckerGroup> selectWreckerOrgan();
 	
+	
+	public List<WreckerStatisticsBO> selectWreckerStaff(WreckerStatisticsBO obj);
+	
+	public List<WreckerStatisticsBO> selectWreckerStatisticDetail(WreckerStatisticsBO obj);
+	
+	public List<WreckerStatisticsBO> selectWreckerStatistic(WreckerStatisticsBO obj);
+	
 }

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

@@ -834,9 +834,6 @@
             <result property="appeal_result" column="appeal_result"/>
         </collection>
     </resultMap>
-
-
-
 	
 	<select id="selectCheckAppealNum" parameterType="com.xintong.visualinspection.bean.CheckAppealStatistic" resultMap="appealNum" >
 		SELECT COUNT(t.appeal_dept) AS appeal_num ,t.appeal_dept AS dept_id,t.appeal_result FROM check_appeal t 
@@ -861,4 +858,47 @@
 			ORDER BY t.appeal_dept
 	</select>
 	
+	<select id="selectWreckerStaff" parameterType="com.xintong.visualinspection.bean.WreckerStatisticsBO" 
+				resultType="com.xintong.visualinspection.bean.WreckerStatisticsBO">
+		SELECT  o.id AS user_id , tlw.NAME as dept_name  , o.TRUENAME AS name ,b.name AS position_name , o.WORKNO as work_no   FROM  t_sys_users o  
+			LEFT JOIN sys_job b ON o.POSITIONID = b.id 
+			LEFT JOIN t_br_layer_wrecker_group tlw ON tlw.ORGAN_ID = o.ORGANID
+			where o.`STATUS` = 1 
+			AND o.ORGANID IN 
+			(
+				SELECT ORGAN_ID FROM t_br_layer_wrecker_group
+			)
+			<if test="positionid != null">
+			   AND	o.positionid = #{positionid}
+			</if>
+			<if test="dept_id != null">
+			  AND	o.organid = #{dept_id}
+			</if>
+	</select>
+	
+	<select id="selectWreckerStatisticDetail" parameterType="com.xintong.visualinspection.bean.WreckerStatisticsBO" 
+			resultType="com.xintong.visualinspection.bean.WreckerStatisticsBO">
+		SELECT cim.name AS item_name , COUNT(1) AS check_num , t.user_id , t.wrecker_check_type , SUM(t.check_score) AS score
+		FROM
+		(
+			SELECT ci.parent_id , o.* FROM other_check o
+			LEFT JOIN check_item ci ON o.check_item_id = ci.id
+			WHERE o.check_type = 5 AND o.wrecker_check_type IN (1,2)
+			<if test="start_date!=null and end_date != null">
+		        AND	 o.check_time &gt;= #{start_date} AND o.check_time &lt; #{end_date}
+			</if>
+		) t LEFT JOIN check_item cim ON t.parent_id = cim.id
+		GROUP BY user_id , t.parent_id   ;
+	</select>
+	
+	<select id="selectWreckerStatistic" parameterType="com.xintong.visualinspection.bean.WreckerStatisticsBO" 
+				resultType="com.xintong.visualinspection.bean.WreckerStatisticsBO">
+		SELECT o.user_id , COUNT(1) AS check_num , sum(o.check_score) AS score ,o.wrecker_check_type  FROM other_check o 
+		WHERE o.check_type = 5 AND o.wrecker_check_type IN (3,4,5)
+		<if test="start_date!=null and end_date != null">
+	        AND	 o.check_time &gt;= #{start_date} AND o.check_time &lt; #{end_date}
+		</if>
+		GROUP BY o.wrecker_check_type , o.user_id
+	</select>
+	
 </mapper>

+ 2 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java

@@ -13,6 +13,7 @@ import com.xintong.visualinspection.bean.StatisticsBeanBO;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.StatisticsFsWork;
 import com.xintong.visualinspection.bean.WreckerGroup;
+import com.xintong.visualinspection.bean.WreckerStatisticsBO;
 import com.xintong.visualinspection.pojo.TaskAndScore;
 import com.xintong.visualinspection.pojo.UserRankingData;
 
@@ -113,6 +114,6 @@ public interface StatisticsService {
 	public List<StatisticsBean> getWreckerCheckInfo(StatisticsBean obj);
 	
 	// 获取清障稽查的信息
-	public List<WreckerGroup> getWreckerInfo();
+	public List<WreckerStatisticsBO> getWreckerStaffInfo(WreckerStatisticsBO obj);
 
 }

+ 93 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -2248,8 +2248,98 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 	}
 
 	@Override
-	public List<WreckerGroup> getWreckerInfo() {
-		// TODO Auto-generated method stub
-		return null;
+	public List<WreckerStatisticsBO> getWreckerStaffInfo(WreckerStatisticsBO obj) {
+		// 检索所有人员
+		List<WreckerStatisticsBO> list = statisticsDao.selectWreckerStaff(obj);
+		Map<Long,WreckerStatisticsBO> wreckerMap = new HashMap<>();
+		for(int i=0;i< list.size(); i++){
+			wreckerMap.put(list.get(i).getUser_id() , list.get(i));
+		}
+		// 检查详细扣分
+		List<WreckerStatisticsBO> detail_list = statisticsDao.selectWreckerStatisticDetail(obj);
+		for(int i=0; i< detail_list.size(); i++){
+			if(wreckerMap.containsKey(detail_list.get(i).getUser_id())){
+				WreckerStatisticsBO org_tmp = detail_list.get(i);
+				WreckerStatisticsBO tmp = wreckerMap.get(org_tmp.getUser_id());
+				// 中心稽查
+				if(org_tmp.getWrecker_check_type() == 1){
+					if(org_tmp.getItem_name().indexOf("出警及时性") >-1 ){
+						tmp.setChu_jing(tmp.getChu_jing()+ org_tmp.getScore() );
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("现场到达率") >-1 ){
+						tmp.setXian_chang(tmp.getXian_chang() + org_tmp.getScore() );
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("畅通率") >-1 ){
+						tmp.setChang_tong(tmp.getChang_tong() + org_tmp.getScore() );
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("作业现场") >-1 ){
+						tmp.setZuo_ye(tmp.getZuo_ye() + org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("信息上报") >-1 ){
+						tmp.setXin_xi(tmp.getXin_xi() + org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}
+				}else if(org_tmp.getWrecker_check_type() == 2){
+					if(org_tmp.getItem_name().indexOf("着装规范") >-1 ){
+						tmp.setZhuo_zhuang(tmp.getZhuo_zhuang() + org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("作业现场") >-1 ){
+						tmp.setZuo_ye_xian_chang(tmp.getZuo_ye_xian_chang()+org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("文明服务") >-1 ){
+						tmp.setWen_ming(tmp.getWen_ming()+org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("操作规范") >-1 ){
+						tmp.setCao_zuo(tmp.getCao_zuo()+ org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}else if(org_tmp.getItem_name().indexOf("工作纪律") >-1 ){
+						tmp.setGong_zuo(tmp.getGong_zuo() + org_tmp.getScore());
+						tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+						tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+					}
+				}
+			}
+		}
+		
+		// 设置其他3项扣分
+		List<WreckerStatisticsBO> other_list = statisticsDao.selectWreckerStatistic(obj);
+		for(int i=0; i< other_list.size() ; i++){
+			if(wreckerMap.containsKey(other_list.get(i).getUser_id())){
+				WreckerStatisticsBO org_tmp = other_list.get(i);
+				WreckerStatisticsBO tmp = wreckerMap.get(org_tmp.getUser_id());
+				if(org_tmp.getWrecker_check_type() == 3){
+					tmp.setPrivate_check(org_tmp.getScore());
+					tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+					tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+				}else if(org_tmp.getWrecker_check_type() == 4){
+					tmp.setIn_check(org_tmp.getScore());
+					tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+					tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+				}else if(org_tmp.getWrecker_check_type() == 5){
+					tmp.setOther_check(org_tmp.getScore());
+					tmp.setCheck_num(tmp.getCheck_num()+ org_tmp.getCheck_num() );
+					tmp.setAll_check_score(tmp.getAll_check_score() + org_tmp.getScore());
+				}
+			}
+		}
+		
+		//排序
+		List<WreckerStatisticsBO> tmpList = new ArrayList<>(wreckerMap.values()); 
+		tmpList.sort(new Comparator<WreckerStatisticsBO>() {
+			@Override
+			public int compare(WreckerStatisticsBO o1, WreckerStatisticsBO o2) {
+				return o1.compareTo(o2);
+			}
+		});
+		return tmpList;
 	}
 }