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

Merge branch 'master' of http://git_xt.jsxt.jsjtyxt.com/wenhongquan/VisualInspection

# Conflicts:
#	VisualInspection/js/lib/mytable.js
minitiger 8 лет назад
Родитель
Сommit
9f55210f27
55 измененных файлов с 3538 добавлено и 507 удалено
  1. 22 0
      VisualInspection/css/statistics/atendance_style.css
  2. 23 9
      VisualInspection/css/statistics/personal_data_statistics.css
  3. 17 5
      VisualInspection/css/statistics/road_manage_statistics.css
  4. 38 10
      VisualInspection/css/statistics/toll_station_statistics.css
  5. 9 5
      VisualInspection/css/statistics/total_company_statistics.css
  6. 13 0
      VisualInspection/js/lib/echarts/src/theme/default.js
  7. 297 0
      VisualInspection/js/lib/echarts/src/theme/infographic.js
  8. 257 0
      VisualInspection/js/lib/echarts/src/theme/macarons.js
  9. 111 90
      VisualInspection/js/lib/mytable.js
  10. 4 1
      VisualInspection/js/mytask/apply_task.js
  11. 2 1
      VisualInspection/js/mytask/check.js
  12. 5 1
      VisualInspection/js/mytask/task_list.js
  13. 83 0
      VisualInspection/js/statistics/appeal.js
  14. 11 10
      VisualInspection/js/statistics/assess_ranking.js
  15. 148 0
      VisualInspection/js/statistics/change_attendance.js
  16. 102 0
      VisualInspection/js/statistics/change_work.js
  17. 108 23
      VisualInspection/js/statistics/check_workload_statistics.js
  18. 148 0
      VisualInspection/js/statistics/common_attendance.js
  19. 137 0
      VisualInspection/js/statistics/common_statistic.js
  20. 102 0
      VisualInspection/js/statistics/common_work.js
  21. 90 33
      VisualInspection/js/statistics/personal_data_statistics.js
  22. 106 53
      VisualInspection/js/statistics/road_manage_statistics.js
  23. 282 66
      VisualInspection/js/statistics/toll_station_statistics.js
  24. 90 33
      VisualInspection/js/statistics/total_company_statistics.js
  25. 3 3
      VisualInspection/js/util/media.js
  26. 4 0
      VisualInspection/js/util/util.js
  27. 23 2
      VisualInspection/view/mytask/taskDetail.html
  28. 69 0
      VisualInspection/view/statistics/appeal.html
  29. 117 0
      VisualInspection/view/statistics/change_attendance.html
  30. 86 0
      VisualInspection/view/statistics/change_work.html
  31. 5 29
      VisualInspection/view/statistics/check_workload_statistics.html
  32. 117 0
      VisualInspection/view/statistics/common_attendance.html
  33. 86 0
      VisualInspection/view/statistics/common_work.html
  34. 22 16
      VisualInspection/view/statistics/emp_ranking.html
  35. 11 10
      VisualInspection/view/statistics/personal_data_statistics.html
  36. 2 2
      VisualInspection/view/statistics/road_manage_statistics.html
  37. 5 3
      VisualInspection/view/statistics/toll_station_statistics.html
  38. 2 2
      VisualInspection/view/statistics/total_company_statistics.html
  39. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppeal.java
  40. 49 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppealStatistic.java
  41. 24 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  42. 28 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java
  43. 72 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsFsWork.java
  44. 43 30
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java
  45. 50 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java
  46. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/UserInfoDao.java
  47. 17 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java
  48. 10 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml
  49. 116 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  50. 20 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java
  51. 317 58
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  52. 23 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/util/DateUtil.java
  53. BIN
      VisualInspection_server/src/main/resources/appeal_info.xls
  54. 9 8
      VisualInspection_server/src/main/resources/application.properties
  55. BIN
      VisualInspection_server/src/main/resources/employee_order.xls

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

+ 23 - 9
VisualInspection/css/statistics/personal_data_statistics.css

@@ -97,11 +97,10 @@
     width:20px;
     height:50px;
     float:left;
-    margin-left: 15px;
     line-height: 50px;
 }
 .div-start input,.div-end input{
-    width:120px;
+    width:100px;
     height:30px;
     border: 1px solid #ccc;
     font-size: 14px;
@@ -116,36 +115,51 @@
     line-height: 50px;
 }
 .div-check{
-    width:190px;
+    width:160px;
     height:50px;
     float:left;
-    margin-left: 50px;
+    margin-left: 10px;
     line-height: 50px;
     border-radius: 4px;
 }
 .div-check select{
-    width:190px;
+    width:160px;
     height:30px;
     border: 1px solid #ccc;
     border-radius: 4px;
 }
 .div-select{
-    width:80px;
+    width:100px;
     height:50px;
     float:left;
-    margin-left: 20px;
+    margin-left: 5px;
+    line-height: 50px;
+}
+.div-select select{
+    width:100px; 
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
 }
+
+.name1{
+    width:98px;
+    height:50px;
+    float:left;
+    margin-left: 10px;
+    line-height: 50px;
+} 
 .query{
     width:80px;
     height:50px;
     float:left;
-    margin-left: 40px;
+    margin-left: 20px;
 }
 .export{
     width:80px;
     height:50px;
     float:right;
-    margin-right: 40px;
+    margin-right: 20px;
 }
 
 .div-button button{

+ 17 - 5
VisualInspection/css/statistics/road_manage_statistics.css

@@ -5,7 +5,7 @@
     border:1px solid #d9d9d9;
     font-family: '宋体';
     border-radius: 4px;
-    font-size: 15px;
+    font-size: 12px;
 }
 .row-1{
     width:100%;
@@ -47,6 +47,15 @@
     margin-left: 20px;
     line-height: 50px;
 }
+.div-roadManage select{
+    width:80px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 13px;
+    font-size: 14px;
+}
+
 .div-button{
     width:80px;
     height:50px;
@@ -157,6 +166,13 @@
    float:left;
    margin-left: 20px;
 }
+.div-month select{
+    width: 80px;
+    height: 30px;
+    border: 1px solid #ccc;
+    border-radius: 4px; 
+    font-size: 14px;
+}
 .query-total{
    width:70px;
    height:20px; 
@@ -164,10 +180,6 @@
    float:right;
    margin-right: 20px;
 }
-.row-2 select{
-    width:80px;
-    height:25px;
-}
 .row-7{
     width:100%;
     height:40px;

+ 38 - 10
VisualInspection/css/statistics/toll_station_statistics.css

@@ -5,7 +5,7 @@
     border:1px solid #d9d9d9;
     font-family: '宋体';
     border-radius: 4px;
-    font-size: 15px;
+    font-size: 12px;
 }
 .row-1{
     width:100%;
@@ -54,15 +54,32 @@
     margin-left: 20px;
     line-height: 50px;
 }
-#second{
-    width:120px;
-    height:25px;
+.div-roadManage select{
+    width:80px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}
+.div-station select{
+    width:110px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}
+.div-month select{
+    width:80px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
 }
 .div-button{
     width:80px;
     height:50px;
     float:left;
-    margin-left: 20px;
+    margin-left: 10px;
 }
 
 .div-button button{
@@ -75,6 +92,22 @@
     border-radius: 4px;
     margin-top: 10px;
 }
+.btn-change{
+    width:60px;
+    height:40px;
+    float:right;
+}
+.view_change{
+    width:60px;
+    height:40px;
+    color: #fff;
+    background-color: #00ced1;
+    border-color: #1970fc;
+    border:1px solid transparent;
+    border-radius: 4px;
+    font-weight: bolder;
+}
+
 .row-3,.row-4,.row-6,.row-7{
     width:100%;
     height:40px;
@@ -99,7 +132,6 @@
     height:40px;
     float:left;
     line-height: 40px;
-    text-align: center;
     font-weight: bold;
 }
 .line-2{
@@ -175,10 +207,6 @@
    float:right;
    margin-right: 20px;
 }
-.row-2 select{
-    width:80px;
-    height:25px;
-}
 .row-7{
     width:100%;
     height:40px;

+ 9 - 5
VisualInspection/css/statistics/total_company_statistics.css

@@ -5,7 +5,7 @@
     border:1px solid #d9d9d9;
     font-family: '宋体';
     border-radius: 4px;
-    font-size: 15px;
+    font-size: 12px;
 }
 .row-1{
     width:100%;
@@ -40,6 +40,13 @@
     margin-left: 20px;
     line-height: 50px;
 }
+.div-month select{
+    width: 80px;
+    height: 30px;
+    border: 1px solid #ccc;
+    border-radius: 4px; 
+    font-size: 14px;
+}
 .div-button{
     width:80px;
     height:50px;
@@ -157,10 +164,7 @@
    float:right;
    margin-right: 20px;
 }
-.row-2 select{
-    width:80px;
-    height:25px;
-}
+
 .row-7{
     width:100%;
     height:40px;

+ 13 - 0
VisualInspection/js/lib/echarts/src/theme/default.js

@@ -0,0 +1,13 @@
+/**
+ * echarts默认主题,开发中
+ *
+ * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
+ * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
+ *
+ */
+define(function() {
+    var config = {
+    };
+
+    return config;
+});

+ 297 - 0
VisualInspection/js/lib/echarts/src/theme/infographic.js

@@ -0,0 +1,297 @@
+define(function() {
+
+var theme = {
+    // 默认色板
+    color: [
+        '#C1232B','#B5C334','#FCCE10','#E87C25','#27727B',
+        '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
+        '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
+    ],
+
+    // 图表标题
+    title: {
+        textStyle: {
+            fontWeight: 'normal',
+            color: '#27727B'          // 主标题文字颜色
+        }
+    },
+
+    // 值域
+    dataRange: {
+        x:'right',
+        y:'center',
+        itemWidth: 5,
+        itemHeight:25,
+        color:['#C1232B','#FCCE10']
+    },
+
+    toolbox: {
+        color : [
+            '#C1232B','#B5C334','#FCCE10','#E87C25','#27727B',
+            '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD'
+        ],
+        effectiveColor : '#ff4500'
+    },
+
+    // 提示框
+    tooltip: {
+        backgroundColor: 'rgba(50,50,50,0.5)',     // 提示背景颜色,默认为透明度为0.7的黑色
+        axisPointer : {            // 坐标轴指示器,坐标轴触发有效
+            type : 'line',         // 默认为直线,可选为:'line' | 'shadow'
+            lineStyle : {          // 直线指示器样式设置
+                color: '#27727B',
+                type: 'dashed'
+            },
+            crossStyle: {
+                color: '#27727B'
+            },
+            shadowStyle : {                     // 阴影指示器样式设置
+                color: 'rgba(200,200,200,0.3)'
+            }
+        }
+    },
+
+    // 区域缩放控制器
+    dataZoom: {
+        dataBackgroundColor: 'rgba(181,195,52,0.3)',            // 数据背景颜色
+        fillerColor: 'rgba(181,195,52,0.2)',   // 填充颜色
+        handleColor: '#27727B'    // 手柄颜色
+    },
+
+    // 网格
+    grid: {
+        borderWidth:0
+    },
+
+    // 类目轴
+    categoryAxis: {
+        axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: '#27727B'
+            }
+        },
+        splitLine: {           // 分隔线
+            show: false
+        }
+    },
+
+    // 数值型坐标轴默认参数
+    valueAxis: {
+        axisLine: {            // 坐标轴线
+            show: false
+        },
+        splitArea : {
+            show: false
+        },
+        splitLine: {           // 分隔线
+            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
+                color: ['#ccc'],
+                type: 'dashed'
+            }
+        }
+    },
+
+    polar : {
+        axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: '#ddd'
+            }
+        },
+        splitArea : {
+            show : true,
+            areaStyle : {
+                color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
+            }
+        },
+        splitLine : {
+            lineStyle : {
+                color : '#ddd'
+            }
+        }
+    },
+
+    timeline : {
+        lineStyle : {
+            color : '#27727B'
+        },
+        controlStyle : {
+            normal : { color : '#27727B'},
+            emphasis : { color : '#27727B'}
+        },
+        symbol : 'emptyCircle',
+        symbolSize : 3
+    },
+
+    // 折线图默认参数
+    line: {
+        itemStyle: {
+            normal: {
+                borderWidth:2,
+                borderColor:'#fff',
+                lineStyle: {
+                    width: 3
+                }
+            },
+            emphasis: {
+                borderWidth:0
+            }
+        },
+        symbol: 'circle',  // 拐点图形类型
+        symbolSize: 3.5           // 拐点图形大小
+    },
+
+    // K线图默认参数
+    k: {
+        itemStyle: {
+            normal: {
+                color: '#C1232B',       // 阳线填充颜色
+                color0: '#B5C334',      // 阴线填充颜色
+                lineStyle: {
+                    width: 1,
+                    color: '#C1232B',   // 阳线边框颜色
+                    color0: '#B5C334'   // 阴线边框颜色
+                }
+            }
+        }
+    },
+
+    // 散点图默认参数
+    scatter: {
+        itemStyle: {
+            normal: {
+                borderWidth:1,
+                borderColor:'rgba(200,200,200,0.5)'
+            },
+            emphasis: {
+                borderWidth:0
+            }
+        },
+        symbol: 'star4',    // 图形类型
+        symbolSize: 4        // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
+    },
+
+    // 雷达图默认参数
+    radar : {
+        symbol: 'emptyCircle',    // 图形类型
+        symbolSize:3
+        //symbol: null,         // 拐点图形类型
+        //symbolRotate : null,  // 图形旋转控制
+    },
+
+    map: {
+        itemStyle: {
+            normal: {
+                areaStyle: {
+                    color: '#ddd'
+                },
+                label: {
+                    textStyle: {
+                        color: '#C1232B'
+                    }
+                }
+            },
+            emphasis: {                 // 也是选中样式
+                areaStyle: {
+                    color: '#fe994e'
+                },
+                label: {
+                    textStyle: {
+                        color: 'rgb(100,0,0)'
+                    }
+                }
+            }
+        }
+    },
+
+    force : {
+        itemStyle: {
+            normal: {
+                linkStyle : {
+                    color : '#27727B'
+                }
+            }
+        }
+    },
+
+    chord : {
+        itemStyle : {
+            normal : {
+                borderWidth: 1,
+                borderColor: 'rgba(128, 128, 128, 0.5)',
+                chordStyle : {
+                    lineStyle : {
+                        color : 'rgba(128, 128, 128, 0.5)'
+                    }
+                }
+            },
+            emphasis : {
+                borderWidth: 1,
+                borderColor: 'rgba(128, 128, 128, 0.5)',
+                chordStyle : {
+                    lineStyle : {
+                        color : 'rgba(128, 128, 128, 0.5)'
+                    }
+                }
+            }
+        }
+    },
+
+    gauge : {
+        center:['50%','80%'],
+        radius:'100%',
+        startAngle: 180,
+        endAngle : 0,
+        axisLine: {            // 坐标轴线
+            show: true,        // 默认显示,属性show控制显示与否
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: [[0.2, '#B5C334'],[0.8, '#27727B'],[1, '#C1232B']],
+                width: '40%'
+            }
+        },
+        axisTick: {            // 坐标轴小标记
+            splitNumber: 2,   // 每份split细分多少段
+            length: 5,        // 属性length控制线长
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: '#fff'
+            }
+        },
+        axisLabel: {           // 坐标轴文本标签,详见axis.axisLabel
+            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
+                color: '#fff',
+                fontWeight:'bolder'
+            }
+        },
+        splitLine: {           // 分隔线
+            length: '5%',         // 属性length控制线长
+            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
+                color: '#fff'
+            }
+        },
+        pointer : {
+            width : '40%',
+            length: '80%',
+            color: '#fff'
+        },
+        title : {
+          offsetCenter: [0, -20],       // x, y,单位px
+          textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
+            color: 'auto',
+            fontSize: 20
+          }
+        },
+        detail : {
+            offsetCenter: [0, 0],       // x, y,单位px
+            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
+                color: 'auto',
+                fontSize: 40
+            }
+        }
+    },
+
+    textStyle: {
+        fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
+    }
+};
+
+    return theme;
+});

+ 257 - 0
VisualInspection/js/lib/echarts/src/theme/macarons.js

@@ -0,0 +1,257 @@
+define(function() {
+
+var theme = {
+    // 默认色板
+    color: [
+        '#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',
+        '#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
+        '#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
+        '#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
+    ],
+
+    // 图表标题
+    title: {
+        textStyle: {
+            fontWeight: 'normal',
+            color: '#008acd'          // 主标题文字颜色
+        }
+    },
+    
+    // 值域
+    dataRange: {
+        itemWidth: 15,
+        color: ['#5ab1ef','#e0ffff']
+    },
+
+    // 工具箱
+    toolbox: {
+        color : ['#1e90ff', '#1e90ff', '#1e90ff', '#1e90ff'],
+        effectiveColor : '#ff4500'
+    },
+
+    // 提示框
+    tooltip: {
+        backgroundColor: 'rgba(50,50,50,0.5)',     // 提示背景颜色,默认为透明度为0.7的黑色
+        axisPointer : {            // 坐标轴指示器,坐标轴触发有效
+            type : 'line',         // 默认为直线,可选为:'line' | 'shadow'
+            lineStyle : {          // 直线指示器样式设置
+                color: '#008acd'
+            },
+            crossStyle: {
+                color: '#008acd'
+            },
+            shadowStyle : {                     // 阴影指示器样式设置
+                color: 'rgba(200,200,200,0.2)'
+            }
+        }
+    },
+
+    // 区域缩放控制器
+    dataZoom: {
+        dataBackgroundColor: '#efefff',            // 数据背景颜色
+        fillerColor: 'rgba(182,162,222,0.2)',   // 填充颜色
+        handleColor: '#008acd'    // 手柄颜色
+    },
+
+    // 网格
+    grid: {
+        borderColor: '#eee'
+    },
+
+    // 类目轴
+    categoryAxis: {
+        axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: '#008acd'
+            }
+        },
+        splitLine: {           // 分隔线
+            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
+                color: ['#eee']
+            }
+        }
+    },
+
+    // 数值型坐标轴默认参数
+    valueAxis: {
+        axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: '#008acd'
+            }
+        },
+        splitArea : {
+            show : true,
+            areaStyle : {
+                color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
+            }
+        },
+        splitLine: {           // 分隔线
+            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
+                color: ['#eee']
+            }
+        }
+    },
+
+    polar : {
+        axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: '#ddd'
+            }
+        },
+        splitArea : {
+            show : true,
+            areaStyle : {
+                color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
+            }
+        },
+        splitLine : {
+            lineStyle : {
+                color : '#ddd'
+            }
+        }
+    },
+
+    timeline : {
+        lineStyle : {
+            color : '#008acd'
+        },
+        controlStyle : {
+            normal : { color : '#008acd'},
+            emphasis : { color : '#008acd'}
+        },
+        symbol : 'emptyCircle',
+        symbolSize : 3
+    },
+
+    // 柱形图默认参数
+    bar: {
+        itemStyle: {
+            normal: {
+                barBorderRadius: 5
+            },
+            emphasis: {
+                barBorderRadius: 5
+            }
+        }
+    },
+
+    // 折线图默认参数
+    line: {
+        smooth : true,
+        symbol: 'emptyCircle',  // 拐点图形类型
+        symbolSize: 3           // 拐点图形大小
+    },
+    
+    // K线图默认参数
+    k: {
+        itemStyle: {
+            normal: {
+                color: '#d87a80',       // 阳线填充颜色
+                color0: '#2ec7c9',      // 阴线填充颜色
+                lineStyle: {
+                    color: '#d87a80',   // 阳线边框颜色
+                    color0: '#2ec7c9'   // 阴线边框颜色
+                }
+            }
+        }
+    },
+    
+    // 散点图默认参数
+    scatter: {
+        symbol: 'circle',    // 图形类型
+        symbolSize: 4        // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
+    },
+
+    // 雷达图默认参数
+    radar : {
+        symbol: 'emptyCircle',    // 图形类型
+        symbolSize:3
+        //symbol: null,         // 拐点图形类型
+        //symbolRotate : null,  // 图形旋转控制
+    },
+
+    map: {
+        itemStyle: {
+            normal: {
+                areaStyle: {
+                    color: '#ddd'
+                },
+                label: {
+                    textStyle: {
+                        color: '#d87a80'
+                    }
+                }
+            },
+            emphasis: {                 // 也是选中样式
+                areaStyle: {
+                    color: '#fe994e'
+                }
+            }
+        }
+    },
+    
+    force : {
+        itemStyle: {
+            normal: {
+                linkStyle : {
+                    color : '#1e90ff'
+                }
+            }
+        }
+    },
+
+    chord : {
+        itemStyle : {
+            normal : {
+                borderWidth: 1,
+                borderColor: 'rgba(128, 128, 128, 0.5)',
+                chordStyle : {
+                    lineStyle : {
+                        color : 'rgba(128, 128, 128, 0.5)'
+                    }
+                }
+            },
+            emphasis : {
+                borderWidth: 1,
+                borderColor: 'rgba(128, 128, 128, 0.5)',
+                chordStyle : {
+                    lineStyle : {
+                        color : 'rgba(128, 128, 128, 0.5)'
+                    }
+                }
+            }
+        }
+    },
+
+    gauge : {
+        axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']], 
+                width: 10
+            }
+        },
+        axisTick: {            // 坐标轴小标记
+            splitNumber: 10,   // 每份split细分多少段
+            length :15,        // 属性length控制线长
+            lineStyle: {       // 属性lineStyle控制线条样式
+                color: 'auto'
+            }
+        },
+        splitLine: {           // 分隔线
+            length :22,         // 属性length控制线长
+            lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
+                color: 'auto'
+            }
+        },
+        pointer : {
+            width : 5
+        }
+    },
+    
+    textStyle: {
+        fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
+    }
+};
+
+    return theme;
+});

+ 111 - 90
VisualInspection/js/lib/mytable.js

@@ -1,4 +1,4 @@
-(function($) {
+(function ($) {
     'use strict';
 
     var con;
@@ -12,14 +12,14 @@
      * @param object element           DOM element or jquery element
      * @param object options           Datatable options
      */
-    var mytable = function(element, options, flag) {
+    var mytable = function (element, options, flag) {
         // default options
         var DEFAULTS = {
-            checkable:false,
-            sortable:false,
-            isShoWPager:true,
-            pager:{
-                page_size:10
+            checkable: false,
+            sortable: false,
+            isShoWPager: true,
+            pager: {
+                page_size: 10
             }
         };
         this.options = $.extend({}, DEFAULTS, options);
@@ -29,36 +29,36 @@
         this.con = $(element);
         this.obj = this;
         $(element).html('');
-        if(flag) return;
+        if (flag) return;
         $(element).append('<div class=""><div class="my_table" data-checkable="true" data-sortable="true"></div></div>'
-                           + '<div id="kkpager" class="" style="text-align:center"></div>');
-        this.getRemoteData(element,this.options,this);
-        return this;       
+            + '<div id="kkpager" class="" style="text-align:center"></div>');
+        this.getRemoteData(element, this.options, this);
+        return this;
     };
 
     // Get options
     mytable.prototype = {
-        getRemoteData:function(element,options,obj){
-            if(!element) element = this.element;
-            if(!options) options = this.options;
+        getRemoteData: function (element, options, obj) {
+            if (!element) element = this.element;
+            if (!options) options = this.options;
             var url = options.url;
             var p_cur = 1;
             var pager = options.pager;
             this.getServerData(p_cur, options, element, obj);
         },
-        getRemoteData1:function(p_cur){
+        getRemoteData1: function (p_cur) {
             this.getServerData(p_cur, this.options, this.element, this.obj);
         },
-        getServerData:function(p_cur, options, element, obj){
+        getServerData: function (p_cur, options, element, obj) {
             var url = options.url;
             var pager = options.pager;
             var page_size = pager.page_size;
             var param = options.param;
             // var obj = this.obj;
-            post_common_service(url+"/"+p_cur+"/"+page_size, param, function(data) {
+            post_common_service(url + "/" + p_cur + "/" + page_size, param, function (data) {
                 console.log(data);
-                if(!data){
-                    data = {list:[]};
+                if (!data) {
+                    data = { list: [] };
                     // return;
                 }
                  // 这边把请求过来的数据缓存到table选择器中
@@ -68,12 +68,12 @@
                 obj.setTable(data.list,element, options,p_cur); 
                 if(obj.options.pager && options.isShoWPager){
                     options.pager = {
-                        page_size:10,
-                        p_cur : data.pageNum, //页号
-                        p_pages:data.pages, //总页码
-                        p_totalRecords:data.total
+                        page_size: 10,
+                        p_cur: data.pageNum, //页号
+                        p_pages: data.pages, //总页码
+                        p_totalRecords: data.total
                         // 'cb':'getRemoteData
-                    }   
+                    }
                     obj.setPager();
                 }
                 if(data.list.length<=0){
@@ -81,23 +81,23 @@
                 }else{
                      $("#kkpager").css("display","block");
                 }
-            }, function(error) {
+            }, function (error) {
                 alert(error);
             });
         },
-        setTable:function(datas, element, options,p_cur) {
+        setTable: function (datas, element, options, p_cur) {
             var cols = options.cols;
             var newCols = []
-            for(var i in cols) {
-                if(!cols[i].hide){
+            for (var i in cols) {
+                if (!cols[i].hide) {
                     newCols.push(cols[i]);
                 }
             }
             cols = newCols;
             var tableData = datas;
             // var pager = options.pager;
-           
-            clearTable(cols,options,element);
+
+            clearTable(cols, options, element);
             var rowData = formatTableData(tableData, cols, p_cur);
 
             // 使用data参数更新数据:
@@ -109,65 +109,86 @@
             // $('#my_table').datatable({checkable: true});
 
             $('a.lightbox-toggle').lightbox();//图片轮播
-            function formatTableData(data,cols,p_cur){
+            function formatTableData(data, cols, p_cur) {
                 var rows = [];
-                for(var i=0;i<data.length;i++){
-                    data[i].num=(p_cur-1)*10+i+1;
-                    rows.push(genRow(data[i],cols));
+                for (var i = 0; i < data.length; i++) {
+                    data[i].num = (p_cur - 1) * 10 + i + 1;
+                    rows.push(genRow(data[i], cols));
                 }
                 return rows;
             }
 
-            function genRow(obj,cols){
-                var row = {checked: false, data:null};
-                var dArr=[];
-                for(var i=0;i<cols.length;i++){
-                    if(cols[i].func!=null){
+            function genRow(obj, cols) {
+                var row = { checked: false, data: null };
+                var dArr = [];
+                for (var i = 0; i < cols.length; i++) {
+                    if (cols[i].func != null) {
                         dArr.push(cols[i].func(obj[cols[i].field]));
-                    }else if(cols[i].type=="imagedd"){
+                    } else if (cols[i].type == "imagedd") {
                         var pics = obj[cols[i].field];
-                        var picStr='';
-                        if(pics){
+                        var picStr = '';
+                        if (pics) {
                             var picArr = pics.split(',');
-                            for(var j in picArr){
-                                var pic =  '<a class="lightbox-toggle" href="'+picArr[j]+'" style="width:60px;height:50px;">'
-                                    +      '<img class="pic-class  img-thumbnail" style="width:60px;height:50px;" src="'+picArr[j]+'" alt="">'
-                                    +  '</a>';
-                                picStr+=pic;
+                            for (var j in picArr) {
+                                 
+
+                                var ispic = true;
+                                
+                                var src = picArr[j];
+                                if (!src.startWith("http"))
+                                    src = base_image_server_url + src;
+
+                                var videosrc = src;
+                                if (src.indexOf('.avi') != -1) {
+                                    src = src.split('.avi')[0] + "_screen_0.png"
+                                    ispic = false;
+                                }
+                                if (src.indexOf('.mov') != -1) {
+                                    src = src.split('.mov')[0] + "_screen_0.png"
+                                    ispic = false;
+                                }
+                                if (src.indexOf('.mp4') != -1) {
+                                    src = src.split('.mp4')[0] + "_screen_0.png"
+                                    ispic = false;
+                                }
+                                var pic =  (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="width:60px;height:50px;">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="width:60px;height:50px;">') 
+                                    + '<img class="pic-class  img-thumbnail" style="width:60px;height:50px;" src="' + src + '" alt="">'+ (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 10px;left: 15px;color: white;"></i>') 
+                                    + '</a>';
+                                picStr += pic;
                             }
                         }
                         dArr.push(picStr);
-                    }else if(cols[i].oper!=null) {
+                    } else if (cols[i].oper != null) {
                         var oper = cols[i].oper;
-                        var operStr="";
-                        for(var j=0;j<oper.length;j++){
-                            operStr+='<a href="javascript:void(0)" onclick="'+oper[j].func+'('+obj[cols[i].field]+','+obj[cols[i].field_other]+')"><i class="icon '+oper[j].icon_class+'"></i>&nbsp;'+oper[j].text+' </a>&nbsp;';
+                        var operStr = "";
+                        for (var j = 0; j < oper.length; j++) {
+                            operStr += '<a href="javascript:void(0)" onclick="' + oper[j].func + '(' + obj[cols[i].field] + ',' + obj[cols[i].field_other] + ')"><i class="icon ' + oper[j].icon_class + '"></i>&nbsp;' + oper[j].text + ' </a>&nbsp;';
                         }
                         dArr.push(operStr);
-                    }else{
-                        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 (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]){
-                            if(cols[i].custom){
+
+                        } else if (obj[cols[i].field]) {
+                            if (cols[i].custom) {
                                 dArr.push(obj[cols[i].field] + cols[i].custom);
-                            }else{
+                            } else {
                                 dArr.push(obj[cols[i].field]);
                             }
-                        }else{ 
+                        } else {
                             dArr.push('');
                         }
                     }
-                    
+
                 }
-                row.data=dArr;
+                row.data = dArr;
                 return row;
             }
-            function clearTable(cols,options,element){
+            function clearTable(cols, options, element) {
                 var checkable = options.checkable;
                 var sortable = options.sortable
                  $(element).find('.my_table').datatable( {
@@ -175,60 +196,60 @@
                     sortable:sortable,
                     data: {
                         cols: cols,
-                        rows:[]
+                        rows: []
                     },
-                    checksChanged:function(event) {
+                    checksChanged: function (event) {
                         var checkArr = event.checks.checks;
-                        var checkedIds=[];
-                        for(var i=0;i<checkArr.length;i++) {
-                            element.tt_data[i].checked=true;
+                        var checkedIds = [];
+                        for (var i = 0; i < checkArr.length; i++) {
+                            element.tt_data[i].checked = true;
                             checkedIds.push(element.tt_data[i].id);
                         }
                         element.tt_checkedIds = checkedIds;
-                        $(element).data("select_cache",checkedIds);
+                        $(element).data("select_cache", checkedIds);
                         console.log(element.tt_checkedIds);
                     }
                 });
             }
         },
-        setPager:function(data) {
+        setPager: function (data) {
             var pager = this.options.pager;
             var p_cur = pager.p_cur;
             var p_pages = pager.p_pages;
             var p_totalRecords = pager.p_totalRecords;
-            var obj=this;
+            var obj = this;
             kkpager.generPageHtml({
-                pno : p_cur,
-                total : p_pages,
-                totalRecords : p_totalRecords,
-                isShowTotalRecords:true,
-                mode : 'click',
-                click : function(n){
+                pno: p_cur,
+                total: p_pages,
+                totalRecords: p_totalRecords,
+                isShowTotalRecords: true,
+                mode: 'click',
+                click: function (n) {
                     obj.options.pager.p_cur = n;
                     this.selectPage(n);
                     obj.getRemoteData1(n);//调用获取数据方法
                     return false;
                 }
-            },true);
+            }, true);
         }
     };
 
-    $.fn.mytable = function(options) {
+    $.fn.mytable = function (options) {
         if (typeof options == 'string') {
             switch (options) {
-                case 'getTableData': 
+                case 'getTableData':
                     return this[0].tt_data;
-                case 'getTableCheckedIds': 
+                case 'getTableCheckedIds':
                     // return this[0].tt_checkedIds;
                     return $(this).data("select_cache");
-                case 'empty': 
-                    return new mytable(this,options,true);
+                case 'empty':
+                    return new mytable(this, options, true);
             }
-         }   else{
-        return this.each(function() {
-            // var $this = $(this);
-                new mytable(this,options);
-            //  $(this).attr('tableData',mytable.tableData);
+        } else {
+            return this.each(function () {
+                // var $this = $(this);
+                new mytable(this, options);
+                //  $(this).attr('tableData',mytable.tableData);
             });
         }
     };

+ 4 - 1
VisualInspection/js/mytask/apply_task.js

@@ -102,7 +102,10 @@ function queryUnexaminedTask(){
 //进入稽查页面
 function showCheck(id){
     $.checkTask =getItemByIdFromArr(id,$('#unexamined_datatable').mytable('getTableData'));
-    $.checkTask.appeal = null;
+    if(typeof($.checkTask)!="undefined" && typeof($.checkTask.appeal) != "undefined"){
+        $.checkTask.appeal = null;
+    }
+  
     //开始稽查
     no_return_common_service('/task/update', {"id":$.checkTask.id,"check_status":21,"record_status":1,"check_status_name":"复查"});
     changePage("/view/mytask/check.html");

+ 2 - 1
VisualInspection/js/mytask/check.js

@@ -494,7 +494,7 @@ function genPicstr(imgSrc) {
     if (ISCLIENT) {
         pic = '<div class="img_item" style="width:100px;height:90px;float:left;">' +
             '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
-            '<a class="card" onclick="' + (ispic ? 'showClientImg(\'' + src + '\')' : '') + '" href="javascript:void(0)" style="position:absolute">' +
+            '<a class="card" onclick="' + (ispic ? 'showClientImg(\'' + src + '\')' : 'showClientVideo(\'' + videosrc + '\')') + '" href="javascript:void(0)" style="position:absolute">' +
             '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 20px;left: 40px;color: white;"></i>') +
             '</a>' +
             '</div>';
@@ -502,6 +502,7 @@ function genPicstr(imgSrc) {
     return pic;
 }
 
+
 function removeImg(this1) {
     $(this1).parent('.img_item').remove();
 }

+ 5 - 1
VisualInspection/js/mytask/task_list.js

@@ -199,7 +199,11 @@ function refuseApply(taskId){
 function showTaskDetail(id){
     var rowData=getItemByIdFromArr(id,$('.datatable').mytable('getTableData'));
     $.checkTask = rowData;
-    $.checkTask.appeal = null;
+    if(typeof($.checkTask)!="undefined" && typeof($.checkTask.appeal) != "undefined"){
+        $.checkTask.appeal = null;
+    }
+    
+    
     changePage("/view/mytask/taskDetail.html");
 }
 //下发所有任务

+ 83 - 0
VisualInspection/js/statistics/appeal.js

@@ -0,0 +1,83 @@
+
+$(function(){
+
+    // 当前月份初始化
+    $("#sel_month").val(getM()-1);
+
+    $("#month_name").html( $("#sel_month").find("option:selected").text());
+
+    // 导管中心选择
+    $("#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()  )
+        getFsWorkInfo();
+    })
+    // 导出excel
+    $("#exportExcel").click(function(){
+        var param = '';
+        if( GV("#fs_station") != '' &&  GV("#fs_station")!=null ){
+            param = "&deptId="+ GV("#fs_station");
+        }else if(GV("#center_manage")!='' ){
+            param = "&centerId=" + GV("#center_manage");
+        }
+        window.location.href = getserveraddr() +"/file/appeal/info?month="+GV("#sel_month")+param;
+    })
+
+    // 初始化查询
+     getFsWorkInfo();
+
+    // end
+})
+
+/**
+ * 检索出勤明细数据
+ * @param {*} param 
+ */
+function getFsWorkInfo(){
+
+    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_station")!=''){
+        param[ 'dept_id' ] = GV("#fs_station");
+    }else if(GV("#center_manage") != ''){
+            param[ 'parent_dept_id' ] = GV("#center_manage");
+    }
+
+    post_common_service("statistics/check/appeal",param,function(data){
+   
+        $(".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){
+    });
+}
+
+/**
+ * 拼接表格内容
+ * @param {*} obj 
+ * @param {*} seq 
+ */
+function getTableContent(obj,seq){
+ 
+    var content = "<tr><td>"+seq+"</td> <td >"+obj.fee_station_name+"</td> <td >"+GDV(obj.appeal_num,0)+
+            "</td> <td >"+GDV(obj.appeal_success_num,0)+"</td><td>"+ GDV(obj.appeal_fail_num,0) +"</td><td>"+ GDV(obj.appeal_other_num,0) +"</td> </tr>";
+
+    return content;
+}

+ 11 - 10
VisualInspection/js/statistics/assess_ranking.js

@@ -62,17 +62,18 @@ function getEmployeeInfosClick(url,param,start_score,end_score){
         for(var i=0;i<data.length;i++){
             var score = 1000-filterByZeroHandle(average(data[i]).toFixed(2),'0');
             var flag=judgeParamFilter(data, i,score, start_score,end_score)
-            console.log("职位是是:"+flag)
             if(flag){
-                strTbody+="<tr><td width='67px;'>"+(count+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
-                +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+data[i].user.position_name+"</td>"
-                +"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
-                +"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
-                +"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
-                +"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
-                +getItemScore(data[i], '安全管理')+"</td><td width='58px;'>"+data[i].check_all_score+"</td>"
-                +"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
-                +"<td width='55px;'>"+score+"</td><td width='58px;'>"+"</td><td width='58px;'>"+"</td></tr>";
+                strTbody+="<tr><td width='4%;'>"+(count+1)+"</td><td width='6%;'>"+data[i].user.fee_station_name+"</td>"
+                +"<td width='6%;'>"+data[i].user.truename+"</td><td width='6%;'>"+data[i].user.position_name+"</td>"
+                +"<td width='6%;'>"+data[i].user.workno+"</td><td width='4%;'>"+data[i].company_ranking+"</td>"
+                +"<td width='4%;'>"+data[i].center_ranking+"</td><td width='4%;'>"+data[i].fee_station_ranking
+                +"</td><td width='4%;'>"+ getItemScore(data[i], '环境') +"</td>"
+                +"<td width='4%;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='4%;'>"+getItemScore(data[i], '表情')+"</td>"
+                +"<td width='4%;'>"+getItemScore(data[i], '动作')+"</td><td width='4%;'>"+getItemScore(data[i], '文明用语')+"</td>"
+                +"<td width='4%;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='4%'>"+getItemScore(data[i], '便民服务')+"</td><td width='4%;'>"
+                +getItemScore(data[i], '安全管理')+"</td><td width='4%;'>"+data[i].check_all_score+"</td>"
+                +"<td width='4%;'>"+filter(data[i].checked_num,'0')+"</td><td width='4%;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
+                +"<td width='4%;'>"+score+"</td><td width='4%;'>"+"</td><td width='4%;'>"+"</td></tr>";
                 count++;
             }
         }

+ 148 - 0
VisualInspection/js/statistics/change_attendance.js

@@ -0,0 +1,148 @@
+
+$(function(){
+
+    // 初始化部门下的收费站
+     getFsStationList(GV("#center_manage"),function(obj){
+        $("#fs_station").html(obj);
+        // 初始化收费站下的人数
+        getFsEmployee(GV("#fs_station"),function(obj){
+            $("#fs_employee").html(obj);
+            // 检索
+            getFsWorkInfo();
+        });
+    });
+
+    // 当前月份初始化
+    $("#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()  )
+        getFsWorkInfo();
+    })
+    // end
+})
+
+/**
+ * 检索出勤明细数据
+ * @param {*} param 
+ */
+function getFsWorkInfo(){
+
+    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/unregular/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){
+    });
+}
+
+/**
+ * 拼接表格内容
+ * @param {*} obj 
+ * @param {*} seq 
+ */
+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'>"+ obj.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();
+}

+ 102 - 0
VisualInspection/js/statistics/change_work.js

@@ -0,0 +1,102 @@
+
+$(function(){
+
+    // 初始化部门下的收费站
+     getFsStationList(GV("#center_manage"),function(obj){
+        $("#fs_station").html(obj);
+        // 初始化收费站下的人数
+        getFsEmployee(GV("#fs_station"),function(obj){
+            $("#fs_employee").html(obj);
+            // 检索
+            getFsWorkInfo();
+        });
+    });
+
+    // 当前月份初始化
+    $("#sel_month").val(getM()-1);
+
+    $("#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()  )
+        getFsWorkInfo();
+    })
+    // end
+})
+
+/**
+ * 检索出勤明细数据
+ * @param {*} param 
+ */
+function getFsWorkInfo(){
+
+    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/unregular/work/person",param,function(data){
+   
+        $(".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){
+    });
+}
+
+/**
+ * 拼接表格内容
+ * @param {*} obj 
+ * @param {*} seq 
+ */
+function getTableContent(obj,seq){
+    
+    var map_class = {};
+    var workdays = 0;
+    for(var z=0; z < obj.subStatisticsFsWork.length ;z++){
+        map_class[obj.subStatisticsFsWork[z].class_type] = obj.subStatisticsFsWork[z].work_days ;
+        workdays += GDV(obj.subStatisticsFsWork[z].work_days,0);
+    }
+
+    var content = "<tr><td>"+seq+"</td> <td >"+obj.feeStationName+"</td> <td >"+obj.userName+
+            "</td> <td >"+obj.positionName+"</td><td>"+ GDV(map_class[3],0) +"</td><td>"+ GDV(map_class[1],0) +"</td><td>"+ GDV(map_class[2],0) +"</td><td>"+workdays+"</td><td>"+"</td> </tr>";
+
+    return content;
+}

+ 108 - 23
VisualInspection/js/statistics/check_workload_statistics.js

@@ -11,11 +11,38 @@ $(function(){
 
     //*************************************数据表格******************************************
 	function initAppealPage(start_date,end_date,user_id) {
+		
 		initQueryParams();
 		queryAppeal(start_date,end_date,user_id);
     }
 
 	function initQueryParams() {
+		 // 仅选择日期
+        $(".div-start input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $(".div-end input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
 		//获取页面参数
 		var page_params = $.zui.store.get("page_params");
 		if(page_params && page_params.status) {
@@ -24,11 +51,13 @@ $(function(){
 	}
 
 	function queryAppeal(start_date,end_date,user_id){
+		
 		var data = {
-			"start_date":start_date,
+			    "start_date":start_date,
 				"end_date":end_date,
 				"user_id":user_id,
-				"queryType":1
+				"queryType":1,
+				"check_status": cur_status,
 		}
 		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
 			hide = true;
@@ -36,37 +65,25 @@ $(function(){
 		
 		var cols = [
 					{width: 40,height:60, text: '序号', flex: true, colClass: 'text-center',field:'num'},
-                    {width: 40,height:60, text: '稽查人员', flex: true,colClass: '',field:'checkman_name' },
-                    {width: 100,height:60, text: '任务名称', flex: true,colClass: '',field:'start_date' },
-					{width: 100,height:60, text: '时间段', flex: true,colClass: '',field:'start_date' },
-                    {width: 40,height:60, text: '考核人员', flex: true,colClass: '',field:'checked_name' },
-                    {width: 40,height:60, text: '考核部门', flex: true,colClass: '',field:'feeStationName' },
-					{width: 40,height:60, text: '扣分数',  flex: true, colClass: '',field:'score'},
-					{width: 100,height:60, text: '考核项',  flex: true, colClass: '',sort: 'down',field:'name'},
-					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true, hide:hide,field:'pics'},
+                    {width: 40,height:60, text: '稽查人员', flex: true,colClass: 'text-center',field:'checkman_name' },
+                    {width: 100,height:60, text: '任务名称', flex: true,colClass: 'text-center',field:'check_task_name' },
+					{width: 100,height:60, text: '时间段', flex: true,colClass: 'text-center',field:'check_task_time_name' },
+                    {width: 40,height:60, text: '考核人员', flex: true,colClass: 'text-center',field:'checked_name' },
+                    {width: 60,height:60, text: '考核部门', flex: true,colClass: 'text-center',field:'feeStationName' },
+					{width: 40,height:60, text: '扣分数',  flex: true, colClass: 'text-center',field:'score'},
+					{width: 100,height:60, text: '考核项',  flex: true, colClass: 'text-center',field:'name'},
+					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true,field:'pics'},
 		];
 		if(cur_status==12 || cur_status==13){
 			data.check_status_arr = [12,13];
 		}
+		
 		$('.datatable').mytable({'cols':cols,
 								'url':"/statistics/one/checkedItem/detail/info",
 								'param':data}
 								);
 	}
 
-	function queryUnAssignedTable(){
-		var cols = [
-					{width: 40,height:60, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
-					{width: 40,height:60, text: '稽查人员', type: 'string', flex: true, sort: 'down',field: 'checkman_name'},
-                    {width: 100,height:60, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
-                    {width: 100,height:60, text: '时间段', type: 'string', flex: true, sort: 'down',field: 'name'},
-                    {width: 40,height:60, text: '考核人员', type: 'string', flex: true, sort: 'down',field: 'checked_name'},
-                    {width: 40,height:60, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'feeStationName'},
-					{width: 40,height:60, text: '扣分数', type: 'string', flex: true, field: 'checked_person_name'},
-					{width: 100,height:60, text: '考核项', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
-					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true, field: 'checkman_name'},
-		] ;
-	}
 
 
     $(".query button").click(function(){
@@ -83,6 +100,7 @@ $(function(){
 		var user_id = $("#select-personal").val(); 
         // 表格
         initAppealPage(start_date,end_date,user_id);
+		checkman_info(start_date,end_date,user_id);
 	});
     
     /**
@@ -103,11 +121,78 @@ $(function(){
                 var user_id = $("#select-personal").val(); 
                 // 初始化表格
                 initAppealPage(start_date,end_date,user_id);
+				checkman_info(start_date,end_date,user_id);
         },function(error){
         	return "" ;
     	});
     }
     select_personal();
+	
+	/**
+	 * 稽查人员信息
+	 * @param {*} start_date 
+	 * @param {*} end_date 
+	 * @param {*} user_id 
+	 */
+	function checkman_info(start_date,end_date,user_id){
+		var param = {
+					"start_date": start_date,
+					"end_date": end_date,
+					"checkman_id":user_id
+					}
+		post_common_service("statistics/checkman/info",param,function(data){
+			if(data!=''){
+				if(data.all_checkman!='' && data.all_checkman!=undefined){
+				 	$(".all_check_personal").text(data.all_checkman);
+				}else{
+					$(".all_check_personal").text(0);
+				}
+				if(data.all_task_num!='' && data.all_task_num!=undefined){
+				 	$(".all_check_task").text(data.all_task_num);
+				}else{
+					$(".all_check_task").text(0);
+				}
+				if(data.all_check_minute!='' && data.all_check_minute!=undefined){
+				    $(".all_check_minute").text(Math.floor(data.all_check_minute/60) + "小时" + (data.all_check_minute%60) + "分");
+				}else{
+					$(".all_check_minute").text(0);
+				}
+				if(data.all_checked_num!='' && data.all_checked_num!=undefined){
+				    $(".all_checkman").text(data.all_checked_num);
+				}else{
+					$(".all_checkman").text(0);
+				}
+				if(data.all_checked_score!='' && data.all_checked_score!=undefined){
+				    $(".all_check_score").text(data.all_checked_score);
+				}else{
+					$(".all_check_score").text(0);
+				}
+				if(data.all_checked_score!='' && data.all_checked_score!=undefined && data.all_checked_num!='' && data.all_checked_num!=undefined){
+				    $(".check_score_avg").text(filter(data.all_checked_score,data.all_checked_num,0));
+				}else{
+					$(".check_score_avg").text(0);
+				}
+            }else{
+				$(".all_check_personal").text(0);
+				$(".all_check_task").text(0);
+				$(".all_check_minute").text(0);
+				$(".all_checkman").text(0);
+				$(".all_check_score").text(0);
+				$(".check_score_avg").text(0);
+            }
+        },function(error){
+        	return "" ;
+    	});
+    }
+
+	function filter(num,num1,num2){
+		if(num1 == 0){
+			return num2;
+		}else{
+			return (num/num1).toFixed(2);
+		}
+	}
+	
 
 
 });

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

@@ -0,0 +1,148 @@
+
+$(function(){
+
+    // 初始化部门下的收费站
+     getFsStationList(GV("#center_manage"),function(obj){
+        $("#fs_station").html(obj);
+        // 初始化收费站下的人数
+        getFsEmployee(GV("#fs_station"),function(obj){
+            $("#fs_employee").html(obj);
+            // 检索
+            getFsWorkInfo();
+        });
+    });
+
+    // 当前月份初始化
+    $("#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()  )
+        getFsWorkInfo();
+    })
+    // end
+})
+
+/**
+ * 检索出勤明细数据
+ * @param {*} param 
+ */
+function getFsWorkInfo(){
+
+    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){
+    });
+}
+
+/**
+ * 拼接表格内容
+ * @param {*} obj 
+ * @param {*} seq 
+ */
+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'>"+ obj.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();
+}

+ 137 - 0
VisualInspection/js/statistics/common_statistic.js

@@ -0,0 +1,137 @@
+/**
+ * 过滤掉undefined值,等于默认值,默认 ''
+ * @param {*} value 
+ * @param {*} default_value 
+ */
+function GDV(value,default_value){
+    if(value != undefined){
+        return value ;
+    }else{
+        if(default_value == undefined){
+            return '';
+        }else{
+            return default_value ;
+        }
+    }
+}
+
+/**
+ * xxx分钟 转化 xx时xx分
+ */
+function convertT(minute){
+    return parseInt(minute/60) +"时"+minute%60+"分";
+}
+
+/**
+ * 获取当前月份值
+ * param: datet Date ,
+ * return: month int 
+ */
+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 ;
+}

+ 102 - 0
VisualInspection/js/statistics/common_work.js

@@ -0,0 +1,102 @@
+
+$(function(){
+
+    // 初始化部门下的收费站
+     getFsStationList(GV("#center_manage"),function(obj){
+        $("#fs_station").html(obj);
+        // 初始化收费站下的人数
+        getFsEmployee(GV("#fs_station"),function(obj){
+            $("#fs_employee").html(obj);
+            // 检索
+            getFsWorkInfo();
+        });
+    });
+
+    // 当前月份初始化
+    $("#sel_month").val(getM()-1);
+
+    $("#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()  )
+        getFsWorkInfo();
+    })
+    // end
+})
+
+/**
+ * 检索出勤明细数据
+ * @param {*} param 
+ */
+function getFsWorkInfo(){
+
+    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/person",param,function(data){
+   
+        $(".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){
+    });
+}
+
+/**
+ * 拼接表格内容
+ * @param {*} obj 
+ * @param {*} seq 
+ */
+function getTableContent(obj,seq){
+    
+    var map_class = {};
+    var workdays = 0;
+    for(var z=0; z < obj.subStatisticsFsWork.length ;z++){
+        map_class[obj.subStatisticsFsWork[z].class_type] = obj.subStatisticsFsWork[z].work_days ;
+        workdays += GDV(obj.subStatisticsFsWork[z].work_days,0);
+    }
+
+    var content = "<tr><td>"+seq+"</td> <td >"+obj.feeStationName+"</td> <td >"+obj.userName+
+            "</td> <td >"+obj.positionName+"</td><td>"+ GDV(map_class[3],0) +"</td><td>"+ GDV(map_class[1],0) +"</td><td>"+ GDV(map_class[2],0) +"</td><td>"+workdays+"</td><td>"+"</td> </tr>";
+
+    return content;
+}

+ 90 - 33
VisualInspection/js/statistics/personal_data_statistics.js

@@ -22,9 +22,9 @@ var end_date = $(".div-end input").val()+" 23:59:59";
 $(function(){
 
 //*************************************数据表格******************************************
-	function initAppealPage(start_date,end_date) {
+	function initAppealPage(start_date,end_date,user_id) {
 		initQueryParams();
-		queryAppeal(start_date,end_date);
+		queryAppeal(start_date,end_date,user_id);
     }
 
 	function initQueryParams() {
@@ -35,7 +35,7 @@ $(function(){
 		}
 	}
 
-	function queryAppeal(start_date,end_date){
+	function queryAppeal(start_date,end_date,user_id){
 		var data = {
 			"start_date":start_date,
 				"end_date":end_date,
@@ -48,9 +48,9 @@ $(function(){
 		
 		var cols = [
 					{width: 50, text: '序号', flex: true, colClass: 'text-center',field:'num'},
-					{width: 100, text: '时间段', flex: true,colClass: '',field:'start_date' },
-					{width: 60, text: '扣分数',  flex: true, colClass: '',field:'score'},
-					{width: 100, text: '考核项',  flex: true, colClass: '',sort: 'down',field:'name'},
+					{width: 100, text: '时间段', flex: true,colClass: 'text-center',field:'check_task_time_name' },
+					{width: 60, text: '扣分数',  flex: true, colClass: 'text-center',field:'score'},
+					{width: 100, text: '考核项',  flex: true, colClass: 'text-center',sort: 'down',field:'name'},
 					{width: 100, text: '扣分凭证', type: 'imagedd', flex: true, hide:hide,field:'pics'},
 		];
 		if(cur_status==12 || cur_status==13){
@@ -62,18 +62,9 @@ $(function(){
 								);
 	}
 
-	function queryUnAssignedTable(){
-			var cols = [
-					{width: 50, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
-					{width: 100, text: '时间段', type: 'string', flex: true, sort: 'down',field: 'start_date'},
-					{width: 60, text: '扣分数', type: 'string', flex: true, field: 'score'},
-					{width: 100, text: '考核项', type: 'string', flex: true, sort: 'down',field: 'name'},
-					{width: 100, text: '扣分凭证', type: 'imagedd', flex: true, field: 'pics'},
-						] ;
-	}
 
-    // 表格
-	initAppealPage(start_date,end_date);
+
+    
 
 //*************************************画图******************************************
 
@@ -81,6 +72,7 @@ $(function(){
 	echart();
 
 	$(".query button").click(function(){
+        var user_id = $("#select-personal").val();
 		var start_date = $(".div-start input").val()+" 00:00:00";
 		var end_date = $(".div-end input").val()+" 23:59:59";
 		var startStr = start_date.replace(/-/g, '/');
@@ -91,14 +83,18 @@ $(function(){
 			tip("开始时间不能比结束时间大");
 			return;
 		}
+		if($("#select-personal").text()==''){
+             tip("请选择收费站");
+			 return;
+		}
 		// 查询图一
 		init_personal_score_statistics("statistics/one/person/year/info",user_id);
 		// 查询图二
 		init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+		// 表格
+	    initAppealPage(start_date,end_date,user_id);
 		// 加载图配置
 		echart();
-		// 表格
-	    initAppealPage(start_date,end_date);
 	});
     /**
 	 * 初始化图一
@@ -109,11 +105,11 @@ $(function(){
 		var param = {
 			"start_date":year+"-01-01 00:00:00",
 			"end_date":(year+1)+"-01-01 00:00:00",
-			"dept_id":user_id
+			"user_id":user_id
 		}
 		initRqueset(url,param,1);
 	}
-	init_personal_score_statistics("statistics/one/person/year/info",user_id);
+	
 
     /**
 	 * 初始化图二
@@ -124,11 +120,11 @@ $(function(){
 		var param = {
 			"start_date":start_date,
 			"end_date":end_date,
-			"dept_id":user_id,
+			"user_id":user_id,
 		}
 		initRqueset(url,param,2);
 	}
-	init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+	
     
 	/**
 	 * 请求
@@ -170,7 +166,7 @@ $(function(){
 					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
 						// 指定位置插入值
 						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+						(1000-(filter(data[i].all_check_score,data[i].checked_num,0))));
 					}
 				}
 		    }else{
@@ -189,6 +185,54 @@ $(function(){
 		}
 	}
 
+	$("#select-personal").click(function(){
+		if($("#select-personal").text()==''){
+             tip("请选择收费站");
+			 return;
+		}
+	});
+	// 收费站下拉框
+	setFeSelect("#select-dept");
+	/**
+	 * 部门人员下拉框
+	 */
+	function setSecond(){ 
+        var select_road = $("#select-dept").val();
+		var sec = document.getElementById('select-personal');
+		var tempStr = ''
+		var param = {
+			 "organid":select_road
+		}
+		post_common_service("user/getFsUserList",param,function(data){
+			if(data.length!=0){
+				for(var i=0;i<data.length;i++){
+					for(var j=33;j<=53;j++){
+						if(select_road==j){
+							tempStr += "<option value="+data[i].id+">"+data[i].truename+"</option>";  
+						}
+					}
+				sec.innerHTML=tempStr;
+				}
+			}else{
+				sec.innerHTML='';	
+			}
+            var start_date = $(".div-start input").val()+" 00:00:00";
+            var end_date = $(".div-end input").val()+" 23:59:59";
+            var user_id = $("#select-personal").val();
+			// 页面初始化
+            initAppealPage(start_date,end_date,user_id);
+            init_personal_score_statistics("statistics/one/person/year/info",user_id);
+            init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+		},function(error){
+        	return "" ;
+    	});
+    }
+	$("#select-dept").change(function(){
+		setSecond();
+	});
+
+	
+
 	 /**
 	 * 除数为0处理
 	 * @param {*} num 
@@ -196,11 +240,11 @@ $(function(){
 	 * @param {*} num2 
 	 * @param {*} num4 
 	 */
-	function filter_handler(num,num1,num2,num4){
-		if(num1 == 0 || num2 == 0){
-			return num4;
+	function filter(num,num1,num2){
+		if(num1 == 0){
+			return num2;
 		}else{
-			return (num/num1)/num2;
+			return (num/num1).toFixed(2);
 		}
 	}
 
@@ -215,13 +259,14 @@ $(function(){
 	    require(
 		[
 			'echarts',
+			'echarts/theme/macarons', 
 			'echarts/chart/line', 
 			'echarts/chart/pie'
 		],
-			function (ec) {
+			function (ec,theme) {
 					// 基于准备好的dom,初始化echarts图表
-					score_statistics = ec.init(document.getElementById('personal-score-statistics')); 
-					check_type = ec.init(document.getElementById('personal-check-type'));	
+					score_statistics = ec.init(document.getElementById('personal-score-statistics'),theme); 
+					check_type = ec.init(document.getElementById('personal-check-type'),theme);	
 			}
        ); 
 	}
@@ -235,6 +280,9 @@ $(function(){
 					tooltip : {
 						trigger: 'axis'
 					},
+					grid:{
+                    width:"80%"
+                    },
 					legend: {
 						data:['平均分']
 					},
@@ -290,7 +338,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "个人服务检查问题占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -317,7 +365,16 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:array_check_type
+						data:array_check_type,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};

+ 106 - 53
VisualInspection/js/statistics/road_manage_statistics.js

@@ -27,6 +27,11 @@
 		var people_points;
 		var rank_pre;
 		var rank_suf;
+		var min_year;
+		var min_station;
+		var min_pre
+		var min_suff;
+		var flag = true;
 $(function(){
     // 显示当前月份
 	$(".div-month select").val(month);
@@ -34,8 +39,7 @@ $(function(){
 	$(".div-button button").click(function(){	
 		var select_month = $(".div-month select").val();
 		var select_road = $(".div-roadManage select").val();
-		// 查询图一
-		init_company_year_assess("statistics/score/year/info",select_road);
+		flag = false;
 		// 查询图二
 		init_company_points_assess("statistics/lost/score/rate",select_month+'',select_road);
 		// 查询图三
@@ -154,7 +158,13 @@ $(function(){
 	 * 初始化图七
 	 */
     function init_each_people_points(url,mon,select_road){
-		var prev_mth = (mon-1)+'';		
+		var yearPre = year;
+		if(mon==1){
+			prev_mth = 12+'';
+			yearPre = yearPre-1;
+		}else{
+		var prev_mth = (mon-1)+'';	
+		}	
 		if(mon.length==1){
 			mon = "0" +mon;
 		}
@@ -163,7 +173,7 @@ $(function(){
 		}
 		var param = {
 			"mth":year + "/" + mon,
-			"prev_mth": year + "/" + prev_mth,
+			"prev_mth": yearPre + "/" + prev_mth,
 			"dept_id":select_road,
 			"queryType":1
 		};
@@ -214,24 +224,28 @@ $(function(){
 		if(type == 1){
 			array_year_score.length = 0;
 			months.length = 0;
-			if(data!=''){
-			if(data.length<12){
-				for(var i=0;i<12-data.length;i++){
-					// 不足月份补0
-					array_year_score.push(0);
-				}
-			}		
-			for(var i=0;i<data.length;i++){
-				if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-					// 指定位置插入值
-					array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-					(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+		    if(data!='' && data.length!=0){
+				if(data.length<12){
+					for(var i=0;i<12-data.length;i++){
+						// 不足月份补0
+						array_year_score.push(0);
+					}
+					}		
+				for(var i=0;i<data.length;i++){
+					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
+						// 指定位置插入值
+						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
+						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+					}
 				}
-			}
 			}else{
 					array_year_score.length = 0;
 					months.length = 0;
-			}	
+			}
+			if(eval("Math.min(" + array_year_score.toString() + ")")==0)
+			min_year = 0;
+			else
+			min_year = 	eval("Math.min(" + array_year_score.toString() + ")").toFixed(0)-10;	
 		}else if(type == 2){
 			array_points.length=0;
 				if(data!=''){
@@ -246,39 +260,51 @@ $(function(){
 		}else if(type == 3){
 			array_allStation_score.length=0;
 			array_allStation.length=0;
-            for(var i=0;i<data.length;i++){
-				if(data!=''){
+			if(data!='' && data.length!=0){
+				for(var i=0;i<data.length;i++){
 					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3));
-					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
-				}else{
-					array_allStation_score.length=0;
-			        array_allStation.length=0;	
+					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}
-	        }
+			}else{
+				array_allStation_score.length=0;
+				array_allStation.length=0;	
+			}
+			    if(eval("Math.min(" + array_allStation_score.toString() + ")")==0)
+				min_station = 0;
+				else
+				min_station = 	eval("Math.min(" + array_allStation_score.toString() + ")").toFixed(0)-10;
 		}else if(type == 4){
 			array_score_order.length=0;
 			array_score_data.length=0;
-				if(data!=''){
+				if(data!='' && data.length!=0){
 					for(var i=0;i<data.length;i++){
 						array_score_order.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(0,data[i].user.fee_station_name.length-3)+")");
-						array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+						array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)));
 				    }
 				 }else{
 					array_score_order.length=0;
 			        array_score_data.length=0;	
 				}
+				if(eval("Math.min(" + array_score_data.toString() + ")")==0)
+				min_pre = 0;
+				else
+				min_pre = eval("Math.min(" + array_score_data.toString() + ")").toFixed(0)-10;
 	    }else if(type == 5){
 			array_score_last.length=0;
 			array_get_score.length=0;
-				if(data!=''){
+				if(data!='' && data.length!=0){
 					for(var i=0;i<data.length;i++){
 						array_score_last.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(0,data[i].user.fee_station_name.length-3)+")");
-						array_get_score.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+						array_get_score.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)));
 				    }
 				 }else{
 					array_score_last.length=0;
 			        array_get_score.length=0;	
 				}
+				if(eval("Math.min(" + array_get_score.toString() + ")")==0)
+				min_suff = 0;
+				else
+				min_suff = eval("Math.min(" + array_get_score.toString() + ")").toFixed(0)-10;
 	    }else if(type == 6){
 			array_check_type.length=0;
                 if(data.length != 0){
@@ -292,7 +318,13 @@ $(function(){
 			array_points_name.length=0;
 			array_points_pre.length=0;
 			arrar_points_month.length=0;
-			data_each_people_points(data);
+			if(data!='' && data.Pmth.length!=0 || data.Tmth.length!=0){
+			   data_each_people_points(data);
+			}else{
+				array_points_name.length=0;
+				array_points_pre.length=0;
+				arrar_points_month.length=0;
+			}   
 		}
 	}
 
@@ -310,7 +342,7 @@ $(function(){
 				if(Tmth.length > 0){
 					for(var j= 0; j< Tmth.length;j++){
 						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
-							Ttemp[i] = Tmth[j].all_check_score;
+							Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
 							break;
 						}else{
 							Ttemp[i] = 0;
@@ -322,7 +354,7 @@ $(function(){
 				if(Pmth.length > 0){
 					for(var m= 0; m< Pmth.length;m++){
 						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
-							Ptemp[i] = Pmth[m].all_check_score;
+							Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
 							break;
 						}else{
 							Ptemp[i] = 0;
@@ -363,7 +395,7 @@ $(function(){
 		if(num1 == 0 || num2 == 0){
 			return num4;
 		}else{
-			return (num/num1)/num2;
+			return ((num/num1)/num2).toFixed(2);
 		}
 	}
 
@@ -371,7 +403,7 @@ $(function(){
 		if(num1 == 0){
 			return num2;
 		}else{
-			return (num/num1);
+			return (num/num1).toFixed(2);
 		}
 	}
     
@@ -386,18 +418,21 @@ $(function(){
 	    require(
 		[
 			'echarts',
+			'echarts/theme/macarons', 
 			'echarts/chart/line', 
 			'echarts/chart/bar',
 			'echarts/chart/pie'
 		],
-	function (ec) {
+	function (ec,theme) {
 			// 基于准备好的dom,初始化echarts图表
-			year_assess = ec.init(document.getElementById('roadManager-year-assess')); 
-			points_assess = ec.init(document.getElementById('roadManager-points-assess'));
+			if(flag){
+			year_assess = ec.init(document.getElementById('roadManager-year-assess'),theme); 
+		    }
+			points_assess = ec.init(document.getElementById('roadManager-points-assess'),theme);
 		    score_rank = ec.init(document.getElementById('tollStation-score-rank'));
 			rank_pre = ec.init(document.getElementById('people-rank-pre'));
             rank_suf = ec.init(document.getElementById('people-rank-suf'));
-			check_type = ec.init(document.getElementById('server-check-type'));
+			check_type = ec.init(document.getElementById('server-check-type'),theme);
 			people_points = ec.init(document.getElementById('each-people-points'));
 			}
 		); 
@@ -430,7 +465,7 @@ $(function(){
 					yAxis : [
 						{
 							type : 'value',
-							min : 700 ,
+							min : min_year ,
 						    max : 1000,
 							axisLabel : {
 								formatter: '{value}'
@@ -468,7 +503,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "道管中心考核扣分占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -495,7 +530,16 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:array_points
+						data:array_points,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};
@@ -513,7 +557,7 @@ $(function(){
 					trigger: 'axis'
 				},
 				grid:{
-                    width:420  // 图表宽度
+                    width:"80%",	
                 },
 				calculable : true,
 				xAxis : [
@@ -525,7 +569,7 @@ $(function(){
 				yAxis : [
 					{
 						type : 'value',
-						min : 900 ,
+						min : min_station ,
 						max : 1000
 					}
 				],
@@ -564,8 +608,7 @@ $(function(){
 					trigger: 'axis'
 				},
 				grid:{
-                    width:470,  // 图表宽度
-					x:40
+                    width:"80%",	
                 },
 				legend: {
 					data:['平均分']
@@ -583,7 +626,7 @@ $(function(){
 				yAxis : [
 					{
 						type : 'value',
-						min : 900 ,
+						min : min_pre ,
 						max : 1000
 					}
 				],
@@ -629,8 +672,7 @@ $(function(){
 					trigger: 'axis'
 				},
 				grid:{
-                    width:470,  // 图表宽度
-					x:40
+                    width:"80%",	
                 },
 				legend: {
 					data:['平均分']
@@ -648,7 +690,7 @@ $(function(){
 				yAxis : [
 					{
 						type : 'value',
-						min : 900 ,
+						min : min_suff ,
 						max : 1000
 					}
 				],
@@ -690,7 +732,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "温馨服务检查占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -715,9 +757,18 @@ $(function(){
 					{
 						name:'访问来源',
 						type:'pie',
-						radius : '65%',
+						radius : '55%',
 						center: ['50%', '50%'],
-						data:array_check_type
+						data:array_check_type,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};
@@ -733,7 +784,7 @@ $(function(){
 				trigger: 'axis'
 			},
 			grid:{
-                    width:420  // 图表宽度
+                    width:"80%"
                 },
 			legend: {
 				data:['上月','本月']
@@ -757,6 +808,7 @@ $(function(){
 					data: array_points_pre,
 					itemStyle: {
 						normal: {
+							color:'#b3d4fc',
 							label: {
 								show: true,
 								position: 'insideTop'
@@ -770,6 +822,7 @@ $(function(){
 					data: arrar_points_month,
 					itemStyle: {
 						normal: {
+							color:'#ea644a',
 							label: {
 								show: true,
 								position: 'insideTop'

+ 282 - 66
VisualInspection/js/statistics/toll_station_statistics.js

@@ -15,12 +15,21 @@
 		var array_score_data = new Array();
 		var array_five_name = new Array();
 		var array_five_score = new Array();
+		var array_five_name_back = new Array();
+		var array_five_score_back = new Array();
 		var year_assess;
 		var points_assess;
 		var check_type;
 		var people_points;
 		var score_rank;
 		var rank_assess;
+		var rank_assess_back;
+		var min_year;
+		var min_five;
+		var min_five_back;
+		var min_score;
+		var flag = true;
+		var change_echart = 1;
 $(function(){     
 	setSecond();
     // 显示当前月份
@@ -29,20 +38,21 @@ $(function(){
 	$(".div-button button").click(function(){	
 		var select_month = $(".div-month select").val();
 		var select_station = $(".div-station select").val();
-		// 查询图一
-		init_tollStation_year_assess("statistics/score/year/info",select_station);
+		flag = false;
+		// 加载图配置
+		echart();
 		// 查询图二
 		init_company_points_assess("statistics/lost/score/rate",select_month+'',select_station);
         // 查询图三
-		init_progress_rank_assess("statistics/fs/up/five",month+'',select_station)
+		init_progress_rank_assess("statistics/fs/up/five",select_month+'',select_station)
         // 查询图四
 		init_people_score_rank("statistics/stuff/score/info",select_month+'',select_station);
         // 查询图五
 		init_server_check_type("statistics/lost/itemscore/rate",select_month+"",select_station);
         // 查询图六
 		init_each_people_points("statistics/lost/twice/itemscore/rate",select_month+"",select_station);
-		// 加载图配置
-		echart();
+
+		init_backward_rank_assess("statistics/fs/up/five",select_month+'',select_station);
 	});
 
 	// 加载图配置
@@ -78,10 +88,16 @@ $(function(){
 	}
 
 	/**
-	 * 初始化图三
+	 * 初始化图三 前5名
 	 */
 	function init_progress_rank_assess(url,mon,select_station){
-		var prev_mth = (mon-1)+'';		
+		var yearPre = year;
+		if(mon==1){
+			prev_mth = 12+'';
+			yearPre = yearPre-1;
+		}else{
+		var prev_mth = (mon-1)+'';	
+		}	
 		if(mon.length==1){
 			mon = "0" +mon;
 		}
@@ -91,7 +107,7 @@ $(function(){
 		var param = {
 			"mth":year + "/" + mon,
 			"dept_id":select_station,
-			"prev_mth": year + "/" + prev_mth,
+			"prev_mth": yearPre + "/" + prev_mth,
 			"order_type":0
 		};
 		initRqueset(url,param,3);
@@ -133,7 +149,13 @@ $(function(){
 	 * 初始化图六
 	 */
     function init_each_people_points(url,mon,select_station){
-		var prev_mth = (mon-1)+'';		
+		var yearPre = year;
+		if(mon==1){
+			prev_mth = 12+'';
+			yearPre = yearPre-1;
+		}else{
+		var prev_mth = (mon-1)+'';	
+		}	
 		if(mon.length==1){
 			mon = "0" +mon;
 		}
@@ -142,12 +164,38 @@ $(function(){
 		}
 		var param = {
 			"mth":year + "/" + mon,
-			"prev_mth": year + "/" + prev_mth,
+			"prev_mth": yearPre + "/" + prev_mth,
 			"dept_id":select_station,
-			"queryType":1
+			"queryType":2
 		};
 		initRqueset(url,param,6);
 	}
+
+	/**
+	 * 图切换后5名
+	 */
+	function init_backward_rank_assess(url,mon,select_station){
+		var yearPre = year;
+		if(mon==1){
+			prev_mth = 12+'';
+			yearPre = yearPre-1;
+		}else{
+		var prev_mth = (mon-1)+'';	
+		}	
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"dept_id":select_station,
+			"prev_mth": yearPre + "/" + prev_mth,
+			"order_type":1
+		};
+		initRqueset(url,param,7);
+	} 
 	
 
 	/**
@@ -169,6 +217,7 @@ $(function(){
 				// 画图
 				rank_assess.setOption(progress_rank_assess());
 			}else if(type == 4){
+				console.log(array_score_order+"hello"+array_score_data);
 				// 画图
 				score_rank.setOption(people_score_rank());
 			}else if(type == 5){
@@ -177,6 +226,9 @@ $(function(){
 			}else if(type == 6){
 				// 画图
 				people_points.setOption(each_people_points());
+			}else if(type == 7){
+				// 画图
+				rank_assess_back.setOption(backward_rank_assess());
 			}
 		},function(error){
         	return "" ;
@@ -192,24 +244,28 @@ $(function(){
 		if(type == 1){
 			array_year_score.length = 0;
 			months.length = 0;
-			if(data!=''){
-			if(data.length<12){
-				for(var i=0;i<12-data.length;i++){
-					// 不足月份补0
-					array_year_score.push(0);
-				}
-			}		
+			if(data!='' && data.length!=0){
+				if(data.length<12){
+					for(var i=0;i<12-data.length;i++){
+						// 不足月份补0
+						array_year_score.push(0);
+					}
+				}		
 			for(var i=0;i<data.length;i++){
 				if(months.indexOf(parseInt(data[i].mth.substr(5)))){
 					// 指定位置插入值
 					array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-					(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+					(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}
 			}
 			}else{
 					array_year_score.length = 0;
 					months.length = 0;
-			}	
+			}
+			if(eval("Math.min(" + array_year_score.toString() + ")")==0)
+			min_year = 0;
+			else
+			min_year = 	eval("Math.min(" + array_year_score.toString() + ")").toFixed(0)-10;		
 		}else if(type == 2){
 			array_points.length=0;
 				if(data!=''){
@@ -223,27 +279,35 @@ $(function(){
 		}else if(type == 3){
 			array_five_name.length=0;
 			array_five_score.length=0;
-			if(data!=''){
+			if(data!='' && data.length!=0){
 				for(var i=0;i<data.length;i++){
 					array_five_name.push(data[i].user.truename);
 					array_five_score.push(data[i].ranking_change);
 				}
-				}else{
+			}else{
 					array_five_name.length=0;
 			        array_five_score.length=0;
-			    }
+			}
+			if(eval("Math.min(" + array_five_score.toString() + ")")==0)
+			min_five = 0;
+			else
+			min_five = 	eval("Math.min(" + array_five_score.toString() + ")").toFixed(0)-1;	
 		}else if(type == 4){
-		array_score_order.length=0;
-		array_score_data.length=0;
-			if(data!=''){
+			array_score_order.length=0;
+			array_score_data.length=0;
+			if(data!='' && data.length!=0){
 				for(var i=0;i<data.length;i++){
-					array_score_order.push(data[i].user.truename);
-					array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+					array_score_order.push(data[i].user.truename +"\n"+ (i+1));
+					array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)));
 				}
-				}else{
+			}else{
 					array_score_order.length=0;
 					array_score_data.length=0;	
-			    }
+			}
+			if(eval("Math.min(" + array_score_data.toString() + ")")==0)
+			min_score = 0;
+			else
+			min_score = eval("Math.min(" + array_score_data.toString() + ")").toFixed(0)-10;
 		}else if(type == 5){
 		array_check_type.length=0;
 				if(data.length != 0){
@@ -254,10 +318,38 @@ $(function(){
 					array_check_type.length=0;	
 				}
 		}else if(type == 6){
-		array_points_name.length=0;
-		array_points_pre.length=0;
-		arrar_points_month.length=0;
-		data_each_people_points(data);
+			array_points_name.length=0;
+			array_points_pre.length=0;
+			arrar_points_month.length=0;
+		if(data!='' && data.Pmth.length!=0 || data.Tmth.length!=0){
+			data_each_people_points(data);
+		}else{
+			array_points_name.length=0;
+			array_points_pre.length=0;
+			arrar_points_month.length=0;
+		}
+		}else if(type == 7){
+			array_five_name_back.length=0;
+			array_five_score_back.length=0;
+			if(data!=''){
+				for(var i=0;i<data.length;i++){
+					array_five_name_back.push(data[i].user.truename);
+					if(data[i].ranking_change<0){
+					array_five_score_back.push((data[i].ranking_change+'').substr(1));
+				}else{
+					array_five_score_back.push((data[i].ranking_change+''));
+					}
+				}
+				
+			}else{
+					array_five_name_back.length=0;
+			        array_five_score_back.length=0;
+			}
+			if(eval("Math.min(" + array_five_score_back.toString() + ")")==0){
+				min_five_back = 0;		
+			}else{
+				min_five_back = eval("Math.min(" + array_five_score_back.toString() + ")").toFixed(0)-1;
+			}
 		}
 	}
   
@@ -275,7 +367,7 @@ $(function(){
 				if(Tmth.length > 0){
 					for(var j= 0; j< Tmth.length;j++){
 						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
-							Ttemp[i] = Tmth[j].all_check_score;
+							Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
 							break;
 						}else{
 							Ttemp[i] = 0;
@@ -287,7 +379,7 @@ $(function(){
 				if(Pmth.length > 0){
 					for(var m= 0; m< Pmth.length;m++){
 						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
-							Ptemp[i] = Pmth[m].all_check_score;
+							Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
 							break;
 						}else{
 							Ptemp[i] = 0;
@@ -316,7 +408,7 @@ $(function(){
 				}
 			}
 	    }
-		
+
     /**
 	 * 根据道管中心获取收费站列表(下拉框)
 	 */
@@ -346,17 +438,47 @@ $(function(){
 				sec.innerHTML='';	
 			}
 			var select_station = $("#second").val();
+			var select_month = $(".div-month select").val();
+			echart();
 			// 页面初始化
 			init_tollStation_year_assess("statistics/score/year/info",select_station);
-			init_company_points_assess("statistics/lost/score/rate",month+'',select_station);
-			init_progress_rank_assess("statistics/fs/up/five",month+'',select_station)
-			init_people_score_rank("statistics/stuff/score/info",month+'',select_station);
-			init_server_check_type("statistics/lost/itemscore/rate",month+"",select_station);
-			init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_station);
+			init_company_points_assess("statistics/lost/score/rate",select_month+'',select_station);
+			init_progress_rank_assess("statistics/fs/up/five",select_month+'',select_station)
+			init_people_score_rank("statistics/stuff/score/info",select_month+'',select_station);
+			init_server_check_type("statistics/lost/itemscore/rate",select_month+"",select_station);
+			init_each_people_points("statistics/lost/twice/itemscore/rate",select_month+"",select_station);
+			//init_backward_rank_assess("statistics/fs/up/five",select_month+'',select_station)
 		},function(error){
         	return "" ;
     	});
     }
+
+	/**
+	 * 进步前5名后退步前五名切换
+	 */
+	$(".view_change").click(function(){
+		    var select_station = $("#second").val();
+			var select_month = $(".div-month select").val();
+		if(change_echart==1){
+			$("#progress span").text("考核退步Top5排行榜");
+			$("#progress-rank-assess").css("display","none");
+			$("#backward-rank-assess").css("display","block");
+			//flag=false;
+			echart_change();	
+			init_backward_rank_assess("statistics/fs/up/five",select_month+'',select_station);
+			change_echart = 2
+			
+		}else if(change_echart==2){
+			$("#progress span").text("考核进步Top5排行榜");
+			$("#progress-rank-assess").css("display","block");
+			$("#backward-rank-assess").css("display","none");
+			//init_progress_rank_assess("statistics/fs/up/five",select_month+'',select_station);
+			// document.getElementById("progress-rank-assess").style.display="";
+			// document.getElementById("progress-rank-assess-back").style.display="none";
+			change_echart = 1
+		}
+		
+	});	
 	
     /**
 	 * 除数为0处理
@@ -369,7 +491,7 @@ $(function(){
 		if(num1 == 0 || num2 == 0){
 			return num3;
 		}else{
-			return (num/num1)/num2;
+			return ((num/num1)/num2).toFixed(2);
 		}
 	}
 
@@ -377,7 +499,7 @@ $(function(){
 		if(num1 == 0){
 			return num2;
 		}else{
-			return (num/num1);
+			return (num/num1).toFixed(2);
 		}
 	}
 
@@ -392,19 +514,40 @@ $(function(){
 	    require(
 		[
 			'echarts',
+			'echarts/theme/macarons', 
 			'echarts/chart/line', 
 			'echarts/chart/bar',
 			'echarts/chart/pie'
 		],
-		function (ec) {
-				// 基于准备好的dom,初始化echarts图表
-				year_assess = ec.init(document.getElementById('tollStation-year-assess')); 
-				points_assess = ec.init(document.getElementById('tollStation-points-assess'));
-				rank_assess = ec.init(document.getElementById('progress-rank-assess'));
-				score_rank = ec.init(document.getElementById('people-score-rank'));
-				check_type = ec.init(document.getElementById('server-check-type'));
-				people_points = ec.init(document.getElementById('each-people-points'));
-				}
+			function (ec,theme) {
+					// 基于准备好的dom,初始化echarts图表
+					if(flag){
+						year_assess = ec.init(document.getElementById('tollStation-year-assess'),theme);
+					} 
+						points_assess = ec.init(document.getElementById('tollStation-points-assess'),theme);
+						rank_assess = ec.init(document.getElementById('progress-rank-assess'));
+						score_rank = ec.init(document.getElementById('people-score-rank'));
+						check_type = ec.init(document.getElementById('server-check-type'));
+						people_points = ec.init(document.getElementById('each-people-points'),theme);
+						rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
+			}
+	    ); 
+	}
+
+	function echart_change(){
+        require.config({
+            paths: {
+                echarts: '/js/lib/echarts/build/dist'
+            }
+        }); 
+	    require(
+		[
+			'echarts',
+			'echarts/chart/bar'
+		],
+			function (ec) {
+				rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
+			}
 	    ); 
 	}
 			/**
@@ -434,7 +577,7 @@ $(function(){
 					yAxis : [
 						{
 							type : 'value',
-							min : 700 ,
+							min : min_year ,
 						    max : 1000,
 							axisLabel : {
 								formatter: '{value}'
@@ -472,7 +615,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "收费站考核扣分占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -499,7 +642,16 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:array_points
+						data:array_points,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};
@@ -508,7 +660,7 @@ $(function(){
 		}
 
         /**
-		 * 图三 
+		 * 图三 前5名 
 		 */
 		function progress_rank_assess(){
 			option = {
@@ -517,7 +669,7 @@ $(function(){
 					trigger: 'axis'
 				},
 				grid:{
-                    width:420  // 图表宽度
+                    width:"80%"
                 },
 				legend: {
 					data:['进步名次']
@@ -531,7 +683,8 @@ $(function(){
 				],
 				yAxis : [
 					{
-						type : 'value'
+						type : 'value',
+						min : min_five
 					}
 				],
 				series : [
@@ -554,6 +707,55 @@ $(function(){
 					return option;
 	   }
 
+	   /**
+		 * 图三 后5名
+		 */
+		function backward_rank_assess(){
+			option = {
+				color : [ '#00ced1' ],// 条形图颜色
+				tooltip : {
+					trigger: 'axis'
+				},
+				grid:{
+                    width:"80%"
+                },
+				legend: {
+					data:['退步名次']
+				},
+				calculable : true,
+				xAxis : [
+					{
+						type : 'category',
+						data : array_five_name_back
+					}
+				],
+				yAxis : [
+					{
+						type : 'value',
+						min : min_five_back
+					}
+				],
+				series : [
+					{
+						name:'退步名次',
+						type:'bar',
+						data: array_five_score_back,
+					    itemStyle: {
+						normal: {
+							label: {
+								show: true,
+								position: 'insideTop'
+							}
+						}
+					},  						
+					}   
+				]
+			};
+                    		
+					return option;
+	   }
+
+
         /**
 		 * 图四
 		 */
@@ -564,8 +766,7 @@ $(function(){
 					trigger: 'axis'
 				},
 				grid:{
-                    width:1010,  // 图表宽度
-					x:40
+                    width:"88%"
                 },
 				legend: {
 					data:['平均分']
@@ -573,14 +774,18 @@ $(function(){
 				calculable : true,
 				xAxis : [
 					{
+							axisLabel: {  
+				interval:0
+				}  ,
 						type : 'category',
 						data : array_score_order
 					}
 				],
+			
 				yAxis : [
 					{
 						type : 'value',
-						min : 900 ,
+						min : min_score ,
 						max : 1000
 					}
 				],
@@ -616,7 +821,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "温馨服务检查占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -641,9 +846,18 @@ $(function(){
 					{
 						name:'访问来源',
 						type:'pie',
-						radius : '65%',
+						radius : '55%',
 						center: ['50%', '50%'],
-						data:array_check_type
+						data:array_check_type,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};
@@ -659,7 +873,7 @@ $(function(){
 				trigger: 'axis'
 			},
 			grid:{
-                    width:420  // 图表宽度
+                    width:"80%"
                 },
 			legend: {
 				data:['上月','本月']
@@ -683,6 +897,7 @@ $(function(){
 					data:array_points_pre,
 					itemStyle: {
 						normal: {
+							color:'#b3d4fc',
 							label: {
 								show: true,
 								position: 'insideTop'
@@ -696,6 +911,7 @@ $(function(){
 					data:arrar_points_month,
 					itemStyle: {
 						normal: {
+							color:'#ea644a',
 							label: {
 								show: true,
 								position: 'insideTop'

+ 90 - 33
VisualInspection/js/statistics/total_company_statistics.js

@@ -19,14 +19,18 @@
 		var stationAll_rank;
 		var check_type;
 		var people_points;
+		var flag = true;
+		var min_year;
+		var min_road;
+		var min_allStation;
+		var score_ranking = new Array();
 $(function(){
 	// 显示当前月份
 	$(".div-month select").val(month);
 
 	$(".query-company").click(function(){	
 		var select_month = $(".div-month select").val();
-		// 查询图一
-		init_company_year_assess();
+		flag = false;
 		// 查询图二
 		init_company_points_assess("statistics/lost/score/rate",select_month+'');
 		// 查询图三
@@ -118,7 +122,13 @@ $(function(){
 	 * 初始化图六
 	 */
     function init_each_people_points_six(url,mon){
-		var prev_mth = (mon-1)+'';		
+		var yearPre = year;
+		if(mon==1){
+			prev_mth = 12+'';
+			yearPre = yearPre-1;
+		}else{
+		var prev_mth = (mon-1)+'';	
+		}	
 		if(mon.length==1){
 			mon = "0" +mon;
 		}
@@ -127,7 +137,7 @@ $(function(){
 		}
 		var param = {
 			"mth":year + "/" + mon,
-			"prev_mth": year + "/" + prev_mth,
+			"prev_mth": yearPre + "/" + prev_mth,
 			"queryType":0
 		};
 		initRqueset(url,param,6);
@@ -177,24 +187,28 @@ $(function(){
 		if(type == 1){
 			array_year_score.length = 0;
 			months.length = 0;
-			if(data!=''){
+			if(data!='' && data.length!=0){
 			if(data.length<12){
 				for(var i=0;i<12-data.length;i++){
 					// 不足月份补0
 					array_year_score.push(0);
 				}
 			}		
-			for(var i=0;i<data.length;i++){
-				if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-					// 指定位置插入值
-					array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-					(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+				for(var i=0;i<data.length;i++){
+					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
+						// 指定位置插入值
+						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
+						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+					}
 				}
-			}
 			}else{
 					array_year_score.length = 0;
 					months.length = 0;
-			}	
+			}
+			if(eval("Math.min(" + array_year_score.toString() + ")")==0)
+			min_year = 0;
+			else
+			min_year = 	eval("Math.min(" + array_year_score.toString() + ")").toFixed(0)-10;
 		}else if(type == 2){
 			array_points.length=0;
 			    if(data!=''){
@@ -211,24 +225,32 @@ $(function(){
 			for(var i=0;i<data.length;i++){
 				if(data!=''){
 					array_road.push(data[i].feeStationName);
-					array_road_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+					array_road_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 		        }else{
 					array_road.length=0;
 			        array_road_score.length=0;	
 				}	
 		    }
+			    if(eval("Math.min(" + array_road_score.toString() + ")")==0)
+				min_road = 0;
+				else
+				min_road = 	eval("Math.min(" + array_road_score.toString() + ")").toFixed(0)-10;
 		}else if(type == 4){
 			array_allStation_score.length=0;
 			array_allStation.length=0;
             for(var i=0;i<data.length;i++){
-				if(data!=''){
+				if(data!='' && data.length!=0){
 					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3));
-					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0)).toFixed(1)));
+					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}else{
 					array_allStation_score.length=0;
 			        array_allStation.length=0;	
 				}
 	        }
+			    if(eval("Math.min(" + array_allStation_score.toString() + ")")==0)
+				min_allStation = 0;
+				else
+				min_allStation = eval("Math.min(" + array_allStation_score.toString() + ")").toFixed(0)-10;
 		}else if(type == 5){
 			array_check_type = [];
                 if(data.length != 0){
@@ -242,7 +264,13 @@ $(function(){
 			array_points_name.length=0;
 			array_points_pre.length=0;
 			arrar_points_month.length=0;
-			data_each_people_points(data);
+			if(data!='' && data.Pmth.length!=0 || data.Tmth.length!=0){
+			  	data_each_people_points(data);
+			}else{
+				array_points_name.length=0;
+				array_points_pre.length=0;
+				arrar_points_month.length=0;
+			}   
 		}
 	}
 
@@ -260,7 +288,7 @@ $(function(){
 				if(Tmth.length > 0){
 					for(var j= 0; j< Tmth.length;j++){
 						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
-							Ttemp[i] = Tmth[j].all_check_score;
+							Ttemp[i] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
 							break;
 						}else{
 							Ttemp[i] = 0;
@@ -272,7 +300,7 @@ $(function(){
 				if(Pmth.length > 0){
 					for(var m= 0; m< Pmth.length;m++){
 						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
-							Ptemp[i] = Pmth[m].all_check_score;
+							Ptemp[i] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
 							break;
 						}else{
 							Ptemp[i] = 0;
@@ -313,7 +341,7 @@ $(function(){
 		if(num1 == 0 || num2 == 0){
 			return num4;
 		}else{
-			return (num/num1)/num2;
+			return ((num/num1)/num2).toFixed(2);
 		}
 	}
 	
@@ -331,17 +359,20 @@ $(function(){
 			require(
 			[
 				'echarts',
+				'echarts/theme/macarons', 
 				'echarts/chart/line', 
 				'echarts/chart/bar',
 				'echarts/chart/pie'
 			],
-		function (ec) {
+		function (ec,theme) {
 				// 基于准备好的dom,初始化echarts图表
-				year_assess = ec.init(document.getElementById('company-year-assess')); 
-				points_assess = ec.init(document.getElementById('company-points-assess'));
+				if(flag){
+					year_assess = ec.init(document.getElementById('company-year-assess'),theme); 
+				}
+				points_assess = ec.init(document.getElementById('company-points-assess'),theme);
 				score_rank = ec.init(document.getElementById('roadManager-score-rank'));
 				stationAll_rank = ec.init(document.getElementById('company-stationAll-rank'));
-				check_type = ec.init(document.getElementById('server-check-type'));
+				check_type = ec.init(document.getElementById('server-check-type'),theme);
 				people_points = ec.init(document.getElementById('each-people-points'));
 
 			}
@@ -361,7 +392,7 @@ $(function(){
 					legend: {
 						data:['平均分']
 					},
-					toolbox: {
+					 toolbox: {
 						show : true,
 					},
 					calculable : true,
@@ -375,7 +406,7 @@ $(function(){
 					yAxis : [
 						{
 							type : 'value',
-							min : 900 ,
+							min : min_year ,
 						    max : 1000,
 							axisLabel : {
 								formatter: '{value}'
@@ -413,7 +444,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "公司考核扣分占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -440,7 +471,16 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:array_points
+						data:array_points,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};
@@ -457,7 +497,10 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
-				
+				grid:{
+                    width:"80%",
+					
+                },
 				calculable : true,
 				xAxis : [
 					{
@@ -468,7 +511,7 @@ $(function(){
 				yAxis : [
 					{
 						type : 'value',
-						min : 900 ,
+						min : min_road ,
 						max : 1000
 					}
 				],
@@ -519,7 +562,7 @@ $(function(){
 				yAxis : [
 					{
 						type : 'value',
-						min : 900 ,
+						min : min_allStation ,
 						max : 1000
 					}
 				],
@@ -555,7 +598,7 @@ $(function(){
 			option = {
 				tooltip : {
 					trigger: 'item',
-					formatter: "{a} <br/>{b} : {c} ({d}%)"
+					formatter:  "温馨服务检查占比 <br/>{b} : {d}%"
 				},
 				toolbox: {
 					show : true,
@@ -580,9 +623,18 @@ $(function(){
 					{
 						name:'访问来源',
 						type:'pie',
-						radius : '65%',
+						radius : '55%',
 						center: ['50%', '50%'],
-						data:array_check_type
+						data:array_check_type,
+						itemStyle:{ 
+						normal:{ 
+							label:{ 
+								show: true, 
+								formatter: '{b} : {c} ({d}%)'  
+							}, 
+							labelLine :{show:true} 
+							} 
+						} 
 					}
 				]
 			};
@@ -597,6 +649,9 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			grid:{
+                    width:"80%",	
+                },
 			legend: {
 				data:['上月','本月']
 			},
@@ -619,6 +674,7 @@ $(function(){
 					data:array_points_pre,
 					itemStyle: {
 						normal: {
+							color:'#b3d4fc',
 							label: {
 								show: true,
 								position: 'insideTop'
@@ -632,6 +688,7 @@ $(function(){
 					data:arrar_points_month,
 					itemStyle: {
 						normal: {
+							color:'#ea644a',
 							label: {
 								show: true,
 								position: 'insideTop'

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

@@ -2,13 +2,13 @@ function video_paly(src) {
     var height = 264;
     var width = 640;
 
-    alert(src)
+   
 
     __inline('/node_modules/video.js/dist/video.min.js');
     var css = "<style lang='css/text'>" + __inline('/node_modules/video.js/dist/video-js.min.css') + "  .video-js .vjs-fullscreen-control { display: none;} </style>";
 
     var list = src.split(".");
-    var videotype = "x-msvideo"
+    var videotype = list[list.length-1]
 
     var html = css + '<video' +
         '    id="my-player"' +
@@ -17,7 +17,7 @@ function video_paly(src) {
         '    preload="auto"' +
         '    width="' + width + '" height="' + height + '"' +
         '    data-setup=\'{}\'>' +
-        '  <source src="' + src + '" type="video/avi"></source>' +
+        '  <source src=\'' + src + '\' type="video/'+videotype+'"></source>' +
         '  <p class="vjs-no-js">' +
         '    To view this video please enable JavaScript, and consider upgrading to a' +
         '    web browser that' +

+ 4 - 0
VisualInspection/js/util/util.js

@@ -387,6 +387,10 @@ function showClientImg(src){
     callFunc("showImage", src);
 }
 
+function showClientVideo(src){
+    callFunc("showVideo", src);
+}
+
 function downloadClientfile(src){
     callFunc("downloadfile", src);
 }

+ 23 - 2
VisualInspection/view/mytask/taskDetail.html

@@ -204,10 +204,31 @@
         if(pics){
             var picArr = pics.split(',');
             for(var i in picArr){
+
+                var ispic = true;
+                var src =  picArr[i];
+                if (!src.startWith("http"))
+                        src = base_image_server_url + src;
+
+                var videosrc = src;
+                if (src.indexOf('.avi') != -1) {
+                    src = src.split('.avi')[0] + "_screen_0.png"
+                    ispic = false;
+                }
+                if (src.indexOf('.mov') != -1) {
+                    src = src.split('.mov')[0] + "_screen_0.png"
+                    ispic = false;
+                }
+                if (src.indexOf('.mp4') != -1) {
+                    src = src.split('.mp4')[0] + "_screen_0.png"
+                    ispic = false;
+                }
+
+            
                 var pic = '<div id="img_item_'+i+'" class="col-md-4 col-sm-6 col-lg-3">'
                     +  '<a href="javascript:void(0)" onclick="removeImg(\'#img_item_'+i+'\')" style="float:right;position:absolute;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
-                    +  '<a class="card lightbox-toggle" href="'+picArr[i]+'" style="position:absolute">'
-                    +      '<img class="pic-class img-thumbnail" style="width:200px;height:150px;" src="'+picArr[i]+'" alt="">'
+                    +(ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') 
+                    +      '<img class="pic-class img-thumbnail" style="width:200px;height:150px;" src="'+src+'" alt="">'+ (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 40px;left:80px;color: white;"></i>') 
                     +  '</a>'
                     +'</div>';
                 picStr+=pic;

+ 69 - 0
VisualInspection/view/statistics/appeal.html

@@ -0,0 +1,69 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/js/statistics/appeal.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 selected value="">全部</option>
+                        <option 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">
+                    <button class="btn btn-primary" id="searchBtn" type="button" >查询</button>
+                </div>
+                <div class="col-sm-2">
+                    <button class="btn btn-primary" id="exportExcel" 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  width="80px">序号</th>
+                        <th  width="120px">站名</th>
+                        <th  width="120px">申诉次数</th>
+                        <th>申诉成功(次数)<br> (已修改考核结果) </th>
+                        <th>申诉失败(次数)<br> (维持原稽查结果)</th>
+                        <th>其他情况(次数)<br>(更换被考核人等)</th>
+                    </tr>
+                  </thead>
+                  <tbody class="table-tbody" style="background:white" align="center" height="500px">
+
+                  </tbody>
+                  </table>
+                </div>
+         
+    </div>
+</div>

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

@@ -0,0 +1,117 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/js/statistics/change_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>

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

@@ -0,0 +1,86 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/js/statistics/change_work.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="80px">序号</th>
+                        <th rowspan="2" width="120px">站名</th>
+                        <th rowspan="2" width="120px">姓名</th>
+                        <th rowspan="2" width="120px">岗位</th>
+                        <th width="120px" colspan="3">月份出勤统计(上月26 ~ 本月25)</th>
+                        <th  rowspan="2"  min-width="120px">合计</th>
+                        <th  rowspan="2" >备注</th>
+                    </tr>
+                    <tr> 
+                        <th>夜</th>
+                        <th>早</th>
+                        <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>

+ 5 - 29
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>
@@ -18,7 +18,8 @@
     <div class="row-3">
        <table class="table table-bordered" style="text-align:center;">
            <tr><td>总稽查人数</td><td>总稽查任务数</td><td>总稽查时长</td><td>考核人员数量</td><td>总扣分数</td><td>平均人次扣分数</td></tr>
-           <tr><td>15</td><td>150</td><td>1小时20分</td><td>20</td><td>3000</td><td>200</td></tr>
+           <tr><td class="all_check_personal"></td><td class="all_check_task"></td><td class="all_check_minute"></td>
+               <td class="all_checkman"></td><td class="all_check_score"></td><td class="check_score_avg"></td></tr>
        </table>
     </div>
 
@@ -31,32 +32,7 @@
 <script>
     $(document).ready(function() {
 
-        // 仅选择日期
-        $(".div-start input").datetimepicker(
-        {
-            language:  "zh-CN",
-            weekStart: 1,
-            todayBtn:  1,
-            autoclose: 1,
-            todayHighlight: 1,
-            startView: 2,
-            minView: 2,
-            forceParse: 0,
-            format: "yyyy-mm-dd"
-        });
-        // 仅选择日期
-        $(".div-end input").datetimepicker(
-        {
-            language:  "zh-CN",
-            weekStart: 1,
-            todayBtn:  1,
-            autoclose: 1,
-            todayHighlight: 1,
-            startView: 2,
-            minView: 2,
-            forceParse: 0,
-            format: "yyyy-mm-dd"
-        });
+       
     });
 </script>
 

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

@@ -0,0 +1,117 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<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>

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

@@ -0,0 +1,86 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/js/statistics/common_work.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="80px">序号</th>
+                        <th rowspan="2" width="120px">站名</th>
+                        <th rowspan="2" width="120px">姓名</th>
+                        <th rowspan="2" width="120px">岗位</th>
+                        <th width="120px" colspan="3">月份出勤统计(上月26 ~ 本月25)</th>
+                        <th  rowspan="2"  min-width="120px">合计</th>
+                        <th  rowspan="2" >备注</th>
+                    </tr>
+                    <tr> 
+                        <th>夜</th>
+                        <th>早</th>
+                        <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>

+ 22 - 16
VisualInspection/view/statistics/emp_ranking.html

@@ -55,16 +55,19 @@
                     <table border="1" width="100%"  align="center">
                         <thead class="table-thead" align="center">
                             <tr>
-                            <th rowspan="2" width="67px;">序号</th><th rowspan="2" width="87px">站名</th><th rowspan="2" width="67px">姓名</th>
-                            <th rowspan="2" width="67px">岗位</th><th rowspan="2" width="87px">工号</th><th colspan="9" height="40px">考核扣分</th>
-                            <th rowspan="2" width="67px">受检次数</th><th rowspan="2" width="67px">平均扣分(千分制)</th><th rowspan="2" width="55px">得分</th>
-                            <th rowspan="2" width="58px">服务评价</th><th rowspan="2"  width="58px">备注</th>
+                            <th rowspan="2" width="4%;">序号</th><th rowspan="2" width="6%">站名</th>
+                            <th rowspan="2" width="6%">姓名</th><th rowspan="2" width="6%">岗位</th>
+                            <th rowspan="2" width="7%">工号</th><th rowspan="2" width="4%">公司排名</th>
+                            <th rowspan="2" width="4%">道管排名</th><th rowspan="2" width="4%">收费站排名</th>
+                            <th colspan="9" height="40px">考核扣分</th><th rowspan="2" width="4%">受检次数</th>
+                            <th rowspan="2" width="4%">平均扣分(千分制)</th><th rowspan="2" width="4%">得分</th>
+                            <th rowspan="2" width="4%">服务评价</th><th rowspan="2" width="4%">备注</th>
                             </tr>
                             <tr> 
-                            <th width="58px">环境卫生</th><th width="58px">仪容仪表</th><th width="58px">表情</th>
-                            <th width="58px">收费动作</th><th width="58px">文明用语</th><th width="58px">工作纪律</th>
-                            <th width="58px">便民服务</th><th width="58px">安全管理</th>
-                            <th width="58px">扣分合计</th>
+                            <th width="4%">环境卫生</th><th width="4%">仪容仪表</th><th width="4%">表情</th>
+                            <th width="4%">收费动作</th><th width="4%">文明用语</th><th width="4%">工作纪律</th>
+                            <th width="4%">便民服务</th><th width="4%">安全管理</th>
+                            <th width="4%">扣分合计</th>
                             </tr>
                         </thead>
                     </table>
@@ -74,16 +77,19 @@
                  <table style="border-top:0;" border="1" width="100%"  align="center">
                     <thead class="table-thead" style="height:0;" align="center">
                         <tr style="display:none;">
-                            <th rowspan="2" width="67px;">序号</th><th rowspan="2" width="87px">站名</th><th rowspan="2" width="67px">姓名</th>
-                            <th rowspan="2" width="67px">岗位</th><th rowspan="2" width="87px">工号</th><th colspan="9" height="40px">考核扣分</th>
-                            <th rowspan="2" width="67px">受检次数</th><th rowspan="2" width="67px">平均扣分(千分制)</th><th rowspan="2" width="55px">得分</th>
-                            <th rowspan="2" width="58px">服务评价</th><th rowspan="2"  width="58px">备注</th>
+                            <th rowspan="2" width="4%;">序号</th><th rowspan="2" width="6%">站名</th>
+                            <th rowspan="2" width="6%">姓名</th><th rowspan="2" width="6%">岗位</th>
+                            <th rowspan="2" width="7%">工号</th><th rowspan="2" width="4%">公司排名</th>
+                            <th rowspan="2" width="4%">道管排名</th><th rowspan="2" width="4%">收费站排名</th>
+                            <th colspan="9" height="40px">考核扣分</th><th rowspan="2" width="4%">受检次数</th>
+                            <th rowspan="2" width="4%">平均扣分(千分制)</th><th rowspan="2" width="4%">得分</th>
+                            <th rowspan="2" width="4%">服务评价</th><th rowspan="2" width="4%">备注</th>
                         </tr>
                         <tr style="display:none;"> 
-                            <th width="58px">环境卫生</th><th width="58px">仪容仪表</th><th width="58px">表情</th>
-                            <th width="58px">收费动作</th><th width="58px">文明用语</th><th width="58px">工作纪律</th>
-                            <th width="58px">便民服务</th><th width="58px">安全管理</th>
-                            <th width="58px">扣分合计</th>
+                            <th width="4%">环境卫生</th><th width="4%">仪容仪表</th><th width="4%">表情</th>
+                            <th width="4%">收费动作</th><th width="4%">文明用语</th><th width="4%">工作纪律</th>
+                            <th width="4%">便民服务</th><th width="4%">安全管理</th>
+                            <th width="4%">扣分合计</th>
                         </tr>
                     </thead>
                     <tbody class="table-tbody" style="background:white; " align="center">

+ 11 - 10
VisualInspection/view/statistics/personal_data_statistics.html

@@ -2,22 +2,24 @@
 <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>
-            <div class="div-select div-button"><button>选择人员</button></div>
+            <!--<div class="name"><span>刘娟</span></div>
+            <div class="div-select div-button"><button>选择人员</button></div>-->
+            <div class="name1"><span>请选择收费站:</span></div>
+            <div class="div-select"><select id="select-dept"></select></button></div>
+            <div class="div-select"><select id="select-personal"></select></button></div>
             <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
             <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
-            <div class="div-check"><select><option>请选择温馨服务检查类别</option></select></div>
             <div class="query div-button"><button>查询</button></div>
-            <div class="export div-button"><button>导出</button></div>
+            <!--<div class="export div-button"><button>导出</button></div>-->
         </div>
     </div> 
     <div class="line-1"></div>
-    <div class="row-3">
+    <!--<div class="row-3">
         <div class="dept">
             <div style="margin-top:14px;">
             <span>部门</span><br/><br/>   
@@ -47,8 +49,7 @@
             <span style="margin-left:50px;">总扣分:</span><span>120</span>
             <span style="margin-left:50px;">平均单项扣分:</span><span>11</span>
         </div>
-    </div>
-    <div class="line-1"></div>
+    </div>-->
 
     <div class="row" style="width:100%;margin:0 auto;">
             <!-- 使用一个div来显示数据表格 -->
@@ -69,7 +70,7 @@
 </div>
 <script>
     $(document).ready(function() {
-
+        
         // 仅选择日期
         $(".div-start input").datetimepicker(
         {

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

+ 5 - 3
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>
@@ -37,12 +37,14 @@
     <div class="border-line">
     <div class="row-4">
         <div class="col-1"><span>收费站考核扣分情况占比</span></div><div class="line-2"></div>
-        <div class="col-1"><span>考核进步Top5排行榜</span></div>
+        <div class="col-1" id="progress"><span>考核进步Top5排行榜</span><div class="btn-change"><button class="view_change">切换</button></div></div>
+        <div class="col-1" id="backward" style="display:none;"><span>考核退步Top5排行榜</span></div>
     </div>
     <div class="row-5">
         <div id="tollStation-points-assess" style="width:49%;height:400px;float:left;"></div>
         <div class="line-3"></div>
         <div id="progress-rank-assess" style="width:49%;height:400px;float:left;"></div>
+        <div id="backward-rank-assess" style="display:none;width:49%;height:400px;float:left;"></div>
     </div>
     </div>
 

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

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

@@ -7,8 +7,10 @@ import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 @Data
+@EqualsAndHashCode(callSuper = false)
 public class CheckAppeal {
 	//编号
     private Long id;

+ 49 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckAppealStatistic.java

@@ -0,0 +1,49 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.Date;
+import java.util.List;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+@Data
+public class CheckAppealStatistic {
+	
+	private Integer id;
+	
+	private String month_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;
+    
+    private Integer appeal_result ;
+    
+    private int appeal_success_num ;
+    
+    private int appeal_other_num;
+    
+    private int appeal_fail_num ;
+    
+    private int appeal_num;
+    
+    private String fee_station_name;
+    
+    private Integer dept_id ;
+    
+    private List<Organ> dept_list  ;
+    
+    private Integer parent_dept_id ;
+    
+    private List<CheckAppealStatistic> subCheckApealStatistic ;
+    
+}

+ 24 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java

@@ -113,4 +113,28 @@ public class StatisticsBean {
     private String check_task_name ;
     
     private String check_task_time_name ;
+    
+    // 比较大小 1 小 , -1 大
+    public int compareTo(StatisticsBean o2){
+    	if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){
+			double a = this.getAll_check_score() / (this.getChecked_num()+0.00) / this.getPeople_num();
+			double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00) / o2.getPeople_num();
+			if (a > b ) {
+				return 1;
+			} else if (a < b) {
+				return -1;
+			} else {
+				return 0;
+			}	
+		}else{
+			if(this.getChecked_num() == 0){
+				return -1 ;
+			}else if(o2.getChecked_num() ==0){
+				return 1;
+			}else{
+				return 0;
+			}
+		}
+    }
+    
 }

+ 28 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java

@@ -4,6 +4,8 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+import org.mockito.internal.matchers.CompareTo;
+
 import lombok.Data;
 
 /**
@@ -31,4 +33,30 @@ public class StatisticsBo {
     
     private String check_score;
     
+    // 公司排名
+    private Integer company_ranking;
+    // 道管排名
+    private Integer center_ranking;
+    
+    // 收费站排名
+    private Integer fee_station_ranking;
+    
+    // 比较大小 1 小 , -1 大
+    public int compareTo(StatisticsBo o2){
+    	double a = 1000.0 ,b=1000.0 ;
+		if(this.getChecked_num()!=0 ){
+			a = this.getCheck_all_score() / (this.getChecked_num()+0.00);
+		}
+		if(o2.getChecked_num()!=0){
+			b = o2.getCheck_all_score()/(o2.getChecked_num()+0.00);
+		}
+		if (a > b ) {
+			return 1;
+		} else if (a < b) {
+			return -1;
+		} else {
+			return 0;
+		}	
+    }
+    
 }

+ 72 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsFsWork.java

@@ -0,0 +1,72 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+/**
+ * 文件名:Job
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class StatisticsFsWork {
+    //编号
+    private Integer id;
+ 
+    // 部门id
+    private Long dept_id;
+    
+    // 收费站名字
+    private String feeStationName ;
+    
+    // 用户名字
+    private String userName ;
+    
+    // 岗位名字
+    private String positionName ;
+    
+    // 工号
+    private String workno ;
+    
+    // 父部门id
+    private Long parent_dept_id ;
+    
+    //开始日期
+    @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 ;
+    
+    private Long user_id ;
+    
+    private List<Organ> dept_list  ;
+    
+    // work_date 时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date work_date ;
+    
+    // 班次类型(早、中、晚、全天)
+    private Integer class_type ;
+    
+    // 工作天数
+    private Integer work_days ; 
+    
+    // 工作时间(分钟)
+    private Integer work_minutes;
+    
+    // 稽查id
+    private Integer check_id;
+    
+    List<StatisticsFsWork> subStatisticsFsWork;
+    
+}

+ 43 - 30
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java

@@ -15,8 +15,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.xintong.visualinspection.bean.CheckAppealStatistic;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.service.StatisticsService;
+import com.xintong.visualinspection.util.DateUtil;
 
 /**
  * 文件名:StatisticsController
@@ -42,18 +44,15 @@ public class FileExcelController extends BaseController {
     		@RequestParam String start_date,@RequestParam String end_date,
     		@RequestParam String start_score,@RequestParam String end_score){
     	StatisticsBean obj = new StatisticsBean();
-    	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
-    	try {
-			Date start = sdf.parse(start_date);
-			Date end = sdf.parse(end_date);
-			obj.setDept_id(dept_id);
-			obj.setStart_date(start);
-			obj.setEnd_date(end);
-			obj.setStart_score(start_score);
-			obj.setEnd_score(end_score);
-		} catch (ParseException e) {
-			e.printStackTrace();
-		}
+    
+		Date start =  DateUtil.strParseDate(start_date);
+		Date end =  DateUtil.strParseDate(end_date);
+		obj.setDept_id(dept_id);
+		obj.setStart_date(start);
+		obj.setEnd_date(end);
+		obj.setStart_score(start_score);
+		obj.setEnd_score(end_score);
+		
     	statisticsService.getEmployeeCheckedInfo(obj, req, resp);
     	return super.returnSuccessResult(null);
     }
@@ -66,16 +65,14 @@ public class FileExcelController extends BaseController {
     @RequestMapping(value = "/score/info",method=RequestMethod.GET)
     public String getScoreInfo(HttpServletRequest req,HttpServletResponse resp,
     		@RequestParam String start_date,@RequestParam String end_date){
-    	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
+    	
     	StatisticsBean obj = new StatisticsBean();
-    	try {
-			Date start = sdf.parse(start_date);
-			Date end = sdf.parse(end_date);
-			obj.setStart_date(start);
-			obj.setEnd_date(end);
-		} catch (ParseException e) {
-			e.printStackTrace();
-		}
+    
+		Date start =  DateUtil.strParseDate(start_date);
+		Date end =  DateUtil.strParseDate(end_date);
+		obj.setStart_date(start);
+		obj.setEnd_date(end);
+		
     	statisticsService.getFeeStationCheckedScore(obj, req, resp);
     	return super.returnSuccessResult(null);
     }
@@ -86,17 +83,33 @@ public class FileExcelController extends BaseController {
     @RequestMapping(value = "/score/item/info",method=RequestMethod.GET)
     public String getScoreItemInfo(HttpServletRequest req,HttpServletResponse resp,
     		@RequestParam String start_date,@RequestParam String end_date){
-    	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
     	StatisticsBean obj = new StatisticsBean();
-    	try {
-			Date start = sdf.parse(start_date);
-			Date end = sdf.parse(end_date);
-			obj.setStart_date(start);
-			obj.setEnd_date(end);
-		} catch (ParseException e) {
-			e.printStackTrace();
-		}
+		Date start = DateUtil.strParseDate(start_date);
+		Date end = DateUtil.strParseDate(end_date);
+		obj.setStart_date(start);
+		obj.setEnd_date(end);
     	statisticsService.getFeeStationCheckItemScore(obj, req, resp);
     	return super.returnSuccessResult(null);
     }
+    
+    /**
+     * 收费站申诉统计
+     */
+    @RequestMapping(value = "/appeal/info",method=RequestMethod.GET)
+    public String getAppealStatisticExcel(HttpServletRequest req,HttpServletResponse resp,
+    		@RequestParam Integer month,
+    		@RequestParam(required=false) Integer centerId,
+    		@RequestParam(required=false) Integer deptId){
+    	CheckAppealStatistic obj = new CheckAppealStatistic();
+    	if(deptId!=null){
+    		obj.setDept_id(deptId);
+    	}else if(centerId!=null){
+    		obj.setParent_dept_id(centerId);
+    	}
+    	obj.setStart_time(DateUtil.strParseDate("2017-"+(month-1)+"-25 23:00:00"));
+    	obj.setEnd_time(DateUtil.strParseDate("2017-"+month+"-25 23:00:00"));
+    	statisticsService.getExcelAppealInfo(obj,month.toString(), req, resp);
+    	return super.returnSuccessResult(null);
+    }
+    
 }

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

@@ -11,9 +11,11 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.xintong.visualinspection.bean.CheckAppealStatistic;
 import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
+import com.xintong.visualinspection.bean.StatisticsFsWork;
 import com.xintong.visualinspection.bean.Team;
 import com.xintong.visualinspection.service.StatisticsService;
 
@@ -166,7 +168,8 @@ public class StatisticsController extends BaseController {
      */
     @RequestMapping(value = "/one/checkedItem/detail/info/{page}/{size}")
     public String getFsOnePersonCheckedItemDetailInfo(@RequestBody StatisticsBean obj,@PathVariable Integer page,@PathVariable Integer size){
-    	PageHelper.offsetPage(page, size);
+    	//PageHelper.offsetPage(page, size);
+    	PageHelper.startPage(page, size);
     	List<StatisticsBean> returnList=  statisticsService.getOneCheckedDetailInfo(obj);
     	return super.returnSuccessResult(new PageInfo(returnList));
     }
@@ -180,4 +183,50 @@ public class StatisticsController extends BaseController {
     	CheckmanStatisticsBean returnObj=  statisticsService.getCheckmanStatisticInfo(obj);
     	return super.returnSuccessResult(returnObj);
     }
+    
+    /**
+     * 获取考勤列表情况
+     */
+    @RequestMapping(value = "/fs/work/info")
+    public String getFsworkInfo(@RequestBody StatisticsFsWork obj){
+    	List<StatisticsFsWork> returnObj=  statisticsService.getFsWorkStatisticInfo(obj);
+    	return super.returnSuccessResultTime(returnObj);
+    }
+    
+    /**
+     * 获取顶岗考勤列表情况
+     */
+    @RequestMapping(value = "/fs/unregular/work/info")
+    public String getFsUnregularworkInfo(@RequestBody StatisticsFsWork obj){
+    	List<StatisticsFsWork> returnObj=  statisticsService.getUnregularFsWorkStatisticInfo(obj);
+    	return super.returnSuccessResultTime(returnObj);
+    }
+    
+    /**
+     * 正常在岗人数
+     */
+    @RequestMapping(value = "/fs/work/person")
+    public String getFsworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){
+    	List<StatisticsFsWork> returnObj=  statisticsService.getFsWorkPerson(obj);
+    	return super.returnSuccessResultTime(returnObj);
+    }
+    
+    /**
+     * 顶岗人数统计
+     */
+    @RequestMapping(value = "/fs/unregular/work/person")
+    public String getFsUnregularworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){
+    	List<StatisticsFsWork> returnObj=  statisticsService.getFsWorkUnregularWorkPerson(obj);
+    	return super.returnSuccessResultTime(returnObj);
+    }
+    
+    /**
+     * 申诉统计
+     */
+    @RequestMapping(value = "/check/appeal")
+    public String getCheckAppeal(@RequestBody CheckAppealStatistic obj){
+    	List<CheckAppealStatistic> returnObj=  statisticsService.getCheckAppealStatistic(obj);
+    	return super.returnSuccessResultTime(returnObj);
+    }
+    
 }

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

@@ -22,4 +22,5 @@ public interface UserInfoDao {
     public List<User> getAllCheckmans();
     public List<StatisticsBean> getUsersCountList();
     public Integer getUsersCenterManageCount(StatisticsBean obj);
+    public User getOneDetail(Integer id);
 }

+ 17 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java

@@ -4,8 +4,10 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Mapper;
 
+import com.xintong.visualinspection.bean.CheckAppealStatistic;
 import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
+import com.xintong.visualinspection.bean.StatisticsFsWork;
 
 /**
  * 文件名:StatisticsDao
@@ -39,4 +41,19 @@ public interface StatisticsDao  {
 	public List<StatisticsBean> selectOneCheckedDetailInfo(StatisticsBean obj);
 	
 	public CheckmanStatisticsBean selectCheckManInfo(CheckmanStatisticsBean obj);
+	
+	
+	public List<StatisticsFsWork> selectFsWork(StatisticsFsWork obj);
+	
+	public List<StatisticsFsWork> selectFsWorkGather(StatisticsFsWork obj);
+	
+	public List<StatisticsFsWork> selectFsUnregularWork(StatisticsFsWork obj);
+	
+	public List<StatisticsFsWork> selectFsUnregularWorkGather(StatisticsFsWork obj);
+	
+	public List<StatisticsFsWork> selectFsWorkGatherGroupByWorkType(StatisticsFsWork obj);
+	
+	public List<StatisticsFsWork> selectFsUnregularWorkGatherGroupByWorkType(StatisticsFsWork obj);
+	
+	public List<CheckAppealStatistic> selectCheckAppealNum(CheckAppealStatistic obj);
 }

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

@@ -43,6 +43,14 @@
         WHERE id = #{id}
     </select>
 
+	<select id="getOneDetail" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
+        SELECT
+        t.* ,  fs.name AS fee_station_name
+        FROM t_sys_users t
+        LEFT JOIN t_br_layer_fee_station fs ON t.organid = fs.organ_id
+        WHERE t.id = #{id} 
+    </select>
+
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.User" >
         INSERT INTO
         t_sys_users
@@ -102,8 +110,9 @@
     
     <select id="getUsers" parameterType="com.xintong.visualinspection.bean.User" resultMap="BaseResultMap"  >
         SELECT
-        t.* , fs.name AS fee_station_name
+        t.* , fs.name AS fee_station_name,tso.parentid AS parent_organid
         FROM t_sys_users t LEFT JOIN t_br_layer_fee_station fs ON t.organid = fs.organ_id
+        LEFT JOIN t_sys_organ tso ON t.organid = tso.id
         where 1=1 and t.status>0 
         <if test="organid != null and organid != 0">and t.organid = #{organid} </if>
         <if test="username != null">and t.username = #{username} </if>

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

@@ -308,6 +308,120 @@
 					AND t.end_time &lt;= #{end_date}
 				</if>
     </select>
-     
-     
+    
+    <sql id="select_Fswork_condition">
+    	AND t.user_id IS NOT NULL
+    	<if test="start_time!=null">
+   			AND t.start_time >= #{start_time}
+   		</if>
+   		<if test="end_time!=null">
+   			AND t.end_time &lt;= #{end_time}
+   		</if>
+   		<if test="dept_list!=null and dept_list.size()>0 ">
+    		AND	t.dept_id IN
+		    	<foreach item="obj"  collection="dept_list" open="("
+		            separator="," close=")">
+		            #{obj.id}  
+		         </foreach>
+	    </if>
+   		<if test="dept_id!=null">
+   			AND t.dept_id=#{dept_id}
+   		</if>
+   		<if test="user_id!=null">
+    		AND t.user_id =#{user_id}     		
+   		</if>
+    </sql>
+    
+    
+    <resultMap id="statisticsFsWork" type="com.xintong.visualinspection.bean.StatisticsFsWork">
+        <id property="user_id" column="user_id"/>
+        <collection property="subStatisticsFsWork" ofType="com.xintong.visualinspection.bean.StatisticsFsWork">
+            <result column="work_date" property="work_date"/>
+            <result property="dept_id" column="dept_id"/>
+            <result property="class_type" column="class_type"/>
+            <result property="check_id" column="check_id"/>
+            <result property="work_days" column="work_days" />
+            <result property="work_minutes" column="work_minutes"/>
+        </collection>
+    </resultMap>
+    
+    <select id="selectFsWork" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
+    	SELECT t.* , ct.id AS check_id  FROM sys_user_class t 
+    		LEFT JOIN check_task ct ON t.id = ct.user_class_id AND ct.check_status != 22
+    		WHERE 1=1
+    		<include refid="select_Fswork_condition" />
+    		ORDER BY t.work_date , t.user_id
+    </select>
+    
+    <select id="selectFsWorkGather" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultType="com.xintong.visualinspection.bean.StatisticsFsWork">
+    	SELECT COUNT(DISTINCT(work_date)) AS work_days , SUM( TIMESTAMPDIFF(MINUTE, t.start_time,t.end_time)) AS work_minutes , t.* 
+    	FROM sys_user_class t 
+    	WHERE 1=1 
+    	<include refid="select_Fswork_condition"/>
+    	GROUP BY t.user_id
+    </select>
+    
+    <select id="selectFsUnregularWork" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
+    	SELECT t.* , ct.id AS check_id  FROM sys_user_class_unregular t 
+    		LEFT JOIN check_task ct ON t.id = ct.user_class_unregular_id  AND ct.check_status != 22
+    		WHERE 1=1   
+    		<include refid="select_Fswork_condition" />
+    		ORDER BY t.work_date
+    </select>
+    
+    <select id="selectFsUnregularWorkGather" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultType="com.xintong.visualinspection.bean.StatisticsFsWork">
+    	SELECT COUNT(DISTINCT(work_date)) AS work_days , SUM( TIMESTAMPDIFF(MINUTE, t.start_time,t.end_time)) AS work_minutes , t.* 
+    	FROM sys_user_class_unregular t 
+    	WHERE 1=1 
+    	<include refid="select_Fswork_condition"/>
+    	GROUP BY t.user_id
+    </select>
+    
+    <select id="selectFsWorkGatherGroupByWorkType" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork" >
+    	SELECT COUNT(DISTINCT(work_date)) AS work_days , t.* 
+    	FROM sys_user_class t 
+    	WHERE 1=1 
+    	<include refid="select_Fswork_condition"/>
+    	GROUP BY t.user_id , t.class_type
+    </select>
+    
+    <select id="selectFsUnregularWorkGatherGroupByWorkType" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
+    	SELECT COUNT(DISTINCT(work_date)) AS work_days , t.* 
+    	FROM sys_user_class_unregular t 
+    	WHERE 1=1 
+    	<include refid="select_Fswork_condition"/>
+    	GROUP BY t.user_id , t.class_type
+    </select>
+	
+	<resultMap id="appealNum" type="com.xintong.visualinspection.bean.CheckAppealStatistic">
+        <id property="dept_id" column="dept_id"/>
+        <collection property="subCheckApealStatistic" ofType="com.xintong.visualinspection.bean.CheckAppealStatistic">
+            <result column="appeal_num" property="appeal_num"/>
+            <result property="appeal_result" column="appeal_result"/>
+        </collection>
+    </resultMap>
+	
+	<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 t.appeal_time >= #{start_time}
+	   		</if>
+	   		<if test="end_time!=null ">
+	   			AND t.appeal_time &lt;= #{end_time}
+	   		</if>
+	   		<if test="dept_list!=null and dept_list.size()>0 ">
+	    		AND	t.appeal_dept IN
+			    	<foreach item="obj"  collection="dept_list" open="("
+			            separator="," close=")">
+			            #{obj.id}  
+			         </foreach>
+		    </if>
+	   		<if test="dept_id!=null">
+	   			AND t.appeal_dept=#{dept_id}
+	   		</if>
+			GROUP BY t.appeal_dept , t.appeal_result
+			ORDER BY t.appeal_dept
+	</select>
+	
 </mapper>

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

@@ -6,9 +6,11 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.xintong.visualinspection.bean.CheckAppealStatistic;
 import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
+import com.xintong.visualinspection.bean.StatisticsFsWork;
 
 /**
  * 
@@ -69,4 +71,22 @@ public interface StatisticsService {
 	public List<StatisticsBean> getOneCheckedDetailInfo(StatisticsBean obj);
 	
 	public CheckmanStatisticsBean getCheckmanStatisticInfo(CheckmanStatisticsBean obj);
+	
+	// 出勤明细统计
+	public List<StatisticsFsWork> getFsWorkStatisticInfo(StatisticsFsWork obj);
+	
+	// 顶岗出勤明细统计
+	public List<StatisticsFsWork> getUnregularFsWorkStatisticInfo(StatisticsFsWork obj);
+	
+	// 正常在岗人数统计
+	public List<StatisticsFsWork> getFsWorkPerson(StatisticsFsWork obj);
+	
+	// 顶岗人数统计
+	public List<StatisticsFsWork> getFsWorkUnregularWorkPerson(StatisticsFsWork obj);
+	
+	// 申诉情况统计
+	public List<CheckAppealStatistic> getCheckAppealStatistic(CheckAppealStatistic obj); 
+	
+	// 收费站Excel申诉
+	public void getExcelAppealInfo(CheckAppealStatistic obj,String monthName,HttpServletRequest req,HttpServletResponse resp);
 }

+ 317 - 58
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -7,6 +7,7 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.lang.reflect.Method;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Comparator;
@@ -25,12 +26,14 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.xintong.visualinspection.bean.CheckAppealStatistic;
 import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
 import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.FeeStation;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
+import com.xintong.visualinspection.bean.StatisticsFsWork;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.dao.cluster.DepartmentDao;
 import com.xintong.visualinspection.dao.cluster.UserInfoDao;
@@ -69,16 +72,14 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 
 		Map<Long, StatisticsBo> statisticBoMap = new HashMap<Long, StatisticsBo>();
 
+		// 检索收费站的人员
 		Constant t =  CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
-		
 		String[] postions = t.getCode_name().split(",");
-		
 		User user = new User();
 		List<Integer> positionList = new ArrayList<Integer>();
 		for(int i =0 ;i<postions.length;i++){
 			positionList.add(Integer.parseInt(postions[i]));
 		}
-
 		user.setPosition_ids(positionList);
 
 		if (obj.getDept_id() != null)
@@ -105,6 +106,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 		}
 
+		
 		for (StatisticsBean statisticsBean : timesList) {
 			if (statisticBoMap.containsKey(statisticsBean.getUser_id())) {
 				StatisticsBo tmp = statisticBoMap.get(statisticsBean.getUser_id());
@@ -117,28 +119,38 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		lists.sort(new Comparator<StatisticsBo>() {
 			@Override
 			public int compare(StatisticsBo o1, StatisticsBo o2) {
-				if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
-					double a = o1.getCheck_all_score() / (o1.getChecked_num()+0.00);
-					double b = o2.getCheck_all_score()/(o2.getChecked_num()+0.00);
-					if (a > b ) {
-						return 1;
-					} else if (a < b) {
-						return -1;
-					} else {
-						return 0;
-					}	
-				}else{
-					if(o1.getChecked_num() == 0){
-						return -1 ;
-					}else if(o2.getChecked_num() ==0){
-						return 1;
-					}else{
-						return 0;
-					}
-				}
+				return o1.compareTo(o2);
 			}
 		});
+		// 道管Map
+		Map<String,Integer> center_ranking = new HashMap<>();
+		center_ranking.put("30",1);
+		center_ranking.put("31",1);
+		center_ranking.put("32",1);
+		
+		Map<String,Integer> fee_ranking= new HashMap<>();
+		// 这边需要对道管和收费站内的员工进行排名
+		List<FeeStation> list_feeStation = departmentDao.getAllFS();
+		for(FeeStation fee: list_feeStation){
+			fee_ranking.put(fee.getDeptid(), 1);
+		}
+		
+		for(int i=0;i<lists.size();i++){
+			// 累计道管排名
+			String centerId= lists.get(i).getUser().getParent_organid().toString();
+			lists.get(i).setCenter_ranking(center_ranking.get(centerId));
+			center_ranking.put(centerId,center_ranking.get(centerId) +1 );
 
+			// 累计收费站的排名
+			String feeStationId= lists.get(i).getUser().getOrganid().toString();
+			lists.get(i).setFee_station_ranking(fee_ranking.get(feeStationId));
+			fee_ranking.put(feeStationId, fee_ranking.get(feeStationId)+1);
+			
+			// 公司排名
+			lists.get(i).setCompany_ranking(i+1);
+			
+		}
+		
 		return lists;
 	}
 
@@ -403,6 +415,19 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		exportExcel("温馨服务检查情况统计表", "checked_item_info", list, resp);
 	}
 
+	
+	@Override
+	public void getExcelAppealInfo(CheckAppealStatistic obj,String monthName, HttpServletRequest req, HttpServletResponse resp) {
+		List<CheckAppealStatistic> list = getCheckAppealStatistic(obj);
+		for(Integer i=0;i<list.size();i++){
+			if(i==0){
+				list.get(0).setMonth_name(monthName);
+			}
+			list.get(i).setId(i+1);
+		}
+		exportExcel(monthName+"月份收费站申诉情况统计", "appeal_info", list, resp);
+	}
+
 	private void exportExcel(String fileName, String excelTemplateName, List<?> list, HttpServletResponse resp) {
 		String path = "./" + fileName + ".xls";
 		try (InputStream is = this.getClass().getResourceAsStream("/" + excelTemplateName + ".xls")) {
@@ -527,23 +552,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		scoreList.sort(new Comparator<StatisticsBean>() {
 			@Override
 			public int compare(StatisticsBean o1, StatisticsBean o2) {
-				if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
-					if (o1.getAll_check_score()/(o1.getChecked_num()+0.0) > o2.getAll_check_score()/(o2.getChecked_num()+0.0) ) {
-						return 1;
-					} else if (o1.getAll_check_score()/(o1.getChecked_num()+0.0) < o2.getAll_check_score()/(o2.getChecked_num()+0.0)) {
-						return -1;
-					} else {
-						return 0;
-					}
-				}else{
-					if(o1.getChecked_num() == 0){
-						return -1 ;
-					}else if(o2.getChecked_num() ==0){
-						return 1;
-					}else{
-						return 0;
-					}
-				}
+				return o1.compareTo(o2);
 			}
 		});
 		
@@ -574,6 +583,13 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 		}
 		
+		resultList.sort(new Comparator<StatisticsBean>() {
+			@Override
+			public int compare(StatisticsBean o1, StatisticsBean o2) {
+				return o1.compareTo(o2);
+			}
+		});
+		
 		return resultList;
 	}
 	
@@ -643,25 +659,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		centerManageList.sort(new Comparator<StatisticsBean>() {
 			@Override
 			public int compare(StatisticsBean o1, StatisticsBean o2) {
-				if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
-					double a = o1.getAll_check_score() / (o1.getChecked_num()+0.00) / o1.getPeople_num();
-					double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00) / o2.getPeople_num();
-					if (a > b ) {
-						return 1;
-					} else if (a < b) {
-						return -1;
-					} else {
-						return 0;
-					}	
-				}else{
-					if(o1.getChecked_num() == 0){
-						return -1 ;
-					}else if(o2.getChecked_num() ==0){
-						return 1;
-					}else{
-						return 0;
-					}
-				}
+				return o1.compareTo(o2);
 			}
 		});
 		
@@ -951,6 +949,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 				sta.setCheckman_name( CacheUtil.getUserFromMap(sta.getCheckman_id()+0L).getTruename()  ); 
 				sta.setChecked_name( CacheUtil.getUserFromMap(sta.getUser_id()+0L).getTruename());
 				sta.setFeeStationName( CacheUtil.getOrganFromMap(sta.getDept_id()).getOrganname() );
+				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+				SimpleDateFormat formatter2 = new SimpleDateFormat("- HH:mm");
+				sta.setCheck_task_time_name( formatter.format(sta.getStart_date())+formatter2.format(sta.getEnd_date()));
 			}
 		}else{
 			for(StatisticsBean sta : list){
@@ -962,9 +963,267 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		return list;
 	}
 
+	
 	@Override
 	public CheckmanStatisticsBean getCheckmanStatisticInfo(CheckmanStatisticsBean obj) {
 		return statisticsDao.selectCheckManInfo(obj);
 	}
+
+	// 根据调剂获取用户列表
+	private List<User> getUsers(User user){
+		// 检索收费站的人员
+		Constant t =  CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+		String[] postions = t.getCode_name().split(",");
+		List<Integer> positionList = new ArrayList<Integer>();
+		for(int i =0 ;i<postions.length;i++){
+			positionList.add(Integer.parseInt(postions[i]));
+		}
+		user.setPosition_ids(positionList);
+		return userInfoDao.getUsers(user);
+	}
+	
+	/**
+	 * 根据parant_organ_id 查询该下面的收费站列表
+	 * @param id organ_id
+	 * @return
+	 */
+	private List<Organ> getFsStationList(Integer id){
+		// 道管中心
+		Organ organ =new Organ();
+		organ.setParentid(id);
+		return  departmentDao.getOrgan(organ);
+	}
+	
+	@Override
+	public List<StatisticsFsWork> getFsWorkStatisticInfo(StatisticsFsWork obj) {
+
+		List<User> userList =new ArrayList<>();
+		if(obj.getUser_id()!=null){
+			userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
+		}else{
+			User user = new User();
+			if(obj.getDept_id()!=null){
+				user.setOrganid(obj.getDept_id().intValue());
+			}
+			if(obj.getParent_dept_id()!=null){
+				user.setParent_organid(obj.getParent_dept_id().intValue());
+				obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
+			}			
+			userList = getUsers(user);
+		}
+		
+		//
+		Map<Integer,StatisticsFsWork> map = new HashMap<>();
+		List<StatisticsFsWork> sFsList = statisticsDao.selectFsWork(obj);
+		for(int i=0;i<sFsList.size();i++){
+			map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
+		}
+		//
+		Map<Integer,StatisticsFsWork> mapSta = new HashMap<>();
+		List<StatisticsFsWork> sfswList = statisticsDao.selectFsWorkGather(obj);
+		for(int i=0;i<sfswList.size();i++){
+			mapSta.put(sfswList.get(i).getUser_id().intValue(), sfswList.get(i));
+		}
+		
+		for(User userObj:userList){
+			if(mapSta.containsKey(userObj.getId())){
+				StatisticsFsWork staobj = map.get(userObj.getId());
+				staobj.setFeeStationName(userObj.getFee_station_name());
+				staobj.setWorkno(userObj.getWorkno());
+				staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
+				staobj.setUserName(userObj.getTruename());
+				staobj.setWork_days( mapSta.get(userObj.getId()).getWork_days() );
+				staobj.setWork_minutes( mapSta.get(userObj.getId()).getWork_minutes() );
+			}
+		}
+		
+		return sFsList;
+	}
+
+	@Override
+	public List<StatisticsFsWork> getUnregularFsWorkStatisticInfo(StatisticsFsWork obj) {
+		List<User> userList =new ArrayList<>();
+		if(obj.getUser_id()!=null){
+			userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
+		}else{
+			User user = new User();
+			if(obj.getDept_id()!=null){
+				user.setOrganid(obj.getDept_id().intValue());
+			}
+			if(obj.getParent_dept_id()!=null){
+				user.setParent_organid(obj.getParent_dept_id().intValue());
+				obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
+			}			
+			userList = getUsers(user);
+		}
+		
+		//
+		Map<Integer,StatisticsFsWork> map = new HashMap<>();
+		List<StatisticsFsWork> sFsList = statisticsDao.selectFsUnregularWork(obj);
+		for(int i=0;i<sFsList.size();i++){
+			map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
+		}
+		//
+		Map<Integer,StatisticsFsWork> mapSta = new HashMap<>();
+		List<StatisticsFsWork> sfswList = statisticsDao.selectFsUnregularWorkGather(obj);
+		for(int i=0;i<sfswList.size();i++){
+			mapSta.put(sfswList.get(i).getUser_id().intValue(), sfswList.get(i));
+		}
+		for(User userObj:userList){
+			if(mapSta.containsKey(userObj.getId())){
+				StatisticsFsWork staobj = map.get(userObj.getId());
+				staobj.setFeeStationName(userObj.getFee_station_name());
+				staobj.setWorkno(userObj.getWorkno());
+				staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
+				staobj.setUserName(userObj.getTruename());
+				staobj.setWork_days( mapSta.get(userObj.getId()).getWork_days() );
+				staobj.setWork_minutes( mapSta.get(userObj.getId()).getWork_minutes() );
+			}
+		}
+		return sFsList;
+	}
+
+	@Override
+	public List<StatisticsFsWork> getFsWorkPerson(StatisticsFsWork obj) {
+		
+		List<User> userList =new ArrayList<>();
+		if(obj.getUser_id()!=null){
+			userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
+		}else{
+			User user = new User();
+			if(obj.getDept_id()!=null){
+				user.setOrganid(obj.getDept_id().intValue());
+			}
+			if(obj.getParent_dept_id()!=null){
+				user.setParent_organid(obj.getParent_dept_id().intValue());
+				obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
+			}			
+			userList = getUsers(user);
+		}
+		Map<Integer,StatisticsFsWork> map = new HashMap<>();
+		List<StatisticsFsWork> sFsList = statisticsDao.selectFsWorkGatherGroupByWorkType(obj);
+		for(int i=0;i<sFsList.size();i++){
+			map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
+		}
+		
+		for(User userObj:userList){
+			if(map.containsKey(userObj.getId())){
+				StatisticsFsWork staobj = map.get(userObj.getId());
+				staobj.setFeeStationName(userObj.getFee_station_name());
+				staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
+				staobj.setUserName(userObj.getTruename());
+			}
+		}
+		return sFsList;
+	}
+
+	@Override
+	public List<StatisticsFsWork> getFsWorkUnregularWorkPerson(StatisticsFsWork obj) {
+		List<User> userList =new ArrayList<>();
+		if(obj.getUser_id()!=null){
+			userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
+		}else{
+			User user = new User();
+			if(obj.getDept_id()!=null){
+				user.setOrganid(obj.getDept_id().intValue());
+			}
+			if(obj.getParent_dept_id()!=null){
+				user.setParent_organid(obj.getParent_dept_id().intValue());
+				obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
+			}			
+			userList = getUsers(user);
+		}
+		Map<Integer,StatisticsFsWork> map = new HashMap<>();
+		List<StatisticsFsWork> sFsList = statisticsDao.selectFsUnregularWorkGatherGroupByWorkType(obj);
+		for(int i=0;i<sFsList.size();i++){
+			map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
+		}
+		
+		for(User userObj:userList){
+			if(map.containsKey(userObj.getId())){
+				StatisticsFsWork staobj = map.get(userObj.getId());
+				staobj.setFeeStationName(userObj.getFee_station_name());
+				staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
+				staobj.setUserName(userObj.getTruename());
+			}
+		}
+		return sFsList;
+	}
+	
+	// 将list 转化为 HashMap
+	private <T> Map<Integer,T> getMapFromList(List<T> list,String fieldName ){
+		if(list!=null && list.size() >0){
+			try {
+				Map<Integer,T> map = new HashMap<>();
+				for(T obj : list){
+					Method m = obj.getClass().getMethod("get"+fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1));
+					Integer value = (Integer)m.invoke(obj);
+					map.put(value, obj);
+				}
+				return map;
+			} catch (Exception e) {
+				
+				e.printStackTrace();
+			}			
+		}
+		return null;
+	}
+	
+	@Override
+	public List<CheckAppealStatistic> getCheckAppealStatistic(CheckAppealStatistic obj) {
+		// 根据不同检索条件,分别检索去 公司、道管或者收费站 下的收费站列表
+		List<Organ> list ;
+		if(obj.getDept_id()!=null){
+			Organ organ =new Organ();
+			organ.setId(obj.getDept_id());
+			list = departmentDao.getOrgan(organ);
+		}else if(obj.getParent_dept_id()!=null){
+			list = getFsStationList(obj.getParent_dept_id());
+			obj.setDept_list(list);
+		}else{
+			list = new ArrayList<>();
+			List<FeeStation> lists = departmentDao.getAllFS();
+			for(FeeStation e : lists){
+				Organ organ = new Organ();
+				organ.setId(Integer.parseInt(e.getDeptid()));
+				organ.setOrganname(e.getName());
+				list.add(organ);
+			}
+		}
+
+		// 将检索的数据填充list中
+		List<CheckAppealStatistic> ObjList = statisticsDao.selectCheckAppealNum(obj);
+		Map<Integer,CheckAppealStatistic>  map = getMapFromList(ObjList,"dept_id");
+		
+		for(Organ organObj :list ){
+			if(map!=null && map.containsKey(organObj.getId())){
+				CheckAppealStatistic reObj = map.get(organObj.getId());
+				reObj.setFee_station_name(organObj.getOrganname());
+				Integer appeal_num = 0;
+				for(CheckAppealStatistic subObj:reObj.getSubCheckApealStatistic()){
+					appeal_num += subObj.getAppeal_num();
+					if(subObj.getAppeal_result() ==null){
+						reObj.setAppeal_other_num(subObj.getAppeal_num());
+					}else if(subObj.getAppeal_result()==1){
+						reObj.setAppeal_success_num(subObj.getAppeal_num());
+					}else{
+						reObj.setAppeal_fail_num(subObj.getAppeal_fail_num());
+					}
+				}
+				reObj.setAppeal_num(appeal_num);
+				reObj.setSubCheckApealStatistic(null);
+			}else{
+				CheckAppealStatistic reobj = new CheckAppealStatistic();
+				reobj.setFee_station_name(organObj.getOrganname());
+				reobj.setAppeal_num(0);
+				reobj.setAppeal_fail_num(0);
+				reobj.setAppeal_other_num(0);
+				reobj.setAppeal_result(0);
+				ObjList.add(reobj);
+			}
+		}
+		
+		return ObjList;
+	}
 	
 }

+ 23 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/util/DateUtil.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.util;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class DateUtil {
+	
+	/**
+	 * string date parse Date
+	 * @param strDate 
+	 * @return Date (Exception null)
+	 */
+	public static Date strParseDate(String strDate){
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
+		try {
+			return sdf.parse(strDate);
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+}

BIN
VisualInspection_server/src/main/resources/appeal_info.xls


+ 9 - 8
VisualInspection_server/src/main/resources/application.properties

@@ -3,8 +3,8 @@ spring.thymeleaf.cache=false
 context.listener.classes=com.xintong.SystemInit
 
 #master.datasource.url = jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf-8
-master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
-#master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
+#master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
 master.datasource.username = root
 master.datasource.password = root
 master.datasource.driver-class-name = com.mysql.jdbc.Driver
@@ -12,8 +12,8 @@ master.mapper-locations=classpath:com/xintong/visualinspection/mapper/master/*.x
 
 ## \u7528\u6237\u6570\u636e\u6e90\u914d\u7f6e
 #cluster.datasource.url=jdbc:mysql://10.112.0.199:3306/yanhai?useUnicode=true&characterEncoding=utf8
-cluster.datasource.url=jdbc:mysql://git.topm.win:6381/yanhai?useUnicode=true&characterEncoding=utf8
-#cluster.datasource.url=jdbc:mysql://10.112.0.199:7002/yanhai?useUnicode=true&characterEncoding=utf8
+#cluster.datasource.url=jdbc:mysql://git.topm.win:6381/yanhai?useUnicode=true&characterEncoding=utf8
+cluster.datasource.url=jdbc:mysql://10.112.0.199:7002/yanhai?useUnicode=true&characterEncoding=utf8
 cluster.datasource.username=root
 cluster.datasource.password=root
 cluster.datasource.driver-class-name = com.mysql.jdbc.Driver
@@ -54,12 +54,12 @@ spring.datasource.useGlobalDataSourceStat=true
 # Redis\u6570\u636e\u5e93\u7d22\u5f15\uff08\u9ed8\u8ba4\u4e3a0\uff09
 spring.redis.database=0  
 # Redis\u670d\u52a1\u5668\u5730\u5740
-#spring.redis.host=10.112.0.199
-spring.redis.host=git.topm.win
+spring.redis.host=10.112.0.199
+#spring.redis.host=git.topm.win
 # Redis\u670d\u52a1\u5668\u8fde\u63a5\u7aef\u53e3
-spring.redis.port=6380
+#spring.redis.port=6380
 
-#spring.redis.port=7003
+spring.redis.port=7003
 #spring.redis.port=6379 
 # Redis\u670d\u52a1\u5668\u8fde\u63a5\u5bc6\u7801\uff08\u9ed8\u8ba4\u4e3a\u7a7a\uff09
 spring.redis.password=xintong
@@ -78,6 +78,7 @@ spring.redis.timeout=0
 log.path=/var/log/visual/
 log.file=visual
 log.lever=info
+log.MaxHistory=20
 log.pattern=%-12(%d{yyyy-MM-dd HH:mm:ss.SSS}) |-%-5level [%thread] %c [%L] -| %msg%n
 #logging.level.root=INFO
 #logging.level.org.springframework.web=DEBUG

BIN
VisualInspection_server/src/main/resources/employee_order.xls