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

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

# Conflicts:
#	VisualInspection/js/lib/mytable.js
minitiger 9 лет назад
Родитель
Сommit
0b85e53954
32 измененных файлов с 537 добавлено и 125 удалено
  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. 1 1
      VisualInspection/js/config.js
  6. 4 1
      VisualInspection/js/lib/mytable.js
  7. 2 1
      VisualInspection/js/teamClass/charge_team_schedule.js
  8. 4 2
      VisualInspection/js/teamClass/check_team_schedule.js
  9. 4 5
      VisualInspection/js/term_management/charge_terms_m.js
  10. 4 5
      VisualInspection/js/term_management/check_terms_m.js
  11. 3 1
      VisualInspection/js/util/util.js
  12. 1 1
      VisualInspection/view/appeal_management/appeal_list.html
  13. 3 3
      VisualInspection/view/assess_management/assess_item.html
  14. 2 2
      VisualInspection/view/assess_management/assess_way.html
  15. 7 7
      VisualInspection/view/assess_management/assess_way_edit.html
  16. 10 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppeal.java
  17. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckRule.java
  18. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Team.java
  19. 16 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleController.java
  20. 57 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleItemController.java
  21. 11 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/DepartmentController.java
  22. 19 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckRuleItemDao.java
  23. 5 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml
  24. 27 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleItemMapper.xml
  25. 20 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleItemService.java
  26. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckRuleService.java
  27. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/UserService.java
  28. 26 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckAppealServiceImpl.java
  29. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckItemServiceImpl.java
  30. 46 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleItemServiceImpl.java
  31. 86 25
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleServiceImpl.java
  32. 40 4
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamServiceImpl.java

+ 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) {

+ 1 - 1
VisualInspection/js/config.js

@@ -1,4 +1,4 @@
-var base_ui_url = "http://localhost:8081/";
+var base_ui_url = "http://localhost:8080/";
 var base_server_url = "http://localhost:8089/";
 
 

+ 4 - 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); 
@@ -129,8 +131,9 @@
                             }
                         }else if(obj[cols[i].field]){
                             dArr.push(obj[cols[i].field]);
+                        
                         }else {
-                            dArr.push('');
+                            dArr.push('0');
                         }
                     }
                     

+ 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;">\

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

@@ -126,7 +126,9 @@ function showPopup4Common(title,callback,area,divId){
         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>

+ 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 ;
 }

+ 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;
+    
 }

+ 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{

+ 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);
+   
+}

+ 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>

+ 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);

+ 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;
 	}
 }

+ 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;
 	}
-
 }