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

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

# Conflicts:
#	VisualInspection_server/src/main/resources/application.properties
minitiger 9 лет назад
Родитель
Сommit
66c0307846
30 измененных файлов с 1217 добавлено и 259 удалено
  1. 39 0
      VisualInspection/js/appeal_management/appeal_list.js
  2. 12 3
      VisualInspection/js/lib/mytable.js
  3. 237 0
      VisualInspection/js/teamClass/charge_team_schedule.js
  4. 225 37
      VisualInspection/js/teamClass/check_team_schedule.js
  5. 17 9
      VisualInspection/js/term_management/charge_terms_m.js
  6. 19 11
      VisualInspection/js/term_management/check_terms_m.js
  7. 84 7
      VisualInspection/js/user/addUser.js
  8. 4 3
      VisualInspection/js/user/login.js
  9. 25 9
      VisualInspection/js/user/userManager.js
  10. 2 0
      VisualInspection/js/util/const.js
  11. 28 0
      VisualInspection/js/util/service.js
  12. 48 1
      VisualInspection/js/util/util.js
  13. 28 38
      VisualInspection/view/appeal_management/appeal_list.html
  14. 69 115
      VisualInspection/view/term_management/charge_stuff_schedule.html
  15. 17 20
      VisualInspection/view/term_management/check_stuff_schedule.html
  16. 51 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppeal.java
  17. 4 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Team.java
  18. 93 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckAppealController.java
  19. 24 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamClassController.java
  20. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java
  21. 20 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckAppealDao.java
  22. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TeamClassDao.java
  23. 3 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml
  24. 55 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml
  25. 9 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamClassMapper.xml
  26. 4 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamMapper.xml
  27. 25 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckAppealService.java
  28. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TeamClassService.java
  29. 59 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckAppealServiceImpl.java
  30. 11 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamClassServiceImpl.java

+ 39 - 0
VisualInspection/js/appeal_management/appeal_list.js

@@ -0,0 +1,39 @@
+$(document).ready(function(){
+    queryTable();   
+    function queryTable(){
+        var data = {}
+        var name = $("#select_name").val();
+        if(name!=''){
+            data.name = name ;
+        }
+        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: 100, text: '操作',  flex: false, colClass: '',field:'id',field_other:'task_id',oper:[
+                            {func:'seeCheckAudit',text:'查看稽查结果',col_class:''},{func:'distributionAgain',text:'在分配',col_class:''}
+                        ]},
+                    ] ;
+        
+        $('.datatable').mytable({'cols':cols,
+                                'url':"checkAppeal/getList",
+                                'param':data}
+                                );
+    }
+
+
+})
+//查看稽查结果
+function seeCheckAudit(id,task_id){
+    alert("task_id:"+task_id+"---id:"+id)
+}
+//再分配
+function distributionAgain(id,task_id){
+    alert("task_id:"+task_id+"---id:"+id)
+}
+

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

@@ -98,19 +98,28 @@
                 var row = {checked: false, data:null};
                 var dArr=[];
                 for(var i=0;i<cols.length;i++){
-                    if(cols[i].oper!=null) {
+                    if(cols[i].func!=null){
+                        dArr.push(cols[i].func(obj[cols[i].field]));
+                    }else if(cols[i].oper!=null) {
                         var oper = cols[i].oper;
                         var operStr="";
                         for(var j=0;j<oper.length;j++){
-                            operStr+='<a href="#" onclick="'+oper[j].func+'('+obj[cols[i].field]+')"><i class="icon '+oper[j].col_class+'"></i>'+oper[j].text+'</a> ';
+                            operStr+='<a href="#" onclick="'+oper[j].func+'('+obj[cols[i].field]+','+obj[cols[i].field_other]+')"><i class="icon '+oper[j].col_class+'"></i>'+oper[j].text+'</a> ';
                         }
                         dArr.push(operStr);
                     }else{
-                        if(obj[cols[i].field])
+                        if(cols[i].type == "date"){
+                            if(cols[i].custom){
+                                dArr.push(timeStamp2String(obj[cols[i].field],cols[i].date_type) + cols[i].custom);
+                            }else{
+                                dArr.push(timeStamp2String(obj[cols[i].field],cols[i].date_type));
+                            }
+                        }else if(obj[cols[i].field])
                             dArr.push(obj[cols[i].field]);
                         else 
                             dArr.push('');
                     }
+                    
                 }
                 row.data=dArr;
                 return row;

+ 237 - 0
VisualInspection/js/teamClass/charge_team_schedule.js

@@ -0,0 +1,237 @@
+  
+   $(document).ready(function() {
+
+        // 用户的dept_id
+        var user_dept_id = 12 ;
+        
+        // 收费小组type
+        var team_type = 1 ;
+
+        // 日期游标
+        var date_cursor = 0 ;
+
+        // var user = $.zui.store.get("user") ;  // 缓存用户信息,取出dept_id
+
+        $('#calendar').calendar();
+        var calendar = $('#calendar').data('zui.calendar');
+       
+        calendarInit();
+
+        // 请求稽查人员排班数据
+        function calendarInit(data_param){
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":getCurrentMonthFirst(),
+                "end_time":getCurrentMonthLast()
+            }
+            if(data_param != undefined){
+                data = data_param ;
+            }
+            getTeamClass(data,function(data){
+                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")};
+                    newEvents.push(obj);
+                }
+                calendar.addEvents(newEvents);
+            })
+        }
+
+        // 获取排班信息
+        function getTeamClass(data,_function){
+            post_common_service( "teamClass/getClassList",data,function(data){
+               _function(data);
+            },function(error){
+                return "" ;
+            })
+        }
+
+        // 更新日历数据
+        function updateCalendar(data){
+            calendar.events = [];
+            calendar.display();
+            calendarInit(data);
+        }
+
+        // 当月第一天
+        function getCurrentMonthFirst(){
+            var date=new Date();
+            date.setDate(1);
+            return date.toLocaleDateString()+" 00:00:00";
+        }
+
+        // 当月最后一天
+        function getCurrentMonthLast(){
+            var date=new Date();
+            var currentMonth=date.getMonth();
+            var nextMonth=++currentMonth;
+            var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
+            var oneDay=1000*60*60*24;
+            return new Date(nextMonthFirstDay-oneDay).toLocaleDateString()+" 00:00:00";
+        }
+
+        // 上一个月或者下个月的第一天或者最后一天
+        function getMonthByCondition(pre_or_after,first_or_last){
+            if(first_or_last == 'first'){
+                var date=new Date();
+                date.setDate(1);
+                date.setMonth(date.getMonth()+pre_or_after);
+                return date;
+            }else if(first_or_last == 'last'){
+                var date = new Date();
+                var currentMonth=date.getMonth();
+                var nextMonth=++currentMonth;
+                var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
+                var oneDay=1000*60*60*24;
+                date = new Date(nextMonthFirstDay-oneDay);
+                date.setMonth(date.getMonth()+pre_or_after);
+                return date ;
+            }
+        }
+
+        $('#calendar').calendar().on("clickEvent.zui.calendar", function(event) {
+            // console.log(event);
+            click_function(event.event.start);
+        });
+
+        /**
+         * 点击日历触发函数
+         */
+        function click_function(date){
+            setAddTermTitle(date.format("yyyy-MM-dd"));
+            // 保存当前日期
+            $("#save_term_class").data("date",date.format("yyyy-MM-dd"));
+
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":date.format("yyyy-MM-dd 00:00:00"),
+                "end_time": date.format("yyyy-MM-dd 00:00:00")
+            }
+
+            getTeamClass(data,function(data){
+                for(var i=0;i<$("select[id*='_term']").length;i++){
+                    $("select[id*='_term']").eq(i).val("");
+                }
+                if(data.length > 0){
+                    $("#save_term_class").data("modify_flag",1);
+                    for(var i=0;i<data.length;i++){
+                        $(".class_team_"+data[i].class_type).val(data[i].team_id);
+                    }
+                }else{
+                     $("#save_term_class").data("modify_flag",0);
+                }
+                $('#myModal').modal();
+            })
+        }
+
+        $('#calendar').calendar().on("clickCell.zui.calendar", function(event) {
+            // console.log(event);
+            click_function(event.date);
+        });
+
+        // 下一个日期
+        $('#calendar').calendar().on("clickNextBtn.zui.calendar", function(event) {
+            // console.log(event);
+            date_cursor++ ;
+
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00")
+            }
+            updateCalendar(data);
+        });
+
+        // 上一个日期
+        $('#calendar').calendar().on("clickPrevBtn.zui.calendar", function(event) {
+            date_cursor-- ;
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00")
+            }
+            updateCalendar(data);
+        });
+
+        // 今天
+        $('#calendar').calendar().on("clickTodayBtn.zui.calendar", function(event) {
+            // console.log(event);
+            date_cursor = 0 ;
+            calendarInit();
+        });
+
+        $("#save_term_class").click(function(){
+            var data = [];
+            for(var i=0;i<$("select[id*='_term']").length;i++){
+                if($("select[id*='_term']").eq(i).val()!=""){
+                    var obj = {
+                        "class_type":i+1,
+                        "team_id":$("select[id*='_term']").eq(i).val(),
+                        "work_date": $("#save_term_class").data("date")+" 00:00:00",
+                        "start_time": $("#save_term_class").data("date")+" 00:00:00",
+                        "end_time": $("#save_term_class").data("date")+" 00:00:00",
+                        "dept_id":user_dept_id
+                    };
+                    data.push(obj);
+                }
+            }
+            if(data.length == 0 ){
+                tip("请增加排班!");
+                return ;
+            }
+            if( $("#save_term_class").data("modify_flag") != 1){
+                post_common_service("teamClass/add/list",data,function(data){
+                    updateCalendar();
+                    $('#myModal').modal('hide');
+                },function(error){
+                    $('#myModal').modal('hide');
+                })
+            }else{
+                post_common_service("teamClass/update/list",data,function(data){
+                    updateCalendar();
+                    $('#myModal').modal('hide');
+                },function(error){
+                    $('#myModal').modal('hide');
+                })
+            }
+        })
+
+        $("#close_btn").click(function(){
+            $('#myModal').modal('hide');
+        })
+
+        // 获取部门为1的班组信息
+        getTermClass(user_dept_id);
+
+        // 获取班组信息
+        function getTermClass(dept_id){
+            var data = {
+                'dept_id':dept_id ,
+                'type':team_type
+            }
+            post_common_service( "team/getTeamByDeptId/1/50",data,function(data){
+                for(var i=0;i<data.list.length;i++){
+                    $("#mooring_term,#middle_term,#night_term,#all_term").append("<option value='"+data.list[i].id+"'>"+data.list[i].name +"</option>")
+                }
+            },function(error){})
+        }
+
+   })
+
+   // 根据class_type 获取班次名称
+   function getTeamName(class_type){
+       if(class_type == 1){
+           return "早班";
+       }else if(class_type == 2){
+            return "中班";
+       }else if(class_type == 3){
+           return "晚班";
+       }else if(class_type == 4){
+           return "全班";
+       }
+   }
+
+   function setAddTermTitle(title){
+       $(".modal-title").html("添加班组-"+title);
+   }

+ 225 - 37
VisualInspection/js/teamClass/check_team_schedule.js

@@ -1,49 +1,237 @@
-
     
    $(document).ready(function() {
 
+        // 用户的dept_id
+        var user_dept_id = 1 ;
+        
+        // 稽查小组type
+        var team_type = 2 ;
+
+        // 日期游标
+        var date_cursor = 0 ;
+
+        // var user = $.zui.store.get("user") ;  // 缓存用户信息,取出dept_id
+
         $('#calendar').calendar();
         var calendar = $('#calendar').data('zui.calendar');
-        var newEvents =
-        [
-            {title: '考核二班-晚班',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '考核三班-晚班',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '考核四班-晚班',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '考核一班-休息',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '考核二班-晚班',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '考核三班-晚班',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '考核四班-晚班',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '考核一班-休息',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11 '},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11'},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11 '},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11 '},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13 '},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13'},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13 '},
-           
-        ];
-        calendar.addEvents(newEvents);
+       
+        calendarInit();
 
         // 请求稽查人员排班数据
-      
-        var data = {
-            "dept_id":1 ,
-            "start_time":new Date(),
-            "end_time":new Date()
+        function calendarInit(data_param){
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":getCurrentMonthFirst(),
+                "end_time":getCurrentMonthLast()
+            }
+            if(data_param != undefined){
+                data = data_param ;
+            }
+            getTeamClass(data,function(data){
+                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")};
+                    newEvents.push(obj);
+                }
+                calendar.addEvents(newEvents);
+            })
+        }
+
+        // 获取排班信息
+        function getTeamClass(data,_function){
+            post_common_service( "teamClass/getClassList",data,function(data){
+               _function(data);
+            },function(error){
+                return "" ;
+            })
+        }
+
+        // 更新日历数据
+        function updateCalendar(data){
+            calendar.events = [];
+            calendar.display();
+            calendarInit(data);
+        }
+
+        // 当月第一天
+        function getCurrentMonthFirst(){
+            var date=new Date();
+            date.setDate(1);
+            return date.toLocaleDateString()+" 00:00:00";
+        }
+
+        // 当月最后一天
+        function getCurrentMonthLast(){
+            var date=new Date();
+            var currentMonth=date.getMonth();
+            var nextMonth=++currentMonth;
+            var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
+            var oneDay=1000*60*60*24;
+            return new Date(nextMonthFirstDay-oneDay).toLocaleDateString()+" 00:00:00";
+        }
+
+        // 上一个月或者下个月的第一天或者最后一天
+        function getMonthByCondition(pre_or_after,first_or_last){
+            if(first_or_last == 'first'){
+                var date=new Date();
+                date.setDate(1);
+                date.setMonth(date.getMonth()+pre_or_after);
+                return date;
+            }else if(first_or_last == 'last'){
+                var date = new Date();
+                var currentMonth=date.getMonth();
+                var nextMonth=++currentMonth;
+                var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
+                var oneDay=1000*60*60*24;
+                date = new Date(nextMonthFirstDay-oneDay);
+                date.setMonth(date.getMonth()+pre_or_after);
+                return date ;
+            }
         }
-        post_common_service( "teamClass/getClassList",data,function(data){
-            console.log(data );
-        },function(error){})
 
         $('#calendar').calendar().on("clickEvent.zui.calendar", function(event) {
-            console.log(event.event);
-            // alert(event.event.title);
-            // console.log("你点击了一个事件");
-            // 处理 clickEvent 事件
-            // ...
-            // 对话框弹出
-            $('#myModal').modal();
+            // console.log(event);
+            click_function(event.event.start);
+        });
+
+        /**
+         * 点击日历触发函数
+         */
+        function click_function(date){
+            setAddTermTitle(date.format("yyyy-MM-dd"));
+            // 保存当前日期
+            $("#save_term_class").data("date",date.format("yyyy-MM-dd"));
+
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":date.format("yyyy-MM-dd 00:00:00"),
+                "end_time": date.format("yyyy-MM-dd 00:00:00")
+            }
+
+            getTeamClass(data,function(data){
+                for(var i=0;i<$("select[id*='_term']").length;i++){
+                    $("select[id*='_term']").eq(i).val("");
+                }
+                if(data.length > 0){
+                    $("#save_term_class").data("modify_flag",1);
+                    for(var i=0;i<data.length;i++){
+                        $(".class_team_"+data[i].class_type).val(data[i].team_id);
+                    }
+                }else{
+                     $("#save_term_class").data("modify_flag",0);
+                }
+                $('#myModal').modal();
+            })
+        }
+
+        $('#calendar').calendar().on("clickCell.zui.calendar", function(event) {
+            // console.log(event);
+            click_function(event.date);
         });
 
-   })
+        // 下一个日期
+        $('#calendar').calendar().on("clickNextBtn.zui.calendar", function(event) {
+            // console.log(event);
+            date_cursor++ ;
+
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00")
+            }
+            updateCalendar(data);
+        });
+
+        // 上一个日期
+        $('#calendar').calendar().on("clickPrevBtn.zui.calendar", function(event) {
+            date_cursor-- ;
+            var data = {
+                "dept_id": user_dept_id ,
+                "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00")
+            }
+            updateCalendar(data);
+        });
+
+        // 今天
+        $('#calendar').calendar().on("clickTodayBtn.zui.calendar", function(event) {
+            // console.log(event);
+            date_cursor = 0 ;
+            calendarInit();
+        });
+
+        $("#save_term_class").click(function(){
+            var data = [];
+            for(var i=0;i<$("select[id*='_term']").length;i++){
+                if($("select[id*='_term']").eq(i).val()!=""){
+                    var obj = {
+                        "class_type":i+1,
+                        "team_id":$("select[id*='_term']").eq(i).val(),
+                        "work_date": $("#save_term_class").data("date")+" 00:00:00",
+                        "start_time": $("#save_term_class").data("date")+" 00:00:00",
+                        "end_time": $("#save_term_class").data("date")+" 00:00:00",
+                        "dept_id":user_dept_id
+                    };
+                    data.push(obj);
+                }
+            }
+            if(data.length == 0 ){
+                tip("请增加排班!");
+                return ;
+            }
+            if( $("#save_term_class").data("modify_flag") != 1){
+                post_common_service("teamClass/add/list",data,function(data){
+                    updateCalendar();
+                    $('#myModal').modal('hide');
+                },function(error){
+                    $('#myModal').modal('hide');
+                })
+            }else{
+                post_common_service("teamClass/update/list",data,function(data){
+                    updateCalendar();
+                    $('#myModal').modal('hide');
+                },function(error){
+                    $('#myModal').modal('hide');
+                })
+            }
+        })
+
+        $("#close_btn").click(function(){
+            $('#myModal').modal('hide');
+        })
+
+        // 获取部门为1的班组信息
+        getTermClass(user_dept_id);
+
+        // 获取班组信息
+        function getTermClass(dept_id){
+            var data = {
+                'dept_id':dept_id ,
+                'type':team_type
+            }
+            post_common_service( "team/getTeamByDeptId/1/50",data,function(data){
+                for(var i=0;i<data.list.length;i++){
+                    $("#mooring_term,#middle_term,#night_term,#all_term").append("<option value='"+data.list[i].id+"'>"+data.list[i].name +"</option>")
+                }
+            },function(error){})
+        }
+
+   })
+
+   // 根据class_type 获取班次名称
+   function getTeamName(class_type){
+       if(class_type == 1){
+           return "早班";
+       }else if(class_type == 2){
+            return "中班";
+       }else if(class_type == 3){
+           return "晚班";
+       }else if(class_type == 4){
+           return "全班";
+       }
+   }
+
+   function setAddTermTitle(title){
+       $(".modal-title").html("添加班组-"+title);
+   }

+ 17 - 9
VisualInspection/js/term_management/charge_terms_m.js

@@ -11,12 +11,18 @@
         }
         var cols = [
                         {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
-                        {width: 160, text: '班组名称', flex: false,colClass: 'text-center',field:'name'},
-                        {width: 80, text: '所属人员分类',  flex: true, colClass: 'text-center',field:'type'},
-                        {width: 80, text: '班长', type: 'date', flex: false, sort: 'down',field:''},
-                        {width: 80, text: '副班长', type: 'string', flex: true, colClass: '',field:''},
-                        {width: 80, text: '人员',  flex: false, colClass: 'text-center',field:'user_ids'},
-                        {width: 50, text: '操作',  flex: false, colClass: 'text-center',field:'id',oper:[
+                        {width: 160, text: '班组名称', flex: false,colClass: '',field:'name'},
+                        {width: 80, text: '所属人员分类',  flex: false, colClass: '',field:'type',func:function(obj){
+                            if(obj==1){
+                                return "收费人员";
+                            }else if(obj == 2){
+                                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: 50, text: '操作',  flex: false, colClass: '',field:'id',oper:[
                             {func:'updateCheckTeam',text:'修改',col_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',col_class:'icon-remove-circle'}
                         ]},
                     ] ;
@@ -44,8 +50,8 @@
             $("#team_name").val(data.name);
             users = data.user_ids.split(",");
             for(i=0;i<users.length;i++){
-                $("#monitor").append('<option>'+users[i]+'</option>');
-                $("#second-monitor").append('<option>'+users[i]+'</option>');
+                $("#monitor").append('<option value="'+users[i]+'">'+users[i]+'</option>');
+                $("#second-monitor").append('<option value="'+users[i]+'">'+users[i]+'</option>');
                 $("#member").append('<div style="width:83px;float:left;">\
                                          <input type="checkbox" value="'+users[i]+'"><span>'+users[i]+'</span>\
                                      </div>');
@@ -92,7 +98,9 @@
             "dept_id":dept_id,
             "name":$("#team_name").val(),
             "user_ids":user_ids,
-            "type":1
+            "type":1,
+            "monitor":$("#monitor").val(),
+            "sub_monitor":$("#second-monitor").val()
         }
         if(idUpdate){
             //修改

+ 19 - 11
VisualInspection/js/term_management/check_terms_m.js

@@ -11,12 +11,18 @@
         }
         var cols = [
                         {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
-                        {width: 160, text: '班组名称', flex: false,colClass: 'text-center',field:'name'},
-                        {width: 80, text: '所属人员分类',  flex: true, colClass: 'text-center',field:'type'},
-                        {width: 80, text: '班长', type: 'date', flex: false, sort: 'down',field:''},
-                        {width: 80, text: '副班长', type: 'string', flex: true, colClass: '',field:''},
-                        {width: 80, text: '人员',  flex: false, colClass: 'text-center',field:'user_ids'},
-                        {width: 50, text: '操作',  flex: false, colClass: 'text-center',field:'id',oper:[
+                        {width: 160, text: '班组名称', flex: false,colClass: '',field:'name'},
+                        {width: 80, text: '所属人员分类',  flex: false, colClass: '',field:'type',func:function(obj){
+                            if(obj==1){
+                                return "收费人员";
+                            }else if(obj == 2){
+                                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: 50, text: '操作',  flex: false, colClass: '',field:'task_id',oper:[
                             {func:'updateCheckTeam',text:'修改',col_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',col_class:'icon-remove-circle'}
                         ]},
                     ] ;
@@ -44,8 +50,8 @@
             $("#team_name").val(data.name);
             users = data.user_ids.split(",");
             for(i=0;i<users.length;i++){
-                $("#monitor").append('<option>'+users[i]+'</option>');
-                $("#second-monitor").append('<option>'+users[i]+'</option>');
+                $("#monitor").append('<option value="'+users[i]+'">'+users[i]+'</option>');
+                $("#second-monitor").append('<option value="'+users[i]+'">'+users[i]+'</option>');
                 $("#member").append('<div style="width:83px;float:left;">\
                                          <input type="checkbox" value="'+users[i]+'"><span>'+users[i]+'</span>\
                                      </div>');
@@ -84,15 +90,17 @@
         if(user_ids != ""){
             user_ids = user_ids.substring(0,user_ids.length-1);
         }else{
-            // layer.msg('请选择人员');
-            // return;
+            layer.msg('请选择人员');
+            return;
         }
         data = {
             "id":team_id,
             "dept_id":dept_id,
             "name":$("#team_name").val(),
             "user_ids":user_ids,
-            "type":2
+            "type":2,
+            "monitor":$("#monitor").val(),
+            "sub_monitor":$("#second-monitor").val()
         }
         if(idUpdate){
             post_common_service("team/update", data, function(data){

+ 84 - 7
VisualInspection/js/user/addUser.js

@@ -1,19 +1,17 @@
 var dept_selectinput;
-var selectednodetemp;
+var usertemp;
 
 function loadUserData(nodedata) {
     var pnode = nodedata;
+    resetform()
 
     if (edittype == "add") {
         $("#dept_name").val("")
     }
     if (edittype == "edit") {
-        selectednodetemp = nodedata[0];
-        $("#dept_name").val(nodedata[0].name)
-        $("#dept_add_btn").html("保存")
-        if (pnode != null && pnode.length > 0) {
-            pnode = [dept_tree.getNodeByParam("id", pnode[0].pId, null)]
-        }
+        usertemp = nodedata;
+        pnode = [{ "id": usertemp.organid }]
+        initUserInfo()
     }
 
 
@@ -31,8 +29,71 @@ function loadUserData(nodedata) {
 
 }
 
+function resetform() {
+    $("#user_name").val("");
+    $("#user_true_name").val("");
+    $("#user_workno").val("");
+    $("#user_password").val("");
+    $("#user_confirm_password").val("")
+    $("#user_birth").val("")
+    $("#user_mobile").val("")
+    $("#user_position").val("")
+    $("#user_idno").val("")
+    $("#user_email").val("")
+
+}
+
+function initUserInfo() {
+
+    $("#user_name").val(usertemp.username);
+    $("#user_true_name").val(usertemp.truename);
+    $("#user_workno").val(usertemp.workno);
+    $("#user_password").val(usertemp.password);
+    $("#user_confirm_password").val(usertemp.password)
+    $("#user_birth").val(moment.unix(usertemp.birth / 1000).format("YYYY-MM-DD"))
+    $("#user_mobile").val(usertemp.mobile)
+    $("#user_position").val(usertemp.positionid)
+    $("#user_idno").val(usertemp.idno)
+    $("#user_email").val(usertemp.email)
+    if (typeof(usertemp.pic) != "undefinde" && usertemp.pic != null) {
+        $("#user_img_pre").removeClass("hide");
+        $("#user_img_add").addClass("hide");
+        var $section = $("#user_img_pre2");
+        var $span = $("<span class='up-span'>");
+        $span.appendTo($section);
+        var $img0 = $("<img class='close-upimg'>").on("click", function(event) {
+            event.preventDefault();
+            event.stopPropagation();
+            // $(".works-mask").show();
+            // delParent = $(this).parent();
+
+            $section.html("")
+            $("#user_img_add").removeClass("hide");
+            $("#user_img_pre").addClass("hide");
+
+        });
+        $img0.attr("src", "/js/lib/imageupload/img/a7.png").appendTo($section);
+        var $img = $("<img class='up-img up-opcity' id='user_pic'>");
+        $img.attr("src", base_server_url + usertemp.pic);
+        $img.appendTo($section);
+        var $p = $("<p class='img-name-p'>");
+        $p.html("image").appendTo($section);
+        var $input = $("<input id='taglocation' name='taglocation' value='' type='hidden'>");
+        $input.appendTo($section);
+        var $input2 = $("<input id='tags' name='tags' value='' type='hidden'/>");
+        $input2.appendTo($section);
+        $(".up-section").removeClass("loading");
+        $(".up-img").removeClass("up-opcity");
+    }
+
+
+}
+
+
 function addUser() {
 
+
+
     var username = $("#user_name").val();
     var userworkno = $("#user_workno").val();
     var userpassword = $("#user_password").val();
@@ -49,6 +110,7 @@ function addUser() {
     var parm = {
         "username": username,
         "password": userpassword,
+        "mobile": usermobile,
         "phone": usermobile,
         "workno": userworkno,
         "idno": useridno,
@@ -59,6 +121,21 @@ function addUser() {
         "positionid": 1,
         "truename": usertruename
     }
+    if (edittype == "edit") {
+        parm["id"] = usertemp.id;
+        UserUpdate(parm, function(data) {
+            layer.msg('修改成功!', {
+                time: 2000, //20s后自动关闭
+            }, function() {
+                $('#addUserModal').modal('hide')
+                updateUser(dept_selectinput.value)
+            });
+        }, function(error) {
+
+        });
+
+        return;
+    }
 
     UserAdd(parm, function(data) {
         layer.msg('添加成功!', {

+ 4 - 3
VisualInspection/js/user/login.js

@@ -1,8 +1,9 @@
 $(document).ready(function() {
+    $.zui.store.set("user", "");
 
-    $('html').bind('keydown',function(e){
-        if(e.keyCode==13){
-        // alert('enter'); 
+    $('html').bind('keydown', function(e) {
+        if (e.keyCode == 13) {
+            // alert('enter'); 
             $('#loadingBtn').click();
         }
     });

+ 25 - 9
VisualInspection/js/user/userManager.js

@@ -9,9 +9,9 @@
      flex: false,
      colClass: 'text-center'
  }, {
-     width: 10,
-     text: 'ID',
-     type: 'number',
+     width: 30,
+     text: '账号',
+     type: 'string',
      flex: false,
      colClass: 'text-center'
  }, {
@@ -35,13 +35,13 @@
      sort: 'down',
      colClass: 'text-center'
  }, {
-     width: 80,
+     width: 200,
      text: '角色',
      type: 'string',
      flex: true,
      colClass: 'text-center'
  }, {
-     width: 160,
+     width: 140,
      text: '操作',
      type: 'string',
      flex: true,
@@ -119,10 +119,26 @@
 
 
      $('.datatable').on('click', 'button', function() {
+         if (this.name == "user_edit") {
+             edittype = "edit"
+             var user = UserMap.get(parseInt(this.id));
+             loadUserData(user)
+             $('#addUserModal').modal('show')
+         }
+         if (this.name == "user_delete") {
+             UserDelete({ "id": this.id }, function(data) {
+                     layer.msg('用户删除成功!', {
+                         time: 2000, //20s后自动关闭
+                     }, function() {
+                         var nodedata = dept_tree.getSelectedNodes();
+                         updateUser(nodedata[0].id)
+                     });
+                 },
+                 function(error) {
+
+                 })
+         }
 
-         console.log(this.id)
-
-         console.log(UserMap.get(this.id))
      });
 
 
@@ -252,7 +268,7 @@
                      UserMap.set(user.id, user)
                      var userdata = {};
                      userdata["checked"] = false;
-                     userdata["data"] = [i + 1, user.id, user.username, user.workno == null ? -1 : user.workno, user.mobile, attr, '<button class="btn btn-primary" name="user_edit" id=' + user.id + '><i class="icon icon-edit"></i>修改</button>  <button class="btn btn-primary" name="user_delete" id=' + user.id + ' ><i class="icon icon-remove-circle"></i>删除</button>'];
+                     userdata["data"] = [i + 1, user.username, user.truename, user.workno == null ? -1 : user.workno, user.mobile, attr, '<button class="btn btn-primary" name="user_edit" id=' + user.id + '><i class="icon icon-edit"></i>修改</button>  <button class="btn btn-primary" name="user_delete" id=' + user.id + ' ><i class="icon icon-remove-circle"></i>删除</button>'];
                      rowdata.push(userdata);
                  }
              }

+ 2 - 0
VisualInspection/js/util/const.js

@@ -3,6 +3,8 @@ var USER_LOGIN = "/user/auth/login"
 var USER_LOGOUT = "/user/logout"
 var USER_GET_LIST = "/user/getUserList"
 var USER_ADD = "/user/addUser"
+var USER_UPDATE = "/user/updateUser/"
+var USER_DELETE = "/user/deleteUser/"
 
 
 var UI_USER_LOGIN = "view/user/login"

+ 28 - 0
VisualInspection/js/util/service.js

@@ -43,6 +43,34 @@ function UserAdd(data, success, fail) {
     });
 }
 
+function UserUpdate(data, success, fail) {
+    var url = base_server_url + USER_UPDATE + data.id
+    ajaxPut(url, data, function(response) {
+        var data = response;
+        if (data.result_code == 0) {
+            success(data.result_data)
+        } else {
+            fail(data.result_desc);
+        }
+    }, function(error) {
+        fail("网络错误");
+    });
+}
+
+function UserDelete(data, success, fail) {
+    var url = base_server_url + USER_DELETE + data.id
+    ajaxDelete(url, "", function(response) {
+        var data = response;
+        if (data.result_code == 0) {
+            success(data.result_data)
+        } else {
+            fail(data.result_desc);
+        }
+    }, function(error) {
+        fail("网络错误");
+    });
+}
+
 
 function MenuGetAll(success, fail) {
     var url = base_server_url + MENU_GET_ALL

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

@@ -197,4 +197,51 @@ function setLaneSelect(div,selectId){
 // ViewMap.set("/view/mytask/unexamined.html", __inline('/view/mytask/unexamined.html'));
 // ViewMap.set("/view/mytask/undispatched.html", __inline('/view/mytask/undispatched.html'));
 // ViewMap.set("/view/mytask/dispatched.html", __inline('/view/mytask/dispatched.html'));
-// ViewMap.set("/view/constant/constant.html", __inline('/view/constant/constant.html'));
+// ViewMap.set("/view/constant/constant.html", __inline('/view/constant/constant.html'));
+
+/**
+ * @Func 处理长整形时间格式化
+ * @time long
+ * @format string 有默认值
+ */
+function timeStamp2String(time,format){
+    if(time == "" || time == null)
+        return ;
+    if(format==undefined || format == "")
+        format = "yyyy/MM/dd hh:mm:ss";
+    var datetime = new Date();
+    datetime.setTime(time);
+    return datetime.Format(format);
+};
+
+/**
+ * @Func 时间格式化
+ * @FuncName Format
+ * (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 
+ */
+Date.prototype.Format = function (fmt) { 
+	 var o = {
+	     "M+": this.getMonth() + 1, 
+	     "d+": this.getDate(), 
+	     "h+": this.getHours(), 
+	     "m+": this.getMinutes(), 
+	     "s+": this.getSeconds(), 
+	     "q+": Math.floor((this.getMonth() + 3) / 3), 
+	     "S": this.getMilliseconds()
+	 };
+	 if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+	 for (var k in o)
+		 if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+	 return fmt;
+};
+
+/**
+ * 提示框
+ */
+function tip(data,timeout){
+    if(data==undefined || data=='')
+        return ;
+    layer.msg(data, {
+            time: (timeout!=null)?timeout:2000 //20s后自动关闭
+        });
+}

+ 28 - 38
VisualInspection/view/appeal_management/appeal_list.html

@@ -28,21 +28,11 @@
             <!-- 使用一个div来显示数据表格 -->
             <div class="datatable" data-checkable="true" data-sortable="true"></div>
         </div>
-        <div class="row" style="text-align:center">
-            <ul class="pager center-block">
-                <li class="previous"><a href="#">« 上一页</a></li>
-                <li><a href="#">1</a></li>
-                <li class="active"><a href="#">2</a></li>
-                <li><a href="#">3</a></li>
-                <li><a href="#">4</a></li>
-                <li><a href="#">5</a></li>
-                <li class="next"><a href="#">下一页 »</a></li>
-            </ul>
-        </div>
+        
 
 </div>
 <!--  end -->
-
+<script src="/js/appeal_management/appeal_list.js?_inline"></script>
 
 <script type="text/javascript">
      $(document).ready(function() {
@@ -62,32 +52,32 @@
         });
 
          // 使用data参数更新数据:
-        $('.datatable').datatable( {
-            checkable:false,
-            sortable:false,
-            data: {
-                cols: [
-                    {width: 30, text: '序号', type: 'number', flex: false, colClass: 'text-center'},
-                    {width: 100, text: '任务名称', type: 'date', flex: false, sort: 'down'},
-                    {width: 80, text: '考核人员', type: 'string', flex: true, colClass: ''},
-                     {width: 80, text: '考核部门', type: 'date', flex: false, sort: 'down'},
-                    {width: 80, text: '稽查人员', type: 'date', flex: false, sort: 'down'},
-                    {width: 120, text: '稽查时间段', type: 'string', flex: true, colClass: ''},
-                    {width: 80, text: '状态', type: 'date', flex: false, sort: 'down'},
-                    {width: 100, text: '上次稽查时间', type: 'string', flex: true, colClass: ''},
-                    {width: 100, text: '操作', type: 'string', flex: true, colClass: ''},
-                ],
-                rows: [
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                    {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
-                ]
-            }
-        });
+        // $('.datatable').datatable( {
+        //     checkable:false,
+        //     sortable:false,
+        //     data: {
+        //         cols: [
+        //             {width: 30, text: '序号', type: 'number', flex: false, colClass: 'text-center'},
+        //             {width: 100, text: '任务名称', type: 'date', flex: false, sort: 'down'},
+        //             {width: 80, text: '考核人员', type: 'string', flex: true, colClass: ''},
+        //              {width: 80, text: '考核部门', type: 'date', flex: false, sort: 'down'},
+        //             {width: 80, text: '稽查人员', type: 'date', flex: false, sort: 'down'},
+        //             {width: 120, text: '稽查时间段', type: 'string', flex: true, colClass: ''},
+        //             {width: 80, text: '状态', type: 'date', flex: false, sort: 'down'},
+        //             {width: 100, text: '上次稽查时间', type: 'string', flex: true, colClass: ''},
+        //             {width: 100, text: '操作', type: 'string', flex: true, colClass: ''},
+        //         ],
+        //         rows: [
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //             {checked: false, data: [1, '20170404收费站稽查任务','李明','收费站','王佳佳','2017-04-04 00:00-23:59','申诉中','2017-04-05 12:30','<a href="#"> 查看稽查结果</a> <a href="#"> 再分配</a>']},
+        //         ]
+        //     }
+        // });
     })
 </script>
 

+ 69 - 115
VisualInspection/view/term_management/charge_stuff_schedule.html

@@ -1,84 +1,78 @@
-
-                                <!--  start -->
-                                <div class="container-fluid ">
-                                        <div class="row">
-                                            <div class="col-sm-12">
-                                               <div id="calendar" class="calendar"></div>
-                                            </div>
-                                        </div>
-                                </div>
-                                <!--   end -->          
-          
-            <!--对话框 开始-->
-            <div class="modal fade" id="myModal">
-                    <div class="modal-dialog">
-                        <div class="modal-content">
-                            
+    
+<!--  start -->
+<div class="container-fluid ">
+    <div class="row">
+        <div class="col-sm-12">
+            <div id="calendar" class="calendar"></div>
+        </div>
+    </div>
+</div>
+<!--   end -->         
+<!--对话框 开始-->
+<div class="modal fade" id="myModal">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            
+        </div>
+        <div class="modal-content">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
+        <h4 class="modal-title">添加排班</h4>
+    </div>
+    <div class="modal-body">
+            <!-- 添加对话框 -->
+            <div class="container-fluid ">
+                <div class="form-horizontal">
+                    <div class="form-group">
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">早班</label>
+                        <div class="col-md-6 col-sm-8">
+                            <select id="mooring_term" type="text" class="form-control class_team_1" >
+                                <option value=''>请选择班组</option>
+                            </select>
                         </div>
-                        <div class="modal-content">
-                    <div class="modal-header">
-                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
-                        <h4 class="modal-title">添加排班-2017-03-05</h4>
                     </div>
-                    <div class="modal-body">
-                            <!-- 添加对话框 -->
-                            <div class="container-fluid ">
-                                <form class="form-horizontal">
-                                    <div class="form-group">
-                                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">收费一组</label>
-                                        <div class="col-md-6 col-sm-8">
-                                            <select type="text" class="form-control" >
-                                                <option>选择班次</option>
-                                            </select>
-                                        </div>
-                                    </div>
-                                    <div class="form-group">
-                                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">收费二组</label>
-                                        <div class="col-md-6 col-sm-8">
-                                            <select type="text" class="form-control" >
-                                                <option>选择班次</option>
-                                            </select>
-                                        </div>
-                                    </div>
-                                    <div class="form-group">
-                                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">收费三组</label>
-                                        <div class="col-md-6 col-sm-8">
-                                            <select type="text" class="form-control" >
-                                                <option>选择班次</option>
-                                            </select>
-                                        </div>
-                                    </div>
-                                    <div class="form-group">
-                                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">收费四组</label>
-                                        <div class="col-md-6 col-sm-8">
-                                            <select type="text" class="form-control" >
-                                                <option>选择班次</option>
-                                            </select>
-                                        </div>
-                                    </div>
-                                    
-                                    <hr>
-                                    
-                                    <div class="form-group">
-                                        <div class="col-sm-12">
-                                            <button type="submit" style="float:right;margin-right:3px;" class="btn btn-info">生成本月排班</button>
-                                            <button type="submit" style="float:right;margin-right:10px;" class="btn btn-info">生成今日排班</button>
-                                            <button type="submit" style="float:right;margin-right:10px;" class="btn btn">关闭</button>
-                                        </div>
-                                    </div>
-                                    </form>
-                            </div>
-                            <!--添加对话框结束-->
+                    <div class="form-group">
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">中班</label>
+                        <div class="col-md-6 col-sm-8">
+                            <select id="middle_term" type="text" class="form-control class_team_2" >
+                                <option value=''>请选择班组</option>
+                            </select>
+                        </div>
                     </div>
+                    <div class="form-group">
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">晚班</label>
+                        <div class="col-md-6 col-sm-8">
+                            <select id="night_term" type="text" class="form-control class_team_3" >
+                                <option value=''>请选择班组</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">全班</label>
+                        <div class="col-md-6 col-sm-8">
+                            <select id="all_term" type="text" class="form-control class_team_4" >
+                                <option value=''>请选择班组</option>
+                            </select>
+                        </div>
+                    </div>
+                    <hr>
+                    <div class="form-group">
+                        <div class="col-sm-12">
+                            <button  style="float:right;margin-right:10px;" id="close_btn" class="btn btn">关闭</button>
+                            <button type="submit" style="float:right;margin-right:10px;" id="save_term_class" class="btn btn-info">生成今日排班</button>
+                        </div>
                     </div>
                 </div>
             </div>
-            <!--对话框 结束-->
-        </div>
-        <!-- e-->
-
-    <script src="/node_modules/zui/dist/lib/calendar/zui.calendar.js"></script>
-    <link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/calendar/zui.calendar.css"> 
+            <!--添加对话框结束-->
+    </div>
+    </div>
+</div>
+</div>
+<!--对话框 结束-->
+<link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/calendar/zui.calendar.css">   
+<script src="/node_modules/zui/dist/lib/calendar/zui.calendar.js"></script>
+<script src="/js/teamClass/charge_team_schedule.js"></script>
 
 <style type="text/css" >
     span.time{
@@ -88,43 +82,3 @@
         text-align: center ;
     }
 </style>
-<script type="text/javascript">
-    
-   $(document).ready(function() {
-          $('#calendar').calendar();
-
-         var calendar = $('#calendar').data('zui.calendar');
-        var newEvents =
-        [
-            {title: '收费二班-晚班',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '收费三班-晚班',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '收费四班-晚班',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '收费一班-休息',  start: '2017-5-1 ', end: '2017-5-1 '},
-            {title: '收费二班-晚班',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '收费三班-晚班',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '收费四班-晚班',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '收费一班-休息',  start: '2017-5-12 ', end: '2017-5-12 '},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11 '},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11'},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11 '},
-            {title: '未排班',  start: '2017-5-11 ', end: '2017-5-11 '},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13 '},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13'},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13 '},
-            {title: '未排班',  start: '2017-5-13 ', end: '2017-5-13 '},
-        ];
-        calendar.addEvents(newEvents);
-
-        $('#calendar').calendar().on("clickEvent.zui.calendar", function(event) {
-            console.log(event.event);
-            // alert(event.event.title);
-            // console.log("你点击了一个事件");
-            // 处理 clickEvent 事件
-            // ...
-            // 对话框弹出
-            $('#myModal').modal();
-        });
-
-   })
-
-</script>

+ 17 - 20
VisualInspection/view/term_management/check_stuff_schedule.html

@@ -17,55 +17,52 @@
         <div class="modal-content">
     <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
-        <h4 class="modal-title">添加排班-2017-03-05</h4>
+        <h4 class="modal-title">添加排班</h4>
     </div>
     <div class="modal-body">
             <!-- 添加对话框 -->
             <div class="container-fluid ">
-                <form class="form-horizontal">
+                <div class="form-horizontal">
                     <div class="form-group">
-                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">考核一组</label>
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">早班</label>
                         <div class="col-md-6 col-sm-8">
-                            <select type="text" class="form-control" >
-                                <option>选择班次</option>
+                            <select id="mooring_term" type="text" class="form-control class_team_1" >
+                                <option value=''>请选择班组</option>
                             </select>
                         </div>
                     </div>
                     <div class="form-group">
-                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">考核二组</label>
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">中班</label>
                         <div class="col-md-6 col-sm-8">
-                            <select type="text" class="form-control" >
-                                <option>选择班次</option>
+                            <select id="middle_term" type="text" class="form-control class_team_2" >
+                                <option value=''>请选择班组</option>
                             </select>
                         </div>
                     </div>
                     <div class="form-group">
-                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">考核三组</label>
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">晚班</label>
                         <div class="col-md-6 col-sm-8">
-                            <select type="text" class="form-control" >
-                                <option>选择班次</option>
+                            <select id="night_term" type="text" class="form-control class_team_3" >
+                                <option value=''>请选择班组</option>
                             </select>
                         </div>
                     </div>
                     <div class="form-group">
-                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">考核四组</label>
+                        <label for="exampleInputAccount4" class="col-sm-offset-1 col-sm-2">全班</label>
                         <div class="col-md-6 col-sm-8">
-                            <select type="text" class="form-control" >
-                                <option>选择班次</option>
+                            <select id="all_term" type="text" class="form-control class_team_4" >
+                                <option value=''>请选择班组</option>
                             </select>
                         </div>
                     </div>
-                    
                     <hr>
-                    
                     <div class="form-group">
                         <div class="col-sm-12">
-                            <button type="submit" style="float:right;margin-right:3px;" class="btn btn-info">生成本月排班</button>
-                            <button type="submit" style="float:right;margin-right:10px;" class="btn btn-info">生成今日排班</button>
-                            <button type="submit" style="float:right;margin-right:10px;" class="btn btn">关闭</button>
+                            <button  style="float:right;margin-right:10px;" id="close_btn" class="btn btn">关闭</button>
+                            <button type="submit" style="float:right;margin-right:10px;" id="save_term_class" class="btn btn-info">生成今日排班</button>
                         </div>
                     </div>
-                    </form>
+                </div>
             </div>
             <!--添加对话框结束-->
     </div>

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

@@ -0,0 +1,51 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+@Data
+public class CheckAppeal {
+	//编号
+    private Long id;
+    //申诉证据
+    private String file_src;
+    //申诉状态
+    private Integer check_status;
+    //申诉时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date appeal_time;
+    //更新时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date update_time;
+    //申诉人
+    private Long appeal_man;
+    //核实人
+    private Long verify_person;
+    //申诉部门
+    private Long appeal_dept;
+    //考核任务
+    private Long task_id;
+    //备注
+    private String remark;
+    
+    
+    //稽查任务关联信息
+    //任务名称
+    private String name;
+    //任务开始时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date start_time;
+    //任务结束时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date end_time;
+    
+}

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

@@ -24,4 +24,8 @@ public class Team {
     private String user_ids;
     //分类
     private Long type;
+    //班长
+    private Integer monitor;
+    //副班长
+    private Integer sub_monitor;
 }

+ 93 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckAppealController.java

@@ -0,0 +1,93 @@
+package com.xintong.visualinspection.controller;
+
+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;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.CheckAppeal;
+import com.xintong.visualinspection.bean.Team;
+import com.xintong.visualinspection.service.CheckAppealService;
+
+/**
+ * 文件名:CheckItemController
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/checkAppeal")
+public class CheckAppealController extends BaseController {
+
+    @Autowired
+    private CheckAppealService checkAppealService;
+
+   
+    /**
+     * 添加考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody CheckAppeal checkAppeal){
+    	checkAppealService.insert(checkAppeal);
+    	return super.returnSuccessResult("添加成功");
+    }
+    
+    /**
+     * 修改考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody CheckAppeal checkAppeal){
+    	checkAppealService.update(checkAppeal);
+    	return super.returnSuccessResult("修改成功");
+    }
+    
+    /**
+     * 删除考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody CheckAppeal checkAppeal){
+    	checkAppealService.delete(checkAppeal.getId());
+    	return super.returnSuccessResult("删除成功");
+    }
+    
+    /**
+     * 根据id获取考核项数据
+     * @param checkItem
+     * @return
+     */
+    @RequestMapping(value = "/getById")
+    public String getById(@RequestBody CheckAppeal checkAppeal){
+    	if(checkAppeal.getId()==null){
+    		throw new BusinessException(20101);
+    	}
+    	CheckAppeal checkItemOne =  checkAppealService.getById(checkAppeal.getId()) ;
+    	return super.returnSuccessResult(checkItemOne);
+    }
+    
+    @RequestMapping(value = "/getList/{page}/{size}")
+    public String getList(@PathVariable Integer page,@PathVariable Integer size){
+    	PageHelper.startPage(page, size);
+    	List<CheckAppeal> checkAppeal =  checkAppealService.getList() ;
+    	return super.returnSuccessResult(new PageInfo(checkAppeal));
+    }
+    
+    
+}

+ 24 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamClassController.java

@@ -39,6 +39,17 @@ public class TeamClassController extends BaseController {
     }
     
     /**
+     * 添加班次 list
+     */
+    @RequestMapping(value = "/add/list")
+    public String addList(@Valid @RequestBody List<TeamClass> teamClasses){
+    	for(int i=0;i<teamClasses.size();i++ ){
+    		teamClassService.insert(teamClasses.get(i));    		
+    	}
+    	return super.returnSuccessResult("添加成功");
+    }
+    
+    /**
      * 修改班次
      * @return
      * String
@@ -52,6 +63,19 @@ public class TeamClassController extends BaseController {
     }
     
     /**
+     * 更新班次
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/update/list")
+    public String update(@Valid @RequestBody List<TeamClass> teamClasses){
+    	teamClassService.updateList(teamClasses);
+    	return super.returnSuccessResult("修改成功");
+    }
+    
+    /**
      * 删除班次
      * @return
      * String

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java

@@ -94,6 +94,9 @@ public class UserController extends BaseController {
     public String updateUser(@RequestBody User user,@PathVariable int userid){
         try{
         	user.setId(userid);
+        	if(user.getPassword()!=null){
+        		user.setPassword(new Md5PasswordEncoder().encodePassword(user.getPassword(), null));
+        	}
         	userService.update(user);
         	return super.returnResult(0, "修改成功", null);
         }catch(Exception e){

+ 20 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckAppealDao.java

@@ -0,0 +1,20 @@
+package com.xintong.visualinspection.dao.master;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.xintong.visualinspection.bean.CheckAppeal;
+
+/**
+ * 文件名:UserInfoDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface CheckAppealDao  {
+    public List<CheckAppeal> getList();
+    public CheckAppeal getOne(Long id);
+    public void insert(CheckAppeal checkAppeal);
+    public void update(CheckAppeal checkAppeal);
+    public void delete(Long id);
+}

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

@@ -17,4 +17,5 @@ public interface TeamClassDao  {
     public void insert(TeamClass teamClass);
     public void update(TeamClass teamClass);
     public void delete(Long id);
+    public void deleteByDeptWorkdate(TeamClass teamClass);
 }

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

@@ -31,9 +31,9 @@
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.User" >
         INSERT INTO
         t_sys_users
-        (username,password,TRUENAME,ORGANID,BIRTH,MOBILE,POSITIONID,WORKNO,IDNO,EMAIL,PIC)
+        (username,password,TRUENAME,ORGANID,BIRTH,MOBILE,PHONE,POSITIONID,WORKNO,IDNO,EMAIL,PIC)
         VALUES
-        (#{username},#{password},#{truename},#{organid},#{birth},#{phone},#{positionid},#{workno},#{idno},#{email},#{pic})
+        (#{username},#{password},#{truename},#{organid},#{birth},#{mobile},#{phone},#{positionid},#{workno},#{idno},#{email},#{pic})
     </insert>
 
     <update id="update" parameterType="com.xintong.visualinspection.bean.User" >
@@ -69,7 +69,7 @@
         SELECT
         *
         FROM t_sys_users
-        where 1=1
+        where 1=1 and status>0 
         <if test="organid != null and organid != 0">and organid = #{organid} </if>
         <if test="positionid != null and positionid != 0">and positionid = #{positionid} </if>
         <if test="classid != null and classid != 0">and classid = #{classid} </if>

+ 55 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml

@@ -0,0 +1,55 @@
+<?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.CheckAppealDao" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.CheckAppeal" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="file_src" property="file_src" jdbcType="VARCHAR" />
+        <result column="check_status" property="check_status" jdbcType="INTEGER" />
+        <result column="appeal_time" property="appeal_time" jdbcType="DATE" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+        <result column="appeal_man" property="appeal_man" jdbcType="INTEGER" />
+        <result column="verify_person" property="verify_person" jdbcType="INTEGER" />
+        <result column="appeal_dept" property="appeal_dept" jdbcType="INTEGER" />
+        <result column="task_id" property="task_id" jdbcType="INTEGER" />
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
+        
+        
+        <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" />
+    </resultMap>
+
+    <select id="getList" resultMap="BaseResultMap"  >
+        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 ORDER BY ca.appeal_time DESC
+    </select>
+
+    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_appeal
+        WHERE id = #{id}
+    </select>
+    
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckAppeal" >
+        INSERT INTO
+        check_appeal
+        (file_src,check_status,appeal_time,update_time,appeal_man,verify_person,appeal_dept,task_id,remark)
+        VALUES
+        (#{file_src}, #{check_status},now(),now(),#{appeal_man},#{verify_person},#{appeal_dept},#{task_id},#{remark})
+    </insert>
+
+    <update id="update" parameterType="com.xintong.visualinspection.bean.CheckAppeal" >
+        UPDATE
+        check_appeal
+        SET
+        <if test="check_status != null">check_status = #{check_status},</if>
+        WHERE
+        id = #{id}
+    </update>
+
+    <delete id="delete" parameterType="java.lang.Long" >
+        DELETE FROM
+        check_appeal
+        WHERE
+        id =#{id}
+    </delete>
+</mapper>

+ 9 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamClassMapper.xml

@@ -31,6 +31,7 @@
         <if test="dept_id != null">AND t.dept_id = #{dept_id}</if>
         <if test="start_time != null">AND t.work_date &gt;= #{start_time}</if>
         <if test="end_time != null">AND t.work_date &lt;= #{end_time}</if>
+        ORDER BY t.work_date ASC ,t.class_type ASC
     </select>
 
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.TeamClass" >
@@ -62,4 +63,12 @@
         WHERE
         id =#{id}
     </delete>
+    
+    <delete id="deleteByDeptWorkdate" parameterType="com.xintong.visualinspection.bean.TeamClass" >
+        DELETE FROM
+        sys_team_class
+        WHERE
+        work_date =#{work_date} and dept_id=#{dept_id}
+    </delete>
+    
 </mapper>

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

@@ -37,9 +37,9 @@
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.Team" >
         INSERT INTO
         sys_team
-        (name,dept_id,user_ids,type)
+        (name,dept_id,user_ids,type,monitor,sub_monitor)
         VALUES
-        (#{name}, #{dept_id},#{user_ids},#{type})
+        (#{name}, #{dept_id},#{user_ids},#{type},#{monitor},#{sub_monitor})
     </insert>
 
     <update id="update" parameterType="com.xintong.visualinspection.bean.Team" >
@@ -49,6 +49,8 @@
         <if test="name != null">name = #{name}</if>
         <if test="dept_id != null">,dept_id = #{dept_id}</if>
         <if test="user_ids != null">,user_ids = #{user_ids}</if>
+        <if test="monitor != null">,monitor = #{monitor}</if>
+        <if test="sub_monitor != null">,sub_monitor = #{sub_monitor}</if>
         WHERE
         id = #{id}
     </update>

+ 25 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckAppealService.java

@@ -0,0 +1,25 @@
+package com.xintong.visualinspection.service;
+
+import java.util.List;
+
+import com.xintong.visualinspection.bean.CheckAppeal;
+
+/**
+ * 
+ *
+ * ConstantService
+ * 
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ * 
+ * @version 1.0.0
+ *
+ */
+public interface CheckAppealService {
+    public List<CheckAppeal> getList();
+    public CheckAppeal getById(Long id);
+    public void insert(CheckAppeal checkAppeal);
+    public void update(CheckAppeal checkAppeal);
+    public void delete(Long id);
+}

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

@@ -23,4 +23,5 @@ public interface TeamClassService {
     public void insert(TeamClass teamClass);
     public void update(TeamClass teamClass);
     public void delete(Long id);
+    public void updateList(List<TeamClass> teamClasses);
 }

+ 59 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckAppealServiceImpl.java

@@ -0,0 +1,59 @@
+package com.xintong.visualinspection.service.impl;
+
+import java.util.ArrayList;
+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.CheckAppeal;
+import com.xintong.visualinspection.dao.master.CheckAppealDao;
+import com.xintong.visualinspection.service.BaseService;
+import com.xintong.visualinspection.service.CheckAppealService;
+
+/**
+ * 文件名:UserServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+public class CheckAppealServiceImpl extends BaseService implements CheckAppealService {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CheckAppealServiceImpl.class);
+
+
+    @Autowired
+    private CheckAppealDao checkAppealDao;
+
+
+	@Override
+	public List<CheckAppeal> getList() {
+		List<CheckAppeal> list = checkAppealDao.getList();
+		return list ;
+	}
+
+	@Override
+	public CheckAppeal getById(Long id) {
+		return checkAppealDao.getOne(id);
+	}
+
+
+	@Override
+	public void insert(CheckAppeal checkAppeal) {
+		checkAppealDao.insert(checkAppeal);
+	}
+
+
+	@Override
+	public void update(CheckAppeal checkAppeal) {
+		checkAppealDao.update(checkAppeal);
+	}
+
+
+	@Override
+	public void delete(Long id) {
+		checkAppealDao.delete(id);
+	}
+
+
+}

+ 11 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamClassServiceImpl.java

@@ -52,11 +52,21 @@ public class TeamClassServiceImpl extends BaseService implements TeamClassServic
 		teamClassDao.update(teamClass);
 	}
 
+	@Override
+	public void updateList(List<TeamClass> teamClasses) {
+		// 先删除原来的数据,再添加
+		if(teamClasses.size()>0){
+			teamClassDao.deleteByDeptWorkdate(teamClasses.get(0));
+			
+			for(int i =0;i<teamClasses.size();i++){
+				teamClassDao.insert(teamClasses.get(i));
+			}			
+		}
+	}
 
 	@Override
 	public void delete(Long id) {
 		// TODO Auto-generated method stub
 		teamClassDao.delete(id);
 	}
-
 }