MSI\liwei 7 лет назад
Родитель
Сommit
966dbe9e9b

+ 90 - 62
VisualInspection/qzd/js/task/check.js

@@ -1,39 +1,43 @@
+function becomebig(){
+   
+}
+
 function initCheck() {
-    addBreadMenu("/qzd/view/task/check.html", "服务区视频稽查");
-    $('#ex1').slider({ tooltip: 'hide' });
-    $("#ex1").on("slideStop", function(slideEvt) {
-        setVideoProcess(slideEvt.value);
-    });
+    addBreadMenu("/qzd/view/task/check.html", "清障队视频稽查");
+    // $('#ex1').slider({ tooltip: 'hide' });
+    // $("#ex1").on("slideStop", function(slideEvt) {
+    //     setVideoProcess(slideEvt.value);
+    // });
 
 
     //滑动快进
-    $("#ex1").on("change", function(sender) {
-        var width = $("#ex1").siblings(".slider").children(".slider-track").children(".slider-selection").width();
-        var total_width = $("#ex1").siblings(".slider").children(".slider-track").width();
-        var sp_width = $("#ex1_span").width();
+    // $("#ex1").on("change", function(sender) {
+    //     var width = $("#ex1").siblings(".slider").children(".slider-track").children(".slider-selection").width();
+    //     var total_width = $("#ex1").siblings(".slider").children(".slider-track").width();
+    //     var sp_width = $("#ex1_span").width();
 
 
-        var left = ((total_width - width) < (sp_width / 2.0)) ? (total_width - sp_width / 2.0 - 25) : (width - sp_width / 2.0) + 25
-        $("#ex1_span").css("left", ((left > 25 ? left : 25)) + "px")
+    //     var left = ((total_width - width) < (sp_width / 2.0)) ? (total_width - sp_width / 2.0 - 25) : (width - sp_width / 2.0) + 25
+    //     $("#ex1_span").css("left", ((left > 25 ? left : 25)) + "px")
 
-        if ($.checkTask) {
-            var time = moment($.checkTask.start_time);
-            var pos = $("#video_pos").val();
-            if ($("#full_video_pos").length > 0) {
-                pos = $("#full_video_pos").val();
-            }
-            var c_time = time.add(sender.value.newValue, "s");
-            if (/^(\+|-)?\d+($|\.\d+$)/.test(pos)) {
-                if (pos > 0) {
-                    c_time = time.add(Math.abs(pos), "s");
-                } else {
-                    c_time = time.subtract(Math.abs(pos), "s");
-                }
-            }
+    //     if ($.checkTask) {
+    //         var time = moment($.checkTask.start_time);
+    //         var pos = $("#video_pos").val();
+    //         if ($("#full_video_pos").length > 0) {
+    //             pos = $("#full_video_pos").val();
+    //         }
+    //         var c_time = time.add(sender.value.newValue, "s");
+    //         if (/^(\+|-)?\d+($|\.\d+$)/.test(pos)) {
+    //             if (pos > 0) {
+    //                 c_time = time.add(Math.abs(pos), "s");
+    //             } else {
+    //                 c_time = time.subtract(Math.abs(pos), "s");
+    //             }
+    //         }
 
-            $("#ex1_span").html(c_time.format("YYYY-MM-DD HH:mm:ss"))
-        }
-    });
+    //         $("#ex1_span").html(c_time.format("YYYY-MM-DD HH:mm:ss"))
+    //     }
+    // });
 
 
 
@@ -52,6 +56,7 @@ function initCheck() {
 
 
     if ($.checkTask) {
+        console.log($.checkTask);
         getAreaCheckCount();
         initCheckAppealBtns();
 
@@ -67,12 +72,33 @@ function initCheck() {
         //TODO 获取分数
         queryCheckScores();
 
-
-
-        var videoids = $.checkTask.areainfo.video_ids;
-
-        if (videoids != "") {
-            queryVideoList(videoids);
+        var videoids = $.checkTask.videos;
+        var videoPlayer;
+        console.log(videoids);
+        if (1 == 1) {
+            // videojs("example_video_1");
+            videoPlayer=  videojs('example_video_1',{
+                "autoplay" : false,
+                "controls" : true,
+                // "techOrder" : [ "html5", "flash" ],
+                 "width":$("#tabcontent").width(),
+                 "height":$("#tabcontent").height(),
+                "sources" : [ {
+                    src : 'http://yun.it7090.com/video/XHLaunchAd/video01.mp4',
+                    type :"video/mp4"
+                } ]
+
+            },function () {
+                $(".vjs-control-bar").append('<button class="vjs-control " id="danmu_send_opt"><u>按钮1</u></button>')
+            }); 
+            var videohtml ='<video id="example_video_2" class="video-js vjs-default-skin vjs-big-play-centered" controls >'+
+                        '<source src="'+videoids+'" type="video/mp4"/>' +
+                           "</video>";
+            videoPlayer.on('dblclick',function(){
+              
+            });
+            
+            // queryVideoList(videoids);
         } else {
             callFunc("showvideoview", "false");
             layer.msg('该处暂无视屏!', {
@@ -243,23 +269,16 @@ function getAreaCheckCount() {
     });
     var param = {
         "period_id": $.checkTask.period_id,
-        "area_id": $.checkTask.area_id
+        "checked_users": $.checkTask.checked_users
     };
-    post_common_service("/f/task/getall/0/0", param, function(userList) {
-        var param = {
-            "id": $.checkTask.area_id
-        };
-        post_common_service("/f/area/getall", param, function(data) {
-            layer.closeAll('loading');
-            $.checkTask.areainfo = data.areas[0];
-            $("#checked_area").html(data.areas[0].name);
+    post_common_service("/q/task/getall/0/0", param, function(userList) {
+        console.log(userList);
+            $("#checked_area").html($.checkTask.checked_users_name);
             if (userList) {
                 $("#checked_count").html(userList.length);
             } else {
                 $("#checked_count").html(0);
             }
-        });
-
     });
 }
 
@@ -270,19 +289,19 @@ function showCheckDetailCount() {
     scoreDetailLayer = showPopup4Common('本周期已考核任务', null, ['450px', '350px'], '#checked_task_list_div', 'r', '确定');
     var param = {
         "period_id": $.checkTask.period_id,
-        "area_id": $.checkTask.area_id
+        "checked_users": $.checkTask.checked_users
     };
 
     var cols = [
         { width: 40, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
         { width: 80, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
-        { width: 50, text: '考核区域', type: 'href_link', flex: true, colClass: '', field: $.checkTask.areainfo.name },
+        { width: 50, text: '考核对象', type: 'string', flex: true, colClass: '', field: 'checked_users_name'  },
         { width: 80, text: '扣分情况', type: 'string', flex: true, sort: 'down', field: 'score_details' },
         { width: 70, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' }
     ];
     $('#checked_user_task_datatable').mytable({
         'cols': cols,
-        'url': "/f/task/getall/",
+        'url': "/q/task/getall/",
         'param': param,
         'isShoWPager': false
     });
@@ -383,7 +402,7 @@ function queryCheckScores() {
     // }
     $('#score_datatable').mytable({
         'cols': cols,
-        'url': "/f/score/getScoreList/",
+        'url': "/q/score/getScoreList/",
         'param': data
     });
 }
@@ -410,7 +429,7 @@ function showEditCheckScore(id) {
     $("#check_remark_text").tagsInput({ 'defaultText': '添加备注', 'width': '240px' });
     $("#check_remark_text").importTags('');
     $("#check_remark_text").addTag(rowData.remark);
-    getTags("/f/score/getTopRemark", '#score_remark_div', '#check_remark_text', 'remark');
+    getTags("/q/score/getTopRemark", '#score_remark_div', '#check_remark_text', 'remark');
 }
 
 function setFeeUserSelect(div, selectId) {
@@ -450,7 +469,7 @@ function saveScoreEdit() {
     };
     editScoreId = null;
     $("#saveEditBtn").hide();
-    no_return_common_service("/f/score/update", param, function(data) {
+    no_return_common_service("/q/score/update", param, function(data) {
         if (scoreLayer) layer.close(scoreLayer);
         //查询评分情况
         queryCheckScores();
@@ -477,7 +496,7 @@ function saveEdit() {
         };
         editScoreId = null;
         $("#saveEditBtn").hide();
-        no_return_common_service("/f/score/update", param, function(data) {
+        no_return_common_service("/q/score/update", param, function(data) {
             if (scoreLayer) layer.close(scoreLayer);
             //查询评分情况
             queryCheckScores();
@@ -490,7 +509,7 @@ function saveEdit() {
 }
 
 function deleteCheckScore(id) {
-    deleteItem4Common(id, "/f/score/delete/", queryCheckScores, 'r');
+    deleteItem4Common(id, "/q/score/delete/", queryCheckScores, 'r');
 }
 
 function backoutCheckScore(id) {
@@ -504,7 +523,7 @@ function backoutCheckScore(id) {
             "id": id,
             "check_item_score": 0
         };
-        post_common_service("/f/score/backoutScore/", param, function(data) {
+        post_common_service("/q/score/backoutScore/", param, function(data) {
             layer.msg('撤销成功!', {
                 offset: 'r',
                 time: 2000, //20s后自动关闭
@@ -671,7 +690,16 @@ function changePersonContent(data) {
 var scoreLayer;
 
 function showScore() {
-    scoreLayer = showPopup4Common('选择考核项', null, ['400px', '500px'], '#items-div', 'r');
+    scoreLayer = showPopup4Common('选择考核项', function(data){
+        var nodes = check_item_tree.getSelectedNodes()[0];
+        console.log(nodes);
+        var data ={
+            "content":nodes.value,
+            "check_item_score":nodes.score,
+            "checked_person_name":$.checkTask.checkman_name
+        }
+        console.log(data);
+    }, ['400px', '500px'], '#items-div', 'r');
     buildTree();
 }
 
@@ -727,7 +755,7 @@ function getCheckItems() {
             showRemoveBtn: false
         }
     };
-    var param = { "rule_type": 10 };
+    var param = { "rule_type": 6 };
 
     post_common_service('checkRule/getItemListByRuleType', param, function(data) {
         // console.log(data);
@@ -794,7 +822,7 @@ function zTreeOnClick(event, treeId, treeNode) {
         'checked_area': $.checkTask.area_id,
         'checked_dept': $.checkTask.checked_dept
     };
-    no_return_common_service("/f/score/add", param, function(data) {
+    no_return_common_service("/q/score/add", param, function(data) {
         if (scoreLayer) layer.close(scoreLayer);
         clearAllImg();
         //查询评分情况
@@ -812,7 +840,7 @@ function submitCheck() {
         "id": $.checkTask.id,
         "check_status": 4
     }
-    no_return_common_service("/f/task/update/", param, function(data) {
+    no_return_common_service("/q/task/update/", param, function(data) {
         layer.msg("提交成功", {
             offset: 'r',
             time: 2000 //20s后自动关闭
@@ -825,7 +853,7 @@ function submitCheck() {
 function showPre(id) {
     // $('#myModal').modal({name:"dd"});
     //预览提交把任务状态改为待提交
-    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 7 })
+    no_return_common_service('/q/task/update', { "id": $.checkTask.id, "check_status": 7 })
     changePage("/qzd/view/task/taskDetail.html");
 }
 
@@ -847,7 +875,7 @@ function showInvalidView() {
     }, ['400px', '500px'], '#invalid_div', 'r');
 
     $('#apply_reason').tagsInput({ 'defaultText': '添加原因' });
-    getTags("/f/checkApply/getTopReason", "#top_reason_div", '#apply_reason', 'apply_reason');
+    getTags("/q/checkApply/getTopReason", "#top_reason_div", '#apply_reason', 'apply_reason');
 }
 
 
@@ -878,7 +906,7 @@ function submitCheck4AppealResult(appeal_result) {
         "appeal_id": $.checkTask.appeal.id,
         "appeal_result": appeal_result
     }
-    no_return_common_service("/f/task/update/", param, function(data) {
+    no_return_common_service("/q/task/update/", param, function(data) {
         layer.msg("提交成功", {
             offset: 'r',
             time: 2000 //20s后自动关闭
@@ -890,7 +918,7 @@ function submitCheck4AppealResult(appeal_result) {
 function showPre4Appeal(id) {
     // $('#myModal').modal({name:"dd"});
     //预览提交把任务状态改为待提交
-    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 17 })
+    no_return_common_service('/q/task/update', { "id": $.checkTask.id, "check_status": 17 })
     changePage("/qzd/view/task/taskDetail.html");
 }
 

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

@@ -110,6 +110,7 @@ function queryTask() {
     var cols = [
         { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
         { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 80, text: '考核人员', type: 'string', flex: true, sort: 'down', field: 'checked_users_name' },
         { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_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' },

+ 57 - 31
VisualInspection/qzd/view/task/check.html

@@ -8,7 +8,7 @@
                     <label class="col-sm-5">时间:<span id="check_time" class="label" style="vertical-align:baseline"></span></label>
                 </div>
                 <div class="form-group col-sm-5" style="margin-bottom: 0px;">
-                    <label class="col-sm-3">考核区域:</label>
+                    <label class="col-sm-3">考核对象:</label>
                     <div class="col-sm-9" style="bottom:-5px">
                         <label id="checked_area"></label> (次数:
                         <a href="javascript:void(0)" onclick="showCheckDetailCount()"><span class="label label-primary" id="checked_count">-</span></a>)
@@ -31,29 +31,30 @@
 
 
                                 <div id="video_content">
-                                    <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;">
-                                        <p style="padding-top:180px;font-size:20px">加载中...</p>
-                                        <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->
-                                    </div>
+                                        <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;" ondblclick="becomebig()">
+                                                <video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls >
+                                                        <!-- <source src="http://yun.it7090.com/video/XHLaunchAd/video01.mp4" type='video/mp4' /> -->
+                                                       </video> 
+                                            </div>
                                     <div class="row" class="col-md-12" style="padding:5px 10px 25px 10px;text-align:center;margin:0px">
-                                        <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0" />
-                                        <br/>
-                                        <span id="ex1_span" style="position: absolute;left: 25px;">2017-06-12 23:00:00</span>
+                                        <!-- <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0" />
+                                        <br/> -->
+                                        <!-- <span id="ex1_span" style="position: absolute;left: 25px;">2017-06-12 23:00:00</span> -->
                                     </div>
                                     <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
-                                        <div class="col-md-4 " style="padding-left:0">
+                                        <!-- <div class="col-md-4 " style="padding-left:0">
                                             <div class="input-group" style="padding-left:0">
                                                 <input type="text" id="video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">
                                                 <span class="input-group-btn">
                                                 <button class="btn btn-default" style="height:42px" onclick="setVideoPos()" type="button">校正</button>
                                              </span>
                                             </div>
-                                        </div>
+                                        </div> -->
                                         <div class="btn-group1" style="float:right;">
-                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
+                                            <!-- <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
                                             <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
                                             <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
-                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button> -->
                                             <button type="button" class="btn btn-info1 " style="width:41px;height:41px" id="video_btn_start" onclick="doAction('video_start')"><img id="video_btn_start_img" style="width:30px" src="/images/video.png"></img></button>
                                             <button type="button" class="btn btn-info1 hidden" style="width:41px;height:41px" id="video_btn_stop" onclick="doAction('video_stop')"><i class="icon icon-stop icon-2x"></i></button>
                                             <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
@@ -85,7 +86,7 @@
                         <button id="saveEditBtn" class="btn btn-warning" type="button" onclick="saveEdit()" style="margin-right:10px;display:none;">保存修改</button>
                         <form id="form1" runat="server" method="post" enctype="multipart/form-data" style="float:left;margin-right:10px;">
                             <div>
-                                <button id="box" class="btn btn-info2" type="button">上传</button>
+                                <button id="box" class="btn btn-info2" type="button" onclick="boxclick()">上传</button>
                                 <div style="display:none;">
                                     <input type="file" name="_f" id="_f" />
                                 </div>
@@ -186,28 +187,36 @@
 
 <script>
     $(document).ready(function() {
-        $("#video_btn_start").mouseover(function() {
-            $("#video_btn_start_img").attr("src", "/images/movie.png");
-        });
-        $("#video_btn_start").mouseout(function() {
-            $("#video_btn_start_img").attr("src", "/images/video.png");
-        });
-        if ($.checkTask.checked_location_type == 1) {
-            $("li.tab_lane").hide();
-            $("li.tab_not_lane").show();
-            $("li.tab_not_lane:first").addClass("active");
-        } else {
-            $("li.tab_lane").show();
-            $("li.tab_not_lane").hide();
-            $("li.tab_lane:first").addClass("active");
-        }
+        // $("#video_btn_start").mouseover(function() {
+        //     $("#video_btn_start_img").attr("src", "/images/movie.png");
+        // });
+        // $("#video_btn_start").mouseout(function() {
+        //     $("#video_btn_start_img").attr("src", "/images/video.png");
+        // });
+        // if ($.checkTask.checked_location_type == 1) {
+        //     $("li.tab_lane").hide();
+        //     $("li.tab_not_lane").show();
+        //     $("li.tab_not_lane:first").addClass("active");
+        // } else {
+        //     $("li.tab_lane").show();
+        //     $("li.tab_not_lane").hide();
+        //     $("li.tab_lane:first").addClass("active");
+        // }
         initCheck();
     });
+    
+    $(".vjs-control-bar").change(function(){
+        alert(1);
+    });
 
+    function boxclick(){
+        $("#_f").click();
+    }
     //文件上传
-    $("#box").click(function() {
-        return $("#_f").click();
-    });
+    // $("#box").click(function() {
+    //     alert(111);
+    //      $("#_f").click();
+    // });
 
     $("#_f").change(function() {
         UpladFile();
@@ -227,4 +236,21 @@
             console.log(error)
         }, "task");
     }
+
+      var player = videojs('example-video', {"poster": "","controls": "true"}, function(){this.on('play',function(){
+            console.log('正在播放');
+          }); 
+
+         //暂停--播放完毕后也会暂停
+          this.on('pause',function(){
+                       console.log("暂停中")
+                  }); 
+
+          // 结束
+          this.on('ended', function() {
+            console.log('结束');
+          })
+        
+    });
+
 </script>

+ 2 - 0
VisualInspection/qzd/view/task/taskDetail.html

@@ -109,6 +109,8 @@
     $(document).ready(function() {
         addBreadMenu("/qzd/view/task/taskDetail.html", "稽查详情");
         checkAuth();
+        console.log(11111111);
+        console.log($.checkTask);
         $("#name").html($.checkTask.name);
         $("#checkman").html($.checkTask.checkman_name);
         $("#checktime").html($.checkTask.start_time);

+ 144 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/ScoreController_Q.java

@@ -0,0 +1,144 @@
+package com.xintong.visualinspection.controller.gettway;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.FwqScore;
+import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.controller.BaseController;
+import com.xintong.visualinspection.service.ScoreService_Q;
+import com.xintong.visualinspection.util.CodeUtil;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:TestController
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/q/score")
+public class ScoreController_Q extends BaseController {
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private ScoreService_Q scoreService;
+
+
+
+
+    /**
+     * 添加扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody FwqScore score){
+        scoreService.insert(score);
+        return super.returnSuccessResult("添加成功");
+    }
+
+    /**
+     * 修改扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/update")
+    public String update(HttpServletRequest request,@Valid @RequestBody FwqScore score){
+        User user = getCurrentUser(request);
+        score.setUpdate_user(new Long(user.getId()));
+        scoreService.update(score);
+        return super.returnSuccessResult("修改成功");
+    }
+
+    /**
+     * 删除扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody FwqScore score){
+        scoreService.delete(score.getId());
+        return super.returnSuccessResult("删除成功");
+    }
+
+    /**
+     * 通过任务id获取考核扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getByTaskId")
+    public String getByTaskId(@RequestBody FwqScore score){
+        if(score.getTask_id()==null){
+            throw new BusinessException(20002);
+        }
+        List<FwqScore> scorelist = scoreService.getScoreListByTaskId(score.getTask_id());
+        return super.returnSuccessResult(scorelist);
+    }
+
+    /**
+     * 通过多条件获取考核扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getScoreList/{page}/{size}")
+    public String getScoreList(@PathVariable Integer page,@PathVariable Integer size, @RequestBody FwqScore score){
+        List<FwqScore> scorelist = scoreService.getScoreList(score);
+        return super.returnSuccessPageResult(scorelist);
+    }
+
+    /**
+     * 获取备注排名前10
+     * @param checkItem
+     * @return
+     */
+    @RequestMapping(value = "/getTopRemark")
+    public String getTopRemark(){
+        Map<String,Object> param = new HashMap<String,Object>();
+        // 获取原因显示条数
+        int showNum = 10;
+        Constant t =  CodeUtil.getCodeByFlagAndValue("top_show_num", "1");
+        if(t!=null) showNum = Integer.parseInt(t.getCode_name());
+        param.put("num", showNum);
+        List<FwqScore> scoreList =  scoreService.getTopRemarkList(param);
+        return super.returnSuccessResult(scoreList);
+    }
+
+
+
+    /**
+     * 撤销扣分
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/backoutScore")
+    public String backoutScore(HttpServletRequest request,@Valid @RequestBody FwqScore score){
+        if(score.getId()==null){
+            throw new BusinessException(20002);
+        }
+        User user = getCurrentUser(request);
+        score.setUpdate_user(new Long(user.getId()));
+        scoreService.backoutScore(score);
+        return super.returnSuccessResult("撤销成功");
+    }
+}

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

@@ -47,6 +47,7 @@ public class QzdCheckTask implements Serializable {
     private Integer invalid_from;
 
     private String checked_users;
+    private String checked_users_name;
 
     private Long update_user;
 
@@ -64,4 +65,8 @@ public class QzdCheckTask implements Serializable {
     private String appeal_result_name;
     //申诉id
     private Long appeal_id;
+    //清障记录视频
+    private String videos;
+    //清障记录图片
+    private String pics;
 }

+ 31 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/ScoreService_Q.java

@@ -0,0 +1,31 @@
+package com.xintong.visualinspection.service;
+
+import com.xintong.visualinspection.bean.FwqScore;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ *
+ * ConstantService
+ *
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ *
+ * @version 1.0.0
+ *
+ */
+public interface ScoreService_Q {
+    public List<FwqScore> getAll();
+    public FwqScore getOne(Long id);
+    public List<FwqScore> getScoreList(FwqScore score);
+    public List<FwqScore> getScoreListByTaskId(Long task_id);
+    public void insert(FwqScore score);
+    public void update(FwqScore score);
+    public void updateByTaskIdAndPerson(FwqScore score);
+    public void delete(Long id);
+    public List<FwqScore> getTopRemarkList(Map<String, Object> param);
+    public void backoutScore(FwqScore score);
+}

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

@@ -24,13 +24,13 @@
     </select>
 
     <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
-        SELECT *,(select name from area_info where id = checked_area) as checked_area_name
+        SELECT *
         FROM check_score
         WHERE id = #{id}
     </select>
     
     <select id="getScoreList" parameterType="com.xintong.visualinspection.bean.FwqScore" resultMap="BaseResultMap" >
-        SELECT *,(select name from area_info where id = checked_area) as checked_area_name
+        SELECT *
         FROM check_score
         WHERE 1=1
         	 <if test="task_id != null">AND task_id = #{task_id}</if>

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

@@ -23,19 +23,28 @@
     </insert>
 
 
-    <select id="getone" parameterType="com.xintong.visualinspection.bean.FwqCheckTask" resultType="com.xintong.visualinspection.bean.QzdCheckTask">
+    <select id="getone" parameterType="com.xintong.visualinspection.bean.QzdCheckTask" resultType="com.xintong.visualinspection.bean.QzdCheckTask">
         select *,CONCAT(substr(start_time,1,16),'-',substr(end_time,12,5)) as check_period from check_task where 1=1
         <if test="id != null">AND id = #{id}</if>
         <if test="record_id != null">AND record_id = #{record_id}</if>
         ORDER BY start_time DESC
     </select>
 
-    <select id="getall" parameterType="com.xintong.visualinspection.bean.FwqCheckTask" resultType="com.xintong.visualinspection.bean.QzdCheckTask">
-      select  * from  check_task
+    <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,r.videos as videos,r.pics as pics from  check_task t left join  record_info r on r.id = t.record_id
       where 1=1
-        <if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
-        <if test="start_time != null and end_time != null">AND start_time >= #{start_time} <![CDATA[ AND end_time < #{end_time}]]> </if>
-        ORDER BY start_time DESC
+        <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>
+        <choose>
+            <when test="check_status_end != null and check_status != null">
+                AND check_status &gt;= #{check_status} AND t.check_status &lt;= #{check_status_end}
+            </when>
+            <otherwise>
+                <if test="check_status != null"> AND t.check_status = #{check_status}</if>
+            </otherwise>
+        </choose>
+        <if test="checked_users != null">AND t.checked_users like #{checked_users}</if>
+        ORDER BY t.start_time DESC
     </select>
 
     <update id="updateStatus" parameterType="com.xintong.visualinspection.bean.QzdCheckTask" >

+ 2 - 2
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/ScoreServiceImpl.java

@@ -4,7 +4,7 @@ import com.alibaba.dubbo.config.annotation.Reference;
 import com.xintong.visualinspection.bean.FwqScore;
 import com.xintong.visualinspection.bean.Item;
 import com.xintong.visualinspection.service.ItemService;
-import com.xintong.visualinspection.service.ScoreService_F;
+import com.xintong.visualinspection.service.ScoreService_Q;
 import com.xintong.visualinspection.visuallnspection_qzd.bean.Log;
 import com.xintong.visualinspection.visuallnspection_qzd.dao.LogDao;
 import com.xintong.visualinspection.visuallnspection_qzd.dao.ScoreDao;
@@ -27,7 +27,7 @@ import java.util.Map;
         registry = "${dubbo.registry.id}"
 )
 @Service
-public class ScoreServiceImpl  implements ScoreService_F {
+public class ScoreServiceImpl  implements ScoreService_Q {
 
     private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ScoreServiceImpl.class);
 

+ 69 - 2
Visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/TaskService_QImpl.java

@@ -45,7 +45,25 @@ public  class TaskService_QImpl implements TaskService_Q {
         if(qzdCheckTask.getCheck_status_arr()!=null){
             qzdCheckTask.setCheck_status(null);
         }
-        List<QzdCheckTask> QzdCheckTaskList = qzdTaskDao.getall(qzdCheckTask == null ? new QzdCheckTask() : qzdCheckTask);
+        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.getall(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.getall(qzdCheckTask == null ? new QzdCheckTask() : qzdCheckTask);;
+        }
         Map<Long, Organ> deptMap = commonService.getDeptMap();
         Map<Long, User> userMap = commonService.getUserMap();
         Map<String, Constant> codeMap = commonService.getCodeMap();
@@ -72,6 +90,27 @@ public  class TaskService_QImpl implements TaskService_Q {
             if(q.getAppeal_result()!=null){
                 q.setAppeal_result_name(codeMap.get("appeal_result" + "_" + q.getAppeal_result() + "").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 = "";
+                    // System.out.printf("=========================================", userMap.get("2732"));
+                    try {
+                        username = userMap.get(id).getTruename();
+                    }catch (Exception e){
+                        logger.error(e.getMessage());
+                    }
+                    names  = names + username;
+                    if(i<usersdata.length-1){
+                        names =  names + ",";
+                    }
+                }
+               q.setChecked_users_name(names);
+            }
         }
 
         if (!(page.equals(0) && size.equals(0))) {
@@ -82,6 +121,10 @@ public  class TaskService_QImpl implements TaskService_Q {
 
     @Override
     public void addTask(QzdCheckTask qzdCheckTask) {
+        CheckTaskPeriod p = commonService.getCheckTaskPeriod(qzdCheckTask.getStart_time().getTime(), qzdCheckTask.getEnd_time().getTime());
+        if (p != null) {
+            qzdCheckTask.setPeriod_id(p.getId());
+        }
         qzdTaskDao.addtask(qzdCheckTask);
         TaskStatus taskStatus = new TaskStatus();
         taskStatus.setCheck_status(qzdCheckTask.getCheck_status());
@@ -116,7 +159,31 @@ public  class TaskService_QImpl implements TaskService_Q {
 
     @Override
     public QzdCheckTask getTask(QzdCheckTask qzdCheckTask) {
-        return qzdTaskDao.getone(qzdCheckTask);
+        QzdCheckTask q = new QzdCheckTask();
+        q = qzdTaskDao.getone(qzdCheckTask);
+        Map<Long, User> userMap = commonService.getUserMap();
+        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 = "";
+                // System.out.printf("=========================================", userMap.get("2732"));
+                try {
+                    username = userMap.get(id).getTruename();
+                }catch (Exception e){
+                    logger.error(e.getMessage());
+                }
+                names  = names + username;
+                if(i<usersdata.length-1){
+                    names =  names + ",";
+                }
+            }
+            q.setChecked_users_name(names);
+        }
+        return q;
     }
 
     @Override