Просмотр исходного кода

Merge branch 'master' of http://git_xt.git.topm.win:8080/wenhongquan/VisualInspection

wenhongquan 9 лет назад
Родитель
Сommit
e68216e554
51 измененных файлов с 899 добавлено и 282 удалено
  1. 26 6
      VisualInspection/js/appeal_management/appeal_list.js
  2. 12 3
      VisualInspection/js/assess_management/assess_item.js
  3. 20 3
      VisualInspection/js/assess_management/assess_way.js
  4. 71 51
      VisualInspection/js/assess_management/assess_way_edit.js
  5. 3 1
      VisualInspection/js/lib/mytable.js
  6. 124 0
      VisualInspection/js/mytask/check.js
  7. 124 0
      VisualInspection/js/mytask/checkDetail.js
  8. 4 4
      VisualInspection/js/mytask/unchecked.js
  9. 2 1
      VisualInspection/js/teamClass/charge_team_schedule.js
  10. 4 2
      VisualInspection/js/teamClass/check_team_schedule.js
  11. 4 5
      VisualInspection/js/term_management/charge_terms_m.js
  12. 4 5
      VisualInspection/js/term_management/check_terms_m.js
  13. 2 1
      VisualInspection/js/util/service.js
  14. 3 1
      VisualInspection/js/util/util.js
  15. 1 1
      VisualInspection/view/appeal_management/appeal_list.html
  16. 3 3
      VisualInspection/view/assess_management/assess_item.html
  17. 2 2
      VisualInspection/view/assess_management/assess_way.html
  18. 7 7
      VisualInspection/view/assess_management/assess_way_edit.html
  19. 1 1
      VisualInspection/view/main.html
  20. 5 130
      VisualInspection/view/mytask/check.html
  21. 1 1
      VisualInspection/view/mytask/unchecked.html
  22. 41 0
      VisualInspection_server/src/main/java/com/xintong/SystemInit.java
  23. 1 1
      VisualInspection_server/src/main/java/com/xintong/VideocheckApplication.java
  24. 10 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppeal.java
  25. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckRule.java
  26. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Score.java
  27. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Team.java
  28. 17 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/BaseController.java
  29. 16 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleController.java
  30. 57 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleItemController.java
  31. 11 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/DepartmentController.java
  32. 4 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java
  33. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/DepartmentDao.java
  34. 19 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckRuleItemDao.java
  35. 3 4
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml
  36. 5 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml
  37. 27 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleItemMapper.xml
  38. 6 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/ScoreMapper.xml
  39. 20 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleItemService.java
  40. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleService.java
  41. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/DepartmentService.java
  42. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/UserService.java
  43. 26 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckAppealServiceImpl.java
  44. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckItemServiceImpl.java
  45. 46 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleItemServiceImpl.java
  46. 86 25
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleServiceImpl.java
  47. 6 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/DepartmentServiceImpl.java
  48. 40 4
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamServiceImpl.java
  49. 3 10
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/UserServiceImpl.java
  50. 14 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/util/CacheUtil.java
  51. 1 1
      VisualInspection_server/src/main/resources/application.properties

+ 26 - 6
VisualInspection/js/appeal_management/appeal_list.js

@@ -8,21 +8,25 @@ $(document).ready(function(){
         }
         var start_time = $("#start-time").val();
         var end_time = $("#end-time").val();
+        var dept_select = $("#dept_select").val();
         if(start_time != ''){
             data.start_time = start_time;
         }
         if(end_time != ''){
             data.end_time = end_time;
         }
+        if(dept_select!='' && dept_select != 0){
+            data.appeal_dept = dept_select;
+        }
         var cols = [
                         {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
                         {width: 100, text: '任务名称', flex: false,colClass: '',field:'name'},
-                        {width: 80, text: '考核人员',  flex: false, colClass: '',field:'appeal_man'},
-                        {width: 80, text: '考核部门',  flex: false, colClass: '',sort: 'down',field:'appeal_dept'},
-                        {width: 80, text: '稽查人员', type: 'string', flex: false, colClass: '',field:'verify_person'},
-                        {width: 120, text: '稽查时间段', type: 'date',date_type:'yyyy-MM-dd',custom:' 00:00-24:00', flex: false, colClass: '',field:'start_time'},
-                        {width: 80, text: '状态', type: 'string', flex: false, colClass: '',field:'check_status'},
-                        {width: 120, text: '上次稽查时间', type: 'date',date_type:'yyyy-MM-dd hh:mm', flex: false, colClass: '',field:'start_time'},
+                        {width: 80, text: '考核人员',  flex: false, colClass: '',field:'appeal_man_name'},
+                        {width: 100, text: '考核部门',  flex: false, colClass: '',sort: 'down',field:'appeal_dept_name'},
+                        {width: 80, text: '稽查人员', type: 'string', flex: false, colClass: '',field:'verify_person_name'},
+                        {width: 120, text: '稽查时间段', type: 'string',custom:' 00:00-24:00', flex: false, colClass: '',field:'start_time'},
+                        {width: 80, text: '状态', type: 'string', flex: false, colClass: '',field:'code_name'},
+                        {width: 120, text: '上次稽查时间', type: 'string', flex: false, colClass: '',field:'start_time'},
                         {width: 100, text: '操作',  flex: false, colClass: '',field:'id',field_other:'task_id',oper:[
                             {func:'seeCheckAudit',text:'查看稽查结果',col_class:''},{func:'distributionAgain',text:'在分配',col_class:''}
                         ]},
@@ -38,6 +42,22 @@ $(document).ready(function(){
         queryTable();
     })
 
+    getDeptList();
+    //初始化部门下拉框
+    function getDeptList(){
+        data ={}
+        post_common_service("dept/get/all", data, function(data){
+            $("#dept_select").empty();
+            $("#dept_select").append('<option value="">全部</option>');
+           
+            for(i=0;i<data.length;i++){
+                $("#dept_select").append('<option value="'+data[i].id+'">'+data[i].organname+'</option>');
+            }
+        }, function(){
+
+        });
+    }
+
 
 })
 //查看稽查结果

+ 12 - 3
VisualInspection/js/assess_management/assess_item.js

@@ -1,5 +1,4 @@
 
-
  var zdata = [];
  var z_cache ;
  var check_item_tree = null;
@@ -37,7 +36,7 @@
      $('#dashboard').dashboard({ draggable: false });
      var zTreeObj;
      var zNodes = [];
-     check_item_tree = $.fn.zTree.init($("#department_tree"), {}, zNodes);
+     check_item_tree = $.fn.zTree.init($("#check_rule_tree"), {}, zNodes);
 
      getCheckItems();
 
@@ -259,7 +258,7 @@ function delete_check_item(id ){
              zdataItem["children"] = addobj(m);
              zdata.push(zdataItem);
          }
-         check_item_tree = $.fn.zTree.init($("#department_tree"), setting, zdata)
+         check_item_tree = $.fn.zTree.init($("#check_rule_tree"), setting, zdata)
      },function(error){})
  }
 
@@ -306,6 +305,7 @@ function loadData(nodedata) {
         }
     }
     $(".check_item_group").show();
+
     if(pnode[0] != null){
         dept_selectinput = new TreeSelect({
             element: '#check_item_select',
@@ -327,6 +327,15 @@ function addCheckItem() {
 
     var pid =   dept_selectinput!=null?dept_selectinput.value:null ;
 
+    if($(".check_item_group").is(":hidden")){
+        pid = null ;   
+    }
+
+    if(name == ""){
+        tip("请填写考核项名称");
+        return ;
+    }
+
     var data = {
         "name": name,
         "score":score,

+ 20 - 3
VisualInspection/js/assess_management/assess_way.js

@@ -31,11 +31,26 @@ function deleteCheckRule(id){
 function showAddCheckRule(){
     $('#check_rule_name,#dep_id,#position_id').val('');
     showPopup4Common('添加考核办法',function(){
-        addOrUpdateCheckRule("/checkRule/add");
+       return addOrUpdateCheckRule("/checkRule/add");
     },'400px');
 }
 
+/**
+ * 添加考核办法 - 保存
+ */
 function addOrUpdateCheckRule(url){
+    if(idVal("check_rule_name") == ''){
+        tip("请输入考核办法");
+        return false;
+    }
+    if(idVal("dep_id") == ''){
+        tip("请选择部门");
+        return false;
+    }
+    if(idVal("position_id") == ''){
+        tip("请选择职位");
+        return false;
+    }
     var param ={
         "name":idVal("check_rule_name") ,
         "checked_dept_id":idVal("dep_id"),
@@ -58,7 +73,9 @@ $(document).ready(function() {
 
     // 考核项链接
     $(".datatable").delegate("td.modity-flag","click",function(){
-        // alert($(this).html());
-        changePage("/view/assess_management/assess_way_edit.html")
+        var obj = $('.datatable').data("data_cache")[$(this).attr("data-row")] ;
+        $.zui.store.set("check_rule_id",obj.id);
+        $.zui.store.set("check_rule_name",obj.name);
+        changePage("/view/assess_management/assess_way_edit.html");
     });
 });

+ 71 - 51
VisualInspection/js/assess_management/assess_way_edit.js

@@ -1,6 +1,8 @@
 
  var zdata = [];
  var z_cache ;
+ var all_data = [] ;
+ var check_rule_id ;
  var check_item_tree = null;
  var edittype = "add";
  var cols = [{
@@ -72,7 +74,14 @@
              return;
          }
 
-        deleteItem4Common(nodedata[0].id,"/checkItem/delete",function(){
+        if(nodedata[0].children.length > 0){
+            layer.msg('请删除具体考核项!', {
+                 time: 2000, //20s后自动关闭
+             });
+             return;
+        }
+
+        delete4CheckRuleItem({"rule_id":check_rule_id,"id":nodedata[0].id},"/checkRuleItem/delete",function(){
             layer.msg('删除成功!', {
                     time: 2000, //20s后自动关闭
                 });   
@@ -91,6 +100,25 @@
      });
  });
 
+
+function delete4CheckRuleItem(param,url,okCb){
+    //询问框
+    layer.confirm('确定删除记录?', {
+        btn: ['删除','取消'] //按钮
+    }, function(){
+        no_return_common_service(url, param, function(data) {
+            okCb();//重新加载表格数据
+            layer.msg(data, {
+                time: 2000//20s后自动关闭
+            });
+        }, function(error) {
+            alert(error);
+        });
+    }, function(index){
+        layer.close(index);
+    });
+}
+
 function table_init(){
     $('.datatable').datatable('load', {
         cols: cols,
@@ -133,7 +161,7 @@ function addCheckItem_v(id){
 
 // 表格点击删除
 function delete_check_item(id ){
-     deleteItem4Common(id,"/checkItem/delete",function(){
+     delete4CheckRuleItem( {"rule_id":check_rule_id,"id":id} ,"/checkItem/delete",function(){
          layer.msg('删除成功!', {
                 time: 2000, //20s后自动关闭
             });   
@@ -173,7 +201,7 @@ function delete_check_item(id ){
      function getTree(obj,rowObj){
         var userdata = {};
         userdata["checked"] = false;
-        userdata["data"] = [++seq, obj.name, (obj.score!=null?obj.score:""), '<a href="javascript:void(0)" onclick="modify_check_item('+ obj.id +')"  ><i class="icon icon-edit"></i> 修改</a><a href="javascript:void(0)" onclick="delete_check_item('+ obj.id +')" ><i class="icon icon-remove-circle"></i> 删除</a>'];
+        userdata["data"] = [++seq, obj.name, (obj.score!=null?obj.score:""), '<a href="javascript:void(0)" onclick="delete_check_item('+ obj.id +')" ><i class="icon icon-remove-circle"></i> 删除</a>'];
         rowObj.push(userdata);
 
         if(obj.subCheckItem!=null){
@@ -185,11 +213,8 @@ function delete_check_item(id ){
      }
 
      function zTreeOnClick(event, treeId, treeNode) {
-
         var rowdata = [];
-
         seq = 0 ;
-
         for(var i=0;i<z_cache.length;i++){
             var treeObj = getTreeData(z_cache[i],treeNode.id) ;
             if( treeObj != null){
@@ -244,12 +269,19 @@ function delete_check_item(id ){
          }
      };
 
-     var data = {"id":3} ;
-     post_common_service("/checkRule/getById",data,function(data){
+     $("#check_rule_item_name").html($.zui.store.get("check_rule_name"));
+
+     check_rule_id = $.zui.store.get("check_rule_id");
+
+     var data = {"id": check_rule_id } ;
+     post_common_service("/checkRule/getListById",data,function(data){
         zdata = [];
-        z_cache = data ;
-         for (var i = 0; i < data.length; i++) {
-             var m = data[i];
+        z_cache = data.check_items ;
+        if(data==null){
+            return ;
+        }
+         for (var i = 0; i < data.check_items.length; i++) {
+             var m = data.check_items[i];
              var zdataItem = {};
              zdataItem["id"] = m.id;
              zdataItem["value"] = m.id;
@@ -261,6 +293,23 @@ function delete_check_item(id ){
          }
          check_item_tree = $.fn.zTree.init($("#department_tree"), setting, zdata)
      },function(error){})
+
+     // 查询所有的考核项
+    post_common_service("/checkItem/getAll","",function(data){
+        all_data = [];
+         for (var i = 0; i < data.length; i++) {
+             var m = data[i];
+             var zdataItem = {};
+             zdataItem["id"] = m.id;
+             zdataItem["value"] = m.id;
+             zdataItem["pId"] = null;
+             zdataItem["score"] = m.score ;
+             zdataItem["name"] = m.name;
+             zdataItem["children"] = addobj(m);
+             all_data.push(zdataItem);
+         }
+     },function(error){})
+
  }
 
  function addobj(data) {
@@ -296,45 +345,36 @@ function loadData(nodedata) {
         $("#check_item_name").val("") ;
         $("#check_item_score").val("")
     }
-    if (edittype == "edit") {
-        selectednodetemp = nodedata[0];
-        $("#check_item_name").val(nodedata[0].name);
-        $("#check_item_score").val(nodedata[0].score);
-        $("#add_btn").html("保存")
-        if (pnode != null && pnode.length > 0) {
-            pnode = [check_item_tree.getNodeByParam("id", pnode[0].pId, null)]
-        }
-    }
+  
     $(".check_item_group").show();
     if(pnode[0] != null){
         dept_selectinput = new TreeSelect({
             element: '#check_item_select',
-            data: zdata,
+            data: all_data,
             valueKey: "id",
             placeholder: "选择考核项分类",
             selectvalue: pnode.length > 0 ? pnode[0].id : null
         });
     }else{
-        $(".check_item_group").hide();
+        dept_selectinput = new TreeSelect({
+            element: '#check_item_select',
+            data: all_data,
+            valueKey: "id",
+            placeholder: "选择考核项分类"
+        });
     }
 }
 
 
 function addCheckItem() {
     //获取名称
-    var name = $("#check_item_name").val();
-    var score = $("#check_item_score").val();
-
-    var pid =   dept_selectinput!=null?dept_selectinput.value:null ;
-
     var data = {
-        "name": name,
-        "score":score,
-        "parent_id": pid
+        "rule_id": check_rule_id,
+        "id":dept_selectinput.value
     }
 
     if (edittype == "add") {
-        post_common_service( "checkItem/add",data,function(data){
+        post_common_service( "checkRuleItem/add",data,function(data){
             layer.msg('添加成功!', {
                 time: 2000, //20s后自动关闭
             }, function() {
@@ -344,26 +384,6 @@ function addCheckItem() {
             })
         },function(error){})
     }
-
-    if (edittype == "edit") {
-        data["id"] = selectednodetemp.id;
-        if (isSelfOrChild(pid, selectednodetemp)) {
-            layer.msg('不能添加到自身及自身下的子考核项!', {
-                time: 2000, //20s后自动关闭
-            })
-            return;
-        }
-
-         post_common_service( "checkItem/update",data,function(data){
-            layer.msg('修改成功!', {
-                time: 2000, //20s后自动关闭
-            }, function() {
-                $('#addModal').modal('hide')
-                getCheckItems();
-                table_init();
-            })
-        },function(error){})
-    }
 }
 
 function isSelfOrChild(id, node) {

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

@@ -55,6 +55,8 @@
             // var obj = this.obj;
             post_common_service(url+"/"+p_cur+"/"+page_size, param, function(data) {
                 // $(element).html("");
+                 // 这边把请求过来的数据缓存到table选择器中
+                $(element).data("data_cache",data.list);
                 element.tt_data=data.list;
                 options.tableData=data.list;
                 obj.setTable(data.list,element, options,p_cur); 
@@ -117,7 +119,7 @@
                         }else if(obj[cols[i].field])
                             dArr.push(obj[cols[i].field]);
                         else 
-                            dArr.push('');
+                            dArr.push('0');
                     }
                     
                 }

+ 124 - 0
VisualInspection/js/mytask/check.js

@@ -0,0 +1,124 @@
+function initCheck(){
+    
+        // 仅选择日期
+        $("#start-time").datetimepicker({
+            language: "zh-CN",
+            weekStart: 1,
+            todayBtn: 1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $("#end-time").datetimepicker({
+            language: "zh-CN",
+            weekStart: 1,
+            todayBtn: 1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        if($.checkTask) {
+            setFeSelect("#fsList",$.checkTask.deptid);
+            setLaneSelect("#lane",$.checkTask.checked_location);
+            get_common_service('user/getUserById/'+$.checkTask.checked_person, null, function(data){
+                $("#checked_person").html(data.truename);
+            }) 
+            //查询评分情况
+            queryScores();
+        }
+}
+    // 使用data参数更新数据:
+    function queryScores(){
+        var data = {
+            "task_id": $.checkTask.id
+        }
+        var cols = [
+                    {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+                    {width: 160, text: '评分记录', type: 'string', flex: true, sort: 'down',field: 'content'},
+                    {width: 80, text: '分数', type: 'string', flex: true, colClass: '',field: 'check_item_score'},
+                    {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
+                        oper:[
+                            {func:'showEditScore',text:'修改',icon_class:'icon-edit'},
+                            {func:'deleteScore',text:'删除',icon_class:'icon-remove-circle'}
+                        ]
+                    }
+                ];
+        
+        // var pager = {
+        //     page_size:10
+        // }
+        $('.datatable').mytable({'cols':cols,
+                                'url':"/score/getScoreList/",
+                                'param':data}
+                                );
+    }
+    function showEditScore(id){
+        // deleteItem4Common(id,"/score/delete/",queryScores);
+        var rowData=getItemByIdFromArr(id,$('.datatable').mytable('getTableData'));
+        showPics(rowData.pics);
+    }
+
+    function deleteScore(id){
+        deleteItem4Common(id,"/score/delete/",queryScores);
+    }
+
+    function showPics(pics){
+        var picStr='';
+        $('#img_container').html(picStr);
+        if(pics){
+            var picArr = pics.split(',');
+            for(var i in picArr){
+                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>'
+                    +  '<a class="card lightbox-toggle" href="'+picArr[i]+'" style="position:absolute">'
+                    +      '<img src="'+picArr[i]+'" alt="">'
+                    +  '</a>'
+                    +'</div>';
+                picStr+=pic;
+            }
+            $('#img_container').html(picStr);
+            $('a.lightbox-toggle').lightbox();
+        }
+    }
+
+    function removeImg(img_id){
+        $(img_id).remove();
+    }
+
+    function clearAllImg(){
+        $('#img_container').empty();
+    }
+    function showPre(id){
+        // $('#myModal').modal({name:"dd"});
+        changePage("/view/mytask/taskDetail.html");
+    }
+
+    function saveValidReason(){
+        alert("提交成功!");
+        $('#validSubmitWin').modal('toggle');
+    }
+    function changePerson(id){
+        $('#checkedPerson').html(id);
+        $('#changePersonWin').modal('toggle');
+    }
+
+    function score(score){
+        alert("扣分:"+score);
+        $('#scoreWin').modal('toggle');
+    }
+
+    function refuseApply(){
+        alert("拒绝申请");
+        $('#refuseApplyWin').modal('toggle');
+    }
+
+    function agreeApply(){
+        alert("同意申请");
+    }

+ 124 - 0
VisualInspection/js/mytask/checkDetail.js

@@ -0,0 +1,124 @@
+function initCheck(){
+    
+        // 仅选择日期
+        $("#start-time").datetimepicker({
+            language: "zh-CN",
+            weekStart: 1,
+            todayBtn: 1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $("#end-time").datetimepicker({
+            language: "zh-CN",
+            weekStart: 1,
+            todayBtn: 1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        if($.checkTask) {
+            setFeSelect("#fsList",$.checkTask.deptid);
+            setLaneSelect("#lane",$.checkTask.checked_location);
+            get_common_service('user/getUserById/'+$.checkTask.checked_person, null, function(data){
+                $("#checked_person").html(data.truename);
+            }) 
+            //查询评分情况
+            queryScores();
+        }
+}
+    // 使用data参数更新数据:
+    function queryScores(){
+        var data = {
+            "task_id": $.checkTask.id
+        }
+        var cols = [
+                    {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+                    {width: 160, text: '评分记录', type: 'string', flex: true, sort: 'down',field: 'content'},
+                    {width: 80, text: '分数', type: 'string', flex: true, colClass: '',field: 'check_item_score'},
+                    {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
+                        oper:[
+                            {func:'showEditScore',text:'修改',icon_class:'icon-edit'},
+                            {func:'deleteScore',text:'删除',icon_class:'icon-remove-circle'}
+                        ]
+                    }
+                ];
+        
+        // var pager = {
+        //     page_size:10
+        // }
+        $('.datatable').mytable({'cols':cols,
+                                'url':"/score/getScoreList/",
+                                'param':data}
+                                );
+    }
+    function showEditScore(id){
+        // deleteItem4Common(id,"/score/delete/",queryScores);
+        var rowData=getItemByIdFromArr(id,$('.datatable').mytable('getTableData'));
+        showPics(rowData.pics);
+    }
+
+    function deleteScore(id){
+        deleteItem4Common(id,"/score/delete/",queryScores);
+    }
+
+    function showPics(pics){
+        var picStr='';
+        $('#img_container').html(picStr);
+        if(pics){
+            var picArr = pics.split(',');
+            for(var i in picArr){
+                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>'
+                    +  '<a class="card lightbox-toggle" href="'+picArr[i]+'" style="position:absolute">'
+                    +      '<img src="'+picArr[i]+'" alt="">'
+                    +  '</a>'
+                    +'</div>';
+                picStr+=pic;
+            }
+            $('#img_container').html(picStr);
+            $('a.lightbox-toggle').lightbox();
+        }
+    }
+
+    function removeImg(img_id){
+        $(img_id).remove();
+    }
+
+    function clearAllImg(){
+        $('#img_container').empty();
+    }
+    function showPre(id){
+        // $('#myModal').modal({name:"dd"});
+        changePage("/view/mytask/taskDetail.html");
+    }
+
+    function saveValidReason(){
+        alert("提交成功!");
+        $('#validSubmitWin').modal('toggle');
+    }
+    function changePerson(id){
+        $('#checkedPerson').html(id);
+        $('#changePersonWin').modal('toggle');
+    }
+
+    function score(score){
+        alert("扣分:"+score);
+        $('#scoreWin').modal('toggle');
+    }
+
+    function refuseApply(){
+        alert("拒绝申请");
+        $('#refuseApplyWin').modal('toggle');
+    }
+
+    function agreeApply(){
+        alert("同意申请");
+    }

+ 4 - 4
VisualInspection/js/mytask/unchecked.js

@@ -6,12 +6,12 @@ function queryUncheckedTask(){
         "dept": $("#dept").val()
     }
     var cols = [
-                {width: 80, text: '序号', type: 'number', flex: false, colClass: 'text-center',field: 'num'},
-                {width: 160, text: '任务名称', type: 'date', flex: false, sort: 'down',field: 'name'},
+                {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, colClass: '',field: 'checked_person'},
-                {width: 160, text: '考核部门', type: 'date', flex: false, sort: 'down',field: 'checked_dept'},
+                {width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept'},
                 {width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman'},
-                {width: 160, text: '稽查时间段', type: 'date', flex: false, sort: 'down',field: 'start_time'},
+                {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'start_time'},
                 {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[

+ 2 - 1
VisualInspection/js/teamClass/charge_team_schedule.js

@@ -11,6 +11,7 @@
         var date_cursor = 0 ;
 
         // var user = $.zui.store.get("user") ;  // 缓存用户信息,取出dept_id
+        // console.log(user); 
 
         $('#calendar').calendar();
         var calendar = $('#calendar').data('zui.calendar');
@@ -31,7 +32,7 @@
                 var newEvents = [];
                 // console.log(data);
                 for(var i=0;i<data.length;i++){
-                    var obj = {id:data[i].id ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: timeStamp2String(data[i].start_time,"yyyy-MM-dd"), end: timeStamp2String(data[i].end_time,"yyyy-MM-dd")};
+                    var obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: data[i].start_time, end: data[i].end_time};
                     newEvents.push(obj);
                 }
                 calendar.addEvents(newEvents);

+ 4 - 2
VisualInspection/js/teamClass/check_team_schedule.js

@@ -11,6 +11,7 @@
         var date_cursor = 0 ;
 
         // var user = $.zui.store.get("user") ;  // 缓存用户信息,取出dept_id
+        // console.log(user );
 
         $('#calendar').calendar();
         var calendar = $('#calendar').data('zui.calendar');
@@ -29,11 +30,12 @@
             }
             getTeamClass(data,function(data){
                 var newEvents = [];
-                // console.log(data);
+                 console.log(data);
                 for(var i=0;i<data.length;i++){
-                    var obj = {id:data[i].id ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: timeStamp2String(data[i].start_time,"yyyy-MM-dd"), end: timeStamp2String(data[i].end_time,"yyyy-MM-dd")};
+                    var obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: data[i].start_time, end: data[i].end_time};
                     newEvents.push(obj);
                 }
+                console.log(newEvents)
                 calendar.addEvents(newEvents);
             })
         }

+ 4 - 5
VisualInspection/js/term_management/charge_terms_m.js

@@ -11,7 +11,7 @@
         }
         var cols = [
                         {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
-                        {width: 160, text: '班组名称', flex: false,colClass: '',field:'name'},
+                        {width: 100, text: '班组名称', flex: false,colClass: '',field:'name'},
                         {width: 80, text: '所属人员分类',  flex: false, colClass: '',field:'type',func:function(obj){
                             if(obj==1){
                                 return "收费人员";
@@ -19,9 +19,9 @@
                                 return "稽查人员";
                             }
                         }},
-                        {width: 80, text: '班长', type: 'string', flex: false, sort: 'down',field:'monitor'},
-                        {width: 80, text: '副班长', type: 'string', flex: false, colClass: '',field:'sub_monitor'},
-                        {width: 80, text: '人员',  flex: false, colClass: '',field:'user_ids'},
+                        {width: 80, text: '班长', type: 'string', flex: false, sort: 'down',field:'monitor_name'},
+                        {width: 80, text: '副班长', type: 'string', flex: false, colClass: '',field:'sub_monitor_name'},
+                        {width: 120, text: '人员',  flex: false, colClass: '',field:'user_ids_name'},
                         {width: 50, text: '操作',  flex: false, colClass: '',field:'id',oper:[
                             {func:'updateCheckTeam',text:'修改',col_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',col_class:'icon-remove-circle'}
                         ]},
@@ -47,7 +47,6 @@
             $("#second-monitor").empty();
             $("#member").empty();
             for(i=0;i<data.length;i++){
-                console.log(data[i])
                 $("#monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
                 $("#second-monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
                 $("#member").append('<div style="width:83px;float:left;">\

+ 4 - 5
VisualInspection/js/term_management/check_terms_m.js

@@ -11,7 +11,7 @@
         }
         var cols = [
                         {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
-                        {width: 160, text: '班组名称', flex: false,colClass: '',field:'name'},
+                        {width: 100, text: '班组名称', flex: false,colClass: '',field:'name'},
                         {width: 80, text: '所属人员分类',  flex: false, colClass: '',field:'type',func:function(obj){
                             if(obj==1){
                                 return "收费人员";
@@ -19,9 +19,9 @@
                                 return "稽查人员";
                             }
                         }},
-                        {width: 80, text: '班长', type: 'string', flex: false, sort: 'down',field:'monitor'},
-                        {width: 80, text: '副班长', type: 'string', flex: false, colClass: '',field:'sub_monitor'},
-                        {width: 80, text: '人员',  flex: false, colClass: '',field:'user_ids'},
+                        {width: 80, text: '班长', type: 'string', flex: false, sort: 'down',field:'monitor_name'},
+                        {width: 80, text: '副班长', type: 'string', flex: false, colClass: '',field:'sub_monitor_name'},
+                        {width: 120, text: '人员',  flex: false, colClass: '',field:'user_ids_name'},
                         {width: 50, text: '操作',  flex: false, colClass: '',field:'id',oper:[
                             {func:'updateCheckTeam',text:'修改',col_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',col_class:'icon-remove-circle'}
                         ]},
@@ -47,7 +47,6 @@
             $("#second-monitor").empty();
             $("#member").empty();
             for(i=0;i<data.length;i++){
-                console.log(data[i])
                 $("#monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
                 $("#second-monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
                 $("#member").append('<div style="width:83px;float:left;">\

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

@@ -202,9 +202,10 @@ function get_common_service(url, param, success, fail) {
 
 // 上传文件
 function uploadFile(file, name, successfunc, errorfunc) {
-    var dataurl = base_server_url + FILE_UPLOAD
+    var dataurl = "http://localhost:8080/fileServer" + FILE_UPLOAD
     var form = new FormData();
     form.append(name, file);
+    form.append('parantPath','tt');
     $.ajax({
         url: dataurl,
         type: "POST",

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

@@ -125,7 +125,9 @@ function showPopup4Common(title,callback,area){
         shade: 0 ,//不显示遮罩
         yes: function(index){
             callback();
-            layer.close(index);
+             if(callback()!=false){
+                layer.close(index);
+            }
         }
     });
 }

+ 1 - 1
VisualInspection/view/appeal_management/appeal_list.html

@@ -13,7 +13,7 @@
                     </div>
                     <label for="exampleInputAccount1" class="col-sm-1">稽查部门</label>
                     <div class="col-sm-2">
-                        <select class="form-control">
+                        <select class="form-control" id="dept_select">
                             <option value="">全部</option>
                         </select>
                     </div>

+ 3 - 3
VisualInspection/view/assess_management/assess_item.html

@@ -16,7 +16,7 @@
                         </div>
                     </div>
                     <div class="panel-body">
-                        <ul id="department_tree" class="ztree">
+                        <ul id="check_rule_tree" class="ztree">
 
                         </ul>
                     </div>
@@ -31,7 +31,7 @@
                         </div>
                     </div>
                     <div class="panel-body no-padding" style="padding:0">
-                        <div class="datatable" data-checkable="true" data-sortable="true"></div>
+                        <div class="datatable" data-checkable="false" data-sortable="false"></div>
                     </div>
                 </div>
 
@@ -59,7 +59,7 @@
                         <div class="form-group">
                             <label for="exampleInputAccount4" class="col-sm-2">分数:</label>
                             <div class="col-md-6 col-sm-10">
-                                <input type="text" id="check_item_score" class="form-control" placeholder="分数">
+                                <input type="text" id="check_item_score" class="form-control" placeholder="分数 / 目录可不填">
                             </div>
                         </div>
                         <div class="form-group check_item_group">

+ 2 - 2
VisualInspection/view/assess_management/assess_way.html

@@ -44,13 +44,13 @@
                             <label for="exampleInputPassword4" class="col-sm-3">考核对象</label>
                             <div class="col-md-4 col-sm-4">
                                 <select type="text" id="dep_id" class="form-control" >
-                                    <option>请选择部门</option>
+                                    <option value="" selected>请选择部门</option>
                                     <option value="1">1</option>
                                 </select>
                             </div>
                             <div class="col-md-4 col-sm-4">
                                 <select type="text" id="position_id" class="form-control" >
-                                    <option>请选择职位</option>
+                                    <option value="" selected>请选择职位</option>
                                      <option value="2">2</option>
                                 </select>
                             </div>

+ 7 - 7
VisualInspection/view/assess_management/assess_way_edit.html

@@ -6,7 +6,7 @@
 <div class="container-fluid ">
     <div id="dashboard" class="dashboard dashboard-draggable" data-height="500">
         <div class="row" style="text-align:center;margin-bottom:10px;font-size:20px;">
-            收费站收费员视频考核管理办法
+            <span id="check_rule_item_name"></span>考核管理办法
         </div>
         <div class="row">
             <div class="col-md-3">
@@ -15,7 +15,7 @@
                         <span class="title">考核项列表</span>
                         <div class="panel-actions">
                             <button type="button" class="btn" id="dept_add" data-position="center" data-toggle="tooltip" title="添加"><i class="icon-plus"></i></button>
-                            <button type="button" class="btn" id="dept_edit" data-toggle="tooltip" title="编辑"><i class="icon-pencil"></i></button>
+                            <!--<button type="button" class="btn" id="dept_edit" data-toggle="tooltip" title="编辑"><i class="icon-pencil"></i></button>-->
                             <button type="button" class="btn" id="dept_delete" data-toggle="tooltip" title="删除"><i class="icon-trash"></i></button>
                         </div>
                     </div>
@@ -54,7 +54,7 @@
             <div class="modal-body">
                 <div class="container-fluid ">
                     <form class="form-horizontal">
-                        <div class="form-group">
+                        <!--<div class="form-group">
                             <label for="exampleInputAccount4" class="col-sm-2">名称:</label>
                             <div class="col-md-6 col-sm-10">
                                 <input type="text" id="check_item_name" class="form-control" placeholder="名称">
@@ -65,17 +65,17 @@
                             <div class="col-md-6 col-sm-10">
                                 <input type="text" id="check_item_score" class="form-control" placeholder="分数">
                             </div>
-                        </div>
+                        </div>-->
                         <div class="form-group check_item_group">
-                            <label for="exampleInputPassword4" class="col-sm-2">分类:</label>
-                            <div class="col-md-6 col-sm-10">
+                            <label for="exampleInputPassword4" class="col-sm-3">考核项名称:</label>
+                            <div class="col-md-6 col-sm-9">
                                 <div id="check_item_select"></div>
 
                             </div>
                         </div>
 
                         <div class="form-group">
-                            <div class="col-sm-offset-2 col-sm-10">
+                            <div class="col-sm-offset-3 col-sm-10">
                                 <button type="button" id="add_btn" class="btn btn-default" onclick="addCheckItem()">添加</button>
                             </div>
                         </div>

+ 1 - 1
VisualInspection/view/main.html

@@ -7,7 +7,7 @@
     <link rel="import" href="/view/common/commoncsslink.html?__inline">
     <link rel="stylesheet" type="text/css" href="/css/main.css">
     <link rel="import" href="/view/common/commonscriptlink.html?__inline">
-    <script src="/js/mytask/unchecked.js"></script> 
+    <script src="/js/mytask/check.js"></script> 
     <!--<link rel="stylesheet" type="text/css" href="/css/user/userManager.css?__inline">
 <script type="text/javascript" src="/node_modules/zui/dist/lib/dashboard/zui.dashboard.min.js?__inline"></script>
 <link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/dashboard/zui.dashboard.min.css">

+ 5 - 130
VisualInspection/view/mytask/check.html

@@ -47,39 +47,12 @@
                 </div>
             </div>
             <div class="row">
-                <div class="cards cards-borderless col-sm-11">
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
+                <div id="img_container" class="cards cards-borderless col-sm-11">
+                
                 </div>
                 <div class="col-sm-1">
                     <br>
-                    <button class="btn btn-primary" type="button">清空</button>
+                    <button class="btn btn-primary" type="button" onclick="clearAllImg()">清空</button>
                     <br>
                     <br>
                     <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#scoreWin">评分</button>
@@ -205,104 +178,6 @@
 </div>
 <script>
     $(document).ready(function() {
-        $('a.lightbox-toggle').lightbox();
-        // 仅选择日期
-        $("#start-time").datetimepicker({
-            language: "zh-CN",
-            weekStart: 1,
-            todayBtn: 1,
-            autoclose: 1,
-            todayHighlight: 1,
-            startView: 2,
-            minView: 2,
-            forceParse: 0,
-            format: "yyyy-mm-dd"
-        });
-        // 仅选择日期
-        $("#end-time").datetimepicker({
-            language: "zh-CN",
-            weekStart: 1,
-            todayBtn: 1,
-            autoclose: 1,
-            todayHighlight: 1,
-            startView: 2,
-            minView: 2,
-            forceParse: 0,
-            format: "yyyy-mm-dd"
-        });
-        // setFeSelect("#fsList",$.checkTask.deptid);
-        // setLaneSelect("#lane",$.checkTask.checked_location);
-        // get_common_service('user/getUserById/'+$.checkTask.checked_person, null, function(data){
-        //     $("#checked_person").html(data.truename);
-        // }) 
-        // 使用data参数更新数据:
-        $('.datatable').datatable({
-            checkable: false,
-            sortable: false,
-            data: {
-                cols: [{
-                    width: 30,
-                    text: '序号',
-                    type: 'number',
-                    flex: true,
-                    colClass: 'text-center'
-                }, {
-                    width: 200,
-                    text: '评分记录',
-                    type: 'string',
-                    flex: true,
-                    sort: 'down'
-                }, {
-                    width: 30,
-                    text: '分数',
-                    type: 'string',
-                    flex: true,
-                    colClass: ''
-                }, {
-                    width: 100,
-                    text: '操作',
-                    type: 'string',
-                    flex: true,
-                    colClass: ''
-                }],
-                rows: [{
-                        checked: false,
-                        data: [1, '服务设施维修及时,小修及时修复', '10', '<a href="#" data-toggle="modal" data-target="#myModal"><i class="icon icon-edit"></i>修改 </a><a href="#"><i class="icon icon-remove-circle"></i>删除</a>']
-                    }, {
-                        checked: false,
-                        data: [2, '服务区垃圾房应封闭,房内垃圾入袋,地面无污水', '20', '<a href="#" data-toggle="modal" data-target="#myModal"><i class="icon icon-edit"></i>修改 </a><a href="#"><i class="icon icon-remove-circle"></i>删除</a>']
-                    },
-                    // 更多数据
-                ]
-            }
-        });
+        initCheck();
     });
-
-        function showPre(id){
-            // $('#myModal').modal({name:"dd"});
-            changePage("/view/mytask/taskDetail.html");
-        }
-
-        function saveValidReason(){
-            alert("提交成功!");
-            $('#validSubmitWin').modal('toggle');
-        }
-        function changePerson(id){
-            $('#checkedPerson').html(id);
-            $('#changePersonWin').modal('toggle');
-        }
-
-        function score(score){
-            alert("扣分:"+score);
-            $('#scoreWin').modal('toggle');
-        }
-
-        function refuseApply(){
-            alert("拒绝申请");
-            $('#refuseApplyWin').modal('toggle');
-        }
-
-        function agreeApply(){
-            alert("同意申请");
-        }
-    </script>
+</script>

+ 1 - 1
VisualInspection/view/mytask/unchecked.html

@@ -1,4 +1,4 @@
-<!--<script src="/js/mytask/unchecked.js"></script> -->
+<script src="/js/mytask/unchecked.js"></script> 
 <div class="container-fluid ">
     <div class="row">
         <form  class="form-horizontal">

+ 41 - 0
VisualInspection_server/src/main/java/com/xintong/SystemInit.java

@@ -0,0 +1,41 @@
+package com.xintong;
+
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextRefreshedEvent;
+
+import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.service.DepartmentService;
+import com.xintong.visualinspection.service.UserService;
+import com.xintong.visualinspection.service.impl.DepartmentServiceImpl;
+import com.xintong.visualinspection.service.impl.UserServiceImpl;
+import com.xintong.visualinspection.util.CacheUtil;
+
+public class SystemInit implements ApplicationListener<ContextRefreshedEvent> {
+
+	UserService userService;
+	DepartmentService deptService;
+	
+	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SystemInit.class);
+	@Override
+	public void onApplicationEvent(ContextRefreshedEvent arg0) {
+		
+		userService = arg0.getApplicationContext().getBean(UserServiceImpl.class);
+		//加载用户信息
+		List<User> userList = userService.getAll();
+		for(User user:userList){
+			CacheUtil.userMap.put(user.getId(), user);
+		}
+		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
+		//加载部门信息
+		deptService = arg0.getApplicationContext().getBean(DepartmentServiceImpl.class);
+		List<Organ> deptList = deptService.getAll();
+		for(Organ organ:deptList){
+			CacheUtil.deptMap.put(organ.getId(), organ);
+		}
+		logger.info("加载部门信息成功,数据数:"+CacheUtil.deptMap.size());
+	}
+}

+ 1 - 1
VisualInspection_server/src/main/java/com/xintong/VideocheckApplication.java

@@ -20,7 +20,7 @@ public class VideocheckApplication {
 	public static void main(String[] args) {
 		ParserConfig.getGlobalInstance().addAccept("com.xintong.");
 		ParserConfig.getGlobalInstance().addAccept("org.springframework.security.core.");
-        
+
         SpringApplication.run(VideocheckApplication.class, args);
 	}
 }

+ 10 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppeal.java

@@ -36,6 +36,14 @@ public class CheckAppeal {
     private String remark;
     
     
+    //申诉人
+    private String appeal_man_name;
+    //核实人
+    private String verify_person_name;
+    //申诉部门
+    private String appeal_dept_name;
+    
+    
     //稽查任务关联信息
     //任务名称
     private String name;
@@ -43,5 +51,7 @@ public class CheckAppeal {
     private Date start_time;
     //任务结束时间
     private Date end_time;
+    //申诉状态
+    private String code_name;
     
 }

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

@@ -23,6 +23,8 @@ public class CheckRule {
     //被考核部门id
     private Long checked_dept_id;
     
+    private String checked_dept_name ;
+    
     // 考核项数量
     private int checked_item_num ;
 }

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

@@ -28,6 +28,10 @@ public class Score {
     private String videos;
     //考核项id
     private Long check_item_id;
+    
+    private String check_item_name;
+    
+    private Integer check_item_score;
     //扣分内容
     private String content;
     //考核人员ids

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

@@ -33,4 +33,6 @@ public class Team {
     
     private String sub_monitor_name;
     
+    private String user_ids_name;
+    
 }

+ 17 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/BaseController.java

@@ -2,6 +2,7 @@ package com.xintong.visualinspection.controller;
 
 import java.io.FileNotFoundException;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 
 import com.alibaba.fastjson.JSON;
+import com.github.pagehelper.PageInfo;
 import com.xintong.system.err.BusinessException;
 import com.xintong.system.err.ErrorCode;
 
@@ -84,6 +86,21 @@ public class BaseController {
     }
     
     /**
+     * 返回前台结果分页结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessPageResult(Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", "success");
+    	result.put("result_data", new PageInfo((List)o));
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm");
+    }
+    
+    /**
      * 返回前台结果结构体
      * @return
      * String

+ 16 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleController.java

@@ -105,6 +105,22 @@ public class CheckRuleController extends BaseController {
     }
     
     /**
+     * 通过id获取考核项List
+     * @return
+     * String
+     * @exception
+     * @since
+     */
+    @RequestMapping(value = "/getListById")
+    public String getByListId(@RequestBody CheckRule checkRule){
+    	if(checkRule.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	CheckRule cr = checkRuleService.getListById(checkRule.getId());
+    	return super.returnSuccessResult(cr);
+    }
+    
+    /**
      * 通过名称获取考核办法
      * @return
      * String

+ 57 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleItemController.java

@@ -0,0 +1,57 @@
+package com.xintong.visualinspection.controller;
+
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.CheckItem;
+import com.xintong.visualinspection.service.CheckRuleItemService;
+
+/**
+ * 文件名:CheckRuleIem
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/checkRuleItem")
+public class CheckRuleItemController extends BaseController {
+
+	@Autowired
+	private CheckRuleItemService checkRuleItemService ;
+	
+	/**
+     * 增加考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody CheckItem checkItem){
+    	if(checkItem.getId()==null && checkItem.getRule_id()==null){
+    		throw new BusinessException(20002);
+    	}
+    	checkRuleItemService.insert(checkItem);
+    	return super.returnSuccessResult("增加成功");
+    }
+    
+    /**
+     * 删除考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody CheckItem checkItem){
+    	if(checkItem.getId() ==null && checkItem.getRule_id()==null){
+    		throw new BusinessException(20002);
+    	}
+    	checkRuleItemService.delete(checkItem);
+    	return super.returnSuccessResult("删除成功");
+    }
+}

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

@@ -87,6 +87,17 @@ public class DepartmentController extends BaseController {
      * @param size
      * @return
      */
+    @RequestMapping(value = "/get/all",method=RequestMethod.POST,produces="application/json;charset=UTF-8")
+    public String getAll(){
+        try{
+        	Organ organ=new Organ();
+        	organ.setStatus(0);
+        	List<Organ> organs= departmentService.getAll();
+        	return returnResult(0, "获取成功", organs);
+        }catch(Exception e){
+        	throw new BusinessException(20001);
+        }
+    }
     @RequestMapping(value = "/get/all",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
     public String getAllDept(){
         try{

+ 4 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java

@@ -5,6 +5,7 @@ import java.util.List;
 import javax.validation.Valid;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -87,9 +88,9 @@ public class ScoreController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/getScoreList")
-    public String getScoreList(@RequestBody Score score){
+    @RequestMapping(value = "/getScoreList/{page}/{size}")
+    public String getScoreList(@PathVariable Integer page,@PathVariable Integer size, @RequestBody Score score){
     	List<Score> scorelist = scoreService.getScoreList(score);
-    	return super.returnSuccessResult(scorelist);
+    	return super.returnSuccessPageResult(scorelist);
     }
 }

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

@@ -13,6 +13,7 @@ import com.xintong.visualinspection.bean.Organ;
  */
 @Mapper
 public interface DepartmentDao  {
+	public List<Organ> getAll();
     public List<Organ> getOrgan(Organ organ);
     public void insert(Organ organ);
     public void update(Organ organ);

+ 19 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckRuleItemDao.java

@@ -0,0 +1,19 @@
+package com.xintong.visualinspection.dao.master;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.xintong.visualinspection.bean.CheckItem;
+
+/**
+ * 文件名:CheckRuleDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface CheckRuleItemDao  {
+    public void insert(CheckItem checkItem);
+   
+    public void delete(CheckItem checkItem);
+    
+    public Integer selectItemCount(CheckItem checkItem);
+   
+}

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

@@ -23,13 +23,12 @@
         <result column="entrance_etc" property="entrance_etc" jdbcType="VARCHAR" />
         <result column="deptid" property="deptid" jdbcType="VARCHAR" />
     </resultMap>
-   <!--  <select id="getAll" resultMap="BaseResultMap"  >
-        SELECT
-        id,organname,remark,parentid,classtype,organcode,isshow,deptype,status 
+    <select id="getAll" resultMap="BaseResultMap"  >
+        SELECT * 
         FROM t_sys_organ
     </select>
 
-    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+    <!-- <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
         SELECT
         id,organname,remark,parentid,classtype,organcode,isshow,deptype,status
         FROM t_sys_organ

+ 5 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml

@@ -17,15 +17,19 @@
         <result column="name" property="name" jdbcType="VARCHAR" />
         <result column="start_time" property="start_time" jdbcType="DATE" />
         <result column="end_time" property="end_time" jdbcType="DATE" />
+        
+        <result column="code_name" property="code_name" jdbcType="VARCHAR" />
     </resultMap>
 
     <select id="getList" resultMap="BaseResultMap" parameterType="com.xintong.visualinspection.bean.CheckAppeal" >
-        SELECT ca.*,ct.name,ct.start_time,ct.end_time FROM check_appeal ca LEFT JOIN check_task ct ON ca.task_id=ct.id 
+        SELECT ca.*,ct.name,ct.start_time,ct.end_time,sc.code_name FROM check_appeal ca LEFT JOIN check_task ct ON ca.task_id=ct.id 
+        LEFT JOIN sys_code sc ON ca.check_status=sc.code_value
         WHERE 1=1 
         <if test="start_time != null">AND ct.start_time >= #{start_time}</if>
         <if test="end_time != null">
         	<![CDATA[ AND ct.end_time < #{end_time}]]>
         </if>
+        <if test="appeal_dept != null">AND ca.appeal_dept = #{appeal_dept}</if>
         ORDER BY ca.appeal_time DESC
     </select>
 

+ 27 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleItemMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.dao.master.CheckRuleItemDao" >
+
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckItem" >
+        INSERT INTO
+        check_rule_item
+        (rule_id,item_id)
+        VALUES
+        (#{rule_id},#{id})
+    </insert>
+
+    
+    <delete id="delete" parameterType="com.xintong.visualinspection.bean.CheckItem" >
+        DELETE FROM
+        check_rule_item
+        WHERE
+        rule_id=#{rule_id} and item_id=#{id}
+    </delete>
+    
+    <select id="selectItemCount" parameterType="com.xintong.visualinspection.bean.CheckItem" resultType="java.lang.Integer">
+    	SELECT COUNT(1) FROM check_rule_item 
+    	WHERE
+    	rule_id=#{rule_id} and item_id=#{id}
+    </select>
+    
+</mapper>

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

@@ -8,6 +8,8 @@
         <result column="pics" property="pics" jdbcType="VARCHAR" />
         <result column="videos" property="videos" jdbcType="VARCHAR" />
         <result column="check_item_id" property="check_item_id" jdbcType="INTEGER" />
+        <result column="check_item_name" property="check_item_name" jdbcType="VARCHAR" />
+        <result column="check_item_score" property="check_item_score" jdbcType="INTEGER" />
         <result column="content" property="content" jdbcType="VARCHAR" />
         <result column="checkman" property="checkman" jdbcType="VARCHAR" />
         <result column="checked_person" property="checked_person" jdbcType="INTEGER" />
@@ -27,8 +29,10 @@
     </select>
     
     <select id="getScoreList" parameterType="java.lang.Long" resultMap="BaseResultMap" >
-        SELECT *
-        FROM check_score
+        SELECT *,
+        	  a.score as check_item_score,
+        	  a.name as check_item_name
+        FROM check_score left join check_item a on check_item_id=a.id
         WHERE 1=1
         	 <if test="checked_person != null">AND checked_person = #{checked_person}</if>
         	 <if test="check_item_id != null">AND check_item_id = #{check_item_id}</if>

+ 20 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleItemService.java

@@ -0,0 +1,20 @@
+package com.xintong.visualinspection.service;
+
+import com.xintong.visualinspection.bean.CheckItem;
+
+/**
+ * 
+ *
+ * ConstantService
+ * 
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ * 
+ * @version 1.0.0
+ *
+ */
+public interface CheckRuleItemService {
+    public String insert(CheckItem checkItem);
+    public void delete(CheckItem checkItem);
+}

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

@@ -21,6 +21,7 @@ public interface CheckRuleService {
     public List<CheckRule> getAll();
     public List<CheckRule> getAllAndCountItem(CheckRule checkRule);
     public CheckRule getById(Long id);
+    public CheckRule getListById(Long id);
     public List<CheckRule> getByName(String name);
     public void insert(CheckRule checkRule);
     public void update(CheckRule checkRule);

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

@@ -9,6 +9,8 @@ import com.xintong.visualinspection.bean.Organ;
  * 文件名:UserService 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 public interface DepartmentService {
+	public List<Organ> getAll();
+	
 	public List<Organ> getOrgans(Organ organ);
 
 	public void insert(Organ organ);

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

@@ -4,6 +4,7 @@ import com.xintong.visualinspection.bean.User;
 import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.core.userdetails.UserDetailsService;
 
+import java.util.HashMap;
 import java.util.List;
 
 /**

+ 26 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckAppealServiceImpl.java

@@ -1,6 +1,6 @@
 package com.xintong.visualinspection.service.impl;
 
-import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import org.slf4j.LoggerFactory;
@@ -11,6 +11,8 @@ import com.xintong.visualinspection.bean.CheckAppeal;
 import com.xintong.visualinspection.dao.master.CheckAppealDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.CheckAppealService;
+import com.xintong.visualinspection.service.UserService;
+import com.xintong.visualinspection.util.CacheUtil;
 
 /**
  * 文件名:UserServiceImpl
@@ -24,12 +26,33 @@ public class CheckAppealServiceImpl extends BaseService implements CheckAppealSe
 
     @Autowired
     private CheckAppealDao checkAppealDao;
-
+    @Autowired
+    private UserService userService;
 
 	@Override
 	public List<CheckAppeal> getList(CheckAppeal param) {
 		List<CheckAppeal> list = checkAppealDao.getList(param);
-		return list ;
+		return getList(list) ;
+	}
+	public List<CheckAppeal> getList(List<CheckAppeal> checkAppeallist){
+		for (CheckAppeal checkAppeal : checkAppeallist) {
+			if(CacheUtil.userMap.get(checkAppeal.getAppeal_man().intValue())==null){
+				checkAppeal.setAppeal_man_name("-");
+			}else{
+				checkAppeal.setAppeal_man_name(CacheUtil.userMap.get(checkAppeal.getAppeal_man().intValue()).getTruename());
+			}
+			if(CacheUtil.userMap.get(checkAppeal.getVerify_person().intValue())==null){
+				checkAppeal.setVerify_person_name("-");
+			}else{
+				checkAppeal.setVerify_person_name(CacheUtil.userMap.get(checkAppeal.getVerify_person().intValue()).getTruename());
+			}
+			if(CacheUtil.deptMap.get(checkAppeal.getAppeal_dept().intValue())==null){
+				checkAppeal.setAppeal_dept_name("-");
+			}else{
+				checkAppeal.setAppeal_dept_name(CacheUtil.deptMap.get(checkAppeal.getAppeal_dept().intValue()).getOrganname());
+			}
+		}
+		return checkAppeallist;
 	}
 
 	@Override

+ 4 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckItemServiceImpl.java

@@ -48,6 +48,10 @@ public class CheckItemServiceImpl extends BaseService implements CheckItemServic
 				}
 				checkItemList.add(o);
 				map.put(o.getParent_id(), checkItemList);
+			}else{
+				if(!map.containsKey(o.getId())){
+					map.put(o.getId(), new ArrayList<>());
+				}
 			}
 		}
 		// 找出子

+ 46 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleItemServiceImpl.java

@@ -0,0 +1,46 @@
+package com.xintong.visualinspection.service.impl;
+
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.xintong.visualinspection.bean.CheckItem;
+import com.xintong.visualinspection.bean.CheckRule;
+import com.xintong.visualinspection.dao.master.CheckRuleItemDao;
+import com.xintong.visualinspection.service.BaseService;
+import com.xintong.visualinspection.service.CheckRuleItemService;
+
+/**
+ * 文件名:UserServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+public class CheckRuleItemServiceImpl extends BaseService implements CheckRuleItemService {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CheckRuleItemServiceImpl.class);
+
+    @Autowired
+    private CheckRuleItemDao checkRuleItemDao ;
+	
+
+	@Override
+	public void delete(CheckItem checkItem) {
+		// TODO Auto-generated method stub
+		checkRuleItemDao.delete(checkItem);
+		
+	}
+
+
+	@Override
+	public String insert(CheckItem checkItem) {
+		// TODO Auto-generated method stub
+		// 避免插入数据重复
+		Integer hasCount = checkRuleItemDao.selectItemCount(checkItem) ;
+		if(hasCount >0){
+			return "数据已存在";
+		}
+		checkRuleItemDao.insert(checkItem);
+		return null ;
+	}
+  
+}

+ 86 - 25
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleServiceImpl.java

@@ -4,6 +4,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,10 +12,12 @@ import org.springframework.stereotype.Service;
 
 import com.xintong.visualinspection.bean.CheckItem;
 import com.xintong.visualinspection.bean.CheckRule;
+import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.dao.master.CheckItemDao;
 import com.xintong.visualinspection.dao.master.CheckRuleDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.CheckRuleService;
+import com.xintong.visualinspection.util.CacheUtil;
 
 /**
  * 文件名:UserServiceImpl
@@ -40,33 +43,80 @@ public class CheckRuleServiceImpl extends BaseService implements CheckRuleServic
 
 	@Override
 	public CheckRule getById(Long id) {
+		CheckRule obj = checkRuleDao.getOne(id);
+		// 获取子类的父
+		return obj ;
+	}
+	
+	@Override
+	public CheckRule getListById(Long id) {
 		// 这边要对所有取出来的checkItem数据进行处理
 		CheckRule obj = checkRuleDao.getOne(id);
-//		List<CheckItem> lists = checkItemDao.getAll();
-//		for(CheckItem checkItem : obj.getCheck_items()){
-//			
-//		}
-		return null ;
+		List<CheckItem> lists = checkItemDao.getAll();
+		List<CheckItem> result_list = new ArrayList<>();
+		Map<Long,CheckItem> map = new HashMap<>();
+		for(CheckItem o : obj.getCheck_items()){
+			map.put(o.getId(),o);
+			getMyParent(o, lists, map);
+		}
+		// 把map中value全部拿出来
+		for(CheckItem o : map.values()){
+			result_list.add(o);
+		}
+		obj.setCheck_items(getCheckItems(result_list));
+		return obj;
+	}
+	
+	private void getMyParent(CheckItem checkItem,List<CheckItem> lists,Map<Long,CheckItem> map ){
+		if(checkItem.getParent_id() !=null && checkItem.getParent_id()!=0){
+			for(CheckItem obj : lists){
+				if(checkItem.getParent_id() == obj.getId()){
+					// 判断这个有没有父亲了
+					if(obj.getParent_id()!=null){
+						getMyParent(obj,lists,map);
+					}
+					if(!map.containsKey(obj.getId())){
+						map.put(obj.getId(), obj);
+					}
+					break;
+				}
+			}
+		}
+	}
+	
+	// 将list 父子分别排序好 (静态模板函数)
+	private List<CheckItem> getCheckItems(List<CheckItem> obj) {
+		List<CheckItem> checkItems = obj;
+		List<CheckItem> olist = new ArrayList<>();
+		Map<Long, List<CheckItem>> map = new HashMap<>();
+		// 找出所有父
+		for (CheckItem o : checkItems) {
+			if (o.getParent_id() != null && o.getParent_id()!=0) {
+				List<CheckItem> checkItemList = map.get(o.getParent_id());
+				if (checkItemList == null) {
+					checkItemList = new ArrayList<>();
+				}
+				checkItemList.add(o);
+				map.put(o.getParent_id(), checkItemList);
+			}else{
+				if(!map.containsKey(o.getId())){
+					map.put(o.getId(), new ArrayList<>());
+				}
+			}
+		}
+		// 找出子
+		for (Long oid : map.keySet()) {
+			for (CheckItem m2 : checkItems) {
+				if (m2.getId() == oid) {
+					m2.setSubCheckItem(map.get(oid));
+					if (m2.getParent_id() == null || m2.getParent_id()==0) {
+						olist.add(m2);
+					}
+				}
+			}
+		}
+		return olist;
 	}
-
-//	public CheckItem getCheckPItems(List<CheckItem> ruleItemList,CheckItem obj) {
-//		for(CheckItem o : ruleItemList){
-//			if(obj.getParent_id() == o.getId()){
-//				if(o.getSubCheckItem()!=null){
-//					o.getSubCheckItem().add(obj);
-//				}else{
-//					o.setSubCheckItem(new ArrayList<>());
-//					o.getSubCheckItem().add(obj);
-//				}
-//				if(o.getParent_id()!=null && o.getParent_id()!=0){
-//					getCheckPItems(ruleItemList,o);
-//				}else{
-//					return o;
-//				}
-//			}
-//		}
-//		return obj ;
-//	}
 	
 	@Override
 	public List<CheckRule> getByName(String name) {
@@ -109,6 +159,17 @@ public class CheckRuleServiceImpl extends BaseService implements CheckRuleServic
 
 	@Override
 	public List<CheckRule> getAllAndCountItem(CheckRule checkRule) {
-		return checkRuleDao.getAllAndCountItem(checkRule);
+		
+		List<CheckRule> lists = checkRuleDao.getAllAndCountItem(checkRule);
+		for(CheckRule c:lists){
+			if(c.getChecked_dept_id()!=null){
+				Organ obj = CacheUtil.deptMap.get(c.getChecked_dept_id());
+				if(obj!=null){
+					c.setChecked_dept_name(obj.getOrganname());					
+				}
+				
+			}
+		}
+		return  lists;
 	}
 }

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

@@ -85,4 +85,10 @@ public class DepartmentServiceImpl extends BaseService implements DepartmentServ
 		return departmentDao.getAllFS();
 	}
 
+	@Override
+	public List<Organ> getAll() {
+		// TODO Auto-generated method stub
+		return departmentDao.getAll();
+	}
+
 }

+ 40 - 4
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamServiceImpl.java

@@ -1,16 +1,18 @@
 package com.xintong.visualinspection.service.impl;
 
+import java.util.HashMap;
 import java.util.List;
 
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Team;
 import com.xintong.visualinspection.dao.master.TeamDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.TeamService;
+import com.xintong.visualinspection.service.UserService;
+import com.xintong.visualinspection.util.CacheUtil;
 
 /**
  * 文件名:UserServiceImpl
@@ -24,7 +26,8 @@ public class TeamServiceImpl extends BaseService implements TeamService {
 
     @Autowired
     private TeamDao teamDao;
-
+    @Autowired
+    private UserService userService;
 
 	@Override
 	public List<Team> getAll() {
@@ -71,7 +74,40 @@ public class TeamServiceImpl extends BaseService implements TeamService {
 	@Override
 	public List<Team> getTeamByName(Team team) {
 		// TODO Auto-generated method stub
-		return teamDao.getTeamByName(team);
+		return getList(teamDao.getTeamByName(team));
+	}
+	
+	public List<Team> getList(List<Team> teamlist){
+		for (Team team : teamlist) {
+			if(CacheUtil.userMap.get(team.getMonitor().intValue()) == null){
+				team.setMonitor_name("-");
+			}else{
+				team.setMonitor_name(CacheUtil.userMap.get(team.getMonitor().intValue()).getTruename());
+			}
+			if(CacheUtil.userMap.get(team.getSub_monitor().intValue())==null){
+				team.setSub_monitor_name("-");
+			}else{
+				team.setSub_monitor_name(CacheUtil.userMap.get(team.getSub_monitor().intValue()).getTruename());
+			}
+			String[] user_ids = team.getUser_ids().split(",");
+			String user_ids_name = "";
+			for(int i=0;i<user_ids.length;i++){
+				if(CacheUtil.userMap.get(Integer.valueOf(user_ids[i]))==null){
+					if(i == 0){
+						user_ids_name = user_ids_name + "-";
+					}else{
+						user_ids_name = user_ids_name + "、-";
+					}
+				}else{
+					if(i==0){
+						user_ids_name = user_ids_name + CacheUtil.userMap.get(Integer.valueOf(user_ids[i])).getTruename();
+					}else{
+						user_ids_name = user_ids_name + "、" + CacheUtil.userMap.get(Integer.valueOf(user_ids[i])).getTruename();
+					}
+				}
+			}
+			team.setUser_ids_name(user_ids_name);
+		}
+		return teamlist;
 	}
-
 }

+ 3 - 10
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/UserServiceImpl.java

@@ -1,15 +1,5 @@
 package com.xintong.visualinspection.service.impl;
 
-import com.xintong.visualinspection.bean.Permission;
-import com.xintong.visualinspection.bean.User;
-import com.xintong.visualinspection.dao.cluster.UserInfoDao;
-import com.xintong.visualinspection.dao.master.PermissionDao;
-import com.xintong.visualinspection.dao.master.UserDao;
-import com.xintong.visualinspection.pojo.SimpleGrantedAuthority;
-import com.xintong.visualinspection.service.BaseService;
-import com.xintong.visualinspection.service.UserService;
-import lombok.Data;
-
 import java.util.ArrayList;
 import java.util.List;
 
@@ -26,9 +16,12 @@ import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.dao.cluster.UserInfoDao;
 import com.xintong.visualinspection.dao.master.PermissionDao;
 import com.xintong.visualinspection.dao.master.UserDao;
+import com.xintong.visualinspection.pojo.SimpleGrantedAuthority;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.UserService;
 
+import lombok.Data;
+
 /**
  * 文件名:UserServiceImpl
  * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.

+ 14 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/util/CacheUtil.java

@@ -0,0 +1,14 @@
+package com.xintong.visualinspection.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.bean.User;
+
+public class CacheUtil {
+	
+	public static Map<Integer,User> userMap = new HashMap<Integer,User>();
+	
+	public static Map<Integer,Organ> deptMap = new HashMap<Integer,Organ>();
+}

+ 1 - 1
VisualInspection_server/src/main/resources/application.properties

@@ -1,6 +1,6 @@
 server.port=8089
 spring.thymeleaf.cache=false
-
+context.listener.classes=com.xintong.SystemInit
 
 master.datasource.url = jdbc:mysql://git_xt.git.topm.win:9001/visualinspection?useUnicode=true&characterEncoding=utf-8
 master.datasource.username = root