MSI\liwei 6 سال پیش
والد
کامیت
53ec583798
83فایلهای تغییر یافته به همراه1684 افزوده شده و 358 حذف شده
  1. 100 0
      VisualInspection/configuration/main.html
  2. 100 0
      VisualInspection/configuration/view/main.html
  3. 26 0
      VisualInspection/css/main.css
  4. 3 2
      VisualInspection/js/lib/mytable.js
  5. 11 1
      VisualInspection/js/main.js
  6. 5 1
      VisualInspection/js/mytask/apply_task.js
  7. 1 1
      VisualInspection/js/mytask/check.js
  8. 10 5
      VisualInspection/js/new.js
  9. 13 11
      VisualInspection/js/statistics/assess_situation.js
  10. 14 15
      VisualInspection/js/statistics/assess_type.js
  11. 3 1
      VisualInspection/js/statistics/personal_data_statistics.js
  12. 14 13
      VisualInspection/js/statistics/road_manage_statistics.js
  13. 87 106
      VisualInspection/js/statistics/total_company_statistics.js
  14. 2 1
      VisualInspection/js/util/service.js
  15. 1 0
      VisualInspection/js/util/util.js
  16. 57 9
      VisualInspection/js/util/video.js
  17. 37 7
      VisualInspection/motorcade/js/carInfo.js
  18. 70 8
      VisualInspection/motorcade/js/carTask.js
  19. 36 10
      VisualInspection/motorcade/js/maintenanceInfo.js
  20. 9 3
      VisualInspection/motorcade/view/addCar.html
  21. 7 0
      VisualInspection/motorcade/view/addMaintenance.html
  22. 105 26
      VisualInspection/motorcade/view/addcarTask.html
  23. 7 7
      VisualInspection/motorcade/view/carInfo.html
  24. 7 0
      VisualInspection/motorcade/view/carTask.html
  25. 1 1
      VisualInspection/motorcade/view/car_collection.html
  26. 11 4
      VisualInspection/motorcade/view/maintenanceInfo.html
  27. 1 0
      VisualInspection/node_modules/.package_versions.json
  28. 17 4
      VisualInspection/qzd/js/statistics/assess_type.js
  29. 3 3
      VisualInspection/qzd/js/statistics/operation_management_integration.js
  30. 5 4
      VisualInspection/qzd/js/statistics/service_area_data_statistics.js
  31. 7 7
      VisualInspection/qzd/js/statistics/total_company_statistics.js
  32. 10 2
      VisualInspection/qzd/js/task/add.js
  33. 9 3
      VisualInspection/qzd/js/task/check.js
  34. 1 0
      VisualInspection/qzd/js/task/new.js
  35. 7 2
      VisualInspection/qzd/js/task/task_list.js
  36. 13 2
      VisualInspection/qzd/view/task/add.html
  37. 8 12
      VisualInspection/qzd/view/task/addtask.html
  38. 8 0
      VisualInspection/qzd/view/task/check.html
  39. 100 0
      VisualInspection/tj/view/main.html
  40. 12 4
      VisualInspection/view/home.html
  41. 21 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/EnvConfig.java
  42. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Webcam.java
  43. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/DepartmentController.java
  44. 32 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java
  45. 11 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java
  46. 19 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/TaskController_Q.java
  47. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/UserInfoDao.java
  48. 6 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java
  49. 2 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml
  50. 9 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml
  51. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/WebcamMapper.xml
  52. 66 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  53. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java
  54. 239 16
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  55. 5 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/UserServiceImpl.java
  56. BIN
      VisualInspection_server/src/main/resources/checked_info.xls
  57. BIN
      VisualInspection_server/src/main/resources/checked_item_info.xls
  58. 15 10
      Visuallnspection_fjq/.idea/workspace.xml
  59. 2 2
      Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/application.properties
  60. 4 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CarInfo.java
  61. 6 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CarTask.java
  62. 2 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/MaintenanceInfo.java
  63. 10 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/QzdCheckTask.java
  64. 2 2
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/QzdRecord.java
  65. 1 1
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/TaskService_Q.java
  66. 1 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/UserService.java
  67. 1 1
      Visuallnspection_fjq/visuallnspectioninteface/target/maven-archiver/pom.properties
  68. 3 0
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/QzdStatisticsDao.java
  69. 1 0
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/QzdTaskDao.java
  70. 6 4
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CarInfoMapper.xml
  71. 4 2
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CarTaskMapper.xml
  72. 4 2
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/MaintenanceMapper.xml
  73. 3 3
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/RecordMapper.xml
  74. 25 2
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/StatisticsMapper.xml
  75. 52 1
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/TaskMapper.xml
  76. 6 0
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CarInfoServiceImpl.java
  77. 59 15
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsServiceImpl.java
  78. 35 15
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsService_FImpl.java
  79. 82 0
      Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/TaskService_QImpl.java
  80. 1 0
      Visuallnspection_qzd/src/main/resources/application.properties
  81. BIN
      Visuallnspection_qzd/src/main/resources/fwq_checked_item_info.xls
  82. BIN
      Visuallnspection_qzd/src/main/resources/fwq_operation_info.xls
  83. 1 0
      Visuallnspection_qzd/src/main/resources/logback.xml

+ 100 - 0
VisualInspection/configuration/main.html

@@ -0,0 +1,100 @@
+<!doctype html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>稽查</title>
+
+
+    <link rel="import" href="/view/common/commoncsslink.html?__inline">
+    <link rel="stylesheet" type="text/css" href="/css/main.css">
+
+    <!--<link rel="stylesheet" type="text/css" href="/js/lib/jedate/skin/jedate.css">
+    <script src="/js/lib/jedate/jedate.js"></script>-->
+    <link rel="import" href="/view/common/commonscriptlink.html?__inline">
+
+    <style>
+        html {
+            overflow: auto;
+        }
+        
+        img.lightbox-img {
+            width: 600px;
+        }
+        
+        .navbar-inverse {
+            background-color: #366ca5;
+        }
+        
+        .file-list,
+        .uploader-files {
+            border: 0px;
+        }
+        
+        html {
+            overflow: hidden
+        }
+        
+        body {
+            font-family: 'Microsoft Yahei';
+            overflow: hidden
+        }
+        
+        .fullxtwen-canvas {
+            display: none;
+        }
+        /*.mum_left {
+            background-color: #2B7EB3;
+        }*/
+    </style>
+
+    <!--<script src="/js/teamClass/check_team_schedule.js"></script>-->
+
+</head>
+
+<body>
+    <link rel="import" href="/view/common/head.html?__inline">
+
+
+
+
+    <div id="main" class="container-fluid main">
+        <div class="row">
+            <div class="col-md-2" style="padding-right:0;z-index: 11;">
+                <div id="mum_left" class="mum_left">
+                    <link rel="import" href="/view/mum.html?__inline">
+                </div>
+            </div>
+            <div class="col-md-10">
+                <div id="mum_right" class="mum_right">
+
+                    <div class="panel" id="main_panel">
+                        <div class="panel-heading" id="main_content_title">
+                            <ol class="breadcrumb" id="breadcrumb_menu" style="margin-bottom: 0;padding:0px;">
+
+                            </ol>
+                        </div>
+                        <div class="panel-body" id="main_panel_body">
+                            <div id="main_content">
+                            </div>
+                            <!--<link rel="import" href="/view/mytask/unchecked.html?__inline">-->
+                        </div>
+                    </div>
+
+                    <link rel="import" href="/view/common/foot.html?__inline">
+                </div>
+
+            </div>
+
+        </div>
+    </div>
+
+    <script type="text/javascript" src="/js/lib/ckplayer/ckplayer/ckplayer.js"></script>
+    <script src="/js/teamClass/charge_team_schedule.js"></script>
+    <script src="/js/main.js"></script>
+
+</body>
+
+
+
+</html>

+ 100 - 0
VisualInspection/configuration/view/main.html

@@ -0,0 +1,100 @@
+<!doctype html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>稽查</title>
+
+
+    <link rel="import" href="/view/common/commoncsslink.html?__inline">
+    <link rel="stylesheet" type="text/css" href="/css/main.css">
+
+    <!--<link rel="stylesheet" type="text/css" href="/js/lib/jedate/skin/jedate.css">
+    <script src="/js/lib/jedate/jedate.js"></script>-->
+    <link rel="import" href="/view/common/commonscriptlink.html?__inline">
+
+    <style>
+        html {
+            overflow: auto;
+        }
+        
+        img.lightbox-img {
+            width: 600px;
+        }
+        
+        .navbar-inverse {
+            background-color: #366ca5;
+        }
+        
+        .file-list,
+        .uploader-files {
+            border: 0px;
+        }
+        
+        html {
+            overflow: hidden
+        }
+        
+        body {
+            font-family: 'Microsoft Yahei';
+            overflow: hidden
+        }
+        
+        .fullxtwen-canvas {
+            display: none;
+        }
+        /*.mum_left {
+            background-color: #2B7EB3;
+        }*/
+    </style>
+
+    <!--<script src="/js/teamClass/check_team_schedule.js"></script>-->
+
+</head>
+
+<body>
+    <link rel="import" href="/view/common/head.html?__inline">
+
+
+
+
+    <div id="main" class="container-fluid main">
+        <div class="row">
+            <div class="col-md-2" style="padding-right:0;z-index: 11;">
+                <div id="mum_left" class="mum_left">
+                    <link rel="import" href="/view/mum.html?__inline">
+                </div>
+            </div>
+            <div class="col-md-10">
+                <div id="mum_right" class="mum_right">
+
+                    <div class="panel" id="main_panel">
+                        <div class="panel-heading" id="main_content_title">
+                            <ol class="breadcrumb" id="breadcrumb_menu" style="margin-bottom: 0;padding:0px;">
+
+                            </ol>
+                        </div>
+                        <div class="panel-body" id="main_panel_body">
+                            <div id="main_content">
+                            </div>
+                            <!--<link rel="import" href="/view/mytask/unchecked.html?__inline">-->
+                        </div>
+                    </div>
+
+                    <link rel="import" href="/view/common/foot.html?__inline">
+                </div>
+
+            </div>
+
+        </div>
+    </div>
+
+    <script type="text/javascript" src="/js/lib/ckplayer/ckplayer/ckplayer.js"></script>
+    <script src="/js/teamClass/charge_team_schedule.js"></script>
+    <script src="/js/main.js"></script>
+
+</body>
+
+
+
+</html>

+ 26 - 0
VisualInspection/css/main.css

@@ -267,6 +267,32 @@ a:focus {
     border-color: #0373cf;
 }
 
+.btn-info8 {
+    color: #fff;
+    background-color: #db7093;
+    border-radius: 4px;
+    border-color: #db7093;
+    text-shadow: none;
+}
+
+.btn-info8:hover {
+    color: #db7093;
+    background-color: #fff;
+    border-color: #db7093;
+}
+
+.btn-info8:focus {
+    color: #db7093;
+    background-color: #fff;
+}
+
+.btn-info:active {
+    color: #fff;
+    background-color: #0373cf;
+    border-radius: 4px;
+    border-color: #0373cf;
+}
+
 .btn-table {
     color: #fff;
     background-color: #2196F3;

+ 3 - 2
VisualInspection/js/lib/mytable.js

@@ -258,8 +258,9 @@ String.prototype.replaceAll = function(s1, s2) {
                             str += '<a style="background-color:red" href="javascript:void(0)" class="btn-table" onclick="setIsapply(' + obj.id + ',&quot;' + obj.remarks + '&quot;)"></i>' + "未填写" + ' </a>&nbsp;';
                         }
                         dArr.push(str);
-                    }else if (cols[i].type == "monitor") {
-                        console.log("monitor");
+                    }else if(cols[i].type == "hideTime"){
+                        console.log(obj);
+                    }else if (cols[i].type == "monitor") {            
                        var monitor = $.zui.store.get("monitor");
                        var vice_monitor = $.zui.store.get("vice_monitor");
                         var str =  "<div>";

+ 11 - 1
VisualInspection/js/main.js

@@ -52,7 +52,17 @@ $(document).ready(function() {
         //车队
         mbody.type = 40;
         var deptname="车队稽查";
-    } else {
+    } else if (pathName.indexOf("tj") != -1) {
+        //清障队
+        mbody.type = 50;
+        var deptname="统计分析";
+
+    }else if (pathName.indexOf("configuration") != -1) {
+        //清障队
+        mbody.type = 60;
+        var deptname="配置管理";
+
+    }else {
         //收费站
         mbody.type = 10;
         if( $.zui.store.get("openid")){

+ 5 - 1
VisualInspection/js/mytask/apply_task.js

@@ -47,7 +47,7 @@ function initTableRowBtn() {
         { func: 'showApplyDetail', text: '处理', icon_class: 'icon-eye-open' }
     ]);
     $.zui.store.set("task_table_btn_21_" + ROLE_JICHA, [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-eye-open' }]);
-    $.zui.store.set("task_table_btn_22", [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-tasks' }]);
+    $.zui.store.set("task_table_btn_22", [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-tasks' },{ func: 'updateCheck', text: '退回', icon_class: 'icon-tasks' }]);
     $.zui.store.set("task_table_btn_23", [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-tasks' }]);
 }
 
@@ -217,4 +217,8 @@ function agreeApplyTaskPatch() {
         'apply_ids': $('#unexamined_datatable').mytable('getTableCheckedIds')
     };
     addOrUpdateItem4Common(param, '/checkApply/agreePatch', queryUnexaminedTask);
+}
+
+function updateCheck(taskId){
+    post_common_service('/task/update', { "id":taskId, "check_status": 2 },function(data){initApplyPage()});
 }

+ 1 - 1
VisualInspection/js/mytask/check.js

@@ -71,6 +71,7 @@ function initCheck() {
         forceParse: 0,
         format: "yyyy-mm-dd"
     });
+    console.log($.checkTask);
     if ($.checkTask) {
         getUserCheckCount();
         initCheckAppealBtns();
@@ -849,7 +850,6 @@ function getCheckItems() {
         }
     };
     var param = { "rule_type": 1 };
-    console.log(param);
     post_common_service('checkRule/getItemListByRuleType', param, function(data) {
         // console.log(data);
         zdata = [];

+ 10 - 5
VisualInspection/js/new.js

@@ -402,10 +402,10 @@ function menusuccess(data) {
 }
 
 function opennew(a, id) {
-    var furl = ['', 'fwq/', 'qzd/', 'motorcade/'];
+    var furl = ['', 'fwq/', 'qzd/', 'motorcade/','tj/','configuration/'];
     $.zui.store.set("openid", id);
     var user = $.zui.store.get("user");
-    if (user.roles[0].level > 2) {
+    if (user.roles[0].level > 2){
         if (a == 0) {
             if (user.position_name.indexOf('收费站') === 0 || user.position_name.indexOf('稽查员') === 0) {
                 window.location.href = base_ui_url + furl[a] + "view/main.html?";
@@ -427,11 +427,16 @@ function opennew(a, id) {
             }
         }else if (a == 3) {
                 window.location.href = base_ui_url + furl[a] + "view/main.html?";
-        }else if (a == 4) {
-                window.location.href = base_ui_url + furl[0] + "view/main.html?";
+        }else if(a == 4 || a == 5){
+            if(user.roles[0].name == ROLE_JICHA_ADMIN){
+                window.location.href = base_ui_url + furl[a] + "view/main.html?";
+            }else{
+                alert("权限不足");
+            }
+
         }
     } else {
-        if(a != 4){
+        if(a != 6){
             window.location.href = base_ui_url + furl[a] + "view/main.html?";
         }else{
             window.location.href = base_ui_url + furl[0] + "view/main.html?";

+ 13 - 11
VisualInspection/js/statistics/assess_situation.js

@@ -102,6 +102,7 @@
             var strTbody = '';
 
             post_common_service(url, param, function(data) {
+                console.log(data);
                 var list = data.list;
                 // 道管中心排名
                 ranking_method(list);
@@ -134,9 +135,9 @@
             rank.length = 0;
             // 把收费站得分分别添加到3个数组
             for (i = 0; i < data.length; i++) {
-                if (i >= 0 && i <= 6)
+                if(data[i].parent_dept_id == 30)
                     lianyungang_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
-                else if (i > 6 && i <= 12)
+                else if (data[i].parent_dept_id == 31)
                     yancheng_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
                 else
                     nantong_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
@@ -147,25 +148,26 @@
             }
             // 将3个排名数组合并成一个数组
             rank = r1.concat(r2).concat(r3);
+            console.log(nantong_Station);
         }
 
         function gethtml(data, i) {
             var strTbody = "";
-            if (i == 0 || i == 7 || i == 13) {
+            if (i == 0 || i == lianyungang_Station.length || i == lianyungang_Station.length+yancheng_Station.length) {
                 var ranking;
                 var name = "";
                 var rowspan = 0;
                 if (i == 0) {
-                    name = "连云港";
-                    rowspan = 7;
+                    name = "连云港管理处";
+                    rowspan = lianyungang_Station.length;
                     ranking = rank[i];
-                } else if (i == 7) {
-                    name = "盐城";
-                    rowspan = 6;
+                } else if (i == lianyungang_Station.length) {
+                    name = "连盐管理处";
+                    rowspan = yancheng_Station.length;
                     ranking = rank[i];
-                } else if (i == 13) {
-                    name = "南通";
-                    rowspan = 9;
+                } else if (i == lianyungang_Station.length+yancheng_Station.length) {
+                    name = "盐通管理处";
+                    rowspan = nantong_Station.length;
                     ranking = rank[i];
                 }
 

+ 14 - 15
VisualInspection/js/statistics/assess_type.js

@@ -101,7 +101,7 @@ function initQueryType() {
 function gethtml(data, i, avg, lists) {
     var strTbody = "";
 
-    if (i == 0 || i == 7 || i == 13) {
+    if (i == 0 || i == lianyungang_Station.length || i == lianyungang_Station.length+yancheng_Station.length) {
 
         var ranking;
         var name = "";
@@ -109,25 +109,25 @@ function gethtml(data, i, avg, lists) {
         order = 1;
         if (i == 0) {
             name = "连云港";
-            rowspan = 7;
+            rowspan = lianyungang_Station.length;
             ranking = rank[i];
             for (var i = 0; i < lists.length; i++) {
                 if (avg > lists[i]) {
                     order = order + 1;
                 }
             }
-        } else if (i == 7) {
+        } else if (i == lianyungang_Station.length) {
             name = "盐城";
-            rowspan = 6;
+            rowspan = yancheng_Station.length;
             ranking = rank[i];
             for (var i = 0; i < lists.length; i++) {
                 if (avg > lists[i]) {
                     order = order + 1;
                 }
             }
-        } else if (i == 13) {
+        } else if (i == lianyungang_Station.length+yancheng_Station.length) {
             name = "南通";
-            rowspan = 9;
+            rowspan = nantong_Station.length;
             ranking = rank[i];
             for (var i = 0; i < lists.length; i++) {
                 if (avg > lists[i]) {
@@ -192,34 +192,33 @@ function check_people_avg(data) {
     var dataArray = new Array();
     var sum = 0;
     var sum1 = 0;
+    ranking_method(list);
     for (k = 0; k < list.length; k++) {
         sum = parseFloat(sum) + parseFloat(filterByZeroHandle(list[k].all_check_score, '0'));
         sum1 = parseFloat(sum1) + parseFloat(filterByZeroHandle(list[k].checked_num, '0'));
-        if (k == 6) {
+        if (k == lianyungang_Station.length -1 ) {
             dataArray.push(filterJudge(sum, sum1));
             sum = 0;
             sum1 = 0;
         }
-        if (k == 12) {
+        if (k == lianyungang_Station.length+yancheng_Station.length-1) {
             dataArray.push(filterJudge(sum, sum1));
             sum = 0;
             sum1 = 0;
         }
-        if (k == 20) {
+        if (k == list.length-1) {
             dataArray.push(filterJudge(sum, sum1));
             sum = 0;
             sum1 = 0;
         }
     }
     // 道管下的收费站排名
-    ranking_method(list);
-
     for (i = 0; i < list.length; i++) {
         if (i == 0) {
             $(".table-tbody").append(gethtml(list[i], i, dataArray[0], dataArray));
-        } else if (i == 7) {
+        } else if (i == lianyungang_Station.length) {
             $(".table-tbody").append(gethtml(list[i], i, dataArray[1], dataArray));
-        } else if (i == 13) {
+        } else if (i == lianyungang_Station.length+yancheng_Station.length) {
             $(".table-tbody").append(gethtml(list[i], i, dataArray[2], dataArray));
         } else {
             $(".table-tbody").append(gethtml(list[i], i));
@@ -242,9 +241,9 @@ function ranking_method(data) {
     rank.length = 0;
     // 把收费站得分分别添加到3个数组
     for (i = 0; i < data.length; i++) {
-        if (i >= 0 && i <= 6)
+        if(data[i].parent_dept_id == 30)
             lianyungang_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
-        else if (i > 6 && i <= 12)
+        else if (data[i].parent_dept_id == 31)
             yancheng_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
         else
             nantong_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));

+ 3 - 1
VisualInspection/js/statistics/personal_data_statistics.js

@@ -523,6 +523,8 @@ $(function() {
             "organid": select_road
         }
         post_common_service("user/getFsUserList", param, function(data) {
+            console.log(data);
+            debugger;
             if (data.length != 0) {
                 var userId;
                 if (hasRole("ROLE_STATION")) {
@@ -533,7 +535,7 @@ $(function() {
                 }
 
                 for (var i = 0; i < data.length; i++) {
-                    for (var j = 33; j <= 100; j++) {
+                    for (var j = 33; j <= 200; j++) {
                         if (select_road == j) {
                             if (data[i].id == userId) {
                                 tempStr += "<option value=" + data[i].id + " selected='selected'>" + data[i].truename + "</option>";

+ 14 - 13
VisualInspection/js/statistics/road_manage_statistics.js

@@ -368,24 +368,25 @@ $(function() {
                 // 过滤出道管的数据
 
                 var center_id = $(".div-roadManage select").val();
-
+                console.log(data);
                 for (var i = 0; i < data.list.length; i++) {
-                    if (i < 7 && center_id == 30) {
-                        temp[0] += data.list[i].checked_people_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
-                        temp[1] += data.list[i].score_fifteen;
-                        temp[2] += data.list[i].score_fifty;
-                        temp[3] += data.list[i].score_over_fifty;
-                    } else if (i > 6 && i < 13 && center_id == 31) {
-                        temp[0] += data.list[i].checked_people_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
-                        temp[1] += data.list[i].score_fifteen;
-                        temp[2] += data.list[i].score_fifty;
-                        temp[3] += data.list[i].score_over_fifty;
-                    } else if (i > 12 && i < 21 && center_id == 32) {
+                    if (data.list[i].parent_dept_id  == center_id) {
                         temp[0] += data.list[i].checked_people_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
                         temp[1] += data.list[i].score_fifteen;
                         temp[2] += data.list[i].score_fifty;
                         temp[3] += data.list[i].score_over_fifty;
                     }
+                    // } else if (data.list[i].parent_dept_id == center_id == 31) {
+                    //     temp[0] += data.list[i].checked_people_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
+                    //     temp[1] += data.list[i].score_fifteen;
+                    //     temp[2] += data.list[i].score_fifty;
+                    //     temp[3] += data.list[i].score_over_fifty;
+                    // } else if (data.list[i].parent_dept_id == center_id == 32) {
+                    //     temp[0] += data.list[i].checked_people_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
+                    //     temp[1] += data.list[i].score_fifteen;
+                    //     temp[2] += data.list[i].score_fifty;
+                    //     temp[3] += data.list[i].score_over_fifty;
+                    // }
                 }
                 var color1 = new $.zui.Color('#48CCCD');
                 var color2 = new $.zui.Color('#38ACEC');
@@ -396,7 +397,7 @@ $(function() {
                 array_points.push({ "value": temp[1], "name": '0-15分', "itemStyle": { "normal": { "color": color2.hexStr() } } });
                 array_points.push({ "value": temp[2], "name": '15-50分', "itemStyle": { "normal": { "color": color3.hexStr() } } });
                 array_points.push({ "value": temp[3], "name": '50分以上', "itemStyle": { "normal": { "color": color4.hexStr() } } });
-
+                console.log(array_points);
                 for (var i = 0; i < data.list.length; i++) {
                     if (i < 7 && center_id == 30) {
                         var p = i;

+ 87 - 106
VisualInspection/js/statistics/total_company_statistics.js

@@ -60,7 +60,6 @@ $(function() {
     $(".query-company").click(function() {
         // var select_month = $("#month_date").val();
         // flag = false;
-        // console.log(select_month);
 
         // // 加载图配置
         // echart();
@@ -74,7 +73,6 @@ $(function() {
                 // 加载图配置
             echart(flag);
             var select_month = $("#month_date").val();
-            // console.log(select_month);
             init_company_year_assess(select_month.split('/')[0], select_month.split('/')[1]);
             // 查询图二
             //	init_company_points_assess("statistics/lost/score/rate",select_month+'');
@@ -90,11 +88,10 @@ $(function() {
         }else if(ctype == 1){
             echart(flag);
             var select_month = $("#month_date").val();
-            // console.log(select_month);
             init_company_year_assess(select_month.split('/')[0], select_month.split('/')[1]);
             // 查询图二
             //	init_company_points_assess("statistics/lost/score/rate",select_month+'');
-            init_company_points_assess("statistics/score/info", select_month.split('/')[0], select_month.split('/')[1]);
+            init_company_points_assess("statistics//scoreAll/info", select_month.split('/')[0], select_month.split('/')[1]);
             // 查询图三
             init_road_manager_score_rank_three("statistics/operation/manage/integration", select_month + '');
             // 查询图四
@@ -102,7 +99,7 @@ $(function() {
             // 查询图五
             init_server_check_type_five("statistics/operation/manage/integration", select_month + "");
             // 查询图六
-            init_each_people_points_six("statistics/lost/twice/itemscore/rate", select_month + "");
+            init_each_people_points_six("statistics/lost/twice/itemscore/rateAll", select_month + "");
         }
      
     }
@@ -288,6 +285,7 @@ $(function() {
                 // 画图
                 check_type.setOption(server_check_type_five());
             } else if (type == 6) {
+                console.log(data)
                 // 画图
                 people_points.setOption(each_people_points_six());
             }
@@ -387,9 +385,9 @@ $(function() {
             else
                 min_year = eval("Math.min(" + array_year_score.toString() + ")").toFixed(0) - 10;
         } else if (type == 2) {
+            console.log(data);
             array_points2 = [];
             array_points = [];
-            // console.log(data);
             if (data != null) {
                 array_points.push({ "value": (data.total0), "name": '满分', "itemStyle": { "normal": { "color": '#48CCCD' } } });
                 array_points.push({ "value": data.total15, "name": '0-15分', "itemStyle": { "normal": { "color": '#38ACEC' } } });
@@ -423,6 +421,7 @@ $(function() {
             } else {
                 array_points.length = 0;
             }
+            console.log(data);
         } else if (type == 3) {
             var scoreTotalArray;
             if(ctype == 1){
@@ -436,7 +435,6 @@ $(function() {
                          if(data.rmlist[index].deptid == obj.parent_dept_id){
                             scoreTotal += parseFloat(obj.score_avg);
                             numTotal++;
-                            console.log(scoreTotal);
                          }
                      }
                      data.rmlist[index].scoreTotal = (scoreTotal/numTotal).toFixed(2);
@@ -453,7 +451,6 @@ $(function() {
                        }
                    }
                    data.sort(sequence);
-                console.log(data);
             }
                 array_road.length = 0;
                 array_road_score.length = 0;
@@ -497,7 +494,6 @@ $(function() {
                 }
            
         } else if (type == 4) { 
-            console.log(data);
             array_allStation_score.length = 0;
             array_allStation.length = 0;
             if(ctype == 1){
@@ -571,6 +567,7 @@ $(function() {
                 array_check_type.push({ "value": data.totalDataScore, "name": "数据平台应用" });
             }
         } else if (type == 6) {
+            console.log(data);
             array_all_deptname = new Array();
             map_month_data = new HashMap();
             map_per_data = new HashMap();
@@ -580,7 +577,11 @@ $(function() {
             // arrar_points_month.length = 0;
 
                 if (data != '' && data.Pmth.length != 0 || data.Tmth.length != 0) {
+                   if(ctype == 0){
                     data_each_people_points(data);
+                   }else{
+                    data_each_people_points_all(data);
+                   }
                 } else {
                     // array_points_name.length = 0;
                     // array_points_pre.length = 0;
@@ -590,17 +591,13 @@ $(function() {
     }
 
     function data_each_people_points(data) {
-        console.log(data);
         var flag = false;
         var name = ['环境卫生', '仪容仪表着装', '表情', '动作', '文明用语', '工作纪律及行为举止', '便民服务', '安全管理']
         array_all_name = name;
         // array_all_deptname = ["连云港道管", "盐城道管", "南通道管"];
         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++) {
             //     var temp_map_m = new HashMap();
             //     var temp_map_p = new HashMap();
@@ -666,60 +663,7 @@ $(function() {
                     }
                 }
             }
-
-            //     map_month_data.set(name[i], temp_map_m)
-            //     map_pre_data.set(name[i], temp_map_p)
-        }
-        // console.log(Tmth)
-        // console.log(map_month_data)
-
-
-        // 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] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
-        //             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] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
-        //             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]);
-        // }
-        // }
+        }     
     }
 
     /**
@@ -1180,7 +1124,6 @@ $(function() {
 
 
         var sdata = new Array();
-        console.log(array_all_deptname);
         for (var j = 0; j < array_all_deptname.length; j++) {
             var dept = array_all_deptname[j]
 
@@ -1370,7 +1313,6 @@ $(function() {
                 sdata.push(d_tt);
             }
         }
-        console.log(sdata);
         var maxvaluedata = 0;
         t_map_c.forEach(function(value, key) {
             if (value > maxvaluedata) maxvaluedata = value;
@@ -1532,40 +1474,79 @@ function station_c(param) {
     }
 }
 
-function data_each_rm_points(data){
-    array_all_name=new Array();
-    array_all_name.push('公司检查');
-    array_all_name.push('第三方暗访');
-    array_all_name.push('特情操作');
-    array_all_name.push('现场检查');
-    array_all_name.push('数据平台应用');
-    var check = new Array();
-    var map = new HashMap();
-    map.set("公司检查",0);
-    map.set("第三方暗访",0);
-    map.set("特情操作",0);
-    map.set("现场检查",0);
-    map.set("数据平台应用",0);
-    for(var i=0;i<data.rmlist.length;i++){
-        map_month_data.set(data.rmlist[i].name,map);
-        array_all_deptname.push(data.rmlist[i].name);
-    }
-    console.log(map_month_data);
-    for(var index in data.list){
-        var obj = data.list[index];
-        for(var j =0;j<name.length;i++){
-            var total = 0;
-        console.log( map_month_data.get(obj.parent_name).get("公司检查"));
-        total = map_month_data.get(obj.parent_name).get("公司检查")+obj.company_total_score;
-        map_month_data.get(obj.parent_name).set("公司检查",total);
-        total = map_month_data.get(obj.parent_name).get("第三方暗访")+obj.third_total_score;
-        map_month_data.get(obj.parent_name).set("第三方暗访",total);
-        total = map_month_data.get(obj.parent_name).get("特情操作")+obj.special_total_score;
-        map_month_data.get(obj.parent_name).set("特情操作",total);
-        total = map_month_data.get(obj.parent_name).get("现场检查")+obj.onsite_total_score;
-        map_month_data.get(obj.parent_name).set("现场检查",total);
-        total = map_month_data.get(obj.parent_name).get("数据平台应用")+obj.data_total_score;
-        map_month_data.get(obj.parent_name).set("数据平台应用",total);
-    }
+function data_each_people_points_all(data) {
+    var flag = false;
+        var name = ['公司检查','第三方暗访','特情稽查','现场稽查','数据平台应用'];
+        //var name = ['公司检查', '仪容仪表着装', '表情', '动作', '文明用语', '工作纪律及行为举止', '便民服务', '安全管理']
+        array_all_name = name;
+        // array_all_deptname = ["连云港道管", "盐城道管", "南通道管"];
+        var Tmth = data.Tmth;
+        var Pmth = data.Pmth;
+       
+        for (var i = 0; i < name.length; i++) {
+            //     var temp_map_m = new HashMap();
+            //     var temp_map_p = new HashMap();
+
+            for (var j = 0; j < Tmth.length; j++) {
+                flag = false;
+                if (array_all_deptname.length > 0) {
+                    for (var p = 0; p < array_all_deptname.length; p++) {
+                        if (array_all_deptname[p] == Tmth[j].pfeeStationName) {
+                            flag = true;
+                            break;
+                        }
+                    }
+                }
+                if (!flag) {
+                    array_all_deptname.push(Tmth[j].pfeeStationName);
+                }
+
+                if (name[i] == Tmth[j].name) {
+                    if (map_month_data.get(Tmth[j].pfeeStationName) != null) {
+                        var map = map_month_data.get(Tmth[j].pfeeStationName)
+                        if (map.get(name[i]) != null) {
+                            map.set(name[i], map.get(name[i]) + Tmth[j].all_check_score);
+                        } else {
+                            map.set(name[i], Tmth[j].all_check_score);
+                        }
+                        map_month_data.set(Tmth[j].pfeeStationName, map);
+                    } else {
+                        var map = new HashMap();
+                        map.set(name[i], Tmth[j].all_check_score);
+                        map_month_data.set(Tmth[j].pfeeStationName, map);
+                    }
+                }
+
+            }
+
+            for (var j = 0; j < Pmth.length; j++) {
+                flag = false;
+                if (array_all_deptname.length > 0) {
+                    for (var p = 0; p < array_all_deptname.length; p++) {
+                        if (array_all_deptname[p] == Pmth[j].pfeeStationName) {
+                            flag = true;
+                            break;
+                        }
+                    }
+                }
+                if (!flag) {
+                    array_all_deptname.push(Pmth[j].pfeeStationName);
+                }
+                if (name[i] == Pmth[j].name) {
+                    if (map_per_data.get(Pmth[j].pfeeStationName) != null) {
+                        var map = map_per_data.get(Pmth[j].pfeeStationName)
+                        if (map.get(name[i]) != null) {
+                            map.set(name[i], map.get(name[i]) + Pmth[j].all_check_score);
+                        } else {
+                            map.set(name[i], Pmth[j].all_check_score);
+                        }
+                        map_per_data.set(Pmth[j].pfeeStationName, map);
+                    } else {
+                        var map = new HashMap();
+                        map.set(name[i], Pmth[j].all_check_score);
+                        map_per_data.set(Pmth[j].pfeeStationName, map);
+                    }
+                }
+            }
+        } 
 }
-}

+ 2 - 1
VisualInspection/js/util/service.js

@@ -371,7 +371,8 @@ function post_common_service(url, param, success, fail) {
 }
 
 function post_common_service_nohead(url, param, successfunc, errorfunc) {
-
+console.log(url);
+   console.log(param);
 
     $.ajax({
         url: url,

+ 1 - 0
VisualInspection/js/util/util.js

@@ -105,6 +105,7 @@ function GetQueryString(name) {
 }
 
 function getItemByIdFromArr(id, curDatas) {
+    console.log(curDatas);
     var rowData;
     for (var i = 0; i < curDatas.length; i++) {
         if (id == curDatas[i].id) {

+ 57 - 9
VisualInspection/js/util/video.js

@@ -43,7 +43,6 @@ function setVideoPos() {
 }
 
 function queryVideoLists(videoIds) {
-    console.log(videoIds);
     if (CLIENTVERSION == 1 && ISCLIENT) {
         callFunc("showvideoview", "false");
         layer.msg('该软件版本太低,请升级!', {
@@ -57,28 +56,61 @@ function queryVideoLists(videoIds) {
         var startTime = new Date(s1).getTime() / 1000;
         s1 = $.checkTask.end_time.replace(/-/g, "/");
         var endTime = new Date(s1).getTime() / 1000;
-
         VideoGetByIds(videoIds, function(data) {
+            var video_type = 1; 
+            if(data[0].user_name != "undefined" && data[0].user_name != null){
+                video_type = 2;
+            }
+            if(video_type == 2){
+                curVideo = data.channel;
+            }
+            var cammercode = new Array();
+            var username = new Array();
+            var userpwd = new Array();
+            var v_ip = new Array();
+            var v_port = new Array();
+            if(video_type == 2){
+                for(var index in data){
+                    var videoObj = data[index];
+                    cammercode.push(videoObj.channel);
+                    username.push(videoObj.user_name);
+                    userpwd.push(videoObj.user_pwd);
+                    v_ip.push(videoObj.ip);
+                    v_port.push(videoObj.port);
+              }
+              videoIds = cammercode.toString();
+            }
             if (data != null && typeof(data) != "undefined") {
                 var pp = {
                     "videoIds": videoIds,
                     "cindex": 1,
                     "starttime": startTime,
                     "endtime": endTime,
+                    "cammercode": cammercode.toString(),
+                    "username": username.toString(),
+                    "userpwd": userpwd.toString(),
+                    "v_ip": v_ip.toString(),
+                    "video_type":video_type,
+                    "v_port": v_port.toString(),
                     "videos": []
                 };
 
-                console.log(data)
                 data.forEach(came => {
 
                     pp.videos.push({
                         "videoId": came.device_id,
                         "cametype": came.cameratype,
-                        "filetype": came.playtype
+                        "filetype": came.playtype,
+                        "cammercode": came.channel,
+                        "username": came.user_name,
+                        "userpwd": came.user_pwd,
+                        "v_ip": came.ip,
+                        "video_type":video_type,
+                        "v_port": came.port
                     });
 
                 });
-
+                console.log(pp);
                 callFunc("findvideolist", JSON.stringify(pp));
             } else {
                 callFunc("showvideoview", "false");
@@ -116,22 +148,38 @@ function queryVideoList() {
         //获取摄像头信息
         VideoGetById(curVideo, function(data) {
             if (data != null && typeof(data) != "undefined") {
+                var video_type = 1;
                 var str = curVideo + '|' + startTime + '|' + endTime + '|' + data.cameratype + '|' + data.playtype + '|' + index;
-
-
+                if(typeof(data.user_name) != "undefined" && typeof(data.user_name) != null){
+                    video_type = 2;
+                }
+                if(video_type == 2){
+                    curVideo = data.channel;
+                }
                 var pp = {
                     "videoIds": curVideo,
                     "cindex": 10,
                     starttime: startTime,
                     "endtime": endTime,
+                    "cammercode": data.channel,
+                    "username": data.user_name,
+                    "userpwd": data.user_pwd,
+                    "v_ip": data.ip,
+                    "video_type":video_type,
+                    "v_port": data.port,
                     "videos": [{
                         "videoId": curVideo,
                         "cametype": data.cameratype,
-                        "filetype": data.playtype
+                        "filetype": data.playtype,
+                        "cammercode": data.channel,
+                        "username": data.user_name,
+                        "userpwd": data.user_pwd,
+                        "v_ip": data.ip,
+                        "video_type":video_type,
+                        "v_port": data.port
                     }]
                 };
                 if (CLIENTVERSION == 1) {
-                    console.log(str);
                     callFunc("findvideolist", str);
                 } else {
                     callFunc("findvideolist", JSON.stringify(pp));

+ 37 - 7
VisualInspection/motorcade/js/carInfo.js

@@ -6,7 +6,7 @@ var user = $.zui.store.get("user");
 
 
 function initTaskPage() {
-    getUser();
+    getdept();
     initTableRowBtn();
     queryTask();
 }
@@ -40,13 +40,15 @@ function initTableRowBtn() {
 }
 //查询任务
 function queryTask() {
+    var dept =  $("#dept").val();
     var data = {
-        // "check_status": cur_status
+         "car_dept": dept
     };
     var cols = [
         { width: 20, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
         { width: 80, text: '车牌号', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'car_number' },
         { width: 80, text: '车类型', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'car_type' },
+        { width: 80, text: '车队', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'dept_name' },
         { width: 80, text: '驾驶员', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'driver_name' },
        // { width: 80, text: '车类型', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'car_type' },
     ];
@@ -91,7 +93,8 @@ function checkUpdate(id) {
         console.log(redata);
         car_number = $("#car_number").val(redata.car_number);
         car_type = $("#car_type").val(redata.car_type);
-        driver = $("#driver").val(redata.driver);
+         $("#car_dept").val(redata.car_dept);
+         getUser(redata.driver);
     })
 }
 
@@ -105,10 +108,12 @@ function save(){
     var car_number = $("#car_number").val();
     var car_type = $("#car_type").val();
     var driver = $("#driver").val();
+    var car_dept = $("#car_dept").val();
     var data ={
         'car_number':car_number,
         'car_type':car_type,
-        'driver':driver
+        'driver':driver,
+        'car_dept':car_dept
     }
     if(is_save == 0){
         if(driver != null && driver != ''){
@@ -127,14 +132,20 @@ function save(){
    
 }
 
-function getUser(){
+function getUser(userid){
+    $("#driver").html('');
+    var dept =  $("#car_dept").val();
     var userData = {
-        "organid": 102
+        "organid": dept
     }
     UserGetList(userData, function(data) {
         $("#driver").html('');
         for(var index in data){
-        var html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
+            if(data[index].id == userid){
+                var html = "<option selected='selected' value='"+data[index].id+"'>"+data[index].truename+"</option>"
+            }else{
+                var html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
+            }
         $("#driver").append(html);
     }
     });
@@ -150,6 +161,25 @@ function deleteCarInfo(id){
    });
 }
 
+function getdept(deptid){
+    //debugger;  
+    $("#dept").append("<option selected='selected' value=''>"+"全部"+"</option>");
+    get_common_service('/dept/getCarDept',null,function(data) {
+            for(var index in data){
+                 if(data[index].organname.indexOf("车队") >= 0){
+                if(data[index].id == deptid){
+                    var html = "<option selected='selected' value='"+data[index].id+"'>"+data[index].organname+"</option>"
+                }else{
+                    var html = "<option value='"+data[index].id+"'>"+data[index].organname+"</option>"
+                }
+                $("#dept").append(html);
+                $("#car_dept").append(html)
+            }
+         }
+         getUser();
+        });
+}
+
 
 
 

+ 70 - 8
VisualInspection/motorcade/js/carTask.js

@@ -6,7 +6,8 @@ var user = $.zui.store.get("user");
 
 
 function initTaskPage() {
-    getCarNumber();
+    getCarDept();
+    getSearch();
     initQueryParams();
     initTableRowBtn();
     queryTask();
@@ -20,7 +21,7 @@ function initQueryParams() {
     });
 
     var store_params = $.zui.store.get('store_param_'+current_url);
-    console.log(store_params);
+    //console.log(store_params);
     var checked_dept = null;
     if (store_params) {
         $("#searchTime").val(getCurrentTimeFormat());
@@ -61,6 +62,7 @@ function initTableRowBtn() {
 function queryTask() {
     var t = getTimeByMonth(GV("#searchTime"));
     var data = {
+         "car_dept":$("#carDept").val(), 
          "driver":$("#driverlist").val(),
          "car_id":$("#carNumber").val(),
          "startTime": getMomentTimeFormat(t.starttime),
@@ -93,7 +95,7 @@ function queryTask() {
     });
     $.zui.store.set('store_param_'+current_url, data);
      var store_params = $.zui.store.get('store_param_'+current_url);
-     console.log(store_params);
+     ///.log(store_params);
     
 }
 
@@ -119,10 +121,13 @@ function checkUpdate(id) {
         $("#peopleHead").hide();
         $('#townsman').html("");
         $('#addModal').modal('show');
-        $("#car_number").val(redata.car_id);
+        $("#car_dept").val(redata.car_dept);
+       // $("#car_number").val(redata.car_id);
         $("#start_addr").val(redata.start_addr);
         $("#end_addr").val(redata.end_addr);
-        $("#driver").val(redata.driver);
+        getcd(redata.driver);
+        getCarNumberAdd(redata.car_id);
+        //$("#driver").val(redata.driver);
         $("#dept100").val(redata.send_dept);
         $("#start_time").val(redata.start_time)
         $("#end_time").val(redata.end_time)
@@ -150,8 +155,13 @@ function checkUpdate(id) {
 
 function resert() {
     $("#car_number").val('');
+    $("#car_dept").val('');
     $("#start_addr").val('');
     $("#end_addr").val('');
+    $("#start_time").val('');
+    $("#end_time").val('');
+    $("#start_mileage").val('');
+    $("#end_mileage").val('');
     $("#driver").val('');
     $("#dept100").val('');
     $("#dept0").val('');
@@ -164,16 +174,17 @@ function resert() {
 }
 
 function getCarNumber(){
+    var carDept =   $("#carDept").val();
    var data ={
-
+     "car_dept":carDept
    };
     post_common_service('/c/info/getall/0/0', data, function(redata) {
-        $("#car_number").html('');
+      //  $("#car_number").html('');
         $("#carNumber").html("");
         $("#carNumber").append("<option value=''>全部</option>");
         for(var index in redata){
         var html = "<option value='"+redata[index].id+"'>"+redata[index].car_number+"</option>";
-        $("#car_number").append(html);
+       // $("#car_number").append(html);
         $("#carNumber").append(html);
     }
     });
@@ -188,6 +199,57 @@ function deleteRecord(id){
     });
 }
 
+function getCarDept(deptid){
+    $("#carDept").html("");
+    $("#car_dept").html("");
+    $("#carDept").append("<option selected='selected' value=''>"+"全部"+"</option>");
+    get_common_service('/dept/getCarDept',null,function(data) {
+            for(var index in data){
+                 if(data[index].organname.indexOf("车队") >= 0){
+                if(data[index].id == deptid){
+                    var html = "<option selected='selected' value='"+data[index].id+"'>"+data[index].organname+"</option>"
+                }else{
+                    var html = "<option value='"+data[index].id+"'>"+data[index].organname+"</option>"
+                }
+                $("#carDept").append(html);
+                $("#car_dept").append(html)
+            }
+         }
+         //getCarNumber();
+        });
+}
+
+function getSearch(){
+    getCarNumber();
+    getDriver();
+}
+
+function getDriver(){
+    $("#driverlist").html("");
+    $("#driverlist").append("<option value=''>全部</option>");
+    var carDept =   $("#carDept").val();
+   if(carDept != '' && carDept != null && carDept != 'unfinded'){
+    var userData = {
+        "organid": carDept
+    }
+    UserGetList(userData, function(data) {
+        $("#deptpeople"+i).html('');
+        for(var index in data){
+        var html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
+        $("#driverlist").append(html);
+    }
+    });
+    }else{
+        post_common_service('/user/getDriver',null, function(data) {
+            for(var index in data){
+            var html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
+            $("#driverlist").append(html);
+            }
+        });
+    }
+  
+}
+
 
 
 

+ 36 - 10
VisualInspection/motorcade/js/maintenanceInfo.js

@@ -12,6 +12,7 @@ function initTaskPage() {
         format: 'yyyy-MM-dd HH:mm'
     });
     initQueryParams();
+    getdept();
     getCarNumber();
     getUser();
     initTableRowBtn();
@@ -49,11 +50,11 @@ function initTableRowBtn() {
 }
 //查询任务
 function queryTask() {
-    var car_id = $("#carNumber").val();
-    var maintenance_type = $("#maintenance_type").val();
+    var carDept = $("#carDept").val();
+    var maintenance_type = $("#maintenance_select").val();
     var t = getTimeByMonth(GV("#searchTime"));
     var data = {
-        "car_id":car_id,
+        "car_dept":carDept,
         "start_time": getMomentTimeFormat(t.starttime),
         "end_time": getMomentTimeFormat(t.endtime),
         "maintenance_type":maintenance_type
@@ -109,7 +110,8 @@ function checkUpdate(id) {
         console.log(redata);
          $("#maintenance_number").val(redata.maintenance_number);
          $("#maintenance_type").val(redata.maintenance_type);
-         $("#car_id").val(redata.car_id);
+         $("#car_dept").val(redata.car_dept);
+         getCarNumber(redata.car_id);
          $("#remark").val(redata.remark);
          $("#maintenance_time").val(redata.maintenance_time);
     })
@@ -125,11 +127,13 @@ function resert() {
 
 function save(){
     var car_id = $("#car_id").val();
+    var car_dept = $("#car_dept").val();
     var maintenance_type = $("#maintenance_type").val();
     var maintenance_time = moment($("#maintenance_time").val()).format("YYYY-MM-DD HH:mm:ss")
     var maintenance_number = $("#maintenance_number").val();
     var remark = $("#remark").val();
     var data ={
+        'car_dept':car_dept,
         'car_id':car_id,
         'maintenance_type':maintenance_type,
         'maintenance_time':maintenance_time,
@@ -162,18 +166,22 @@ function getUser(){
     });
 }
 
-function getCarNumber(){
+function getCarNumber(id){
     var data ={
- 
+          "car_dept": $("#car_dept").val()
     };
      post_common_service('/c/info/getall/0/0', data, function(redata) {
          $("#car_id").html('');
-         $("#carNumber").html("");
-         $("#carNumber").append("<option value=''>全部</option>");
+         //$("#carNumber").html("");
+        // $("#carNumber").append("<option value=''>全部</option>");
          for(var index in redata){
-         var html = "<option value='"+redata[index].id+"'>"+redata[index].car_number+"</option>";
+             if(id = redata[index].id){
+                var html = "<option selected='selected' value='"+redata[index].id+"'>"+redata[index].car_number+"</option>";
+             }else{
+                var html = "<option value='"+redata[index].id+"'>"+redata[index].car_number+"</option>";
+             }
          $("#car_id").append(html);
-         $("#carNumber").append(html);
+         //$("#carNumber").append(html);
      }
      });
  }
@@ -188,6 +196,24 @@ function deleteMaintenance(id){
    });
 }
 
+function getdept(deptid){
+    //debugger;  
+    $("#carDept").append("<option selected='selected' value=''>"+"全部"+"</option>");
+    get_common_service('/dept/getCarDept',null,function(data) {
+            for(var index in data){
+                 if(data[index].organname.indexOf("车队") >= 0){
+                if(data[index].id == deptid){
+                    var html = "<option selected='selected' value='"+data[index].id+"'>"+data[index].organname+"</option>"
+                }else{
+                    var html = "<option value='"+data[index].id+"'>"+data[index].organname+"</option>"
+                }
+                $("#carDept").append(html);
+                $("#car_dept").append(html)
+            }
+         }
+         getCarNumber();
+        });
+}
 
 
 

+ 9 - 3
VisualInspection/motorcade/view/addCar.html

@@ -1,8 +1,6 @@
 <div class="container-fluid ">
     <form class="form-horizontal">
         <div class="form-group">
-        </div>
-        <div class="form-group">
             <label for="exampleInputAccount4" class="col-md-4 col-sm-2">车牌号</label>
             <div class="col-md-6 col-sm-10">
             <input type="text" class="form-control" id="car_number" placeholder="">
@@ -15,11 +13,19 @@
             </div>
         </div>
         <div class="form-group">
+            <label for="exampleInputPassword4" class="col-md-4 col-sm-2">车队</label>
+            <div class="col-md-6 col-sm-10">
+                <select class="form-control" id="car_dept" onchange="getUser()">
+                </select>
+        </div>
+        </div>
+        <div class="form-group">
             <label for="exampleInputPassword4" class="col-md-4 col-sm-2">驾驶员</label>
             <div class="col-md-6 col-sm-10">
-                <select class="form-control" id="driver" >
+                <select class="form-control" id="driver">
                 </select>
         </div>
+        </div>
         <div class="form-group" style="margin-top:50px;float: right;margin-right: 40px">
             <button class="btn btn-info2 col-xs-1" style="height:40px;width:90px;" type="button" onclick="save()">保存</button>
         </div>

+ 7 - 0
VisualInspection/motorcade/view/addMaintenance.html

@@ -15,6 +15,13 @@
             </div>
         </div>
         <div class="form-group">
+            <label for="exampleInputPassword4" class="col-md-4 col-sm-2">车队:</label>
+            <div class="col-md-6 col-sm-10">
+                <select class="form-control" id="car_dept" onchange="getCarNumber()" >
+                </select>
+            </div>
+        </div>
+        <div class="form-group">
             <label for="exampleInputPassword4" class="col-md-4 col-sm-2">车牌号:</label>
             <div class="col-md-6 col-sm-10">
                 <select class="form-control" id="car_id" >

+ 105 - 26
VisualInspection/motorcade/view/addcarTask.html

@@ -6,15 +6,15 @@
 <div class="form-group" style="margin:0px;vertical-align: middle">
     <div class="row">
     <div class="form-group col-xs-5">
-        <label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">部门:</label>
+        <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">部门:</label>
         <div class="col-xs-8">
             <select class="form-control" id="dept0" onchange="getUser(0)">
                         </select>
         </div>
     </div>
     <div class="form-group col-xs-5">
-        <label for="exampleInputAccount1" class="col-xs-3">用车人:</label>
-        <div class="col-xs-8">
+        <label for="exampleInputAccount1" class="col-xs-4"><font style="color:red">*</font>用车人:</label>
+        <div class="col-xs-7">
             <select class="form-control" id="deptpeople0" >
             </select>
         </div>
@@ -30,17 +30,28 @@
 <div class="form-group" style="margin:0px;vertical-align: middle" id="townsman">
       
     </div>
+    <div class="form-group">
+        <div class="row">
+            <div class="form-group col-xs-5">
+                <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0"><font style="color:red">*</font>车队</label>
+                <div class="col-xs-8">
+                    <select class="form-control" id="car_dept" onchange="getAdd()">
+                    </select>
+                </div>
+            </div>
+            </div>
+    </div>
 <div class="form-group">
     <div class="row">
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">驾驶员:</label>
+            <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0"><font style="color:red">*</font>驾驶员:</label>
             <div class="col-xs-8">
                 <select class="form-control" id="driver" >
                 </select>
             </div>
         </div>
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3">车牌号:</label>
+            <label for="exampleInputAccount1" class="col-xs-4"><font style="color:red">*</font>车牌号:</label>
             <div class="col-xs-8">
                     <select class="form-control" id="car_number" >
                         </select>
@@ -51,13 +62,13 @@
 <div class="form-group">
     <div class="row">
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">出发时间: </label>
+            <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0"><font style="color:red">*</font>出发时间: </label>
             <div class="col-xs-8">
                 <input type="text" style="width:100%;" id="start_time" class="form-control">
             </div>
         </div>
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3">结束时间:</label>
+            <label for="exampleInputAccount1" class="col-xs-4"><font style="color:red">*</font>结束时间:</label>
             <div class="col-xs-8">
                 <input type="text" style="width:100%;" id="end_time" class="form-control">
             </div>
@@ -67,13 +78,13 @@
 <div class="form-group">
     <div class="row">
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">出发地点: </label>
+            <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">出发地点: </label>
             <div class="col-xs-8">
                 <input type="text" style="width:100%;" id="start_addr" class="form-control">
             </div>
         </div>
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3">结束地点:</label>
+            <label for="exampleInputAccount1" class="col-xs-4">结束地点:</label>
             <div class="col-xs-8">
                 <input type="text" style="width:100%;" id="end_addr" class="form-control">
             </div>
@@ -83,13 +94,13 @@
 <div class="form-group">
     <div class="row">
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">出发前里程数: </label>
+            <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">出发里程数: </label>
             <div class="col-xs-8">
                 <input type="text" style="width:100%;" id="start_mileage" class="form-control">
             </div>
         </div>
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3">结束后里程数:</label>
+            <label for="exampleInputAccount1" class="col-xs-4">结束里程数:</label>
             <div class="col-xs-8">
                 <input type="text" style="width:100%;" id="end_mileage" class="form-control">
             </div>
@@ -99,14 +110,14 @@
 <div class="form-group">
     <div class="row">
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">派车单位 </label>
+            <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">派车单位 </label>
             <div class="col-xs-8">
                 <select class="form-control" id="dept100" onchange="getUser(100)">
                 </select>
             </div>
         </div>
         <div class="form-group col-xs-5">
-            <label for="exampleInputAccount1" class="col-xs-3">派车人</label>
+            <label for="exampleInputAccount1" class="col-xs-4">派车人</label>
             <div class="col-xs-8">
                 <select class="form-control" id="deptpeople100">
                 </select>
@@ -115,7 +126,7 @@
         </div>
 </div>
 <div class="form-group" style="margin:0px;">
-        <label for="exampleInputAccount1" class="col-xs-2" style="text-align: left;padding:0">用车事由: </label>
+        <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">用车事由: </label>
         <textarea id="reason" class="col-xs-6 form-control" rows="6" cols="25"></textarea>
 </div>
 <div class="form-group" style="margin-top:50px;float: right;margin-right: 40px">
@@ -129,7 +140,7 @@
     var deptobj = '';
     getdept(0);
     getdept(100);
-    getcd();
+    getAdd();
     laydate.render({
         elem: '#start_time',
         type: 'datetime',
@@ -142,18 +153,33 @@
         format: 'yyyy-MM-dd HH:mm'
     });
 
-    function getcd(){
-        $("#driverlist").append("<option value=''>全部</option>");
+    function getcd(uid){
+        //console.log(uid);
+        $("#driver").html("");
+        //$("#driverlist").append("<option value=''>全部</option>");
+        var carDept =   $("#car_dept").val();
+        if(carDept != '' && carDept != null && carDept != 'unfinded'){
+            carDept = carDept;
+        }else{
+            carDept = 102;
+        } 
+       // console.log(carDept);
         //var dept = $("#dept"+i).val();
         var userData = {
-            "organid": 102
+            "organid": carDept
         }
         UserGetList(userData, function(data) {
+            var html = '';
+            //console.log(data);
             $("#deptpeople"+i).html('');
             for(var index in data){
-            var html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
+                if(data[index].id == uid){
+                     html = "<option selected='selected' value='"+data[index].id+"'>"+data[index].truename+"</option>";
+                }else{
+                     html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
+                }
             $("#driver").append(html);
-            $("#driverlist").append(html);
+           // $("#driverlist").append(html);
         }
         });
     }
@@ -186,6 +212,7 @@
     }
 
     function getUser(number,uid){
+        //debugger
         console.log(uid);
         var dept = $("#dept"+number).val();
         var userData = {
@@ -195,9 +222,10 @@
             $("#deptpeople"+number).html('');
             var html;
             for(var index in data){
-                html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
             if(uid != undefined && uid == data[index].id){
                 html = "<option selected='selected' value='"+data[index].id+"'>"+data[index].truename+"</option>";
+            }else{
+                html = "<option value='"+data[index].id+"'>"+data[index].truename+"</option>";
             }
             $("#deptpeople"+number).append(html);
         }
@@ -220,6 +248,7 @@
         var oil = $("#oil").val();
         var driver = $("#driver").val();
         var send_car_people = $("#deptpeople100").val();
+        var car_dept = $("#car_dept").val();
         if(i > 0){
             for(var n= 1;n<i+1;n++){
                 if(n == 1){
@@ -247,9 +276,14 @@
             "oil":oil,
             "send_car_people":send_car_people,
             "dept":dept,
-            "reason":reason
+            "reason":reason,
+            "car_dept":car_dept
         }  
-        if(is_save == 0){
+        if(start_time != null && start_time != '' && end_time != null && end_time != ''){
+        if(car_number != null && car_number != ''){
+        if(deptpeople != null && deptpeople != ''){
+        if(driver != null && driver != ''){
+            if(is_save == 0){
             data.train_safe = 0;
             data.service_quality = 0;
             data.car_capacity = 0;
@@ -263,6 +297,18 @@
                   window.parent.location.reload();
             });
         }
+        }else{
+            alert("请选择驾驶员");
+        }
+        }else{
+            alert("请选择乘车人");
+        }
+        }else{
+            alert("请选择所乘车辆");
+        }
+        }else{
+            alert("请选择乘车时间");
+        }
     }
 
     function addPerson(deptid,uid){
@@ -270,15 +316,15 @@
         $("#peopleHead").show();
         var html= '<div class="row">'+
                    '<div class="form-group col-xs-5">'+
-                        '<label for="exampleInputAccount1" class="col-xs-3" style="text-align: left;padding:0">部门:</label>'+
+                        '<label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">部门:</label>'+
                         '<div class="col-xs-8">'+
                             '<select class="form-control" id="dept'+i+'" onchange="getUser(\''+i+'\')">'+
                                         '</select>'+
                        '</div>'+
                     '</div>'+
                     '<div class="form-group col-xs-5">'+
-                        '<label for="exampleInputAccount1" class="col-xs-3">乘车人:</label>'+
-                        '<div class="col-xs-8">'+
+                        '<label for="exampleInputAccount1" class="col-xs-4">乘车人:</label>'+
+                        '<div class="col-xs-7">'+
                            '<select class="form-control" id="deptpeople'+i+'">'+
                            '</select>'+
                        '</div>'+
@@ -288,4 +334,37 @@
          getdept(i,deptid);    
          getUser(i,uid);          
     }
+
+    function getAdd(){
+        getcd();
+        getCarNumberAdd();
+    }
+
+    function getCarNumberAdd(uid){
+    var carDept =   $("#car_dept").val();
+    if(carDept != '' && carDept != null && carDept != 'unfinded'){
+        carDept = carDept;
+        }else{
+            carDept = 102;
+        } 
+        //console.log(carDept);
+   var data ={
+     "car_dept":carDept
+   };
+    post_common_service('/c/info/getall/0/0', data, function(redata) {
+        var html = '';
+        $("#car_number").html('');
+        // $("#carNumber").html("");
+        // $("#carNumber").append("<option value=''>全部</option>");
+        for(var index in redata){
+            if(redata[index].id == uid){
+                html = "<option selected='selected' value='"+redata[index].id+"'>"+redata[index].car_number+"</option>";
+            }else{
+                html = "<option value='"+redata[index].id+"'>"+redata[index].car_number+"</option>";
+            }
+        $("#car_number").append(html);
+       // $("#carNumber").append(html);
+    }
+    });
+}
 </script>

+ 7 - 7
VisualInspection/motorcade/view/carInfo.html

@@ -9,16 +9,16 @@
     <div class="row">
         <form class="form-horizontal" style="margin:0px;">
             <div class="form-group" style="margin:0px;">
-                <!-- <div class="form-group col-sm-3" id="isCompleteDiv">
-                    <label for="exampleInputAccount1" class="col-sm-4">车牌号:</label>
+                <div class="form-group col-sm-3" id="isCompleteDiv">
+                    <label for="exampleInputAccount1" class="col-sm-4">车:</label>
                     <div class="col-sm-8">
-                        <select class="form-control" id="carNumber">
+                        <select class="form-control" id="dept">
                         </select>
                     </div>
-                </div> -->
-                <!-- <div class="form-group col-sm-2">
+                </div>
+                <div class="form-group col-sm-2">
                     <button class="btn btn-info2 col-sm-1" style="width:80px;" type="button" onclick="queryTask()" style="">查询</button>
-                </div> -->
+                </div>
                 <div class="form-group col-sm-1" style="float: right">
                     <button id="saveButton" class="btn btn-info2 col-sm-1" style="width:90px;" type="button" onclick="addTask()">新增</button>
                 </div>
@@ -40,7 +40,7 @@
         <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
-                <h4 class="modal-title"><span id="modalTitle">新增车记录<span></h4>
+                <h4 class="modal-title"><span id="modalTitle">新增车记录<span></h4>
             </div>
             <div class="modal-body">
                 <link id="addrecord" rel="import" href="/motorcade/view/addCar.html?__inline">

+ 7 - 0
VisualInspection/motorcade/view/carTask.html

@@ -15,6 +15,13 @@
                             <input type="text" id="searchTime" class="form-control form-date" placeholder="选择周期">
                         </div>
                 </div>
+                <div class="form-group col-sm-2">
+                    <label for="exampleInputAccount1" class="col-sm-4">车队:</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="carDept" onchange="getSearch()">
+                        </select>
+                    </div>
+                </div>
                 <div class="form-group col-sm-3">
                     <label for="exampleInputAccount1" class="col-sm-4">驾驶员:</label>
                     <div class="col-sm-8">

+ 1 - 1
VisualInspection/motorcade/view/car_collection.html

@@ -21,7 +21,7 @@
             </div>
         </form>
     </div>
-    <div class="table-title"><span>清障队考核情况汇总表</span></div>
+    <div class="table-title"><span>公司公务车辆使用运行情况统计汇总</span></div>
 
     <div class="row">
         <!-- 使用一个div来显示数据表格 -->

+ 11 - 4
VisualInspection/motorcade/view/maintenanceInfo.html

@@ -15,17 +15,24 @@
                             <input type="text" id="searchTime" class="form-control form-date" placeholder="选择周期">
                         </div>
                 </div>
-                <div class="form-group col-sm-3" id="isCompleteDiv">
+                <div class="form-group col-sm-2" id="isCompleteDiv">
+                    <label for="exampleInputAccount1" class="col-sm-4">车队</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="carDept">
+                        </select>
+                    </div>
+                </div>
+                <!-- <div class="form-group col-sm-3" id="isCompleteDiv">
                     <label for="exampleInputAccount1" class="col-sm-4">车牌号:</label>
                     <div class="col-sm-8">
                         <select class="form-control" id="carNumber">
                         </select>
                     </div>
-                </div>
+                </div> -->
                 <div class="form-group col-sm-3" id="isCompleteDiv">
                         <label for="exampleInputAccount1" class="col-sm-4">维保类型:</label>
                         <div class="col-sm-6">
-                            <select class="form-control" id="maintenance_type">
+                            <select class="form-control" id="maintenance_select">
                                 <option value="">全部</option>
                                 <option value="1">油耗</option>>
                                 <option value="2">维保</option>>
@@ -56,7 +63,7 @@
         <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
-                <h4 class="modal-title"><span id="modalTitle">新增用车记录<span></h4>
+                <h4 class="modal-title"><span id="modalTitle">新增加油维保记录<span></h4>
             </div>
             <div class="modal-body">
                 <!-- <link id="addrecord" rel="import" href="/motorcade/view/addCar.html?__inline"> -->

+ 1 - 0
VisualInspection/node_modules/.package_versions.json

@@ -0,0 +1 @@
+{}

+ 17 - 4
VisualInspection/qzd/js/statistics/assess_type.js

@@ -12,7 +12,7 @@ var itemArray = new Array();
 function queryTypeClick() {
     //每次点击前清空表格数据
     $(".table-tbody").empty('');
-    var t = getTimeByMonth($("#start-time").val());
+    var t = getTimeByRMonth($("#start-time").val());
     var start_date = getMomentTimeFormat(t.starttime);
     var end_date = getMomentTimeFormat(t.endtime);
     var param = {
@@ -36,7 +36,7 @@ function queryTypeClick() {
  * 表格初始化
  */
 function initQueryType() {
-    var t = getTimeByMonth($("#start-time").val());
+    var t = getTimeByRMonth($("#start-time").val());
     var start_date = getMomentTimeFormat(t.starttime);
     var end_date = getMomentTimeFormat(t.endtime);
 
@@ -183,7 +183,20 @@ function gethtml(data, i, itemlist, avg, lists) {
           strTbody +="<td width='55px'>"+score+"</td>"
       }
       count = obj.all_check_score+obj.third_total_score+obj.onsite_total_score;
-      var score = (1000-count/(obj.check_t_num+2)).toFixed(2); 
+      var checkNum = obj.check_t_num;
+      if(obj.third_total_score > 0){
+        checkNum++;
+      }
+      if(obj.onsite_total_score > 0){
+        checkNum++;
+      }
+      if(checkNum == 0){
+        var score = (1000-count/1).toFixed(2); 
+      }else{
+        var score = (1000-count/checkNum).toFixed(2); 
+        count = count/checkNum;
+      }
+
      // strTbody +="<th colspan=" + itemlist[0].length + " height='40px'>视频稽查</th><th colspan=" + itemlist[1].length + " height='40px'>暗访稽查</th><th colspan=" + itemlist[2].length + " height='40px'>现场检查</th>"
       strTbody +="<th width='6%'>"+count+"</th><th width='6%'>"+score+"</th>"
       strTbody +="</tr>"
@@ -383,7 +396,7 @@ function filterJudge(num1, num2) {
 }
 
 function exportExcel() {
-    var t = getTimeByMonth($("#start-time").val());
+    var t = getTimeByRMonth($("#start-time").val());
     var start_date = getMomentTimeFormat(t.starttime);
     var end_date = getMomentTimeFormat(t.endtime);
     window.open(getQzdExcelServeraddr() + "q/file/score/item/info?start_date=" + start_date + "&end_date=" + end_date);

+ 3 - 3
VisualInspection/qzd/js/statistics/operation_management_integration.js

@@ -15,7 +15,7 @@ var qzdRecord;
 function queryTypeClick() {
     //每次点击前清空表格数据
     $(".table-tbody").empty('');
-    var t = getTimeByMonth($("#start-time").val());
+    var t = getTimeByRMonth($("#start-time").val());
     var start_date = getMomentTimeFormat(t.starttime);
     var end_date = getMomentTimeFormat(t.endtime);
    
@@ -39,7 +39,7 @@ function queryTypeClick() {
  * 表格初始化
  */
 function initQueryType() {
-    var t = getTimeByMonth($("#start-time").val());
+    var t = getTimeByRMonth($("#start-time").val());
     var start_date = getMomentTimeFormat(t.starttime);
     var end_date = getMomentTimeFormat(t.endtime);
     var param = {
@@ -180,7 +180,7 @@ function filterJudge(num1, num2) {
 }
 
 function exportExcel() {
-    var t = getTimeByMonth($("#start-time").val());
+    var t = getTimeByRMonth($("#start-time").val());
     var start_date = getMomentTimeFormat(t.starttime);
     var end_date = getMomentTimeFormat(t.endtime);
     window.open(getQzdExcelServeraddr() + "q/file/operation/manage/integration?start_date=" + start_date + "&end_date=" + end_date);

+ 5 - 4
VisualInspection/qzd/js/statistics/service_area_data_statistics.js

@@ -20,7 +20,7 @@ $.jeDate("#start-time", {
 });
 $("#start-time").val(getCurrentTimeFormat());
 
-var t = getTimeByMonth($("#start-time").val());
+var t = getTimeByRMonth($("#start-time").val());
 var start_date = getMomentTimeFormat(t.starttime);
 var end_date = getMomentTimeFormat(t.endtime);
 
@@ -209,7 +209,7 @@ $(function() {
     $(".query button").click(function() {
         // var user_id = $("#select-personal").val();
         var dept_id = $("#select-dept").val();
-        var t = getTimeByMonth($("#start-time").val());
+        var t = getTimeByRMonth($("#start-time").val());
         var start_date = getMomentTimeFormat(t.starttime);
         var end_date = getMomentTimeFormat(t.endtime);
         
@@ -230,7 +230,7 @@ $(function() {
      */
     function init_personal_score_statistics(url, dept_id) {
 
-        var t = getTimeByMonth($("#start-time").val());
+        var t = getTimeByRMonth($("#start-time").val());
         var start_date = getMomentTimeFormat(t.starttime);
         var end_date = getMomentTimeFormat(t.endtime);        
 
@@ -330,6 +330,7 @@ $(function() {
      */
     function data_array(data, type) {
         if (type == 1) {
+            console.log(data);
             array_year_score.length = 0;
 
             if (data != '' && data.length != 0) {
@@ -456,7 +457,7 @@ $(function() {
     // }
 
     function getInit() {
-        var t = getTimeByMonth($("#start-time").val());
+        var t = getTimeByRMonth($("#start-time").val());
         var start_date = getMomentTimeFormat(t.starttime);
         var end_date = getMomentTimeFormat(t.endtime);
         // var user_id = $("#select-personal").val();

+ 7 - 7
VisualInspection/qzd/js/statistics/total_company_statistics.js

@@ -102,8 +102,8 @@ $(function() {
 
 
         var param = {
-            "start_date": (parseInt(y) - 1) + "-" + m + "-25" + " 23:00:00",
-            "end_date": y + "-" + (m) + "-25" + " 23:00:00"
+            "start_date": (parseInt(y) - 1) + "-" + m + "-26" + " 00:00:00",
+            "end_date": y + "-" + (m) + "-26" + " 00:00:00"
         }
 
 
@@ -123,8 +123,8 @@ $(function() {
             starty = parseInt(y) - 1;
         }
         var param = {
-            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-25 23:00:00',
-            "end_date": y + '-' + mon + '-25 23:00:00'
+            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-26 00:00:00',
+            "end_date": y + '-' + mon + '-26 00:00:00'
         }
         initRqueset(url, param, 2);
     }
@@ -155,8 +155,8 @@ $(function() {
             starty = parseInt(select_month.split('/')[0]) - 1;
         }
         var param = {
-            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-25 23:00:00',
-            "end_date": select_month.split('/')[0] + '-' + select_month.split('/')[1] + '-25 23:00:00'
+            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-26 00:00:00',
+            "end_date": select_month.split('/')[0] + '-' + select_month.split('/')[1] + '-26 00:00:00'
         }
         initRqueset(url, param, 4);
     }
@@ -288,7 +288,6 @@ $(function() {
      */
     function data_array(data, type) {
         if (type == 1) {
-
             array_year_score.length = 0;
             if (data != '' && data.length != 0) {
 
@@ -389,6 +388,7 @@ $(function() {
                 array_road_score_temp.push({ value: array_road_score[i], name: data[i].feeStationName })
             }
         } else if (type == 4) {
+            console.log(data);
             array_allStation_score.length = 0;
             array_allStation.length = 0;
             data = data.list;

+ 10 - 2
VisualInspection/qzd/js/task/add.js

@@ -325,10 +325,11 @@ function addlisttable(record, id) {
         typename="事故";
     }
     var direction = "";
-    if(record.direction == undefined){
+    if(record.direction != undefined){
         direction=record.direction;
     }
     var taskname = currentday.format("YYYY-MM-DD") + " " + stime + "~" + etime + " " + record.addr+"号桩" +direction+ typename+"清障任务";
+    console.log(record);
     record.rname = taskname;
 
     var feeList = $.zui.store.get("cache_wrecker_group_list");
@@ -524,7 +525,13 @@ function reloadtableData() {
                                     temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info7 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
                                 }
                             } else {
+                                var otime = new Date(r.arrive_time) - new Date(r.received_time);
+                               if(otime/1000/60>30){
+                                temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info8 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
+                               }else{
                                 temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info2 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
+                               }
+                               
                                 //temphtml += '<button data-toggle="button" class="btc normal" style="margin:10px" onclick="selectedTask(this)" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
                             } 
                       //  }
@@ -539,7 +546,8 @@ function reloadtableData() {
                         //存在无效任务
                         temphtml += '<button data-toggle="button" class="btc unusec" style="margin:10px"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
 
-                    } else {
+                    }
+                     else {
                         //完成稽查
                         temphtml += '<button data-toggle="button" class="btc completec" style="margin:10px;" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
                     }

+ 9 - 3
VisualInspection/qzd/js/task/check.js

@@ -71,8 +71,13 @@ function timeHandler(time) {
 
 function initCheck() {
     addBreadMenu("/qzd/view/task/check.html", "清障队视频稽查");
-
-
+    console.log($("#received").val());
+    console.log($.checkTask);
+    $("#received_time").append($.checkTask.received_time);
+    $("#arrive_time").append($.checkTask.arrive_time);
+    var otime = new Date($.checkTask.arrive_time) - new Date($.checkTask.received_time);
+    $("#time").append(otime/1000/60+"分钟");
+    $("#remark").append($.checkTask.recordremark);
     $("#tabcontent").css("height", ($("#video_content").height() - 80) + "px");
     $("#score_datatable").css("height", ($("#video_content").height() - 120) + "px");
     //设置视屏位置
@@ -253,6 +258,7 @@ function getAreaCheckCount() {
     };
     var url = base_server_url + "/q/task/getTasks/0/0";
     ajaxPost(url, param, function(response) {
+        console.log(response);
         for (var i in userids) {
             var html = '<label id="' + userids[i] + '"></label>' + usernames[i] + '(次数:' +
                 '<a href="javascript:void(0)" onclick="showCheckDetailCount(\'' + userids[i] + '\')"><span class="label label-primary" id="">' + response[i].length + '</span></a>)';
@@ -287,7 +293,7 @@ function showCheckDetailCount(id) {
     ];
     $('#checked_user_task_datatable').mytable({
         'cols': cols,
-        'url': "/q/task/getall/",
+        'url': "/q/task/getallByStatics/",
         'param': param,
         'isShoWPager': false
     });

+ 1 - 0
VisualInspection/qzd/js/task/new.js

@@ -261,6 +261,7 @@ function checkUpdate(id) {
     post_common_service('q/record/one', data, function(redata) {
         $('#addModal').modal('show');
         $("#type").val(redata.type);
+        $("#remark").val(redata.remark);
         $("#carinfo").val(redata.car_info);
         if (redata.arrive_time != null) {
             var time = moment(redata.arrive_time).format("YYYY-MM-DD HH:mm");

+ 7 - 2
VisualInspection/qzd/js/task/task_list.js

@@ -123,6 +123,9 @@ function queryTask() {
         { width: 80, text: '考核人员', type: 'string', flex: true, colClass: '', field: 'checked_users_name' },
         { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, colClass: '', field: 'checkman_name' },
         { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
+        { width: 160, text: '接警时间', type: 'string', flex: true, sort: 'down', field: 'received_time' },
+        { width: 160, text: '到达时间', type: 'string', flex: true, sort: 'down', field: 'arrive_time' },
+        { width: 160, text: '备注', type: 'string', flex: true,colClass: 'hide', sort: 'down', field: 'recordremark' },
         // {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
     ];
     var colFunc = { width: 120, text: '操作', type: 'string', flex: true, field: 'id' };
@@ -147,7 +150,7 @@ function queryTask() {
             'p_cur': cur_page
         }
     });
-    console.log(data);
+    console.log("数据:"+data);
     $.zui.store.set('store_param_' + current_url, data);
 }
 
@@ -155,7 +158,9 @@ function queryTask() {
 //进入稽查页面
 function showCheck(id) {
     // $('#myModal').modal({name:"dd"});
+    
     $.checkTask = getItemByIdFromArr(id, $('#task_list_table').mytable('getTableData'));
+    console.log( $.checkTask);
     $.checkTask.appeal = null;
     //开始稽查
     no_return_common_service('/q/task/update', { "id": $.checkTask.id, "check_status": 3 });
@@ -286,7 +291,7 @@ function confirmTaskPatch() {
 function gettask() {
     param = { "check_status": 2 };
     post_common_service('/q/task/getall/0/0', param, function(redata) {
-        console.log(redata);
+
         //inittAreaable($("#month_date").val(), $("#qzd").val());
     });
 }

+ 13 - 2
VisualInspection/qzd/view/task/add.html

@@ -53,6 +53,14 @@
         border-color: #ea644a;
         text-shadow: none;
     }
+
+    .nointime {
+        color: #fff;
+        background-color: #db7093;
+        border-radius: 4px;
+        border-color: #db7093;
+        text-shadow: none;
+    }
     
     .normal {
         color: #fff;
@@ -149,13 +157,16 @@
         <div class="col-xs-2">
             <div class="divstyle" style="background-color: #ed980f"></div><span style="float: left;">&nbsp;&nbsp;无效</span>
         </div>
+        <div class="col-xs-2">
+            <div class="divstyle" style="background-color: #db7093"></div><span style="float: left;">&nbsp;&nbsp;未按时到达</span>
+        </div>
         <!-- <div class="col-xs-2">
             <div class="divstyle" style="background-color:#FFDEAD"></div><span style="float: left;">&nbsp;&nbsp;放空</span>
         </div> -->
     </div>
 
     <div class="row">
-        <div class="col-xs-6" style="">
+        <div class="col-xs-6" >
             <div class="row">
                 <span style="float: left;
                 padding-top: 5px;">已选任务:</span>
@@ -165,7 +176,7 @@
             </div>
         </div>
         <div class="col-xs-4" style="padding: 0 15px 0 15px">
-            <div class="row" style="">
+            <div class="row">
                 <div class="row" style="margin: 0">
                     <span style="float: left;
                 padding-top: 5px;">分配稽查任务:</span>

+ 8 - 12
VisualInspection/qzd/view/task/addtask.html

@@ -133,20 +133,14 @@
            备注:发生方向和放空暂时未启用,不需要填写。
     </div> -->
 <!-- </div> -->
-<!-- <div class="form-group" style="margin:0px;">
-    <div class="form-group col-xs-5">
-        <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">施救时间:</label>
-        <div class="col-xs-8">
-            <input type="text" style="width:100%;" id="rescue_time" class="form-control">
-        </div>
-    </div>
-    <div class="form-group col-xs-7">
-        <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding-right:0">离场时间:</label>
-        <div class="col-xs-6">
-            <input type="text" style="width:100%;" id="back_time" class="form-control">
+<div class="form-group" style="margin:0px;">
+    <div class="form-group col-xs-12">
+        <label for="exampleInputAccount1" class="col-xs-2" style="text-align: left;padding:0">中心实时稽查:</label>
+        <div class="col-xs-10">
+           <textarea id = "remark" rows="3" cols="50"></textarea>
         </div>
     </div>
-</div> -->
+</div>
 <!-- <div class="form-group" style="margin:0px;">
     <div class="form-group col-xs-5">
         <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding:0">解脱时间:</label>
@@ -321,6 +315,8 @@ function setRecordUserID(usersid) {
             "direction":$("#direction").val(),
             "isApply":0
         }  
+        data.remark = $("#remark").val();
+
         // if($("#backfield_time").val() != null && $("#backfield_time").val() !=''){
         //         data.backfield_time =moment($("#backfield_time").val()).format("YYYY-MM-DD HH:mm:ss");
         // }else{

+ 8 - 0
VisualInspection/qzd/view/task/check.html

@@ -103,7 +103,15 @@
 
                                     </div>
                                     <!--<hr>-->
+                                    <div class="row" style="padding:10px 5px 0px 5px;margin:0px;color: red">                                                                        
+                                            <div class="col-lg-4" id="received_time">接警时间:</div>
+                                            <div class="col-lg-4" id="arrive_time">到达时间:</div>
+                                            <div class="col-lg-4" id="time">到达时长:</div>
+                                    </div>
 
+                                    <div id="remark" class="row" style="padding:10px 5px 0px 5px;margin:0px;color: red">                                                                        
+                                         中心实时稽查:
+                                </div>
                                 </div>
                             </div>
                         </div>

+ 100 - 0
VisualInspection/tj/view/main.html

@@ -0,0 +1,100 @@
+<!doctype html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>稽查</title>
+
+
+    <link rel="import" href="/view/common/commoncsslink.html?__inline">
+    <link rel="stylesheet" type="text/css" href="/css/main.css">
+
+    <!--<link rel="stylesheet" type="text/css" href="/js/lib/jedate/skin/jedate.css">
+    <script src="/js/lib/jedate/jedate.js"></script>-->
+    <link rel="import" href="/view/common/commonscriptlink.html?__inline">
+
+    <style>
+        html {
+            overflow: auto;
+        }
+        
+        img.lightbox-img {
+            width: 600px;
+        }
+        
+        .navbar-inverse {
+            background-color: #366ca5;
+        }
+        
+        .file-list,
+        .uploader-files {
+            border: 0px;
+        }
+        
+        html {
+            overflow: hidden
+        }
+        
+        body {
+            font-family: 'Microsoft Yahei';
+            overflow: hidden
+        }
+        
+        .fullxtwen-canvas {
+            display: none;
+        }
+        /*.mum_left {
+            background-color: #2B7EB3;
+        }*/
+    </style>
+
+    <!--<script src="/js/teamClass/check_team_schedule.js"></script>-->
+
+</head>
+
+<body>
+    <link rel="import" href="/view/common/head.html?__inline">
+
+
+
+
+    <div id="main" class="container-fluid main">
+        <div class="row">
+            <div class="col-md-2" style="padding-right:0;z-index: 11;">
+                <div id="mum_left" class="mum_left">
+                    <link rel="import" href="/view/mum.html?__inline">
+                </div>
+            </div>
+            <div class="col-md-10">
+                <div id="mum_right" class="mum_right">
+
+                    <div class="panel" id="main_panel">
+                        <div class="panel-heading" id="main_content_title">
+                            <ol class="breadcrumb" id="breadcrumb_menu" style="margin-bottom: 0;padding:0px;">
+
+                            </ol>
+                        </div>
+                        <div class="panel-body" id="main_panel_body">
+                            <div id="main_content">
+                            </div>
+                            <!--<link rel="import" href="/view/mytask/unchecked.html?__inline">-->
+                        </div>
+                    </div>
+
+                    <link rel="import" href="/view/common/foot.html?__inline">
+                </div>
+
+            </div>
+
+        </div>
+    </div>
+
+    <script type="text/javascript" src="/js/lib/ckplayer/ckplayer/ckplayer.js"></script>
+    <script src="/js/teamClass/charge_team_schedule.js"></script>
+    <script src="/js/main.js"></script>
+
+</body>
+
+
+
+</html>

+ 12 - 4
VisualInspection/view/home.html

@@ -74,7 +74,15 @@
         }
         
         .colorbackground4 {
-            background-color: gray;
+            background: linear-gradient(to right, #DDA0DD,#9932CC);
+            height: 100%;
+            color: white;
+            font-size: 30px;
+            padding-top: 20%
+        }
+
+         .colorbackground6 {
+            background: linear-gradient(to right, #FFE384, #FF8000);
             height: 100%;
             color: white;
             font-size: 30px;
@@ -128,16 +136,16 @@
                         </div>
                         <!-- <div class="row" id="" style="margin-top: 50px"> -->
                         <div onclick="opennew(3,null)" class="appdiv" style="text-align: center;bottom: 6%;left: 0;height: 40%">
-                            <div class="colorbackground4">
+                            <div class="colorbackground6">
                                 <p style="margin-right:40px;font-size:28px"><img class="imgsize" src="/images/car.png"></img><span>车队稽查</span></p>
                             </div>
                         </div>
-                        <div onclick="" class="appdiv" style="text-align: center;bottom: 6%;left:35%;height: 40%">
+                        <div onclick="opennew(4,null)" class="appdiv" style="text-align: center;bottom: 6%;left:35%;height: 40%">
                             <div class="colorbackground4">
                                 <p style="margin-right:40px;font-size:28px"><img class="imgsize" src="/images/area-chart.png"></img><span>统计分析</span></p>
                             </div>
                         </div>
-                        <div onclick="opennew(4,'14')" class="appdiv" style="text-align: center;bottom: 6%;right: 0;height: 40%">
+                        <div onclick="opennew(5,null)" class="appdiv" style="text-align: center;bottom: 6%;right: 0;height: 40%">
                             <div class="colorbackground3">
                                 <p style="margin-right:40px;font-size:28px"><img class="imgsize" src="/images/wood.png"></img><span>配置管理</span></p>
                             </div>

+ 21 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/EnvConfig.java

@@ -0,0 +1,21 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Component;
+
+/**
+ * 文件名:EnvConfig
+ * 版本信息:日期:2017/3/17 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+@Component
+@ConfigurationProperties(prefix = "env")
+public class EnvConfig {
+    private String CORPID;
+    private String SECRET;
+    private String agentid;
+    private String searchcarurl;
+}

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Webcam.java

@@ -36,6 +36,8 @@ public class Webcam {
 	private Integer channel;
 	private Integer cameratype;
 	private Integer playtype;
+	private String user_name;
+	private String user_pwd;
 }
 
 

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

@@ -167,6 +167,7 @@ public class DepartmentController extends BaseController {
         List<Organ> organs = departmentService.getCarDept();
         return returnResult(0, "获取成功", organs);
     }
+
     /**
      * 获取所有排障大队
      * @return

+ 32 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java

@@ -437,5 +437,36 @@ public class StatisticsController extends BaseController {
 		return super.returnSuccessResult(s);
 	}
 
-    
+	@RequestMapping(value = "/scoreAll/info")
+	public String getScoreAllInfo(@RequestBody StatisticsBean obj){
+		List<StatisticsBean> lists=  statisticsService.getFeeStationAllCheckedScore(obj);
+		int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,total0=0,total15=0,total50=0,totalOver50=0,totalAll = 0;
+		for(StatisticsBean bean:lists){
+			totalMan+=bean.getPeople_num();
+			totalcheckedMan+=bean.getChecked_people_num();
+			totalcheckedCount+=bean.getChecked_num();
+			total0+=(bean.getChecked_people_num()-bean.getScore_fifteen()-bean.getScore_fifty()-bean.getScore_over_fifty());
+			total15+=bean.getScore_fifteen();
+			total50+=bean.getScore_fifty();
+			totalOver50+=bean.getScore_over_fifty();
+			totalAll+=bean.getAll_check_score();
+		}
+		Map<String,Object> resultMap = new HashMap<String,Object>();
+		resultMap.put("list", lists);
+		resultMap.put("totalMan", totalMan);
+		resultMap.put("totalcheckedMan", totalcheckedMan);
+		resultMap.put("totalcheckedCount", totalcheckedCount);
+		resultMap.put("total0", total0);
+		resultMap.put("total15", total15);
+		resultMap.put("total50", total50);
+		resultMap.put("totalOver50", totalOver50);
+		resultMap.put("totalAll", totalAll);
+		return super.returnSuccessResult(resultMap);
+	}
+
+	@RequestMapping(value = "/lost/twice/itemscore/rateAll")
+	public String getDeptStatistic(@RequestBody StatisticsBean obj){
+		Map<String,List<StatisticsBean>> returnMap=  statisticsService.get2CheckedAllItemScoreInfo(obj);
+		return super.returnSuccessResult(returnMap);
+	}
 }

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

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

+ 19 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/TaskController_Q.java

@@ -75,6 +75,22 @@ public class TaskController_Q extends BaseController {
         return super.returnSuccessResult(ss);
     }
 
+
+    @RequestMapping(value = "/getallByStatics/{page}/{size}")
+    public String getallByStatics(HttpServletRequest request, @PathVariable Integer page, @PathVariable Integer size, @RequestBody QzdCheckTask qzdCheckTask) {
+        User user = getCurrentUser(request);
+        if (AuthorUtil.hasRole(user, Constants.ROLE_WRECKER)
+                || AuthorUtil.hasRole(user, Constants.ROLE_WRECKER_MANAGER)
+                || AuthorUtil.containsRole(user, "ROLE_WRECKER")) {
+            qzdCheckTask.setChecked_dept((long) user.getOrganid());
+        } else if (AuthorUtil.hasRole(user, Constants.ROLE_JICHA)) {
+            qzdCheckTask.setCheckman(new Long(user.getId()));
+        }
+        Object ss = taskService_q.getAllTaskByStatics(page, size, qzdCheckTask);
+
+        return super.returnSuccessResult(ss);
+    }
+
     @RequestMapping(value = "/getone")
     public String getStatusById(@RequestBody QzdCheckTask task) {
         if (task.getRecord_id() == null) {
@@ -160,7 +176,7 @@ public class TaskController_Q extends BaseController {
         String jsonObject ="";
         for(int i = 0;i<checkedUsers.length;i++) {
             qzdCheckTask.setChecked_users("%"+checkedUsers[i]+"%");
-            Object ss = taskService_q.getAllTask(page, size, qzdCheckTask);
+            Object ss = taskService_q.getAllTaskByStatics(page, size, qzdCheckTask);
             objlist.add(ss);
             //String json = super.returnSuccessResult(ss);
             //jsonObject = jsonObject + json;
@@ -168,6 +184,8 @@ public class TaskController_Q extends BaseController {
         return objlist;
     }
 
+
+
     @RequestMapping(value = "/dispatch")
     public String dispatch(HttpServletRequest request, @RequestBody QzdCheckTask task) {
         if (task.getCheck_status() == null || "".equals(task.getCheck_status())) {

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/UserInfoDao.java

@@ -24,4 +24,5 @@ public interface UserInfoDao {
     public List<StatisticsBean> getUsersCountList();
     public Integer getUsersCenterManageCount(StatisticsBean obj);
     public User getOneDetail(Integer id);
+    public List getDriver();
 }

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

@@ -32,6 +32,8 @@ public interface StatisticsDao  {
 	public List<StatisticsBean> selectCheckedScoreList(StatisticsBean obj);
 	
 	public List<StatisticsBean> selectCheckedItemScoreInfo(StatisticsBean obj);
+
+	public List<StatisticsBean> selectCheckedItemAllScoreInfo(StatisticsBean obj);
 	
 	public List<StatisticsBean> selectOneCheckedInfoData(StatisticsBean obj);
 	
@@ -94,4 +96,8 @@ public interface StatisticsDao  {
 
 	public  List<Integer> selectWreckerCount(FwqStatisticsBean obj);
 
+	public Integer getOtherCheck(StatisticsBean obj);
+
+	public List<StatisticsBean> getOtherCheckAll(StatisticsBean obj);
+
 }

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

@@ -152,7 +152,6 @@
         GROUP BY so.PARENTID
         ORDER BY PARENTID
     </select>
-    
-   
-    
+
+
 </mapper>

+ 9 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml

@@ -196,4 +196,13 @@
         FROM t_sys_users
         where organid=29 and status>0 and positionid = 2
     </select>
+
+    <select id="getDriver" resultType="com.xintong.visualinspection.bean.User" >
+        SELECT
+            *
+        FROM
+            `visualinspection`.`t_sys_users`
+        WHERE
+            `visualinspection`.`t_sys_users`.`ORGANID` IN ( SELECT `visualinspection`.`t_sys_organ`.`ID` FROM `visualinspection`.`t_sys_organ` WHERE ( `visualinspection`.`t_sys_organ`.`ORGANNAME` LIKE '%车队' ) )
+    </select>
 </mapper>

+ 4 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/WebcamMapper.xml

@@ -58,6 +58,10 @@
 			jdbcType="INTEGER" />
 			<result column="playtype" property="playtype"
 			jdbcType="INTEGER" />
+		<result column="user_name" property="user_name"
+				jdbcType="VARCHAR" />
+		<result column="user_pwd" property="user_pwd"
+				jdbcType="VARCHAR" />
 	
 	</resultMap>
 

+ 66 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml

@@ -588,7 +588,34 @@
         GROUP BY m.parent_id,m.checked_dept order by m.checked_dept
     </select>
 
-
+    <select id="selectCheckedItemAllScoreInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean"
+            resultType="com.xintong.visualinspection.bean.StatisticsBean">
+        SELECT count(DISTINCT m.task_id) AS checked_num , sum(m.check_item_score) AS all_check_score ,
+        m.parent_id,m.checked_dept as dept_id,(select parentid from t_sys_organ where id=m.checked_dept ) as
+        parent_dept_id,"公司检查" 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
+        <if test="dept_list!=null and queryType == 1 and dept_list.size()>0 ">
+            AND t.checked_dept IN
+            <foreach item="obj" collection="dept_list" open="("
+                     separator="," close=")">
+                #{obj.id}
+            </foreach>
+        </if>
+        <if test="dept_id!=null and queryType ==2">
+            AND t.checked_dept=#{dept_id}
+        </if>
+        ) t
+        LEFT JOIN check_item ci ON t.parent_id = ci.id
+        ) m ON t.id = m.task_id
+        where t.check_status !=22 and t.id not in
+        <include refid="taskexclouddeleteUser"/>
+        AND  t.id not in <include refid="selectExuserTask"/>
+        AND monthfunc( t.start_time ) = #{mth}
+        GROUP BY m.checked_dept order by m.checked_dept
+    </select>
     <!--包含扣分-->
     <sql id="selectOneAllCheckedInfoData">
         SELECT
@@ -770,7 +797,10 @@
 
         LEFT JOIN (SELECT ci.* ,cp.name AS parent_name FROM check_item ci LEFT JOIN check_item cp ON ci.parent_id =
         cp.id) ci ON ci.id = cs.check_item_id
-        where t.check_status !=22 and t.id not in
+        where t.check_status !=22 and
+        t.check_status != 4
+        and t.check_status != 3
+        and t.id not in
         <include refid="taskexclouddeleteUser"/>
         <if test="queryType!=null and queryType==0">
             AND ((t.checked_person = #{user_id} and cs.checked_person = #{user_id}) )
@@ -1146,5 +1176,39 @@
         (select a.id from check_task a,check_statistic_exclude_users b where a.checked_person = b.user_id  and a.period_id = b.period_id)
     </sql>
 
+    <select id="getOtherCheck" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="Integer">
+      SELECT
+	    sum(check_score)
+        FROM
+            other_check
+        WHERE
+        1=1
+        <if test="start_date != null and end_date != null">
+            AND check_time between #{start_date} and #{end_date}
+        </if>
+        <if test="user_id!=null ">
+            AND user_id = #{user_id}
+        </if>
+
+    </select>
+
+    <select id="getOtherCheckAll" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+        SELECT
+        sum( check_score ) AS all_check_score,
+        dept_id,
+        (select parentid from t_sys_organ where id=dept_id ) as
+        parent_dept_id,
+        check_type as item_id
+        FROM
+        other_check
+        WHERE
+             user_id &gt; 0
+        <if test="mth!=null ">
+            AND check_time_name = #{mth}
+        </if>
+        GROUP BY
+        check_type,
+        dept_id
+    </select>
 
 </mapper>

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

@@ -126,7 +126,9 @@ public interface StatisticsService {
 	public Map<String,List<DeptStatistic>> getDeptStatistic(DeptStatistic obj);
     public void getDeptStatisticExcel(DeptStatistic obj,HttpServletRequest req,HttpServletResponse resp);
 
+	public Map<String,List<StatisticsBean>> get2CheckedAllItemScoreInfo(StatisticsBean obj);
 
+	public List<StatisticsBean> getFeeStationAllCheckedScore(StatisticsBean obj) ;
 
 
 }

+ 239 - 16
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -366,16 +366,22 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		user.setInvalidtime(obj.getStart_date());
 		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
-		int i = 0;
+		for(StatisticsBean sb :lists){
+		    Organ org = new Organ();
+		    long deptId = sb.getDept_id();
+		    org.setId((int)deptId);
+		    List<Organ> dept = departmentDao.getOrgan(org);
+		    int parentId = dept.get(0).getParentid();
+            sb.setParent_dept_id((long)parentId);
+        }
 		for (StatisticsBean sta : lists) {
-			if (i < 7) {
+			if (sta.getParent_dept_id() == 30) {
 				sta.setId(1);
-			} else if (i < 13) {
+			} else if (sta.getParent_dept_id() == 31) {
 				sta.setId(2);
 			} else {
 				sta.setId(3);
 			}
-			i++;
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
@@ -478,19 +484,26 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		user.setPosition_ids(positionList);
 		user.setInvalidtime(obj.getStart_date());
 		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
+
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
-		int i = 0;
-		for (StatisticsBean sta : lists) {
-			if (i < 7) {
-				sta.setId(1);
-			} else if (i < 13) {
-				sta.setId(2);
-			} else {
-				sta.setId(3);
-			}
-			i++;
-			mapStationInfos.put(sta.getDept_id(), sta);
-		}
+        for(StatisticsBean sb :lists){
+            Organ org = new Organ();
+            long deptId = sb.getDept_id();
+            org.setId((int)deptId);
+            List<Organ> dept = departmentDao.getOrgan(org);
+            int parentId = dept.get(0).getParentid();
+            sb.setParent_dept_id((long)parentId);
+        }
+        for (StatisticsBean sta : lists) {
+            if (sta.getParent_dept_id() == 30) {
+                sta.setId(1);
+            } else if (sta.getParent_dept_id() == 31) {
+                sta.setId(2);
+            } else {
+                sta.setId(3);
+            }
+            mapStationInfos.put(sta.getDept_id(), sta);
+        }
 
 		if(obj.getStart_date()!=null && obj.getEnd_date()!=null){
 			CheckTaskPeriod p = getperiod(obj.getStart_date().getTime(),obj.getEnd_date().getTime());
@@ -2881,6 +2894,216 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
         exportExcel("营运管理提升综合成绩汇总表", "dept_statistic", map, resp);
 
     }
+	public List<StatisticsBean> getFeeStationAllCheckedScore(StatisticsBean 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);
+
+		user.setInvalidtime(obj.getStart_date());
+		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
+		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
+		int i = 0;
+		for (StatisticsBean sta : lists) {
+			if (i < 7) {
+				sta.setId(1);
+			} else if (i < 13) {
+				sta.setId(2);
+			} else {
+				sta.setId(3);
+			}
+			i++;
+			mapStationInfos.put(sta.getDept_id(), sta);
+		}
 
+		if(obj.getStart_date()!=null && obj.getEnd_date()!=null){
+			CheckTaskPeriod p = getperiod(obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+			if(p!=null){
+				obj.setPeriod_id(p.getId());
+			}
+		}
+
+
+		// 检查人数 和 检查次数
+		obj.setPosition_ids(positionList);
+		List<StatisticsBean> listCheckNum = statisticsDao.selectFeeStationCheckNum(obj);
+		for (StatisticsBean sta : listCheckNum) {
+			if (mapStationInfos.containsKey(sta.getDept_id())) {
+				mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+				mapStationInfos.get(sta.getDept_id()).setChecked_people_num(sta.getChecked_people_num());
+			}
+		}
+
+		List<StatisticsBo> list = getEmployeeCheckedInfo(obj);
+		Map<Integer, StatisticsBo> listmap = new HashMap<>();
+		for (StatisticsBo b : list) {
+			listmap.put(b.getUser().getId(), b);
+		}
+
+		List<StatisticsBean> listCheckedScore = statisticsDao.selectFeeStationCheckedScore(obj);
+		for (StatisticsBean sta : listCheckedScore) {
+			if (mapStationInfos.containsKey(sta.getDept_id())) {
+
+				StatisticsBean statis = mapStationInfos.get(sta.getDept_id());
+				statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
+
+				StatisticsBo b = listmap.get(sta.getUser_id().intValue());
+
+				if (b == null || b.getCheck_score_avg() == null || statis == null)
+					continue;
+				double sc = Double.parseDouble(b.getCheck_score_avg());
+				StatisticsBean otherObj = obj;
+				otherObj.setUser_id(sta.getUser_id());
+				double otherScore = 0;
+				if(statisticsDao.getOtherCheck(otherObj) != null) {
+					otherScore = (double) statisticsDao.getOtherCheck(otherObj);
+				}
+				sc = sc+otherScore;
+				if (sc == 0) {
+					statis.setScore(statis.getScore() + 1);
+				} else if (sc <= 15) {
+					statis.setScore_fifteen(statis.getScore_fifteen() + 1);
+				} else if (sc <= 50) {
+					statis.setScore_fifty(statis.getScore_fifty() + 1);
+				} else {
+					statis.setScore_over_fifty(statis.getScore_over_fifty() + 1);
+				}
+
+			}
+		}
+
+		List<StatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+
+		sortList.sort(new Comparator<StatisticsBean>() {
+			@Override
+			public int compare(StatisticsBean o1, StatisticsBean o2) {
+				if (o1.getId() > o2.getId()) {
+					return 1;
+				} else if (o1.getId() == o2.getId()) {
+					if (o1.getChecked_num() != 0 && o2.getChecked_num() != 0) {
+						if (o1.getAll_check_score() / (o1.getChecked_num() + 0.0) > o2.getAll_check_score()
+								/ (o2.getChecked_num() + 0.0)) {
+							return 1;
+						} else if (o1.getAll_check_score() / (o1.getChecked_num() + 0.0) < o2.getAll_check_score()
+								/ (o2.getChecked_num() + 0.0)) {
+							return -1;
+						} else {
+							return 0;
+						}
+					} else {
+						if (o1.getChecked_num() == 0) {
+							return -1;
+						} else if (o2.getChecked_num() == 0) {
+							return 1;
+						} else {
+							return 0;
+						}
+					}
+				} else {
+					return -1;
+				}
+			}
+		});
+
+		return sortList;
+	}
+
+	@Override
+	public Map<String, List<StatisticsBean>> get2CheckedAllItemScoreInfo(StatisticsBean obj) {
+
+		Map<String, List<StatisticsBean>> map = new HashMap<>();
+
+		int people_num = 0;
+
+		if (obj.getQueryType() == 0) {
+			// 公司
+			// 公司总人数
+			List<StatisticsBean> feeStationList = userInfoDao.getUsersCountList();
+			if (feeStationList != null && feeStationList.size() > 0) {
+				for (StatisticsBean sta : feeStationList) {
+					people_num += sta.getPeople_num();
+				}
+			}
+		} else if (obj.getQueryType() == 1) {
+			// 道管中心
+			Organ organ = new Organ();
+			if (obj.getDept_id() == null) {
+				return null;
+			}
+			organ.setParentid(obj.getDept_id().intValue());
+			List<Organ> list = departmentDao.getOrgan(organ);
+			// 将导管中心下的收费站部门id 列表放入到list中
+			obj.setDept_list(list);
+
+			people_num = userInfoDao.getUsersCenterManageCount(obj);
+		} else if (obj.getQueryType() == 2) {
+			// 收费站
+			List<StatisticsBean> feeStationList = userInfoDao.getUsersCountList();
+			if (feeStationList != null && feeStationList.size() > 0) {
+				for (StatisticsBean sta : feeStationList) {
+					if (obj.getDept_id() + 0L == sta.getDept_id()) {
+						people_num = sta.getPeople_num();
+					}
+				}
+			}
+		}
+
+		List<StatisticsBean> objList = statisticsDao.selectCheckedItemAllScoreInfo(obj);
+
+		for (int i = 0; i < objList.size(); i++) {
+			objList.get(i).setPeople_num(people_num);
+			objList.get(i).setFeeStationName(CacheUtil.getOrgannameFromMap(objList.get(i).getDept_id()));
+			objList.get(i).setPfeeStationName(CacheUtil.getOrgannameFromMap(objList.get(i).getParent_dept_id()));
+		}
+		List<StatisticsBean> otherCheckList = statisticsDao.getOtherCheckAll(obj);
+        for(StatisticsBean sb :otherCheckList){
+        	if(sb.getItem_id() == 1){
+                 sb.setName("第三方暗访");
+			}else if(sb.getItem_id() == 2){
+				sb.setName("特情稽查");
+			}else if(sb.getItem_id() == 3){
+				sb.setName("现场稽查");
+			}else if(sb.getItem_id() == 4){
+				sb.setName("数据平台应用");
+			}
+			sb.setFeeStationName(CacheUtil.getOrgannameFromMap(sb.getDept_id()));
+			sb.setPfeeStationName(CacheUtil.getOrgannameFromMap(sb.getParent_dept_id()));
+			objList.add(sb);
+		}
+		map.put("Tmth", objList);
+
+		obj.setMth(obj.getPrev_mth());
+
+		objList = statisticsDao.selectCheckedItemAllScoreInfo(obj);
+
+		for (int i = 0; i < objList.size(); i++) {
+			objList.get(i).setPeople_num(people_num);
+			objList.get(i).setFeeStationName(CacheUtil.getOrgannameFromMap(objList.get(i).getDept_id()));
+			objList.get(i).setPfeeStationName(CacheUtil.getOrgannameFromMap(objList.get(i).getParent_dept_id()));
+		}
+		 otherCheckList = statisticsDao.getOtherCheckAll(obj);
+		for(StatisticsBean sb :otherCheckList){
+			if(sb.getItem_id() == 1){
+				sb.setName("第三方暗访");
+			}else if(sb.getItem_id() == 2){
+				sb.setName("特情稽查");
+			}else if(sb.getItem_id() == 3){
+				sb.setName("现场稽查");
+			}else if(sb.getItem_id() == 4){
+				sb.setName("数据平台应用");
+			}
+			sb.setFeeStationName(CacheUtil.getOrgannameFromMap(sb.getDept_id()));
+			sb.setPfeeStationName(CacheUtil.getOrgannameFromMap(sb.getParent_dept_id()));
+			objList.add(sb);
+		}
+		map.put("Pmth", objList);
+
+		return map;
+	}
 
 }

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

@@ -180,4 +180,9 @@ public class UserServiceImpl extends BaseService implements UserService {
 		user.setPosition_ids(positionList);
 		return userInfoDao.getUsers(user);
 	}
+
+	@Override
+	public  List<User> getDriver(){
+    	return  userInfoDao.getDriver();
+	}
 }

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


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


+ 15 - 10
Visuallnspection_fjq/.idea/workspace.xml

@@ -19,16 +19,15 @@
     <packageJsonPaths />
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="80" />
-    <option name="y" value="170" />
-    <option name="width" value="1095" />
-    <option name="height" value="585" />
+    <option name="width" value="1600" />
+    <option name="height" value="710" />
   </component>
   <component name="ProjectView">
     <navigator proportions="" version="1">
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="AndroidView" />
       <pane id="PackagesPane" />
       <pane id="ProjectPane">
@@ -41,19 +40,23 @@
             <path>
               <item name="Visuallnspection_fjq" type="b2602c69:ProjectViewProjectNode" />
               <item name="Visuallnspection_fjq" type="462c0819:PsiDirectoryNode" />
+              <item name="visuallnspection_fjq" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="Visuallnspection_fjq" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Visuallnspection_fjq" type="462c0819:PsiDirectoryNode" />
               <item name="visuallnspectioninteface" type="462c0819:PsiDirectoryNode" />
             </path>
           </expand>
           <select />
         </subPane>
       </pane>
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/visuallnspection_fjq" />
+    <property name="last_opened_file_path" value="D:/Visuallnspection_njy/VisualInspection_server" />
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
   </component>
@@ -124,11 +127,13 @@
       <updated>1533785796330</updated>
       <workItem from="1533785798416" duration="20000" />
       <workItem from="1535368355504" duration="70000" />
+      <workItem from="1554257887011" duration="734000" />
+      <workItem from="1554708635186" duration="23000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="90000" />
+    <option name="totallyTimeSpent" value="847000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
@@ -141,19 +146,19 @@
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
       <window_info anchor="right" id="Maven Projects" order="3" />
       <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
-      <window_info anchor="bottom" id="Run" order="2" />
       <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Run" order="2" />
       <window_info anchor="bottom" id="Terminal" order="7" />
       <window_info id="Capture Tool" order="2" />
       <window_info id="Designer" order="2" />
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2421875" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24530831" />
       <window_info anchor="right" id="Database" order="3" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
       <window_info id="UI Designer" order="2" />
       <window_info anchor="right" id="Theme Preview" order="3" />
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
       <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />

+ 2 - 2
Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/application.properties

@@ -18,8 +18,8 @@ dubbo.protocol.status = server
 ## RegistryConfig Bean
 dubbo.registry.id = fjq_service
 #dubbo.registry.address = zookeeper://git.topm.win:9994
-#dubbo.registry.address = zookeeper://192.168.45.158:2181
-dubbo.registry.address = zookeeper://127.0.0.1:2181
+dubbo.registry.address = zookeeper://192.168.45.158:2181
+#dubbo.registry.address = zookeeper://127.0.0.1:2181
 dubbo.registry.file = ./output/dubbo1.cache
 dubbo.reference.check=false
 dubbo.consumer.check=false

+ 4 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CarInfo.java

@@ -19,4 +19,8 @@ public class CarInfo implements Serializable {
     private String driver_name;
 
     private Integer is_vaild;
+
+    private Integer car_dept;
+
+    private String dept_name;
 }

+ 6 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CarTask.java

@@ -78,4 +78,10 @@ public class CarTask implements Serializable {
     private String color;
 
     private String isEvaluation;
+
+    private Integer car_dept;
+
+    //出车时间
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date update_time;
 }

+ 2 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/MaintenanceInfo.java

@@ -35,4 +35,6 @@ public class MaintenanceInfo implements Serializable {
     private Date end_time;
 
     private Integer is_vaild;
+
+    private Integer car_dept;
 }

+ 10 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/QzdCheckTask.java

@@ -46,6 +46,8 @@ public class QzdCheckTask implements Serializable {
     private Integer period_id;
     private Integer invalid_from;
 
+    private String recordremark;
+
     private String checked_users;
     private String checked_users_name;
 
@@ -75,4 +77,12 @@ public class QzdCheckTask implements Serializable {
 
     //是否有效
     private  int is_valid;
+
+    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date received_time;
+
+    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date arrive_time;
 }

+ 2 - 2
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/QzdRecord.java

@@ -39,14 +39,14 @@ public class QzdRecord implements Serializable {
     private Integer arrive_in_time;//'N分钟到达 1到达 0否'
     private Integer unimpeded_in_time;//'N小时畅通 1 畅通 0不畅通'
     private Integer car_user_satisfaction;//'客户满意度 1 非常满意 2满意 3不满意'
-    private String videos;//'视频列表地址'
+    private String videos;//'视频列表地址'i
     private String pics;//'图片列表地址'
     private Integer zxt_is_standard;//'锥形桶摆放是否规范 1 规范 0不规范'
     private Integer is_explain;//'客户无法满足是否解释 1解释 0未解释'
     private Integer record_no_come;//'故障车未拖到指定地点是否记录 1有记录 0未记录'
     private Integer take_photo_upload;//'是否拍照上传 1是 0 否'
     private Integer arrive_do_work;//'到达现场是否清障作业 1是 0 否
-    private String remarks;//'备注'
+    private String remark;//'备注'
     private String deptName;//'部门名称'
     private String userNames;
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")

+ 1 - 1
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/TaskService_Q.java

@@ -13,6 +13,6 @@ public interface TaskService_Q {
     public void updateStatus(QzdCheckTask qzdCheckTask);
     public QzdCheckTask getTask(QzdCheckTask qzdCheckTask);
     public void addTask(TaskDate_Q taskDate_q)  throws Exception;
-
+    public Object getAllTaskByStatics(Integer page,Integer size,QzdCheckTask qzdCheckTask);
     public List<TaskStatus> getTaskStatusList(Long id);
 }

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

@@ -24,4 +24,5 @@ public interface UserService extends UserDetailsService {
     public List<User> getAllCheckmans();
     public List<User> getFsUserByDeptId(User user);
     public List<User> getWGUserByDeptId(User user);
+    public List<User> getDriver();
 }

+ 1 - 1
Visuallnspection_fjq/visuallnspectioninteface/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Wed Nov 14 16:04:40 GMT+08:00 2018
+#Tue Mar 05 17:12:28 GMT+08:00 2019
 version=1.0-SNAPSHOT
 groupId=com.xintong.visuallnspection.inteface
 artifactId=visuallnspectioninteface

+ 3 - 0
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/QzdStatisticsDao.java

@@ -5,6 +5,7 @@ import com.xintong.visualinspection.bean.FwqCheckOther;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.pojo.fwq.ServiceAreaStatistic;
 import com.xintong.visualinspection.bean.CheckNum;
+import com.xintong.visualinspection.bean.QzdRecord;
 import org.apache.ibatis.annotations.Mapper;
 
 
@@ -61,4 +62,6 @@ public interface QzdStatisticsDao {
     Integer selectQzdApplyNum(FwqStatisticsBean obj);
 
     Integer getDeptCount(FwqStatisticsBean obj);
+
+    List<QzdRecord> getQzdCheckNum(FwqStatisticsBean obj);
 }

+ 1 - 0
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/QzdTaskDao.java

@@ -14,6 +14,7 @@ import java.util.List;
 public interface QzdTaskDao {
     public void addtask(QzdCheckTask qzdCheckTask);
     public List<QzdCheckTask> getall(QzdCheckTask qzdCheckTask);
+    public List<QzdCheckTask> getTaskByStatics(QzdCheckTask qzdCheckTask);
     public void updateStatus(QzdCheckTask qzdCheckTask);
     public void deleteByRid(QzdCheckTask qzdCheckTask);
     public QzdCheckTask getone(QzdCheckTask qzdCheckTask);

+ 6 - 4
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CarInfoMapper.xml

@@ -4,9 +4,9 @@
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.CarInfo" >
         INSERT INTO
            car_info
-        (car_number,driver,car_type,update_time)
+        (car_number,driver,car_type,update_time,car_dept,is_vaild)
         VALUES
-        (#{car_number},#{driver},#{car_type},now())
+        (#{car_number},#{driver},#{car_type},now(),#{car_dept},0)
     </insert>
 
     <update id="update" parameterType="com.xintong.visualinspection.bean.CarInfo">
@@ -17,6 +17,7 @@
         <if test="car_number != null">car_number = #{car_number},</if>
         <if test="driver != null">driver = #{driver},</if>
         <if test="is_vaild != null">is_vaild = #{is_vaild},</if>
+        <if test="car_dept != null">car_dept = #{car_dept},</if>
         id = #{id},
         update_time = now()
         WHERE
@@ -25,12 +26,13 @@
 
     <select id="getAll" parameterType="com.xintong.visualinspection.bean.CarInfo" resultType="com.xintong.visualinspection.bean.CarInfo">
         select
-          *
+          c.*
         from
-        car_info
+        car_info c
         where
           1=1
         and is_vaild = 0
+        <if test="car_dept != null and car_dept != ''">and car_dept =#{car_dept}</if>
     </select>
 
     <select id="getone" parameterType="com.xintong.visualinspection.bean.CarInfo" resultType="com.xintong.visualinspection.bean.CarInfo">

+ 4 - 2
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CarTaskMapper.xml

@@ -4,10 +4,10 @@
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.CarTask" >
         INSERT INTO
            car_task
-        (customer,car_id,driver,start_time,end_time,start_addr,end_addr,mileage,dept,train_safe,service_quality,car_capacity,travel_arrangements,advice,reason,oil,send_car_people,start_mileage,end_mileage,with_man,with_dept)
+        (customer,car_id,driver,start_time,end_time,start_addr,end_addr,mileage,dept,train_safe,service_quality,car_capacity,travel_arrangements,advice,reason,oil,send_car_people,start_mileage,end_mileage,with_man,with_dept,car_dept)
         VALUES
         (#{customer}, #{car_id},#{driver},#{start_time},#{end_time},#{start_addr},#{end_addr},#{mileage},#{dept},#{train_safe},#{service_quality},#{car_capacity},#{travel_arrangements},#{advice},#{reason}
-        ,#{oil},#{send_car_people},#{start_mileage},#{end_mileage},#{with_man},#{with_dept})
+        ,#{oil},#{send_car_people},#{start_mileage},#{end_mileage},#{with_man},#{with_dept},#{car_dept})
     </insert>
 
     <update id="update" parameterType="com.xintong.visualinspection.bean.CarTask">
@@ -34,6 +34,7 @@
         <if test="end_mileage != null">end_mileage = #{end_mileage},</if>
         <if test="with_man != null">with_man = #{with_man},</if>
         <if test="with_dept != null">with_dept = #{with_dept},</if>
+        <if test="car_dept != null">car_dept = #{car_dept},</if>
         id = #{id}
         WHERE
         id = #{id}
@@ -49,6 +50,7 @@
 				 on t.car_id = c.id
         where
           1=1
+        <if test="car_dept != null">and t.car_dept = #{car_dept}</if>
         <if test="driver != null">and t.driver = #{driver}</if>
         <if test="customer != null">and t.customer = #{customer}</if>
         <if test="car_id != null">and t.car_id = #{car_id}</if>

+ 4 - 2
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/MaintenanceMapper.xml

@@ -4,9 +4,9 @@
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.MaintenanceInfo" >
         INSERT INTO
            maintenance_info
-        (maintenance_number,maintenance_type,maintenance_time,car_id,remark,update_time)
+        (maintenance_number,maintenance_type,maintenance_time,car_id,remark,update_time,car_dept)
         VALUES
-        (#{maintenance_number},#{maintenance_type},#{maintenance_time},#{car_id},#{remark},now())
+        (#{maintenance_number},#{maintenance_type},#{maintenance_time},#{car_id},#{remark},now(),#{car_dept})
     </insert>
 
     <update id="update" parameterType="com.xintong.visualinspection.bean.MaintenanceInfo">
@@ -19,6 +19,7 @@
         <if test="car_id != null">car_id = #{car_id},</if>
         <if test="remark != null">remark = #{remark},</if>
         <if test="is_vaild != null">is_vaild = #{is_vaild},</if>
+        <if test="car_dept != null">car_dept = #{car_dept},</if>
         id = #{id},
         update_time = now()
         WHERE
@@ -33,6 +34,7 @@
         where
          m.is_vaild = 0
         <if test="car_id != null">and m.car_id = #{car_id}</if>
+        <if test="car_dept != null">and m.car_dept = #{car_dept}</if>
         <if test="start_time != null and end_time != null">and m.maintenance_time between #{start_time} and #{end_time}</if>
         <if test="maintenance_type != null">and m.maintenance_type = #{maintenance_type}</if>
     </select>

+ 3 - 3
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/RecordMapper.xml

@@ -30,10 +30,10 @@
             parameterType="com.xintong.visualinspection.bean.QzdRecord">
         INSERT INTO record_info
         (type,users,dept,addr,received_time,car_info,car_user_info,start_time,arrive_time,back_time,record_user,arrive_in_time,unimpeded_in_time,car_user_satisfaction,videos
-        ,pics,zxt_is_standard,is_explain,record_no_come,take_photo_upload,arrive_do_work,remarks,delivery_time,accept_time,rescue_time,relief_time,backfield_time,isComplete,direction)
+        ,pics,zxt_is_standard,is_explain,record_no_come,take_photo_upload,arrive_do_work,remark,delivery_time,accept_time,rescue_time,relief_time,backfield_time,isComplete,direction,create_time)
         VALUES
         (#{type},#{users},#{dept},#{addr},#{received_time},#{car_info},#{car_user_info},#{start_time},#{arrive_time},#{back_time},#{record_user},#{arrive_in_time},#{unimpeded_in_time},#{car_user_satisfaction},#{videos}
-        ,#{pics},#{zxt_is_standard},#{is_explain},#{record_no_come},#{take_photo_upload},#{arrive_do_work},#{remarks},#{delivery_time},#{accept_time},#{rescue_time},#{relief_time},#{backfield_time},#{isComplete},#{direction}
+        ,#{pics},#{zxt_is_standard},#{is_explain},#{record_no_come},#{take_photo_upload},#{arrive_do_work},#{remark},#{delivery_time},#{accept_time},#{rescue_time},#{relief_time},#{backfield_time},#{isComplete},#{direction},now()
         )
     </insert>
 
@@ -62,7 +62,7 @@
         <if test="record_no_come != null">record_no_come = #{record_no_come},</if>
         <if test="take_photo_upload != null">take_photo_upload = #{take_photo_upload},</if>
         <if test="arrive_do_work != null">arrive_do_work = #{arrive_do_work},</if>
-        <if test="remarks != null">remarks = #{remarks},</if>
+        <if test="remark != null">remark = #{remark},</if>
         <if test="delivery_time != null">delivery_time = #{delivery_time},</if>
         <if test="accept_time != null">accept_time = #{accept_time},</if>
         <if test="rescue_time != null">rescue_time = #{rescue_time},</if>

+ 25 - 2
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/StatisticsMapper.xml

@@ -48,12 +48,17 @@
                 IF(t.id IS NOT NULL, COUNT( w.user_id )  , 0 ) as age
             FROM
                 wg_user w
-                LEFT JOIN (SELECT * FROM view_check_task WHERE  1=1
+                LEFT JOIN (SELECT * FROM view_check_task WHERE  id IN ( SELECT id FROM record_info )
         <if test="period_id != null and period_id != ''">
         AND period_id = #{period_id}
-    </if>)t ON INSTR( t.checked_users, w.user_id ) > 0
+    </if>
+        AND is_valid = 0
+        )t ON INSTR( t.checked_users, w.user_id ) > 0
             WHERE
                 1=1
+        <if test="start_date!=null and end_date != null">
+            AND ( w.data_time > #{start_date} OR w.data_time IS  NULL )
+        </if>
             GROUP BY
                 w.user_id
             order by
@@ -72,6 +77,8 @@
         FROM
             wg_user w
             LEFT JOIN (SELECT * FROM record_info WHERE  1=1
+        and isApply = 0
+        and isComplete =1
         <if test="start_date != null and end_date != null">and received_time between #{start_date} and #{end_date}</if>)t ON INSTR( t.users, w.user_id ) > 0
         WHERE
            1=1
@@ -527,6 +534,22 @@
 
     </select>
 
+    <select id="getQzdCheckNum"
+            parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.QzdRecord">
+        SELECT
+           r.dept,r.users
+        FROM
+        record_info r
+        LEFT JOIN view_check_task t ON r.id = t.record_id
+        WHERE
+        r.isApply = 0
+        <if test="start_date != null and end_date != null">and r.received_time between #{start_date} and #{end_date}</if>
+        AND r.isComplete = 1
+        AND t.id is not null
+
+    </select>
+
     <select id="selectQzdApplyNum"
             parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
             resultType="Integer">

+ 52 - 1
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/TaskMapper.xml

@@ -32,7 +32,7 @@
 
     <select id="getall" parameterType="com.xintong.visualinspection.bean.QzdCheckTask" resultType="com.xintong.visualinspection.bean.QzdCheckTask">
         select t.*,CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period
-        ,ca.appeal_result as appeal_result,r.videos as recordVideos,r.pics as pics
+        ,ca.appeal_result as appeal_result,r.videos as recordVideos,r.pics as pics,r.received_time,r.arrive_time,r.remark as recordremark
         from check_task t
         left join record_info r on  t.record_id = r.id
         left join check_appeal ca on t.id=ca.task_id
@@ -144,6 +144,57 @@
         </foreach>
     </insert>
 
+    <select id="getTaskByStatics" parameterType="com.xintong.visualinspection.bean.QzdCheckTask" resultType="com.xintong.visualinspection.bean.QzdCheckTask">
+        select t.*,CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period
+        ,ca.appeal_result as appeal_result,r.videos as recordVideos,r.pics as pics
+        from view_check_task t
+        left join record_info r on  t.record_id = r.id
+        left join check_appeal ca on t.id=ca.task_id
+        where 1=1
+        <if test="period_id != null">AND t.period_id = #{period_id}</if>
+
+        <if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
+        <if test="start_time != null and end_time != null">AND t.start_time >= #{start_time} <![CDATA[ AND t.end_time < #{end_time}]]> </if>
+        <if test="checked_users != null">AND t.checked_users like #{checked_users}</if>
+        <if test="checkman != null">AND t.checkman = #{checkman}</if>
+        <if test="record_id != null">AND t.record_id = #{record_id}</if>
+        <if test="check_status_arr != null and check_status_arr.length > 0">AND
+            t.check_status in
+            <foreach collection="check_status_arr" item="status" index="index"
+                     open="(" close=")" separator=",">
+                #{status}
+            </foreach>
+        </if>
+        <if test="record_id != null">AND t.record_id = #{record_id}</if>
+        <if test="hasScore != null ">
+
+            <!--有扣分-->
+            <if test="hasScore == 1 ">
+                AND t.id in (select task_id from check_score where check_item_score>0 )
+            </if>
+            <!--无扣分-->
+            <if test="hasScore == 2 ">
+                AND t.id not in (select task_id from check_score where check_item_score>0 )
+            </if>
+
+        </if>
+        <if test="invalidFrom == -1">AND
+            ( t.invalid_from = 0 OR t.invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            t.invalid_from = #{invalidFrom}
+        </if>
+        <if test="dispatch_ids != null and dispatch_ids.length > 0">AND
+            t.id in
+            <foreach collection="dispatch_ids" item="dispatch_id" index="index"
+                     open="(" close=")" separator=",">
+                #{dispatch_id}
+            </foreach>
+        </if>
+        ORDER BY t.start_time DESC
+    </select>
+
 </mapper>
 
 

+ 6 - 0
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CarInfoServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.dubbo.config.annotation.Reference;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.xintong.visualinspection.bean.CarInfo;
+import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.CarInfoService;
 import com.xintong.visualinspection.service.CommonService;
@@ -42,6 +43,7 @@ public class CarInfoServiceImpl implements CarInfoService {
     }
     public Object getAll(Integer page, Integer size, CarInfo carInfo){
         Map<Long, User> userMap = commonService.getUserMap();
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
         if (!(page.equals(0) && size.equals(0))) {
             PageHelper.startPage(page, size);
         }
@@ -55,6 +57,10 @@ public class CarInfoServiceImpl implements CarInfoService {
             }else{
                 carInfo1.setDriver_name("");
             }
+            if(carInfo1.getCar_dept() != null){
+                long deptId = carInfo1.getCar_dept();
+                carInfo1.setDept_name(deptMap.get(deptId).getOrganname());
+            }
             }
         if (!(page.equals(0) && size.equals(0))) {
             return new PageInfo<CarInfo>(list);

+ 59 - 15
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsServiceImpl.java

@@ -16,15 +16,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import javax.xml.crypto.Data;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 /**
  * 文件名:StatisticsServiceImpl
@@ -65,7 +60,7 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
         List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
         Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() , obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }
@@ -82,6 +77,7 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
             obj3.setPeriod_id(obj.getPeriod_id());
             mapStationInfos.get(Long.valueOf(sta.getDeptid())).setCheck_t_num(fwqStatisticsDao.selectDeptChedkpeople(obj3));
             mapStationInfos.get(Long.valueOf(sta.getDeptid())).setOther_check_num(fwqStatisticsDao.selectDeptRecord(obj3));
+            mapStationInfos.get(Long.valueOf(sta.getDeptid())).setChecked_num(0);
         }
 
         // 获取公司检查的某个收费站的受检次数和扣分合计
@@ -418,17 +414,19 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
         }
 
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }
         }
 
         //服务区检查次数
+        List<QzdRecord> recordList = fwqStatisticsDao.getQzdCheckNum(obj);
         List<FwqStatisticsBean> listCheckNum = fwqStatisticsDao.selectFeeStationCheckNum(obj);
-        for (FwqStatisticsBean sta : listCheckNum) {
-            if (mapStationInfos.containsKey(sta.getDept_id())) {
-                mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+        for (QzdRecord r : recordList) {
+            long dept = r.getDept();
+            if (mapStationInfos.containsKey(dept)) {
+                mapStationInfos.get(dept).setChecked_num( mapStationInfos.get(dept).getChecked_num()+r.getUsers().split(",").length);
 //                mapStationInfos.get(sta.getDept_id()).setChecked_people_num(sta.getChecked_people_num());
             }
         }
@@ -601,7 +599,45 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
 
     @Override
     public List<FwqStatisticsBean> getOneSACheckedInfo(FwqStatisticsBean obj) {
-        return fwqStatisticsDao.selectOneCheckedInfoData(obj);
+        List<FwqStatisticsBean> list =  fwqStatisticsDao.selectOneCheckedInfoData(obj);
+        for(FwqStatisticsBean f :list){
+            FwqStatisticsBean fwq = new FwqStatisticsBean();
+            fwq.setDept_id(obj.getDept_id());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+            Calendar cal = Calendar.getInstance();
+           // String start_date = f.getMth()+"-26 00:00";
+            String end_time = f.getMth()+"/26 00:00:00";
+            try {
+                Date end_date = sdf.parse(end_time);
+                cal.setTime(end_date);
+                cal.add(Calendar.MONTH, -1);
+                Date start_date = cal.getTime();
+                fwq.setStart_date(start_date);
+                fwq.setEnd_date(end_date);
+                List<QzdRecord> recordList = fwqStatisticsDao.getQzdCheckNum(fwq);
+                f.setChecked_num(0);
+                if (fwq.getStart_date() != null && fwq.getEnd_date() != null) {
+                    CheckTaskPeriod p = commonService.getCheckTaskPeriod(fwq.getStart_date().getTime(), fwq.getEnd_date().getTime());
+                    if (p != null) {
+                        fwq.setPeriod_id(p.getId());
+                    }
+                }
+                f.setCheck_t_num(fwqStatisticsDao.selectDeptChedkpeople(fwq));
+                for( QzdRecord q :recordList){
+                    long dept = fwq.getDept_id();
+                    int dept_id = (int)dept;
+                   if(q.getDept() == dept_id){
+                       f.setChecked_num(f.getChecked_num()+q.getUsers().split(",").length);
+                   }
+                }
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+           // Date end_date = new Date();
+           //Date end_date = new Date();
+
+        }
+        return list;
     }
 
     @Override
@@ -813,7 +849,7 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
         }
 
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }
@@ -1216,7 +1252,7 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
 //            mapStationInfos.put(Long.valueOf(sta.getId()), obj2);
 //        }
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }
@@ -1364,11 +1400,19 @@ public class StatisticsServiceImpl implements StatisticsService_Q {
            List<CheckNum> objList = fwqStatisticsDao.selectQzdCheckNum(obj);
            Map<Long, Item> itemMap = commonService.getItemMap();
            Map<Long, Organ> deptMap = commonService.getDeptMap();
+           List<QzdRecord> recordList = fwqStatisticsDao.getQzdCheckNum(obj);
            for (CheckNum sta : objList) {
                obj.setDept_id(sta.getDept().longValue());
                sta.setDeptName(deptMap.get(sta.getDept().longValue()).getOrganname());
               sta.setIsApplyNunm(fwqStatisticsDao.selectQzdApplyNum(obj));
+               sta.setTaskNum(0);
+               for(QzdRecord r:recordList){
+                     if(sta.getDept() == r.getDept()){
+                         sta.setTaskNum(sta.getTaskNum()+r.getUsers().split(",").length);
+                     }
+               }
            }
+
            return objList;
        }
 }

+ 35 - 15
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsService_FImpl.java

@@ -60,7 +60,7 @@ public class StatisticsService_FImpl implements StatisticsService_F {
         List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
         Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }
@@ -114,12 +114,13 @@ public class StatisticsService_FImpl implements StatisticsService_F {
             FwqStatisticsBean value = station.getValue();
             value.setThird_check_num(1);
             value.setOnsite_check_num(1);
-            int avgNum = 0;
+            double avgNum = 0;
             if(value.getCheck_t_num() != 0){
-                 avgNum =(int)Math.ceil(value.getCompany_check_num()/value.getCheck_t_num());
+                double  checkNum = value.getCompany_check_num();
+                 avgNum =checkNum/value.getCheck_t_num();
             }
-            value.setChecked_num(avgNum);
-            int checkScore = 0;
+            value.setStart_score(df.format(avgNum));
+            double checkScore = 0;
             if(avgNum != 0){
                 checkScore = value.getCompany_total_score()/avgNum;
             }
@@ -135,7 +136,7 @@ public class StatisticsService_FImpl implements StatisticsService_F {
             // 设置平均得分
             Double a =1000-checkScore*0.4-value.getOnsite_total_score()*0.4-value.getThird_total_score()*0.2;
            // Float score_avg = 1000 - (float)checkScore*0.4;
-            value.setScore_avg(a.toString());
+            value.setScore_avg(df.format(a));
         }
         List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
 //        sortList.sort(new Comparator<FwqStatisticsBean>() {
@@ -173,7 +174,7 @@ public class StatisticsService_FImpl implements StatisticsService_F {
             }
         }
 
-        CheckTaskPeriod period = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+        CheckTaskPeriod period = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
 
         if (period != null) {
             for (FwqStatisticsBean s : sortList) {
@@ -431,17 +432,19 @@ public class StatisticsService_FImpl implements StatisticsService_F {
         }
 
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }
         }
 
         //服务区检查次数
+        List<QzdRecord> recordList = qzdStatisticsDao.getQzdCheckNum(obj);
         List<FwqStatisticsBean> listCheckNum = qzdStatisticsDao.selectFeeStationCheckNum(obj);
-        for (FwqStatisticsBean sta : listCheckNum) {
-            if (mapStationInfos.containsKey(sta.getDept_id())) {
-                mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+        for (QzdRecord r : recordList) {
+            long dept = r.getDept();
+            if (mapStationInfos.containsKey(dept)) {
+                mapStationInfos.get(dept).setChecked_num( mapStationInfos.get(dept).getChecked_num()+r.getUsers().split(",").length);
 //                mapStationInfos.get(sta.getDept_id()).setChecked_people_num(sta.getChecked_people_num());
             }
         }
@@ -549,7 +552,19 @@ public class StatisticsService_FImpl implements StatisticsService_F {
             bean.setAll_check_score(countScore);
             int scoreTotal = countScore;
             float score = (float)scoreTotal;
-            bean.setCheck_score_avg(1000-score/(bean.getCheck_t_num()+2));
+            int check_num = bean.getCheck_t_num();
+            if(bean.getThird_total_score() >0){
+                check_num++;
+            }
+            if(bean.getOnsite_total_score() >0){
+                check_num++;
+            }
+            if(check_num == 0){
+                check_num = 1;
+            }
+            DecimalFormat df = new DecimalFormat("0.00");
+            bean.setCheck_total_avg(df.format(score/check_num));
+            bean.setCheck_score_avg(1000-score/check_num);
            // int score = (1000-countScore/(bean.getCheck_t_num()+2));
         }
         map.put("list", scorelist);
@@ -655,15 +670,20 @@ public class StatisticsService_FImpl implements StatisticsService_F {
 
     public List<CheckNum> selectQzdCheckNum(FwqStatisticsBean obj){
         List<CheckNum> objList = qzdStatisticsDao.selectQzdCheckNum(obj);
+        List<QzdRecord> recordList = qzdStatisticsDao.getQzdCheckNum(obj);
         Map<Long, Item> itemMap = commonService.getItemMap();
         Map<Long, Organ> deptMap = commonService.getDeptMap();
         int i = 0;
         for (CheckNum sta : objList) {
             obj.setDept_id(sta.getDept().longValue());
             sta.setDeptName(deptMap.get(sta.getDept().longValue()).getOrganname());
-            i++;
-            sta.setDept(i);
             sta.setIsApplyNunm(qzdStatisticsDao.selectQzdApplyNum(obj));
+            sta.setTaskNum(0);
+            for(QzdRecord r:recordList){
+                if(sta.getDept() == r.getDept()){
+                    sta.setTaskNum(sta.getTaskNum()+r.getUsers().split(",").length);
+                }
+            }
         }
         return objList;
     }
@@ -677,7 +697,7 @@ public class StatisticsService_FImpl implements StatisticsService_F {
 //            mapStationInfos.put(Long.valueOf(sta.getId()), obj2);
 //        }
         if (obj.getStart_date() != null && obj.getEnd_date() != null) {
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
             if (p != null) {
                 obj.setPeriod_id(p.getId());
             }

+ 82 - 0
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/TaskService_QImpl.java

@@ -242,4 +242,86 @@ public  class TaskService_QImpl implements TaskService_Q {
     public List<TaskStatus> getTaskStatusList(Long id) {
         return qzdTaskDao.getTaskStatusList(id);
     }
+
+    @Override
+    public Object getAllTaskByStatics(Integer page, Integer size, QzdCheckTask qzdCheckTask) {
+        if (!(page.equals(0) && size.equals(0))) {
+            PageHelper.startPage(page, size);
+        }
+        if(qzdCheckTask.getCheck_status_arr()!=null){
+            qzdCheckTask.setCheck_status(null);
+        }
+        List<QzdCheckTask> QzdCheckTaskList = new ArrayList<>();
+        if(qzdCheckTask.getChecked_users() != null){
+            String userid = qzdCheckTask.getChecked_users();
+            String checkedUsers[]   = qzdCheckTask.getChecked_users().split(",");
+            for(int i = 0;i<checkedUsers.length;i++){
+                qzdCheckTask.setChecked_users("%"+checkedUsers[i]+"%");
+                List<QzdCheckTask> userslist = qzdTaskDao.getTaskByStatics(qzdCheckTask == null ? new QzdCheckTask() : qzdCheckTask);
+                for(QzdCheckTask qu : userslist){
+                    if(i == 0){
+                        QzdCheckTaskList.add(qu);
+                    }else if(qu.getChecked_users().equals(userid) == false){
+                        QzdCheckTaskList.add(qu);
+                    }
+
+                }
+            }
+        } else {
+            QzdCheckTaskList = qzdTaskDao.getTaskByStatics(qzdCheckTask == null ? new QzdCheckTask() : qzdCheckTask);;
+        }
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, User> userMap = commonService.getUserMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (QzdCheckTask q : QzdCheckTaskList
+                ) {
+            if (deptMap.get(q.getChecked_dept()) != null) {
+                q.setChecked_dept_name(deptMap.get(q.getChecked_dept()).getOrganname());
+            }
+            if (userMap.get(q.getCheckman()) != null) {
+                q.setCheckman_name(userMap.get(q.getCheckman()).getTruename());
+            }
+            if (q.getCheckman() != null) {
+                q.setCheckman_name(userMap.get(q.getCheckman()).getTruename());
+            }
+
+            if (q.getChecked_dept() != null) {
+                if (deptMap.get(q.getChecked_dept()) != null) {
+                    q.setChecked_dept_name(deptMap.get(q.getChecked_dept()).getOrganname());
+                }
+            }
+            if(q.getRecheckman()!=null){
+                q.setRecheckman_name(userMap.get(q.getRecheckman()).getTruename());
+            }
+            if(q.getAppeal_result()!=null){
+                q.setAppeal_result_name(codeMap.get("appeal_result" + "_" + q.getAppeal_result() + "").getCode_name());
+            }
+            if(q.getCheck_status()!=null){
+                q.setCheck_status_name(codeMap.get("task_status" + "_" + q.getCheck_status() + "").getCode_name());
+            }
+            String users = q.getChecked_users();
+            if (users != null && users != "") {
+                String[] usersdata = users.split(",");
+                String names = "";
+                for (int i = 0; i < usersdata.length; i++) {
+                    String ids = usersdata[i];
+                    long id = Long.parseLong(ids);
+                    String username = userMap.get(id).getTruename();
+                    username = username != null ? username : "";
+                    names += username;
+                    if (i < usersdata.length - 1) {
+                        names += ",";
+                    }
+                }
+                q.setChecked_users_name(names);
+
+            }
+        }
+
+        if (!(page.equals(0) && size.equals(0))) {
+            return new PageInfo<QzdCheckTask>(QzdCheckTaskList);
+        }
+        return QzdCheckTaskList;
+    }
+
 }

+ 1 - 0
Visuallnspection_qzd/src/main/resources/application.properties

@@ -19,6 +19,7 @@ dubbo.protocol.status = server
 dubbo.registry.id = qzd_service
 #dubbo.registry.address = zookeeper://git.topm.win:9994
 dubbo.registry.address = zookeeper://127.0.0.1:2181
+#dubbo.registry.address = zookeeper://192.168.45.158:2181
 dubbo.registry.file = ./output/dubbo1.cache
 dubbo.reference.check=false
 dubbo.consumer.check=false

BIN
Visuallnspection_qzd/src/main/resources/fwq_checked_item_info.xls


BIN
Visuallnspection_qzd/src/main/resources/fwq_operation_info.xls


+ 1 - 0
Visuallnspection_qzd/src/main/resources/logback.xml

@@ -34,3 +34,4 @@
 	<!-- 打印sql语句 -->
 	<logger name="com.xintong.visualinspection.visuallnspection_qzd.dao" level="DEBUG"></logger>
 </configuration>
+