MSI\liwei 7 жил өмнө
parent
commit
9dd7c7fab2
21 өөрчлөгдсөн 352 нэмэгдсэн , 145 устгасан
  1. 2 2
      VisualInspection/js/config.js
  2. 1 1
      VisualInspection/js/lib/mytable.js
  3. 6 0
      VisualInspection/js/main.js
  4. 29 9
      VisualInspection/js/mytask/check.js
  5. 26 36
      VisualInspection/js/statistics/assess_ranking.js
  6. 23 4
      VisualInspection/js/util/media.js
  7. 6 1
      VisualInspection/view/main.html
  8. 16 0
      VisualInspection/view/mytask/check.html
  9. 42 1
      VisualInspection/view/mytask/taskDetail.html
  10. 7 14
      VisualInspection/view/statistics/emp_ranking.html
  11. 4 3
      VisualInspection_server/src/main/java/com/xintong/GetOffWork.java
  12. 72 62
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  13. 26 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java
  14. 15 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java
  15. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java
  16. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java
  17. 21 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  18. 7 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml
  19. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java
  20. 3 11
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  21. 42 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

+ 2 - 2
VisualInspection/js/config.js

@@ -33,8 +33,8 @@ function getImageaddr() {
     } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
         return "http://file_release_yanhai.jsxt.jsjtyxt.com/";
     } else if (base_ui_url.indexOf("localhost") != -1) {
-        return "http://njy.xt.wenhq.top:8083/"
-            // return "http://200.200.19.126:8080/";
+       // return "http://172.28.2.6:8080/"
+             return "http://200.200.19.126:8080/";
     } else if (base_ui_url.indexOf("http://172.28.2.6") != -1) {
         return "http://172.28.2.6:8080/"
     } else if (base_ui_url.indexOf("200.200.19.126") != -1) {

+ 1 - 1
VisualInspection/js/lib/mytable.js

@@ -175,7 +175,7 @@ String.prototype.replaceAll = function(s1, s2) {
                                     src = src.split('.mp4')[0] + "_screen_0.png"
                                     ispic = false;
                                 }
-                                var pic = (ispic ? '<a class="card lightbox-toggle" onclick="img_play(\'' + src + '\')" href="javascript:void(0)" style="width:60px;height:50px;float:left;">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="width:60px;height:50px;">') +
+                                var pic = (ispic ? '<a class="card lightbox-toggle" onclick="img_play(\'' + src + '\')" href="javascript:void(0)" style="width:60px;height:50px;float:left;">' : '<a class="card" onclick="videoCkplayer(\'' + videosrc + '\')" href="javascript:void(0)" style="width:60px;height:50px;">') +
                                     '<img class="pic-class  img-thumbnail" style="width:60px;height:50px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 10px;left: 15px;color: white;"></i>') +
                                     '</a>';
                                 picStr += pic;

+ 6 - 0
VisualInspection/js/main.js

@@ -3,6 +3,12 @@ var myTree;
 
 //计算左面的
 $(document).ready(function() {
+
+    $("#videoClose").on("click",function(){
+       
+       $("#videodiv").css("display","none");
+       closeVideo();
+    })
     // $('#mum_left').perfectScrollbar();
     $('#mum_left').height($(document).height() - 60);
     $('#main_panel').height($(document).height() - 100);

+ 29 - 9
VisualInspection/js/mytask/check.js

@@ -605,20 +605,20 @@ function genPicstr(imgSrc) {
         ispic = false;
     }
 
-    var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
-        '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
-        (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
-        '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 20px;left: 40px;color: white;"></i>') +
-        '</a>' +
-        '</div>';
-    if (ISCLIENT) {
+    // var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
+    //     '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
+    //     (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
+    //     '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 20px;left: 40px;color: white;"></i>') +
+    //     '</a>' +
+    //     '</div>';
+    //if (ISCLIENT) {
         pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
             '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
-            '<a class="card" onclick="' + (ispic ? 'showClientImg(\'' + src + '\')' : 'showClientVideo(\'' + videosrc + '\')') + '" href="javascript:void(0)" style="position:absolute">' +
+            '<a class="card" onclick="' + (ispic ? 'showClientImg(\'' + src + '\')' : 'videoCkplayer(\'' + videosrc + '\')') + '" href="javascript:void(0)" style="position:absolute">' +
             '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 20px;left: 40px;color: white;"></i>') +
             '</a>' +
             '</div>';
-    }
+   // }
     return pic;
 }
 
@@ -1108,4 +1108,24 @@ function addTag(text, tagDiv) {
 //             $("#top_reason_div").html(str);
 //         }
 //     });
+// }
+
+// function videoCkplayer(src){
+//     $('#addModal').modal('show');
+//     var videoObject = {
+//         container: '.video', //“#”代表容器的ID,“.”或“”代表容器的class
+//         variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
+//         //poster: 'pic/wdm.jpg', //封面图片
+//         autoplay: true,
+//        // loaded:'loadedHandler',//监听播放器加载成功
+//         video: base_image_server_url+"/file/aliyunmedia.mp4"  //视频地址
+//        // video: "file:///H://N3J4803_00030220180708095248_1289.MP4"   //视频地址
+//     };
+//     videoPlayer = new ckplayer(videoObject);
+//     console.log(videoPlayer.getStatus());
+//    // videoPlayer.addListener('time', timeHandler);
+// }
+
+// function closeVideo(){
+//     videoPlayer.videoPause();
 // }

+ 26 - 36
VisualInspection/js/statistics/assess_ranking.js

@@ -33,13 +33,14 @@ $(function() {
     if (roleContains("ROAD_MANAGER")) {
         road_manager = getCurrentUser().organid;
     }
-    setRoadManagerSelect("#center-manager", road_manager, true);
+    //setRoadManagerSelect("#center-manager", road_manager, true);
     if (road_manager) {
         var dept;
         if (roleContains("STATION")) {
             dept = getCurrentUser().organid;
         }
         var feeList = cache_road_manager_fee_list_map.get(road_manager);
+        console.log(feeList);
         // $("#fsList").html(obj);
         setRoadManagerValue(feeList, "#fsList", dept, true);
         // $("#fsList").val(dept);
@@ -47,22 +48,14 @@ $(function() {
         initQueryEmp(road_manager, dept);
     } else {
         // 初始化查询
+        var deptData;
+        get_common_service("/dept/getAllFs", null, function(data) {
+            setRoadManagerValue(data, "#fsList", null, true);
+        });
+        console.log(deptData);
         initQueryEmp(null, null);
     }
     // 道管中心选择变化
-    $("#center-manager").change(function() {
-            $("#fsList").empty();
-            if (GV(this) != '') {
-                getFsStationList(GV(this), function(options) {
-                    $("#fsList").append(options);
-                    var dept;
-                    if (roleContains("STATION")) {
-                        dept = getCurrentUser().organid;
-                    }
-                    $("#fsList").val(dept);
-                });
-            }
-        })
         // end
 })
 
@@ -113,7 +106,6 @@ function queryEmpClick() {
         return;
     }
     var param = {
-        "parent_dept_id": GV("#center-manager"),
         "dept_id": GV("#fsList"),
         "start_date": start_date,
         "end_date": end_date,
@@ -128,7 +120,7 @@ function initQueryEmp(parent_dept_id, dept_id) {
     $.zui.store.set('store_param_' + current_url, null);
     if (p_m) {
 
-        $("#center-manager").val(p_m.parent_dept_id);
+        //$("#center-manager").val(p_m.parent_dept_id);
         $("#fsList").val(p_m.dept_id);
         $("#start-time").val(p_m.start_date);
         $("#end-time").val(p_m.end_date);
@@ -205,7 +197,12 @@ function initQueryEmp(parent_dept_id, dept_id) {
  */
 function getEmployeeInfosClick(url, param, start_score, end_score, start_num, end_num) {
     post_common_service(url, param, function(data) {
-
+        $("#itemInfo").empty();
+        itemNameList = data.itemList;
+        for(var index in data.itemList){
+              var obj = data.itemList[index];
+              $("#itemInfo").append("<th width='4%' id='th_9_"+index+"'>"+obj.name+"</th>");
+        }
 
         var userChangeStations = data["userChangeStations"];
         var userChangeStationMap = new HashMap();
@@ -215,7 +212,7 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
         }
 
         data = data["lists"];
-
+        console.log(data);
         var strTbody = '';
         var count = 0;
         var start_date_time = moment(param.end_date + "Z");
@@ -232,9 +229,8 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
             isshownumber = true;
 
         }
-
         for (var i = 0; i < data.length; i++) {
-            var score = 1000 - filterByZeroHandle(data[i].check_score_avg, '0');
+            var score = 100 - data[i].check_all_score;
             var check_number = filter(data[i].checked_num, '0');
             var flag = judgeParamFilter(data, i, score, start_score, end_score, check_number, start_num, end_num)
             if (flag) {
@@ -254,27 +250,21 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
                     tiptext = userChangeStation.old_dept_name + ":" + userChangeStation.old_dept_check_num + "次," +
                         userChangeStation.new_dept_name + ":" + userChangeStation.new_dept_check_num + "次";
                 }
-
-
-
-
                 var showNumberHtml = (isshownumber ? (filter(data[i].checked_num, '0') + (data[i].checked_num < 6 ? html : "")) : "-");
                 if (hasRole(ROLE_ADMIN) || hasRole(ROLE_JICHA_ADMIN)) {
                     showNumberHtml = (ischage ? ("<span style='color:red;' data-toggle='tooltip' data-placement='right' title=" + tiptext + ">" + userChangeStation.old_dept_check_num + "+" + userChangeStation.new_dept_check_num + "</span>") : filter(data[i].checked_num, '0')) + html;
                 }
-
-
-
                 strTbody += "<tr><td width='4%;'>" + (count + 1) + "</td><td width='6%;'>" + data[i].user.fee_station_name + "</td>" +
                     "<td width='6%;'><a href='JavaScript:void(0)' onclick='jumpuser(\"" + data[i].user.id + "\",\"" + data[i].user.organid + "\")'>" + data[i].user.truename + "</a></td><td width='6%;'>" + data[i].user.position_name + "</td>" +
                     "<td width='7%;'>" + data[i].user.workno + "</td><td width='4%;'>" + filter(data[i].company_ranking, '/') + "</td>" +
-                    "<td width='4%;'>" + filter(data[i].center_ranking, '/') + "</td><td width='4%;'>" + filter(data[i].fee_station_ranking, '/') +
-                    "</td><td width='4%;'>" + getItemScore(data[i], '环境') + "</td>" +
-                    "<td width='4%;'>" + getItemScore(data[i], '仪容仪表') + "</td><td width='4%;'>" + getItemScore(data[i], '表情') + "</td>" +
-                    "<td width='4%;'>" + getItemScore(data[i], '动作') + "</td><td width='4%;'>" + getItemScore(data[i], '文明用语') + "</td>" +
-                    "<td width='4%;'>" + getItemScore(data[i], '工作纪律') + "</td><td width='4%'>" + getItemScore(data[i], '便民服务') + "</td><td width='4%;'>" +
-                    getItemScore(data[i], '安全管理') + "</td><td width='4%;'>" + data[i].check_all_score + "</td>" +
-                    "<td width='6%;'>" + showNumberHtml + "</td><td width='4%;'>" + filterSlash(filterByZeroHandle(data[i].check_score_avg, '0'), filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td>" +
+                    "<td width='4%;'>" + filter(data[i].fee_station_ranking, '/') +
+                    "</td>"
+                    for(var index in itemNameList){
+                        var obj = itemNameList[index];
+                        strTbody +="<td width='4%;'>"+getItemScore(data[i],obj.name)+"</td>";
+                  }                   
+                     strTbody += "<td width='4%;'>"+data[i].check_all_score + "</td>";
+                    strTbody +=   "<td width='6%;'>" + showNumberHtml + "</td><td width='4%;'>" + filterSlash(filterByZeroHandle(data[i].check_score_avg, '0'), filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td>" +
                     "<td width='4%;'>" + filterSlash(score, filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td><td width='4%;'>" + "</td><td width='4%;'>" + "</td></tr>";
                 count++;
             }
@@ -291,7 +281,7 @@ function jumpuser(userid, deptid) {
 
 
     var param = {
-        "parent_dept_id": GV("#center-manager"),
+       // "parent_dept_id": GV("#center-manager"),
         "dept_id": GV("#fsList"),
         "start_date": $("#start-time").val(),
         "end_date": $("#end-time").val(),
@@ -872,7 +862,7 @@ function exportExcel() {
     var end_date = $("#end-time").val();
     var start_score = $("#start-score").val();
     var end_score = $("#end-score").val();
-    var parent_dept_id = $("#center-manager").val();
+  //  var parent_dept_id = $("#center-manager").val();
     var max_score = $("#end-score").val();
     var min_score = $("#start-score").val();
     var min_check_num = $("#start-num").val();

+ 23 - 4
VisualInspection/js/util/media.js

@@ -86,9 +86,28 @@ function video_paly(src) {
             lpayer.height(height - 40);
         }
     });
+}
 
+function videoCkplayer(src){
+    $('#videodiv').css('display','block');
+    
+    var videoObject = {
+        container: '.video', //“#”代表容器的ID,“.”或“”代表容器的class
+        variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
+        //poster: 'pic/wdm.jpg', //封面图片
+        autoplay: true,
+       // loaded:'loadedHandler',//监听播放器加载成功
+        video:base_image_server_url+"/file/aliyunmedia.mp4"  //视频地址
+       // video: "file:///H://N3J4803_00030220180708095248_1289.MP4"   //视频地址
+    };
+    videoPlayer = new ckplayer(videoObject);
+    // videoPlayer.fullScreen();
+    videoPlayer.videoProportion(200,300);
+    // videoPlayer.videoZoom(1);
+   // console.log(videoPlayer.getStatus());
+   // videoPlayer.addListener('time', timeHandler);
+}
 
-
-
-
-}
+function closeVideo(){
+        videoPlayer.videoPause();
+    }

+ 6 - 1
VisualInspection/view/main.html

@@ -74,7 +74,12 @@
 
         </div>
     </div>
-
+    <div style="position:absolute;width:100%;height:100%;z-index: 100;background:rgba(0,0,0,0.5);top:0;left:0;display:none" id="videodiv">
+            <div style="position:absolute;left:50%;top:50%; transform: translate(-50%, -50%);width:800px;height:600px;" >
+         <button id="videoClose" type="button" class="close" data-dismiss="modal" ><span aria-hidden="true" >×</span><span class="sr-only">关闭</span></button>
+           <div id="videoDiv" class="video tab-pane active" style="width:100%;height:100%;"></div>
+            </div>
+     </div>
     <script type="text/javascript" src="/js/lib/ckplayer/ckplayer/ckplayer.js"></script>
     <script src="/js/main.js"></script>
 </body>

+ 16 - 0
VisualInspection/view/mytask/check.html

@@ -150,6 +150,7 @@
                     <button class="btn btn-primary" type="button" onclick="agreeApply()">同意申请</button>-->
                 </div>
             </div>
+            
         </div>
     </div>
 </div>
@@ -211,6 +212,21 @@
 <div id="hide_div" style="display:none;text-align:center;">
 </div>
 <img id="userBigImg" style="display:none;margin-right:20px;" />
+
+<!-- <div class="modal fade" id="addModal" style="height: 800px">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" ><span aria-hidden="true" onclick="closeVideo()">×</span><span class="sr-only">关闭</span></button>
+                <h4 class="modal-title" >视频播放</h4>
+            </div>
+            <div class="modal-body">
+                <div id="videoDiv" class="video tab-pane active" style="width:100%;height:100%;"></div>
+            </div>
+           
+        </div>
+    </div>
+</div> -->
 <script>
     var curVideo;
     $(document).ready(function() {

+ 42 - 1
VisualInspection/view/mytask/taskDetail.html

@@ -79,6 +79,27 @@
 <div id="chooseCheckman-div" style="display:none;text-align:center;">
     <link rel="import" href="/view/mytask/chooseCheckman.html?__inline">
 </div>
+
+
+<!-- <div class="modal fade" id="addModal" style="width:100%;height:100%;"> -->
+    
+
+      
+    <!-- <div class="modal-dialog">
+
+            
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" ><span aria-hidden="true" onclick="closeVideo()">×</span><span class="sr-only">关闭</span></button>
+                <h4 class="modal-title" >视频播放</h4>
+            </div>
+            <div class="modal-body">
+                
+            </div>
+          
+        </div>
+    </div> -->
+<!-- </div> -->
 <style>
     .line {
         text-align: center;
@@ -287,7 +308,7 @@
 
                 var pic = '<div id="img_item_' + i + '" class="col-md-4 col-sm-6 col-lg-3">' +
                     '<a href="javascript:void(0)" onclick="removeImg(\'#img_item_' + i + '\')" style="float:right;position:absolute;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
-                    (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
+                    (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="videoCkplayer(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
                     '<img class="pic-class img-thumbnail" style="width:200px;height:150px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 40px;left:80px;color: white;"></i>') +
                     '</a>' +
                     '</div>';
@@ -561,4 +582,24 @@
             redirectLastPage();
         });
     }
+
+//     function videoCkplayer(src){
+//     $('#addModal').modal('show');
+//     var videoObject = {
+//         container: '.video', //“#”代表容器的ID,“.”或“”代表容器的class
+//         variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
+//         //poster: 'pic/wdm.jpg', //封面图片
+//         autoplay: true,
+//        // loaded:'loadedHandler',//监听播放器加载成功
+//         video: base_image_server_url+"/file/aliyunmedia.mp4"  //视频地址
+//        // video: "file:///H://N3J4803_00030220180708095248_1289.MP4"   //视频地址
+//     };
+//     videoPlayer = new ckplayer(videoObject);
+//     console.log(videoPlayer.getStatus());
+//    // videoPlayer.addListener('time', timeHandler);
+// }
+
+// function closeVideo(){
+//     videoPlayer.videoPause();
+// }
 </script>

+ 7 - 14
VisualInspection/view/statistics/emp_ranking.html

@@ -6,9 +6,9 @@
         <form class="form-horizontal">
             <div class="form-group">
                 <div class="form-group col-sm-3">
-                    <label for="exampleInputAccount1" class="col-sm-4">道管中心</label>
+                    <label for="exampleInputAccount1" class="col-sm-4">类型</label>
                     <div class="col-sm-8">
-                        <select class="form-control" id="center-manager">
+                        <select class="form-control" id="itemType">
                             <!--<option selected value="">全部</option>
                             <option  value="30">连云港</option>
                             <option value="31">盐城</option>
@@ -91,30 +91,23 @@
                             <th rowspan="2" width="6%" id='th_4'>岗位</th>
                             <th rowspan="2" width="7%" id='th_5'>工号</th>
                             <th rowspan="2" width="4%" id='th_6'>公司排名</th>
-                            <th rowspan="2" width="4%" id='th_7'>道管排名</th>
+                            <!-- <th rowspan="2" width="4%" id='th_7'>道管排名</th> -->
                             <th rowspan="2" width="4%" id='th_8'>收费站排名</th>
                             <th colspan="9" height="40px" id='th_9'>考核扣分</th>
+                            <th rowspan="2" width="4%" id='th_8'>扣分合计</th>
                             <th rowspan="2" width="6%" id='th_10'>受检次数
                                 <div class="switch switch-inline hidden" id="show_check_div" data-toggle="tooltip" data-placement="right" title="收费站是否显示该列数据">
                                     <input type="checkbox" id="show_check" onchange="show_check_fun()">
                                     <label style="color: #000;" id="show_check_text">显示</label>
                                 </div>
                             </th>
-                            <th rowspan="2" width="4%" id='th_11'>平均扣分(分制)</th>
+                            <th rowspan="2" width="4%" id='th_11'>平均扣分(分制)</th>
                             <th rowspan="2" width="4%" id='th_12'>得分</th>
                             <th rowspan="2" width="4%" id='th_13'>服务评价</th>
                             <th rowspan="2" width="4%" id='th_14'>备注</th>
                         </tr>
-                        <tr>
-                            <th width="4%" id='th_9_1'>环境卫生</th>
-                            <th width="4%" id='th_9_2'>仪容仪表</th>
-                            <th width="4%" id='th_9_3'>表情</th>
-                            <th width="4%" id='th_9_4'>收费动作</th>
-                            <th width="4%" id='th_9_5'>文明用语</th>
-                            <th width="4%" id='th_9_6'>工作纪律</th>
-                            <th width="4%" id='th_9_7'>便民服务</th>
-                            <th width="4%" id='th_9_8'>安全管理</th>
-                            <th width="4%" id='th_9_9'>扣分合计</th>
+                        <tr id="itemInfo">
+                           
                         </tr>
                     </thead>
                     <!-- <tbody class="table-tbody" style="background:white; " align="center">

+ 4 - 3
VisualInspection_server/src/main/java/com/xintong/GetOffWork.java

@@ -1,6 +1,6 @@
 package com.xintong;
 
-import com.xintong.visualinspection.service.OffWorkService;
+import com.xintong.visualinspection.service.TaskService;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
@@ -14,16 +14,17 @@ import java.util.Date;
 public class GetOffWork {
 
     @Autowired
-    private OffWorkService offWorkService;
+    private TaskService taskService;
 
     private static final org.slf4j.Logger logger = LoggerFactory.getLogger(GetOffWork.class);
 
-    @Scheduled(cron = "0 0/10 * * * ?")
+    @Scheduled(cron = "5 * * * * ?")
     public void confirmTasks() {
       // Date now = new Date();
 
         logger.info("任务确认检测开始---------");
         //offWorkService.getOffWorkList();
+        //taskService.updateTaskZjList();
         logger.info("任务确认检测结束---------");
     }
 

+ 72 - 62
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java

@@ -18,19 +18,19 @@ import lombok.Data;
 public class StatisticsBean {
     //编号
     private Integer id;
- 
+
     // 父部门id
     private Long parent_dept_id ;
-    
+
     // 部门id
     private Long dept_id;
-    
+
     //开始日期
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date start_date ;
-    
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date end_date ;
 
@@ -43,95 +43,95 @@ public class StatisticsBean {
     private Long task_id;
 
     private Long user_id ;
-    
+
     private String name ;
-    
+
     private String parent_name ;
-    
+
     private int score;
-    
+
     private Integer item_id ;
 
     private int checked_num;
-    
+
     private int checked_people_num ;
-    
+
     private int people_num;
-    
+
     private int score_fifteen;
-    
+
     private int score_fifty;
-    
+
     private int score_over_fifty ;
-    
+
     private int all_check_score ;
-    
+
     // 满分
     private int check_no_score ;
-    
+
     // 平均得分
     private String score_avg ;
-    
+
     // 平均人均扣分
     private float check_score_avg;
-    
+
     private List<String> checked_socre_name = new ArrayList<>() ;
-    
+
     private List<Integer> checked_score = new ArrayList<>() ;
-    
+
     private List<Integer> seq_checked_score = new ArrayList<>() ;
-    
+
     private List<Organ> dept_list  ;
     private List<Integer> checked_score_ids = new ArrayList<>() ;
-    
-    
+
+
     private String start_score;
     private String end_score;
-    
+
     // 查询标记
     private Integer queryType ;
-    
+
     // 月份
     private String mth ;
-    
+
     // 上月
     private String prev_mth ;
-    
+
     // 收费站名称
     private String feeStationName ;
     private String pfeeStationName ;
-    
+
     private User user;
-    
+
     // 
     private Integer order_type ;
-    
+
     // 排名
     private Integer ranking ;
-    
+
     // 排名变化
     private Integer ranking_change;
-    
+
     // 照片
     private String pics ;
-    
+
     // 稽查人员id
     private Integer checkman_id ;
-    
+
     private String checkman_name ;
-    
+
     // 被考核人的姓名
     private String checked_name ;
-    
-    
+
+
     private String check_task_name ;
-    
+
     private String check_task_time_name ;
-    
+
     private List<Integer> position_ids;
-    
+
     private Integer score_flag  ;
-    
+
     // 其他稽查不同类型
     private Integer check_type;
     // 扣分合计
@@ -155,11 +155,11 @@ public class StatisticsBean {
     // 数据平台受检次数
     private Integer data_check_num = 0;
     // 数据平台扣分合计
-    
+
     // 其他
     private Integer other_check_num =0;
     private Integer other_total_score = 0 ;
-    
+
     private Integer data_total_score = 0;
     // 总平均扣分
     private String check_total_avg  = "0";
@@ -167,23 +167,23 @@ public class StatisticsBean {
     private Integer company_ranking2;
     // 道管排名
     private Integer fee_station_ranking2;
-    
+
     private Integer check_t_num = 0;
-    
+
     private Integer check_t_score = 0;
-    
+
     private Integer check_x_num = 0;
-    
+
     private Integer check_x_score = 0;
-    
+
     private Integer check_s_num = 0;
-    
+
     private Integer check_s_score = 0;
-    
+
     private Integer check_all_num = 0;
-    
+
     private Integer check_all_score = 0;
-    
+
     // 比较大小 1 小 , -1 大
     public int compareTo(StatisticsBean o2){
     	if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){
@@ -195,7 +195,7 @@ public class StatisticsBean {
 				return -1;
 			} else {
 				return 0;
-			}	
+			}
 		}else{
 			if(this.getChecked_num() == 0 && o2.getChecked_num()!=0 ){
 				return -1 ;
@@ -206,7 +206,7 @@ public class StatisticsBean {
 			}
 		}
     }
-    
+
     // 比较大小 1 小 , -1 大 
     // 方法2
     public int compare2To(StatisticsBean o2){
@@ -223,9 +223,9 @@ public class StatisticsBean {
 			return -1;
 		} else {
 			return 0;
-		}	
+		}
     }
-    
+
     //比较大小 1 小 , -1 大 
     // 方法3
     public int compare3To(StatisticsBean o2){
@@ -242,10 +242,10 @@ public class StatisticsBean {
 			return -1;
 		} else {
 			return 0;
-		}	
+		}
     }
-    
-  //比较大小 1 小 , -1 大 
+
+  //比较大小 1 小 , -1 大
     // 方法3
     public int compare4To(StatisticsBean o2){
     	if (this.getId() > o2.getId()) {
@@ -272,5 +272,15 @@ public class StatisticsBean {
 			return -1;
 		}
     }
+
+    public int compareNewTo(StatisticsBean o2){
+        if(this.getAll_check_score() > o2.getAll_check_score()){
+                   return  1;
+        }else if(this.getAll_check_score() < o2.getAll_check_score()){
+                  return  -1;
+        }else{
+            return 0;
+        }
+    }
     
 }

+ 26 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java

@@ -135,5 +135,30 @@ public class StatisticsBo {
 			}
 		}	
     }
-    
+
+	public int compareNewTo(StatisticsBo o2) {
+		double a = 100.0 ,b=100.0 ;
+		int a_c = this.getChecked_num()+this.getChecked_m_num();
+		int b_c = o2.getChecked_num()+o2.getChecked_m_num();
+		if(a_c!=0 ){
+			a = this.getCheck_all_score();
+		}
+		if(b_c!=0){
+			b = o2.getCheck_all_score();
+		}
+
+		if (a > b ) {
+			return 1;
+		} else if (a < b) {
+			return -1;
+		} else {
+			if(a_c == 0 && b_c!=0 ){
+				return -1 ;
+			}else if(b_c ==0 && a_c != 0){
+				return 1;
+			}else{
+				return 0;
+			}
+		}
+	}
 }

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

@@ -40,9 +40,24 @@ public class StatisticsController extends BaseController {
      */
     @RequestMapping(value = "/employee/order")
     public String getEmployeeOrder(@RequestBody StatisticsBean obj){
+		Map<String,String> param = new HashMap<String,String>();
+		param.put("rule_type", "4");
+		CheckRule cr = checkRuleService.getItemListByRuleType(param);
+		List<CheckItem> itemList=null;
+		//if(cr!=null && obj.getCheck_type() == 0)
+			itemList = cr.getCheck_items();
+//		if(cr!=null && obj.getCheck_type() != 0 && obj.getCheck_type() != null){
+//			for(CheckItem item: cr.getCheck_items()){
+//				long id = item.getId();
+//				if((int)id == obj.getCheck_type()){
+//					itemList = item.getSubCheckItem();
+//				}
+//			}
+//		}
     	List<StatisticsBo> lists=  statisticsService.getEmployeeCheckedInfo(obj);
     	List<UserChangeStation> userChangeStations = statisticsService.getUserChangeStation(obj);
     	Map<String,Object> m = new HashMap<>();
+    	m.put("itemList",itemList);
     	m.put("lists",lists);
         m.put("userChangeStations",userChangeStations);
     	return super.returnSuccessResult(m);

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

@@ -15,6 +15,8 @@ import com.xintong.visualinspection.pojo.TaskAndScore;
 public interface StatisticsDao  {
     
 	public List<StatisticsBean> selectStatistics(StatisticsBean obj);
+
+	public List<StatisticsBean> selectAllStatistics(StatisticsBean obj);
 	
 	public List<StatisticsBean> selectCheckedTimes(StatisticsBean obj);
 	

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java

@@ -35,5 +35,6 @@ public interface TaskDao  {
     public List<UserClassCount> getUserCount(Task task);
     public List<Task> getUserCountTask(Task task);
     public List<Task> getTaskListByDept(TaskListByDeptAppeal taskListByDeptAppeal);
+    public Integer getPeriod_id(Task task);
 
 }

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

@@ -211,6 +211,27 @@
         u LEFT JOIN check_item s ON u.parent_id = s.id GROUP BY checked_person,id
     </select>
 
+    <select id="selectAllStatistics" parameterType="com.xintong.visualinspection.bean.StatisticsBean"
+            resultType="com.xintong.visualinspection.bean.StatisticsBean">
+        SELECT a.user_id,a.dept_id,a.item_id,a.score,ck.name FROM
+        (SELECT u.checked_person AS user_id , u.checked_dept AS dept_id ,s.parent_id AS item_id ,sum(u.score) AS score
+        ,s.name FROM (
+        SELECT t.checked_person , t.checked_dept,ci.parent_id, t.check_item_score AS score FROM check_score t
+        LEFT JOIN check_item ci ON t.check_item_id = ci.id
+        LEFT JOIN check_task ct ON ct.id = t.task_id
+        WHERE 1=1 and ct.check_status!=22 and ct.id not in
+        <include refid="taskexclouddeleteUser"/>
+        <if test="start_date!=null and end_date != null">
+            AND ct.start_time &gt;= #{start_date} AND ct.end_time &lt; #{end_date}
+        </if>
+        <if test="dept_id!=null">
+            AND t.checked_dept =#{dept_id}
+        </if>
+        )
+        u LEFT JOIN check_item s ON u.parent_id = s.id GROUP BY checked_person,item_id)a
+         LEFT JOIN check_item ck on a.item_id = ck.id
+    </select>
+
     <select id="selectMList" parameterType="com.xintong.visualinspection.pojo.TaskAndScore"
             resultType="com.xintong.visualinspection.pojo.TaskAndScore">
 

+ 7 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml

@@ -93,6 +93,7 @@
         <if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
         <if test="position_id != null">AND u.positionid = #{position_id}</if>
         <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
+        <if test="checked_location_type != null">AND t.checked_location_type = #{checked_location_type}</if>
         <if test="hasScore == 1">AND
             t.id in (select task_id from check_score)
         </if>
@@ -350,4 +351,10 @@
           and check_status = #{check_status}
         order by update_time desc
     </select>
+
+    <select id="getPeriod_id" parameterType="com.xintong.visualinspection.bean.Task" resultType="Integer">
+       SELECT * FROM check_task_period
+        WHERE
+         DATE_FORMAT(${start_time},"%Y-%d-%m %T") BETWEEN starttime and endtime
+    </select>
 </mapper>

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

@@ -37,5 +37,6 @@ public interface TaskService {
     public void updateInvalidTaskCount(Task task);
     public List<UserClassCount> getUserCount(Task task);
     public List<Task> getTaskListByDept(TaskListByDeptAppeal taskListByDeptAppeal,User user);
+    public void updateTaskZjList();
 
 }

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

@@ -129,7 +129,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		obj.setParent_dept_id(null);
 		obj.setDept_id(null);
 		// 将检索出来的数据放到如map中
-		List<StatisticsBean> list = statisticsDao.selectStatistics(obj);
+		List<StatisticsBean> list = statisticsDao.selectAllStatistics(obj);
 
 		List<StatisticsBean> timesList = statisticsDao.selectCheckedTimes(obj);
 
@@ -213,7 +213,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		lists.sort(new Comparator<StatisticsBo>() {
 			@Override
 			public int compare(StatisticsBo o1, StatisticsBo o2) {
-				return o1.compareTo(o2);
+				return o1.compareNewTo(o2);
 			}
 		});
 		// 道管Map
@@ -310,7 +310,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 
         //更新数据库统计
 
-        threadTaskService.saveUserStatic(reList,obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+      //  threadTaskService.saveUserStatic(reList,obj.getStart_date().getTime(),obj.getEnd_date().getTime());
 
 		return reList;
 	}
@@ -335,14 +335,6 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		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);
 		}
 

+ 42 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
 
 import com.mysql.jdbc.StringUtils;
 import com.xintong.visualinspection.dao.master.LogDao;
+import com.xintong.visualinspection.dao.master.CheckTaskPeriodDao;
 import com.xintong.visualinspection.dao.master.TaskDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.TaskService;
@@ -31,6 +32,10 @@ public class TaskServiceImpl extends BaseService implements TaskService {
     private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TaskServiceImpl.class);
     @Autowired
     private TaskDao taskDao;
+
+	@Autowired
+	private CheckTaskPeriodDao checkTaskPeriodDao;
+
     @Autowired
     private LogDao logDao;
 	@Override
@@ -227,4 +232,41 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 
         return list;
     }
+
+	@Override
+	public void updateTaskZjList() {
+		// TODO Auto-generated method stub
+		Date now =new Date();
+		Task task = new Task();
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		SimpleDateFormat startFormat1 = new SimpleDateFormat("yyyy-MM-dd 07:50:00");
+		SimpleDateFormat endFormat1 = new SimpleDateFormat("yyyy-MM-dd 09:30:00");
+		SimpleDateFormat startFormat2 = new SimpleDateFormat("yyyy-MM-dd 22:50:00");
+		SimpleDateFormat endFormat2 = new SimpleDateFormat("yyyy-MM-dd 23:30:00");
+		CheckTaskPeriod checkTaskPeriod = new CheckTaskPeriod();
+		checkTaskPeriod.setStarttime(now);
+        int per_id = checkTaskPeriodDao.selectbydatetime(checkTaskPeriod).get(0).getId();
+        task.setPeriod_id(per_id);
+        task.setChecked_location_type(1);
+		List<Task> taskList = taskDao.getList(task);
+		try{
+			for(Task t : taskList) {
+				Date start = t.getStart_time();
+				Date end = t.getEnd_time();
+				if(t.getClass_type() == 1){
+					t.setStart_time(sdf.parse(startFormat1.format(start)));
+					t.setEnd_time(sdf.parse(endFormat1.format(end)));
+					taskDao.update(t);
+				}else if(t.getClass_type() == 3){
+					t.setStart_time(sdf.parse(startFormat2.format(start)));
+					t.setEnd_time(sdf.parse(endFormat2.format(end)));
+					taskDao.update(t);
+				}
+
+			}
+		}catch (Exception e){
+			e.printStackTrace();
+		}
+
+	}
 }