温红权 8 лет назад
Родитель
Сommit
56d8d32cff

+ 183 - 141
VisualInspection/css/statistics/personal_data_statistics.css

@@ -1,247 +1,289 @@
-.container-right{
-    width:98%;
+.container-right {
+    width: 98%;
     padding-bottom: 0px;
-    margin:15px auto;
-    border:1px solid #d9d9d9;
+    margin: 15px auto;
+    border: 1px solid #d9d9d9;
     font-family: '宋体';
     border-radius: 4px;
     font-size: 12px;
 }
-.row-1{
-    width:100%;
-    height:35px;
+
+.row-1 {
+    width: 100%;
+    height: 35px;
     background-color: #fff;
 }
-.row-2{
-    width:100%;
-    height:50px;
+
+.row-2 {
+    width: 100%;
+    height: 50px;
 }
-.row-3{
-    width:100%;
-    height:80px;
+
+.row-3 {
+    width: 100%;
+    height: 80px;
 }
-.col-1{
-    width:49%;
-    height:40px;
-    float:left;
+
+.col-1 {
+    width: 49%;
+    height: 40px;
+    float: left;
     line-height: 40px;
     text-align: center;
     font-weight: bold;
 }
-.row-1 span{
+
+.row-1 span {
     margin-left: 20px;
     line-height: 35px;
 }
-.line-1{
-    width:100%;
+
+.line-1 {
+    width: 100%;
     height: 1px;
     background-color: #d9d9d9;
 }
-.line-2{
-    width:1px;
-    height:40px;
+
+.line-2 {
+    width: 1px;
+    height: 40px;
     background-color: #d9d9d9;
-    float:left;
+    float: left;
 }
-.line-3{
-    width:1px;
-    height:400px;
+
+.line-3 {
+    width: 1px;
+    height: 400px;
+    background-color: #d9d9d9;
+    float: left;
+}
+
+.line-4,
+.line-5 {
+    width: 1px;
+    height: 80px;
     background-color: #d9d9d9;
-    float:left;
+    float: left;
 }
-.line-4,.line-5{
-    width:1px;
-    height:80px;
+
+.line-6 {
+    width: 79.8%;
+    height: 1px;
     background-color: #d9d9d9;
-    float:left;
-}
-.line-6{
-    width:79.8%;
-    height:1px;
-    background-color:#d9d9d9;
-    float:right;
-}
-.dept,.job{
-    width:10%;
-    height:80px;
-    float:left;
+    float: right;
+}
+
+.dept,
+.job {
+    width: 10%;
+    height: 80px;
+    float: left;
     text-align: center;
 }
-.current-month{
-    width:79.8%;
-    height:40px;
-    float:right;
+
+.current-month {
+    width: 79.8%;
+    height: 40px;
+    float: right;
     line-height: 40px;
 }
-.next-month{
-    width:79.8%;
-    height:40px;
-    float:right;
+
+.next-month {
+    width: 79.8%;
+    height: 40px;
+    float: right;
     line-height: 40px;
 }
-.name{
-    width:30px;
-    height:50px;
-    float:left;
+
+.name {
+    width: 30px;
+    height: 50px;
+    float: left;
     margin-left: 20px;
     line-height: 50px;
-}            
-.div-start{
-    width:120px;
-    height:50px;
-    float:left;
+}
+
+.div-start {
+    width: 120px;
+    height: 50px;
+    float: left;
     margin-left: 30px;
     line-height: 50px;
 }
-.div-to{
-    width:20px;
-    height:50px;
-    float:left;
+
+.div-to {
+    width: 20px;
+    height: 50px;
+    float: left;
     /*line-height: 50px;*/
 }
-.div-start input,.div-end input{
-    width:100px;
-    height:30px;
+
+.div-start input,
+.div-end input {
+    width: 100px;
+    height: 30px;
     border: 1px solid #ccc;
     font-size: 14px;
     padding: 5px 8px;
     border-radius: 4px;
 }
-.div-end{
-    width:120px;
-    height:50px;
-    float:left;
+
+.div-end {
+    width: 120px;
+    height: 50px;
+    float: left;
     margin-left: 5px;
     line-height: 50px;
 }
-.div-check{
-    width:160px;
-    height:50px;
-    float:left;
+
+.div-check {
+    width: 160px;
+    height: 50px;
+    float: left;
     margin-left: 10px;
     line-height: 50px;
     border-radius: 4px;
 }
-.div-check select{
-    width:160px;
-    height:30px;
+
+.div-check select {
+    width: 160px;
+    height: 30px;
     border: 1px solid #ccc;
     border-radius: 4px;
 }
-.div-select{
-    width:120px;
-    height:50px;
-    float:left;
+
+.div-select {
+    width: 120px;
+    height: 50px;
+    float: left;
     margin-left: 5px;
     line-height: 50px;
 }
-.div-select select{
-    width:120px; 
-    height:30px;
+
+.div-select select {
+    width: 120px;
+    height: 30px;
     border: 1px solid #ccc;
     border-radius: 4px;
 }
 
-.name1{
-    width:98px;
-    height:50px;
-    float:left;
+.name1 {
+    width: 98px;
+    height: 50px;
+    float: left;
     margin-left: 10px;
     line-height: 50px;
-} 
-.query{
-    width:80px;
-    height:50px;
-    float:left;
+}
+
+.query {
+    width: 80px;
+    height: 50px;
+    float: left;
     margin-left: 20px;
 }
-.export{
-    width:80px;
-    height:50px;
-    float:right;
+
+.export {
+    width: 80px;
+    height: 50px;
+    float: right;
     margin-right: 20px;
 }
 
-.div-button button{
-    width:80px;
-    height:30px;
+.div-button button {
+    width: 80px;
+    height: 30px;
     color: #fff;
     background-color: #3280fc;
     border-color: #1970fc;
-    border:1px solid transparent;
+    border: 1px solid transparent;
     border-radius: 4px;
     /*margin-top: 10px;*/
 }
-.row-7{
-    width:100%;
-    height:40px;
+
+.row-7 {
+    width: 100%;
+    height: 40px;
     background-color: #328dc7;
     color: white;
 }
 
-.row-8{
+.row-8 {
     height: 100%;
-    height:400px;
+    height: 400px;
     background-color: #fff;
-}.container-right{
-    width:98%;
+}
+
+.container-right {
+    width: 98%;
     padding-bottom: 0px;
-    margin:15px auto;
-    border:1px solid #d9d9d9;
+    margin: 15px auto;
+    border: 1px solid #d9d9d9;
     font-family: '宋体';
 }
-.row-1{
-    width:100%;
-    height:35px;
+
+.row-1 {
+    width: 100%;
+    height: 35px;
     background-color: #fff;
 }
 
-.row-1 span{
+.row-1 span {
     margin-left: 20px;
     line-height: 35px;
 }
-.line-1{
-    width:100%;
+
+.line-1 {
+    width: 100%;
     height: 1px;
     background-color: #d9d9d9;
 }
-.row-2{
-    width:100%;
-    height:50px;
+
+.row-2 {
+    width: 100%;
+    height: 50px;
 }
 
-.row-7{
-    width:100%;
-    height:40px;
+.row-7 {
+    width: 100%;
+    height: 40px;
 }
-.col-1{
-    width:49%;
-    height:40px;
-    float:left;
+
+.col-1 {
+    width: 49%;
+    height: 40px;
+    float: left;
     line-height: 40px;
     text-align: center;
     font-weight: bold;
 }
-.line-2{
-    width:1px;
-    height:40px;
+
+.line-2 {
+    width: 1px;
+    height: 40px;
     background-color: #d9d9d9;
-    float:left;
+    float: left;
 }
-.line-3{
-    width:1px;
-    height:400px;
+
+.line-3 {
+    width: 1px;
+    height: 400px;
     background-color: #328dc7;
-    float:left;
+    float: left;
 }
-.row-8{
+
+.row-8 {
     height: 100%;
-    height:400px;
+    height: 400px;
     background-color: #fff;
 }
-.border-line{
-    width:100%;
+
+.border-line {
+    width: 100%;
     height: 442px;
-    margin:15px auto;
-    border:1px solid #328dc7;
+    margin: 15px auto;
+    border: 1px solid #328dc7;
+}
+
+.s_d_name {
+    color: #3280fc
 }

+ 462 - 407
VisualInspection/js/statistics/personal_data_statistics.js

@@ -1,442 +1,497 @@
 var year = new Date().getFullYear();
-var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
+var months = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
+var monthsCH = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
 var array_year_score = new Array();
 var array_check_type = new Array();
-var user_id = 2424;      // 用户假数据
+var user_id = 2424; // 用户假数据
 var score_statistics;
 var check_type;
 var cur_status;
 var hide = false;
 // 默认初始化日期一个月
-$(".div-start input").val(new Date().getFullYear()+"-"+new Date().getMonth()+"-26");
-$(".div-end input").val(new Date().getFullYear()+"-"+(new Date().getMonth()+1)+"-25");
-var start_date = dateChange(new Date($(".div-start input").val()+" 00:00:00"),60*60*1000 ) ;
-var end_date = $(".div-end input").val()+" 23:00:00";
+$(".div-start input").val(new Date().getFullYear() + "-" + new Date().getMonth() + "-26");
+$(".div-end input").val(new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-25");
+var start_date = dateChange(new Date($(".div-start input").val() + " 00:00:00"), 60 * 60 * 1000);
+var end_date = $(".div-end input").val() + " 23:00:00";
 
 /**
  * 预加载方法
- */		
-$(function(){
-	setVisit();
-
-//*************************************数据表格******************************************
-	function initAppealPage(start_date,end_date,user_id) {
-		initQueryParams();
-		queryAppeal(start_date,end_date,user_id);
+ */
+$(function() {
+    setVisit();
+
+    //*************************************数据表格******************************************
+    function initAppealPage(start_date, end_date, user_id) {
+        initQueryParams();
+        queryAppeal(start_date, end_date, user_id);
+    }
+
+    function initQueryParams() {
+        //获取页面参数
+        var page_params = $.zui.store.get("page_params");
+        if (page_params && page_params.status) {
+            cur_status = page_params.status;
+        }
+    }
+
+    function queryAppeal(start_date, end_date, user_id) {
+
+        $("#station_name").html($("#select-dept").find("option:selected").text())
+        $("#station_user_name").html($("#select-personal").find("option:selected").text())
+
+
+        //请求数据
+        var data_t = {
+            "start_date": start_date,
+            "end_date": end_date,
+            "user_id": user_id
+        }
+        var url_t = "/statistics/employee/order/detail"
+        post_common_service(url_t, data_t, function(res) {
+
+            var isshow_c = false;
+            var isshow_l = false;
+            if (typeof(res.currentP) != undefined && res.currentP != null) {
+                var p = res.currentP;
+                $("#c_dept_ranking").html(p.fee_station_ranking);
+                $("#c_com_ranking").html(p.company_ranking);
+                $("#c_score_ranking").html(p.check_all_score + p.check_all_m_score);
+                isshow_c = true;
+            }
+            if (typeof(res.lastP) != undefined && res.lastP != null) {
+                var p = res.lastP;
+                $("#l_dept_ranking").html(p.fee_station_ranking);
+                $("#l_com_ranking").html(p.company_ranking);
+                $("#l_score_ranking").html(p.check_all_score + p.check_all_m_score);
+                isshow_l = true;
+            }
+
+            if (isshow_c && isshow_l) {
+                var p_c = res.currentP;
+                var p_l = res.lastP;
+                var dept_r = p_c.fee_station_ranking - p_l.fee_station_ranking;
+                if (dept_r != 0) {
+                    $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
+                }
+                var com_r = p_c.company_ranking - p_l.company_ranking;
+                if (com_r != 0) {
+                    $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
+                }
+
+
+
+            }
+
+
+
+
+
+
+        }, function(error) {
+
+        })
+
+
+
+        var data = {
+            "start_date": start_date,
+            "end_date": end_date,
+            "user_id": user_id,
+            "queryType": 0,
+            "score_flag": $(".score-select").val()
+        }
+        if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || hasRole(ROLE_JICHA) || roleContains('STATION')) {
+            hide = true;
+        }
+
+        var cols = [
+            { 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', nullvalue: '0' },
+            { 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' },
+        ];
+        if (cur_status == 12 || cur_status == 13) {
+            data.check_status_arr = [12, 13];
+        }
+        $('#personal_data_table').mytable({
+            'cols': cols,
+            'url': "/statistics/one/checkedItem/detail/info",
+            'param': data
+        });
     }
 
-	function initQueryParams() {
-		//获取页面参数
-		var page_params = $.zui.store.get("page_params");
-		if(page_params && page_params.status) {
-			cur_status = page_params.status;
-		}
-	}
-
-	function queryAppeal(start_date,end_date,user_id){
-
-		var data = {
-			"start_date":start_date,
-				"end_date":end_date,
-				"user_id":user_id,
-				"queryType":0,
-				"score_flag":$(".score-select").val()
-		}
-		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
-			hide = true;
-		}
-		
-		var cols = [
-					{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',nullvalue:'0'},
-					{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'},
-		];
-		if(cur_status==12 || cur_status==13){
-			data.check_status_arr = [12,13];
-		}
-		$('#personal_data_table').mytable({'cols':cols,
-								'url':"/statistics/one/checkedItem/detail/info",
-								'param':data}
-								);
-	}
-
-
-
-    
-
-//*************************************画图******************************************
-
-	// 加载图配置
-	echart();
-
-	$(".query button").click(function(){
+
+
+
+
+    //*************************************画图******************************************
+
+    // 加载图配置
+    echart();
+
+    $(".query button").click(function() {
         var user_id = $("#select-personal").val();
-		var start_date = dateChange(new Date($(".div-start input").val()+" 00:00:00"),60*60*1000 ) ;
-		var end_date = $(".div-end input").val()+" 23:00:00";
-		var startStr = start_date.replace(/-/g, '/');
-		var endStr = end_date.replace(/-/g, '/');
-		var start = new Date(startStr);
-		var end = new Date(endStr);
-		if(start>end){
-			tip("开始时间不能比结束时间大");
-			return;
-		}
-		if($("#select-personal").text()==''){
-             tip("请选择收费站");
-			 return;
-		}
-		// 查询图一
-		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);
-		// 表格
-	    initAppealPage(start_date,end_date,user_id);
-		// 加载图配置
-		echart();
-	});
+        var start_date = dateChange(new Date($(".div-start input").val() + " 00:00:00"), 60 * 60 * 1000);
+        var end_date = $(".div-end input").val() + " 23:00:00";
+        var startStr = start_date.replace(/-/g, '/');
+        var endStr = end_date.replace(/-/g, '/');
+        var start = new Date(startStr);
+        var end = new Date(endStr);
+        if (start > end) {
+            tip("开始时间不能比结束时间大");
+            return;
+        }
+        if ($("#select-personal").text() == '') {
+            tip("请选择收费站");
+            return;
+        }
+
+
+
+        // 查询图一
+        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);
+        // 表格
+        initAppealPage(start_date, end_date, user_id);
+        // 加载图配置
+        echart();
+    });
+
+    /**
+     * 初始化图一
+     * @param {*} url
+     * @param {*} dept_id
+     */
+    function init_personal_score_statistics(url, user_id) {
+        var param = {
+            "start_date": (year - 1) + "-" + new Date().getMonth() + "-25" + " 23:00:00",
+            "end_date": year + "-" + (new Date().getMonth() + 1) + "-25" + " 23:00:00",
+            "user_id": user_id
+        }
+        initRqueset(url, param, 1);
+    }
+
 
     /**
-	 * 初始化图一
-	 * @param {*} url 
-	 * @param {*} dept_id 
-	 */
-	function init_personal_score_statistics(url,user_id){
-		var param = {
-			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
-			"end_date":year+"-"+(new Date().getMonth()+1)+"-25"+" 23:00:00",
-			"user_id":user_id
-		}
-		initRqueset(url,param,1);
-	}
-	
+     * 初始化图二
+     * @param {*} url
+     * @param {*} dept_id
+     */
+    function init_personal_check_type(url, user_id, start_date, end_date) {
+        var param = {
+            "start_date": start_date,
+            "end_date": end_date,
+            "user_id": user_id
+        }
+        initRqueset(url, param, 2);
+    }
+
+
+    /**
+     * 请求
+     * @param {*} url
+     * @param {*} param
+     * @param {*} type
+     */
+    function initRqueset(url, param, type) {
+        post_common_service(url, param, function(data) {
+            data_array(data, type);
+            if (type == 1) {
+                // 画图
+                score_statistics.setOption(personal_score_statistics());
+            } else if (type == 2) {
+                // 画图
+                check_type.setOption(personal_check_type());
+            }
+        }, function(error) {
+            return "";
+        });
+    }
 
     /**
-	 * 初始化图二
-	 * @param {*} url 
-	 * @param {*} dept_id 
-	 */
-	function init_personal_check_type(url,user_id,start_date,end_date){
-		var param = {
-			"start_date":start_date,
-			"end_date":end_date,
-			"user_id":user_id
-		}
-		initRqueset(url,param,2);
-	}
-	
-    
-	/**
-	 * 请求
-	 * @param {*} url 
-	 * @param {*} param 
-	 * @param {*} type 
-	 */
-	function initRqueset(url,param,type){
-		post_common_service( url,param,function(data){
-			data_array(data,type);
-			if(type == 1){
-				// 画图
-				score_statistics.setOption(personal_score_statistics()); 
-			}else if(type == 2){
-				// 画图
-				check_type.setOption(personal_check_type());  
-			}
-		},function(error){
-        	return "" ;
-    	});
-	}
-
-	/**
-	 * 数组数据
-	 * @param {*} data 
-	 * @param {*} type 
-	 */
-	function data_array(data,type){
-		if(type == 1){
-			array_year_score.length = 0;
-			months.length = 0;
-			if(data.length!=0){
-				if(data.length<14){
-					for(var i=0;i<14-data.length;i++){
-						array_year_score.push(0)
-					}
-				}
-				var month_arr = month_method_2();
-				for(var i=0;i<data.length;i++){
-					if(month_arr.indexOf(parseInt(data[i].mth))){
-						// 指定位置插入值
-						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;
-			}	
-		}else if(type == 2){
-			array_check_type.length=0;
-                if(data.length != 0){
-					for(var i=0;i<data.length;i++){
-						array_check_type.push({"value": data[i].all_check_score,"name":data[i].name});
-				    } 
-				}else{
-					array_check_type.length=0;	
-				}
-		}
-	}
-
-	$("#select-personal").click(function(){
-		if($("#select-personal").text()==''){
-             tip("请选择收费站");
-			 return;
-		}
-	});
-	// 收费站下拉框
-	var dept;
-	if(roleContains("STATION")){
-		dept=getCurrentUser().organid; 
-	}
-	var roadManager;
-	if(roleContains("ROAD_MANAGER")){
-		roadManager=getCurrentUser().organid; 
-	}
-	var feeList = $.zui.store.get("cache_fee_station_list");
-	if(roadManager) feeList = cache_road_manager_fee_list_map.get(roadManager);
-	setFeeSelectValueNoAll(feeList,"#select-dept",dept);
-	setSecond();
-	/**
-	 * 部门人员下拉框
-	 */
-	function setSecond(){ 
+     * 数组数据
+     * @param {*} data
+     * @param {*} type
+     */
+    function data_array(data, type) {
+        if (type == 1) {
+            array_year_score.length = 0;
+            months.length = 0;
+            if (data.length != 0) {
+                if (data.length < 14) {
+                    for (var i = 0; i < 14 - data.length; i++) {
+                        array_year_score.push(0)
+                    }
+                }
+                var month_arr = month_method_2();
+                for (var i = 0; i < data.length; i++) {
+                    if (month_arr.indexOf(parseInt(data[i].mth))) {
+                        // 指定位置插入值
+                        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;
+            }
+        } else if (type == 2) {
+            array_check_type.length = 0;
+            if (data.length != 0) {
+                for (var i = 0; i < data.length; i++) {
+                    array_check_type.push({ "value": data[i].all_check_score, "name": data[i].name });
+                }
+            } else {
+                array_check_type.length = 0;
+            }
+        }
+    }
+
+    $("#select-personal").click(function() {
+        if ($("#select-personal").text() == '') {
+            tip("请选择收费站");
+            return;
+        }
+    });
+    // 收费站下拉框
+    var dept;
+    if (roleContains("STATION")) {
+        dept = getCurrentUser().organid;
+    }
+    var roadManager;
+    if (roleContains("ROAD_MANAGER")) {
+        roadManager = getCurrentUser().organid;
+    }
+    var feeList = $.zui.store.get("cache_fee_station_list");
+    if (roadManager) feeList = cache_road_manager_fee_list_map.get(roadManager);
+    setFeeSelectValueNoAll(feeList, "#select-dept", dept);
+    setSecond();
+    /**
+     * 部门人员下拉框
+     */
+    function setSecond() {
         var select_road = $("#select-dept").val();
-		var sec = document.getElementById('select-personal');
-		var tempStr = ''
-		var param = {
-			 "organid":select_road
-		}
-		post_common_service("user/getFsUserList",param,function(data){
-			if(data.length!=0){
-				for(var i=0;i<data.length;i++){
-					for(var j=33;j<=53;j++){
-						if(select_road==j){
-							tempStr += "<option value="+data[i].id+">"+data[i].truename+"</option>";  
-						}
-					}
-				sec.innerHTML=tempStr;
-				}
-			}else{
-				sec.innerHTML='';	
-			}
-			// 请求数据
-         	 getInit();
-		},function(error){
-        	return "" ;
-    	});
+        var sec = document.getElementById('select-personal');
+        var tempStr = ''
+        var param = {
+            "organid": select_road
+        }
+        post_common_service("user/getFsUserList", param, function(data) {
+            if (data.length != 0) {
+                for (var i = 0; i < data.length; i++) {
+                    for (var j = 33; j <= 53; j++) {
+                        if (select_road == j) {
+                            tempStr += "<option value=" + data[i].id + ">" + data[i].truename + "</option>";
+                        }
+                    }
+                    sec.innerHTML = tempStr;
+                }
+            } else {
+                sec.innerHTML = '';
+            }
+            // 请求数据
+            getInit();
+        }, function(error) {
+            return "";
+        });
     }
 
-	function getInit(){
-		 var start_date = dateChange(new Date($(".div-start input").val()+" 00:00:00"),60*60*1000 );
-		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();
-	})
-	
-
-	 /**
-	 * 除数为0处理
-	 * @param {*} num 
-	 * @param {*} num1 
-	 * @param {*} num2 
-	 * @param {*} num4 
-	 */
-	function filter(num,num1,num2){
-		if(num1 == 0){
-			return num2;
-		}else{
-			return (num/num1).toFixed(2);
-		}
-	}
-
-	function echart(){
+    function getInit() {
+        var start_date = dateChange(new Date($(".div-start input").val() + " 00:00:00"), 60 * 60 * 1000);
+        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();
+    })
+
+
+    /**
+     * 除数为0处理
+     * @param {*} num
+     * @param {*} num1
+     * @param {*} num2
+     * @param {*} num4
+     */
+    function filter(num, num1, num2) {
+        if (num1 == 0) {
+            return num2;
+        } else {
+            return (num / num1).toFixed(2);
+        }
+    }
+
+    function echart() {
         // 路径配置
         require.config({
             paths: {
                 echarts: '/js/lib/echarts/build/dist'
             }
-        }); 
+        });
         // 使用
-	    require(
-		[
-			'echarts',
-			'echarts/theme/macarons', 
-			'echarts/chart/line', 
-			'echarts/chart/pie'
-		],
-			function (ec,theme) {
-					// 基于准备好的dom,初始化echarts图表
-					score_statistics = ec.init(document.getElementById('personal-score-statistics'),theme); 
-					check_type = ec.init(document.getElementById('personal-check-type'),theme);	
-			}
-       ); 
-	}
-
-			/**
-			 * 图一
-			 */
-	    	function personal_score_statistics(){
-				option = {
-					color : [ '#00ced1' ],
-					tooltip : {
-						trigger: 'axis'
-					},
-					noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
+        require(
+            [
+                'echarts',
+                'echarts/theme/macarons',
+                'echarts/chart/line',
+                'echarts/chart/pie'
+            ],
+            function(ec, theme) {
+                // 基于准备好的dom,初始化echarts图表
+                score_statistics = ec.init(document.getElementById('personal-score-statistics'), theme);
+                check_type = ec.init(document.getElementById('personal-check-type'), theme);
+            }
+        );
+    }
+
+    /**
+     * 图一
+     */
+    function personal_score_statistics() {
+        option = {
+            color: ['#00ced1'],
+            tooltip: {
+                trigger: 'axis'
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
                     }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            grid: {
+                width: "75%"
+            },
+            legend: {
+                data: ['平均分']
+            },
+            toolbox: {
+                show: true,
+            },
+            calculable: true,
+            xAxis: [{
+                type: 'category',
+                boundaryGap: false,
+                data: month_method_2()
+            }],
+            yAxis: [{
+                type: 'value',
+                min: 700,
+                max: 1000,
+                axisLabel: {
+                    formatter: '{value}'
+                }
+            }],
+            series: [{
+                    name: '平均分',
+                    type: 'line',
+                    data: array_year_score,
+                    markPoint: {
+                        data: [
+                            { type: 'max', name: '最大值' },
+                            { type: 'min', name: '最小值' }
+                        ]
                     },
-					grid:{
-                    width:"75%"
-                    },
-					legend: {
-						data:['平均分']
-					},
-					toolbox: {
-						show : true,
-					},
-					calculable : true,
-					xAxis : [
-						{
-							type : 'category',
-							boundaryGap : false,
-							data : month_method_2()
-						}
-					],
-					yAxis : [
-						{
-							type : 'value',
-							min : 700 ,
-						    max : 1000,
-							axisLabel : {
-								formatter: '{value}'
-							}
-						}
-					],
-					series : [
-						{
-							name:'平均分',
-							type:'line',
-							data: array_year_score,
-							markPoint : {
-								data : [
-									{type : 'max', name: '最大值'},
-									{type : 'min', name: '最小值'}
-								]
-							},
-							markLine : {
-								data : [
-									{type : 'average', name: '平均值'}
-								]
-							}
-						},
-						
-					]
-				};
-						return option;
-		}
-			
-
-        /**
-		 * 图二
-		 */
-		function personal_check_type(){
-			option = {
-				tooltip : {
-					trigger: 'item',
-					formatter:  "个人服务检查问题占比 <br/>{b} : {c}分 ({d}%)"
-				},
-				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
+                    markLine: {
+                        data: [
+                            { type: 'average', name: '平均值' }
+                        ]
+                    }
+                },
+
+            ]
+        };
+        return option;
+    }
+
+
+    /**
+     * 图二
+     */
+    function personal_check_type() {
+        option = {
+            tooltip: {
+                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: {
+
+                    magicType: {
+
+                        type: ['pie', 'funnel'],
+                        option: {
+                            funnel: {
+                                x: '25%',
+                                width: '50%',
+                                funnelAlign: 'left',
+                                max: 1548
+                            }
                         }
                     },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
+                }
+            },
+            calculable: true,
+            series: [{
+                name: '访问来源',
+                type: 'pie',
+                radius: '55%',
+                center: ['50%', '50%'],
+                data: array_check_type,
+                itemStyle: {
+                    normal: {
+                        label: {
+                            show: true,
+                            formatter: '{b} :\n{c}分 ({d}%)'
+                        },
+                        labelLine: { show: true }
                     }
-                },
-				toolbox: {
-					show : true,
-					feature : {
-					
-						magicType : {
-						
-							type: ['pie', 'funnel'],
-							option: {
-								funnel: {
-									x: '25%',
-									width: '50%',
-									funnelAlign: 'left',
-									max: 1548
-								}
-							}
-						},
-					}
-				},
-				calculable : true,
-				series : [
-					{
-						name:'访问来源',
-						type:'pie',
-						radius : '55%',
-						center: ['50%', '50%'],
-						data:array_check_type,
-						itemStyle:{ 
-						normal:{ 
-							label:{ 
-								show: true, 
-								formatter: '{b} :\n{c}分 ({d}%)'  
-							}, 
-							labelLine :{show:true} 
-							} 
-						} 
-					}
-				]
-			};
-			return option;
-		}
+                }
+            }]
+        };
+        return option;
+    }
 
 });
-function setVisit(){
-	if(roleContains("STATION")){
-		$("#select-dept").attr("disabled","disabled");
-	}
+
+function setVisit() {
+    if (roleContains("STATION")) {
+        $("#select-dept").attr("disabled", "disabled");
+    }
 }

+ 44 - 43
VisualInspection/view/statistics/personal_data_statistics.html

@@ -10,11 +10,15 @@
             <!--<div class="name"><span>刘娟</span></div>
             <div class="div-select div-button"><button>选择人员</button></div>-->
             <!--<div class="name1"><span  for="exampleInputAccount1">请选择收费站:</span></div>-->
-            <div class="div-select"><select  class="form-control" id="select-dept"></select></button></div>
-            <div class="div-select"><select  class="form-control" id="select-personal"></select></button></div>
-            <div class="div-start"><input class="form-control" placeholder="请选择考核开始时间"></input></div>
-            <div class="div-to"><label  for="exampleInputAccount1">-</label></div>
-            <div class="div-end"><input class="form-control" placeholder="请选择考核结束时间"></input></div>
+            <div class="div-select"><select class="form-control" id="select-dept"></select></button>
+            </div>
+            <div class="div-select"><select class="form-control" id="select-personal"></select></button>
+            </div>
+            <div class="div-start"><input class="form-control" placeholder="请选择考核开始时间"></input>
+            </div>
+            <div class="div-to"><label for="exampleInputAccount1">-</label></div>
+            <div class="div-end"><input class="form-control" placeholder="请选择考核结束时间"></input>
+            </div>
             <div class="div-select">
                 <select class="form-control score-select ">
                     <option value="">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
@@ -23,66 +27,66 @@
             <div class="query div-button"><button>查询</button></div>
             <!--<div class="export div-button"><button>导出</button></div>-->
         </div>
-    </div> 
+    </div>
     <div class="line-1"></div>
-    <!--<div class="row-3">
+    <div class="row-3">
         <div class="dept">
             <div style="margin-top:14px;">
-            <span>部门</span><br/><br/>   
-            <a>收费站</a>
+                <span>部门</span><br/><br/>
+                <span class="s_d_name" id='station_name'>收费站</span>
             </div>
         </div>
         <div class="line-4"></div>
         <div class="job">
             <div style="margin-top:14px;">
-            <span>职务</span><br/><br/>
-            <a>收费员</a>
+                <span>职务</span><br/><br/>
+                <span class="s_d_name" id='station_user_name'>收费员</span>
             </div>
         </div>
         <div class="line-5"></div>
         <div class="current-month">
             <span style="margin-left:20px;">本月:</span>
-            <span style="margin-left:50px;">部门排名:</span><span>6</span>
-            <span style="margin-left:50px;">总排名:</span><span>20</span>
-            <span style="margin-left:50px;">总扣分:</span><span>120</span>
-            <span style="margin-left:50px;">平均单项扣分:</span><span>11</span>
+            <span style="margin-left:50px;">部门排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_dept_ranking">-</span>
+            <span>总排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_com_ranking">-</span>
+            <span>总扣分:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_score_ranking">-</span>
+
         </div>
         <div class="line-6"></div>
         <div class="next-month">
-            <span style="margin-left:20px;">月:</span>
-            <span style="margin-left:50px;">部门排名:</span><span>6</span>
-            <span style="margin-left:50px;">总排名:</span><span>20</span>
-            <span style="margin-left:50px;">总扣分:</span><span>120</span>
-            <span style="margin-left:50px;">平均单项扣分:</span><span>11</span>
+            <span style="margin-left:20px;">月:</span>
+            <span style="margin-left:50px;">部门排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_dept_ranking">-</span>
+            <span>总排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_com_ranking">-</span>
+            <span>总扣分:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_score_ranking">-</span>
+
         </div>
-    </div>-->
+    </div>
 
     <div class="row" style="width:100%;margin:0 auto;">
-            <!-- 使用一个div来显示数据表格 -->
-            <div id="personal_data_table" class="datatable" data-checkable="true" data-sortable="true"></div>
+        <!-- 使用一个div来显示数据表格 -->
+        <div id="personal_data_table" class="datatable" data-checkable="true" data-sortable="true"></div>
     </div>
-    
-  <div class="border-line">
-    <div class="row-7">
-        <div class="col-1"><span style="font-family: '宋体';font-size:15px;">个人得分统计</span></div><div class="line-2"></div>
-        <div class="col-1"><span style="font-family: '宋体';font-size:15px;">个人温馨服务检查问题类别占比</span></div>
-    </div>
-    <div class="row-8">
-        <div id="personal-score-statistics" style="width:49%;height:400px;float:left;"></div>
-        <div class="line-3"></div>
-        <div id="personal-check-type" style="width:49%;height:400px;float:left;"></div>
+
+    <div class="border-line">
+        <div class="row-7">
+            <div class="col-1"><span style="font-family: '宋体';font-size:15px;">个人得分统计</span></div>
+            <div class="line-2"></div>
+            <div class="col-1"><span style="font-family: '宋体';font-size:15px;">个人温馨服务检查问题类别占比</span></div>
+        </div>
+        <div class="row-8">
+            <div id="personal-score-statistics" style="width:49%;height:400px;float:left;"></div>
+            <div class="line-3"></div>
+            <div id="personal-check-type" style="width:49%;height:400px;float:left;"></div>
+        </div>
     </div>
-  </div>
 </div>
 <script>
     $(document).ready(function() {
-        
+
         // 仅选择日期
-        $(".div-start input,.div-end input").datetimepicker(
-        {
-            language:  "zh-CN",
+        $(".div-start input,.div-end input").datetimepicker({
+            language: "zh-CN",
             weekStart: 1,
-            todayBtn:  1,
+            todayBtn: 1,
             autoclose: 1,
             todayHighlight: 1,
             startView: 2,
@@ -91,7 +95,4 @@
             format: "yyyy-mm-dd"
         });
     });
-</script>
-
-
-       
+</script>

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

@@ -4,6 +4,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import com.xintong.visualinspection.pojo.UserRankingData;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -42,6 +43,19 @@ public class StatisticsController extends BaseController {
     	List<StatisticsBo> lists=  statisticsService.getEmployeeCheckedInfo(obj);
     	return super.returnSuccessResult(lists);
     }
+
+
+    /**
+     * 获取用户排名详情
+     * @param obj
+     * @return
+     */
+    @RequestMapping(value = "/employee/order/detail")
+    public String getEmployeeOrderByUserId(@RequestBody StatisticsBean obj){
+        UserRankingData userRankingData=  statisticsService.getEmployeeRankingData(obj);
+        return super.returnSuccessResult(userRankingData);
+    }
+
     
 
     /**

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

@@ -12,6 +12,7 @@ import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.StatisticsFsWork;
 import com.xintong.visualinspection.pojo.TaskAndScore;
+import com.xintong.visualinspection.pojo.UserRankingData;
 
 /**
  * 
@@ -26,7 +27,9 @@ import com.xintong.visualinspection.pojo.TaskAndScore;
  *
  */
 public interface StatisticsService {
-   
+
+    public UserRankingData getEmployeeRankingData(StatisticsBean obj);
+
 	public List<StatisticsBo> getEmployeeCheckedInfo(StatisticsBean obj);
 	
 	public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj);

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

@@ -9,16 +9,14 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.lang.reflect.Method;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.xintong.visualinspection.bean.*;
+import com.xintong.visualinspection.dao.master.CheckTaskPeriodDao;
+import com.xintong.visualinspection.pojo.UserRankingData;
 import org.jxls.common.Context;
 import org.jxls.util.JxlsHelper;
 import org.jxls.util.Util;
@@ -26,15 +24,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.xintong.visualinspection.bean.CheckAppealStatistic;
-import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
-import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.bean.FeeStation;
-import com.xintong.visualinspection.bean.Organ;
-import com.xintong.visualinspection.bean.StatisticsBean;
-import com.xintong.visualinspection.bean.StatisticsBo;
-import com.xintong.visualinspection.bean.StatisticsFsWork;
-import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.dao.cluster.DepartmentDao;
 import com.xintong.visualinspection.dao.cluster.UserInfoDao;
 import com.xintong.visualinspection.dao.master.StatisticsDao;
@@ -62,14 +51,66 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 	@Autowired
 	private UserInfoDao userInfoDao;
 
+    @Autowired
+    private CheckTaskPeriodDao checkTaskPeriodDao;
+
+
+	@Override
+    public UserRankingData getEmployeeRankingData(StatisticsBean obj){
+        UserRankingData data = new UserRankingData();
+
+        List<CheckTaskPeriod> checkTaskPeriods = checkTaskPeriodDao.select(new CheckTaskPeriod());
+
+        CheckTaskPeriod lastTaskPeriod = null;
+//        计算上个周期时间   周期时间:00:00:00   ----- 00:00:00       参数:23:00:00
+        for (CheckTaskPeriod p:checkTaskPeriods
+             ) {
+            if(obj.getStart_date().getTime() > p.getStarttime().getTime() &&
+                    obj.getEnd_date().getTime() > p.getStarttime().getTime()){
+                lastTaskPeriod = p;
+                break;
+            }
+        }
+        if(lastTaskPeriod!=null){
+            StatisticsBean temp = new StatisticsBean();
+            temp.setStart_date(new Date(lastTaskPeriod.getStarttime().getTime() -1*1000*60*60));
+            temp.setEnd_date(new Date(lastTaskPeriod.getEndtime().getTime() -1*1000*60*60));
+            List<StatisticsBo> list = getEmployeeCheckedInfo(temp);
+            if(list==null||list.size()<1) return data;
+            for (StatisticsBo b:list
+                 ) {
+                if(b.getUser().getId().intValue() == obj.getUser_id().intValue()){
+                    data.setLastP(b);
+                    break;
+                }
+            }
+        }
+        List<StatisticsBo> list = getEmployeeCheckedInfo(obj);
+        if(list==null||list.size()<1) return data;
+        for (StatisticsBo b:list
+                ) {
+            if(b.getUser().getId().intValue() == obj.getUser_id().intValue()){
+                data.setCurrentP(b);
+                break;
+            }
+        }
+	    return data;
+    }
+
 	@Override
 	public List<StatisticsBo> getEmployeeCheckedInfo(StatisticsBean obj) {
 		// 查看是否有部门id
 		Long organId = obj.getDept_id();
 		// 将检索出来的数据放到如map中
-		List<StatisticsBean> list = statisticsDao.selectStatistics(obj);
 
-		List<StatisticsBean> timesList = statisticsDao.selectCheckedTimes(obj);
+
+        StatisticsBean tempbo = new StatisticsBean();
+        tempbo.setStart_date(obj.getStart_date());
+        tempbo.setEnd_date(obj.getEnd_date());
+
+		List<StatisticsBean> list = statisticsDao.selectStatistics(tempbo);
+
+		List<StatisticsBean> timesList = statisticsDao.selectCheckedTimes(tempbo);
 
 		Map<Long, StatisticsBo> statisticBoMap = new HashMap<Long, StatisticsBo>();
 
@@ -148,7 +189,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 		});
 		// 道管Map
+        //排名
 		Map<String, Integer> center_ranking = new HashMap<>();
+		//留last
 		Map<String, StatisticsBo> center_ranking2 = new HashMap<>();
 		center_ranking.put("30", 1);
 		center_ranking.put("31", 1);
@@ -172,34 +215,54 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			if(lists.get(i).getChecked_num() == 0 ){
 				continue;
 			}
-			// 累计道管排名
-			String centerId = lists.get(i).getUser().getParent_organid().toString();
-			if (i > 0 && center_ranking2.get(centerId) != null
-					&& lists.get(i).compareTo(center_ranking2.get(centerId)) == 0) {
-				lists.get(i).setCenter_ranking(center_ranking2.get(centerId).getCenter_ranking());
-			} else {
-				lists.get(i).setCenter_ranking(center_ranking.get(centerId));
-				center_ranking2.put(centerId, lists.get(i));
-			}
-			center_ranking.put(centerId, center_ranking.get(centerId) + 1);
 
-			// 累计收费站的排名
-			String feeStationId = lists.get(i).getUser().getOrganid().toString();
-			if (i > 0 && fee_ranking2.get(feeStationId) != null
-					&& lists.get(i).compareTo(fee_ranking2.get(feeStationId)) == 0) {
-				lists.get(i).setFee_station_ranking(fee_ranking2.get(feeStationId).getFee_station_ranking());
-			} else {
-				lists.get(i).setFee_station_ranking(fee_ranking.get(feeStationId));
-				fee_ranking2.put(feeStationId, lists.get(i));
-			}
-			fee_ranking.put(feeStationId, fee_ranking.get(feeStationId) + 1);
-
-			// 公司排名
-			if (i > 0 && lists.get(i - 1).compareTo(lists.get(i)) == 0) {
-				lists.get(i).setCompany_ranking(lists.get(i - 1).getCompany_ranking());
-			} else {
-				lists.get(i).setCompany_ranking(i + 1);
-			}
+            StatisticsBo statisticsBo = lists.get(i);
+
+            // 累计道管排名
+			//获取道管id
+            String centerId = statisticsBo.getUser().getParent_organid().toString();
+
+            if(center_ranking2.get(centerId)==null){
+                statisticsBo.setCenter_ranking(center_ranking.get(centerId));
+            }else{
+                center_ranking.put(centerId, center_ranking.get(centerId) + 1);
+                if(statisticsBo.compareTo(center_ranking2.get(centerId)) == 0){
+                    statisticsBo.setCenter_ranking(center_ranking2.get(centerId).getCenter_ranking());
+                }else{
+                    statisticsBo.setCenter_ranking(center_ranking.get(centerId));
+                }
+            }
+            center_ranking2.put(centerId, statisticsBo);
+
+            // 累计收费站的排名
+            String feeStationId = statisticsBo.getUser().getOrganid().toString();
+
+            if(fee_ranking2.get(feeStationId)==null){
+                statisticsBo.setFee_station_ranking(fee_ranking.get(feeStationId));
+            }else{
+                fee_ranking.put(feeStationId, fee_ranking.get(feeStationId) + 1);
+                if(statisticsBo.compareTo(fee_ranking2.get(feeStationId)) == 0){
+                    statisticsBo.setFee_station_ranking(fee_ranking2.get(feeStationId).getFee_station_ranking());
+                }else{
+                    statisticsBo.setFee_station_ranking(fee_ranking.get(feeStationId));
+                }
+            }
+            fee_ranking2.put(feeStationId, statisticsBo);
+
+            // 公司排名
+
+            if(i==0){
+                statisticsBo.setCompany_ranking(1);
+            }else{
+                StatisticsBo lastbo = lists.get(i-1);
+                if(statisticsBo.compareTo(lastbo)==0){
+                    statisticsBo.setCompany_ranking(lastbo.getCompany_ranking());
+                }else{
+                    statisticsBo.setCompany_ranking(i+1);
+                }
+
+            }
+            
 		}
 		return lists;
 	}

Разница между файлами не показана из-за своего большого размера
+ 1114 - 2643
VisualInspection_server/visual/visual.log


Некоторые файлы не были показаны из-за большого количества измененных файлов