Parcourir la source

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

minitiger il y a 8 ans
Parent
commit
6e4724ffe5
33 fichiers modifiés avec 2243 ajouts et 429 suppressions
  1. 19 17
      VisualInspection/css/statistics/check_workload_statistics.css
  2. 12 9
      VisualInspection/css/statistics/personal_data_statistics.css
  3. 5 1
      VisualInspection/css/statistics/toll_station_statistics.css
  4. 17 19
      VisualInspection/js/config.js
  5. 51 34
      VisualInspection/js/mytask/check.js
  6. 113 0
      VisualInspection/js/statistics/check_workload_statistics.js
  7. 216 28
      VisualInspection/js/statistics/personal_data_statistics.js
  8. 420 47
      VisualInspection/js/statistics/road_manage_statistics.js
  9. 416 46
      VisualInspection/js/statistics/toll_station_statistics.js
  10. 369 67
      VisualInspection/js/statistics/total_company_statistics.js
  11. 17 16
      VisualInspection/js/util/media.js
  12. 2 2
      VisualInspection/view/mytask/check.html
  13. 40 75
      VisualInspection/view/statistics/check_workload_statistics.html
  14. 37 50
      VisualInspection/view/statistics/personal_data_statistics.html
  15. 20 2
      VisualInspection/view/statistics/road_manage_statistics.html
  16. 20 4
      VisualInspection/view/statistics/toll_station_statistics.html
  17. 15 2
      VisualInspection/view/statistics/total_company_statistics.html
  18. BIN
      VisualInspection_server/.DS_Store
  19. 41 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckmanStatisticsBean.java
  20. 22 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  21. 7 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/DepartmentController.java
  22. 52 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java
  23. 10 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java
  24. 2 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/DepartmentDao.java
  25. 9 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java
  26. 12 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml
  27. 122 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  28. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/DepartmentService.java
  29. 15 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java
  30. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/UserService.java
  31. 5 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/DepartmentServiceImpl.java
  32. 136 7
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  33. 17 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/UserServiceImpl.java

+ 19 - 17
VisualInspection/css/statistics/check_workload_statistics.css

@@ -50,20 +50,14 @@
     float:left;
     float:left;
 }
 }
 .name1{
 .name1{
-    width:30px;
+    width:100px;
     height:50px;
     height:50px;
     float:left;
     float:left;
     margin-left: 20px;
     margin-left: 20px;
     line-height: 50px;
     line-height: 50px;
-}
-.name2{
-    width:50px;
-    height:50px;
-    float:left;
-    line-height: 50px;
 }             
 }             
 .div-start{
 .div-start{
-    width:160px;
+    width:120px;
     height:50px;
     height:50px;
     float:left;
     float:left;
     margin-left: 20px;
     margin-left: 20px;
@@ -73,24 +67,24 @@
     width:20px;
     width:20px;
     height:50px;
     height:50px;
     float:left;
     float:left;
-    margin-left: 15px;
+    margin-left: 20px;
     line-height: 50px;
     line-height: 50px;
 }
 }
-.div-start select{
-    width:160px;
+.div-start input,.div-end input{
+    width:120px;
     height:30px;
     height:30px;
+    border: 1px solid #ccc;
+    font-size: 14px;
+    padding: 5px 8px;
+    border-radius: 4px;
 }
 }
 .div-end{
 .div-end{
-    width:150px;
+    width:120px;
     height:50px;
     height:50px;
     float:left;
     float:left;
     margin-left: 5px;
     margin-left: 5px;
     line-height: 50px;
     line-height: 50px;
 }
 }
-.div-end select{
-    width:160px;
-    height:30px;
-}
 .div-check{
 .div-check{
     width:190px;
     width:190px;
     height:50px;
     height:50px;
@@ -101,12 +95,20 @@
 .div-check select{
 .div-check select{
     width:190px;
     width:190px;
     height:30px;
     height:30px;
+    border-radius: 4px;
 }
 }
 .div-select{
 .div-select{
     width:80px;
     width:80px;
     height:50px;
     height:50px;
     float:left;
     float:left;
-    margin-left: 20px;
+    margin-left: 10px;
+    line-height: 50px;
+}
+.div-select select{
+    width:80px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
 }
 }
 .query{
 .query{
     width:80px;
     width:80px;

+ 12 - 9
VisualInspection/css/statistics/personal_data_statistics.css

@@ -87,10 +87,10 @@
     line-height: 50px;
     line-height: 50px;
 }            
 }            
 .div-start{
 .div-start{
-    width:160px;
+    width:120px;
     height:50px;
     height:50px;
     float:left;
     float:left;
-    margin-left: 20px;
+    margin-left: 30px;
     line-height: 50px;
     line-height: 50px;
 }
 }
 .div-to{
 .div-to{
@@ -100,31 +100,34 @@
     margin-left: 15px;
     margin-left: 15px;
     line-height: 50px;
     line-height: 50px;
 }
 }
-.div-start select{
-    width:160px;
+.div-start input,.div-end input{
+    width:120px;
     height:30px;
     height:30px;
+    border: 1px solid #ccc;
+    font-size: 14px;
+    padding: 5px 8px;
+    border-radius: 4px;
 }
 }
 .div-end{
 .div-end{
-    width:150px;
+    width:120px;
     height:50px;
     height:50px;
     float:left;
     float:left;
     margin-left: 5px;
     margin-left: 5px;
     line-height: 50px;
     line-height: 50px;
 }
 }
-.div-end select{
-    width:160px;
-    height:30px;
-}
 .div-check{
 .div-check{
     width:190px;
     width:190px;
     height:50px;
     height:50px;
     float:left;
     float:left;
     margin-left: 50px;
     margin-left: 50px;
     line-height: 50px;
     line-height: 50px;
+    border-radius: 4px;
 }
 }
 .div-check select{
 .div-check select{
     width:190px;
     width:190px;
     height:30px;
     height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
 }
 }
 .div-select{
 .div-select{
     width:80px;
     width:80px;

+ 5 - 1
VisualInspection/css/statistics/toll_station_statistics.css

@@ -48,12 +48,16 @@
     line-height: 50px;
     line-height: 50px;
 }
 }
 .div-station{
 .div-station{
-    width:80px;
+    width:120px;
     height:50px;
     height:50px;
     float:left;
     float:left;
     margin-left: 20px;
     margin-left: 20px;
     line-height: 50px;
     line-height: 50px;
 }
 }
+#second{
+    width:120px;
+    height:25px;
+}
 .div-button{
 .div-button{
     width:80px;
     width:80px;
     height:50px;
     height:50px;

+ 17 - 19
VisualInspection/js/config.js

@@ -7,32 +7,30 @@ var base_server_url = getserveraddr();
 var base_image_server_url = getImageaddr();
 var base_image_server_url = getImageaddr();
 
 
 
 
-function getCurrentaddr(){
-    return "http://"+window.location.host+"/"
+function getCurrentaddr() {
+    return "http://" + window.location.host + "/"
 }
 }
-function getserveraddr(){
-    if(base_ui_url.indexOf("jsjtyxt.com")!=-1){
+
+function getserveraddr() {
+    if (base_ui_url.indexOf("jsjtyxt.com") != -1) {
         return "http://server_yanhai.jsxt.jsjtyxt.com/";
         return "http://server_yanhai.jsxt.jsjtyxt.com/";
-    }
-    else if(base_ui_url.indexOf("localhost")!=-1){
-        // return "http://server_release_yanhai.jsxt.jsjtyxt.com/"
-         return "http://localhost:8089/"
-    }
-    else if(base_ui_url.indexOf("192.168.8.236")!=-1){
+    } else if (base_ui_url.indexOf("localhost") != -1) {
+        return "http://10.112.0.199:7001/"
+            //  return "http://localhost:8089/"
+    } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
         return "http://192.168.8.236:8089/"
         return "http://192.168.8.236:8089/"
-    }
-    else{
+    } else {
         return "http://10.112.0.199:8089/"
         return "http://10.112.0.199:8089/"
     }
     }
 }
 }
-function getImageaddr(){
-    if(base_ui_url.indexOf("jsjtyxt.com")!=-1){
+
+function getImageaddr() {
+    if (base_ui_url.indexOf("jsjtyxt.com") != -1) {
         return "http://file_yanhai.jsxt.jsjtyxt.com/";
         return "http://file_yanhai.jsxt.jsjtyxt.com/";
-    }
-    else if(base_ui_url.indexOf("localhost")!=-1){
-        return "http://file_yanhai.jsxt.jsjtyxt.com/"
-        // return "http://localhost:9080/"
-    }else{
+    } else if (base_ui_url.indexOf("localhost") != -1) {
+        return "http://10.112.0.199:7000/"
+            // return "http://localhost:9080/"
+    } else {
         return "http://10.112.0.199/"
         return "http://10.112.0.199/"
     }
     }
 }
 }

+ 51 - 34
VisualInspection/js/mytask/check.js

@@ -122,7 +122,7 @@ function fullscreen() {
         '                                </div>' +
         '                                </div>' +
         '                                <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">' +
         '                                <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">' +
         '                                    <select class="form-control" id="full_video_list" style="width:200px;float:left;display:none;"></select>' +
         '                                    <select class="form-control" id="full_video_list" style="width:200px;float:left;display:none;"></select>' +
-        '                                      <div class="col-md-4 hidden" style="padding-left:0">' +
+        '                                      <div class="col-md-4 " style="padding-left:0">' +
         '                                                                      <div class="input-group" style="padding-left:0">' +
         '                                                                      <div class="input-group" style="padding-left:0">' +
         '                                                                          <input type="text" id="full_video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">' +
         '                                                                          <input type="text" id="full_video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">' +
         '                                                                         <span class="input-group-btn">' +
         '                                                                         <span class="input-group-btn">' +
@@ -135,7 +135,7 @@ function fullscreen() {
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'stop\')"><i class="icon icon-pause icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'stop\')"><i class="icon icon-pause icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'fast\')"><i class="icon icon-forward icon-2x"></i><span id=\"full_fast_info\"></span></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'fast\')"><i class="icon icon-forward icon-2x"></i><span id=\"full_fast_info\"></span></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'slow\')"><span id=\"full_slow_info\"></span><i class="icon icon-backward icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'slow\')"><span id=\"full_slow_info\"></span><i class="icon icon-backward icon-2x"></i></button>' +
-        '                                        <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="full_video_btn_start" onclick="doAction(\'video_start\')"><img style="width:30px" src="/images/movie.png"></img></i></button>' +
+        '                                        <button type="button" class="btn btn-danger " style="width:51px;height:42px" id="full_video_btn_start" onclick="doAction(\'video_start\')"><img style="width:30px" src="/images/movie.png"></img></i></button>' +
         '                                        <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="full_video_btn_stop" onclick="doAction(\'video_stop\')"><i class="icon icon-stop icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="full_video_btn_stop" onclick="doAction(\'video_stop\')"><i class="icon icon-stop icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-success" onclick="doAction(\'screenshot\')"><i class="icon icon-camera icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-success" onclick="doAction(\'screenshot\')"><i class="icon icon-camera icon-2x"></i></button>' +
         '                                    </div>' +
         '                                    </div>' +
@@ -182,33 +182,34 @@ function getUserCheckCount() {
         "id": $.checkTask.id,
         "id": $.checkTask.id,
         "checked_person": $.checkTask.checked_person
         "checked_person": $.checkTask.checked_person
     };
     };
-    post_common_service("/task/getUserCount/", param, function (userList) { 
-        if(userList){
+    post_common_service("/task/getUserCount/", param, function(userList) {
+        if (userList) {
             $("#checked_count").html(userList.length);
             $("#checked_count").html(userList.length);
-        }else{
-           $("#checked_count").html(0); 
+        } else {
+            $("#checked_count").html(0);
         }
         }
     });
     });
 }
 }
 
 
 function checkUserCount() {
 function checkUserCount() {
     var param = {
     var param = {
-        "id":$.checkTask.id,
-        "checked_person":$.checkTask.checked_person,
-        "class_type":$.checkTask.class_type
+        "id": $.checkTask.id,
+        "checked_person": $.checkTask.checked_person,
+        "class_type": $.checkTask.class_type
     };
     };
-    post_common_service("/task/getUserCount/", param, function(data){
-        if(data>=2){
+    post_common_service("/task/getUserCount/", param, function(data) {
+        if (data >= 2) {
             layer.msg("本周期稽查次数已满,不能再被稽查!", {
             layer.msg("本周期稽查次数已满,不能再被稽查!", {
-                time: 2000//20s后自动关闭
+                time: 2000 //20s后自动关闭
             });
             });
             return false;
             return false;
         }
         }
         return true;
         return true;
     });
     });
 }
 }
-function showCheckDetailCount(){
-    
+
+function showCheckDetailCount() {
+
 }
 }
 
 
 function initCheckAppealBtns() {
 function initCheckAppealBtns() {
@@ -448,17 +449,33 @@ function genPicstr(imgSrc) {
     var src = imgSrc;
     var src = imgSrc;
     if (!src.startWith("http"))
     if (!src.startWith("http"))
         src = base_image_server_url + src;
         src = base_image_server_url + src;
+
+    var ispic = true;
+    var videosrc = src;
+    if (src.indexOf('.avi') != -1) {
+        src = src.split('.avi')[0] + "_screen_0.png"
+        ispic = false;
+    }
+    if (src.indexOf('.mov') != -1) {
+        src = src.split('.mov')[0] + "_screen_0.png"
+        ispic = false;
+    }
+    if (src.indexOf('.mp4') != -1) {
+        src = src.split('.mp4')[0] + "_screen_0.png"
+        ispic = false;
+    }
+
     var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
     var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
         '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
         '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
-        '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' +
-        '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' +
+        (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
+        '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 20px;left: 40px;color: white;"></i>') +
         '</a>' +
         '</a>' +
         '</div>';
         '</div>';
     if (ISCLIENT) {
     if (ISCLIENT) {
         pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
         pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
             '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
             '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
-            '<a class="card" onclick="showClientImg(\'' + src + '\')" href="javascript:void(0)" style="position:absolute">' +
-            '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' +
+            '<a class="card" onclick="' + (ispic ? 'showClientImg(\'' + src + '\')' : '') + '" href="javascript:void(0)" style="position:absolute">' +
+            '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 20px;left: 40px;color: white;"></i>') +
             '</a>' +
             '</a>' +
             '</div>';
             '</div>';
     }
     }
@@ -504,37 +521,37 @@ function showChangeUser() {
 }
 }
 
 
 function changePerson(id) {
 function changePerson(id) {
-    var flag=true;
+    var flag = true;
     var param = {
     var param = {
-        "id":$.checkTask.id,
-        "checked_person":id,
-        "class_type":$.checkTask.class_type
+        "id": $.checkTask.id,
+        "checked_person": id,
+        "class_type": $.checkTask.class_type
     };
     };
-    post_common_service("/task/getUserCount/", param, function(data){
-        if(data && data.length>=2){
+    post_common_service("/task/getUserCount/", param, function(data) {
+        if (data && data.length >= 2) {
             layer.msg("本周期稽查次数已满,不能再被稽查!", {
             layer.msg("本周期稽查次数已满,不能再被稽查!", {
-                time: 2000,//20s后自动关闭
-                offset:'r'
+                time: 2000, //20s后自动关闭
+                offset: 'r'
             });
             });
-        }else{
+        } else {
             // $('#checked_person').html(id);
             // $('#checked_person').html(id);
             var param1 = {
             var param1 = {
                 "id": $.checkTask.id,
                 "id": $.checkTask.id,
                 "checked_person": id,
                 "checked_person": id,
             }
             }
-            post_common_service("task/update/", param1, function (task_data) {
+            post_common_service("task/update/", param1, function(task_data) {
                 //重置当前任务
                 //重置当前任务
                 $.checkTask = task_data;
                 $.checkTask = task_data;
                 //获取用户信息
                 //获取用户信息
-                get_common_service('user/getUserById/' + id, null, function (data) {
-                    changePersonContent(data);
-                })
-                //更新用户次数表
-                no_return_common_service('task/updateUserCount/', param, function (data) {
+                get_common_service('user/getUserById/' + id, null, function(data) {
+                        changePersonContent(data);
+                    })
+                    //更新用户次数表
+                no_return_common_service('task/updateUserCount/', param, function(data) {
                     // changePersonContent(data);
                     // changePersonContent(data);
                 })
                 })
                 layer.close(changePersonLayer);
                 layer.close(changePersonLayer);
-            }, function (error) {
+            }, function(error) {
                 alert(error);
                 alert(error);
             });
             });
         }
         }

+ 113 - 0
VisualInspection/js/statistics/check_workload_statistics.js

@@ -0,0 +1,113 @@
+// 默认初始化日期一个月
+$(".div-start input").val(new Date().getFullYear()+"-"+new Date().getMonth()+"-"+new Date().getDate());
+$(".div-end input").val(new Date().getFullYear()+"-"+(new Date().getMonth()+1)+"-"+new Date().getDate());
+var start_date = $(".div-start input").val()+" 00:00:00";
+var end_date = $(".div-end input").val()+" 23:59:59";
+var user_id = $("#select-personal").val();      
+var cur_status;
+var hide = false;
+
+$(function(){
+
+    //*************************************数据表格******************************************
+	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){
+		var data = {
+			"start_date":start_date,
+				"end_date":end_date,
+				"user_id":user_id,
+				"queryType":1
+		}
+		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
+			hide = true;
+		}
+		
+		var cols = [
+					{width: 40,height:60, text: '序号', flex: true, colClass: 'text-center',field:'num'},
+                    {width: 40,height:60, text: '稽查人员', flex: true,colClass: '',field:'checkman_name' },
+                    {width: 100,height:60, text: '任务名称', flex: true,colClass: '',field:'start_date' },
+					{width: 100,height:60, text: '时间段', flex: true,colClass: '',field:'start_date' },
+                    {width: 40,height:60, text: '考核人员', flex: true,colClass: '',field:'checked_name' },
+                    {width: 40,height:60, text: '考核部门', flex: true,colClass: '',field:'feeStationName' },
+					{width: 40,height:60, text: '扣分数',  flex: true, colClass: '',field:'score'},
+					{width: 100,height:60, text: '考核项',  flex: true, colClass: '',sort: 'down',field:'name'},
+					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true, hide:hide,field:'pics'},
+		];
+		if(cur_status==12 || cur_status==13){
+			data.check_status_arr = [12,13];
+		}
+		$('.datatable').mytable({'cols':cols,
+								'url':"/statistics/one/checkedItem/detail/info",
+								'param':data}
+								);
+	}
+
+	function queryUnAssignedTable(){
+		var cols = [
+					{width: 40,height:60, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+					{width: 40,height:60, text: '稽查人员', type: 'string', flex: true, sort: 'down',field: 'checkman_name'},
+                    {width: 100,height:60, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
+                    {width: 100,height:60, text: '时间段', type: 'string', flex: true, sort: 'down',field: 'name'},
+                    {width: 40,height:60, text: '考核人员', type: 'string', flex: true, sort: 'down',field: 'checked_name'},
+                    {width: 40,height:60, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'feeStationName'},
+					{width: 40,height:60, text: '扣分数', type: 'string', flex: true, field: 'checked_person_name'},
+					{width: 100,height:60, text: '考核项', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
+					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true, field: 'checkman_name'},
+		] ;
+	}
+
+
+    $(".query button").click(function(){
+		var start_date = $(".div-start input").val()+" 00:00:00";
+		var end_date = $(".div-end input").val()+" 23:59:59";
+		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;
+		}
+		var user_id = $("#select-personal").val(); 
+        // 表格
+        initAppealPage(start_date,end_date,user_id);
+	});
+    
+    /**
+     * 稽查人员下拉框
+     */
+    function select_personal(){
+        var tempStr = '';
+        var sec = document.getElementById('select-personal');
+        post_common_service( "user/getAllCheckman",{},function(data){
+            if(data.length!=0){
+                for(var i=0;i<data.length;i++){
+                    tempStr += "<option value="+data[i].id+">"+data[i].truename+"</option>";
+                }
+                sec.innerHTML = tempStr;
+            }else{
+                sec.innerHTML = '';
+            }
+                var user_id = $("#select-personal").val(); 
+                // 初始化表格
+                initAppealPage(start_date,end_date,user_id);
+        },function(error){
+        	return "" ;
+    	});
+    }
+    select_personal();
+
+
+});

+ 216 - 28
VisualInspection/js/statistics/personal_data_statistics.js

@@ -1,4 +1,210 @@
+var year = new Date().getFullYear();
+var month = new Date().getMonth()+1;
+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 score_statistics;
+var check_type;
+var cur_status;
+var hide = false;
+// 默认初始化日期一个月
+$(".div-start input").val(new Date().getFullYear()+"-"+new Date().getMonth()+"-"+new Date().getDate());
+$(".div-end input").val(new Date().getFullYear()+"-"+(new Date().getMonth()+1)+"-"+new Date().getDate());
+var start_date = $(".div-start input").val()+" 00:00:00";
+var end_date = $(".div-end input").val()+" 23:59:59";
+
+
+/**
+ * 预加载方法
+ */		
 $(function(){
 $(function(){
+
+//*************************************数据表格******************************************
+	function initAppealPage(start_date,end_date) {
+		initQueryParams();
+		queryAppeal(start_date,end_date);
+    }
+
+	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){
+		var data = {
+			"start_date":start_date,
+				"end_date":end_date,
+				"user_id":user_id,
+				"queryType":0
+		}
+		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: '',field:'start_date' },
+					{width: 60, text: '扣分数',  flex: true, colClass: '',field:'score'},
+					{width: 100, text: '考核项',  flex: true, colClass: '',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];
+		}
+		$('.datatable').mytable({'cols':cols,
+								'url':"/statistics/one/checkedItem/detail/info",
+								'param':data}
+								);
+	}
+
+	function queryUnAssignedTable(){
+			var cols = [
+					{width: 50, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+					{width: 100, text: '时间段', type: 'string', flex: true, sort: 'down',field: 'start_date'},
+					{width: 60, text: '扣分数', type: 'string', flex: true, field: 'score'},
+					{width: 100, text: '考核项', type: 'string', flex: true, sort: 'down',field: 'name'},
+					{width: 100, text: '扣分凭证', type: 'imagedd', flex: true, field: 'pics'},
+						] ;
+	}
+
+    // 表格
+	initAppealPage(start_date,end_date);
+
+//*************************************画图******************************************
+
+	// 加载图配置
+	echart();
+
+	$(".query button").click(function(){
+		var start_date = $(".div-start input").val()+" 00:00:00";
+		var end_date = $(".div-end input").val()+" 23:59:59";
+		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;
+		}
+		// 查询图一
+		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);
+		// 加载图配置
+		echart();
+		// 表格
+	    initAppealPage(start_date,end_date);
+	});
+    /**
+	 * 初始化图一
+	 * @param {*} url 
+	 * @param {*} dept_id 
+	 */
+	function init_personal_score_statistics(url,user_id){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00",
+			"dept_id":user_id
+		}
+		initRqueset(url,param,1);
+	}
+	init_personal_score_statistics("statistics/one/person/year/info",user_id);
+
+    /**
+	 * 初始化图二
+	 * @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,
+			"dept_id":user_id,
+		}
+		initRqueset(url,param,2);
+	}
+	init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+    
+	/**
+	 * 请求
+	 * @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<12){
+					for(var i=0;i<12-data.length;i++){
+						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)).toFixed(1)));
+					}
+				}
+		    }else{
+				array_year_score.length = 0;
+				months.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;	
+				}
+		}
+	}
+
+	 /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num4){
+		if(num1 == 0 || num2 == 0){
+			return num4;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+
+	function echart(){
         // 路径配置
         // 路径配置
         require.config({
         require.config({
             paths: {
             paths: {
@@ -12,21 +218,18 @@ $(function(){
 			'echarts/chart/line', 
 			'echarts/chart/line', 
 			'echarts/chart/pie'
 			'echarts/chart/pie'
 		],
 		],
-	function (ec) {
-			// 基于准备好的dom,初始化echarts图表
-			var score_statistics = ec.init(document.getElementById('personal-score-statistics')); 
-			var check_type = ec.init(document.getElementById('personal-check-type'));
-			
-			// 为echarts对象加载数据 
-			score_statistics.setOption(personal_score_statistics()); 
-			check_type.setOption(personal_check_type()); 
-		
+			function (ec) {
+					// 基于准备好的dom,初始化echarts图表
+					score_statistics = ec.init(document.getElementById('personal-score-statistics')); 
+					check_type = ec.init(document.getElementById('personal-check-type'));	
+			}
+       ); 
+	}
 
 
 			/**
 			/**
 			 * 图一
 			 * 图一
 			 */
 			 */
 	    	function personal_score_statistics(){
 	    	function personal_score_statistics(){
-			
 				option = {
 				option = {
 					color : [ '#00ced1' ],
 					color : [ '#00ced1' ],
 					tooltip : {
 					tooltip : {
@@ -43,7 +246,7 @@ $(function(){
 						{
 						{
 							type : 'category',
 							type : 'category',
 							boundaryGap : false,
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : monthsCH
 						}
 						}
 					],
 					],
 					yAxis : [
 					yAxis : [
@@ -60,7 +263,7 @@ $(function(){
 						{
 						{
 							name:'平均分',
 							name:'平均分',
 							type:'line',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data: array_year_score,
 							markPoint : {
 							markPoint : {
 								data : [
 								data : [
 									{type : 'max', name: '最大值'},
 									{type : 'max', name: '最大值'},
@@ -114,26 +317,11 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 					}
 				]
 				]
 			};
 			};
 			return option;
 			return option;
 		}
 		}
 
 
-       
-			
-		}
-  ); 
-
-   
 });
 });

+ 420 - 47
VisualInspection/js/statistics/road_manage_statistics.js

@@ -1,4 +1,381 @@
+		var year = new Date().getFullYear();
+		var month = new Date().getMonth()+1;
+		var date = new Date().getDate();
+		var year_assess ;
+		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();
+		var array_allStation = new Array();
+		var array_allStation_score = new Array();
+		var array_check_type = new Array();
+		var array_points_name = new Array();
+		var array_points_pre = new Array();
+		var arrar_points_month = new Array();
+		var array_score_order = new Array();
+		var array_score_data = new Array();
+		var array_score_last = new Array();
+		var array_get_score = new Array();
+		var year_assess ;
+		var score_rank;
+		var points_assess;
+		var check_type;
+		var people_points;
+		var rank_pre;
+		var rank_suf;
 $(function(){
 $(function(){
+    // 显示当前月份
+	$(".div-month select").val(month);
+
+	$(".div-button button").click(function(){	
+		var select_month = $(".div-month select").val();
+		var select_road = $(".div-roadManage select").val();
+		// 查询图一
+		init_company_year_assess("statistics/score/year/info",select_road);
+		// 查询图二
+		init_company_points_assess("statistics/lost/score/rate",select_month+'',select_road);
+		// 查询图三
+		init_stationAll_rank("statistics/score/manage/tollgate/info",select_month+'',select_road);
+		// 查询图四
+        init_people_rank_pre("statistics/stuff/score/info",select_month+'',select_road);
+        // 查询图五
+        init_people_rank_suf("statistics/stuff/score/info",select_month+'',select_road);
+        // 查询图六
+		init_server_check_type("statistics/lost/itemscore/rate",select_month+"",select_road);
+        // 查询图七
+		init_each_people_points("statistics/lost/twice/itemscore/rate",select_month+"",select_road);
+		// 加载图配置
+		echart();
+	});
+
+	// 加载图配置
+		echart();
+	/**
+	 * 初始化图一
+	 */
+	function init_company_year_assess(url,select_road){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00",
+			"dept_id":select_road,
+			"queryType":1
+		}
+		initRqueset(url,param,1);
+
+	}
+	init_company_year_assess("statistics/score/year/info",select_road);
+
+	/**
+	 * 初始化图二
+	 */
+	function init_company_points_assess(url,mon,select_road){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_road,
+			"queryType":1
+		}
+		initRqueset(url,param,2);
+	}
+    init_company_points_assess("statistics/lost/score/rate",month+'',select_road);
+    
+	/**
+	 * 初始化图三
+	 */
+    function init_stationAll_rank(url,mon,select_road){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_road
+		};
+		initRqueset(url,param,3);
+	}
+	init_stationAll_rank("statistics/score/manage/tollgate/info",month+"",select_road);
+
+	/**
+	 * 初始化图四
+	 */
+	function init_people_rank_pre(url,mon,select_road){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +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);
+    
+    /**
+	 * 初始化图五
+	 */
+	function init_people_rank_suf(url,mon,select_road){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +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);
+
+	/**
+	 * 初始化图六
+	 */
+    function init_server_check_type(url,mon,select_road){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_road,
+			"queryType":1
+		};
+		initRqueset(url,param,6);
+	}
+	init_server_check_type("statistics/lost/itemscore/rate",month+"",select_road);
+
+	/**
+	 * 初始化图七
+	 */
+    function init_each_people_points(url,mon,select_road){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"prev_mth": year + "/" + prev_mth,
+			"dept_id":select_road,
+			"queryType":1
+		};
+		initRqueset(url,param,7);
+	}
+	init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_road);
+	/**
+	 * 请求
+	 * @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){
+				// 画图
+				year_assess.setOption(roadManager_year_assess());
+			}else if(type == 2){
+				// 画图
+				points_assess.setOption(roadManager_points_assess()); 
+			}else if(type == 3){
+				// 画图
+				score_rank.setOption(tollStation_score_rank());
+			}else if(type == 4){
+				// 画图
+				rank_pre.setOption(people_rank_pre());
+			}else if(type == 5){
+				// 画图
+				rank_suf.setOption(people_rank_suf());
+			}else if(type == 6){
+				// 画图
+				check_type.setOption(server_check_type());
+			}else if(type == 7){
+				// 画图
+				people_points.setOption(each_people_points());
+			}
+		},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!=''){
+			if(data.length<12){
+				for(var i=0;i<12-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)).toFixed(1)));
+				}
+			}
+			}else{
+					array_year_score.length = 0;
+					months.length = 0;
+			}	
+		}else if(type == 2){
+			array_points.length=0;
+				if(data!=''){
+						array_points.push({"value": (data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty)),"name":'满分'});
+						array_points.push({"value": data.score_fifteen,"name":'0-15分'});
+						array_points.push({"value": data.score_fifty,"name":'15-50分'});
+						array_points.push({"value": data.score_over_fifty,"name":'50分以上'});
+				}else{
+					array_points.length=0;	
+				}
+			
+		}else if(type == 3){
+			array_allStation_score.length=0;
+			array_allStation.length=0;
+            for(var i=0;i<data.length;i++){
+				if(data!=''){
+					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3));
+					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+				}else{
+					array_allStation_score.length=0;
+			        array_allStation.length=0;	
+				}
+	        }
+		}else if(type == 4){
+			array_score_order.length=0;
+			array_score_data.length=0;
+				if(data!=''){
+					for(var i=0;i<data.length;i++){
+						array_score_order.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(0,data[i].user.fee_station_name.length-3)+")");
+						array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+				    }
+				 }else{
+					array_score_order.length=0;
+			        array_score_data.length=0;	
+				}
+	    }else if(type == 5){
+			array_score_last.length=0;
+			array_get_score.length=0;
+				if(data!=''){
+					for(var i=0;i<data.length;i++){
+						array_score_last.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(0,data[i].user.fee_station_name.length-3)+")");
+						array_get_score.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+				    }
+				 }else{
+					array_score_last.length=0;
+			        array_get_score.length=0;	
+				}
+	    }else if(type == 6){
+			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;	
+				}
+		}else if(type == 7){
+			array_points_name.length=0;
+			array_points_pre.length=0;
+			arrar_points_month.length=0;
+			data_each_people_points(data);
+		}
+	}
+
+	function data_each_people_points(data){
+			var flag = true;
+			var name = ['环境卫生','仪容仪表着装','表情','动作','文明用语','工作纪律及行为举止','便民服务','安全管理']
+			var Tmth = data.Tmth;
+			var Pmth = data.Pmth;
+			var Ntemp = new Array();
+			var Ptemp = new Array();
+			var Ttemp = new Array();
+			
+			for(var i= 0; i < name.length;i++){
+				flag = true;
+				if(Tmth.length > 0){
+					for(var j= 0; j< Tmth.length;j++){
+						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
+							Ttemp[i] = Tmth[j].all_check_score;
+							break;
+						}else{
+							Ttemp[i] = 0;
+						}
+					}
+				}else{
+					Ttemp[i] = 0;
+				}
+				if(Pmth.length > 0){
+					for(var m= 0; m< Pmth.length;m++){
+						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
+							Ptemp[i] = Pmth[m].all_check_score;
+							break;
+						}else{
+							Ptemp[i] = 0;
+						}
+					}
+				}else{
+					Ptemp[i] = 0;
+				}
+				if(Ttemp[i]== 0 && Ptemp[i] == 0){
+					name[i] = "";
+					flag = null;
+				}
+				if(name[i] != ""){
+					if(name[i]=='仪容仪表着装'){
+						name[i]='仪表';
+					}
+					if(name[i]=='工作纪律及行为举止'){
+						name[i]='行为';
+					}
+					array_points_name.push(name[i]);
+				}
+
+				if(flag){
+					array_points_pre.push(Ptemp[i]);
+					arrar_points_month.push(Ttemp[i]);
+				}
+			}
+	}
+
+    /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num4){
+		if(num1 == 0 || num2 == 0){
+			return num4;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+
+	function filter(num,num1,num2){
+		if(num1 == 0){
+			return num2;
+		}else{
+			return (num/num1);
+		}
+	}
+    
+    function echart(){
         // 路径配置
         // 路径配置
         require.config({
         require.config({
             paths: {
             paths: {
@@ -15,21 +392,16 @@ $(function(){
 		],
 		],
 	function (ec) {
 	function (ec) {
 			// 基于准备好的dom,初始化echarts图表
 			// 基于准备好的dom,初始化echarts图表
-			var year_assess = ec.init(document.getElementById('roadManager-year-assess')); 
-			var points_assess = ec.init(document.getElementById('roadManager-points-assess'));
-			var score_rank = ec.init(document.getElementById('tollStation-score-rank'));
-			var rank_pre = ec.init(document.getElementById('people-rank-pre'));
-            var rank_suf = ec.init(document.getElementById('people-rank-suf'));
-			var check_type = ec.init(document.getElementById('server-check-type'));
-			var people_points = ec.init(document.getElementById('each-people-points'));
-			// 为echarts对象加载数据 
-			year_assess.setOption(roadManager_year_assess()); 
-			points_assess.setOption(roadManager_points_assess()); 
-			score_rank.setOption(tollStation_score_rank());
-			rank_pre.setOption(people_rank_pre());
-            rank_suf.setOption(people_rank_suf());
-			check_type.setOption(server_check_type());
-			people_points.setOption(each_people_points());
+			year_assess = ec.init(document.getElementById('roadManager-year-assess')); 
+			points_assess = ec.init(document.getElementById('roadManager-points-assess'));
+		    score_rank = ec.init(document.getElementById('tollStation-score-rank'));
+			rank_pre = ec.init(document.getElementById('people-rank-pre'));
+            rank_suf = ec.init(document.getElementById('people-rank-suf'));
+			check_type = ec.init(document.getElementById('server-check-type'));
+			people_points = ec.init(document.getElementById('each-people-points'));
+			}
+		); 
+	}	
 
 
 			/**
 			/**
 			 * 图一
 			 * 图一
@@ -69,7 +441,7 @@ $(function(){
 						{
 						{
 							name:'平均分',
 							name:'平均分',
 							type:'line',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data:array_year_score,
 							markPoint : {
 							markPoint : {
 								data : [
 								data : [
 									{type : 'max', name: '最大值'},
 									{type : 'max', name: '最大值'},
@@ -123,12 +495,7 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'0-15分'},
-							{value:310, name:'15-50分'},
-							{value:234, name:'50分以上'},
-							{value:135, name:'满分'}
-						]
+						data:array_points
 					}
 					}
 				]
 				]
 			};
 			};
@@ -145,12 +512,14 @@ $(function(){
 				tooltip : {
 				tooltip : {
 					trigger: 'axis'
 					trigger: 'axis'
 				},
 				},
-				
+				grid:{
+                    width:420  // 图表宽度
+                },
 				calculable : true,
 				calculable : true,
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['灌云北','灌云东','灌南东','响水','六套','滨海','蔡桥',]
+						data : array_allStation
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -164,7 +533,7 @@ $(function(){
 					{
 					{
 						
 						
 						type:'bar',
 						type:'bar',
-						data:[980, 950, 1000,944,988,963,949],
+						data:array_allStation_score,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -194,6 +563,10 @@ $(function(){
 				tooltip : {
 				tooltip : {
 					trigger: 'axis'
 					trigger: 'axis'
 				},
 				},
+				grid:{
+                    width:470,  // 图表宽度
+					x:40
+                },
 				legend: {
 				legend: {
 					data:['平均分']
 					data:['平均分']
 				},
 				},
@@ -201,8 +574,10 @@ $(function(){
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)',
-                        '小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)']
+						axisLabel :{  
+                           interval:0  // 显示x轴所有信息,不隐藏部分  
+                        },
+						data : array_score_order
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -216,7 +591,7 @@ $(function(){
 					{
 					{
 						name:'平均分',
 						name:'平均分',
 						type:'bar',
 						type:'bar',
-						data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0],
+						data: array_score_data,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -253,6 +628,10 @@ $(function(){
 				tooltip : {
 				tooltip : {
 					trigger: 'axis'
 					trigger: 'axis'
 				},
 				},
+				grid:{
+                    width:470,  // 图表宽度
+					x:40
+                },
 				legend: {
 				legend: {
 					data:['平均分']
 					data:['平均分']
 				},
 				},
@@ -260,8 +639,10 @@ $(function(){
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['小明\n(灌云北)','小明1\n(灌云北)','小明2\n(灌云北)','小明3\n(灌云北)','小明4\n(灌云北)',
-                        '小明5\n(灌云北)','小明6\n(灌云北)','小明7\n(灌云北)','小明8\n(灌云北)','小明9\n(灌云北)']
+						axisLabel :{  
+                           interval:0  // 显示x轴所有信息,不隐藏部分  
+                        },
+						data : array_score_last
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -275,7 +656,7 @@ $(function(){
 					{
 					{
 						name:'平均分',
 						name:'平均分',
 						type:'bar',
 						type:'bar',
-						data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0],
+						data: array_get_score,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -336,16 +717,7 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 					}
 				]
 				]
 			};
 			};
@@ -360,6 +732,9 @@ $(function(){
 			tooltip : {
 			tooltip : {
 				trigger: 'axis'
 				trigger: 'axis'
 			},
 			},
+			grid:{
+                    width:420  // 图表宽度
+                },
 			legend: {
 			legend: {
 				data:['上月','本月']
 				data:['上月','本月']
 			},
 			},
@@ -367,7 +742,7 @@ $(function(){
 			xAxis : [
 			xAxis : [
 				{
 				{
 					type : 'category',
 					type : 'category',
-					data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
+					data : array_points_name
 				}
 				}
 			],
 			],
 			yAxis : [
 			yAxis : [
@@ -379,7 +754,7 @@ $(function(){
 				{
 				{
 					name:'上月',
 					name:'上月',
 					type:'bar',
 					type:'bar',
-					data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
+					data: array_points_pre,
 					itemStyle: {
 					itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -392,7 +767,7 @@ $(function(){
 				{
 				{
 					name:'本月',
 					name:'本月',
 					type:'bar',
 					type:'bar',
-					data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
+					data: arrar_points_month,
 					itemStyle: {
 					itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -407,8 +782,6 @@ $(function(){
 					return option;
 					return option;
 			}
 			}
 			
 			
-		}
-  ); 
-
+	
    
    
 });
 });

+ 416 - 46
VisualInspection/js/statistics/toll_station_statistics.js

@@ -1,4 +1,387 @@
-$(function(){
+     	var year = new Date().getFullYear();
+		var month = new Date().getMonth()+1;
+		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();
+		var array_points = new Array();
+		var array_check_type = new Array();
+		var array_points_name = new Array();
+		var array_points_pre = new Array();
+		var arrar_points_month = new Array();
+		var array_score_order = new Array();
+		var array_score_data = new Array();
+		var array_five_name = new Array();
+		var array_five_score = new Array();
+		var year_assess;
+		var points_assess;
+		var check_type;
+		var people_points;
+		var score_rank;
+		var rank_assess;
+$(function(){     
+	setSecond();
+    // 显示当前月份
+	$(".div-month select").val(month);
+
+	$(".div-button button").click(function(){	
+		var select_month = $(".div-month select").val();
+		var select_station = $(".div-station select").val();
+		// 查询图一
+		init_tollStation_year_assess("statistics/score/year/info",select_station);
+		// 查询图二
+		init_company_points_assess("statistics/lost/score/rate",select_month+'',select_station);
+        // 查询图三
+		init_progress_rank_assess("statistics/fs/up/five",month+'',select_station)
+        // 查询图四
+		init_people_score_rank("statistics/stuff/score/info",select_month+'',select_station);
+        // 查询图五
+		init_server_check_type("statistics/lost/itemscore/rate",select_month+"",select_station);
+        // 查询图六
+		init_each_people_points("statistics/lost/twice/itemscore/rate",select_month+"",select_station);
+		// 加载图配置
+		echart();
+	});
+
+	// 加载图配置
+		echart();
+    
+	/**
+	 * 初始化图一
+	 */
+	function init_tollStation_year_assess(url,select_station){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00",
+			"dept_id":select_station,
+			"queryType":2
+		}
+		initRqueset(url,param,1);
+	}
+	
+
+	/**
+	 * 初始化图二
+	 */
+	function init_company_points_assess(url,mon,select_station){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +mon,
+			"dept_id":select_station,
+			"queryType":2
+		}
+		initRqueset(url,param,2);
+	}
+
+	/**
+	 * 初始化图三
+	 */
+	function init_progress_rank_assess(url,mon,select_station){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"dept_id":select_station,
+			"prev_mth": year + "/" + prev_mth,
+			"order_type":0
+		};
+		initRqueset(url,param,3);
+	} 
+
+	/**
+	 * 初始化图四
+	 */
+	function init_people_score_rank(url,mon,select_station){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +mon,
+			"dept_id":select_station,
+			"queryType":2,
+            "order_type":1
+		}
+		initRqueset(url,param,4);
+	}
+    
+	/**
+	 * 初始化图五
+	 */
+    function init_server_check_type(url,mon,select_station){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_station,
+			"queryType":2
+		};
+		initRqueset(url,param,5);
+	}
+	
+
+	/**
+	 * 初始化图六
+	 */
+    function init_each_people_points(url,mon,select_station){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"prev_mth": year + "/" + prev_mth,
+			"dept_id":select_station,
+			"queryType":1
+		};
+		initRqueset(url,param,6);
+	}
+	
+
+	/**
+	 * 请求
+	 * @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){
+				// 画图
+				year_assess.setOption(tollStation_year_assess()); 
+			}else if(type == 2){
+				// 画图
+				points_assess.setOption(tollStation_points_assess()); 
+			}else if(type == 3){
+				// 画图
+				rank_assess.setOption(progress_rank_assess());
+			}else if(type == 4){
+				// 画图
+				score_rank.setOption(people_score_rank());
+			}else if(type == 5){
+				// 画图
+				check_type.setOption(server_check_type());
+			}else if(type == 6){
+				// 画图
+				people_points.setOption(each_people_points());
+			}
+		},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!=''){
+			if(data.length<12){
+				for(var i=0;i<12-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)).toFixed(1)));
+				}
+			}
+			}else{
+					array_year_score.length = 0;
+					months.length = 0;
+			}	
+		}else if(type == 2){
+			array_points.length=0;
+				if(data!=''){
+					array_points.push({"value": (data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty)),"name":'满分'});
+					array_points.push({"value": data.score_fifteen,"name":'0-15分'});
+					array_points.push({"value": data.score_fifty,"name":'15-50分'});
+					array_points.push({"value": data.score_over_fifty,"name":'50分以上'});
+				 }else{
+					array_points.length=0;	
+			}
+		}else if(type == 3){
+			array_five_name.length=0;
+			array_five_score.length=0;
+			if(data!=''){
+				for(var i=0;i<data.length;i++){
+					array_five_name.push(data[i].user.truename);
+					array_five_score.push(data[i].ranking_change);
+				}
+				}else{
+					array_five_name.length=0;
+			        array_five_score.length=0;
+			    }
+		}else if(type == 4){
+		array_score_order.length=0;
+		array_score_data.length=0;
+			if(data!=''){
+				for(var i=0;i<data.length;i++){
+					array_score_order.push(data[i].user.truename);
+					array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+				}
+				}else{
+					array_score_order.length=0;
+					array_score_data.length=0;	
+			    }
+		}else if(type == 5){
+		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;	
+				}
+		}else if(type == 6){
+		array_points_name.length=0;
+		array_points_pre.length=0;
+		arrar_points_month.length=0;
+		data_each_people_points(data);
+		}
+	}
+  
+	function data_each_people_points(data){
+			var flag = true;
+			var name = ['环境卫生','仪容仪表着装','表情','动作','文明用语','工作纪律及行为举止','便民服务','安全管理']
+			var Tmth = data.Tmth;
+			var Pmth = data.Pmth;
+			var Ntemp = new Array();
+			var Ptemp = new Array();
+			var Ttemp = new Array();
+			
+			for(var i= 0; i < name.length;i++){
+				flag = true;
+				if(Tmth.length > 0){
+					for(var j= 0; j< Tmth.length;j++){
+						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
+							Ttemp[i] = Tmth[j].all_check_score;
+							break;
+						}else{
+							Ttemp[i] = 0;
+						}
+					}
+				}else{
+					Ttemp[i] = 0;
+				}
+				if(Pmth.length > 0){
+					for(var m= 0; m< Pmth.length;m++){
+						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
+							Ptemp[i] = Pmth[m].all_check_score;
+							break;
+						}else{
+							Ptemp[i] = 0;
+						}
+					}
+				}else{
+					Ptemp[i] = 0;
+				}
+				if(Ttemp[i]== 0 && Ptemp[i] == 0){
+					name[i] = "";
+					flag = null;
+				}
+				if(name[i] != ""){
+					if(name[i]=='仪容仪表着装'){
+						name[i]='仪表';
+					}
+					if(name[i]=='工作纪律及行为举止'){
+						name[i]='行为';
+					}
+					array_points_name.push(name[i]);
+				}
+
+				if(flag){
+					array_points_pre.push(Ptemp[i]);
+					arrar_points_month.push(Ttemp[i]);
+				}
+			}
+	    }
+		
+    /**
+	 * 根据道管中心获取收费站列表(下拉框)
+	 */
+	$(".div-roadManage select").change(function(){
+		setSecond();
+	});
+	function setSecond(){ 
+        var select_road = $(".div-roadManage select").val();
+		var sec = document.getElementById('second');
+		var tempStr = ''
+		var param = {
+			 "parentid":select_road
+		}
+		post_common_service("dept/getDeptInfosByDeptId",param,function(data){
+			if(data.length!=0){
+				for(var i=0;i<data.length;i++){
+					if(select_road==30){
+				 	    tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+			        }else if(select_road==31){
+						tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+					}else{
+						tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+					}
+				sec.innerHTML=tempStr;
+				}
+			}else{
+				sec.innerHTML='';	
+			}
+			var select_station = $("#second").val();
+			// 页面初始化
+			init_tollStation_year_assess("statistics/score/year/info",select_station);
+			init_company_points_assess("statistics/lost/score/rate",month+'',select_station);
+			init_progress_rank_assess("statistics/fs/up/five",month+'',select_station)
+			init_people_score_rank("statistics/stuff/score/info",month+'',select_station);
+			init_server_check_type("statistics/lost/itemscore/rate",month+"",select_station);
+			init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_station);
+		},function(error){
+        	return "" ;
+    	});
+    }
+	
+    /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num3){
+		if(num1 == 0 || num2 == 0){
+			return num3;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+
+	function filter(num,num1,num2){
+		if(num1 == 0){
+			return num2;
+		}else{
+			return (num/num1);
+		}
+	}
+
+	function echart(){
         // 路径配置
         // 路径配置
         require.config({
         require.config({
             paths: {
             paths: {
@@ -13,22 +396,17 @@ $(function(){
 			'echarts/chart/bar',
 			'echarts/chart/bar',
 			'echarts/chart/pie'
 			'echarts/chart/pie'
 		],
 		],
-	function (ec) {
-			// 基于准备好的dom,初始化echarts图表
-			var year_assess = ec.init(document.getElementById('tollStation-year-assess')); 
-			var points_assess = ec.init(document.getElementById('tollStation-points-assess'));
-			var rank_assess = ec.init(document.getElementById('progress-rank-assess'));
-			var score_rank = ec.init(document.getElementById('people-score-rank'));
-			var check_type = ec.init(document.getElementById('server-check-type'));
-			var people_points = ec.init(document.getElementById('each-people-points'));
-			// 为echarts对象加载数据 
-			year_assess.setOption(tollStation_year_assess()); 
-			points_assess.setOption(tollStation_points_assess()); 
-			rank_assess.setOption(progress_rank_assess());
-			score_rank.setOption(people_score_rank());
-			check_type.setOption(server_check_type());
-			people_points.setOption(each_people_points());
-
+		function (ec) {
+				// 基于准备好的dom,初始化echarts图表
+				year_assess = ec.init(document.getElementById('tollStation-year-assess')); 
+				points_assess = ec.init(document.getElementById('tollStation-points-assess'));
+				rank_assess = ec.init(document.getElementById('progress-rank-assess'));
+				score_rank = ec.init(document.getElementById('people-score-rank'));
+				check_type = ec.init(document.getElementById('server-check-type'));
+				people_points = ec.init(document.getElementById('each-people-points'));
+				}
+	    ); 
+	}
 			/**
 			/**
 			 * 图一
 			 * 图一
 			 */
 			 */
@@ -50,7 +428,7 @@ $(function(){
 						{
 						{
 							type : 'category',
 							type : 'category',
 							boundaryGap : false,
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : monthsCH
 						}
 						}
 					],
 					],
 					yAxis : [
 					yAxis : [
@@ -67,7 +445,7 @@ $(function(){
 						{
 						{
 							name:'平均分',
 							name:'平均分',
 							type:'line',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data:array_year_score,
 							markPoint : {
 							markPoint : {
 								data : [
 								data : [
 									{type : 'max', name: '最大值'},
 									{type : 'max', name: '最大值'},
@@ -121,12 +499,7 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'0-15分'},
-							{value:310, name:'15-50分'},
-							{value:234, name:'50分以上'},
-							{value:135, name:'满分'}
-						]
+						data:array_points
 					}
 					}
 				]
 				]
 			};
 			};
@@ -143,6 +516,9 @@ $(function(){
 				tooltip : {
 				tooltip : {
 					trigger: 'axis'
 					trigger: 'axis'
 				},
 				},
+				grid:{
+                    width:420  // 图表宽度
+                },
 				legend: {
 				legend: {
 					data:['进步名次']
 					data:['进步名次']
 				},
 				},
@@ -150,7 +526,7 @@ $(function(){
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['小明','小白','小龙','大白菜','小蛇']
+						data : array_five_name
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -162,7 +538,7 @@ $(function(){
 					{
 					{
 						name:'进步名次',
 						name:'进步名次',
 						type:'bar',
 						type:'bar',
-						data:[4, 9, 10,8,6],
+						data: array_five_score,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -187,6 +563,10 @@ $(function(){
 				tooltip : {
 				tooltip : {
 					trigger: 'axis'
 					trigger: 'axis'
 				},
 				},
+				grid:{
+                    width:1010,  // 图表宽度
+					x:40
+                },
 				legend: {
 				legend: {
 					data:['平均分']
 					data:['平均分']
 				},
 				},
@@ -194,8 +574,7 @@ $(function(){
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['小明','小红','小白','小兰','小紫','小青','小明','小红','小白','小兰','小紫','小青',
-                                '小明','小红','小白','小兰','小紫','小青','小明','小红','小白','小兰','小紫','小青']
+						data : array_score_order
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -209,8 +588,7 @@ $(function(){
 					{
 					{
 						name:'平均分',
 						name:'平均分',
 						type:'bar',
 						type:'bar',
-						data:[950.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0, 975.4, 950.3,
-                              980.0, 920, 945, 930, 970, 950, 955, 995, 985.6, 990.0, 975.4, 950.3],
+						data: array_score_data,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -265,16 +643,7 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 					}
 				]
 				]
 			};
 			};
@@ -289,6 +658,9 @@ $(function(){
 			tooltip : {
 			tooltip : {
 				trigger: 'axis'
 				trigger: 'axis'
 			},
 			},
+			grid:{
+                    width:420  // 图表宽度
+                },
 			legend: {
 			legend: {
 				data:['上月','本月']
 				data:['上月','本月']
 			},
 			},
@@ -296,7 +668,7 @@ $(function(){
 			xAxis : [
 			xAxis : [
 				{
 				{
 					type : 'category',
 					type : 'category',
-					data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
+					data : array_points_name
 				}
 				}
 			],
 			],
 			yAxis : [
 			yAxis : [
@@ -308,7 +680,7 @@ $(function(){
 				{
 				{
 					name:'上月',
 					name:'上月',
 					type:'bar',
 					type:'bar',
-					data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
+					data:array_points_pre,
 					itemStyle: {
 					itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -321,7 +693,7 @@ $(function(){
 				{
 				{
 					name:'本月',
 					name:'本月',
 					type:'bar',
 					type:'bar',
-					data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
+					data:arrar_points_month,
 					itemStyle: {
 					itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -336,8 +708,6 @@ $(function(){
 					return option;
 					return option;
 			}
 			}
 			
 			
-		}
-  ); 
 
 
    
    
 });
 });

+ 369 - 67
VisualInspection/js/statistics/total_company_statistics.js

@@ -1,39 +1,358 @@
+		var year = new Date().getFullYear();
+		var month = new Date().getMonth()+1;
+		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();
+		var array_allStation = new Array();
+		var array_allStation_score = new Array();
+		var array_check_type = new Array();
+		var array_points_name = new Array();
+		var array_points_pre = new Array();
+		var arrar_points_month = new Array();
+		var year_assess;
+		var points_assess ;
+		var score_rank;
+		var stationAll_rank;
+		var check_type;
+		var people_points;
 $(function(){
 $(function(){
-        // 路径配置
-        require.config({
-            paths: {
-                echarts: '/js/lib/echarts/build/dist'
-            }
-        }); 
-        // 使用
-	    require(
-		[
-			'echarts',
-			'echarts/chart/line', 
-			'echarts/chart/bar',
-			'echarts/chart/pie'
-		],
-	function (ec) {
-			// 基于准备好的dom,初始化echarts图表
-			var year_assess = ec.init(document.getElementById('company-year-assess')); 
-			var points_assess = ec.init(document.getElementById('company-points-assess'));
-			var score_rank = ec.init(document.getElementById('roadManager-score-rank'));
-			var stationAll_rank = ec.init(document.getElementById('company-stationAll-rank'));
-			var check_type = ec.init(document.getElementById('server-check-type'));
-			var people_points = ec.init(document.getElementById('each-people-points'));
-			// 为echarts对象加载数据 
-			year_assess.setOption(company_year_assess()); 
-			points_assess.setOption(company_points_assess()); 
-			score_rank.setOption(road_manager_score_rank());
-			stationAll_rank.setOption(company_stationAll_rank());
-			check_type.setOption(server_check_type());
-			people_points.setOption(each_people_points());
+	// 显示当前月份
+	$(".div-month select").val(month);
+
+	$(".query-company").click(function(){	
+		var select_month = $(".div-month select").val();
+		// 查询图一
+		init_company_year_assess();
+		// 查询图二
+		init_company_points_assess("statistics/lost/score/rate",select_month+'');
+		// 查询图三
+		init_road_manager_score_rank_three("statistics/score/center/manage/info",select_month+'');
+		// 查询图四
+		init_stationAll_rank_four("statistics/score/tollgate/info",select_month+'');
+		// 查询图五
+		init_server_check_type_five("statistics/lost/itemscore/rate",select_month+"");
+		// 查询图六
+		init_each_people_points_six("statistics/lost/twice/itemscore/rate",select_month+"");
+		// 加载图配置
+		echart();
+	});
+	// 加载图配置
+    echart();
+
+	/**
+	 * 初始化图一
+	 */
+	function init_company_year_assess(){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00"
+		}
+		initRqueset("statistics/score/year/info",param,1);
+
+	}
+    init_company_year_assess();
+    /**
+	 * 初始化图二
+	 */
+	function init_company_points_assess(url,mon){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"queryType":0
+		}
+		initRqueset(url,param,2);
+	}
+    init_company_points_assess("statistics/lost/score/rate",month+"");
+
+
+	/**
+	 * 初始化图三
+	 */
+    function init_road_manager_score_rank_three(url,mon){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon
+		};
+		initRqueset(url,param,3);
+	}
+	init_road_manager_score_rank_three("statistics/score/center/manage/info",month+"");
+
+	/**
+	 * 初始化图四
+	 */
+    function init_stationAll_rank_four(url,mon){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon
+		};
+		initRqueset(url,param,4);
+	}
+	init_stationAll_rank_four("statistics/score/tollgate/info",month+"");
+
+	/**
+	 * 初始化图五
+	 */
+    function init_server_check_type_five(url,mon){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"queryType":0
+		};
+		initRqueset(url,param,5);
+	}
+	init_server_check_type_five("statistics/lost/itemscore/rate",month+"");
+
+	/**
+	 * 初始化图六
+	 */
+    function init_each_people_points_six(url,mon){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"prev_mth": year + "/" + prev_mth,
+			"queryType":0
+		};
+		initRqueset(url,param,6);
+	}
+	init_each_people_points_six("statistics/lost/twice/itemscore/rate",month+"");
+    
+	/**
+	 * 请求
+	 * @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){
+				// 画图
+				year_assess.setOption(company_year_assess_one()); 
+			}else if(type == 2){
+				//array_points= [];
+				// 画图
+				points_assess.setOption(company_points_assess_two());
+			}else if(type == 3){
+				// 画图
+				score_rank.setOption(road_manager_score_rank_three());
+			}else if(type == 4){
+				// 画图
+				stationAll_rank.setOption(company_stationAll_rank_four());
+			}else if(type == 5){
+				// 画图
+				check_type.setOption(server_check_type_five());
+			}else if(type == 6){
+				// 画图
+				people_points.setOption(each_people_points_six());
+			}
+		},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!=''){
+			if(data.length<12){
+				for(var i=0;i<12-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)).toFixed(1)));
+				}
+			}
+			}else{
+					array_year_score.length = 0;
+					months.length = 0;
+			}	
+		}else if(type == 2){
+			array_points.length=0;
+			    if(data!=''){
+					array_points.push({"value": (data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty)),"name":'满分'});
+					array_points.push({"value": data.score_fifteen,"name":'0-15分'});
+					array_points.push({"value": data.score_fifty,"name":'15-50分'});
+					array_points.push({"value": data.score_over_fifty,"name":'50分以上'});
+				 }else{
+					array_points.length=0;	
+				}
+		}else if(type == 3){
+					array_road.length=0;
+					array_road_score.length=0;
+			for(var i=0;i<data.length;i++){
+				if(data!=''){
+					array_road.push(data[i].feeStationName);
+					array_road_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+		        }else{
+					array_road.length=0;
+			        array_road_score.length=0;	
+				}	
+		    }
+		}else if(type == 4){
+			array_allStation_score.length=0;
+			array_allStation.length=0;
+            for(var i=0;i<data.length;i++){
+				if(data!=''){
+					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3));
+					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+				}else{
+					array_allStation_score.length=0;
+			        array_allStation.length=0;	
+				}
+	        }
+		}else if(type == 5){
+			array_check_type = [];
+                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;	
+				}
+		}else if(type == 6){
+			array_points_name.length=0;
+			array_points_pre.length=0;
+			arrar_points_month.length=0;
+			data_each_people_points(data);
+		}
+	}
+
+	function data_each_people_points(data){
+			var flag = true;
+			var name = ['环境卫生','仪容仪表着装','表情','动作','文明用语','工作纪律及行为举止','便民服务','安全管理']
+			var Tmth = data.Tmth;
+			var Pmth = data.Pmth;
+			var Ntemp = new Array();
+			var Ptemp = new Array();
+			var Ttemp = new Array();
+			
+			for(var i= 0; i < name.length;i++){
+				flag = true;
+				if(Tmth.length > 0){
+					for(var j= 0; j< Tmth.length;j++){
+						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
+							Ttemp[i] = Tmth[j].all_check_score;
+							break;
+						}else{
+							Ttemp[i] = 0;
+						}
+					}
+				}else{
+					Ttemp[i] = 0;
+				}
+				if(Pmth.length > 0){
+					for(var m= 0; m< Pmth.length;m++){
+						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
+							Ptemp[i] = Pmth[m].all_check_score;
+							break;
+						}else{
+							Ptemp[i] = 0;
+						}
+					}
+				}else{
+					Ptemp[i] = 0;
+				}
+				if(Ttemp[i]== 0 && Ptemp[i] == 0){
+					name[i] = "";
+					flag = null;
+				}
+				if(name[i] != ""){
+					if(name[i]=='仪容仪表着装'){
+						name[i]='仪表';
+					}
+					if(name[i]=='工作纪律及行为举止'){
+						name[i]='行为';
+					}
+					array_points_name.push(name[i]);
+				}
+
+				if(flag){
+					array_points_pre.push(Ptemp[i]);
+					arrar_points_month.push(Ttemp[i]);
+				}
+			}
+	}
+    
+    /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num4){
+		if(num1 == 0 || num2 == 0){
+			return num4;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+	
+	/**
+	 * 图配置
+	 */
+	function echart(){
+			// 路径配置
+			require.config({
+				paths: {
+					echarts: '/js/lib/echarts/build/dist'
+				}
+			}); 
+			// 使用
+			require(
+			[
+				'echarts',
+				'echarts/chart/line', 
+				'echarts/chart/bar',
+				'echarts/chart/pie'
+			],
+		function (ec) {
+				// 基于准备好的dom,初始化echarts图表
+				year_assess = ec.init(document.getElementById('company-year-assess')); 
+				points_assess = ec.init(document.getElementById('company-points-assess'));
+				score_rank = ec.init(document.getElementById('roadManager-score-rank'));
+				stationAll_rank = ec.init(document.getElementById('company-stationAll-rank'));
+				check_type = ec.init(document.getElementById('server-check-type'));
+				people_points = ec.init(document.getElementById('each-people-points'));
+
+			}
+		); 
+	}	
 
 
 			/**
 			/**
 			 * 图一
 			 * 图一
 			 */
 			 */
-	    	function company_year_assess(){
-			
+	    	function company_year_assess_one(){
+				//debugger;
 				option = {
 				option = {
 					color : [ '#00ced1' ],
 					color : [ '#00ced1' ],
 					tooltip : {
 					tooltip : {
@@ -50,13 +369,13 @@ $(function(){
 						{
 						{
 							type : 'category',
 							type : 'category',
 							boundaryGap : false,
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : monthsCH
 						}
 						}
 					],
 					],
 					yAxis : [
 					yAxis : [
 						{
 						{
 							type : 'value',
 							type : 'value',
-							min : 700 ,
+							min : 900 ,
 						    max : 1000,
 						    max : 1000,
 							axisLabel : {
 							axisLabel : {
 								formatter: '{value}'
 								formatter: '{value}'
@@ -67,7 +386,7 @@ $(function(){
 						{
 						{
 							name:'平均分',
 							name:'平均分',
 							type:'line',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data:array_year_score,
 							markPoint : {
 							markPoint : {
 								data : [
 								data : [
 									{type : 'max', name: '最大值'},
 									{type : 'max', name: '最大值'},
@@ -85,12 +404,12 @@ $(function(){
 				};
 				};
 						return option;
 						return option;
 		}
 		}
-			
+					
 
 
         /**
         /**
 		 * 图二
 		 * 图二
 		 */
 		 */
-		function company_points_assess(){
+		function company_points_assess_two(){
 			option = {
 			option = {
 				tooltip : {
 				tooltip : {
 					trigger: 'item',
 					trigger: 'item',
@@ -121,12 +440,7 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'0-15分'},
-							{value:310, name:'15-50分'},
-							{value:234, name:'50分以上'},
-							{value:135, name:'满分'}
-						]
+						data:array_points
 					}
 					}
 				]
 				]
 			};
 			};
@@ -137,7 +451,7 @@ $(function(){
         /**
         /**
 		 * 图三 
 		 * 图三 
 		 */
 		 */
-		function road_manager_score_rank(){
+		function road_manager_score_rank_three(){
 			option = {
 			option = {
 				color : [ '#00ced1' ],// 条形图颜色
 				color : [ '#00ced1' ],// 条形图颜色
 				tooltip : {
 				tooltip : {
@@ -148,7 +462,7 @@ $(function(){
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['连云港','南通','盐城']
+						data : array_road
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -162,7 +476,7 @@ $(function(){
 					{
 					{
 						
 						
 						type:'bar',
 						type:'bar',
-						data:[980, 950, 1000],
+						data:array_road_score,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -186,7 +500,7 @@ $(function(){
         /**
         /**
 		 * 图四
 		 * 图四
 		 */
 		 */
-		function company_stationAll_rank(){
+		function company_stationAll_rank_four(){
 					option = {
 					option = {
 				color : [ '#00ced1' ],// 条形图颜色
 				color : [ '#00ced1' ],// 条形图颜色
 				tooltip : {
 				tooltip : {
@@ -199,7 +513,7 @@ $(function(){
 				xAxis : [
 				xAxis : [
 					{
 					{
 						type : 'category',
 						type : 'category',
-						data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
+						data : array_allStation
 					}
 					}
 				],
 				],
 				yAxis : [
 				yAxis : [
@@ -213,7 +527,7 @@ $(function(){
 					{
 					{
 						name:'平均分',
 						name:'平均分',
 						type:'bar',
 						type:'bar',
-						data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0, 975.4, 950.3],
+						data:array_allStation_score,
 					    itemStyle: {
 					    itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -237,7 +551,7 @@ $(function(){
          /**
          /**
 		 * 图五
 		 * 图五
 		 */
 		 */
-		function server_check_type(){
+		function server_check_type_five(){
 			option = {
 			option = {
 				tooltip : {
 				tooltip : {
 					trigger: 'item',
 					trigger: 'item',
@@ -268,16 +582,7 @@ $(function(){
 						type:'pie',
 						type:'pie',
 						radius : '65%',
 						radius : '65%',
 						center: ['50%', '50%'],
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 					}
 				]
 				]
 			};
 			};
@@ -287,7 +592,7 @@ $(function(){
         /**
         /**
 		 * 图六 
 		 * 图六 
 		 */
 		 */
-		function each_people_points(){
+		function each_people_points_six(){
 					option = {
 					option = {
 			tooltip : {
 			tooltip : {
 				trigger: 'axis'
 				trigger: 'axis'
@@ -299,7 +604,7 @@ $(function(){
 			xAxis : [
 			xAxis : [
 				{
 				{
 					type : 'category',
 					type : 'category',
-					data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
+					data : array_points_name
 				}
 				}
 			],
 			],
 			yAxis : [
 			yAxis : [
@@ -311,7 +616,7 @@ $(function(){
 				{
 				{
 					name:'上月',
 					name:'上月',
 					type:'bar',
 					type:'bar',
-					data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
+					data:array_points_pre,
 					itemStyle: {
 					itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -324,7 +629,7 @@ $(function(){
 				{
 				{
 					name:'本月',
 					name:'本月',
 					type:'bar',
 					type:'bar',
-					data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
+					data:arrar_points_month,
 					itemStyle: {
 					itemStyle: {
 						normal: {
 						normal: {
 							label: {
 							label: {
@@ -338,9 +643,6 @@ $(function(){
 		};					
 		};					
 					return option;
 					return option;
 			}
 			}
-			
-		}
-  ); 
+		
 
 
-   
 });
 });

+ 17 - 16
VisualInspection/js/util/media.js

@@ -1,22 +1,23 @@
-function video_paly() {
-   var height = 264;
-   var width = 640;
+function video_paly(src) {
+    var height = 264;
+    var width = 640;
+
+    alert(src)
 
 
     __inline('/node_modules/video.js/dist/video.min.js');
     __inline('/node_modules/video.js/dist/video.min.js');
-    var css = "<style lang='css/text'>"+ __inline('/node_modules/video.js/dist/video-js.min.css')+"  .video-js .vjs-fullscreen-control { display: none;} </style>";
+    var css = "<style lang='css/text'>" + __inline('/node_modules/video.js/dist/video-js.min.css') + "  .video-js .vjs-fullscreen-control { display: none;} </style>";
+
+    var list = src.split(".");
+    var videotype = "x-msvideo"
 
 
-        
-    var html =css+ '<video' +
+    var html = css + '<video' +
         '    id="my-player"' +
         '    id="my-player"' +
         '    class="video-js"' +
         '    class="video-js"' +
         '    controls' +
         '    controls' +
         '    preload="auto"' +
         '    preload="auto"' +
-        '    poster="//vjs.zencdn.net/v/oceans.png"' +
-        '    width="'+width+'" height="'+height+'"' +
+        '    width="' + width + '" height="' + height + '"' +
         '    data-setup=\'{}\'>' +
         '    data-setup=\'{}\'>' +
-        '  <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4"></source>' +
-        '  <source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm"></source>' +
-        '  <source src="//vjs.zencdn.net/v/oceans.ogv" type="video/ogg"></source>' +
+        '  <source src="' + src + '" type="video/avi"></source>' +
         '  <p class="vjs-no-js">' +
         '  <p class="vjs-no-js">' +
         '    To view this video please enable JavaScript, and consider upgrading to a' +
         '    To view this video please enable JavaScript, and consider upgrading to a' +
         '    web browser that' +
         '    web browser that' +
@@ -27,7 +28,7 @@ function video_paly() {
         '</video>';
         '</video>';
 
 
     layer.open({
     layer.open({
-        area: [width+"px", height+"px"],
+        area: [width + "px", height + "px"],
         type: 1,
         type: 1,
         title: false,
         title: false,
         closeBtn: 0,
         closeBtn: 0,
@@ -37,8 +38,8 @@ function video_paly() {
 
 
     var player = videojs('my-player');
     var player = videojs('my-player');
 
 
-    var options = { 
-         
+    var options = {
+
     };
     };
 
 
     var player = videojs('my-player', options, function onPlayerReady() {
     var player = videojs('my-player', options, function onPlayerReady() {
@@ -48,10 +49,10 @@ function video_paly() {
         this.play();
         this.play();
 
 
         // How about an event listener?
         // How about an event listener?
-        this.on('ended', function () {
+        this.on('ended', function() {
             videojs.log('Awww...over so soon?!');
             videojs.log('Awww...over so soon?!');
         });
         });
-       
+
     });
     });
 
 
 }
 }

+ 2 - 2
VisualInspection/view/mytask/check.html

@@ -55,7 +55,7 @@
                                     </div>
                                     </div>
                                     <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
                                     <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
                                         <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
                                         <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
-                                        <div class="col-md-4 hidden" style="padding-left:0">
+                                        <div class="col-md-4 " style="padding-left:0">
                                             <div class="input-group" style="padding-left:0">
                                             <div class="input-group" style="padding-left:0">
                                                 <input type="text" id="video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">
                                                 <input type="text" id="video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">
                                                 <span class="input-group-btn">
                                                 <span class="input-group-btn">
@@ -68,7 +68,7 @@
                                             <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
                                             <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
                                             <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
                                             <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
                                             <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
                                             <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
-                                            <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="video_btn_start" onclick="doAction('video_start')"><img style="width:30px" src="/images/movie.png"></img></i></button>
+                                            <button type="button" class="btn btn-danger " style="width:51px;height:42px" id="video_btn_start" onclick="doAction('video_start')"><img style="width:30px" src="/images/movie.png"></img></i></button>
                                             <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="video_btn_stop" onclick="doAction('video_stop')"><i class="icon icon-stop icon-2x"></i></button>
                                             <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="video_btn_stop" onclick="doAction('video_stop')"><i class="icon icon-stop icon-2x"></i></button>
                                             <button type="button" class="btn btn-success" style="width:51px;height:42px" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
                                             <button type="button" class="btn btn-success" style="width:51px;height:42px" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
 
 

+ 40 - 75
VisualInspection/view/statistics/check_workload_statistics.html

@@ -1,17 +1,16 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
-<!--<script src="/js/statistics/check_workload_statistics.js"></script>-->
+<script src="/js/statistics/check_workload_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/check_workload_statistics.css">
 <link rel="stylesheet" type="text/css" href="/css/statistics/check_workload_statistics.css">
 <div class="container-right">
 <div class="container-right">
-    <div class="row-1"><span>个人数据统计</span></div>
+    <div class="row-1"><span>稽查人员工作量统计</span></div>
     <div class="line-1"></div>
     <div class="line-1"></div>
     <div class="row-2">
     <div class="row-2">
         <div>
         <div>
-            <div class="name1"><span>刘娟</span></div>
-            <div class="name2"><span>、</span><span>王海</span></div>
-            <div class="div-select div-button"><button>选择人员</button></div>
-            <div class="div-start"><select><option>请选择考核开始时间</option></select></div>
+            <div class="name1"><span>请选择稽查人员:</span></div>
+            <div class="div-select"><select id="select-personal"></select></button></div>
+            <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
             <div class="div-to"><label>-</label></div>
-            <div class="div-end"><select><option>请选择考核结束时间</option></select></div>
+            <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
             <div class="query div-button"><button>查询</button></div>
             <div class="query div-button"><button>查询</button></div>
         </div>
         </div>
     </div> 
     </div> 
@@ -23,76 +22,42 @@
        </table>
        </table>
     </div>
     </div>
 
 
-     <!-- 使用一个div来显示数据表格 -->
-<div class="datatable" data-checkable="false" data-sortable="false">
-        <table class="table table-bordered table-hover table-striped" style="text-align:center;">
-            <thead>
-                  <tr>
-                    <th width="6%" style="text-align:center;">序号</th>
-                    <th width="8%" style="text-align:center;">稽查人员</th>
-                    <th width="14%" style="text-align:center;">任务名称</th>
-                    <th width="14%" style="text-align:center;">时间段</th>
-                    <th width="8%" style="text-align:center;">考核人员</th>
-                    <th width="8%" style="text-align:center;">考核部门</th>
-                    <th width="8%" style="text-align:center;">扣分数</th>
-                    <th width="14%" style="text-align:center;">考核项</th>
-                    <th width="20%" style="text-align:center;">扣分凭证</th>
-                </tr>
-            </thead>
-            <tbody class="table-tbody">
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">1</td>
-                    <td style="line-height:70px;">刘娟</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">2</td>
-                    <td style="line-height:70px;">刘娟</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">3</td>
-                    <td style="line-height:70px;">王海</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">4</td>
-                    <td style="line-height:70px;">王海</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-        
-            </tbody>
-        </table>             
-</div>
-<!--分页-->
-<div></div>
-
+<div class="row" style="width:100%;margin:0 auto;">
+            <!-- 使用一个div来显示数据表格 -->
+            <div class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
   
   
 </div>
 </div>
+<script>
+    $(document).ready(function() {
 
 
+        // 仅选择日期
+        $(".div-start input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $(".div-end input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+    });
+</script>
 
 
        
        

+ 37 - 50
VisualInspection/view/statistics/personal_data_statistics.html

@@ -8,9 +8,9 @@
         <div>
         <div>
             <div class="name"><span>刘娟</span></div>
             <div class="name"><span>刘娟</span></div>
             <div class="div-select div-button"><button>选择人员</button></div>
             <div class="div-select div-button"><button>选择人员</button></div>
-            <div class="div-start"><select><option>请选择考核开始时间</option></select></div>
+            <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
             <div class="div-to"><label>-</label></div>
-            <div class="div-end"><select><option>请选择考核结束时间</option></select></div>
+            <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
             <div class="div-check"><select><option>请选择温馨服务检查类别</option></select></div>
             <div class="div-check"><select><option>请选择温馨服务检查类别</option></select></div>
             <div class="query div-button"><button>查询</button></div>
             <div class="query div-button"><button>查询</button></div>
             <div class="export div-button"><button>导出</button></div>
             <div class="export div-button"><button>导出</button></div>
@@ -50,53 +50,10 @@
     </div>
     </div>
     <div class="line-1"></div>
     <div class="line-1"></div>
 
 
-     <!-- 使用一个div来显示数据表格 -->
-<div class="datatable" data-checkable="false" data-sortable="false">
-        <table class="table table-bordered table-hover table-striped" style="text-align:center;">
-            <thead>
-                <tr>
-                    <th width="14%" style="text-align:center;">序号</th>
-                    <th width="24%" style="text-align:center;">时间段</th>
-                    <th width="14%" style="text-align:center;">扣分数</th>
-                    <th width="24%" style="text-align:center;">考核项</th>
-                    <th width="24%" style="text-align:center;">扣分凭证</th>
-                </tr>
-            </thead>
-            <tbody class="table-tbody">
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">1</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">2</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">3</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">4</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                
-            </tbody>
-        </table>             
-</div>
-<!--分页-->
-<div></div>
+    <div class="row" style="width:100%;margin:0 auto;">
+            <!-- 使用一个div来显示数据表格 -->
+            <div class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
     
     
   <div class="border-line">
   <div class="border-line">
     <div class="row-7">
     <div class="row-7">
@@ -109,8 +66,38 @@
         <div id="personal-check-type" style="width:49%;height:400px;float:left;"></div>
         <div id="personal-check-type" style="width:49%;height:400px;float:left;"></div>
     </div>
     </div>
   </div>
   </div>
-  
 </div>
 </div>
+<script>
+    $(document).ready(function() {
+
+        // 仅选择日期
+        $(".div-start input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $(".div-end input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+    });
+</script>
 
 
 
 
        
        

+ 20 - 2
VisualInspection/view/statistics/road_manage_statistics.html

@@ -5,8 +5,26 @@
     <div class="row-1"><span>道管中心统计</span></div>
     <div class="row-1"><span>道管中心统计</span></div>
     <div class="line-1"></div>
     <div class="line-1"></div>
     <div class="row-2">
     <div class="row-2">
-        <div><div class="div-month"><select><option>一月</option></select></div>
-        <div class="div-roadManage"><select><option>连云港</option></select></div>
+        <div>
+            <div class="div-month"><select>
+                <option value="1">一月</option>
+                <option value="2">二月</option>
+                <option value="3">三月</option>
+                <option value="4">四月</option>
+                <option value="5">五月</option>
+                <option value="6">六月</option>
+                <option value="7">七月</option>
+                <option value="8">八月</option>
+                <option value="9">九月</option>
+                <option value="10">十月</option>
+                <option value="11">十一月</option>
+                <option value="12">十二月</option>
+                </select></div>
+        <div class="div-roadManage"><select>
+            <option value="30">连云港</option>
+            <option value="31">盐城</option>
+            <option value="32">南通</option>
+            </select></div>
         <div class="div-button"><button>查询</button></div></div>
         <div class="div-button"><button>查询</button></div></div>
     </div>
     </div>
     <div class="line-1"></div>
     <div class="line-1"></div>

+ 20 - 4
VisualInspection/view/statistics/toll_station_statistics.html

@@ -5,9 +5,26 @@
     <div class="row-1"><span>收费站统计</span></div>
     <div class="row-1"><span>收费站统计</span></div>
     <div class="line-1"></div>
     <div class="line-1"></div>
     <div class="row-2">
     <div class="row-2">
-        <div><div class="div-month"><select><option>一月</option></select></div>
-        <div class="div-roadManage"><select><option>连云港</option></select></div>
-        <div class="div-station"><select><option>灌云北</option></select></div>
+        <div><div class="div-month"><select>
+            <option value="1">一月</option>
+                <option value="2">二月</option>
+                <option value="3">三月</option>
+                <option value="4">四月</option>
+                <option value="5">五月</option>
+                <option value="6">六月</option>
+                <option value="7">七月</option>
+                <option value="8">八月</option>
+                <option value="9">九月</option>
+                <option value="10">十月</option>
+                <option value="11">十一月</option>
+                <option value="12">十二月</option>
+            </select></div>
+        <div class="div-roadManage"><select id="first">
+            <option value="30">连云港</option>
+            <option value="31">盐城</option>
+            <option value="32">南通</option>
+            </select></div>
+        <div class="div-station"><select id="second"></select></div>
         <div class="div-button"><button>查询</button></div></div>
         <div class="div-button"><button>查询</button></div></div>
     </div>
     </div>
     <div class="line-1"></div>
     <div class="line-1"></div>
@@ -49,5 +66,4 @@
   
   
 </div>
 </div>
 
 
-
        
        

+ 15 - 2
VisualInspection/view/statistics/total_company_statistics.html

@@ -6,8 +6,21 @@
     <div class="line-1"></div>
     <div class="line-1"></div>
     <div class="row-2">
     <div class="row-2">
         <div>
         <div>
-            <div class="div-month"><select><option>一月</option></select></div>
-            <div class="div-button"><button>查询</button></div>
+            <div class="div-month"><select>
+                <option value="1">一月</option>
+                <option value="2">二月</option>
+                <option value="3">三月</option>
+                <option value="4">四月</option>
+                <option value="5">五月</option>
+                <option value="6">六月</option>
+                <option value="7">七月</option>
+                <option value="8">八月</option>
+                <option value="9">九月</option>
+                <option value="10">十月</option>
+                <option value="11">十一月</option>
+                <option value="12">十二月</option>
+                </select></div>
+            <div class="div-button"><button class="query-company">查询</button></div>
         </div>
         </div>
     </div>
     </div>
     <div class="line-1"></div>
     <div class="line-1"></div>

BIN
VisualInspection_server/.DS_Store


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

@@ -0,0 +1,41 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+/**
+ *
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class CheckmanStatisticsBean {
+    //编号
+    private Integer id;
+    //
+    private Integer checkman_id;
+    
+    private Integer all_checkman;
+    
+    private Integer all_task_num;
+    
+    private Integer all_check_minute;
+    
+    private Integer all_checked_score ;
+    
+    private Integer all_checked_num;
+    
+    //开始日期
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date start_date ;
+    
+    //结束日期
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date end_date ;
+}

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

@@ -91,4 +91,26 @@ public class StatisticsBean {
     
     
     // 
     // 
     private Integer order_type ;
     private Integer order_type ;
+    
+    // 排名
+    private Integer ranking ;
+    
+    // 排名变化
+    private Integer ranking_change;
+    
+    // 照片
+    private String pics ;
+    
+    // 稽查人员id
+    private Integer checkman_id ;
+    
+    private String checkman_name ;
+    
+    // 被考核人的姓名
+    private String checked_name ;
+    
+    
+    private String check_task_name ;
+    
+    private String check_task_time_name ;
 }
 }

+ 7 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/DepartmentController.java

@@ -156,4 +156,11 @@ public class DepartmentController extends BaseController {
     	return returnResult(0, "获取成功", feestation);
     	return returnResult(0, "获取成功", feestation);
     }
     }
     
     
+    @RequestMapping(value = "/getDeptInfosByDeptId",method=RequestMethod.POST,produces="application/json;charset=UTF-8")
+    public String getDeptInfosByDeptId(HttpServletRequest request,@RequestBody Organ organ){
+    	List<Organ> organs = departmentService.getOrgans(organ);
+    	return returnResult(0, "获取成功", organs);
+    }
+    
+    
 }
 }

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

@@ -4,12 +4,17 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.StatisticsBo;
+import com.xintong.visualinspection.bean.Team;
 import com.xintong.visualinspection.service.StatisticsService;
 import com.xintong.visualinspection.service.StatisticsService;
 
 
 /**
 /**
@@ -128,4 +133,51 @@ public class StatisticsController extends BaseController {
     	List<StatisticsBean> returnList=  statisticsService.getPersonalScoreInfo(obj);
     	List<StatisticsBean> returnList=  statisticsService.getPersonalScoreInfo(obj);
     	return super.returnSuccessResult(returnList);
     	return super.returnSuccessResult(returnList);
     }
     }
+    
+    /**
+     * 获取收费站排名前5名
+     */
+    @RequestMapping(value = "/fs/up/five")
+    public String getFsUp5PersonInfo(@RequestBody StatisticsBean obj){
+    	List<StatisticsBean> returnList=  statisticsService.getFSUp5Person(obj);
+    	return super.returnSuccessResult(returnList);
+    }
+    
+    /**
+     * 获取收费站中人的12月情况
+     */
+    @RequestMapping(value = "/one/person/year/info")
+    public String getFsOnePersonInfo(@RequestBody StatisticsBean obj){
+    	List<StatisticsBean> returnList=  statisticsService.getOneFSCheckedInfo(obj);
+    	return super.returnSuccessResult(returnList);
+    }
+    
+    /**
+     * 获取收费站各项扣分情况
+     */
+    @RequestMapping(value = "/one/person/checkedItem/info")
+    public String getFsOnePersonCheckedItemInfo(@RequestBody StatisticsBean obj){
+    	List<StatisticsBean> returnList=  statisticsService.getOneCheckedItemInfo(obj);
+    	return super.returnSuccessResult(returnList);
+    }
+    
+    /**
+     * 获取收费站具体某个人的扣分详情
+     */
+    @RequestMapping(value = "/one/checkedItem/detail/info/{page}/{size}")
+    public String getFsOnePersonCheckedItemDetailInfo(@RequestBody StatisticsBean obj,@PathVariable Integer page,@PathVariable Integer size){
+    	PageHelper.offsetPage(page, size);
+    	List<StatisticsBean> returnList=  statisticsService.getOneCheckedDetailInfo(obj);
+    	return super.returnSuccessResult(new PageInfo(returnList));
+    }
+    
+    
+    /**
+     * 获取考核列表情况
+     */
+    @RequestMapping(value = "/checkman/info")
+    public String getCheckmanInfo(@RequestBody CheckmanStatisticsBean obj){
+    	CheckmanStatisticsBean returnObj=  statisticsService.getCheckmanStatisticInfo(obj);
+    	return super.returnSuccessResult(returnObj);
+    }
 }
 }

+ 10 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java

@@ -194,6 +194,16 @@ public class UserController extends BaseController {
         }
         }
     }
     }
     
     
+    @RequestMapping(value = "/getFsUserList",method=RequestMethod.POST,produces="application/json;charset=UTF-8")
+    public String getFsUsers(@RequestBody User user){
+        try{
+        	List<User> users= userService.getFsUserByDeptId(user);
+        	
+        	return returnResult(0, "获取成功", users);
+        }catch(Exception e){
+        	throw new BusinessException(20001);
+        }
+    }
 
 
 
 
     
     

+ 2 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/DepartmentDao.java

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
 import com.xintong.visualinspection.bean.FeeStation;
 import com.xintong.visualinspection.bean.FeeStation;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
+import com.xintong.visualinspection.bean.User;
 
 
 /**
 /**
  * 文件名:UserInfoDao
  * 文件名:UserInfoDao
@@ -22,5 +23,5 @@ public interface DepartmentDao  {
     public List<FeeStation> getAllFS();
     public List<FeeStation> getAllFS();
     public FeeStation getFsBydeptId(Integer id);
     public FeeStation getFsBydeptId(Integer id);
     
     
-    public List<StatisticsBean> selectFeeStationGroup(StatisticsBean obj);
+    public List<StatisticsBean> selectFeeStationGroup(User obj);
 }
 }

+ 9 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 
 
+import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 
 
 /**
 /**
@@ -30,4 +31,12 @@ public interface StatisticsDao  {
 	public List<StatisticsBean> selectCheckedScoreList(StatisticsBean obj);
 	public List<StatisticsBean> selectCheckedScoreList(StatisticsBean obj);
 	
 	
 	public List<StatisticsBean> selectCheckedItemScoreInfo(StatisticsBean obj);
 	public List<StatisticsBean> selectCheckedItemScoreInfo(StatisticsBean obj);
+	
+	public List<StatisticsBean> selectOneCheckedInfo(StatisticsBean obj);
+	
+	public List<StatisticsBean> selectOneCheckedItemInfo(StatisticsBean obj);
+	
+	public List<StatisticsBean> selectOneCheckedDetailInfo(StatisticsBean obj);
+	
+	public CheckmanStatisticsBean selectCheckManInfo(CheckmanStatisticsBean obj);
 }
 }

+ 12 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml

@@ -90,10 +90,20 @@
         id =#{id} or parentid=#{id}
         id =#{id} or parentid=#{id}
     </delete>
     </delete>
 
 
-	<select id="selectFeeStationGroup" resultType="com.xintong.visualinspection.bean.StatisticsBean"  >
+	<select id="selectFeeStationGroup" parameterType="com.xintong.visualinspection.bean.User" resultType="com.xintong.visualinspection.bean.StatisticsBean"  >
 		SELECT COUNT(1) AS people_num,s.ORGAN_ID AS dept_id, s.name from t_sys_users t 
 		SELECT COUNT(1) AS people_num,s.ORGAN_ID AS dept_id, s.name from t_sys_users t 
 			       LEFT JOIN t_br_layer_fee_station s ON t.ORGANID = s.ORGAN_ID
 			       LEFT JOIN t_br_layer_fee_station s ON t.ORGANID = s.ORGAN_ID
-			WHERE t.POSITIONID in (1,6) AND s.ORGAN_ID IS NOT NULL GROUP BY s.ORGAN_ID 
+			WHERE 1=1 
+			<if test="position_ids != null and position_ids.size() > 0">
+        		AND t.positionid in 
+        		<foreach collection="position_ids" item="position_id" index="index"
+		            open="(" close=")" separator=",">
+		            #{position_id}
+		        </foreach>
+        	</if>
+			AND s.ORGAN_ID IS NOT NULL GROUP BY s.ORGAN_ID 
 	</select>
 	</select>
     
     
+   
+    
 </mapper>
 </mapper>

+ 122 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml

@@ -188,4 +188,126 @@
 		GROUP BY m.parent_id
 		GROUP BY m.parent_id
      </select>
      </select>
      
      
+     
+     <sql id="selectOneCheckedInfo">
+		 SELECT
+			check_num_t.checked_num , checked_score_t.mth, checked_score_t.checkd_all_score AS all_check_score , checked_score_t.checked_person,checked_score_t.checked_dept
+			FROM
+			(
+				SELECT
+					monthfunc (t.start_time) AS mth,
+					sum(m.check_item_score) AS checkd_all_score,
+					t.*
+				FROM
+					check_task t,
+					check_score m
+				WHERE
+					t.id = m.task_id
+				AND t.check_status != 22
+				AND t.checked_person IS NOT NULL
+				<if test="start_date !=null">
+					AND t.start_time >= #{start_date}
+				</if>
+				<if test="end_date !=null">
+					AND t.end_time &lt;= #{end_date}
+				</if>
+				<if test="user_id !=null ">
+					AND t.checked_person = #{user_id}
+				</if>
+				GROUP BY mth
+			) checked_score_t
+		LEFT JOIN (
+			SELECT
+				COUNT(t.checked_person) AS checked_num,
+				t.checked_person,
+				monthfunc (t.start_time) AS mth,
+				t.id
+			FROM
+				check_task t
+			WHERE
+				t.checked_person IS NOT NULL
+			AND t.check_status != 22
+			<if test="start_date !=null">
+				AND t.start_time >= #{start_date}
+			</if>
+			<if test="end_date !=null">
+				AND t.end_time &lt;= #{end_date}
+			</if>
+			<if test="user_id !=null ">
+				AND t.checked_person = #{user_id}
+			</if>
+			GROUP BY mth
+		) check_num_t ON checked_score_t.checked_person = check_num_t.checked_person
+		AND check_num_t.mth = checked_score_t.mth
+     </sql>
+     
+     <select id="selectOneCheckedInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+     	SELECT * FROM ( <include refid="selectOneCheckedInfo"/> ) t
+     </select>
+     
+     <select id="selectOneCheckedItemInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+     	SELECT count(m.check_item_score) AS checked_num , sum(m.check_item_score) AS all_check_score , m.parent_id,m.check_item_name AS name FROM check_task t INNER JOIN
+		(
+			select ci.name AS check_item_name , t.* FROM
+			(  SELECT ci.parent_id, t.* from check_score t LEFT JOIN check_item  ci ON t.check_item_id = ci.id
+				WHERE 1=1
+				AND checked_person = #{user_id}
+			 ) t 
+			LEFT JOIN check_item ci ON t.parent_id = ci.id
+			) m ON t.id = m.task_id
+			where t.check_status !=22
+			<if test="start_date !=null">
+				AND  t.start_time >= #{start_date}
+			</if>
+			<if test="end_date !=null">
+				AND t.end_time &lt;= #{end_date}
+			</if>
+		GROUP BY m.parent_id
+     
+     </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,
+     	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  
+     		where   t.check_status !=22
+     		<if test="queryType!=null and queryType==0">
+     			AND   t.checked_person = #{user_id}
+     		</if>
+     		<if test="queryType!=null and queryType==1">
+     			AND  t.checkman = #{user_id}
+     		</if>
+     		<if test="start_date !=null">
+				AND  t.start_time >= #{start_date}
+			</if>
+			<if test="end_date !=null">
+				AND t.end_time &lt;= #{end_date}
+			</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,
+			sum(
+				TIMESTAMPDIFF(MINUTE, t.start_time,t.end_time)
+			) AS all_check_minute,
+				COUNT(DISTINCT(t.checked_person)) AS all_checked_num,
+				SUM(cs.check_item_score) AS all_checked_score
+			FROM
+					check_task t
+				LEFT JOIN check_score cs ON t.id = cs.task_id
+				WHERE
+				t.check_status != 22 AND
+				t.checkman = #{checkman_id}
+				<if test="start_date !=null">
+					AND  t.start_time >= #{start_date}
+				</if>
+				<if test="end_date !=null">
+					AND t.end_time &lt;= #{end_date}
+				</if>
+    </select>
+     
+     
 </mapper>
 </mapper>

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/DepartmentService.java

@@ -23,4 +23,7 @@ public interface DepartmentService {
 	public List<FeeStation> getAllFS();
 	public List<FeeStation> getAllFS();
 	
 	
 	public FeeStation getFSByDeptId(Integer dept_id);
 	public FeeStation getFSByDeptId(Integer dept_id);
+	
+	// 根据条件获取公司下道管或者收费站信息
+	public List<Organ> getOrgans(Organ organ);
 }
 }

+ 15 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java

@@ -6,6 +6,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.StatisticsBo;
 
 
@@ -54,4 +55,18 @@ public interface StatisticsService {
 	
 	
 	// 个人得分排名
 	// 个人得分排名
 	public List<StatisticsBean> getPersonalScoreInfo(StatisticsBean obj);
 	public List<StatisticsBean> getPersonalScoreInfo(StatisticsBean obj);
+	
+	// 收费站进步前5
+	public List<StatisticsBean> getFSUp5Person(StatisticsBean obj);
+	
+	// 个人收费员的一年得分情况
+	public List<StatisticsBean> getOneFSCheckedInfo(StatisticsBean obj);
+	
+	// 个人各项扣分情况
+	public List<StatisticsBean> getOneCheckedItemInfo(StatisticsBean obj);
+	
+	// 个人扣分情况 / 个人稽查情况
+	public List<StatisticsBean> getOneCheckedDetailInfo(StatisticsBean obj);
+	
+	public CheckmanStatisticsBean getCheckmanStatisticInfo(CheckmanStatisticsBean obj);
 }
 }

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/UserService.java

@@ -21,4 +21,5 @@ public interface UserService extends UserDetailsService {
     public UserDetails loadUserByUsername(String username);
     public UserDetails loadUserByUsername(String username);
     public int queryCountByJob(User user);
     public int queryCountByJob(User user);
     public List<User> getAllCheckmans();
     public List<User> getAllCheckmans();
+    public List<User> getFsUserByDeptId(User user);
 }
 }

+ 5 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/DepartmentServiceImpl.java

@@ -126,6 +126,11 @@ public class DepartmentServiceImpl extends BaseService implements DepartmentServ
 	    return oragns;
 	    return oragns;
 	}
 	}
 	
 	
+	@Override
+	public List<Organ> getOrgans(Organ organ) {
+		return departmentDao.getOrgan(organ);
+	}
+
 	private Organ findOrgan(Organ o,Integer organid)
 	private Organ findOrgan(Organ o,Integer organid)
 	{
 	{
 		if(o.getId().intValue() == organid.intValue()){
 		if(o.getId().intValue() == organid.intValue()){

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

@@ -7,6 +7,7 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashMap;
@@ -19,10 +20,12 @@ import javax.servlet.http.HttpServletResponse;
 
 
 import org.jxls.common.Context;
 import org.jxls.common.Context;
 import org.jxls.util.JxlsHelper;
 import org.jxls.util.JxlsHelper;
+import org.jxls.util.Util;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.FeeStation;
 import com.xintong.visualinspection.bean.FeeStation;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.Organ;
@@ -142,7 +145,17 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 	@Override
 	@Override
 	public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj) {
 	public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj) {
 		// 获取收费站信息收费站人数
 		// 获取收费站信息收费站人数
-		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
+		Constant t =  CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+		String[] postions = t.getCode_name().split(",");
+		User user = new User();
+		List<Integer> positionList = new ArrayList<Integer>();
+		for(int i =0 ;i<postions.length;i++){
+			positionList.add(Integer.parseInt(postions[i]));
+		}
+		user.setPosition_ids(positionList);
+		
+		
+		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
 		int i = 0;
 		int i = 0;
 		for (StatisticsBean sta : lists) {
 		for (StatisticsBean sta : lists) {
@@ -219,7 +232,15 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 	public List<StatisticsBean> getFeeStationCheckItemScore(StatisticsBean obj) {
 	public List<StatisticsBean> getFeeStationCheckItemScore(StatisticsBean obj) {
 
 
 		// 获取收费站信息收费站人数
 		// 获取收费站信息收费站人数
-		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
+		Constant t =  CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+		String[] postions = t.getCode_name().split(",");
+		User user = new User();
+		List<Integer> positionList = new ArrayList<Integer>();
+		for(int i =0 ;i<postions.length;i++){
+			positionList.add(Integer.parseInt(postions[i]));
+		}
+		user.setPosition_ids(positionList);
+		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
 		int i = 0;
 		int i = 0;
 		for (StatisticsBean sta : lists) {
 		for (StatisticsBean sta : lists) {
@@ -577,7 +598,16 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 			}
 		}
 		}
 		
 		
-		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
+		Constant t =  CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+		String[] postions = t.getCode_name().split(",");
+		User user = new User();
+		List<Integer> positionList = new ArrayList<Integer>();
+		for(int i =0 ;i<postions.length;i++){
+			positionList.add(Integer.parseInt(postions[i]));
+		}
+		user.setPosition_ids(positionList);
+		
+		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
 		int i = 0;
 		int i = 0;
 		for (StatisticsBean sta : lists) {
 		for (StatisticsBean sta : lists) {
 			if (i < 7) {
 			if (i < 7) {
@@ -609,6 +639,32 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			i++ ;
 			i++ ;
 		}
 		}
 		
 		
+		// 进行排序
+		centerManageList.sort(new Comparator<StatisticsBean>() {
+			@Override
+			public int compare(StatisticsBean o1, StatisticsBean o2) {
+				if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
+					double a = o1.getAll_check_score() / (o1.getChecked_num()+0.00) / o1.getPeople_num();
+					double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00) / o2.getPeople_num();
+					if (a > b ) {
+						return 1;
+					} else if (a < b) {
+						return -1;
+					} else {
+						return 0;
+					}	
+				}else{
+					if(o1.getChecked_num() == 0){
+						return -1 ;
+					}else if(o2.getChecked_num() ==0){
+						return 1;
+					}else{
+						return 0;
+					}
+				}
+			}
+		});
+		
 		return centerManageList;
 		return centerManageList;
 	}
 	}
 	
 	
@@ -829,13 +885,86 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		
 		
 		return lists;
 		return lists;
 	}
 	}
-	
-	// 获取收费的进步Top5
-	public List<StatisticsBean> getPersonProgressTop5 (StatisticsBean obj){
+
+	@Override
+	public List<StatisticsBean> getFSUp5Person(StatisticsBean obj) {
+		obj.setQueryType(2);
+		List<StatisticsBean> t_mthList = getPersonalScoreInfo(obj);
+		Map<Integer,StatisticsBean> t_map = new HashMap<>();
+		for(int i=0;i<t_mthList.size();i++){
+			t_mthList.get(i).setRanking(i);
+			t_map.put(t_mthList.get(i).getUser().getId(), t_mthList.get(i));
+		}
+		// 查询上一个月
+		obj.setMth(obj.getPrev_mth());
+		List<StatisticsBean> prev_mthList = getPersonalScoreInfo(obj);
+		for(int i=0;i<prev_mthList.size();i++){
+			Integer uid = prev_mthList.get(i).getUser().getId();
+			if(t_map.containsKey(uid)){
+				t_map.get(uid).setRanking_change(i - t_map.get(uid).getRanking());
+			}
+		}
+		
+		// 这边按照名词变化进行排名
+		t_mthList.sort(new Comparator<StatisticsBean>() {
+			@Override
+			public int compare(StatisticsBean o1, StatisticsBean o2) {
+				if(o1.getRanking_change() > o2.getRanking_change()){
+					return -1;
+				}else if(o1.getRanking_change() < o2.getRanking_change()){
+					return 1;
+				}else{
+					return 0;
+				}
+			}
+		});
 		
 		
+		if(obj.getOrder_type() ==0){
+			// 正序
+			return t_mthList.subList(0, 5);
+		}else if(obj.getOrder_type() ==1){
+			// 反序
+			return t_mthList.subList(t_mthList.size()-5, t_mthList.size());
+		}
+		return t_mthList;
+	}
+
+	@Override
+	public List<StatisticsBean> getOneFSCheckedInfo(StatisticsBean obj) {
+		return  statisticsDao.selectOneCheckedInfo(obj);
+	}
+
+	@Override
+	public List<StatisticsBean> getOneCheckedItemInfo(StatisticsBean obj) {
+		
+		return statisticsDao.selectOneCheckedItemInfo(obj);
+	}
+	
+
+	@Override
+	public List<StatisticsBean> getOneCheckedDetailInfo(StatisticsBean obj) {
+		List<StatisticsBean> list = statisticsDao.selectOneCheckedDetailInfo(obj);
 		
 		
 		
 		
-		return null ;
+		if(obj.getQueryType() == 1){
+			for(StatisticsBean sta : list){
+				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() );
+			}
+		}else{
+			for(StatisticsBean sta : list){
+				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()));
+			}
+		}
+		return list;
+	}
+
+	@Override
+	public CheckmanStatisticsBean getCheckmanStatisticInfo(CheckmanStatisticsBean obj) {
+		return statisticsDao.selectCheckManInfo(obj);
 	}
 	}
 	
 	
 }
 }

+ 17 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/UserServiceImpl.java

@@ -12,6 +12,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import com.mysql.jdbc.StringUtils;
 import com.mysql.jdbc.StringUtils;
+import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Permission;
 import com.xintong.visualinspection.bean.Permission;
 import com.xintong.visualinspection.bean.Role;
 import com.xintong.visualinspection.bean.Role;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.bean.User;
@@ -23,6 +24,7 @@ import com.xintong.visualinspection.pojo.SimpleGrantedAuthority;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.UserService;
 import com.xintong.visualinspection.service.UserService;
 import com.xintong.visualinspection.util.CacheUtil;
 import com.xintong.visualinspection.util.CacheUtil;
+import com.xintong.visualinspection.util.CodeUtil;
 
 
 import lombok.Data;
 import lombok.Data;
 
 
@@ -145,4 +147,19 @@ public class UserServiceImpl extends BaseService implements UserService {
 		// TODO Auto-generated method stub
 		// TODO Auto-generated method stub
 		return userInfoDao.getAllCheckmans();
 		return userInfoDao.getAllCheckmans();
 	}
 	}
+	
+	@Override
+	public List<User> getFsUserByDeptId(User user) {
+		// TODO Auto-generated method stub
+		Constant t =  CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+		
+		String[] postions = t.getCode_name().split(",");
+		List<Integer> positionList = new ArrayList<Integer>();
+		for(int i =0 ;i<postions.length;i++){
+			positionList.add(Integer.parseInt(postions[i]));
+		}
+
+		user.setPosition_ids(positionList);
+		return userInfoDao.getUsers(user);
+	}
 }
 }