Ver código fonte

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

wenhongquan 8 anos atrás
pai
commit
6aa523d6b3

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

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

+ 0 - 3
VisualInspection/js/statistics/assess_ranking.js

@@ -135,9 +135,6 @@ function addTask(userid, username, start_date, end_date) {
         "end_time": end_date
     }
     post_common_service(url, param, function (data) {
-        
-        console.log(data)
-      
         var tasklist = data.teamClasseList;
         var userclasslist = data.userClassCountList;
 

+ 12 - 7
VisualInspection/js/statistics/change_work.js

@@ -13,10 +13,11 @@ $(function(){
     });
 
     // 当前月份初始化
-    $("#sel_month").val(getM()-1);
-
-    $("#month_name").html( $("#sel_month").find("option:selected").text());
-
+    // $("#sel_month").val(getM()-1);
+    // $("#month_name").html( $("#sel_month").find("option:selected").text());
+    // 时间初始化
+    $("#start-time").val( new Date().getFullYear()+'-'+ (getM()-1) +"-25");
+    $("#end-time").val( new Date().getFullYear()+'-'+ (getM()) +"-25");
 
     // 收费站中心选择
     $("#fs_station").change(function(){
@@ -44,7 +45,7 @@ $(function(){
 
     // 查询
     $("#searchBtn").click(function(){        
-        $("#month_name").html( $("#sel_month").find("option:selected").text()  )
+        // $("#month_name").html( $("#sel_month").find("option:selected").text()  )
         getFsWorkInfo();
     })
     // end
@@ -56,9 +57,13 @@ $(function(){
  */
 function getFsWorkInfo(){
 
+    // var param = {
+    //     "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
+    //     "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+    // }
     var param = {
-        "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
-        "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+        "start_time": GV("#start-time")+" 23:00:00" ,
+        "end_time": GV("#end-time")+" 23:00:00"
     }
     
     if(GV("#fs_employee")!=''){

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

@@ -179,4 +179,25 @@ function select_option(){
         temp += "<option value=20"+months[i]+">20"+months[i]+"</option>"
     }
     str.append(temp);
+}
+
+
+/**
+ * 根据当前月份 获取前13个月份
+ */
+function month_method_2(){
+    var montharray = new Array();
+    var now_month = new Date().getMonth() ;
+    for(var i= now_month ; i<13;i++){
+        montharray.push( (new Date().getFullYear()-1+'') + "/"+PrefixInteger(i,2) ) ;
+    }
+    for(var i=1;i<=now_month;i++){
+        montharray.push( (new Date().getFullYear()+'')  + "/"+ PrefixInteger(i,2) );
+    }
+    return montharray ;
+}
+
+// 数字前面补0
+function PrefixInteger(num, length) {
+    return (Array(length).join('0') + num).slice(-length);
 }

+ 11 - 6
VisualInspection/js/statistics/common_work.js

@@ -13,10 +13,11 @@ $(function(){
     });
 
     // 当前月份初始化
-    $("#sel_month").val(getM()-1);
-
-    $("#month_name").html( $("#sel_month").find("option:selected").text());
+    // $("#sel_month").val(getM()-1);
 
+    // $("#month_name").html( $("#sel_month").find("option:selected").text());
+     $("#start-time").val( new Date().getFullYear()+'-'+ (getM()-1) +"-25");
+     $("#end-time").val( new Date().getFullYear()+'-'+ (getM()) +"-25");
 
     // 收费站中心选择
     $("#fs_station").change(function(){
@@ -44,7 +45,7 @@ $(function(){
 
     // 查询
     $("#searchBtn").click(function(){        
-        $("#month_name").html( $("#sel_month").find("option:selected").text()  )
+        // $("#month_name").html( $("#sel_month").find("option:selected").text()  )
         getFsWorkInfo();
     })
     // end
@@ -56,9 +57,13 @@ $(function(){
  */
 function getFsWorkInfo(){
 
+    // var param = {
+    //     "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
+    //     "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+    // }
     var param = {
-        "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
-        "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+        "start_time": GV("#start-time")+" 23:00:00" ,
+        "end_time": GV("#end-time")+" 23:00:00"
     }
     
     if(GV("#fs_employee")!=''){

+ 26 - 16
VisualInspection/js/statistics/personal_data_statistics.js

@@ -105,8 +105,8 @@ $(function(){
 	 */
 	function init_personal_score_statistics(url,user_id){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
 			"user_id":user_id
 		}
 		initRqueset(url,param,1);
@@ -159,21 +159,21 @@ $(function(){
 			array_year_score.length = 0;
 			months.length = 0;
 			if(data.length!=0){
-				if(data.length<12){
-					for(var i=0;i<12-data.length;i++){
+				if(data.length<13){
+					for(var i=0;i<13-data.length;i++){
 						array_year_score.push(0)
 					}
 				}
+				var month_arr = month_method_2();
 				for(var i=0;i<data.length;i++){
-					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
+					if(month_arr.indexOf(parseInt(data[i].mth))){
 						// 指定位置插入值
-						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
+						array_year_score.splice(month_arr.indexOf(data[i].mth),0,
 						(1000-(filter(data[i].all_check_score,data[i].checked_num,0))));
 					}
 				}
 		    }else{
 				array_year_score.length = 0;
-				months.length = 0;
 			}	
 		}else if(type == 2){
 			array_check_type.length=0;
@@ -218,22 +218,32 @@ $(function(){
 			}else{
 				sec.innerHTML='';	
 			}
-            var start_date = $(".div-start input").val()+" 23:00:00";
-            var end_date = $(".div-end input").val()+" 23:00:00";
-            var user_id = $("#select-personal").val();
-			// 页面初始化
-			echart();
-            initAppealPage(start_date,end_date,user_id);
-            init_personal_score_statistics("statistics/one/person/year/info",user_id);
-            init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+			// 请求数据
+         	 getInit();
 		},function(error){
         	return "" ;
     	});
     }
+
+	function getInit(){
+		 var start_date = $(".div-start input").val()+" 23:00:00";
+		var end_date = $(".div-end input").val()+" 23:00:00";
+		var user_id = $("#select-personal").val();
+		// 页面初始化
+		echart();
+		initAppealPage(start_date,end_date,user_id);
+		init_personal_score_statistics("statistics/one/person/year/info",user_id);
+		init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+	}
+
+
 	$("#select-dept").change(function(){
 		setSecond();
 	});
 
+	$("#select-personal").change(function(){
+		getInit();
+	})
 	
 
 	 /**
@@ -311,7 +321,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : monthsCH
+							data : month_method_2()
 						}
 					],
 					yAxis : [

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

@@ -75,8 +75,8 @@ $(function(){
 	 */
 	function init_company_year_assess(url,select_road){
 		var param = {
-			"start_date":(year-1)+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
-			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
 			"dept_id":select_road,
 			"queryType":1
 		}

+ 2 - 4
VisualInspection/js/statistics/toll_station_statistics.js

@@ -70,8 +70,8 @@ $(function(){
 	 */
 	function init_tollStation_year_assess(url,select_station){
 		var param = {
-			"start_date":(year-1)+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
-			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
 			"dept_id":select_station,
 			"queryType":2
 		}
@@ -209,7 +209,6 @@ $(function(){
 				// 画图
 				rank_assess.setOption(progress_rank_assess());
 			}else if(type == 4){
-				console.log(array_score_order+"hello"+array_score_data);
 				// 画图
 				score_rank.setOption(people_score_rank());
 			}else if(type == 5){
@@ -311,7 +310,6 @@ $(function(){
 					rank[i] = i +1;
 				}				
 			}
-			//console.log(rank);
 			for(var i=0;i<array_score_data.length;i++){
 				array_score_order.push(data[i].user.truename +"\n"+ (rank[i]));
 			}

+ 2 - 2
VisualInspection/js/statistics/total_company_statistics.js

@@ -53,8 +53,8 @@ $(function(){
 	 */
 	function init_company_year_assess(){
 		var param = {
-			"start_date":(year-1)+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
-			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 23:00:00"
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00"
 		}
 		initRqueset("statistics/score/year/info",param,1);
 

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

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

+ 33 - 15
VisualInspection/view/statistics/change_work.html

@@ -5,9 +5,9 @@
     <div class="row">
         <form  class="form-horizontal">
             <div class="form-group">
-                <label for="exampleInputAccount1" class="col-sm-1">月份</label>
-                <div class="col-sm-2">
-                    <select class="form-control" id="sel_month">
+                <label for="exampleInputAccount1" class="col-sm-1">日期</label>
+                <!--<div class="col-sm-2">-->
+                    <!--<select class="form-control" id="sel_month">
                         <option value="1">一月</option>
                         <option value="2">二月</option>
                         <option value="3">三月</option>
@@ -20,8 +20,17 @@
                         <option value="10">十月</option>
                         <option value="11">十一月</option>
                         <option value="12">十二月</option>
-                    </select>
+                    </select>-->
+                <!--</div>-->
+
+                <div class="col-sm-1">
+                    <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
+                </div>
+                <div class="col-sm-1">
+                    <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
+
+
                 <label for="exampleInputAccount1" class="col-sm-1">部门</label>
                 <div class="col-sm-2">
                     <select class="form-control" id="center_manage">
@@ -50,25 +59,22 @@
 
 
 
-    <div class="table-title"><span id="month_name"></span><span>机动人员出勤统计</span></div>
+    <div class="table-title"><span id="month_name"></span><span>机动人员出勤统计</span></div>
 
     <div class="row">
           
               <div class="table-head" ><table  width="100%" min-height="190px" align="center" >
                   <thead>
                     <tr>
-                        <th rowspan="2" width="80px">序号</th>
-                        <th rowspan="2" width="120px">站名</th>
-                        <th rowspan="2" width="120px">姓名</th>
-                        <th rowspan="2" width="120px">岗位</th>
-                        <th width="120px" colspan="3">月份出勤统计(上月26 ~ 本月25)</th>
-                        <th  rowspan="2"  min-width="120px">合计</th>
-                        <th  rowspan="2" >备注</th>
-                    </tr>
-                    <tr> 
+                        <th  width="80px">序号</th>
+                        <th width="120px">站名</th>
+                        <th  width="120px">姓名</th>
+                        <th  width="120px">岗位</th>
                         <th>夜</th>
                         <th>早</th>
                         <th>中</th>
+                        <th  min-width="120px">合计</th>
+                        <th   >备注</th>
                     </tr>
                   </thead>
                   <tbody class="table-tbody" style="background:white" align="center" height="500px">
@@ -81,6 +87,18 @@
 </div>
 <script>
     $(document).ready(function() {
-
+        // 仅选择日期 开始 ,结束时间
+        $("#start-time,#end-time").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
     });
 </script>

+ 14 - 11
VisualInspection/view/statistics/common_work.html

@@ -5,8 +5,8 @@
     <div class="row">
         <form  class="form-horizontal">
             <div class="form-group">
-                <label for="exampleInputAccount1" class="col-sm-1">月份</label>
-                <div class="col-sm-2">
+                <label for="exampleInputAccount1" class="col-sm-1">日期</label>
+                <!--<div class="col-sm-2">
                     <select class="form-control" id="sel_month">
                         <option value="1">一月</option>
                         <option value="2">二月</option>
@@ -21,6 +21,12 @@
                         <option value="11">十一月</option>
                         <option value="12">十二月</option>
                     </select>
+                </div>-->
+                <div class="col-sm-1">
+                    <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
+                </div>
+                <div class="col-sm-1">
+                    <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
                 <label for="exampleInputAccount1" class="col-sm-1">部门</label>
                 <div class="col-sm-2">
@@ -57,18 +63,15 @@
               <div class="table-head" ><table  width="100%" min-height="190px" align="center" >
                   <thead>
                     <tr>
-                        <th rowspan="2" width="80px">序号</th>
-                        <th rowspan="2" width="120px">站名</th>
-                        <th rowspan="2" width="120px">姓名</th>
-                        <th rowspan="2" width="120px">岗位</th>
-                        <th width="120px" colspan="3">月份出勤统计(上月26 ~ 本月25)</th>
-                        <th  rowspan="2"  min-width="120px">合计</th>
-                        <th  rowspan="2" >备注</th>
-                    </tr>
-                    <tr> 
+                        <th  width="80px">序号</th>
+                        <th  width="160px">站名</th>
+                        <th  width="160px">姓名</th>
+                        <th  width="160px">岗位</th>
                         <th>夜</th>
                         <th>早</th>
                         <th>中</th>
+                        <th  min-width="160px">合计</th>
+                        <th  >备注</th>
                     </tr>
                   </thead>
                   <tbody class="table-tbody" style="background:white" align="center" height="500px">

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

@@ -1241,9 +1241,18 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			int seq = 1 ;
 			for(StatisticsBean sta : list){
 				sta.setId(seq++);
-				sta.setCheckman_name( CacheUtil.getUserFromMap(sta.getCheckman_id()+0L).getTruename()  ); 
-				sta.setChecked_name( CacheUtil.getUserFromMap(sta.getUser_id()+0L).getTruename());
-				sta.setFeeStationName( CacheUtil.getOrganFromMap(sta.getDept_id()).getOrganname() );
+				User user = CacheUtil.getUserFromMap(sta.getCheckman_id()+0L) ;
+				if(user != null){
+					sta.setCheckman_name(user.getTruename()); 					
+				}
+				user = CacheUtil.getUserFromMap(sta.getUser_id()+0L) ;
+				if(user != null ){
+					sta.setChecked_name( user.getTruename());					
+				}
+				Organ organ = CacheUtil.getOrganFromMap(sta.getDept_id());
+				if(organ != null){
+					sta.setFeeStationName( organ.getOrganname() );					
+				}
 				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
 				SimpleDateFormat formatter2 = new SimpleDateFormat("- HH:mm");
 				sta.setCheck_task_time_name( formatter.format(sta.getStart_date())+formatter2.format(sta.getEnd_date()));

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