瀏覽代碼

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

# Conflicts:
#	VisualInspection/view/mytask/check.html
wenhongquan 9 年之前
父節點
當前提交
1dba3d897f
共有 30 個文件被更改,包括 527 次插入88 次删除
  1. 49 4
      VisualInspection/js/assess_management/assess_item.js
  2. 89 12
      VisualInspection/js/assess_management/assess_way.js
  3. 10 3
      VisualInspection/js/assess_management/assess_way_edit.js
  4. 48 7
      VisualInspection/js/teamClass/charge_team_schedule.js
  5. 12 6
      VisualInspection/js/teamClass/check_team_schedule.js
  6. 25 0
      VisualInspection/js/util/video.js
  7. 3 3
      VisualInspection/view/assess_management/assess_item.html
  8. 39 28
      VisualInspection/view/assess_management/assess_way.html
  9. 1 1
      VisualInspection/view/common/commonscriptlink.html
  10. 15 8
      VisualInspection/view/mytask/check.html
  11. 60 2
      VisualInspection/view/term_management/charge_stuff_schedule.html
  12. 2 2
      VisualInspection/view/term_management/check_stuff_schedule.html
  13. 2 2
      VisualInspection/view/user/login.html
  14. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckRule.java
  15. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Job.java
  16. 3 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/TeamClass.java
  17. 41 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/JobController.java
  18. 5 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamClassController.java
  19. 7 4
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamController.java
  20. 18 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/JobDao.java
  21. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TeamDao.java
  22. 3 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleMapper.xml
  23. 12 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/JobMapper.xml
  24. 2 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamClassMapper.xml
  25. 13 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamMapper.xml
  26. 21 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/JobService.java
  27. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TeamService.java
  28. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckRuleServiceImpl.java
  29. 33 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/JobServiceImpl.java
  30. 5 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamServiceImpl.java

+ 49 - 4
VisualInspection/js/assess_management/assess_item.js

@@ -45,7 +45,8 @@
          edittype = "add"
          edittype = "add"
          loadData(nodedata);
          loadData(nodedata);
          $("#add_btn").html("添加");
          $("#add_btn").html("添加");
-         $('#addModal').modal('show')
+         $('#addModal').modal('show');
+         $(".check_item_score").hide();
      })
      })
 
 
      $("#dept_edit").on("click", function() {
      $("#dept_edit").on("click", function() {
@@ -61,6 +62,7 @@
          loadData(nodedata)
          loadData(nodedata)
          $("#add_btn").html("修改");
          $("#add_btn").html("修改");
          $('#addModal').modal('show');
          $('#addModal').modal('show');
+         $(".check_item_score").hide();
      });
      });
 
 
      $("#dept_delete").on("click", function() {
      $("#dept_delete").on("click", function() {
@@ -81,6 +83,18 @@
         }, function(error){ })
         }, function(error){ })
      });
      });
 
 
+     // 增加考核项
+     $("#add_check_item").click(function(){
+         var nodedata = check_item_tree.getSelectedNodes();
+         edittype = "add"
+         $("#add_btn").data("tree_flag",1);
+         loadData(nodedata);
+         $("#add_btn").html("添加");
+         $('#addModal').modal('show');
+         $(".check_item_score").show();
+         $("#add_btn").data("tree_flag",0);
+     })
+
      $('.datatable').datatable({
      $('.datatable').datatable({
          checkable: false,
          checkable: false,
          sortable: false,
          sortable: false,
@@ -173,8 +187,10 @@ function delete_check_item(id ){
      function getTree(obj,rowObj){
      function getTree(obj,rowObj){
         var userdata = {};
         var userdata = {};
         userdata["checked"] = false;
         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>'];
-        rowObj.push(userdata);
+        if(obj.score != null){
+            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>'];
+            rowObj.push(userdata);
+        }
 
 
         if(obj.subCheckItem!=null){
         if(obj.subCheckItem!=null){
             for(var i=0; i<obj.subCheckItem.length;i++ ){
             for(var i=0; i<obj.subCheckItem.length;i++ ){
@@ -255,7 +271,9 @@ function delete_check_item(id ){
              zdataItem["pId"] = null;
              zdataItem["pId"] = null;
              zdataItem["score"] = m.score ;
              zdataItem["score"] = m.score ;
              zdataItem["name"] = m.name;
              zdataItem["name"] = m.name;
+             zdataItem["open"] = true;
              zdataItem["children"] = addobj(m);
              zdataItem["children"] = addobj(m);
+              zdataItem.open = true ;
              zdata.push(zdataItem);
              zdata.push(zdataItem);
          }
          }
          check_item_tree = $.fn.zTree.init($("#check_rule_tree"), setting, zdata)
          check_item_tree = $.fn.zTree.init($("#check_rule_tree"), setting, zdata)
@@ -269,13 +287,18 @@ function delete_check_item(id ){
          for (var i = 0; i < data.subCheckItem.length; i++) {
          for (var i = 0; i < data.subCheckItem.length; i++) {
              var m = data.subCheckItem[i];
              var m = data.subCheckItem[i];
              var zdataItem = {};
              var zdataItem = {};
+             if(m.score != null){
+                 continue;
+             }
              zdataItem["id"] = m.id;
              zdataItem["id"] = m.id;
              zdataItem["value"] = m.id;
              zdataItem["value"] = m.id;
              zdataItem["pId"] = data.id;
              zdataItem["pId"] = data.id;
              zdataItem["score"] = m.score ;
              zdataItem["score"] = m.score ;
              zdataItem["icon"] = "";
              zdataItem["icon"] = "";
              zdataItem["name"] = m.name;
              zdataItem["name"] = m.name;
+             zdataItem["open"] = true;
              zdataItem["children"] = addobj(m);
              zdataItem["children"] = addobj(m);
+             zdataItem.open = true ;
              zdata.push(zdataItem);
              zdata.push(zdataItem);
          }
          }
          return zdata;
          return zdata;
@@ -315,7 +338,17 @@ function loadData(nodedata) {
             selectvalue: pnode.length > 0 ? pnode[0].id : null
             selectvalue: pnode.length > 0 ? pnode[0].id : null
         });
         });
     }else{
     }else{
-        $(".check_item_group").hide();
+        if($("#add_btn").data("tree_flag")==1){
+            dept_selectinput = new TreeSelect({
+                element: '#check_item_select',
+                data: zdata,
+                valueKey: "id",
+                placeholder: "选择考核项分类"
+            });
+            $(".check_item_group").show();
+        }else{
+            $(".check_item_group").hide();
+        }
     }
     }
 }
 }
 
 
@@ -336,6 +369,18 @@ function addCheckItem() {
         return ;
         return ;
     }
     }
 
 
+    if(!$(".check_item_score").is(":hidden")){
+        if(pid==null){
+            tip("请选择考核项分类");
+            return ;
+        }
+        if(score == ''){
+            tip("请选择考核项的分数");
+            return ;
+        }
+    }
+
+
     var data = {
     var data = {
         "name": name,
         "name": name,
         "score":score,
         "score":score,

+ 89 - 12
VisualInspection/js/assess_management/assess_way.js

@@ -9,8 +9,8 @@ function queryTable(){
     var cols = [
     var cols = [
                     {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
                     {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
                     {width: 160, text: '考核办法', flex: false,colClass: 'text-center',field:'name'},
                     {width: 160, text: '考核办法', flex: false,colClass: 'text-center',field:'name'},
-                    {width: 80, text: '被考核部门',  flex: true, colClass: 'text-center',field:'checked_dept_id'},
-                    {width: 100, text: '被考核职位',  flex: true, colClass: 'text-center',field:'checked_position_id'},
+                    {width: 80, text: '被考核部门',  flex: true, colClass: 'text-center',field:'checked_dept_name'},
+                    {width: 100, text: '被考核职位',  flex: true, colClass: 'text-center',field:'checked_position_name'},
                     {width: 100, text: '考核项',  flex: false, type: 'string',colClass: 'text-center modity-flag',field:'checked_item_num' },
                     {width: 100, text: '考核项',  flex: false, type: 'string',colClass: 'text-center modity-flag',field:'checked_item_num' },
                     {width: 80, text: '操作',  flex: false, colClass: 'text-center',field:'id',oper:[
                     {width: 80, text: '操作',  flex: false, colClass: 'text-center',field:'id',oper:[
                          {func:'deleteCheckRule',text:'删除',col_class:'icon-remove-circle'}
                          {func:'deleteCheckRule',text:'删除',col_class:'icon-remove-circle'}
@@ -21,6 +21,7 @@ function queryTable(){
                             'url':"/checkRule/getAllRule/",
                             'url':"/checkRule/getAllRule/",
                             'param':data}
                             'param':data}
                             );
                             );
+     $('#addModal').modal('hide');
 }
 }
 
 
 // 删除
 // 删除
@@ -30,34 +31,110 @@ function deleteCheckRule(id){
 
 
 function showAddCheckRule(){
 function showAddCheckRule(){
     $('#check_rule_name,#dep_id,#position_id').val('');
     $('#check_rule_name,#dep_id,#position_id').val('');
-    showPopup4Common('添加考核办法',function(){
-       return addOrUpdateCheckRule("/checkRule/add");
-    },'400px');
+    // showPopup4Common('添加考核办法',function(){
+    //    return addOrUpdateCheckRule("/checkRule/add");
+    // },'400px');
+     $('#addModal').modal('show');
+}
+
+var all_data = [];
+
+var dept_selectinput;
+
+// 查询所有的考核项
+get_common_service("/dept/get/all","",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["name"] = m.organname;
+        zdataItem["children"] = addobj(m);
+        all_data.push(zdataItem);
+    }
+    dept_init();
+},function(error){})
+
+function addobj(data) {
+    var zdata = [];
+    if (typeof(data.childs) != "undefinde" && data.childs != null &&
+        data.childs.length > 0) {
+        for (var i = 0; i < data.childs.length; i++) {
+            var m = data.childs[i];
+            var zdataItem = {};
+            zdataItem["id"] = m.id;
+            zdataItem["value"] = m.id;
+            zdataItem["pId"] = data.id;
+            zdataItem["icon"] = "";
+            zdataItem["name"] = m.organname;
+            zdataItem["children"] = addobj(m);
+            zdata.push(zdataItem);
+        }
+        return zdata;
+    } else {
+        return [];
+    }
+}
+
+
+
+$("#check_item_select").delegate("#treeSelect_panel_0","blur",function(){
+    if($("#treeSelect_panel_0").is(":hidden")){
+        if(dept_selectinput.value !="" && dept_selectinput.value != null){
+            getJob(dept_selectinput.value);
+        }
+    }
+})
+
+
+function dept_init(){
+    dept_selectinput = new TreeSelect({
+            element: '#check_item_select',
+            data: all_data,
+            valueKey: "id",
+            placeholder: "请选择部门"
+    });
+}
+
+/**
+ * 检索部门下的职位
+ */
+function getJob(dept_id){
+    var data = {"dept_id": dept_id};
+    post_common_service("/job/getList", data , function(data){
+        $("#position_id").empty();
+         $("#position_id").append("<option value=''>请选择职位</option>");
+        for(var i=0;i<data.length;i++){
+            $("#position_id").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>")
+        }
+    }, function(error){});
 }
 }
 
 
 /**
 /**
  * 添加考核办法 - 保存
  * 添加考核办法 - 保存
  */
  */
-function addOrUpdateCheckRule(url){
+function addOrUpdateCheckRule(){
     if(idVal("check_rule_name") == ''){
     if(idVal("check_rule_name") == ''){
         tip("请输入考核办法");
         tip("请输入考核办法");
         return false;
         return false;
     }
     }
-    if(idVal("dep_id") == ''){
-        tip("请选择部门");
-        return false;
-    }
     if(idVal("position_id") == ''){
     if(idVal("position_id") == ''){
         tip("请选择职位");
         tip("请选择职位");
         return false;
         return false;
     }
     }
+    if(dept_selectinput.value==null || dept_selectinput.value==''){
+        tip("请选择部门信息");
+        return false ;
+    }
     var param ={
     var param ={
         "name":idVal("check_rule_name") ,
         "name":idVal("check_rule_name") ,
-        "checked_dept_id":idVal("dep_id"),
+        "checked_dept_id":dept_selectinput.value,
         "checked_position_id":idVal("position_id"),
         "checked_position_id":idVal("position_id"),
         "checked_person_type":1
         "checked_person_type":1
     };
     };
-    addOrUpdateItem4Common(param,url,queryTable);
+    addOrUpdateItem4Common(param,"/checkRule/add",queryTable);
 }
 }
 
 
 function idVal(id){
 function idVal(id){

+ 10 - 3
VisualInspection/js/assess_management/assess_way_edit.js

@@ -201,9 +201,10 @@ function delete_check_item(id ){
      function getTree(obj,rowObj){
      function getTree(obj,rowObj){
         var userdata = {};
         var userdata = {};
         userdata["checked"] = false;
         userdata["checked"] = false;
-        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.score != null){
+            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){
         if(obj.subCheckItem!=null){
             for(var i=0; i<obj.subCheckItem.length;i++ ){
             for(var i=0; i<obj.subCheckItem.length;i++ ){
                 getTree(obj.subCheckItem[i],rowObj);
                 getTree(obj.subCheckItem[i],rowObj);
@@ -289,6 +290,7 @@ function delete_check_item(id ){
              zdataItem["score"] = m.score ;
              zdataItem["score"] = m.score ;
              zdataItem["name"] = m.name;
              zdataItem["name"] = m.name;
              zdataItem["children"] = addobj(m);
              zdataItem["children"] = addobj(m);
+             zdataItem.open = true ;
              zdata.push(zdataItem);
              zdata.push(zdataItem);
          }
          }
          check_item_tree = $.fn.zTree.init($("#department_tree"), setting, zdata)
          check_item_tree = $.fn.zTree.init($("#department_tree"), setting, zdata)
@@ -306,6 +308,7 @@ function delete_check_item(id ){
              zdataItem["score"] = m.score ;
              zdataItem["score"] = m.score ;
              zdataItem["name"] = m.name;
              zdataItem["name"] = m.name;
              zdataItem["children"] = addobj(m);
              zdataItem["children"] = addobj(m);
+             zdataItem.open = true ;
              all_data.push(zdataItem);
              all_data.push(zdataItem);
          }
          }
      },function(error){})
      },function(error){})
@@ -319,6 +322,9 @@ function delete_check_item(id ){
          for (var i = 0; i < data.subCheckItem.length; i++) {
          for (var i = 0; i < data.subCheckItem.length; i++) {
              var m = data.subCheckItem[i];
              var m = data.subCheckItem[i];
              var zdataItem = {};
              var zdataItem = {};
+              if(m.score != null){
+                 continue;
+              }
              zdataItem["id"] = m.id;
              zdataItem["id"] = m.id;
              zdataItem["value"] = m.id;
              zdataItem["value"] = m.id;
              zdataItem["pId"] = data.id;
              zdataItem["pId"] = data.id;
@@ -326,6 +332,7 @@ function delete_check_item(id ){
              zdataItem["icon"] = "";
              zdataItem["icon"] = "";
              zdataItem["name"] = m.name;
              zdataItem["name"] = m.name;
              zdataItem["children"] = addobj(m);
              zdataItem["children"] = addobj(m);
+             zdataItem.open = true ;
              zdata.push(zdataItem);
              zdata.push(zdataItem);
          }
          }
          return zdata;
          return zdata;

+ 48 - 7
VisualInspection/js/teamClass/charge_team_schedule.js

@@ -1,8 +1,10 @@
   
   
    $(document).ready(function() {
    $(document).ready(function() {
 
 
+         $("#main_content_title").html("收费人员排班")
+
         // 用户的dept_id
         // 用户的dept_id
-        var user_dept_id = 12 ;
+        var user_dept_id = '' ;
         
         
         // 收费小组type
         // 收费小组type
         var team_type = 1 ;
         var team_type = 1 ;
@@ -23,18 +25,38 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":getCurrentMonthFirst(),
                 "start_time":getCurrentMonthFirst(),
-                "end_time":getCurrentMonthLast()
+                "end_time":getCurrentMonthLast(),
+                 'type':team_type
             }
             }
             if(data_param != undefined){
             if(data_param != undefined){
                 data = data_param ;
                 data = data_param ;
             }
             }
             getTeamClass(data,function(data){
             getTeamClass(data,function(data){
                 var newEvents = [];
                 var newEvents = [];
+
+                 // 这里轮训给每天都增加一个事件
+               
+                var date = new Date();
+                var end_date =new Date(getCurrentMonthLast2()) ;
+                if(data_param != undefined){
+                    date =  new Date(data_param.start_time);
+                    end_date = new Date(data_param.end_time) ;
+                }
+
+
+                for(var i =0;i<31;i++){
+                    if( date.setDate(i+1) <= end_date ){
+                        var obj =  {id:-1 ,desc:'详细排班' ,title: '+详细排班',  start:date.format('yyyy-MM-dd'), end: date.format('yyyy-MM-dd'),color:'#bd7b46'};
+                        newEvents.push(obj);
+                    }
+                }
+
                 // console.log(data);
                 // console.log(data);
                 for(var i=0;i<data.length;i++){
                 for(var i=0;i<data.length;i++){
                     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};
                     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);
                     newEvents.push(obj);
                 }
                 }
+               
                 calendar.addEvents(newEvents);
                 calendar.addEvents(newEvents);
             })
             })
         }
         }
@@ -72,6 +94,17 @@
             return new Date(nextMonthFirstDay-oneDay).toLocaleDateString()+" 00:00:00";
             return new Date(nextMonthFirstDay-oneDay).toLocaleDateString()+" 00:00:00";
         }
         }
 
 
+
+        // 当月最后一天
+        function getCurrentMonthLast2(){
+            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()+" 23:59:00";
+        }
+
         // 上一个月或者下个月的第一天或者最后一天
         // 上一个月或者下个月的第一天或者最后一天
         function getMonthByCondition(pre_or_after,first_or_last){
         function getMonthByCondition(pre_or_after,first_or_last){
             if(first_or_last == 'first'){
             if(first_or_last == 'first'){
@@ -92,8 +125,13 @@
         }
         }
 
 
         $('#calendar').calendar().on("clickEvent.zui.calendar", function(event) {
         $('#calendar').calendar().on("clickEvent.zui.calendar", function(event) {
-            // console.log(event);
-            click_function(event.event.start);
+            // console.log(event。event.id);
+            if(event.event.id == -1){
+                // 这边负责添加整个页面的数据 按车道排班
+                $('#add_fee_station').modal();
+            }else{
+                click_function(event.event.start);
+            }
         });
         });
 
 
         /**
         /**
@@ -107,7 +145,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":date.format("yyyy-MM-dd 00:00:00"),
                 "start_time":date.format("yyyy-MM-dd 00:00:00"),
-                "end_time": date.format("yyyy-MM-dd 00:00:00")
+                "end_time": date.format("yyyy-MM-dd 00:00:00"),
+                 'type':team_type
             }
             }
 
 
             getTeamClass(data,function(data){
             getTeamClass(data,function(data){
@@ -139,7 +178,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
                 "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")
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00"),
+                 'type':team_type
             }
             }
             updateCalendar(data);
             updateCalendar(data);
         });
         });
@@ -150,7 +190,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
                 "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")
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00"),
+                 'type':team_type
             }
             }
             updateCalendar(data);
             updateCalendar(data);
         });
         });

+ 12 - 6
VisualInspection/js/teamClass/check_team_schedule.js

@@ -1,8 +1,10 @@
     
     
    $(document).ready(function() {
    $(document).ready(function() {
 
 
+         $("#main_content_title").html("稽查人员排班")
+
         // 用户的dept_id
         // 用户的dept_id
-        var user_dept_id = 1 ;
+        var user_dept_id = '' ;
         
         
         // 稽查小组type
         // 稽查小组type
         var team_type = 2 ;
         var team_type = 2 ;
@@ -23,7 +25,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":getCurrentMonthFirst(),
                 "start_time":getCurrentMonthFirst(),
-                "end_time":getCurrentMonthLast()
+                "end_time":getCurrentMonthLast(),
+                 'type':team_type
             }
             }
             if(data_param != undefined){
             if(data_param != undefined){
                 data = data_param ;
                 data = data_param ;
@@ -108,7 +111,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":date.format("yyyy-MM-dd 00:00:00"),
                 "start_time":date.format("yyyy-MM-dd 00:00:00"),
-                "end_time": date.format("yyyy-MM-dd 00:00:00")
+                "end_time": date.format("yyyy-MM-dd 00:00:00"),
+                 'type':team_type
             }
             }
 
 
             getTeamClass(data,function(data){
             getTeamClass(data,function(data){
@@ -140,7 +144,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
                 "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")
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00"),
+                 'type':team_type
             }
             }
             updateCalendar(data);
             updateCalendar(data);
         });
         });
@@ -151,7 +156,8 @@
             var data = {
             var data = {
                 "dept_id": user_dept_id ,
                 "dept_id": user_dept_id ,
                 "start_time":getMonthByCondition(date_cursor,'first').format("yyyy-MM-dd 00:00:00"),
                 "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")
+                "end_time": getMonthByCondition(date_cursor,'last').format("yyyy-MM-dd 00:00:00"),
+                 'type':team_type
             }
             }
             updateCalendar(data);
             updateCalendar(data);
         });
         });
@@ -168,7 +174,7 @@
             for(var i=0;i<$("select[id*='_term']").length;i++){
             for(var i=0;i<$("select[id*='_term']").length;i++){
                 if($("select[id*='_term']").eq(i).val()!=""){
                 if($("select[id*='_term']").eq(i).val()!=""){
                     var obj = {
                     var obj = {
-                        "class_type":i+1,
+                        "class_type":4,
                         "team_id":$("select[id*='_term']").eq(i).val(),
                         "team_id":$("select[id*='_term']").eq(i).val(),
                         "work_date": $("#save_term_class").data("date")+" 00:00:00",
                         "work_date": $("#save_term_class").data("date")+" 00:00:00",
                         "start_time": $("#save_term_class").data("date")+" 00:00:00",
                         "start_time": $("#save_term_class").data("date")+" 00:00:00",

+ 25 - 0
VisualInspection/js/util/video.js

@@ -0,0 +1,25 @@
+function setProgress(percent){
+    $(".progress-bar").css('width',percent);
+}
+
+function setVideoList(videos){
+    var videoArr;
+    if(videos){
+        videoArr = videos.split("|");
+        var selectStr="";
+        for(var i in videoArr){
+            if(i==0)
+                selectStr += '<option value="'+videoArr[i]+'" selected="selected">视频'+videoArr[i]+'</option>'
+            else
+                selectStr += '<option value="'+videoArr[i]+'">视频'+videoArr[i]+'</option>';
+        }
+    }
+    $('#video_list').html(selectStr);
+}
+
+function doAction(func){
+    event = document.createEvent('MessageEvent');
+    var origin = window.location.protocol + '//' + window.location.host;
+    event.initMessageEvent (func, true, true, '', origin, 1234, window, null);
+    document.dispatchEvent (event);
+}

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

@@ -27,7 +27,7 @@
                     <div class="panel-heading">
                     <div class="panel-heading">
                         <span class="title">考核项详情</span>
                         <span class="title">考核项详情</span>
                         <div class="panel-actions">
                         <div class="panel-actions">
-                            <!--<button type="button" class="btn" data-toggle="tooltip" title="添加人员"><i class="icon-plus"></i></button>-->
+                            <button type="button" class="btn" id="add_check_item" title="添加考核项"><i class="icon-plus"></i></button>
                         </div>
                         </div>
                     </div>
                     </div>
                     <div class="panel-body no-padding" style="padding:0">
                     <div class="panel-body no-padding" style="padding:0">
@@ -56,10 +56,10 @@
                                 <input type="text" id="check_item_name" class="form-control" placeholder="名称">
                                 <input type="text" id="check_item_name" class="form-control" placeholder="名称">
                             </div>
                             </div>
                         </div>
                         </div>
-                        <div class="form-group">
+                        <div class="form-group check_item_score">
                             <label for="exampleInputAccount4" class="col-sm-2">分数:</label>
                             <label for="exampleInputAccount4" class="col-sm-2">分数:</label>
                             <div class="col-md-6 col-sm-10">
                             <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>
                         </div>
                         <div class="form-group check_item_group">
                         <div class="form-group check_item_group">

+ 39 - 28
VisualInspection/view/assess_management/assess_way.html

@@ -29,40 +29,51 @@
             </div>
             </div>
           
           
         </div>
         </div>
-        <!-- 对话框HTML -->
-        <div id="form-div" style="display:none;text-align:center;">
-                <!-- 添加对话框 -->
-                <div class="container-fluid" style="margin-top:20px;">
-                    <form class="form-horizontal">
-                        <div class="form-group">
-                            <label for="exampleInputAccount4" class="col-sm-3">考核办法</label>
-                            <div class="col-md-8 col-sm-8">
-                                <input type="text" class="form-control" id="check_rule_name" placeholder="考核办法">
+
+        <div class="modal fade" id="addModal">
+            <div class="modal-dialog">
+                <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="container-fluid" style="margin-top:20px;">
+                                <form class="form-horizontal">
+                                    <div class="form-group">
+                                        <label for="exampleInputAccount4" class="col-sm-2">考核办法</label>
+                                        <div class="col-md-8 col-sm-8">
+                                            <input type="text" class="form-control" id="check_rule_name" placeholder="考核办法">
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+                                        <label for="exampleInputPassword4" class="col-sm-2">考核对象</label>
+                                        <div class="col-md-5 col-sm-5">
+                                            <div id="check_item_select"></div>
+                                        </div>
+                                        <div class="col-md-3 col-sm-3">
+                                            <select type="text" id="position_id" class="form-control" >
+                                                <option value="" selected>请选择职位</option>
+                                            </select>
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+                                        <div class="col-sm-offset-2 col-sm-10">
+                                            <button type="button" id="add_btn" class="btn btn-default" onclick="addOrUpdateCheckRule()">添加</button>
+                                        </div>
+                                    </div>
+                                </form>
                             </div>
                             </div>
                         </div>
                         </div>
-                        <div class="form-group">
-                            <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 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 value="" selected>请选择职位</option>
-                                     <option value="2">2</option>
-                                </select>
-                            </div>
-                        </div>    
-                    </form>
+                    </div>
                 </div>
                 </div>
-                <!--添加对话框结束-->
+            </div>
         </div>
         </div>
-        <!-- 考核办法  end -->    
 
 
 <script src="/js/assess_management/assess_way.js?_inline"></script>
 <script src="/js/assess_management/assess_way.js?_inline"></script>
-
+<script type="text/javascript" src="/node_modules/zui/dist/lib/dashboard/zui.dashboard.min.js?__inline"></script>
+<link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/dashboard/zui.dashboard.min.css">
 <style type="text/css">
 <style type="text/css">
     td.modity-flag{
     td.modity-flag{
        text-decoration: underline;
        text-decoration: underline;

+ 1 - 1
VisualInspection/view/common/commonscriptlink.html

@@ -18,7 +18,7 @@
 <script src="/js/util/util.js"></script>
 <script src="/js/util/util.js"></script>
 <script src="/js/util/service.js"></script>
 <script src="/js/util/service.js"></script>
 <script src="/js/constant/constant.js"></script>
 <script src="/js/constant/constant.js"></script>
-
+<script src="/js/util/video.js"></script>
 
 
 <script type="text/javascript">
 <script type="text/javascript">
     $(document).ready(function() {
     $(document).ready(function() {

+ 15 - 8
VisualInspection/view/mytask/check.html

@@ -35,13 +35,14 @@
                     <i class="icon icon-list"></i>
                     <i class="icon icon-list"></i>
                     <span class="title">面板标题</span>
                     <span class="title">面板标题</span>
                     </div>-->
                     </div>-->
-                    <div class="panel-body">
+                    <select class="form-control" id="video_list" style="position:absolute;left:300px;top:10px;width:200px;"></select>
+                    <div class="panel-body" style="padding:5px;">
                         <ul class="nav nav-secondary">
                         <ul class="nav nav-secondary">
                             <li class="active"><a data-tab href="#tabContent1">收费亭</a></li>
                             <li class="active"><a data-tab href="#tabContent1">收费亭</a></li>
                             <li><a data-tab href="#tabContent2">车道</a></li>
                             <li><a data-tab href="#tabContent2">车道</a></li>
                             <li><a data-tab href="#tabContent3">广场</a></li>
                             <li><a data-tab href="#tabContent3">广场</a></li>
                         </ul>
                         </ul>
-                        <div class="tab-content" id="tabcontent" style="height:330px;">
+                        <div class="tab-content" style="height:350px;">
                             <div class="tab-pane active" id="tabContent1" class="col-sm-12">
                             <div class="tab-pane active" id="tabContent1" class="col-sm-12">
                             </div>
                             </div>
                             <div class="tab-pane" id="tabContent2" class="col-sm-12">
                             <div class="tab-pane" id="tabContent2" class="col-sm-12">
@@ -49,19 +50,25 @@
                             <div class="tab-pane" id="tabContent3" class="col-sm-12">
                             <div class="tab-pane" id="tabContent3" class="col-sm-12">
                             </div>
                             </div>
                         </div>
                         </div>
+                        <div class="row" style="padding:5px;margin-top:5px;text-align:center">
+                            <div class="progress">
+                                <div class="progress-bar" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
+                                    <span class="sr-only">40% Complete (success)</span>
+                                </div>
+                            </div>
+                        </div>
                         <div class="row" style="margin-top:5px;text-align:center">
                         <div class="row" style="margin-top:5px;text-align:center">
                             <div class="btn-group">
                             <div class="btn-group">
-                                <button type="button" class="btn btn-info">播放</button>
-                                <button type="button" class="btn btn-primary">停止</button>
-                                <button type="button" class="btn btn-warning">快进</button>
-                                <button type="button" class="btn btn-danger">快退</button>
-                                <button type="button" class="btn btn-success">抓图</button>
+                                <button type="button" class="btn btn-info" onclick="doAction('start')">播放</button>
+                                <button type="button" class="btn btn-primary" onclick="doAction('stop')">停止</button>
+                                <button type="button" class="btn btn-warning" onclick="doAction('fast')">快进</button>
+                                <button type="button" class="btn btn-danger" onclick="doAction('slow')">快退</button>
+                                <button type="button" class="btn btn-success" onclick="doAction('screenshot')">抓图</button>
                             </div>
                             </div>
                         </div>
                         </div>
                         <hr>
                         <hr>
                         <div class="row">
                         <div class="row">
                             <div id="img_container" class="cards cards-borderless col-sm-11">
                             <div id="img_container" class="cards cards-borderless col-sm-11">
-                            
                             </div>
                             </div>
                             <div class="col-sm-1">
                             <div class="col-sm-1">
                                 <br>
                                 <br>

+ 60 - 2
VisualInspection/view/term_management/charge_stuff_schedule.html

@@ -47,14 +47,14 @@
                             </select>
                             </select>
                         </div>
                         </div>
                     </div>
                     </div>
-                    <div class="form-group">
+                    <!--<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">
                         <div class="col-md-6 col-sm-8">
                             <select id="all_term" type="text" class="form-control class_team_4" >
                             <select id="all_term" type="text" class="form-control class_team_4" >
                                 <option value=''>请选择班组</option>
                                 <option value=''>请选择班组</option>
                             </select>
                             </select>
                         </div>
                         </div>
-                    </div>
+                    </div>-->
                     <hr>
                     <hr>
                     <div class="form-group">
                     <div class="form-group">
                         <div class="col-sm-12">
                         <div class="col-sm-12">
@@ -70,6 +70,64 @@
 </div>
 </div>
 </div>
 </div>
 <!--对话框 结束-->
 <!--对话框 结束-->
+
+
+<div class="modal fade" id="add_fee_station">
+    <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>
+                    <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>
+                    <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>
+    </div>
+</div>
+</div>
+
+
+
+
 <link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/calendar/zui.calendar.css">   
 <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="/node_modules/zui/dist/lib/calendar/zui.calendar.js"></script>
 <script src="/js/teamClass/charge_team_schedule.js"></script>
 <script src="/js/teamClass/charge_team_schedule.js"></script>

+ 2 - 2
VisualInspection/view/term_management/check_stuff_schedule.html

@@ -23,7 +23,7 @@
             <!-- 添加对话框 -->
             <!-- 添加对话框 -->
             <div class="container-fluid ">
             <div class="container-fluid ">
                 <div class="form-horizontal">
                 <div class="form-horizontal">
-                    <div class="form-group">
+                    <!--<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">
                         <div class="col-md-6 col-sm-8">
                             <select id="mooring_term" type="text" class="form-control class_team_1" >
                             <select id="mooring_term" type="text" class="form-control class_team_1" >
@@ -46,7 +46,7 @@
                                 <option value=''>请选择班组</option>
                                 <option value=''>请选择班组</option>
                             </select>
                             </select>
                         </div>
                         </div>
-                    </div>
+                    </div>-->
                     <div class="form-group">
                     <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">
                         <div class="col-md-6 col-sm-8">

+ 2 - 2
VisualInspection/view/user/login.html

@@ -13,7 +13,7 @@
 
 
     <div id="main" class="container-fluid main">
     <div id="main" class="container-fluid main">
         <div class="row">
         <div class="row">
-            <div class="col-md-5"></div>
+            <div class="col-md-6"></div>
             <div class="col-md-4">
             <div class="col-md-4">
                 <div class="panel">
                 <div class="panel">
                     <div class="panel-heading">
                     <div class="panel-heading">
@@ -38,7 +38,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="col-md-3"></div>
+            <div class="col-md-2"></div>
 
 
         </div>
         </div>
 
 

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

@@ -27,4 +27,7 @@ public class CheckRule {
     
     
     // 考核项数量
     // 考核项数量
     private int checked_item_num ;
     private int checked_item_num ;
+    
+    // 被考核的职位名称
+    private String checked_position_name;
 }
 }

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Job.java

@@ -12,4 +12,7 @@ public class Job {
     private Integer id;
     private Integer id;
     //名称
     //名称
     private String name;
     private String name;
+    
+    // 部门id
+    private Long dept_id;
 }
 }

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/TeamClass.java

@@ -44,4 +44,7 @@ public class TeamClass {
     private Integer class_type;
     private Integer class_type;
     
     
     private String team_name ;
     private String team_name ;
+    
+    private Integer type ;
+    
 }
 }

+ 41 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/JobController.java

@@ -0,0 +1,41 @@
+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.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.Job;
+import com.xintong.visualinspection.service.CheckRuleItemService;
+import com.xintong.visualinspection.service.JobService;
+
+/**
+ * 文件名:CheckRuleIem
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/job")
+public class JobController extends BaseController {
+
+	@Autowired
+	private JobService jobService ;
+	
+	/**
+     * 增加考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getList")
+    public String add(@Valid @RequestBody Job job){
+    	List<Job> jlist = jobService.getJobList(job) ;
+    	return super.returnSuccessResult(jlist);
+    }
+    
+}

+ 5 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamClassController.java

@@ -2,6 +2,7 @@ package com.xintong.visualinspection.controller;
 
 
 import java.util.List;
 import java.util.List;
 
 
+import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
 import javax.validation.Valid;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 
 import com.xintong.system.err.BusinessException;
 import com.xintong.system.err.BusinessException;
 import com.xintong.visualinspection.bean.TeamClass;
 import com.xintong.visualinspection.bean.TeamClass;
+import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.TeamClassService;
 import com.xintong.visualinspection.service.TeamClassService;
 
 
 /**
 /**
@@ -112,9 +114,10 @@ public class TeamClassController extends BaseController {
      * @since  1.0.0
      * @since  1.0.0
      */
      */
     @RequestMapping(value = "/getClassList")
     @RequestMapping(value = "/getClassList")
-    public String getClassList(@RequestBody TeamClass teamClass){
+    public String getClassList(@RequestBody TeamClass teamClass,HttpServletRequest request){
     	if(teamClass.getDept_id()==null){
     	if(teamClass.getDept_id()==null){
-    		throw new BusinessException(20901);
+    		User u = getCurrentUser(request);
+    		teamClass.setDept_id(u.getOrganid()+0L);
     	}
     	}
     	if(teamClass.getStart_time()==null){
     	if(teamClass.getStart_time()==null){
     		throw new BusinessException(20902);
     		throw new BusinessException(20902);

+ 7 - 4
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TeamController.java

@@ -2,9 +2,11 @@ package com.xintong.visualinspection.controller;
 
 
 import java.util.List;
 import java.util.List;
 
 
+import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
 import javax.validation.Valid;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpRequest;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -14,6 +16,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.PageInfo;
 import com.xintong.system.err.BusinessException;
 import com.xintong.system.err.BusinessException;
 import com.xintong.visualinspection.bean.Team;
 import com.xintong.visualinspection.bean.Team;
+import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.TeamService;
 import com.xintong.visualinspection.service.TeamService;
 
 
 /**
 /**
@@ -91,13 +94,13 @@ public class TeamController extends BaseController {
      * @since  1.0.0
      * @since  1.0.0
      */
      */
     @RequestMapping(value = "/getTeamByDeptId/{page}/{size}")
     @RequestMapping(value = "/getTeamByDeptId/{page}/{size}")
-    public String getTeamByDeptId(@RequestBody Team team,@PathVariable Integer page,@PathVariable Integer size){
+    public String getTeamByDeptId(@RequestBody Team team,@PathVariable Integer page,@PathVariable Integer size,HttpServletRequest request ){
     	if(team.getDept_id()==null){
     	if(team.getDept_id()==null){
-    		throw new BusinessException(20901);
+    		User u = getCurrentUser(request);
+    		team.setDept_id(u.getOrganid()+0L);
     	}
     	}
     	PageHelper.startPage(page, size);
     	PageHelper.startPage(page, size);
-    	List<Team> teamList = teamService.getByDeptId(team.getDept_id());
-//    	return super.returnSuccessResult(teamList);
+    	List<Team> teamList = teamService.getList(team) ;
     	return super.returnSuccessResult(new PageInfo(teamList));
     	return super.returnSuccessResult(new PageInfo(teamList));
     }
     }
     
     

+ 18 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/JobDao.java

@@ -0,0 +1,18 @@
+package com.xintong.visualinspection.dao.master;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.xintong.visualinspection.bean.Job;
+
+/**
+ * 文件名:JobDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface JobDao  {
+    
+	public List<Job> getJobList(Job obj);
+   
+}

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

@@ -19,4 +19,5 @@ public interface TeamDao  {
     public void update(Team team);
     public void update(Team team);
     public void delete(Long id);
     public void delete(Long id);
 	public List<Team> getTeamByName(Team team);
 	public List<Team> getTeamByName(Team team);
+	public List<Team> getList(Team obj);
 }
 }

+ 3 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckRuleMapper.xml

@@ -7,6 +7,7 @@
         <result column="checked_person_type" property="checked_person_type" jdbcType="INTEGER" />
         <result column="checked_person_type" property="checked_person_type" jdbcType="INTEGER" />
         <result column="checked_item_num" property="checked_item_num" jdbcType="INTEGER"/>
         <result column="checked_item_num" property="checked_item_num" jdbcType="INTEGER"/>
         <result column="checked_position_id" property="checked_position_id" jdbcType="INTEGER" />
         <result column="checked_position_id" property="checked_position_id" jdbcType="INTEGER" />
+        <result column="checked_position_name" property="checked_position_name" jdbcType="VARCHAR" />
         <result column="checked_dept_id" property="checked_dept_id" jdbcType="INTEGER" />
         <result column="checked_dept_id" property="checked_dept_id" jdbcType="INTEGER" />
         <collection property="check_items" ofType="com.xintong.visualinspection.bean.CheckItem"  
         <collection property="check_items" ofType="com.xintong.visualinspection.bean.CheckItem"  
         	javaType="ArrayList">
         	javaType="ArrayList">
@@ -24,7 +25,8 @@
   	</select>  
   	</select>  
   	
   	
   	<select id="getAllAndCountItem"  resultMap="BaseResultMap" parameterType="com.xintong.visualinspection.bean.CheckRule" >
   	<select id="getAllAndCountItem"  resultMap="BaseResultMap" parameterType="com.xintong.visualinspection.bean.CheckRule" >
-		SELECT o.*,(SELECT COUNT(1) FROM check_rule_item t WHERE t.rule_id =o.id) AS checked_item_num FROM check_rule o
+		SELECT o.*,(SELECT COUNT(1) FROM check_rule_item t WHERE t.rule_id =o.id) AS checked_item_num ,sj.name AS checked_position_name  FROM check_rule o 
+			LEFT JOIN sys_job sj ON o.checked_position_id = sj.id
 		<if test="name!=null">
 		<if test="name!=null">
 			WHERE o.name like CONCAT('%',#{name},'%') 		
 			WHERE o.name like CONCAT('%',#{name},'%') 		
 		</if>
 		</if>

+ 12 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/JobMapper.xml

@@ -0,0 +1,12 @@
+<?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.JobDao" >
+
+   <select id="getJobList" parameterType="com.xintong.visualinspection.bean.Job" resultType="com.xintong.visualinspection.bean.Job">
+   		SELECT * FROM sys_job WHERE 1=1 
+   		<if test="dept_id!=null">
+   			AND department_id=#{dept_id}
+   		</if>
+   </select>
+    
+</mapper>

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

@@ -25,13 +25,13 @@
     </select>
     </select>
     
     
     <select id="getClassList" parameterType="com.xintong.visualinspection.bean.TeamClass" resultMap="BaseResultMap" >
     <select id="getClassList" parameterType="com.xintong.visualinspection.bean.TeamClass" resultMap="BaseResultMap" >
-        SELECT t.* ,st.name as team_name
+        SELECT * FROM ( SELECT t.* ,st.name as team_name,st.type
         FROM sys_team_class t left join sys_team st ON t.team_id = st.id
         FROM sys_team_class t left join sys_team st ON t.team_id = st.id
         WHERE 1=1
         WHERE 1=1
         <if test="dept_id != null">AND t.dept_id = #{dept_id}</if>
         <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="start_time != null">AND t.work_date &gt;= #{start_time}</if>
         <if test="end_time != null">AND t.work_date &lt;= #{end_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
+        ORDER BY t.work_date ASC ,t.class_type ASC) tc WHERE tc.type =#{type}
     </select>
     </select>
 
 
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.TeamClass" >
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.TeamClass" >

+ 13 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TeamMapper.xml

@@ -25,6 +25,19 @@
         WHERE dept_id = #{dept_id}
         WHERE dept_id = #{dept_id}
     </select>
     </select>
     
     
+    
+    <select id="getList" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM sys_team
+        WHERE 1=1 
+        <if test="dept_id!=null">
+        	AND dept_id = #{dept_id}
+        </if>
+        <if test="type!=null">
+           AND type = #{type}
+        </if>
+    </select>
+    
     <select id="getTeamByName" parameterType="com.xintong.visualinspection.bean.Team" resultMap="BaseResultMap" >
     <select id="getTeamByName" parameterType="com.xintong.visualinspection.bean.Team" resultMap="BaseResultMap" >
         SELECT *
         SELECT *
         FROM sys_team
         FROM sys_team

+ 21 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/JobService.java

@@ -0,0 +1,21 @@
+package com.xintong.visualinspection.service;
+
+import java.util.List;
+
+import com.xintong.visualinspection.bean.Job;
+
+/**
+ * 
+ *
+ * ConstantService
+ * 
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ * 
+ * @version 1.0.0
+ *
+ */
+public interface JobService {
+    public List<Job> getJobList(Job obj);
+}

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

@@ -21,6 +21,7 @@ public interface TeamService {
     public List<Team> getAll();
     public List<Team> getAll();
     public Team getById(Long id);
     public Team getById(Long id);
     public List<Team> getByDeptId(Long deptId);
     public List<Team> getByDeptId(Long deptId);
+    public List<Team> getList(Team team);
     public void insert(Team team);
     public void insert(Team team);
     public void update(Team team);
     public void update(Team team);
     public void delete(Long id);
     public void delete(Long id);

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

@@ -163,7 +163,7 @@ public class CheckRuleServiceImpl extends BaseService implements CheckRuleServic
 		List<CheckRule> lists = checkRuleDao.getAllAndCountItem(checkRule);
 		List<CheckRule> lists = checkRuleDao.getAllAndCountItem(checkRule);
 		for(CheckRule c:lists){
 		for(CheckRule c:lists){
 			if(c.getChecked_dept_id()!=null){
 			if(c.getChecked_dept_id()!=null){
-				Organ obj = CacheUtil.deptMap.get(c.getChecked_dept_id());
+				Organ obj = CacheUtil.deptMap.get(c.getChecked_dept_id().intValue());
 				if(obj!=null){
 				if(obj!=null){
 					c.setChecked_dept_name(obj.getOrganname());					
 					c.setChecked_dept_name(obj.getOrganname());					
 				}
 				}

+ 33 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/JobServiceImpl.java

@@ -0,0 +1,33 @@
+package com.xintong.visualinspection.service.impl;
+
+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.Job;
+import com.xintong.visualinspection.dao.master.JobDao;
+import com.xintong.visualinspection.service.BaseService;
+import com.xintong.visualinspection.service.JobService;
+
+/**
+ * 文件名:UserServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+public class JobServiceImpl extends BaseService implements JobService {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(JobServiceImpl.class);
+
+    @Autowired
+    private JobDao jobDao ;
+
+	@Override
+	public List<Job> getJobList(Job obj) {
+		return jobDao.getJobList(obj);
+	}
+	
+
+  
+}

+ 5 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TeamServiceImpl.java

@@ -49,6 +49,11 @@ public class TeamServiceImpl extends BaseService implements TeamService {
 		return teamDao.getByDeptId(deptId);
 		return teamDao.getByDeptId(deptId);
 	}
 	}
 
 
+	@Override
+	public List<Team> getList(Team team) {
+		// TODO Auto-generated method stub
+		return teamDao.getList(team);
+	}
 
 
 	@Override
 	@Override
 	public void insert(Team team) {
 	public void insert(Team team) {