chenrj-PC\chenrj před 8 roky
rodič
revize
8cc6a03b44

+ 22 - 0
VisualInspection/css/statistics/atendance_style.css

@@ -0,0 +1,22 @@
+.table-title {
+    line-height: 50px;
+    text-align: center;
+}
+
+.table-title span {
+    font-size: 22px;
+    color: #333;
+}
+
+.table-head th{
+    border: 1px solid #d9d9d9;
+    text-align: center;
+}
+
+.table-tbody td{
+    border: 1px solid #d9d9d9;
+}
+
+td.b-grey{
+    background:grey;
+}

+ 253 - 0
VisualInspection/js/statistics/common_attendance.js

@@ -0,0 +1,253 @@
+
+$(function(){
+
+    // 初始化部门下的收费站
+     getFsStationList(GV("#center_manage"),function(obj){
+        $("#fs_station").html(obj);
+        // 初始化收费站下的人数
+        getFsEmployee(GV("#fs_station"),function(obj){
+            $("#fs_employee").html(obj);
+        });
+    });
+
+    // 当前月份初始化
+    $("#sel_month").val(getM()-1);
+
+    // 根据月份确定天数
+    monthChange();
+     $("#month_name").html( $("#sel_month").find("option:selected").text());
+
+
+    // 收费站中心选择
+    $("#fs_station").change(function(){
+        var fee_station_id = GV(this);
+        if(fee_station_id == ''){
+            $("#fs_employee").html('');
+        }else{
+            getFsEmployee(fee_station_id,function(obj){
+                $("#fs_employee").html(obj);
+            });
+        }
+    })
+
+    // 导管中心选择
+    $("#center_manage").change(function(){
+        var center_manage_id = GV(this);
+        if(center_manage_id == ''){
+            $("#fs_station,#fs_employee").html('');
+        }else{
+            getFsStationList(center_manage_id,function(obj){
+                 $("#fs_station").html(obj);
+            });
+        }
+    })
+
+    // 查询
+    $("#searchBtn").click(function(){
+        
+        $("#month_name").html( $("#sel_month").find("option:selected").text()  )
+
+        var param = {
+           "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
+           "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+        }
+        
+        if(GV("#fs_employee")!=''){
+             param[ 'user_id'] = GV("#fs_employee");
+        }else if(GV("#fs_station")!=''){
+            param[ 'dept_id' ] = GV("#fs_station");
+        }else if(GV("#center_manage") != ''){
+             param[ 'parent_dept_id' ] = GV("#center_manage");
+        }
+
+        post_common_service("statistics/fs/work/info",param,function(data){
+            // 月份变化
+            monthChange();
+            $(".table-tbody").empty();
+            if(data.length >0){
+                for(var i=0;i< data.length;i++){
+                    $(".table-tbody").append( getTableContent(data[i],i+1));
+                }
+            }
+        },function(error){
+        });
+    })
+    // end
+})
+
+function getTableContent(obj,seq){
+    var days = getDays(GV("#sel_month")-1);
+    var map_class = {};
+    for(var z=0; z < obj.subStatisticsFsWork.length ;z++){
+        if(obj.subStatisticsFsWork[z].check_id !=undefined){
+            map_class[getD(obj.subStatisticsFsWork[z].work_date)+"-"+obj.subStatisticsFsWork[z].class_type] = 2;
+        }else{
+            map_class[getD(obj.subStatisticsFsWork[z].work_date)+"-"+obj.subStatisticsFsWork[z].class_type] = 1;
+        }
+    }
+    var class_html = [];
+    for(var d=0;d<3;d++){
+        var class_type = 3;
+        if(d != 0){
+            class_type = d ;
+        }
+
+        for(var i=26; i<=days; i++){
+            if( map_class[i+"-"+class_type] !=undefined ){
+                if( map_class[i+"-"+class_type]==1){
+                    class_html[d] += '<td>/</td>' ;
+                }else{
+                    class_html[d] += '<td class="b-grey">/</td>' ;
+                }
+            }else{
+                class_html[d] += '<td></td>' ;
+            }
+        }
+        for(var i=1; i<=25; i++){
+            if( map_class[i+"-"+class_type] !=undefined ){
+                if( map_class[i+"-"+class_type]==1){
+                    class_html[d] += '<td>/</td>' ;
+                }else{
+                    class_html[d] += '<td class="b-grey">/</td>' ;
+                }
+            }else{
+                class_html[d] += '<td></td>' ;
+            }
+        }
+    }
+
+    var content = "<tr><td rowspan='3'>"+seq+"</td> <td rowspan='3'>"+obj.feeStationName+"</td> <td rowspan='3'>"+obj.userName+
+            "</td> <td rowspan='3'>"+obj.positionName+"</td><td rowspan='3'>"+ "workno" +"</td><td>夜班</td> "+class_html[0]+"<td rowspan='3'>"+
+            obj.work_days+"</td><td rowspan='3'>"+convertT(obj.work_minutes)+"</td><td rowspan='3'></td> </tr>\
+        <tr><td>早班</td> "+class_html[1]+" </tr>\
+        <tr><td>中班</td> "+ class_html[2] +" </tr>" ;
+
+    return content;
+}
+
+/**
+ * 月份变化 , 天数变化
+ */
+function monthChange(){
+    $(".m28").show();
+    $(".m"+getDays(GV("#sel_month")-1)).hide();
+}
+
+/**
+ * xxx分钟 转化 xx时xx分
+ */
+function convertT(minute){
+    return minute/60 +"时"+minute%60+"分";
+}
+
+/**
+ * 获取当前月份值
+ */
+function getM(datet){
+    var date = new Date();
+    if(date!=undefined && datet instanceof Date){
+        date = datet ;
+    }
+    return date.getMonth() +1 ;
+}
+
+/**
+ * 根据Date 获取天数值
+ * parm: string date 
+ * return int
+ */
+function getD(date){
+    var datev = new Date(date) ;
+    return datev.getDate() ;
+}
+
+/**
+ * 根据收费站id获取该收费站下的人员列表
+ * param: fs_station_id , func 异步回调
+ * return: String , List Option
+ */
+function getFsEmployee(fs_station_id , func){ 
+    var param = {
+            "organid":fs_station_id
+    }
+    post_common_service("user/getFsUserList",param,function(data){
+        var resultStr = ''
+        if(data.length > 0){
+            resultStr = "<option value=''>全部</option>";  
+            for(var i=0;i<data.length;i++){
+                resultStr += "<option value="+data[i].id+">"+data[i].truename+"</option>";  
+            }
+        }
+        func(resultStr);
+    },function(error){
+    });
+}
+
+/**
+ * 根据道管中心id 获取收费站select 列表
+ * param: center_manage_id , func 异步回调方法
+ * return: String select 下 List<Option>
+ */
+function getFsStationList(center_manage_id,func){ 
+    var param = {
+            "parentid":center_manage_id
+    }
+    post_common_service("dept/getDeptInfosByDeptId",param,function(data){
+         var str = '';
+        if(data.length > 0){
+            str = "<option value=''>全部</option>";  
+            for(var i=0;i<data.length;i++){
+                str += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+            }
+        }
+       func(str);
+    },function(error){
+    });
+}
+
+/**
+ * 根据选择器 回去value值
+ * param: id 选择器
+ * return value
+ */ 
+function GV(selector){
+    return $(selector).val();
+}
+
+/**
+ * 根据选择器,获取html值
+ * param:selector 选择器
+ * return: html value
+ */ 
+function GH(selector){
+    return $(selector).html();
+}
+
+/**
+ * 根据月份,判断当前月份天数
+ * param: month String 月份 ,datet Date 年份
+ * return:days( 28,29,30,31 )
+ */
+function getDays(mouth,datet){
+    //构造当前日期对象
+    var date = new Date();
+    if(date!=undefined && datet instanceof Date){
+        date = datet ;
+    }
+    //获取年份
+    var year = date.getFullYear();
+    //定义当月的天数;
+    var days ;
+    //当月份为二月时,根据闰年还是非闰年判断天数
+    if(mouth == 2){
+            days= year % 4 == 0 ? 29 : 28;
+    }
+    else if(mouth == 1 || mouth == 3 || mouth == 5 || mouth == 7 || mouth == 8 || mouth == 10 || mouth == 12){
+        //月份为:1,3,5,7,8,10,12 时,为大月.则天数为31;
+        days= 31;
+    }
+    else{
+        days= 30;   
+    }
+    return days ;
+}

+ 1 - 0
VisualInspection/view/statistics/change_attendance.html

@@ -0,0 +1 @@
+222

+ 1 - 0
VisualInspection/view/statistics/change_work.html

@@ -0,0 +1 @@
+111

+ 2 - 2
VisualInspection/view/statistics/check_workload_statistics.html

@@ -2,8 +2,8 @@
 <script src="/js/statistics/check_workload_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/check_workload_statistics.css">
 <div class="container-right">
-    <div class="row-1"><span>稽查人员工作量统计</span></div>
-    <div class="line-1"></div>
+    <!--<div class="row-1"><span>稽查人员工作量统计</span></div>
+    <div class="line-1"></div>-->
     <div class="row-2">
         <div>
             <div class="name1"><span>请选择稽查人员:</span></div>

+ 116 - 0
VisualInspection/view/statistics/common_attendance.html

@@ -0,0 +1,116 @@
+<script src="/js/statistics/common_attendance.js?__inline"></script>
+<link rel="stylesheet" type="text/css" href="/css/statistics/atendance_style.css">
+<div class="container-fluid ">
+    <div class="row">
+        <form  class="form-horizontal">
+            <div class="form-group">
+                <label for="exampleInputAccount1" class="col-sm-1">月份</label>
+                <div class="col-sm-2">
+                    <select class="form-control" id="sel_month">
+                        <option value="1">一月</option>
+                        <option value="2">二月</option>
+                        <option value="3">三月</option>
+                        <option value="4">四月</option>
+                        <option value="5">五月</option>
+                        <option value="6">六月</option>
+                        <option value="7">七月</option>
+                        <option value="8">八月</option>
+                        <option value="9">九月</option>
+                        <option value="10">十月</option>
+                        <option value="11">十一月</option>
+                        <option value="12">十二月</option>
+                    </select>
+                </div>
+                <label for="exampleInputAccount1" class="col-sm-1">部门</label>
+                <div class="col-sm-2">
+                    <select class="form-control" id="center_manage">
+                        <option value="">全部</option>
+                        <option selected value="30">连云港</option>
+                        <option value="31">盐城</option>
+                        <option value="32">南通</option>
+                    </select>
+                </div>
+                <div class="col-sm-2">
+                    <select class="form-control" id="fs_station">
+
+                    </select>
+                </div>
+                <div class="col-sm-2">
+                    <select class="form-control" id="fs_employee">
+
+                    </select>
+                </div>
+                <div class="col-sm-2">
+                    <button class="btn btn-primary" id="searchBtn" type="button" >查询</button>
+                </div>
+            </div>
+        </form>
+    </div>
+
+
+
+    <div class="table-title"><span id="month_name"></span><span>份出勤明细统计表</span></div>
+
+    <div class="row">
+          
+              <div class="table-head" ><table  width="100%" min-height="190px" align="center" >
+                  <thead>
+                    <tr>
+                        <th rowspan="2" width="45px">序号</th>
+                        <th rowspan="2" width="80px">站名</th>
+                        <th rowspan="2" width="90px">姓名</th>
+                        <th rowspan="2" width="80px">岗位</th>
+                        <th rowspan="2" width="80px">工号</th>
+                        <th width="80px">日期</th>
+                        <th  rowspan="2">26</th>
+                        <th  rowspan="2">27</th>
+                        <th  rowspan="2">28</th>
+                        <th class="m28"  rowspan="2">29</th>
+                        <th class="m28 m29"  rowspan="2">30</th>
+                        <th class="m28 m29 m30"  rowspan="2">31</th>
+                        <th  rowspan="2">1</th>
+                        <th  rowspan="2">2</th>
+                        <th  rowspan="2">3</th>
+                        <th rowspan="2">4</th>
+                        <th  rowspan="2">5</th>
+                        <th  rowspan="2">6</th>
+                        <th  rowspan="2">7</th>
+                        <th rowspan="2">8</th>
+                        <th  rowspan="2">9</th>
+                        <th rowspan="2">10</th>
+                        <th  rowspan="2">11</th>
+                        <th rowspan="2">12</th>
+                        <th  rowspan="2">13</th>
+                        <th  rowspan="2">14</th>
+                        <th  rowspan="2">15</th>
+                        <th  rowspan="2">16</th>
+                        <th  rowspan="2">17</th>
+                        <th  rowspan="2">18</th>
+                        <th  rowspan="2">19</th>
+                        <th  rowspan="2">20</th>
+                        <th  rowspan="2">21</th>
+                        <th  rowspan="2">22</th>
+                        <th  rowspan="2">23</th>
+                        <th  rowspan="2">24</th>
+                        <th  rowspan="2">25</th>
+                        <th  rowspan="2"  width="60px">出勤天数</th>
+                        <th  rowspan="2"  width="60px">在亭时长</th>
+                        <th  rowspan="2"  width="45px">备注</th>
+                    </tr>
+                    <tr> 
+                        <th>班次</th>
+                    </tr>
+                  </thead>
+                  <tbody class="table-tbody" style="background:white" align="center" height="500px">
+
+                  </tbody>
+                  </table>
+                </div>
+         
+    </div>
+</div>
+<script>
+    $(document).ready(function() {
+
+    });
+</script>

+ 1 - 0
VisualInspection/view/statistics/common_work.html

@@ -0,0 +1 @@
+44

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

@@ -2,8 +2,8 @@
 <script src="/js/statistics/personal_data_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/personal_data_statistics.css">
 <div class="container-right">
-    <div class="row-1"><span>个人数据统计</span></div>
-    <div class="line-1"></div>
+    <!--<div class="row-1"><span>个人数据统计</span></div>
+    <div class="line-1"></div>-->
     <div class="row-2">
         <div>
             <!--<div class="name"><span>刘娟</span></div>

+ 2 - 2
VisualInspection/view/statistics/road_manage_statistics.html

@@ -2,8 +2,8 @@
 <script src="/js/statistics/road_manage_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/road_manage_statistics.css">
 <div class="container-right">
-    <div class="row-1"><span>道管中心统计</span></div>
-    <div class="line-1"></div>
+    <!--<div class="row-1"><span>道管中心统计</span></div>-->
+    <!--<div class="line-1"></div>-->
     <div class="row-2">
         <div>
             <div class="div-month"><select>

+ 2 - 2
VisualInspection/view/statistics/toll_station_statistics.html

@@ -2,8 +2,8 @@
 <script src="/js/statistics/toll_station_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/toll_station_statistics.css">
 <div class="container-right">
-    <div class="row-1"><span>收费站统计</span></div>
-    <div class="line-1"></div>
+    <!--<div class="row-1"><span>收费站统计</span></div>
+    <div class="line-1"></div>-->
     <div class="row-2">
         <div><div class="div-month"><select>
             <option value="1">一月</option>

+ 2 - 2
VisualInspection/view/statistics/total_company_statistics.html

@@ -2,8 +2,8 @@
 <script src="/js/statistics/total_company_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/total_company_statistics.css">
 <div class="container-right">
-    <div class="row-1"><span>公司统计</span></div>
-    <div class="line-1"></div>
+    <!--<div class="row-1"><span>公司统计</span></div>
+    <div class="line-1"></div>-->
     <div class="row-2">
         <div>
             <div class="div-month"><select>

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

@@ -221,7 +221,7 @@ public class StatisticsController extends BaseController {
     }
     
     /**
-     * 
+     * 申诉统计
      */
     @RequestMapping(value = "/check/appeal")
     public String getCheckAppeal(@RequestBody CheckAppealStatistic obj){

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

@@ -311,10 +311,10 @@
     
     <sql id="select_Fswork_condition">
     	AND t.user_id IS NOT NULL
-    	<if test="start_time!=null and start_time!=''">
+    	<if test="start_time!=null">
    			AND t.start_time >= #{start_time}
    		</if>
-   		<if test="end_time!=null and end_time!=''">
+   		<if test="end_time!=null">
    			AND t.end_time &lt;= #{end_time}
    		</if>
    		<if test="dept_list!=null and dept_list.size()>0 ">
@@ -404,10 +404,10 @@
 	<select id="selectCheckAppealNum" parameterType="com.xintong.visualinspection.bean.CheckAppealStatistic" resultMap="appealNum" >
 		SELECT COUNT(t.appeal_dept) AS appeal_num ,t.appeal_dept AS dept_id,t.appeal_result FROM check_appeal t 
 			INNER JOIN check_task ct ON t.task_id = ct.id WHERE 1=1
-			<if test="start_time!=null and start_time!=''">
+			<if test="start_time!=null ">
 	   			AND t.appeal_time >= #{start_time}
 	   		</if>
-	   		<if test="end_time!=null and end_time!=''">
+	   		<if test="end_time!=null ">
 	   			AND t.appeal_time &lt;= #{end_time}
 	   		</if>
 	   		<if test="dept_list!=null and dept_list.size()>0 ">