chenrj-PC\chenrj 8 år sedan
förälder
incheckning
8193a942af

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

@@ -1,4 +1,19 @@
 
+
+$(function(){
+
+    // 道管中心选择变化
+    $("#center-manager").change(function(){
+        $("#fsList").empty();
+        if(GV(this)!=''){
+            getFsStationList(GV(this),function(options){
+                $("#fsList").append(options);
+            });
+        }
+    })
+    // end
+})
+
 function queryEmpClick(){
     //每次点击前清空表格数据
     $(".table-tbody").empty('');
@@ -18,7 +33,8 @@ function queryEmpClick(){
         end_date += " 23:00:00";
     }
     var param = {
-        "dept_id": $("#fsList").val(),
+        "parent_dept_id":GV("#center-manager"),
+        "dept_id": GV("#fsList"),
         "start_date": start_date,
         "end_date": end_date,
     }
@@ -61,7 +77,7 @@ function getEmployeeInfosClick(url,param,start_score,end_score){
         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 flag = judgeParamFilter(data, i,score, start_score,end_score)
             if(flag){
                 strTbody+="<tr><td width='4%;'>"+(count+1)+"</td><td width='6%;'>"+data[i].user.fee_station_name+"</td>"
                 +"<td width='6%;'>"+data[i].user.truename+"</td><td width='6%;'>"+data[i].user.position_name+"</td>"
@@ -105,7 +121,6 @@ function judgeParamFilter(data,i,score, start_score,end_score){
     } 
     var checkCount = $("#check_count").val();   
     if(checkCount){
-        console.log("fff:"+filter(data[i].checked_num,'0')+","+(filter(data[i].checked_num,'0')==checkCount));
         if(filter(data[i].checked_num,'0')==checkCount){
             flag2=true;
         }else{

+ 25 - 15
VisualInspection/view/statistics/emp_ranking.html

@@ -1,12 +1,22 @@
 <script src="/js/statistics/assess_ranking.js?__inline"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/assess_situation.css">
 <div class="container-fluid ">
     <div class="form-div">
         <form  class="form-horizontal">
             <div class="form-group">
+                <label for="exampleInputAccount1" class="col-sm-1">道管中心</label>
+                <div class="col-sm-2" style="width:150px;">
+                    <select class="form-control"  id="center-manager">
+                        <option selected value="">全部</option>
+                        <option  value="30">连云港</option>
+                        <option value="31">盐城</option>
+                        <option value="32">南通</option>
+                    </select>
+                </div>
                 <label for="exampleInputAccount1" class="col-sm-1">部门</label>
-                <div class="col-sm-2">
-                    <select class="form-control" id="fsList">
+                <div class="col-sm-2" style="width:150px;">
+                    <select class="form-control"  id="fsList">
                     </select>
                 </div>
                 <label for="exampleInputAccount1" class="col-sm-1">查询日期</label>
@@ -16,16 +26,7 @@
                 <div class="col-sm-3">
                     <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
-                <div class="div-score">
-                    <label for="exampleInputAccount1" class="lable-score">得分区间</label>
-                </div>
-                <div class="col-sm-3" style="width:60px;">
-                    <input type="text" id="start-score" 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-score" class="form-control form-date" style="width:60px;" value="1000">
-                </div>
+                
                 <div class="col-sm-5">
                     <button class="btn btn-primary " type="button" onclick="queryEmpClick()">查询</button>
                 </div>
@@ -35,14 +36,23 @@
             </div>
             <div class="form-group">
                 <label for="exampleInputAccount1" class="col-sm-1">考核次数</label>
-                <div class="col-sm-2">
+                <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:200px;">
+                <div class="col-sm-2" style="width:150px;">
                     <select class="form-control" id="jobSelect">
                     </select>
                 </div>
+                <label for="exampleInputAccount1" class="col-sm-1">得分区间</label>
+                <div class="col-sm-3" style="width:60px;">
+                    <input type="text" id="start-score" 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-score" class="form-control form-date" style="width:60px;" value="1000">
+                </div>
+
             </div>
         </form>
     </div>
@@ -122,7 +132,7 @@
             format: "yyyy-mm-dd"
         });
       
-        setFeSelect("#fsList");
+   //     setFeSelect("#fsList");
         initQueryEmp();
     });
 </script>

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

@@ -19,6 +19,9 @@ public class StatisticsBean {
     //编号
     private Integer id;
  
+    // 父部门id
+    private Long parent_dept_id ;
+    
     // 部门id
     private Long dept_id;
     

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

@@ -82,8 +82,12 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		}
 		user.setPosition_ids(positionList);
 
-		if (obj.getDept_id() != null)
-			user.setOrganid(obj.getDept_id().intValue());
+		if (obj.getDept_id() != null){
+			user.setOrganid(obj.getDept_id().intValue());			
+		}
+		if(obj.getParent_dept_id()!=null){
+			user.setParent_organid(obj.getParent_dept_id().intValue());
+		}
 		List<User> listUserts = userInfoDao.getUsers(user);
 		for (User u : listUserts) {
 			u.setPassword(null);