温红权 8 år sedan
förälder
incheckning
65b2249e2e

+ 19 - 0
VisualInspection/js/statistics/assess_situation.js

@@ -57,6 +57,25 @@
             // var startD = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
             var start_time = startD.getFullYear() + "-" + (startD.getMonth()) + "-26";
             var end_time = endD.getFullYear() + "-" + (endD.getMonth() + 1) + "-25";
+
+            var temp_time = $.zui.store.get('page_data_param_temp_time');
+            if (temp_time) {
+
+                var year = temp_time.split('/')[0];
+                var month = temp_time.split('/')[1];
+
+                var starty = year;
+                var startm = parseInt(month) - 1;
+
+                if (startm <= 0) {
+                    startm = 12;
+                    starty = parseInt(year) - 1;
+                }
+
+                start_time = starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-26';
+                end_time = year + '-' + month + '-25'
+                $.zui.store.set('page_data_param_temp_time', null)
+            }
             //默认初始化时间页面回显
             $("#start-time").val(start_time);
             $("#end-time").val(end_time);

+ 19 - 0
VisualInspection/js/statistics/personal_data_statistics.js

@@ -29,6 +29,25 @@ $(function() {
     setVisit();
 
 
+    var temp_time = $.zui.store.get('page_data_param_temp_time');
+    if (temp_time) {
+
+        var year = temp_time.split('/')[0];
+        var month = temp_time.split('/')[1];
+
+        var starty = year;
+        var startm = parseInt(month) - 1;
+
+        if (startm <= 0) {
+            startm = 12;
+            starty = parseInt(year) - 1;
+        }
+
+        $(".div-start input").val(starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-26');
+        $(".div-end input").val(year + '-' + month + '-25');
+        $.zui.store.set('page_data_param_temp_time', null)
+    }
+
 
 
     //*************************************数据表格******************************************

+ 129 - 2
VisualInspection/js/statistics/road_manage_statistics.js

@@ -13,6 +13,7 @@ var array_points = new Array();
 var array_points2 = new Array();
 var array_allStation = new Array();
 var array_allStation_score = new Array();
+var array_allStation_score_temp = new Array();
 var array_check_type = new Array();
 
 var map_per_data = new HashMap();
@@ -27,6 +28,7 @@ var array_score_order = new Array();
 var array_score_data = new Array();
 var array_score_last = new Array();
 var array_get_score = new Array();
+var array_get_score_temp = new Array();
 var array_score_pie = new Array();
 var year_assess;
 var score_rank;
@@ -52,6 +54,7 @@ $(function() {
         isinitVal: true,
         format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
     });
+
     var road_manager;
     if (roleContains("STATION")) {
         road_manager = getCurrentUser().road_manager_id;
@@ -60,6 +63,28 @@ $(function() {
         road_manager = getCurrentUser().organid;
     }
     setRoadManagerSelect(".div-roadManage select", road_manager);
+
+    var temp_time = $.zui.store.get('page_data_param_temp_time');
+    var road_p = $.zui.store.get('page_data_param_road_p');
+
+    if (temp_time) {
+        $("#month_date").val(temp_time);
+        setRoadManagerSelect_1(".div-roadManage select", road_p);
+
+        $.zui.store.set('page_data_param_temp_time', null);
+        $.zui.store.set('page_data_param_road_p', null);
+    }
+
+
+    var p = $.zui.store.get('store_param_' + current_url);
+    $.zui.store.set('store_param_' + current_url, null)
+    if (p) {
+        $("#month_date").val(p.time)
+        setRoadManagerSelect(".div-roadManage select", p.road_p);
+    }
+
+
+
     //加载数据
     refresh(true);
 
@@ -299,6 +324,7 @@ $(function() {
             if (data != null && data.length != 0) {
 
 
+                x_m_array_temp = new Array();
                 for (var i = 0; i < x_m_array.length; i++) {
 
                     var index = -1;
@@ -431,8 +457,11 @@ $(function() {
                     rank[i] = i + 1;
                 }
             }
+            array_allStation_score_temp = new Array();
             for (var i = 0; i < array_allStation_score.length; i++) {
                 array_allStation.push(data[i].feeStationName.substr(0, data[i].feeStationName.length - 3) + "\n" + (rank[i]));
+
+                array_allStation_score_temp.push({ value: array_allStation_score[i], name: data[i].feeStationName })
             }
         } else if (type == 4) {
             array_score_order.length = 0;
@@ -441,6 +470,7 @@ $(function() {
                 for (var i = 0; i < data.length; i++) {
                     array_score_order.push(data[i].user.truename + "\n" + "(" + data[i].user.fee_station_name.substr(0, data[i].user.fee_station_name.length - 3) + ")");
                     array_score_data.push((1000 - filter(data[i].all_check_score, 1.0, 0)));
+
                 }
             } else {
                 array_score_order.length = 0;
@@ -495,11 +525,14 @@ $(function() {
                 }
             }
 
+            array_get_score_temp = new Array();
 
             for (var i = 0; i < array_get_score.length; i++) {
                 array_score_last.push(data[i].user.truename + "\n" + "(" + data[i].user.fee_station_name.substr(
                     0, data[i].user.fee_station_name.length - 3) + ")" + "\n" + (rank[i]));
 
+                array_get_score_temp.push({ value: array_get_score[i], name: data[i].user.id + "_" + data[i].user.organid })
+
             }
         } else if (type == 6) {
             array_check_type = [];
@@ -669,6 +702,12 @@ $(function() {
                 rank_suf = ec.init(document.getElementById('people-rank-suf'), theme);
                 check_type = ec.init(document.getElementById('server-check-type'), theme);
                 people_points = ec.init(document.getElementById('each-people-points'));
+
+
+
+                points_assess.on(ecConfig.EVENT.CLICK, point_c)
+                score_rank.on(ecConfig.EVENT.CLICK, score_c)
+                rank_suf.on(ecConfig.EVENT.CLICK, station_c)
             }
         );
     }
@@ -917,7 +956,7 @@ $(function() {
             series: [{
 
                 type: 'bar',
-                data: array_allStation_score,
+                data: array_allStation_score_temp,
                 itemStyle: {
                     normal: {
                         label: {
@@ -941,6 +980,7 @@ $(function() {
      * 图四
      */
     function people_rank_pre() {
+
         option = {
             color: ['#00ced1'], // 条形图颜色
             tooltip: {
@@ -1043,7 +1083,7 @@ $(function() {
             series: [{
                     name: '平均分',
                     type: 'bar',
-                    data: array_get_score,
+                    data: array_get_score_temp,
                     itemStyle: {
                         normal: {
                             color: '#00ced1',
@@ -1436,4 +1476,91 @@ function setVisit() {
     if (roleContains("ROAD_MANAGER") || roleContains("STATION")) {
         $(".div-roadManage select").attr("disabled", "disabled");
     }
+}
+
+
+
+
+var ecConfig = require('echarts/config');
+
+
+
+function point_c(param) {
+    if (typeof param.seriesIndex == 'undefined') {
+        return;
+    }
+    if (param.type == 'click') {
+
+        var pdata = {
+            time: $("#month_date").val(),
+            road_p: $(".div-roadManage select").val()
+        }
+
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/view/statistics/assess_situation.html");
+
+    }
+}
+
+function score_c(param) {
+    if (typeof param.seriesIndex == 'undefined') {
+        return;
+    }
+    if (param.type == 'click') {
+
+        var pdata = {
+            time: $("#month_date").val(),
+            road_p: $(".div-roadManage select").val()
+        }
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+
+        var stationlist = $.zui.store.get("cache_fee_station_list");
+        var roadlist = $.zui.store.get("cache_road_manager_list");
+
+        for (var i in stationlist) {
+            if (stationlist[i].name == param.data.name) {
+                for (var j in roadlist) {
+                    if (roadlist[j].deptid == stationlist[i].parentid) {
+                        $.zui.store.set('page_data_param_road_p', roadlist[j].name);
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+        $.zui.store.set('page_data_param_station_p', param.data.name);
+
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/view/statistics/toll_station_statistics.html");
+    }
+}
+
+function station_c(param) {
+    if (typeof param.seriesIndex == 'undefined') {
+        return;
+    }
+    if (param.type == 'click') {
+
+
+        var pdata = {
+            time: $("#month_date").val(),
+            road_p: $(".div-roadManage select").val()
+        }
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+
+        //获取站名+用户名
+        var namelist = param.data.name.split("_")
+        var userid = namelist[0];
+        var deptid = namelist[1];
+
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/view/statistics/personal_data_statistics.html?userid=" + userid + "&deptid=" + deptid);
+    }
 }

+ 94 - 7
VisualInspection/js/statistics/toll_station_statistics.js

@@ -13,10 +13,13 @@
      	var arrar_points_month = new Array();
      	var array_score_order = new Array();
      	var array_score_data = new Array();
+     	var array_score_data_temp = new Array();
      	var array_five_name = new Array();
      	var array_five_score = new Array();
+     	var array_five_score_temp = new Array();
      	var array_five_name_back = new Array();
      	var array_five_score_back = new Array();
+     	var array_five_score_back_temp = new Array();
      	var year_assess;
      	var points_assess;
      	var check_type;
@@ -48,9 +51,32 @@
      	        road_manager = getCurrentUser().organid;
      	    }
      	    setRoadManagerSelect("#first", road_manager);
+     	    setSecond();
+
+
+     	    var temp_time = $.zui.store.get('page_data_param_temp_time');
+     	    var road_p = $.zui.store.get('page_data_param_road_p');
+     	    var station_p = $.zui.store.get('page_data_param_station_p');
+
+     	    if (temp_time) {
+     	        $("#month_date").val(temp_time);
+     	        setRoadManagerSelect_1(".div-roadManage select", road_p);
+     	        setSecond_1(station_p);
+     	        $.zui.store.set('page_data_param_temp_time', null);
+     	        $.zui.store.set('page_data_param_road_p', null);
+     	        $.zui.store.set('page_data_param_station_p', null);
+     	    }
+
+     	    var p = $.zui.store.get('store_param_' + current_url);
+     	    $.zui.store.set('store_param_' + current_url, null)
+     	    if (p) {
+     	        $("#month_date").val(p.time)
+     	        setRoadManagerSelect(".div-roadManage select", p.road_p);
+     	        setSecond_2(p.station_p);
+     	    }
      	    // 回显当前年月份
      	    // $(".div-month select").val(initDate);
-     	    setSecond();
+
      	    refresh(true);
      	    $(".div-button button").click(function() {
      	        refresh(flag);
@@ -272,6 +298,7 @@
      	            array_year_score.length = 0;
      	            if (data != '' &&  data.length != 0) {
 
+     	                x_m_array_temp = new Array();
      	                for (var i = 0; i < x_m_array.length; i++) {
 
      	                    var index = -1;
@@ -332,8 +359,11 @@
      	                    rank[i] = i + 1;
      	                }
      	            }
+     	            array_five_score_temp = new Array();
      	            for (var i = 0; i < array_five_score.length; i++) {
      	                array_five_name.push(data[i].user.truename + "\n" + (rank[i]));
+
+     	                array_five_score_temp.push({ value: array_five_score[i], name: data[i].user.id + "_" + data[i].user.organid })
      	            }
      	        } else if (type == 4) {
      	            array_score_order.length = 0;
@@ -362,8 +392,11 @@
      	                    rank[i] = i + 1;
      	                }
      	            }
+     	            array_score_data_temp = new Array();
      	            for (var i = 0; i < array_score_data.length; i++) {
      	                array_score_order.push(data[i].user.truename + "(" + (rank[i]) + ")");
+
+     	                array_score_data_temp.push({ value: array_score_data[i], name: data[i].user.id + "_" + data[i].user.organid })
      	            }
 
      	        } else if (type == 5) {
@@ -418,8 +451,10 @@
      	                    rank[i] = i + 1;
      	                }
      	            }
+     	            array_five_score_back_temp = new Array();
      	            for (var i = 0; i < array_five_score_back.length; i++) {
      	                array_five_name_back.push(data[i].user.truename + "\n" + (rank[i]));
+     	                array_five_score_back_temp.push({ value: array_five_score_back[i], name: data[i].user.id + "_" + data[i].user.organid })
      	            }
      	        }
      	    }
@@ -490,6 +525,22 @@
      	        flag = true;
      	    });
 
+     	    function setSecond_1(name) {
+     	        var select_road = $(".div-roadManage select").val();
+     	        var feeList = $.zui.store.get("cache_fee_station_list");
+     	        if (select_road) feeList = cache_road_manager_fee_list_map.get(select_road);
+
+     	        refreshFee(feeList, name, true);
+     	    }
+
+     	    function setSecond_2(name) {
+     	        var select_road = $(".div-roadManage select").val();
+     	        var feeList = $.zui.store.get("cache_fee_station_list");
+     	        if (select_road) feeList = cache_road_manager_fee_list_map.get(select_road);
+
+     	        refreshFee(feeList, name, false);
+     	    }
+
      	    function setSecond() {
      	        var select_road = $(".div-roadManage select").val();
      	        var feeList = $.zui.store.get("cache_fee_station_list");
@@ -499,7 +550,7 @@
      	        if (roleContains("STATION")) {
      	            dept = getCurrentUser().organid;
      	        }
-     	        refreshFee(feeList, dept);
+     	        refreshFee(feeList, dept, false);
      	        // var param = {
      	        // 	 "parentid":select_road
      	        // }
@@ -510,7 +561,7 @@
      	        // });
      	    }
 
-     	    function refreshFee(data, selectId) {
+     	    function refreshFee(data, selectId, isname) {
      	        var sec = document.getElementById('second');
      	        var tempStr = ''
      	        if (data.length != 0) {
@@ -520,7 +571,7 @@
      	                // }else if(select_road==31){
      	                // 	tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";
      	                // }else{
-     	                if (data[i].deptid == selectId)
+     	                if (isname ? data[i].name == selectId : data[i].deptid == selectId)
      	                    tempStr += "<option value=" + data[i].deptid + " selected>" + data[i].name + "</option>";
      	                else
      	                    tempStr += "<option value=" + data[i].deptid + ">" + data[i].name + "</option>";
@@ -635,8 +686,10 @@
      	            function(ec, theme) {
      	                if (type == 2) {
      	                    rank_assess = ec.init(document.getElementById('progress-rank-assess'));
+     	                    rank_assess.on(ecConfig.EVENT.CLICK, station_c)
      	                } else if (type == 3) {
      	                    rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
+     	                    rank_assess_back.on(ecConfig.EVENT.CLICK, station_c)
      	                } else {
      	                    if (flag) {
      	                        year_assess = ec.init(document.getElementById('tollStation-year-assess'), theme);
@@ -646,7 +699,12 @@
      	                    check_type = ec.init(document.getElementById('server-check-type'), theme);
      	                    people_points = ec.init(document.getElementById('each-people-points'));
      	                    rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
+
+     	                    score_rank.on(ecConfig.EVENT.CLICK, station_c)
+     	                    rank_assess_back.on(ecConfig.EVENT.CLICK, station_c)
      	                }
+
+
      	            }
      	        );
      	    }
@@ -821,7 +879,7 @@
      	            series: [{
      	                name: '进步名次',
      	                type: 'bar',
-     	                data: array_five_score,
+     	                data: array_five_score_temp,
      	                itemStyle: {
      	                    normal: {
      	                        label: {
@@ -877,7 +935,7 @@
      	            series: [{
      	                name: '退步名次',
      	                type: 'bar',
-     	                data: array_five_score_back,
+     	                data: array_five_score_back_temp,
      	                itemStyle: {
      	                    normal: {
      	                        label: {
@@ -943,7 +1001,7 @@
      	            series: [{
      	                name: '人员考核得分',
      	                type: 'bar',
-     	                data: array_score_data,
+     	                data: array_score_data_temp,
      	                itemStyle: {
      	                    normal: {
      	                        label: {
@@ -1107,4 +1165,33 @@
      	    if (roleContains("ROAD_MANAGER")) {
      	        $("#first").attr("disabled", "disabled");
      	    }
+     	}
+
+
+     	var ecConfig = require('echarts/config');
+
+     	function station_c(param) {
+     	    if (typeof param.seriesIndex == 'undefined') {
+     	        return;
+     	    }
+     	    if (param.type == 'click') {
+
+
+     	        var pdata = {
+     	            time: $("#month_date").val(),
+     	            road_p: $(".div-roadManage select").val(),
+     	            station_p: $("#second").val()
+     	        }
+     	        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+
+     	        //获取站名+用户名
+     	        var namelist = param.data.name.split("_")
+     	        var userid = namelist[0];
+     	        var deptid = namelist[1];
+
+     	        $.zui.store.set('store_param_' + current_url, pdata);
+     	        isnew = false;
+     	        changePage("/view/statistics/personal_data_statistics.html?userid=" + userid + "&deptid=" + deptid);
+     	    }
      	}

+ 63 - 38
VisualInspection/js/statistics/total_company_statistics.js

@@ -8,8 +8,10 @@ var array_points2 = new Array();
 
 var array_road = new Array();
 var array_road_score = new Array();
+var array_road_score_temp = new Array();
 var array_allStation = new Array();
 var array_allStation_score = new Array();
+var array_allStation_score_temp = new Array();
 var array_check_type = new Array();
 
 var map_per_data = new HashMap();
@@ -44,6 +46,14 @@ $(function() {
         isinitVal: true,
         format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
     });
+
+    var p = $.zui.store.get('store_param_' + current_url);
+    $.zui.store.set('store_param_' + current_url, null)
+    if (p) {
+        $("#month_date").val(p.time)
+    }
+
+
     refresh(true);
     $(".query-company").click(function() {
         // var select_month = $("#month_date").val();
@@ -90,6 +100,7 @@ $(function() {
             x_m_array.push(starty + "/" + (month >= 10 ? month : ("0" + month)));
         }
 
+
         var param = {
             "start_date": (parseInt(y) - 1) + "-" + m + "-25" + " 23:00:00",
             "end_date": y + "-" + (m) + "-25" + " 23:00:00"
@@ -364,8 +375,10 @@ $(function() {
                     rank[i] = i + 1;
                 }
             }
+            array_road_score_temp = new Array();
             for (var i = 0; i < array_road_score.length; i++) {
                 array_road.push(data[i].feeStationName + "\n" + (rank[i]));
+                array_road_score_temp.push({ value: array_road_score[i], name: data[i].feeStationName })
             }
         } else if (type == 4) {
             array_allStation_score.length = 0;
@@ -395,6 +408,7 @@ $(function() {
             }
             for (var i = 0; i < array_allStation_score.length; i++) {
                 array_allStation.push(data[i].feeStationName.substr(0, data[i].feeStationName.length - 3) + "\n" + (rank[i]));
+                array_allStation_score_temp.push({ value: array_allStation_score[i], name: data[i].feeStationName })
             }
         } else if (type == 5) {
             array_check_type = [];
@@ -612,14 +626,10 @@ $(function() {
                 check_type = ec.init(document.getElementById('server-check-type'), theme);
                 people_points = ec.init(document.getElementById('each-people-points'));
 
-                year_assess.on(ecConfig.EVENT.CLICK, year_c)
+
                 points_assess.on(ecConfig.EVENT.CLICK, point_c)
                 score_rank.on(ecConfig.EVENT.CLICK, score_c)
                 stationAll_rank.on(ecConfig.EVENT.CLICK, station_c)
-                check_type.on(ecConfig.EVENT.CLICK, check_c)
-                people_points.on(ecConfig.EVENT.CLICK, people_c)
-
-
 
 
             }
@@ -873,7 +883,7 @@ $(function() {
             series: [{
 
                 type: 'bar',
-                data: array_road_score,
+                data: array_road_score_temp,
                 itemStyle: {
                     normal: {
                         label: {
@@ -935,7 +945,7 @@ $(function() {
             series: [{
                 name: '公司全体收费站得分',
                 type: 'bar',
-                data: array_allStation_score,
+                data: array_allStation_score_temp,
                 itemStyle: {
                     normal: {
                         label: {
@@ -1303,21 +1313,24 @@ $(function() {
 
 var ecConfig = require('echarts/config');
 
-function year_c(param) {
-    if (typeof param.seriesIndex == 'undefined') {
-        return;
-    }
-    if (param.type == 'click') {
-        // console.log(param)
-        // alert(param.name);
-    }
-}
+
+// var temp_time = null;
+// var road_p = null;
+// var station_p = null;
 
 function point_c(param) {
     if (typeof param.seriesIndex == 'undefined') {
         return;
     }
     if (param.type == 'click') {
+
+        var pdata = {
+            time: $("#month_date").val()
+        }
+
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+        $.zui.store.set('store_param_' + current_url, pdata);
         isnew = false;
         changePage("/view/statistics/assess_situation.html");
 
@@ -1329,8 +1342,17 @@ function score_c(param) {
         return;
     }
     if (param.type == 'click') {
-        // console.log(param)
-        // alert(param.name);
+
+        var pdata = {
+            time: $("#month_date").val()
+        }
+
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+        $.zui.store.set('page_data_param_road_p', param.data.name);
+
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/view/statistics/road_manage_statistics.html");
     }
 }
 
@@ -1339,27 +1361,30 @@ function station_c(param) {
         return;
     }
     if (param.type == 'click') {
-        // console.log(param)
-        // alert(param.name);
-    }
-}
+        var pdata = {
+            time: $("#month_date").val()
+        }
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
 
-function check_c(param) {
-    if (typeof param.seriesIndex == 'undefined') {
-        return;
-    }
-    if (param.type == 'click') {
-        // console.log(param)
-        // alert(param.name);
-    }
-}
 
-function people_c(param) {
-    if (typeof param.seriesIndex == 'undefined') {
-        return;
-    }
-    if (param.type == 'click') {
-        // console.log(param)
-        // alert(param.name);
+
+        var stationlist = $.zui.store.get("cache_fee_station_list");
+        var roadlist = $.zui.store.get("cache_road_manager_list");
+
+        for (var i in stationlist) {
+            if (stationlist[i].name == param.data.name) {
+                for (var j in roadlist) {
+                    if (roadlist[j].deptid == stationlist[i].parentid) {
+                        $.zui.store.set('page_data_param_road_p', roadlist[j].name);
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+        $.zui.store.set('page_data_param_station_p', param.data.name);
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/view/statistics/toll_station_statistics.html");
     }
 }

+ 8 - 3
VisualInspection/js/util/util.js

@@ -195,14 +195,19 @@ function getRoadManagerList() {
 
 function setRoadManagerSelect(div, selectId, hasAll) {
     var rmList = $.zui.store.get("cache_road_manager_list");
-    setRoadManagerValue(rmList, div, selectId, hasAll);
+    setRoadManagerValue(rmList, div, selectId, hasAll, false);
 }
 
-function setRoadManagerValue(data, div, selectId, hasAll) {
+function setRoadManagerSelect_1(div, selectId, hasAll) {
+    var rmList = $.zui.store.get("cache_road_manager_list");
+    setRoadManagerValue(rmList, div, selectId, hasAll, true);
+}
+
+function setRoadManagerValue(data, div, selectId, hasAll, isname) {
     var optStr = ''; //<option value="">全部</option>';
     if (hasAll) optStr = '<option value="">全部</option>';
     for (var i in data) {
-        if (data[i].deptid == selectId)
+        if (isname ? (data[i].name.indexOf(selectId) != -1) : (data[i].deptid == selectId))
             optStr += '<option value="' + data[i].deptid + '" selected="selected">' + data[i].name + '</option>';
         else
             optStr += '<option value="' + data[i].deptid + '">' + data[i].name + '</option>';

+ 7 - 7
VisualInspection/view/statistics/total_company_statistics.html

@@ -23,7 +23,7 @@
             <!--</select>-->
             <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
         </div>
-        <div class="col-sm-2"><button class="btn btn-info2 col-sm-6">查询</button></div>
+        <div class="col-sm-2"><button class="btn btn-info2 col-sm-6 query-company">查询</button></div>
     </div>
     <!-- <div class="line-1"></div> -->
 
@@ -41,7 +41,7 @@
                 <div id="company-points-assess" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
             </div>
         </div>
-            <!-- <div class="line-3"></div> -->
+        <!-- <div class="line-3"></div> -->
         <div class="col-sm-6">
             <div class="border-no">
                 <div class="title-div"><span class="title-span">道管中心得分排名</span></div>
@@ -52,16 +52,16 @@
     <!-- <div class="border-line">
         <div class="row-4">
             <div class="col-sm-6"><span>公司考核扣分情况占比</span></div>
-             <div class="line-2"></div> 
+             <div class="line-2"></div>
             <div class="col-sm-6"><span>道管中心得分排名</span></div>
         </div>
         <div class="row-5">
             <div id="company-points-assess" style="width:49%;height:400px;float:left;"></div>
-             <div class="line-3"></div> 
+             <div class="line-3"></div>
             <div id="roadManager-score-rank" style="width:49%;height:400px;float:left;"></div>
         </div>
     </div> -->
-    
+
 
 
     <div class="border-line">
@@ -71,8 +71,8 @@
         <div id="company-stationAll-rank" style="width:100%;height:400px;"></div>
     </div>
 
-     <div class="row">
-         <div class="col-sm-6">
+    <div class="row">
+        <div class="col-sm-6">
             <div class="border-no">
                 <div class="title-div"><span>温馨服务检查问题类别占比</span></div>
                 <div id="server-check-type" style="width:100%;height:400px;float:left;"></div>

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

@@ -1206,8 +1206,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			if (masterMap.get(statisticsBean.getUser_id()) != null) {
 				StatisticsBean tmp = statisticBoMap.get(statisticsBean.getUser_id());
 				StatisticsBo msb = masterMap.get(statisticsBean.getUser_id());
-				tmp.setAll_check_score(statisticsBean.getAll_check_score() + msb.getCheck_all_m_score());
-				tmp.setChecked_num(statisticsBean.getChecked_num() + msb.getChecked_m_num());
+                if(tmp==null) continue;
+				tmp.setAll_check_score(statisticsBean.getAll_check_score() + (msb!=null?msb.getCheck_all_m_score():0));
+				tmp.setChecked_num(statisticsBean.getChecked_num() + (msb!=null?msb.getChecked_m_num():0));
 			}
 		}
 

+ 6 - 6
VisualInspection_server/src/main/resources/application.properties

@@ -3,8 +3,8 @@ spring.thymeleaf.cache=false
 context.listener.classes=com.xintong.SystemInit
 
 #master.datasource.url = jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf-8
-#master.datasource.url = jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf-8
-master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf-8
+#master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
 #master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
 master.datasource.username = root
 master.datasource.password = root
@@ -13,8 +13,8 @@ master.mapper-locations=classpath:com/xintong/visualinspection/mapper/master/*.x
 
 ## \u7528\u6237\u6570\u636E\u6E90\u914D\u7F6E
 #cluster.datasource.url=jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf8
-#cluster.datasource.url=jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf8
-cluster.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
+cluster.datasource.url=jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf8
+#cluster.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
 #cluster.datasource.url=jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf8
 cluster.datasource.username=root
 cluster.datasource.password=root
@@ -62,8 +62,8 @@ spring.redis.host=git.topm.win
 #spring.redis.port=6379
 
 #spring.redis.port=7003
-#spring.redis.port=6401
-spring.redis.port=6380
+spring.redis.port=6401
+#spring.redis.port=6380
 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
 spring.redis.password=xintong
 # \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09