Kaynağa Gözat

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

minitiger 8 yıl önce
ebeveyn
işleme
1eefc66a23
23 değiştirilmiş dosya ile 682 ekleme ve 257 silme
  1. 1 1
      VisualInspection/js/statistics/appeal.js
  2. 19 17
      VisualInspection/js/statistics/assess_ranking.js
  3. 11 3
      VisualInspection/js/statistics/check_workload_statistics.js
  4. 66 0
      VisualInspection/js/statistics/common_statistic.js
  5. 59 18
      VisualInspection/js/statistics/personal_data_statistics.js
  6. 143 59
      VisualInspection/js/statistics/road_manage_statistics.js
  7. 154 70
      VisualInspection/js/statistics/toll_station_statistics.js
  8. 126 54
      VisualInspection/js/statistics/total_company_statistics.js
  9. 15 8
      VisualInspection/js/teamClass/charge_team_schedule.js
  10. 5 5
      VisualInspection/view/statistics/appeal.html
  11. 6 2
      VisualInspection/view/statistics/check_workload_statistics.html
  12. 11 2
      VisualInspection/view/statistics/emp_ranking.html
  13. 5 0
      VisualInspection/view/statistics/personal_data_statistics.html
  14. 15 5
      VisualInspection/view/statistics/road_manage_statistics.html
  15. 10 5
      VisualInspection/view/statistics/toll_station_statistics.html
  16. 8 3
      VisualInspection/view/statistics/total_company_statistics.html
  17. 9 0
      VisualInspection/view/term_management/charge_stuff_schedule.html
  18. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckmanStatisticsBean.java
  19. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  20. 10 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  21. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamClassMapper.xml
  22. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  23. BIN
      VisualInspection_server/src/main/resources/appeal_info.xls

+ 1 - 1
VisualInspection/js/statistics/appeal.js

@@ -77,7 +77,7 @@ function getFsWorkInfo(){
 function getTableContent(obj,seq){
  
     var content = "<tr><td>"+seq+"</td> <td >"+obj.fee_station_name+"</td> <td >"+GDV(obj.appeal_num,0)+
-            "</td> <td >"+GDV(obj.appeal_success_num,0)+"</td><td>"+ GDV(obj.appeal_fail_num,0) +"</td><td>"+ GDV(obj.appeal_other_num,0) +"</td> </tr>";
+            "</td> <td >"+GDV(obj.appeal_success_num,0)+"</td><td>"+ GDV(obj.appeal_fail_num,0) +"</td> </tr>";
 
     return content;
 }

+ 19 - 17
VisualInspection/js/statistics/assess_ranking.js

@@ -21,6 +21,8 @@ function queryEmpClick() {
     var end_date = $("#end-time").val();
     var start_score = $("#start-score").val();
     var end_score = $("#end-score").val();
+    var start_num = $("#start-num").val();
+    var end_num = $("#end-num").val();
     var flag = param_method(start_score, end_score);
     if (flag == false) {
         return;
@@ -50,7 +52,7 @@ function queryEmpClick() {
         "end_date": end_date,
     }
     var url = "statistics/employee/order";
-    getEmployeeInfosClick(url, param, start_score, end_score)
+    getEmployeeInfosClick(url, param, start_score, end_score,start_num,end_num)
 }
 
 function initQueryEmp() {
@@ -62,6 +64,8 @@ function initQueryEmp() {
     var end_time = endD.getFullYear() + "-" + (endD.getMonth() + 1) + "-" + endD.getDate();
     var start_score = $("#start-score").val();
     var end_score = $("#end-score").val();
+    var start_num = $("#start-num").val();
+    var end_num = $("#end-num").val();
     setJobSelect("#jobSelect");
     //默认初始化时间页面回显
     $("#start-time").val("2017-6-09");//start_time);
@@ -78,21 +82,22 @@ function initQueryEmp() {
         "end_date": end_date,
     }
     var url = "statistics/employee/order";
-    getEmployeeInfosClick(url, param, start_score, end_score);
+    getEmployeeInfosClick(url, param, start_score, end_score,start_num,end_num);
 }
 /**
  * click
  * @param {*} url 
  * @param {*} param 
  */
-function getEmployeeInfosClick(url, param, start_score, end_score) {
+function getEmployeeInfosClick(url, param, start_score, end_score,start_num,end_num) {
     post_common_service(url, param, function (data) {
 
         var strTbody = '';
         var count = 0;
         for (var i = 0; i < data.length; i++) {
             var score = 1000 - filterByZeroHandle(average(data[i]).toFixed(2), '0');
-            var flag = judgeParamFilter(data, i, score, start_score, end_score)
+            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 = "<button id=\"user_" + data[i].user.id + "\" onClick='addTask(" + data[i].user.id + ",\"" + data[i].user.truename + "\",\"" + 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>"
@@ -130,9 +135,6 @@ function addTask(userid, username, start_date, end_date) {
         "end_time": end_date
     }
     post_common_service(url, param, function (data) {
-        
-        console.log(data)
-      
         var tasklist = data.teamClasseList;
         var userclasslist = data.userClassCountList;
 
@@ -228,7 +230,10 @@ function addTask(userid, username, start_date, end_date) {
                     var name = (new Date(tasktemp.start_time)).Format("HH:mm") + "--"+(new Date(tasktemp.end_time)).Format("HH:mm")
                     var classname = "btn-success";
                     if(hasmin){
-                        classname = "btn-success disabled";
+
+                        //放开15分钟限制
+                        classname = "btn-success";
+                        //  classname = "btn-success disabled";
                         name +="<span class=\"label label-badge\">未</span>";
                     }
                     if(hasin){
@@ -513,23 +518,20 @@ function filterSlash(value, check_num) {
     }
 }
 
-function judgeParamFilter(data, i, score, start_score, end_score) {
+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 checkCount = $("#check_count").val();
-    if (checkCount) {
-        if (filter(data[i].checked_num, '0') == checkCount) {
-            flag2 = true;
-        } else {
-            flag2 = false;
-        }
-    } else {
+    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) {

+ 11 - 3
VisualInspection/js/statistics/check_workload_statistics.js

@@ -45,6 +45,7 @@ $(function(){
 				"user_id":user_id,
 				"queryType":1,
 				"check_status": cur_status,
+				"score_flag":$(".score-select").val()
 		}
 		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
 			hide = true;
@@ -53,13 +54,14 @@ $(function(){
 		var cols = [
 					{width: 40,height:60, text: '序号', flex: true, colClass: 'text-center',field:'num'},
                     {width: 40,height:60, text: '稽查人员', flex: true,colClass: 'text-center',field:'checkman_name' },
-                    {width: 100,height:60, text: '任务名称', flex: true,colClass: 'text-center',field:'check_task_name' },
-					{width: 100,height:60, text: '时间段', flex: true,colClass: 'text-center',field:'check_task_time_name' },
+                    {width: 90,height:60, text: '任务名称', flex: true,colClass: 'text-center',field:'check_task_name' },
+					{width: 90,height:60, text: '时间段', flex: true,colClass: 'text-center',field:'check_task_time_name' },
                     {width: 40,height:60, text: '考核人员', flex: true,colClass: 'text-center',field:'checked_name' },
                     {width: 60,height:60, text: '考核部门', flex: true,colClass: 'text-center',field:'feeStationName' },
 					{width: 40,height:60, text: '扣分数',  flex: true, colClass: 'text-center',field:'score'},
+					{width: 60,height:60, text: '考核类型',  flex: true, colClass: 'text-center',field:'parent_name'},
 					{width: 100,height:60, text: '考核项',  flex: true, colClass: 'text-center',field:'name'},
-					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true,field:'pics'},
+					{width: 90,height:60, text: '扣分凭证', type: 'imagedd', flex: true,field:'pics'},
 		];
 		if(cur_status==12 || cur_status==13){
 			data.check_status_arr = [12,13];
@@ -170,6 +172,11 @@ $(function(){
 				}else{
 					$(".check_score_avg").text(0);
 				}
+				if(data.checked_num!='' && data.checked_num!=undefined){
+				    $(".checked_num").text(data.checked_num);
+				}else{
+					$(".checked_num").text(0);
+				}
             }else{
 				$(".all_check_personal").text(0);
 				$(".all_check_task").text(0);
@@ -177,6 +184,7 @@ $(function(){
 				$(".all_checkman").text(0);
 				$(".all_check_score").text(0);
 				$(".check_score_avg").text(0);
+				$(".checked_num").text(0);
             }
         },function(error){
         	return "" ;

+ 66 - 0
VisualInspection/js/statistics/common_statistic.js

@@ -134,4 +134,70 @@ function getDays(mouth,datet){
         days= 30;   
     }
     return days ;
+}
+
+
+var months = new Array();
+var m = new Date().getMonth();
+var mth_pre = 12-m; 
+var initDate;
+/**
+ * 根据当前年月动态将13个月push数组
+ */
+function month_method(){		
+    // 将上一年的当前月的上个月到12月加入到数组里
+    for(var i=1;i<=mth_pre+1;i++){
+        mth_handle(m,(year-1),(m++));
+    }
+    // 将当前年的一月份到当前月的上个月加入到数组里
+    for(var i=1;i<=new Date().getMonth();i++){
+        mth_handle(i,year,i);
+    }
+    // 当前年月的上个月(初始化图用)
+    if((new Date().getMonth()+'').length == 1){
+        initDate = year+"/0"+new Date().getMonth();
+    }else{
+        initDate = year+"/"+new Date().getMonth();
+    }
+}
+// 抽出的方法
+function mth_handle(mth,getYear,num){
+    if((mth+'').length==1){
+        months.push(((getYear)+'').substr(2)+"/0"+(num));
+    }else{
+        months.push(((getYear)+'').substr(2)+"/"+(num));
+    }
+}
+
+/**
+ * 月份下拉框
+ */
+function select_option(){
+    var str = $(".div-month select");
+    var temp = '';
+    for(var i=0;i<months.length;i++){
+        temp += "<option value=20"+months[i]+">20"+months[i]+"</option>"
+    }
+    str.append(temp);
+}
+
+
+/**
+ * 根据当前月份 获取前13个月份
+ */
+function month_method_2(){
+    var montharray = new Array();
+    var now_month = new Date().getMonth() ;
+    for(var i= now_month ; i<13;i++){
+        montharray.push( (new Date().getFullYear()-1+'') + "/"+PrefixInteger(i,2) ) ;
+    }
+    for(var i=1;i<=now_month;i++){
+        montharray.push( (new Date().getFullYear()+'')  + "/"+ PrefixInteger(i,2) );
+    }
+    return montharray ;
+}
+
+// 数字前面补0
+function PrefixInteger(num, length) {
+    return (Array(length).join('0') + num).slice(-length);
 }

+ 59 - 18
VisualInspection/js/statistics/personal_data_statistics.js

@@ -39,7 +39,8 @@ $(function(){
 			"start_date":start_date,
 				"end_date":end_date,
 				"user_id":user_id,
-				"queryType":0
+				"queryType":0,
+				"score_flag":$(".score-select").val()
 		}
 		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
 			hide = true;
@@ -49,6 +50,7 @@ $(function(){
 					{width: 50, text: '序号', flex: true, colClass: 'text-center',field:'num'},
 					{width: 100, text: '时间段', flex: true,colClass: 'text-center',field:'check_task_time_name' },
 					{width: 60, text: '扣分数',  flex: true, colClass: 'text-center',field:'score'},
+					{width: 100, text: '考核类型',  flex: true, colClass: 'text-center',sort: 'down',field:'parent_name'},
 					{width: 100, text: '考核项',  flex: true, colClass: 'text-center',sort: 'down',field:'name'},
 					{width: 100, text: '扣分凭证', type: 'imagedd', flex: true, hide:hide,field:'pics'},
 		];
@@ -95,6 +97,7 @@ $(function(){
 		// 加载图配置
 		echart();
 	});
+
     /**
 	 * 初始化图一
 	 * @param {*} url 
@@ -102,8 +105,8 @@ $(function(){
 	 */
 	function init_personal_score_statistics(url,user_id){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
 			"user_id":user_id
 		}
 		initRqueset(url,param,1);
@@ -119,7 +122,7 @@ $(function(){
 		var param = {
 			"start_date":start_date,
 			"end_date":end_date,
-			"user_id":user_id,
+			"user_id":user_id
 		}
 		initRqueset(url,param,2);
 	}
@@ -156,21 +159,21 @@ $(function(){
 			array_year_score.length = 0;
 			months.length = 0;
 			if(data.length!=0){
-				if(data.length<12){
-					for(var i=0;i<12-data.length;i++){
+				if(data.length<13){
+					for(var i=0;i<13-data.length;i++){
 						array_year_score.push(0)
 					}
 				}
+				var month_arr = month_method_2();
 				for(var i=0;i<data.length;i++){
-					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
+					if(month_arr.indexOf(parseInt(data[i].mth))){
 						// 指定位置插入值
-						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
+						array_year_score.splice(month_arr.indexOf(data[i].mth),0,
 						(1000-(filter(data[i].all_check_score,data[i].checked_num,0))));
 					}
 				}
 		    }else{
 				array_year_score.length = 0;
-				months.length = 0;
 			}	
 		}else if(type == 2){
 			array_check_type.length=0;
@@ -215,22 +218,32 @@ $(function(){
 			}else{
 				sec.innerHTML='';	
 			}
-            var start_date = $(".div-start input").val()+" 23:00:00";
-            var end_date = $(".div-end input").val()+" 23:00:00";
-            var user_id = $("#select-personal").val();
-			// 页面初始化
-			echart();
-            initAppealPage(start_date,end_date,user_id);
-            init_personal_score_statistics("statistics/one/person/year/info",user_id);
-            init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+			// 请求数据
+         	 getInit();
 		},function(error){
         	return "" ;
     	});
     }
+
+	function getInit(){
+		 var start_date = $(".div-start input").val()+" 23:00:00";
+		var end_date = $(".div-end input").val()+" 23:00:00";
+		var user_id = $("#select-personal").val();
+		// 页面初始化
+		echart();
+		initAppealPage(start_date,end_date,user_id);
+		init_personal_score_statistics("statistics/one/person/year/info",user_id);
+		init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+	}
+
+
 	$("#select-dept").change(function(){
 		setSecond();
 	});
 
+	$("#select-personal").change(function(){
+		getInit();
+	})
 	
 
 	 /**
@@ -280,6 +293,20 @@ $(function(){
 					tooltip : {
 						trigger: 'axis'
 					},
+					noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                    },
 					grid:{
                     width:"80%"
                     },
@@ -294,7 +321,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : monthsCH
+							data : month_method_2()
 						}
 					],
 					yAxis : [
@@ -340,6 +367,20 @@ $(function(){
 					trigger: 'item',
 					formatter:  "个人服务检查问题占比 <br/>{b} : {c}分 ({d}%)"
 				},
+				noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 				toolbox: {
 					show : true,
 					feature : {

+ 143 - 59
VisualInspection/js/statistics/road_manage_statistics.js

@@ -5,8 +5,6 @@
 		var score_rank;
 		var points_assess;
 		var check_type;
-		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 		var select_road = $(".div-roadManage select").val();
         var array_year_score = new Array();
 		var array_points = new Array();
@@ -33,8 +31,12 @@
 		var min_suff;
 		var flag = true;
 $(function(){
-    // 显示当前月份
-	$(".div-month select").val(month);
+    // 公用方法,根据当前年月动态将13个月push数组
+	month_method();
+	// 公用方法,月份下拉框
+    select_option();
+	// 回显当前年月份
+	$(".div-month select").val(initDate);
 
 	$(".div-button button").click(function(){	
 		var select_month = $(".div-month select").val();
@@ -48,7 +50,7 @@ $(function(){
 		// 查询图三
 		init_stationAll_rank("statistics/score/manage/tollgate/info",select_month+'',select_road);
 		// 查询图四
-        init_people_rank_pre("statistics/stuff/score/info",select_month+'',select_road);
+        //init_people_rank_pre("statistics/stuff/score/info",select_month+'',select_road);
         // 查询图五
         init_people_rank_suf("statistics/stuff/score/info",select_month+'',select_road);
         // 查询图六
@@ -73,8 +75,8 @@ $(function(){
 	 */
 	function init_company_year_assess(url,select_road){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
 			"dept_id":select_road,
 			"queryType":1
 		}
@@ -87,109 +89,92 @@ $(function(){
 	 * 初始化图二
 	 */
 	function init_company_points_assess(url,mon,select_road){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_road,
 			"queryType":1
 		}
 		initRqueset(url,param,2);
 	}
-    init_company_points_assess("statistics/lost/score/rate",month+'',select_road);
+    init_company_points_assess("statistics/lost/score/rate",initDate+'',select_road);
     
 	/**
 	 * 初始化图三
 	 */
-    function init_stationAll_rank(url,mon,select_road){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_stationAll_rank(url,mon,select_road){	
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_road
 		};
 		initRqueset(url,param,3);
 	}
-	init_stationAll_rank("statistics/score/manage/tollgate/info",month+"",select_road);
+	init_stationAll_rank("statistics/score/manage/tollgate/info",initDate+"",select_road);
 
 	/**
 	 * 初始化图四
 	 */
 	function init_people_rank_pre(url,mon,select_road){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			mth:mon,
 			"dept_id":select_road,
 			"queryType":1,
             "order_type":0
 		}
 		initRqueset(url,param,4);
 	}
-    init_people_rank_pre("statistics/stuff/score/info",month+'',select_road);
+    //init_people_rank_pre("statistics/stuff/score/info",initDate+'',select_road);
     
     /**
 	 * 初始化图五
 	 */
 	function init_people_rank_suf(url,mon,select_road){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			mth:mon,
 			"dept_id":select_road,
 			"queryType":1,
             "order_type":1
 		}
 		initRqueset(url,param,5);
 	}
-    init_people_rank_suf("statistics/stuff/score/info",month+'',select_road);
+    init_people_rank_suf("statistics/stuff/score/info",initDate+'',select_road);
 
 	/**
 	 * 初始化图六
 	 */
-    function init_server_check_type(url,mon,select_road){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_server_check_type(url,mon,select_road){
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_road,
 			"queryType":1
 		};
 		initRqueset(url,param,6);
 	}
-	init_server_check_type("statistics/lost/itemscore/rate",month+"",select_road);
+	init_server_check_type("statistics/lost/itemscore/rate",initDate+"",select_road);
 
 	/**
 	 * 初始化图七
 	 */
     function init_each_people_points(url,mon,select_road){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"mth": mon,
+			"prev_mth": prev_mth,
 			"dept_id":select_road,
 			"queryType":1
 		};
 		initRqueset(url,param,7);
 	}
-	init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_road);
+	init_each_people_points("statistics/lost/twice/itemscore/rate",initDate+"",select_road);
 	/**
 	 * 请求
 	 * @param {*} url 
@@ -233,19 +218,18 @@ $(function(){
 	function data_array(data,type){
 		if(type == 1){
 			array_year_score.length = 0;
-			months.length = 0;
 		    if(data!='' && data.length!=0){
-				if(data.length<12){
-					for(var i=0;i<12-data.length;i++){
+				if(data.length<13){
+					for(var i=0;i<13-data.length;i++){
 						// 不足月份补0
 						array_year_score.push(0);
 					}
 					}		
 				for(var i=0;i<data.length;i++){
-					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-						// 指定位置插入值
-						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+					if(months.indexOf(data[i].mth.substr(2))){
+							// 指定位置插入值
+							array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
+							(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 					}
 				}
 			}else{
@@ -352,7 +336,8 @@ $(function(){
 				if(Tmth.length > 0){
 					for(var j= 0; j< Tmth.length;j++){
 						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
-							Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
+							// Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
+							Ttemp[i] =Tmth[j].all_check_score;
 							break;
 						}else{
 							Ttemp[i] = 0;
@@ -364,7 +349,8 @@ $(function(){
 				if(Pmth.length > 0){
 					for(var m= 0; m< Pmth.length;m++){
 						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
-							Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
+							// Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
+							Ptemp[i] =Pmth[m].all_check_score;
 							break;
 						}else{
 							Ptemp[i] = 0;
@@ -458,6 +444,20 @@ $(function(){
 					tooltip : {
 						trigger: 'axis'
 					},
+					noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+              	    },
 					legend: {
 						data:['平均分']
 					},
@@ -469,7 +469,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : months
 						}
 					],
 					yAxis : [
@@ -515,6 +515,20 @@ $(function(){
 					trigger: 'item',
 					formatter:  "道管中心考核扣分占比 <br/>{b} : {c}人 ({d}%)"
 				},
+				noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 				toolbox: {
 					show : true,
 					feature : {
@@ -566,6 +580,20 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 				grid:{
                     width:"80%",	
                 },
@@ -617,6 +645,20 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 				grid:{
                     width:"80%",	
                 },
@@ -681,8 +723,22 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 				grid:{
-                    width:"80%",	
+                    width:"88%",	
                 },
 				legend: {
 					data:['平均分']
@@ -744,6 +800,20 @@ $(function(){
 					trigger: 'item',
 					formatter:  "温馨服务检查占比 <br/>{b} : {c}分 ({d}%)"
 				},
+				noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 				toolbox: {
 					show : true,
 					feature : {
@@ -793,6 +863,20 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			noDataLoadingOption :{
+                    text: '暂无数据',
+                    effect:'bubble',
+                    effectOption : {
+                        effect: {
+                            n: 0 //气泡个数为0 
+                        }
+                    },
+                    textStyle: {
+                        fontSize: 20,
+						fontFamily:'cursive',
+                        fontWeight: 'bold'
+                    }
+                },
 			grid:{
                     width:"80%"
                 },

+ 154 - 70
VisualInspection/js/statistics/toll_station_statistics.js

@@ -1,8 +1,6 @@
      	var year = new Date().getFullYear();
 		var month = new Date().getMonth();
 		var date = new Date().getDate();
-		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 		var select_road = $(".div-roadManage select").val();
 		var select_station = $("#second").val();
 		var array_year_score = new Array();
@@ -31,9 +29,13 @@
 		var flag = true;
 		var change_echart = 2;
 $(function(){     
+    // 公用方法,根据当前年月动态将13个月push数组
+	month_method();
+	// 公用方法,月份下拉框
+    select_option();
+	// 回显当前年月份
+	$(".div-month select").val(initDate);
 	setSecond();
-    // 显示当前月份
-	$(".div-month select").val(month);
 
 	$(".div-button button").click(function(){	
 		var select_month = $(".div-month select").val();
@@ -68,8 +70,8 @@ $(function(){
 	 */
 	function init_tollStation_year_assess(url,select_station){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
 			"dept_id":select_station,
 			"queryType":2
 		}
@@ -81,11 +83,8 @@ $(function(){
 	 * 初始化图二
 	 */
 	function init_company_points_assess(url,mon,select_station){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			mth:mon,
 			"dept_id":select_station,
 			"queryType":2
 		}
@@ -96,23 +95,21 @@ $(function(){
 	 * 初始化图三 前5名
 	 */
 	function init_progress_rank_assess(url,mon,select_station){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
+			"mth": mon,
 			"dept_id":select_station,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"prev_mth": prev_mth,
 			"order_type":0
 		};
 		initRqueset(url,param,3);
@@ -122,11 +119,8 @@ $(function(){
 	 * 初始化图四
 	 */
 	function init_people_score_rank(url,mon,select_station){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_station,
 			"queryType":2,
             "order_type":1
@@ -137,12 +131,9 @@ $(function(){
 	/**
 	 * 初始化图五
 	 */
-    function init_server_check_type(url,mon,select_station){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_server_check_type(url,mon,select_station){	
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_station,
 			"queryType":2
 		};
@@ -154,22 +145,20 @@ $(function(){
 	 * 初始化图六
 	 */
     function init_each_people_points(url,mon,select_station){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"mth":mon,
+			"prev_mth": prev_mth,
 			"dept_id":select_station,
 			"queryType":2
 		};
@@ -180,23 +169,21 @@ $(function(){
 	 * 图切换后5名
 	 */
 	function init_backward_rank_assess(url,mon,select_station){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
+			"mth":mon,
 			"dept_id":select_station,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"prev_mth": prev_mth,
 			"order_type":1
 		};
 		initRqueset(url,param,7);
@@ -222,7 +209,6 @@ $(function(){
 				// 画图
 				rank_assess.setOption(progress_rank_assess());
 			}else if(type == 4){
-				console.log(array_score_order+"hello"+array_score_data);
 				// 画图
 				score_rank.setOption(people_score_rank());
 			}else if(type == 5){
@@ -248,19 +234,18 @@ $(function(){
 	function data_array(data,type){
 		if(type == 1){
 			array_year_score.length = 0;
-			months.length = 0;
 			if(data!='' && data.length!=0){
-				if(data.length<12){
-					for(var i=0;i<12-data.length;i++){
+				if(data.length<13){
+					for(var i=0;i<13-data.length;i++){
 						// 不足月份补0
 						array_year_score.push(0);
 					}
 				}		
 			for(var i=0;i<data.length;i++){
-				if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-					// 指定位置插入值
-					array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-					(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+				if(months.indexOf(data[i].mth.substr(2))){
+						// 指定位置插入值
+						array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
+						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}
 			}
 			}else{
@@ -325,7 +310,6 @@ $(function(){
 					rank[i] = i +1;
 				}				
 			}
-			//console.log(rank);
 			for(var i=0;i<array_score_data.length;i++){
 				array_score_order.push(data[i].user.truename +"\n"+ (rank[i]));
 			}
@@ -389,7 +373,8 @@ $(function(){
 				if(Tmth.length > 0){
 					for(var j= 0; j< Tmth.length;j++){
 						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
-							Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
+							// Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
+							 Ttemp[i] =Tmth[j].all_check_score;
 							break;
 						}else{
 							Ttemp[i] = 0;
@@ -401,7 +386,8 @@ $(function(){
 				if(Pmth.length > 0){
 					for(var m= 0; m< Pmth.length;m++){
 						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
-							Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
+							// Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
+							Ptemp[i] =Pmth[m].all_check_score;
 							break;
 						}else{
 							Ptemp[i] = 0;
@@ -593,6 +579,20 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			},
 			legend: {
 				data:['平均分']
 			},
@@ -604,7 +604,7 @@ $(function(){
 				{
 					type : 'category',
 					boundaryGap : false,
-					data : monthsCH
+					data : months
 				}
 			],
 			yAxis : [
@@ -650,6 +650,20 @@ $(function(){
 				trigger: 'item',
 				formatter:  "收费站考核扣分占比 <br/>{b} : {c}人 ({d}%)"
 			},
+			noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			},
 			toolbox: {
 				show : true,
 				feature : {
@@ -701,6 +715,20 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			},
 			grid:{
 				width:"80%"
 			},
@@ -749,6 +777,20 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			},
 			grid:{
 				width:"80%"
 			},
@@ -798,6 +840,20 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			},
 			grid:{
 				width:"88%"
 			},
@@ -856,6 +912,20 @@ $(function(){
 				trigger: 'item',
 				formatter:  "温馨服务检查占比 <br/>{b} : {c}分 ({d}%)"
 			},
+			noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			},
 			toolbox: {
 				show : true,
 				feature : {
@@ -905,6 +975,20 @@ $(function(){
 		tooltip : {
 			trigger: 'axis'
 		},
+		noDataLoadingOption :{
+			text: '暂无数据',
+			effect:'bubble',
+			effectOption : {
+				effect: {
+					n: 0 //气泡个数为0 
+				}
+			},
+			textStyle: {
+				fontSize: 20,
+				fontFamily:'cursive',
+				fontWeight: 'bold'
+			}
+		},
 		grid:{
 				width:"80%"
 			},

+ 126 - 54
VisualInspection/js/statistics/total_company_statistics.js

@@ -1,9 +1,6 @@
 		var year = new Date().getFullYear();
-		var month = new Date().getMonth();
 		var date = new Date().getDate();
 		var array_year_score = new Array();
-		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 		var array_points = new Array();
 		var array_road = new Array();
 		var array_road_score = new Array();
@@ -25,8 +22,12 @@
 		var min_allStation;
 		var score_ranking = new Array();
 $(function(){
-	// 显示当前月份
-	$(".div-month select").val(month);
+    // 公用方法,根据当前年月动态将13个月push数组
+	month_method();
+	// 公用方法,月份下拉框
+    select_option();
+	// 回显当前年月份
+	$(".div-month select").val(initDate);
 
 	$(".query-company").click(function(){	
 		var select_month = $(".div-month select").val();
@@ -52,8 +53,8 @@ $(function(){
 	 */
 	function init_company_year_assess(){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00"
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00"
 		}
 		initRqueset("statistics/score/year/info",param,1);
 
@@ -63,86 +64,72 @@ $(function(){
 	 * 初始化图二
 	 */
 	function init_company_points_assess(url,mon){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"queryType":0
 		}
 		initRqueset(url,param,2);
 	}
-    init_company_points_assess("statistics/lost/score/rate",month+"");
+    init_company_points_assess("statistics/lost/score/rate",initDate+"");
 
 
 	/**
 	 * 初始化图三
 	 */
-    function init_road_manager_score_rank_three(url,mon){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_road_manager_score_rank_three(url,mon){	
 		var param = {
-			"mth":year + "/" +mon
+			"mth":mon
 		};
 		initRqueset(url,param,3);
 	}
-	init_road_manager_score_rank_three("statistics/score/center/manage/info",month+"");
+	init_road_manager_score_rank_three("statistics/score/center/manage/info",initDate+"");
 
 	/**
 	 * 初始化图四
 	 */
-    function init_stationAll_rank_four(url,mon){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_stationAll_rank_four(url,mon){	
 		var param = {
-			"mth":year + "/" +mon
+			"mth":mon
 		};
 		initRqueset(url,param,4);
 	}
-	init_stationAll_rank_four("statistics/score/tollgate/info",month+"");
+	init_stationAll_rank_four("statistics/score/tollgate/info",initDate+"");
 
 	/**
 	 * 初始化图五
 	 */
     function init_server_check_type_five(url,mon){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"queryType":0
 		};
 		initRqueset(url,param,5);
 	}
-	init_server_check_type_five("statistics/lost/itemscore/rate",month+"");
+	init_server_check_type_five("statistics/lost/itemscore/rate",initDate+"");
 
 	/**
 	 * 初始化图六
 	 */
     function init_each_people_points_six(url,mon){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"mth": mon,
+			"prev_mth": prev_mth,
 			"queryType":0
 		};
 		initRqueset(url,param,6);
 	}
-	init_each_people_points_six("statistics/lost/twice/itemscore/rate",month+"");
+	init_each_people_points_six("statistics/lost/twice/itemscore/rate",initDate+"");
     
 	/**
 	 * 请求
@@ -186,19 +173,18 @@ $(function(){
 	function data_array(data,type){
 		if(type == 1){
 			array_year_score.length = 0;
-			months.length = 0;
 			if(data!='' && data.length!=0){
-			if(data.length<12){
-				for(var i=0;i<12-data.length;i++){
+			if(data.length<13){
+				for(var i=0;i<13-data.length;i++){
 					// 不足月份补0
 					array_year_score.push(0);
 				}
 			}		
 				for(var i=0;i<data.length;i++){
-					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-						// 指定位置插入值
-						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+					if(months.indexOf(data[i].mth.substr(2))){
+							// 指定位置插入值
+							array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
+							(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 					}
 				}
 			}else{
@@ -303,7 +289,8 @@ $(function(){
 				if(Tmth.length > 0){
 					for(var j= 0; j< Tmth.length;j++){
 						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
-							Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
+					//		Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
+							Ttemp[i] = Tmth[j].all_check_score;
 							break;
 						}else{
 							Ttemp[i] = 0;
@@ -315,7 +302,8 @@ $(function(){
 				if(Pmth.length > 0){
 					for(var m= 0; m< Pmth.length;m++){
 						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
-							Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
+						//	Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
+							Ptemp[i] =Pmth[m].all_check_score;
 							break;
 						}else{
 							Ptemp[i] = 0;
@@ -359,7 +347,7 @@ $(function(){
 			return ((num/num1)/num2).toFixed(2);
 		}
 	}
-	
+
 	/**
 	 * 图配置
 	 */
@@ -404,6 +392,20 @@ $(function(){
 					tooltip : {
 						trigger: 'axis'
 					},
+					noDataLoadingOption :{
+					text: '暂无数据',
+					effect:'bubble',
+					effectOption : {
+						effect: {
+							n: 0 //气泡个数为0 
+						}
+					},
+					textStyle: {
+						fontSize: 20,
+						fontFamily:'cursive',
+						fontWeight: 'bold'
+					}
+					},
 					legend: {
 						data:['平均分']
 					},
@@ -415,7 +417,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : monthsCH
+							data : months
 						}
 					],
 					yAxis : [
@@ -461,6 +463,20 @@ $(function(){
 					trigger: 'item',
 					formatter:  "公司考核扣分占比 <br/>{b} : {c}人 ({d}%)"
 				},
+				noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				toolbox: {
 					show : true,
 					feature : {
@@ -512,6 +528,20 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				grid:{
                     width:"80%",
 					
@@ -567,6 +597,20 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			    },
 				legend: {
 					data:['平均分']
 				},
@@ -621,6 +665,20 @@ $(function(){
 					trigger: 'item',
 					formatter:  "温馨服务检查占比 <br/>{b} : {c}分 ({d}%)"
 				},
+				noDataLoadingOption :{
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				toolbox: {
 					show : true,
 					feature : {
@@ -670,6 +728,20 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			noDataLoadingOption :{
+			text: '暂无数据',
+			effect:'bubble',
+			effectOption : {
+				effect: {
+					n: 0 //气泡个数为0 
+				}
+			},
+			textStyle: {
+				fontSize: 20,
+				fontFamily:'cursive',
+				fontWeight: 'bold'
+			}
+		    },
 			grid:{
                     width:"80%",	
                 },

+ 15 - 8
VisualInspection/js/teamClass/charge_team_schedule.js

@@ -37,15 +37,22 @@
             }
             getTeamClass(datap,function(data){
                 var newEvents = [];
+                
+                console.log(data);
 
-                // console.log(data);
                 for(var i=0;i<data.length;i++){
-                    var obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: data[i].end_time, end: data[i].end_time};//都以开始时间的日期为准
+                    var obj = '' ;
+                    if(data[i].class_type == 1){
+                        obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type) , start: data[i].end_time+":02", end: data[i].end_time+":03"};
+                    }else if(data[i].class_type == 2){
+                        obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type) , start: data[i].end_time+":01", end: data[i].end_time+":02"};
+                    }else{
+                        obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type) , start: data[i].end_time+":03", end: data[i].end_time+":04"};
+                    }
                     newEvents.push(obj);
                 }
-
-                 // 这里轮训给每天都增加一个事件
                
+                 // 这里轮训给每天都增加一个事件
                 var date = getMonthByCondition(date_cursor,'first');//new Date();
                 var end_date = getMonthByCondition(date_cursor,'last');//new Date(getCurrentMonthLast2()) ;
                 if(data_param != undefined){
@@ -53,15 +60,12 @@
                     end_date = new Date(data_param.end_time) ;
                 }
 
-
                 for(var i =0;i<31;i++){
                     if( date.setDate(i+1) < end_date ){
-                        var obj =  {id:-1 ,desc:'详细排班' ,title: '+详细排班',  start:date.Format('yyyy-MM-dd'), end: date.Format('yyyy-MM-dd'),color:'#bd7b46'};
+                        var obj =  {id:-1 ,desc:'详细排班' ,title: '+详细排班',  start:date.Format('yyyy-MM-dd 00:00:05'), end: date.Format('yyyy-MM-dd 00:00:06'),color:'#bd7b46'};
                         newEvents.push(obj);
                     }
                 }
-
-              
                 calendar.addEvents(newEvents);
             })
         }
@@ -458,6 +462,7 @@
                             $(".tr-"+ct).append("<td vertical-align='middle' align='center' style='width:100px;'><span style='font-weight:bold;'>"+ classCode[ct].class_name +"<br></span><span>"+classCode[ct].start_time+"</span> - <span>"+classCode[ct].end_time +"</span></td>");
                             var selectv = "<select class='form-control select-self' style='width:78px;'>"
                             selectv += ("<option value=''>请选择</option>");
+                             selectv += ("<option value='0'>临时开道</option>");
                             for(var j=0;j<data[i].users.length;j++){
                                     var obj = data[i].users[j];
                                     selectv += ("<option value='"+data[i].users[j].id+"'>"+ data[i].users[j].truename  +"</option>");
@@ -708,4 +713,6 @@
        $(".modal-title").html("添加班组-"+title);
    }
 
+   
+
    

+ 5 - 5
VisualInspection/view/statistics/appeal.html

@@ -52,11 +52,11 @@
                   <thead>
                     <tr>
                         <th  width="80px">序号</th>
-                        <th  width="120px">站名</th>
-                        <th  width="120px">申诉次数</th>
-                        <th>申诉成功(次数)<br> (已修改考核结果) </th>
-                        <th>申诉失败(次数)<br> (维持原稽查结果)</th>
-                        <th>其他情况(次数)<br>(更换被考核人等)</th>
+                        <th  width="160px">站名</th>
+                        <th  width="160px">申诉次数</th>
+                        <th>申诉成功(次数) </th>
+                        <th>申诉失败(次数)</th>
+                        <!--<th>其他情况(次数)</th>-->
                     </tr>
                   </thead>
                   <tbody class="table-tbody" style="background:white" align="center" height="500px">

+ 6 - 2
VisualInspection/view/statistics/check_workload_statistics.html

@@ -11,6 +11,10 @@
             <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
             <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
+            <div class="div-select" style="margin-left:25px;"><select class="score-select">
+                    <option value="">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
+                </select>
+            </div>
             <div class="query div-button"><button>查询</button></div>
 
             <div style="margin-right:30px;float:right;" class="div-button"><button id="export-check-info">导出</button></div>
@@ -19,8 +23,8 @@
 
     <div class="row-3">
        <table class="table table-bordered" style="text-align:center;">
-           <tr><td>总稽查人数</td><td>总稽查任务数</td><td>总稽查时长</td><td>考核人员数量</td><td>总扣分数</td><td>平均人次扣分数</td></tr>
-           <tr><td class="all_check_personal"></td><td class="all_check_task"></td><td class="all_check_minute"></td>
+           <tr><td>总稽查人数</td><td>总稽查任务数</td><td>总稽查时长</td><td>稽查扣分次数</td><td>考核人员数量</td><td>总扣分数</td><td>平均人次扣分数</td></tr>
+           <tr><td class="all_check_personal"></td><td class="all_check_task"></td><td class="all_check_minute"></td><td class="checked_num"></td>
                <td class="all_checkman"></td><td class="all_check_score"></td><td class="check_score_avg"></td></tr>
        </table>
     </div>

+ 11 - 2
VisualInspection/view/statistics/emp_ranking.html

@@ -36,9 +36,18 @@
             </div>
             <div class="form-group">
                 <label for="exampleInputAccount1" class="col-sm-1">考核次数</label>
-                <div class="col-sm-2" style="width:150px;">
-                    <input type="text" id="check_count" class="form-control" value="">
+
+                <div class="col-sm-3" style="width:60px;">
+                    <input type="text" id="start-num" class="form-control form-date" style="width:60px;" value="0">
                 </div>
+                <div class="to-score" style="float:left;margin-left:20px;padding-top: 6px;"><label> - </label></div>
+                <div class="col-sm-4" style="width:60px;margin-left:10px;">
+                    <input type="text" id="end-num" class="form-control form-date" style="width:60px;" value="10">
+                </div>
+
+                <!--<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-1">职位</label>
                 <div class="col-sm-2" style="width:150px;">
                     <select class="form-control" id="jobSelect">

+ 5 - 0
VisualInspection/view/statistics/personal_data_statistics.html

@@ -1,4 +1,5 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/personal_data_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/personal_data_statistics.css">
 <div class="container-right">
@@ -14,6 +15,10 @@
             <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
             <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
+            <div class="div-select"><select class="score-select">
+                    <option value="">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
+                </select>
+            </div>
             <div class="query div-button"><button>查询</button></div>
             <!--<div class="export div-button"><button>导出</button></div>-->
         </div>

+ 15 - 5
VisualInspection/view/statistics/road_manage_statistics.html

@@ -1,4 +1,5 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/road_manage_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/road_manage_statistics.css">
 <div class="container-right">
@@ -7,7 +8,7 @@
     <div class="row-2">
         <div>
             <div class="div-month"><select>
-                <option value="1">一月</option>
+                <!--<option value="1">一月</option>
                 <option value="2">二月</option>
                 <option value="3">三月</option>
                 <option value="4">四月</option>
@@ -18,7 +19,7 @@
                 <option value="9">九月</option>
                 <option value="10">十月</option>
                 <option value="11">十一月</option>
-                <option value="12">十二月</option>
+                <option value="12">十二月</option>-->
                 </select></div>
         <div class="div-roadManage"><select>
             <option value="30">连云港</option>
@@ -46,7 +47,7 @@
     </div>
     </div>
 
-  <div class="border-line">
+  <div class="border-line" style="display:none;">
     <div class="row-7">
         <div class="col-1"><span>人员考核得分前十名</span></div><div class="line-2"></div>
         <div class="col-1"><span>人员考核得分后十名</span></div>
@@ -54,14 +55,19 @@
     <div class="row-8">
         <div id="people-rank-pre" style="width:49%;height:400px;float:left;"></div>
         <div class="line-3"></div>
-        <div id="people-rank-suf" style="width:49%;height:400px;float:left;"></div>
+        <!--<div id="people-rank-suf" style="width:49%;height:400px;float:left;"></div>-->
     </div>
   </div>
 
   <div class="border-line">
+    <div class="row-3"><div><span>人员考核得分后20名</span></div></div>
+    <div id="people-rank-suf" style="height: 100%;height:400px;"></div>
+    </div>
+
+  <div class="border-line">
     <div class="row-7">
         <div class="col-1"><span>温馨服务检查问题类别占比</span></div><div class="line-2"></div>
-        <div class="col-1"><span>各个问题类别的人均扣分情况</span></div>
+        <div class="col-1"><span>各个问题类别的扣分情况</span></div>
     </div>
     <div class="row-8">
         <div id="server-check-type" style="width:49%;height:400px;float:left;"></div>
@@ -71,6 +77,10 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
 
        

+ 10 - 5
VisualInspection/view/statistics/toll_station_statistics.html

@@ -1,12 +1,13 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/toll_station_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/toll_station_statistics.css">
 <div class="container-right">
     <!--<div class="row-1"><span>收费站统计</span></div>
     <div class="line-1"></div>-->
     <div class="row-2">
-        <div><div class="div-month"><select>
-            <option value="1">一月</option>
+        <div class="div-month"><select>
+                <!--<option value="1">一月</option>
                 <option value="2">二月</option>
                 <option value="3">三月</option>
                 <option value="4">四月</option>
@@ -17,8 +18,8 @@
                 <option value="9">九月</option>
                 <option value="10">十月</option>
                 <option value="11">十一月</option>
-                <option value="12">十二月</option>
-            </select></div>
+                <option value="12">十二月</option>-->
+                </select></div>
         <div class="div-roadManage"><select id="first">
             <option value="30">连云港</option>
             <option value="31">盐城</option>
@@ -57,7 +58,7 @@
   <div class="border-line">
     <div class="row-7">
         <div class="col-1"><span>温馨服务检查问题类别占比</span></div><div class="line-2"></div>
-        <div class="col-1"><span>各个问题类别的人均扣分情况</span></div>
+        <div class="col-1"><span>各个问题类别的扣分情况</span></div>
     </div>
     <div class="row-8">
         <div id="server-check-type" style="width:49%;height:400px;float:left;"></div>
@@ -67,5 +68,9 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
        

+ 8 - 3
VisualInspection/view/statistics/total_company_statistics.html

@@ -1,4 +1,5 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/total_company_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/total_company_statistics.css">
 <div class="container-right">
@@ -7,7 +8,7 @@
     <div class="row-2">
         <div>
             <div class="div-month"><select>
-                <option value="1">一月</option>
+                <!--<option value="1">一月</option>
                 <option value="2">二月</option>
                 <option value="3">三月</option>
                 <option value="4">四月</option>
@@ -18,7 +19,7 @@
                 <option value="9">九月</option>
                 <option value="10">十月</option>
                 <option value="11">十一月</option>
-                <option value="12">十二月</option>
+                <option value="12">十二月</option>-->
                 </select></div>
             <div class="div-button"><button class="query-company">查询</button></div>
         </div>
@@ -51,7 +52,7 @@
   <div class="border-line">
     <div class="row-7">
         <div class="col-1"><span>温馨服务检查问题类别占比</span></div><div class="line-2"></div>
-        <div class="col-1"><span>各个问题类别的人均扣分情况</span></div>
+        <div class="col-1"><span>各个问题类别的扣分情况</span></div>
     </div>
     <div class="row-8">
         <div id="server-check-type" style="width:49%;height:400px;float:left;"></div>
@@ -61,6 +62,10 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
 
        

+ 9 - 0
VisualInspection/view/term_management/charge_stuff_schedule.html

@@ -178,5 +178,14 @@
 <script>
     $(document).ready(function() {
         initChargeTeamSchedule();
+
+        /**
+         * 变手 和添加排班
+         */
+        $(document).delegate(".cell-day.current-month","mouseenter",function(){
+            $(this).css("cursor","pointer");
+            $(this).attr("title","添加排班");
+        })
+
     })
 </script>

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckmanStatisticsBean.java

@@ -29,6 +29,9 @@ public class CheckmanStatisticsBean {
     
     private Integer all_checked_num;
     
+    // 扣分次数
+    private Integer checked_num ;
+    
     //开始日期
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  

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

@@ -38,6 +38,8 @@ public class StatisticsBean {
     
     private String name ;
     
+    private String parent_name ;
+    
     private int score;
     
     private Integer item_id ;
@@ -119,6 +121,8 @@ public class StatisticsBean {
     
     private List<Integer> position_ids;
     
+    private Integer score_flag  ;
+    
     // 比较大小 1 小 , -1 大
     public int compareTo(StatisticsBean o2){
     	if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){

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

@@ -284,10 +284,10 @@
      </select>
      
      <select id="selectOneCheckedDetailInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
-     	SELECT t.name AS check_task_name , t.start_time AS start_date , t.end_time AS end_date,cs.check_item_score AS score , ci.name AS name, cs.pics ,t.checkman AS checkman_id,
+     	SELECT t.name AS check_task_name , t.start_time AS start_date , t.end_time AS end_date,cs.check_item_score AS score , ci.name AS name,ci.parent_name, cs.pics ,t.checkman AS checkman_id,
      	t.checked_person AS user_id ,t.checked_dept AS dept_id FROM check_task t 
-     		INNER JOIN check_score cs ON t.id = cs.task_id 
-     		LEFT JOIN check_item ci ON ci.id = cs.check_item_id  
+     		LEFT JOIN check_score cs ON t.id = cs.task_id 
+     		LEFT JOIN (SELECT ci.* ,cp.name AS parent_name FROM check_item  ci LEFT JOIN check_item cp ON ci.parent_id = cp.id) ci ON ci.id = cs.check_item_id  
      		where   t.check_status !=22
      		<if test="queryType!=null and queryType==0">
      			AND   t.checked_person = #{user_id}
@@ -304,12 +304,19 @@
 			<if test="end_date !=null and queryType == 0">
 				AND t.end_time &lt;= #{end_date}
 			</if>
+			<if test="score_flag!=null and score_flag == 1">
+				AND cs.check_item_score IS NOT NULL  
+			</if>
+			<if test="score_flag!=null and score_flag == 0">
+				AND cs.check_item_score IS  NULL  
+			</if>
      </select>
      
       <select id="selectCheckManInfo" parameterType="com.xintong.visualinspection.bean.CheckmanStatisticsBean" resultType="com.xintong.visualinspection.bean.CheckmanStatisticsBean">
     	SELECT
 			COUNT(1) AS all_checkman,
 			COUNT(1) AS all_task_num,
+			COUNT(cs.check_item_score) AS checked_num ,
 			sum(
 				TIMESTAMPDIFF(MINUTE, t.start_time,t.end_time)
 			) AS all_check_minute,

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

@@ -68,7 +68,7 @@
         <if test="dept_id != null">AND t.dept_id = #{dept_id}</if>
         <if test="start_time != null">AND t.work_date &gt;= #{start_time}</if>
         <if test="end_time != null">AND t.work_date &lt;= #{end_time}</if>
-        ORDER BY t.class_type asc,t.work_date ASC) tc WHERE tc.type =#{type}
+       ) tc WHERE tc.type =#{type}  ORDER BY tc.work_date ASC, tc.start_time ASC
     </select>
 
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.TeamClass" >

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

@@ -886,7 +886,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			// 道管 正序 前10
 			return lists.subList(0, 10);
 		}else if(obj.getQueryType()==1 && obj.getOrder_type() ==1){
-			return lists.subList(lists.size()-10, lists.size());
+			return lists.subList(lists.size()-20, lists.size());
 		}
 		
 		return lists;

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