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

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

wenhongquan 8 лет назад
Родитель
Сommit
3c5723fbf6
18 измененных файлов с 353 добавлено и 283 удалено
  1. 15 13
      VisualInspection/js/statistics/assess_ranking.js
  2. 11 3
      VisualInspection/js/statistics/check_workload_statistics.js
  3. 45 0
      VisualInspection/js/statistics/common_statistic.js
  4. 5 2
      VisualInspection/js/statistics/personal_data_statistics.js
  5. 39 55
      VisualInspection/js/statistics/road_manage_statistics.js
  6. 52 66
      VisualInspection/js/statistics/toll_station_statistics.js
  7. 114 128
      VisualInspection/js/statistics/total_company_statistics.js
  8. 6 2
      VisualInspection/view/statistics/check_workload_statistics.html
  9. 11 2
      VisualInspection/view/statistics/emp_ranking.html
  10. 5 0
      VisualInspection/view/statistics/personal_data_statistics.html
  11. 7 2
      VisualInspection/view/statistics/road_manage_statistics.html
  12. 9 4
      VisualInspection/view/statistics/toll_station_statistics.html
  13. 7 2
      VisualInspection/view/statistics/total_company_statistics.html
  14. 9 0
      VisualInspection/view/term_management/charge_stuff_schedule.html
  15. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckmanStatisticsBean.java
  16. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  17. 10 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  18. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamClassMapper.xml

+ 15 - 13
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>"
@@ -516,23 +521,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 "" ;

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

@@ -134,4 +134,49 @@ 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);
 }

+ 5 - 2
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 
@@ -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);
 	}

+ 39 - 55
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();
@@ -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()+"-"+date+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 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{
@@ -485,7 +469,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : months
 						}
 					],
 					yAxis : [

+ 52 - 66
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()+"-"+date+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 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);
@@ -248,19 +235,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{
@@ -620,7 +606,7 @@ $(function(){
 				{
 					type : 'category',
 					boundaryGap : false,
-					data : monthsCH
+					data : months
 				}
 			],
 			yAxis : [

+ 114 - 128
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()+"-"+date+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 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{
@@ -407,19 +393,19 @@ $(function(){
 						trigger: 'axis'
 					},
 					noDataLoadingOption :{
-						text: '暂无数据',
-						effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
+					text: '暂无数据',
+					effect:'bubble',
+					effectOption : {
+						effect: {
+							n: 0 //气泡个数为0 
+						}
+					},
+					textStyle: {
+						fontSize: 20,
 						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                    },
+						fontWeight: 'bold'
+					}
+					},
 					legend: {
 						data:['平均分']
 					},
@@ -431,7 +417,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : monthsCH
+							data : months
 						}
 					],
 					yAxis : [
@@ -478,19 +464,19 @@ $(function(){
 					formatter:  "公司考核扣分占比 <br/>{b} : {c}人 ({d}%)"
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				toolbox: {
 					show : true,
 					feature : {
@@ -543,19 +529,19 @@ $(function(){
 					trigger: 'axis'
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				grid:{
                     width:"80%",
 					
@@ -612,19 +598,19 @@ $(function(){
 					trigger: 'axis'
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			    },
 				legend: {
 					data:['平均分']
 				},
@@ -680,19 +666,19 @@ $(function(){
 					formatter:  "温馨服务检查占比 <br/>{b} : {c}分 ({d}%)"
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				toolbox: {
 					show : true,
 					feature : {
@@ -743,19 +729,19 @@ $(function(){
 				trigger: 'axis'
 			},
 			noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+			text: '暂无数据',
+			effect:'bubble',
+			effectOption : {
+				effect: {
+					n: 0 //气泡个数为0 
+				}
+			},
+			textStyle: {
+				fontSize: 20,
+				fontFamily:'cursive',
+				fontWeight: 'bold'
+			}
+		    },
 			grid:{
                     width:"80%",	
                 },

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

+ 7 - 2
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>
@@ -76,6 +77,10 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
 
        

+ 9 - 4
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>
@@ -67,5 +68,9 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
        

+ 7 - 2
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>
@@ -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" >