minitiger %!s(int64=8) %!d(string=hai) anos
pai
achega
4b9748c3f7
Modificáronse 24 ficheiros con 257 adicións e 103 borrados
  1. 30 1
      VisualInspection/css/main.css
  2. 1 1
      VisualInspection/css/statistics/personal_data_statistics.css
  3. 1 1
      VisualInspection/css/statistics/road_manage_statistics.css
  4. 1 1
      VisualInspection/css/statistics/toll_station_statistics.css
  5. 1 1
      VisualInspection/css/statistics/total_company_statistics.css
  6. 5 5
      VisualInspection/js/appeal_management/appeal_checked.js
  7. 5 5
      VisualInspection/js/appeal_management/appeal_submited.js
  8. 2 2
      VisualInspection/js/config.js
  9. 2 2
      VisualInspection/js/lib/mytable.js
  10. 97 52
      VisualInspection/js/mytask/check.js
  11. 7 22
      VisualInspection/view/mytask/check.html
  12. 3 3
      VisualInspection/view/statistics/personal_data_statistics.html
  13. 1 1
      VisualInspection/view/term_management/charge_stuff_schedule.html
  14. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Log.java
  15. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Score.java
  16. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Task.java
  17. 23 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java
  18. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/ScoreDao.java
  19. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckApplylMapper.xml
  20. 2 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/LogMapper.xml
  21. 18 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/ScoreMapper.xml
  22. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/ScoreService.java
  23. 45 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/ScoreServiceImpl.java
  24. 3 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

+ 30 - 1
VisualInspection/css/main.css

@@ -24,11 +24,14 @@ footer p {
 
 .panel-heading {
     /* border-bottom: 1px; */
+    padding: 4px 15px;
 }
 #main_content_title{
     border-top: 3px solid #3c8dbc;
 }
-
+.form-group {
+    margin-bottom: 5px;
+}
 .navbar-header {
     /* box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); */
 }
@@ -71,6 +74,14 @@ footer p {
     overflow: auto;
     background: #ecf0f5;
 }
+a:hover{
+    text-decoration: none;
+}
+
+#breadcrumb_menu a{
+    font-weight: bold;
+    color:#03b8cf;
+}
 .btn-info1{
     padding: 5px 5px;
     color:#03b8cf;
@@ -179,4 +190,22 @@ footer p {
 }
 .calendar-views{
     background-color: #fff;
+}
+.img-thumbnail {
+    padding: 0px;
+    border: none;
+}
+.nav-secondary>li.active>a, .nav-secondary>li.active>a:focus, .nav-secondary>li.active>a:hover {
+    color: #3280fc;
+    border-top-color: #3280fc;
+    border-top: 2px solid #3280fc;
+    border-bottom: none;
+    font-weight: bold;
+}
+.nav-secondary>li>a {
+    /* border-top: 2px solid #e5e5e5; */
+    border-bottom: none;
+}
+.panel{
+    border: none;
 }

+ 1 - 1
VisualInspection/css/statistics/personal_data_statistics.css

@@ -303,7 +303,7 @@
 .title-div{
     background-color: #529AC5;
     text-align: center;
-    padding: 15px;
+    padding: 5px;
 }
 .title-div span{
     color:#fff;

+ 1 - 1
VisualInspection/css/statistics/road_manage_statistics.css

@@ -244,7 +244,7 @@
 .title-div{
     background-color: #529AC5;
     text-align: center;
-    padding: 10px;
+    padding: 5px;
 }
 .title-div span{
     color:#fff;

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

@@ -277,7 +277,7 @@
 .title-div{
     background-color: #529AC5;
     text-align: center;
-    padding: 10px;
+    padding: 5px;
 }
 .title-div span{
     color:#fff;

+ 1 - 1
VisualInspection/css/statistics/total_company_statistics.css

@@ -229,7 +229,7 @@
 .title-div{
     background-color: #529AC5;
     text-align: center;
-    padding: 10px;
+    padding: 5px;
 }
 .title-div span{
     color:#fff;

+ 5 - 5
VisualInspection/js/appeal_management/appeal_checked.js

@@ -20,16 +20,16 @@ function queryCheckedAppealTask(){
         hide = true;
     }
     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: 30, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+                {width: 100, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
                 {width: 80, text: '申诉人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
-                {width: 160, text: '申诉部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
+                {width: 80, text: '申诉部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
                 {width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide,field: 'checkman_name'},
                 {width: 80, text: '复核人员', type: 'string', flex: true, hide: hide,field: 'recheckman_name'},
-                {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
+                {width: 120, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
                 {width: 80, text: '申诉结果', type: 'string', flex: true,field:'appeal_result_name'},
                 // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
-                {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
+                {width: 120, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
                         {func:'showTaskDetail',text:'详情',icon_class:'icon-tasks'}
                     ]

+ 5 - 5
VisualInspection/js/appeal_management/appeal_submited.js

@@ -19,14 +19,14 @@ function querySubmitedAppealTask(){
         hide = true;
     }
     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: 30, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+                {width: 100, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
                 {width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
-                {width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
+                {width: 80, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
                 {width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide,field: 'checkman_name'},
-                {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
+                {width: 120, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
                 // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
-                {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
+                {width: 120, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
                         {func:'showTaskDetail',text:'详情',icon_class:'icon-tasks'}
                     ]

+ 2 - 2
VisualInspection/js/config.js

@@ -18,8 +18,8 @@ function getserveraddr() {
     } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
         return "http://server_release_yanhai.jsxt.jsjtyxt.com/";
     } else if (base_ui_url.indexOf("localhost") != -1) {
-        return "http://server_release_yanhai.jsxt.jsjtyxt.com/"
-        // return "http://localhost:8089/"
+        // return "http://server_yanhai.jsxt.jsjtyxt.com/"
+        return "http://localhost:8089/"
     } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
         return "http://192.168.8.236:8089/"
     } else {

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

@@ -197,7 +197,7 @@ String.prototype.replaceAll = function(s1, s2) {
                                 dArr.push(timeStamp2String(obj[cols[i].field], cols[i].date_type));
                             }
 
-                        } else if (obj[cols[i].field]) {
+                        } else if (obj[cols[i].field] || obj[cols[i].field]==0) {
                             if (cols[i].custom) {
                                 dArr.push(obj[cols[i].field] + cols[i].custom);
                             } else {
@@ -207,7 +207,7 @@ String.prototype.replaceAll = function(s1, s2) {
                             if (cols[i].nullvalue != undefined) {
                                 dArr.push(cols[i].nullvalue);
                             } else {
-                                dArr.push('');
+                                dArr.push('-');
                             }
                         }
                     }

+ 97 - 52
VisualInspection/js/mytask/check.js

@@ -62,13 +62,14 @@ function initCheck() {
     if ($.checkTask) {
         getUserCheckCount();
         initCheckAppealBtns();
-        setFeSelect("#fsList", $.checkTask.checked_dept);
-
+        // setFeSelect("#fsList", $.checkTask.checked_dept);
+        $("#taskName").html($.checkTask.name);
         $("#ex1_span").html($.checkTask.start_time)
         $("#full_ex1_span").html($.checkTask.start_time)
 
         $("#lane").val($.checkTask.checked_location);
-        $("#check_time").val($.checkTask.check_period);
+        $("#check_time").html($.checkTask.check_period);
+        $("#monitor").html($.checkTask.monitor_user_name);
         // setLaneSelect("#lane", $.checkTask.checked_location);
         get_common_service('user/getUserById/' + $.checkTask.checked_person, null, function(data) {
                 changePersonContent(data);
@@ -337,7 +338,7 @@ function showAppealLayer() {
 // 使用data参数更新数据:
 function queryCheckScores() {
     //$('#score_datatable').score_datatable("");
-    console.log("任务id:" + $.checkTask.id);
+    // console.log("任务id:" + $.checkTask.id);
     var data = {
             "task_id": $.checkTask.id
         }
@@ -347,22 +348,34 @@ function queryCheckScores() {
         { width: 100, text: '评分记录', type: 'string', flex: true, sort: 'down', field: 'content' },
         { width: 40, text: '分数', type: 'string', flex: true, colClass: '', field: 'check_item_score' },
         { width: 100, text: '备注', type: 'string', flex: true, colClass: '', field: 'remark' },
-        { width: 55, text: '考核人', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
+        { width: 50, text: '考核人', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
         // {width: 80, text: '图片', type: 'imagedd', flex: true, colClass: '',field: 'pics'},
-        {
-            width: 150,
-            text: '操作',
-            type: 'string',
-            flex: true,
-            field: 'id',
-            oper: [
-                { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
-                { func: 'showEditPic', text: '图片', icon_class: 'icon-edit' },
-                { func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' }
-            ]
-        }
+        // {
+        //     width: 150,
+        //     text: '操作',
+        //     type: 'string',
+        //     flex: true,
+        //     field: 'id',
+        //     oper: [
+        //         { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
+        //         { func: 'showEditPic', text: '图片', icon_class: 'icon-edit' },
+        //         { func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' }
+        //     ]
+        // }
     ];
 
+    var colFunc = {width: 120, text: '操作', type: 'string', flex: true, field: 'id'};   
+    colFunc.oper = [
+                        { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
+                        { func: 'showEditPic', text: '图片', icon_class: 'icon-edit' }
+                    ];
+    if ($.checkTask.appeal){
+        colFunc.oper.push({ func: 'backoutCheckScore', text: '撤销', icon_class: 'icon-reply' });
+    }else{
+        colFunc.oper.push({ func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' });
+    }
+    cols.push(colFunc);
+
     // var pager = {
     //     page_size:10
     // }
@@ -476,7 +489,28 @@ function saveEdit() {
 function deleteCheckScore(id) {
     deleteItem4Common(id, "/score/delete/", queryCheckScores, 'r');
 }
+function backoutCheckScore(id) {
+    layer.confirm('是否要撤销扣分?', {
+        btn: ['是', '否'], //按钮
+        shadeClose: true,
+        shade: 0, //不显示遮罩
+        offset: 'r'
+    }, function() {
+        var param = {
+            "id": id,
+            "check_item_score": 0
+        };
+        post_common_service("/score/backoutScore/", param, function(data) {
+            layer.msg('撤销成功!', {
+                offset: 'r',
+                time: 2000, //20s后自动关闭
+            });
+            queryCheckScores();
+        });
+    }, function() {
 
+    });
+}
 function setVideoList(videos) {
     var videoArr;
     if (videos) {
@@ -599,42 +633,53 @@ function showChangeUser() {
 }
 
 function changePerson(id) {
-    var flag = true;
-    var param = {
-        "id": $.checkTask.id,
-        "checked_person": id,
-        "class_type": $.checkTask.class_type
-    };
-    post_common_service("/task/getUserCount/", param, function(data) {
-        if (data && data.length >= 2) {
-            layer.msg("本周期稽查次数已满,不能再被稽查!", {
-                time: 2000, //20s后自动关闭
-                offset: 'r'
-            });
-        } else {
-            // $('#checked_person').html(id);
-            var param1 = {
-                "id": $.checkTask.id,
-                "checked_person": id,
-            }
-            post_common_service("task/update/", param1, function(task_data) {
-                checkHasScore(id, $.checkTask.checked_person);
-                //重置当前任务
-                $.checkTask = task_data;
-                //获取用户信息
-                get_common_service('user/getUserById/' + id, null, function(data) {
-                        changePersonContent(data);
+    layer.confirm('是否要更改考核人?', {
+        btn: ['是', '否'], //按钮
+        shadeClose: true,
+        shade: 0, //不显示遮罩
+        offset: 'r'
+    }, function(index) {
+        layer.close(index);
+        var flag = true;
+        var param = {
+            "id": $.checkTask.id,
+            "checked_person": id,
+            "class_type": $.checkTask.class_type
+        };
+        post_common_service("/task/getUserCount/", param, function(data) {
+            if (data && data.length >= 2) {
+                layer.msg("本周期稽查次数已满,不能再被稽查!", {
+                    time: 2000, //20s后自动关闭
+                    offset: 'r'
+                });
+            } else {
+                // $('#checked_person').html(id);
+                var param1 = {
+                    "id": $.checkTask.id,
+                    "checked_person": id,
+                }
+                post_common_service("task/update/", param1, function(task_data) {
+                    checkHasScore(id, $.checkTask.checked_person);
+                    //重置当前任务
+                    $.checkTask = task_data;
+                    //获取用户信息
+                    get_common_service('user/getUserById/' + id, null, function(data) {
+                            changePersonContent(data);
+                        })
+                        //更新用户次数表
+                    no_return_common_service('task/updateUserCount/', param, function(data) {
+                        // changePersonContent(data);
                     })
-                    //更新用户次数表
-                no_return_common_service('task/updateUserCount/', param, function(data) {
-                    // changePersonContent(data);
-                })
-                layer.close(changePersonLayer);
-            }, function(error) {
-                // alert(error);
-            });
-        }
+                    layer.close(changePersonLayer);
+                }, function(error) {
+                    // alert(error);
+                });
+            }
+        });
+    }, function() {
+
     });
+    
 }
 
 function checkHasScore(id, old_person) {
@@ -689,7 +734,7 @@ function resetUserImgInfo() {
     var str = '<a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle">' +
         '<img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>' +
         '<label id="checked_person"></label>' +
-        '(次数:<a href="javascript:void(0)" onclick="showCheckDetailCount()"><label id="checked_count"></label></a>)';
+        '(次数:<a href="javascript:void(0)" onclick="showCheckDetailCount()"><span class="label label-primary" id="checked_count">Primary</span></a>)';
     $("#user_img_container").html(str);
 }
 

+ 7 - 22
VisualInspection/view/mytask/check.html

@@ -3,28 +3,13 @@
     <div class="row">
         <form class="form-horizontal">
             <div class="form-group" style="margin-bottom: 5px;">
-                <div class="form-group col-sm-3" style="margin-bottom: 0px;">
-                    <label for="exampleInputAccount1" class="col-sm-3">收费站</label>
-                    <div class="col-sm-9">
-                        <select class="form-control col-sm-7" id="fsList" disabled="disabled">
-                        </select>
-                    </div>
-                </div>
-                <div class="form-group col-sm-1" style="margin-bottom: 0px;">
-                    <div class="col-sm-12">
-                        <!--<select class="form-control" id="lane" disabled="disabled"></select>-->
-                        <input type="text" class="form-control" id="lane" disabled="disabled" />
-                    </div>
-                </div>
-                <div class="form-group col-sm-3" style="margin-bottom: 0px;">
-                    <label for="exampleInputAccount1" class="col-sm-3">时间</label>
-                    <div class="col-sm-9">
-                        <!--<select class="form-control" id="lane" disabled="disabled"></select>-->
-                        <input type="text" class="form-control" id="check_time" disabled="disabled" />
-                    </div>
+                <div class="form-group col-sm-6" style="margin-bottom: 0px;">
+                    <label class="col-sm-4">名称:<span id="taskName" class="label" style="vertical-align:baseline"></span></label>
+                    <label class="col-sm-5">时间:<span id="check_time" class="label" style="vertical-align:baseline"></span></label>
+                    <label class="col-sm-3">班长:<span id="monitor" class="label" style="vertical-align:baseline"></span></label>
                 </div>
-                <div class="form-group col-sm-4" style="margin-bottom: 0px;">
-                    <label class="col-sm-3">考核人员</label>
+                <div class="form-group col-sm-5" style="margin-bottom: 0px;">
+                    <label class="col-sm-3">考核人员:</label>
                     <div class="col-sm-9" id="user_img_container">
                         <!-- 使用图片 -->
                         <a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle"><img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>
@@ -47,7 +32,7 @@
                     <div class="col-md-12">
                         <div class="panel" data-id="1">
 
-                            <div class="panel-body" style="padding:5px;">
+                            <div class="panel-body" style="padding:0 0 5px 0">
                                 <ul class="nav nav-secondary">
                                     <li class="tab_lane" class="active"><a data-tab href="#tabContent1" bbb="0">收费亭</a></li>
                                     <li class="tab_lane"><a data-tab href="#tabContent2" bbb="1">车道</a></li>

+ 3 - 3
VisualInspection/view/statistics/personal_data_statistics.html

@@ -11,16 +11,16 @@
             <!--<div class="name1"><span  for="exampleInputAccount1">请选择收费站:</span></div>-->
             <div class="div-select col-sm-2"><select class="form-control" id="select-dept"></select></button>
             </div>
-            <div class="div-select col-sm-1"><select class="form-control" id="select-personal"></select></button>
+            <div class="div-select col-sm-2"><select class="form-control" id="select-personal"></select></button>
             </div>
-            <div class="col-sm-3">
+            <div class="col-sm-4">
                 <div class="div-start col-sm-5"><input class="form-control" placeholder="请选择考核开始时间"></input>
                 </div>
                 <div class="div-to col-sm-1"><label for="exampleInputAccount1">-</label></div>
                 <div class="div-end col-sm-5"><input class="form-control" placeholder="请选择考核结束时间"></input>
                 </div>
             </div>
-            <div class="div-select col-sm-2">
+            <div class="div-select col-sm-1">
                 <select class="form-control score-select" id="score_select">
                     <option value="2">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
                 </select>

+ 1 - 1
VisualInspection/view/term_management/charge_stuff_schedule.html

@@ -168,7 +168,7 @@
     }
     
     .content .events div:first-child {
-        background-color: chocolate !important;
+        background-color: #ea644a !important;
     }
     
     .select-self {

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

@@ -18,4 +18,6 @@ public class Log {
     private Long dept_id;
     // 任务id
     private Long task_id;
+    //扣分id
+    private Long score_id;
 }

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

@@ -55,4 +55,6 @@ public class Score {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
     private Date end_time;
+    
+    private Long update_user;
 }

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

@@ -98,4 +98,6 @@ public class Task{
     private String score_details;
     
     private Long monitor_user_id;
+    
+    private String monitor_user_name;
 }

+ 23 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java

@@ -4,6 +4,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +17,7 @@ import com.xintong.system.err.BusinessException;
 import com.xintong.visualinspection.bean.CheckApply;
 import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Score;
+import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.ScoreService;
 import com.xintong.visualinspection.util.CodeUtil;
 
@@ -52,7 +54,9 @@ public class ScoreController extends BaseController {
      * @since  1.0.0
      */
     @RequestMapping(value = "/update")
-    public String update(@Valid @RequestBody Score score){
+    public String update(HttpServletRequest request,@Valid @RequestBody Score score){
+    	User user = getCurrentUser(request);
+    	score.setUpdate_user(new Long(user.getId()));
     	scoreService.update(score);
     	return super.returnSuccessResult("修改成功");
     }
@@ -134,4 +138,22 @@ public class ScoreController extends BaseController {
     	scoreService.updateByTaskIdAndPerson(score);
     	return super.returnSuccessResult("修改成功");
     }
+    
+    /**
+     * 撤销扣分
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/backoutScore")
+    public String backoutScore(HttpServletRequest request,@Valid @RequestBody Score 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("撤销成功");
+    }
 }

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

@@ -22,4 +22,6 @@ public interface ScoreDao  {
     public void updateByTaskIdAndPerson(Score score);
     public void delete(Long id);
     public List<Score> getTopRemarkList(Map<String,Object> param);
+    public void updateFormerScore(Score score);
+    public void updateNowScore(Score score);
 }

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckApplylMapper.xml

@@ -84,6 +84,7 @@
     <select id="getTopReasonList" parameterType="map" resultMap="BaseResultMap">
     	SELECT count(*) as count,apply_reason
 		FROM check_apply
+		WHERE apply_reason!=''
 		GROUP BY apply_reason
 		ORDER BY count desc
 		LIMIT 0,#{num}

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

@@ -5,9 +5,9 @@
   <insert id="insert" parameterType="com.xintong.visualinspection.bean.Log" >
        INSERT INTO
        sys_log
-       (content,update_user,dept_id,task_id)
+       (content,update_user,dept_id,task_id,score_id)
        VALUES
-       (#{content},#{update_user},#{dept_id},#{task_id})
+       (#{content},#{update_user},#{dept_id},#{task_id},#{score_id})
    </insert>
     
 </mapper>

+ 18 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/ScoreMapper.xml

@@ -90,9 +90,26 @@
     <select id="getTopRemarkList" parameterType="map" resultMap="BaseResultMap">
     	SELECT count(*) as count,remark
 		FROM check_score
-		WHERE remark is not null
+		WHERE remark !=''
 		GROUP BY remark
 		ORDER BY count desc
 		LIMIT 0,#{num}
     </select>
+    
+    <update id="updateFormerScore" parameterType="com.xintong.visualinspection.bean.Score" >
+        UPDATE
+        	check_score
+        SET
+        	former_score=check_item_score
+        WHERE
+        id = #{id}
+    </update>
+    <update id="updateNowScore" parameterType="com.xintong.visualinspection.bean.Score" >
+        UPDATE
+        	check_score
+        SET
+        	check_item_score=#{check_item_score}
+        WHERE
+        id = #{id}
+    </update>
 </mapper>

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

@@ -28,4 +28,5 @@ public interface ScoreService {
     public void updateByTaskIdAndPerson(Score score);
     public void delete(Long id);
     public List<Score> getTopRemarkList(Map<String,Object> param);
+    public void backoutScore(Score score);
 }

+ 45 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/ScoreServiceImpl.java

@@ -8,7 +8,9 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.xintong.visualinspection.bean.Log;
 import com.xintong.visualinspection.bean.Score;
+import com.xintong.visualinspection.dao.master.LogDao;
 import com.xintong.visualinspection.dao.master.ScoreDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.ScoreService;
@@ -26,6 +28,8 @@ public class ScoreServiceImpl extends BaseService implements ScoreService {
 
     @Autowired
     private ScoreDao scoreDao;
+    @Autowired
+    private LogDao logDao;
 
 	@Override
 	public List<Score> getAll() {
@@ -64,8 +68,30 @@ public class ScoreServiceImpl extends BaseService implements ScoreService {
 
 	@Override
 	public void update(Score score) {
+		Score oldScore = getOne(score.getId());
 		// TODO Auto-generated method stub
 		scoreDao.update(score);
+		
+		//扣分人员不一致保存日志
+		if(score.getChecked_person()!=null && (!oldScore.getChecked_person().equals(score.getChecked_person()))){
+			Log log = new Log();
+			log.setTask_id(oldScore.getTask_id());
+			log.setUpdate_user(score.getUpdate_user());
+			log.setDept_id(oldScore.getChecked_dept());
+			log.setScore_id(score.getId());
+			log.setContent("更改扣分人员:"+CacheUtil.getUserTurenameFromMap(oldScore.getChecked_person())+"-->"+CacheUtil.getUserTurenameFromMap(score.getChecked_person()));
+			logDao.insert(log);
+		}
+		//扣分不一致保存日志
+		if(score.getCheck_item_score()!=null && oldScore.getCheck_item_score()!=score.getCheck_item_score()){
+			Log log = new Log();
+			log.setTask_id(oldScore.getTask_id());
+			log.setUpdate_user(score.getUpdate_user());
+			log.setDept_id(oldScore.getChecked_dept());
+			log.setScore_id(score.getId());
+			log.setContent("更改扣分:"+oldScore.getCheck_item_score()+"-->"+score.getCheck_item_score());
+			logDao.insert(log);
+		}
 	}
 
 	@Override
@@ -85,4 +111,23 @@ public class ScoreServiceImpl extends BaseService implements ScoreService {
 		// TODO Auto-generated method stub
 		scoreDao.updateByTaskIdAndPerson(score);
 	}
+
+	@Override
+	public void backoutScore(Score score) {
+		// TODO Auto-generated method stub
+		Score oldScore = getOne(score.getId());
+		//记录之前扣分
+		scoreDao.updateFormerScore(score);
+		//之前扣分撤销
+		scoreDao.updateNowScore(score);
+		
+		//保存日志
+		Log log = new Log();
+		log.setTask_id(oldScore.getTask_id());
+		log.setUpdate_user(score.getUpdate_user());
+		log.setDept_id(oldScore.getChecked_dept());
+		log.setScore_id(score.getId());
+		log.setContent("撤销扣分:"+oldScore.getCheck_item_score()+"-->"+score.getCheck_item_score());
+		logDao.insert(log);
+	}
 }

+ 3 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -55,6 +55,7 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 			}
 		}
 		t.setRecheckman_name(CacheUtil.getUserTurenameFromMap(t.getRecheckman()));
+		t.setMonitor_user_name(CacheUtil.getUserTurenameFromMap(t.getMonitor_user_id()));
 		return t;
 	}
 
@@ -85,7 +86,7 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 				}
 			}
 			t.setRecheckman_name(CacheUtil.getUserTurenameFromMap(t.getRecheckman()));
-			
+			t.setMonitor_user_name(CacheUtil.getUserTurenameFromMap(t.getMonitor_user_id()));
 			t.setAppeal_result_name(CodeUtil.getCodeNameByFlagAndValue("appeal_result", t.getAppeal_result()+""));
 		}
 		return taskList;
@@ -136,7 +137,7 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 			log.setTask_id(task.getId());
 			log.setUpdate_user(task.getUpdate_user());
 			log.setDept_id(oldTask.getChecked_dept());
-			log.setContent("更改考核人员:"+oldTask.getChecked_person()+"-->"+task.getChecked_person());
+			log.setContent("更改考核人员:"+CacheUtil.getUserTurenameFromMap(oldTask.getChecked_person())+"-->"+CacheUtil.getUserTurenameFromMap(task.getChecked_person()));
 			logDao.insert(log);
 		}
 	}