Просмотр исходного кода

Merge branch 'master' of http://git_xt.jsxt.jsjtyxt.com/wenhongquan/VisualInspection

minitiger 8 лет назад
Родитель
Сommit
f53eea4799

+ 372 - 0
VisualInspection/js/statistics/business_promotion_feedback.js

@@ -0,0 +1,372 @@
+var isshownumber = false;
+$(function() {
+    $('[data-toggle="tooltip"]').tooltip();
+    setVisit();
+    var road_manager;
+    if (roleContains("STATION")) {
+        road_manager = getCurrentUser().road_manager_id;
+    }
+    if (roleContains("ROAD_MANAGER")) {
+        road_manager = getCurrentUser().organid;
+    }
+    setRoadManagerSelect("#center-manager", road_manager, true);
+    if (road_manager) {
+        var dept;
+        if (roleContains("STATION")) {
+            dept = getCurrentUser().organid;
+        }
+        var feeList = cache_road_manager_fee_list_map.get(road_manager);
+        // $("#fsList").html(obj);
+        setRoadManagerValue(feeList, "#fsList", dept, true);
+        // $("#fsList").val(dept);
+        // 初始化查询
+        initQueryEmp(road_manager, dept);
+    } else {
+        // 初始化查询
+        initQueryEmp(null, null);
+    }
+    // 道管中心选择变化
+    $("#center-manager").change(function() {
+            $("#fsList").empty();
+            if (GV(this) != '') {
+                getFsStationList(GV(this), function(options) {
+                    $("#fsList").append(options);
+                    var dept;
+                    if (roleContains("STATION")) {
+                        dept = getCurrentUser().organid;
+                    }
+                    $("#fsList").val(dept);
+                });
+            }
+        })
+        // end
+})
+
+function queryEmpClick() {
+
+    //每次点击前清空表格数据
+    $(".table-tbody").empty('');
+    var start_date = $("#start-time").val();
+    var end_date = $("#end-time").val();
+    var start_score = $("#start-score").val();
+    var end_score = $("#end-score").val();
+    var start_num = $("#start-num").val() != '' ? $("#start-num").val() : 0;
+    var end_num = $("#end-num").val() != '' ? $("#end-num").val() : 100;
+    var flag = param_method(start_score, end_score);
+    if (flag == false) {
+        return;
+    }
+    if (start_date == '' || end_date == '') {
+        tip("请选择起止日期");
+        return;
+    } else {
+        start_date += " 23:00:00";
+        end_date += " 23:00:00";
+    }
+    var startStr = start_date.replace(/-/g, '/');
+    var endStr = end_date.replace(/-/g, '/');
+    var start = new Date(startStr);
+    //开始日期取前一天的23:00
+    start.setDate(start.getDate() - 1);
+    start_date = start.Format("yyyy-MM-dd HH:mm:ss");
+    var end = new Date(endStr);
+    if (start > end) {
+        tip("开始时间不能比结束时间大");
+        return;
+    }
+    var param = {
+        "parent_dept_id": GV("#center-manager"),
+        "dept_id": GV("#fsList"),
+        "start_date": start_date,
+        "end_date": end_date,
+    }
+    var url = "statistics/business/feedback";
+    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);
+        });
+    }
+
+    //默认初始化前一周查所有
+    var endD = new Date();
+    var startD = new Date();
+    // var startD = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
+    var start_time = startD.getFullYear() + "-" + (startD.getMonth() > 10 ? startD.getMonth() : "0" + startD.getMonth()) + "-26";
+    var end_time = endD.getFullYear() + "-" + (endD.getMonth() + 1 > 10 ? endD.getMonth() + 1 : "0" + (endD.getMonth() + 1)) + "-25";
+    var start_score = $("#start-score").val();
+    var end_score = $("#end-score").val();
+    var start_num = $("#start-num").val() != '' ? $("#start-num").val() : 0;
+    var end_num = $("#end-num").val() != '' ? $("#end-num").val() : 100;
+
+    //默认初始化时间页面回显
+    $("#start-time").val(start_time);
+    $("#end-time").val(end_time);
+    var start_date = start_time + " 23:00:00";
+    var end_date = end_time + " 23:00:00";
+
+    var start = moment(start_date).subtract(1, "day");
+    //开始日期取前一天的23:00
+
+    start_date = start.toDate().Format("yyyy-MM-dd HH:mm:ss");
+
+    var param = {
+        "parent_dept_id": parent_dept_id,
+        "dept_id": dept_id,
+        "start_date": start_date,
+        "end_date": end_date,
+    }
+
+
+
+    var url = "statistics/business/feedback";
+    getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num);
+}
+/**
+ * click
+ * @param {*} url
+ * @param {*} param
+ */
+function getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num) {
+    post_common_service(url, param, function(data) {
+
+        // console.log(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>"
+                    }
+                }
+
+                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, 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++;
+            }
+        }
+        $(".table-tbody").append(strTbody);
+        $("tr:gt(1):odd").css("background", "#EFEFEF");
+    }, function(error) {
+        return "";
+    });
+}
+
+
+/**
+ * 对于受检次数为0,扣分和得分都为 /
+ * @param {*} value , check_num 受此次数
+ * @return value or /
+ */
+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 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();
+    var start_date = $("#start-time").val();
+    var end_date = $("#end-time").val();
+    var start_score = $("#start-score").val();
+    var end_score = $("#end-score").val();
+    var parent_dept_id = $("#center-manager").val();
+    var max_score = $("#end-score").val();
+    var min_score = $("#start-score").val();
+    var min_check_num = $("#start-num").val();
+    var max_check_num = $("#end-num").val();
+    var position_id = $("#jobSelect").val();
+    var flag = param_method(start_score, end_score);
+    if (flag == false) {
+        return;
+    }
+    if (start_date == '' || end_date == '') {
+        tip("请选择起止日期");
+        return;
+    } else {
+        start_date += " 23:00:00";
+        end_date += " 23:00:00";
+        var start = new Date(start_date);
+        //开始日期取前一天的23:00
+        start.setDate(start.getDate() - 1);
+        start_date = start.Format("yyyy-MM-dd HH:mm:ss");
+    }
+    if (!dept_id) dept_id = "";
+    window.open(getserveraddr() + "/file/business/feedback?dept_id=" + dept_id +
+        "&start_date=" + start_date + "&end_date=" + end_date + "&start_score=" + start_score + "&end_score=" + end_score + "&parent_dept_id=" + parent_dept_id +
+        "&max_score=" + max_score + "&min_score=" + min_score + "&min_check_num=" + min_check_num + "&max_check_num=" + max_check_num + "&position_id=" + position_id);
+}
+
+
+function param_method(start_score, end_score) {
+
+    if (start_score == '' || end_score == '') {
+        tip("请输入得分区间");
+        return false;
+    } else if (!(/^[0-9]*$/).test(start_score) || !(/^[0-9]*$/).test(end_score)) {
+        tip("数字不合法!");
+        return false;
+    } else if (parseInt(start_score) > parseInt(end_score)) {
+        tip("开始得分不能比结束得分大");
+        return false;
+    } else if (start_score < 0 || start_score > 1000 || end_score < 0 || end_score > 1000) {
+        tip("得分只能在0-1000之间");
+        return false;
+    } else {
+        return true;
+    }
+}
+
+function setVisit() {
+    // if (roleContains("STATION")) {
+    //     $("#center-manager").attr("disabled", "disabled");
+    //     $("#fsList").attr("disabled", "disabled");
+    // }
+    // if(roleContains("ROAD_MANAGER")){
+    // 	$("#center-manager").attr("disabled","disabled");
+    // }
+}

+ 66 - 54
VisualInspection/js/statistics/operation_management_integration.js

@@ -91,66 +91,78 @@ function initQueryType(){
 function gethtml(data,i,avg,lists){
     var strTbody = "";
 
-    if(i==0 || i==7 || i==13){
-       // debugger;
-        var ranking;
-        var name = "";
-        var rowspan = 0;
-          order = 1;
-        if(i==0){
-            name = "连云港";
-            rowspan = 7;
-            for(var i=0;i<lists.length;i++){
-                if(avg > lists[i]){
-                    order = order + 1;
-                }
-            }
-        }else if(i==7){
-            name = "盐城";
-            rowspan = 6;
-            for(var i=0;i<lists.length;i++){
-                if(avg > lists[i]){
-                    order = order + 1;
-                }
-            }
-        }else if(i==13){
-            name = "南通";
-            rowspan = 8;
-            for(var i=0;i<lists.length;i++){
-                if(avg > lists[i]){
-                    order = order + 1;
-                }
-            }
-        }
-        strTbody += "<tr><td rowspan="+rowspan+" width='6%'>"+order+"</td>"+"<td rowspan="+rowspan+" width='6%'>"+name+"</td>";
-        strTbody+="<td width='6%'>"+data.company_ranking2+"</td><td width='6%'>"+data.fee_station_ranking2+"</td><td width='8%'>"+data.name+"</td><td width='6%'>"+filter(data.people_num,'0')
-                   +"</td><td width='54px'>"+data.company_check_num
-                   +"</td><td width='54px'>"+data.company_total_score+"</td><td width='54px'>"+data.third_check_num
-                   +"</td><td width='54px'>"+data.third_total_score+"</td><td width='54px'>"+data.special_check_num
-                   +"</td><td width='54px'>"+data.special_total_score+"</td><td width='54px'>"+data.onsite_check_num
-                   +"</td><td width='54px'>"+data.onsite_total_score+"</td><td width='54px'>"+data.data_check_num
-                   +"</td><td width='54px'>"+data.data_total_score+"<td width='6%'>"
-                   +data.check_total_avg
-                   +"</td><td width='6%'>"+data.score_avg+"</td>";
-        strTbody += "</tr>";
-    }else{
-        strTbody += "<tr><td width='6%'>"+data.company_ranking2+"</td><td>"+data.fee_station_ranking2+"</td>";
-        strTbody+="<td>"+data.name+"</td><td>"+data.people_num+"</td><td>"+data.company_check_num
-                  +"</td><td>"+data.company_total_score+"</td><td>"+data.third_check_num
-                  +"</td><td>"+data.third_total_score+"</td><td>"+data.special_check_num
-                  +"</td><td>"+data.special_total_score+"</td><td>"+data.onsite_check_num
-                  +"</td><td>"+data.onsite_total_score+"</td><td>"+data.data_check_num
-                  +"</td><td>"+data.data_total_score+"</td><td>"
+    // if(i==0 || i==7 || i==13){
+    //    // debugger;
+    //     var ranking;
+    //     var name = "";
+    //     var rowspan = 0;
+    //       order = 1;
+    //     if(i==0){
+    //         name = "连云港";
+    //         rowspan = 7;
+    //         for(var i=0;i<lists.length;i++){
+    //             if(avg > lists[i]){
+    //                 order = order + 1;
+    //             }
+    //         }
+    //     }else if(i==7){
+    //         name = "盐城";
+    //         rowspan = 6;
+    //         for(var i=0;i<lists.length;i++){
+    //             if(avg > lists[i]){
+    //                 order = order + 1;
+    //             }
+    //         }
+    //     }else if(i==13){
+    //         name = "南通";
+    //         rowspan = 8;
+    //         for(var i=0;i<lists.length;i++){
+    //             if(avg > lists[i]){
+    //                 order = order + 1;
+    //             }
+    //         }
+    //     }
+    //     strTbody += "<tr><td rowspan="+rowspan+" width='6%'>"+order+"</td>"+"<td rowspan="+rowspan+" width='6%'>"+name+"</td>";
+    //     strTbody+="<tr><td width='6%'>"+data.company_ranking2+"</td>"
+    //                +"<td width='6%'>"+data.fee_station_ranking2+"</td>"
+    //                +"<td width='8%'>"+data.name+"</td><td width='6%'>"+filter(data.people_num,'0')
+    //                +"</td><td width='54px'>"+data.company_check_num
+    //                +"</td><td width='54px'>"+data.company_total_score+"</td><td width='54px'>"+data.third_check_num
+    //                +"</td><td width='54px'>"+data.third_total_score+"</td><td width='54px'>"+data.special_check_num
+    //                +"</td><td width='54px'>"+data.special_total_score+"</td><td width='54px'>"+data.onsite_check_num
+    //                +"</td><td width='54px'>"+data.onsite_total_score+"</td><td width='54px'>"+data.data_check_num
+    //                +"</td><td width='54px'>"+data.data_total_score+"<td width='6%'>"
+    //                +data.check_total_avg
+    //                +"</td><td width='6%'>"+data.score_avg+"</td>";
+    //     strTbody += "</tr>";
+    // }else{
+    //     strTbody += "<tr><td width='6%'>"+data.company_ranking2+"</td><td>"+data.fee_station_ranking2+"</td>";
+    //     strTbody+="<td>"+data.name+"</td><td>"+data.people_num+"</td><td>"+data.company_check_num
+    //               +"</td><td>"+data.company_total_score+"</td><td>"+data.third_check_num
+    //               +"</td><td>"+data.third_total_score+"</td><td>"+data.special_check_num
+    //               +"</td><td>"+data.special_total_score+"</td><td>"+data.onsite_check_num
+    //               +"</td><td>"+data.onsite_total_score+"</td><td>"+data.data_check_num
+    //               +"</td><td>"+data.data_total_score+"</td><td>"
+    //               +data.check_total_avg+"</td>"
+    //               +"<td>"+data.score_avg+"</td>";
+    //     strTbody += "</tr>";
+          
+    // }
+    strTbody += "<tr><td width='8%'>"+data.company_ranking2+"</td>";
+        strTbody+="<td width='8%'>"+data.name+"</td><td width='8%'>"+data.people_num+"</td><td width='6%'>"+data.company_check_num
+                  +"</td><td width='6%'>"+data.company_total_score+"</td><td width='6%'>"+data.third_check_num
+                  +"</td><td width='6%'>"+data.third_total_score+"</td><td width='6%'>"+data.special_check_num
+                  +"</td><td width='6%'>"+data.special_total_score+"</td><td width='6%'>"+data.onsite_check_num
+                  +"</td><td width='6%'>"+data.onsite_total_score+"</td><td width='6%'>"+data.data_check_num
+                  +"</td><td width='6%'>"+data.data_total_score+"</td><td width='8%'>"
                   +data.check_total_avg+"</td>"
-                  +"<td>"+data.score_avg+"</td>";
+                  +"<td width='8%'>"+data.score_avg+"</td>";
         strTbody += "</tr>";
-          
-    }
     return strTbody;
 }
 
 function getTotalHtml(data){
-    var html = "<tr><td>合计</td><td></td><td></td><td></td><td></td><td>"+data.totalMan+"</td><td>"+data.totalCompanyNum+"</td><td>"+data.totalCompanyScore+"</td><td>"
+    var html = "<tr><td>合计</td><td></td><td>"+data.totalMan+"</td><td>"+data.totalCompanyNum+"</td><td>"+data.totalCompanyScore+"</td><td>"
     +data.totalThirdNum+"</td><td>"+data.totalThirdScore+"</td><td>"+data.totalSpecialNum+"</td><td>"+data.totalSpecialScore
     +"</td><td>"+data.totalOnsiteNum+"</td><td>"+data.totalOnsiteScore+"</td><td>"+data.totalDataNum
     +"</td><td>"+data.totalDataScore+"</td><td>-</td><td>-</td></tr>";

+ 161 - 0
VisualInspection/view/statistics/business_promotion_feedback.html

@@ -0,0 +1,161 @@
+<script src="/js/statistics/business_promotion_feedback.js?__inline"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<link rel="stylesheet" type="text/css" href="/css/statistics/assess_situation.css">
+<div class="container-fluid ">
+    <div class="form-div">
+        <form class="form-horizontal">
+            <div class="form-group">
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">道管中心</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="center-manager">
+                            <!--<option selected value="">全部</option>
+                            <option  value="30">连云港</option>
+                            <option value="31">盐城</option>
+                            <option value="32">南通</option>-->
+                        </select>
+                    </div>
+                </div>
+                <div  class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">部门</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="fsList">
+                        </select>
+                    </div>
+                </div>
+                <div  class="form-group col-sm-4">
+                    <label for="exampleInputAccount1" class="col-sm-4">查询日期</label>
+                    <div class="col-sm-4">
+                        <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
+                    </div>
+                    <div class="col-sm-4">
+                        <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
+                    </div>
+                </div>
+                <div  class="form-group col-sm-2">
+                    <div class="col-sm-6">
+                        <button class="btn btn-primary " type="button" onclick="queryEmpClick()">查询</button>
+                    </div>
+                    <div class="col-sm-6">
+                        <button class="btn btn-primary " type="button" onclick="exportExcel()">导出Excel</button>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">
+                <div  class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">考核次数</label>
+
+                    <div class="col-sm-3">
+                        <input type="text" id="start-num" class="form-control form-date" value="0">
+                    </div>
+                    <div class="to-score col-sm-2" style="padding-top: 6px;text-align:center;"><label> - </label></div>
+                    <div class="col-sm-3">
+                        <input type="text" id="end-num" class="form-control form-date" value="10">
+                    </div>
+                </div>
+                <div  class="form-group col-sm-3">
+                <!--<div class="col-sm-2" style="width:150px;">
+                    <input type="text" id="check_count" class="form-control" value="">
+                </div>-->
+                    <label for="exampleInputAccount1" class="col-sm-4">职位</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="jobSelect">
+                        </select>
+                    </div>
+                </div>
+                <div  class="form-group col-sm-4">
+                    <label for="exampleInputAccount1" class="col-sm-4">得分区间</label>
+                    <div class="col-sm-3">
+                        <input type="text" id="start-score" class="form-control form-date"  value="0">
+                    </div>
+                    <div class="to-score col-sm-2" style="padding-top: 6px;text-align:center;"><label> - </label></div>
+                    <div class="col-sm-3">
+                        <input type="text" id="end-score" class="form-control form-date" value="1000">
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <div class="table-title"><span>收费生产人员业务提升考核情况反馈表</span></div>
+
+    <div class="row">
+        <!-- 使用一个div来显示数据表格   -->
+        <div class="datatable" data-checkable="false" style="margin-bottom: 0px;margin-right:10px;" data-sortable="false">
+            <div class="table-head">
+                <table border="0" width="100%" align="center">
+                    <thead class="table-thead" align="center">
+                        <tr>
+                            <th rowspan="2" width="4%;" id='th_1'>序号</th>
+                            <th rowspan="2" width="6%" id='th_2'>站名</th>
+                            <th rowspan="2" width="6%" id='th_3'>姓名</th>
+                            <th rowspan="2" width="6%" id='th_4'>岗位</th>
+                            <th rowspan="2" width="7%" id='th_5'>工号</th>
+                            <!--<th rowspan="2" width="4%" id='th_6'>公司排名</th>
+                            <th rowspan="2" width="4%" id='th_7'>道管排名</th>
+                            <th rowspan="2" width="4%" id='th_8'>收费站排名</th>-->
+                            <th colspan="2" height="40px" id='th_9'>温馨服务</th>
+                            <th colspan="2" height="40px" id='th_9'>特情稽查</th>
+                            <th colspan="2" height="40px" id='th_9'>现场检查</th>
+                            <th colspan="2" height="40px" id='th_9'>数据稽查</th>
+                            <!--<th colspan="1" height="40px" id='th_9'>数据稽查</th>-->
+                            <!--<th rowspan="2" width="6%" id='th_10'>受检次数
+                                <div class="switch switch-inline hidden" id="show_check_div" data-toggle="tooltip" data-placement="right" title="收费站是否显示该列数据">
+                                    <input type="checkbox" id="show_check" onchange="show_check_fun()">
+                                    <label style="color: #000;" id="show_check_text">显示</label>
+                                </div>
+                            </th>-->
+                            <th rowspan="2" width="4%" id='th_10'>总受检次数</th>
+                            <th rowspan="2" width="4%" id='th_13'>总扣分</th>
+                            <th rowspan="2" width="4%" id='th_11'>平均扣分(千分制)</th>
+                            <th rowspan="2" width="4%" id='th_12'>得分<br>(千分制)</th>
+                            <th rowspan="2" width="4%" id='th_14'>备注</th>
+                        </tr>
+                        <tr>
+                            <th width="4%" id='th_9_1'>受检次数</th>
+                            <th width="4%" id='th_9_2'>合计扣分</th>
+                            <th width="4%" id='th_9_3'>存在问题数量</th>
+                            <th width="4%" id='th_9_4'>扣分合计</th>
+                            <th width="4%" id='th_9_5'>受检次数</th>
+                            <th width="4%" id='th_9_6'>存在问题扣分</th>
+                            <th width="4%" id='th_9_7'>受检次数</th>
+                            <th width="4%" id='th_9_8'>扣分合计</th>
+                            <!--<th width="4%" id='th_9_9'>扣分合计</th>-->
+                        </tr>
+                    </thead>
+                    <!-- <tbody class="table-tbody" style="background:white; " align="center">
+
+                    </tbody> -->
+                </table>
+            </div>
+        </div>
+        <div id="scrollTable" style="height:300px;overflow:scroll;">
+            <table style="border-top:0;" border="0" width="100%" align="center">
+                <tbody class="table-tbody" style="background:white; " align="center">
+
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
+<script>
+    $(document).ready(function() {
+        // 设置滚动表格的高度
+        $("#scrollTable").height($(window).height() - 360);
+
+        // 仅选择日期 开始 ,结束时间
+        $("#start-time,#end-time").datetimepicker({
+            language: "zh-CN",
+            weekStart: 1,
+            todayBtn: 1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+
+        //     setFeSelect("#fsList");
+        // initQueryEmp();
+    });
+</script>

+ 6 - 4
VisualInspection/view/statistics/operation_management_integration.html

@@ -28,10 +28,12 @@
               <div class="table-head" ><table border="1" width="100%" height="90px" align="center">
                  <thead>
                         <tr>
-                        <th rowspan="3" width="6%">排名</th><th rowspan="3" width="6%">道管</th><th rowspan="3" width="6%">公司内排名</th><th rowspan="3" width="6%">道管内排名</th>
-                        <th rowspan="3" width="8%">站名</th><th rowspan="3" width="6%">收费值机岗位人数</th><th colspan="4" height="40px">温馨服务</th><th colspan="2" height="40px">特情操作</th>
-                        <th colspan="2" height="40px">现场检查</th><th colspan="2" height="40px">数据平台应用情况</th><th rowspan="3" width="6%">总平均扣分</th>
-                        <th rowspan="3" width="6%">平均得分</th>
+                        <!--<th rowspan="3" width="6%">排名</th><th rowspan="3" width="6%">道管</th>-->
+                        <th rowspan="3" width="8%">排名</th>
+                        <!--<th rowspan="3" width="6%">道管内排名</th>-->
+                        <th rowspan="3" width="8%">站名</th><th rowspan="3" width="8%">收费值机岗位人数</th><th colspan="4" width="24%" height="40px">温馨服务</th><th colspan="2" width="12%" height="40px">特情操作</th>
+                        <th colspan="2" width="12%" height="40px">现场检查</th><th colspan="2" width="12%" height="40px">数据平台应用情况</th><th rowspan="3" width="8%">总平均扣分</th>
+                        <th rowspan="3" width="8%">平均得分</th>
                         </tr>
                         <tr> 
                         <th colspan="2">公司检查</th><th colspan="2">第三方暗访</th><th rowspan="2" width="54px">存在问题次数</th>

+ 16 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java

@@ -163,6 +163,22 @@ public class StatisticsBean {
     // 道管排名
     private Integer fee_station_ranking2;
     
+    private Integer check_t_num = 0;
+    
+    private Integer check_t_score = 0;
+    
+    private Integer check_x_num = 0;
+    
+    private Integer check_x_score = 0;
+    
+    private Integer check_s_num = 0;
+    
+    private Integer check_s_score = 0;
+    
+    private Integer check_all_num = 0;
+    
+    private Integer check_all_score = 0;
+    
     // 比较大小 1 小 , -1 大
     public int compareTo(StatisticsBean o2){
     	if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){

+ 16 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java

@@ -42,6 +42,22 @@ public class StatisticsBo {
     // 收费站排名
     private Integer fee_station_ranking;
     
+    private int score = 0;
+    
+    private Integer check_t_num = 0;
+    
+    private Integer check_t_score = 0;
+    
+    private Integer check_x_num = 0;
+    
+    private Integer check_x_score = 0;
+    
+    private Integer check_s_num = 0;
+    
+    private Integer check_s_score = 0;
+    
+    private Integer check_all_num = 0;
+    
     // 比较大小 1 小 , -1 大
     public int compareTo(StatisticsBo o2){
     	double a = 1000.0 ,b=1000.0 ;

+ 38 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java

@@ -32,6 +32,44 @@ public class FileExcelController extends BaseController {
 
 	@Autowired
 	private StatisticsService statisticsService;
+	
+	/**
+     * 收费生产人员业务提升考核情况反馈表(所有员工排名)
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/business/feedback",method=RequestMethod.GET)
+    public String getBusinessFeedback(HttpServletRequest req,HttpServletResponse resp,
+    		@RequestParam Long dept_id,
+    		@RequestParam Long parent_dept_id ,
+    		@RequestParam Integer max_score ,
+    		@RequestParam Integer min_score ,
+    		@RequestParam Integer min_check_num ,
+    		@RequestParam Integer max_check_num ,
+    		@RequestParam Integer position_id ,
+    		@RequestParam String start_date,@RequestParam String end_date,
+    		@RequestParam String start_score,@RequestParam String end_score){
+    	StatisticsBeanBO obj = new StatisticsBeanBO();
+    
+		Date start =  DateUtil.strParseDate(start_date);
+		Date end =  DateUtil.strParseDate(end_date);
+		obj.setDept_id(dept_id);
+		obj.setParent_dept_id(parent_dept_id);
+		obj.setStart_date(start);
+		obj.setEnd_date(end);
+		obj.setStart_score(start_score);
+		obj.setEnd_score(end_score);
+		obj.setMax_score(max_score);
+		obj.setMin_score(min_score);
+		obj.setMax_check_num(max_check_num);
+		obj.setMin_check_num(min_check_num);
+		obj.setPosition_id(position_id);
+		
+    	statisticsService.getBusinessFeedbackInfo(obj, req, resp);
+    	return super.returnSuccessResult(null);
+    }
     
     /**
      * 温馨服务考核情况反馈表(所有员工排名)

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

@@ -348,4 +348,17 @@ public class StatisticsController extends BaseController {
     	return super.returnSuccessResultTime(returnObj);
     }
     
+    /**
+     * 业务提升情况反馈表(所有员工排名)
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/business/feedback")
+    public String getBusinessFeedback(@RequestBody StatisticsBean obj){
+    	List<StatisticsBo> lists=  statisticsService.getBusinessFeedbackInfo(obj);
+    	return super.returnSuccessResult(lists);
+    }
+    
 }

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

@@ -68,6 +68,8 @@ public interface StatisticsDao  {
 	public Integer selectCheckedNum(StatisticsBean obj);
 
 	public List<StatisticsBean> getselectFeeStationOperationScoreDetail(StatisticsBean obj);
+
+	public List<StatisticsBean> selectBFStatistics(StatisticsBean obj);
 	
 	
 }

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

@@ -38,7 +38,31 @@
 
     </sql>
 
-
+	
+   <select id="selectBFStatistics" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+	SELECT x.user_id,x.dept_id,IFNULL(x.checked_num,0)+IFNULL(o1.check_a_num,0) checked_num,IFNULL(x.score,0)+IFNULL(o1.check_a_score,0) score,o2.check_t_num,o2.check_t_score,o3.check_x_num,o3.check_x_score,o4.check_s_num,o4.check_s_score  
+		,IFNULL(x.checked_num,0)+IFNULL(o1.check_a_num,0)+IFNULL(o2.check_t_num,0)+IFNULL(o3.check_x_num,0)+IFNULL(o4.check_s_num,0) check_all_num
+		,IFNULL(x.score,0)+IFNULL(o1.check_a_score,0)+IFNULL(o2.check_t_score,0)+IFNULL(o3.check_x_score,0)+IFNULL(o4.check_s_score,0) check_all_score
+		FROM(SELECT  u.checked_person AS user_id , u.checked_dept AS dept_id,count(1) AS checked_num,sum(u.score) AS score  FROM (
+		SELECT t.checked_person , t.checked_dept,ci.parent_id, t.check_item_score AS score FROM check_score t 
+		LEFT JOIN check_item ci ON t.check_item_id = ci.id 
+		LEFT JOIN check_task ct ON ct.id = t.task_id
+		WHERE 1=1 and ct.check_status!=22 and ct.id not in <include refid="taskexclouddeleteUser"/>
+		<if test="start_date!=null and end_date != null">
+	        AND	 ct.start_time &gt;= #{start_date} AND ct.end_time &lt; #{end_date}
+		</if>
+		<if test="dept_id!=null">
+			AND t.checked_dept =#{dept_id}			
+		</if>
+		 ) 
+		u LEFT JOIN check_item s ON u.parent_id = s.id GROUP  BY checked_person)x
+		LEFT JOIN (SELECT user_id,dept_id,COUNT(1) check_a_num,SUM(check_score) check_a_score FROM other_check WHERE check_type = 1 GROUP BY user_id,dept_id)  o1 ON o1.user_id = x.user_id AND x.dept_id = o1.dept_id
+		LEFT JOIN (SELECT user_id,dept_id,COUNT(1) check_t_num,SUM(check_score) check_t_score FROM other_check WHERE check_type = 2 GROUP BY user_id,dept_id)  o2 ON o2.user_id = x.user_id AND x.dept_id = o2.dept_id
+		LEFT JOIN (SELECT user_id,dept_id,COUNT(1) check_x_num,SUM(check_score) check_x_score FROM other_check WHERE check_type = 3 GROUP BY user_id,dept_id)  o3 ON o3.user_id = x.user_id AND x.dept_id = o3.dept_id
+		LEFT JOIN (SELECT user_id,dept_id,COUNT(1) check_s_num,SUM(check_score) check_s_score FROM other_check WHERE check_type = 4 GROUP BY user_id,dept_id)  o4 ON o4.user_id = x.user_id AND x.dept_id = o4.dept_id
+		
+		
+    </select>
     
     <select id="selectStatistics" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
     	SELECT  u.checked_person AS user_id , u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name  FROM (

+ 6 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.xintong.visualinspection.bean.CheckAppealStatistic;
 import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
+import com.xintong.visualinspection.bean.StatisticsBeanBO;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.StatisticsFsWork;
 import com.xintong.visualinspection.pojo.TaskAndScore;
@@ -101,5 +102,10 @@ public interface StatisticsService {
 	public List<StatisticsBean> getOperationInfo(StatisticsBean obj);
 
 	public void getOperationInfo(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp);
+	
+	//业务提升情况反馈表(所有员工排名)
+	public List<StatisticsBo> getBusinessFeedbackInfo(StatisticsBean obj);
+
+	public void getBusinessFeedbackInfo(StatisticsBeanBO obj, HttpServletRequest req, HttpServletResponse resp);
 
 }

+ 215 - 59
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -1945,71 +1945,70 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 				}
 			}
 		}
-		sortList.sort(new Comparator<StatisticsBean>() {
-			@Override
-			public int compare(StatisticsBean o1, StatisticsBean o2) {
-				if (o1.getId() > o2.getId()) {
-					return 1;
-				} else if (o1.getId() == o2.getId()) {
-					if (Float.valueOf(o1.getCheck_total_avg()) != 0 && Float.valueOf(o2.getCheck_total_avg()) != 0) {
-						if (Float.valueOf(o1.getCheck_total_avg()) < Float.valueOf(o2.getCheck_total_avg())) {
-							return -1;
-						} else if (Float.valueOf(o1.getCheck_total_avg()) > Float.valueOf(o2.getCheck_total_avg())) {
-							return 1;
-						} else {
-							return 0;
-						}
-					} else {
-						if (Float.valueOf(o1.getCheck_total_avg()) == 0) {
-							return -1;
-						} else if (Float.valueOf(o2.getCheck_total_avg()) == 0) {
-							return 1;
-						} else {
-							return 0;
-						}
-					}
-				} else {
-					return -1;
-				}
-			}
-		});
-		Map<Integer, List<StatisticsBean>> fee_ranking = new HashMap<>();
-		for (StatisticsBean statisticsBean : sortList) {
-			List<StatisticsBean> list = fee_ranking.get(statisticsBean.getId());
-			if(list !=null && list.size() >0){
-				list.add(statisticsBean);
-				fee_ranking.put(statisticsBean.getId(), list);
-			}else{
-				List<StatisticsBean> beans = new ArrayList<StatisticsBean>();
-				beans.add(statisticsBean);
-				fee_ranking.put(statisticsBean.getId(), beans);
-			}
-		}
+//		sortList.sort(new Comparator<StatisticsBean>() {
+//			@Override
+//			public int compare(StatisticsBean o1, StatisticsBean o2) {
+//				if (o1.getId() > o2.getId()) {
+//					return 1;
+//				} else if (o1.getId() == o2.getId()) {
+//					if (Float.valueOf(o1.getCheck_total_avg()) != 0 && Float.valueOf(o2.getCheck_total_avg()) != 0) {
+//						if (Float.valueOf(o1.getCheck_total_avg()) < Float.valueOf(o2.getCheck_total_avg())) {
+//							return -1;
+//						} else if (Float.valueOf(o1.getCheck_total_avg()) > Float.valueOf(o2.getCheck_total_avg())) {
+//							return 1;
+//						} else {
+//							return 0;
+//						}
+//					} else {
+//						if (Float.valueOf(o1.getCheck_total_avg()) == 0) {
+//							return -1;
+//						} else if (Float.valueOf(o2.getCheck_total_avg()) == 0) {
+//							return 1;
+//						} else {
+//							return 0;
+//						}
+//					}
+//				} else {
+//					return -1;
+//				}
+//			}
+//		});
+//		Map<Integer, List<StatisticsBean>> fee_ranking = new HashMap<>();
+//		for (StatisticsBean statisticsBean : sortList) {
+//			List<StatisticsBean> list = fee_ranking.get(statisticsBean.getId());
+//			if(list !=null && list.size() >0){
+//				list.add(statisticsBean);
+//				fee_ranking.put(statisticsBean.getId(), list);
+//			}else{
+//				List<StatisticsBean> beans = new ArrayList<StatisticsBean>();
+//				beans.add(statisticsBean);
+//				fee_ranking.put(statisticsBean.getId(), beans);
+//			}
+//		}
 		// 道管排序
-		Set<Entry<Integer, List<StatisticsBean>>> set = fee_ranking.entrySet();
-		for (Entry<Integer, List<StatisticsBean>> beans : set) {
-			List<StatisticsBean> values = beans.getValue();
-			for(int j=0;j<values.size();j++){
-				StatisticsBean statisticsBean = values.get(j);
-				// 公司排名
-				if (j == 0) {
-					statisticsBean.setFee_station_ranking2(1);
-				} else {
-					StatisticsBean bean = values.get(j - 1);
-					if (statisticsBean.compare3To(bean) == 0) {
-						statisticsBean.setFee_station_ranking2(bean.getFee_station_ranking2());
-					} else {
-						statisticsBean.setFee_station_ranking2(j + 1);
-					}
-				}
-			}
-		}
+//		Set<Entry<Integer, List<StatisticsBean>>> set = fee_ranking.entrySet();
+//		for (Entry<Integer, List<StatisticsBean>> beans : set) {
+//			List<StatisticsBean> values = beans.getValue();
+//			for(int j=0;j<values.size();j++){
+//				StatisticsBean statisticsBean = values.get(j);
+//				// 公司排名
+//				if (j == 0) {
+//					statisticsBean.setFee_station_ranking2(1);
+//				} else {
+//					StatisticsBean bean = values.get(j - 1);
+//					if (statisticsBean.compare3To(bean) == 0) {
+//						statisticsBean.setFee_station_ranking2(bean.getFee_station_ranking2());
+//					} else {
+//						statisticsBean.setFee_station_ranking2(j + 1);
+//					}
+//				}
+//			}
+//		}
 		return sortList;
 	}
 
 	@Override
 	public void getOperationInfo(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
-		// TODO Auto-generated method stub
 		List<StatisticsBean> lists= getOperationInfo(obj);
     	int totalMan=0,totalCompanyNum=0,totalCompanyScore=0,totalThirdNum=0,
     			totalThirdScore=0,totalSpecialNum=0,totalSpecialScore=0,totalOnsiteNum=0,
@@ -2043,4 +2042,161 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
     	exportExcel("运营管理综合检查情况统计表", "operation_info", map, resp);
 	}
 
+	@Override
+	public List<StatisticsBo> getBusinessFeedbackInfo(StatisticsBean obj) {
+		// 查看是否有部门id
+		Long organId = obj.getDept_id();
+		// 道管中心 id
+		Long parent_dept_id = obj.getParent_dept_id();
+//		obj.setParent_dept_id(null);
+//		obj.setDept_id(null);
+		// 将检索出来的数据放到如map中
+		List<StatisticsBean> list = statisticsDao.selectBFStatistics(obj);
+
+//		List<StatisticsBean> timesList = statisticsDao.selectCheckedTimes(obj);
+
+		Map<Long, StatisticsBo> statisticBoMap = new HashMap<Long, StatisticsBo>();
+
+		// 检索收费站的人员
+		Constant t = CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+		String[] postions = t.getCode_name().split(",");
+		User user = new User();
+		List<Integer> positionList = new ArrayList<Integer>();
+		for (int i = 0; i < postions.length; i++) {
+			positionList.add(Integer.parseInt(postions[i]));
+		}
+		user.setPosition_ids(positionList);
+
+		if (obj.getDept_id() != null) {
+			user.setOrganid(obj.getDept_id().intValue());
+		}
+		if (obj.getParent_dept_id() != null) {
+			user.setParent_organid(obj.getParent_dept_id().intValue());
+		}
+		List<User> listUserts = userInfoDao.getAllUsers(user);
+		for (User u : listUserts) {
+			u.setPassword(null);
+			if (u.getInvalidtime() != null && u.getInvalidtime().getTime() < obj.getEnd_date().getTime())
+				continue;
+			if (u.getFee_station_name() != null) {
+				StatisticsBo tmp = new StatisticsBo();
+				tmp.setUser(u);
+				statisticBoMap.put(u.getId() + 0L, tmp);
+			}
+			u.setPosition_name(CacheUtil.getJobnameFromMap(new Long(u.getPositionid())));
+		}
+
+		for (StatisticsBean statisticsBean : list) {
+			if (statisticBoMap.containsKey(statisticsBean.getUser_id())) {
+				StatisticsBo tmp = statisticBoMap.get(statisticsBean.getUser_id());
+				tmp.setChecked_num(statisticsBean.getChecked_num());
+				tmp.setScore(statisticsBean.getScore());
+				tmp.setCheck_t_num(statisticsBean.getCheck_t_num());
+				tmp.setCheck_t_score(statisticsBean.getCheck_t_score());
+				tmp.setCheck_x_num(statisticsBean.getCheck_x_num());
+				tmp.setCheck_x_score(statisticsBean.getCheck_x_score());
+				tmp.setCheck_s_num(statisticsBean.getCheck_s_num());
+				tmp.setCheck_s_score(statisticsBean.getCheck_s_score());
+				tmp.setCheck_all_num(statisticsBean.getCheck_all_num());
+				tmp.setCheck_all_score(statisticsBean.getCheck_all_score());
+			}
+
+		}
+		
+		List<StatisticsBo> lists = new ArrayList<>(statisticBoMap.values());
+		// 进行排序
+		lists.sort(new Comparator<StatisticsBo>() {
+			@Override
+			public int compare(StatisticsBo o1, StatisticsBo o2) {
+				return o1.compareTo(o2);
+			}
+		});
+
+		for (int i = 0; i < lists.size(); i++) {
+
+			StatisticsBo statisticsBo = lists.get(i);
+			if (statisticsBo.getCheck_all_num()== 0) {
+				continue;
+			}
+			// 计算平均扣分
+			DecimalFormat df = new DecimalFormat(".##");
+			double count = statisticsBo.getCheck_all_num();
+			Double sc = (statisticsBo.getCheck_all_score()) * 1.00
+					/ (count == 0 ? 1 : count);
+			statisticsBo.setCheck_score_avg(sc == 0 ? "0" : df.format(sc));
+		}
+		// 这边进行赛选一下;
+		List<StatisticsBo> reList = new ArrayList<>();
+		for (int i = 0; i < lists.size(); i++) {
+			if (parent_dept_id == null || lists.get(i).getUser().getParent_organid() == parent_dept_id + 0) {
+				if (organId == null || lists.get(i).getUser().getOrganid() == organId + 0) {
+					reList.add(lists.get(i));
+				}
+			}
+		}
+
+		return reList;
+	}
+
+	@Override
+	public void getBusinessFeedbackInfo(StatisticsBeanBO obj, HttpServletRequest req, HttpServletResponse resp) {
+		// 检索数据
+		List<StatisticsBo> listStatistic = getBusinessFeedbackInfo(obj);
+		double start_score = Double.parseDouble(obj.getStart_score());
+		double end_score = Double.parseDouble(obj.getEnd_score());
+
+		StatisticsBeanBO objs = (StatisticsBeanBO) obj;
+
+		for (Iterator<StatisticsBo> it = listStatistic.iterator(); it.hasNext();) {
+			StatisticsBo st = it.next();
+			boolean flag = false;
+			if (objs.getMax_check_num() != null && st.getChecked_num() > objs.getMax_check_num()) {
+				flag = true;
+			}
+			if (objs.getMin_check_num() != null && st.getChecked_num() < objs.getMin_check_num()) {
+				flag = true;
+			}
+            double score = 0;
+            if(st.getCheck_score_avg()!=null){
+                score = 1000 -  Double.parseDouble(st.getCheck_score_avg());
+            }
+
+			if (objs.getMin_score() != null && score < objs.getMin_score()) {
+				flag = true;
+			}
+			if (objs.getMax_score() != null && score > objs.getMax_score()) {
+				flag = true;
+			}
+			if (objs.getPosition_id() != null && st.getUser().getPositionid() != objs.getPosition_id() + 0) {
+				flag = true;
+			}
+			if (flag) {
+				it.remove();
+			}
+		}
+
+		// 处理数据
+		int j = 1;
+		for (Iterator<StatisticsBo> it = listStatistic.iterator(); it.hasNext();) {
+			StatisticsBo st = it.next();
+			String scoredata = "";
+            double score = 0;
+            if(st.getCheck_score_avg()!=null){
+                score = 1000 -  Double.parseDouble(st.getCheck_score_avg());
+                scoredata = String.format("%.2f", score);
+            }else{
+                scoredata = "-";
+            }
+			if (score >= start_score && score <= end_score) {
+				// 得分
+				st.setCheck_score(scoredata);
+				st.setId(j++);
+			} else {
+				it.remove();
+			}
+		}
+		Map<String, Object> map = new HashMap<String, Object>();
+		map.put("list", listStatistic);
+		exportExcel("收费生产人员业务提升考核情况反馈表", "business_feedback", map, resp);
+	}
 }

BIN
VisualInspection_server/src/main/resources/business_feedback.xls


BIN
VisualInspection_server/src/main/resources/operation_info.xls