温红权 7 лет назад
Родитель
Сommit
6fc3f2e1c1
96 измененных файлов с 13967 добавлено и 0 удалено
  1. BIN
      .DS_Store
  2. 62 0
      VisualInspection/qzd/js/appeal_management/appeal_checked.js
  3. 242 0
      VisualInspection/qzd/js/appeal_management/appeal_list.js
  4. 60 0
      VisualInspection/qzd/js/appeal_management/appeal_submited.js
  5. 996 0
      VisualInspection/qzd/js/other_check/other_check.js
  6. 334 0
      VisualInspection/qzd/js/statistics/assess_type.js
  7. 122 0
      VisualInspection/qzd/js/statistics/dept_check_statistics.js
  8. 162 0
      VisualInspection/qzd/js/statistics/operation_management_integration.js
  9. 99 0
      VisualInspection/qzd/js/statistics/service_area_check_statistics.js
  10. 718 0
      VisualInspection/qzd/js/statistics/service_area_data_statistics.js
  11. 1285 0
      VisualInspection/qzd/js/statistics/total_company_statistics.js
  12. 407 0
      VisualInspection/qzd/js/task/add.js
  13. 193 0
      VisualInspection/qzd/js/task/apply_task.js
  14. 972 0
      VisualInspection/qzd/js/task/check.js
  15. 56 0
      VisualInspection/qzd/js/task/checked.js
  16. 229 0
      VisualInspection/qzd/js/task/task_list.js
  17. 78 0
      VisualInspection/qzd/view/appeal_management/appealDetail.html
  18. 23 0
      VisualInspection/qzd/view/appeal_management/appealEdit.html
  19. 73 0
      VisualInspection/qzd/view/appeal_management/appeal_checked.html
  20. 60 0
      VisualInspection/qzd/view/appeal_management/appeal_list.html
  21. 66 0
      VisualInspection/qzd/view/appeal_management/appeal_submited.html
  22. 90 0
      VisualInspection/qzd/view/main.html
  23. 174 0
      VisualInspection/qzd/view/other_check/onsite_check.html
  24. 178 0
      VisualInspection/qzd/view/other_check/third_unannounced_check.html
  25. 80 0
      VisualInspection/qzd/view/statistics/assess_type.html
  26. 97 0
      VisualInspection/qzd/view/statistics/dept_check_statistics.html
  27. 77 0
      VisualInspection/qzd/view/statistics/operation_management_integration.html
  28. 121 0
      VisualInspection/qzd/view/statistics/service_area_check_statistics.html
  29. 110 0
      VisualInspection/qzd/view/statistics/service_area_data_statistics.html
  30. 81 0
      VisualInspection/qzd/view/statistics/total_company_statistics.html
  31. 101 0
      VisualInspection/qzd/view/task/add.html
  32. 23 0
      VisualInspection/qzd/view/task/applyDetail.html
  33. 55 0
      VisualInspection/qzd/view/task/apply_task.html
  34. 230 0
      VisualInspection/qzd/view/task/check.html
  35. 65 0
      VisualInspection/qzd/view/task/checked.html
  36. 9 0
      VisualInspection/qzd/view/task/chooseCheckman.html
  37. 27 0
      VisualInspection/qzd/view/task/scoreDetail.html
  38. 558 0
      VisualInspection/qzd/view/task/taskDetail.html
  39. 64 0
      VisualInspection/qzd/view/task/task_list.html
  40. 25 0
      Visuallnspection_qzd/visuallnspection_qzd/.gitignore
  41. BIN
      Visuallnspection_qzd/visuallnspection_qzd/.mvn/wrapper/maven-wrapper.jar
  42. 1 0
      Visuallnspection_qzd/visuallnspection_qzd/.mvn/wrapper/maven-wrapper.properties
  43. 225 0
      Visuallnspection_qzd/visuallnspection_qzd/mvnw
  44. 143 0
      Visuallnspection_qzd/visuallnspection_qzd/mvnw.cmd
  45. 296 0
      Visuallnspection_qzd/visuallnspection_qzd/pom.xml
  46. 27 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/SystemInit.java
  47. 22 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/VisuallnspectionFjqApplication.java
  48. 23 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/bean/Log.java
  49. 180 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/controller/BaseController.java
  50. 105 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/controller/FileExcelController_Q.java
  51. 20 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/CheckAppealDao.java
  52. 22 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/CheckApplyDao.java
  53. 16 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqAreaDao.java
  54. 17 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqCheckDeptStatisticsDao.java
  55. 23 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqCheckOtherDao.java
  56. 40 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqStatisticsDao.java
  57. 22 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqTaskDao.java
  58. 15 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/LogDao.java
  59. 26 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/ScoreDao.java
  60. 19 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/druidTools/DruidStatFilter.java
  61. 23 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/druidTools/DruidStatViewServlet.java
  62. 79 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/druidTools/MasterDataSourceConfig.java
  63. 31 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/PageHelperConfiguration.java
  64. 16 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/AreaMapper.xml
  65. 83 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckAppealMapper.xml
  66. 91 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckApplylMapper.xml
  67. 75 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckDeptStatisticsMapper.xml
  68. 63 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckOtherMapper.xml
  69. 13 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/LogMapper.xml
  70. 114 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/ScoreMapper.xml
  71. 382 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/StatisticsMapper.xml
  72. 135 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/TaskMapper.xml
  73. 30 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/securityTools/CorsConfig.java
  74. 43 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/securityTools/ThreadConfig.java
  75. 71 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/securityTools/WebSecurityConfig.java
  76. 35 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/CheckOtherService_F.java
  77. 16 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/StatisticsService_F.java
  78. 27 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/AreaInfoServiceImpl.java
  79. 77 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckAppealServiceImpl.java
  80. 87 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckApplyServiceImpl.java
  81. 268 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckOtherServiceImpl.java
  82. 283 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckOtherService_FImpl.java
  83. 144 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/ScoreServiceImpl.java
  84. 1152 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsServiceImpl.java
  85. 644 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsService_FImpl.java
  86. 186 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/TaskServiceImpl.java
  87. 61 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/ThreadTaskServiceImpl.java
  88. 42 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/application.properties
  89. BIN
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_checked_item_info.xls
  90. BIN
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_dept_statistic.xls
  91. BIN
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_duty_check.xls
  92. BIN
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_operation_info.xls
  93. BIN
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_other_check_info_anfang.xls
  94. BIN
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_third_check.xls
  95. 36 0
      Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/logback.xml
  96. 16 0
      Visuallnspection_qzd/visuallnspection_qzd/src/test/java/com/xintong/visualinspection/visuallnspection_qzd/VisuallnspectionFjqApplicationTests.java

+ 62 - 0
VisualInspection/qzd/js/appeal_management/appeal_checked.js

@@ -0,0 +1,62 @@
+// var page_size=10;
+function queryCheckedAppealTask() {
+    var t = getTimeByMonth(GV("#start_time"));
+    var data = {
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
+        "checked_dept": $("#fsList").val(),
+        // "status_search_type":1,
+        "check_status_arr": [14, 15, 16],
+        "appeal_result": $("#appealResultSelect").val()
+    }
+    var hide = false;
+
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
+        hide = true;
+    }
+    var cols = [
+        { width: 30, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 100, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 80, text: '申诉部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
+        { width: 80, text: '复核人员', type: 'string', flex: true, hide: hide, field: 'recheckman_name' },
+        { width: 120, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
+        { width: 80, text: '申诉结果', type: 'string', flex: true, field: 'appeal_result_name' },
+        // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
+        {
+            width: 120,
+            text: '操作',
+            type: 'string',
+            flex: true,
+            field: 'id',
+            oper: [
+                { func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }
+            ]
+        }
+    ];
+
+    // var pager = {
+    //     page_size:10
+    // }
+    checkedAppealTableObj = $('#checked_datatable').mytable({
+        'cols': cols,
+        'url': "/f/checkAppeal/getTaskList/",
+        'param': data,
+        'pager': {
+            'p_cur': cur_page
+        }
+    });
+    //保存本次查询参数
+    $.zui.store.set('store_param_' + current_url, data);
+}
+
+function showTaskDetail(id) {
+    var rowData = getItemByIdFromArr(id, $('#checked_datatable').mytable('getTableData'));
+    $.checkTask = rowData;
+    post_common_service("/f/checkAppeal/getByTaskId", { "task_id": rowData.id }, function(data) {
+        $.checkTask = rowData;
+        $.checkTask.appeal = data;
+        changePage("/fwq/view/task/taskDetail.html", checkedAppealTableObj);
+    });
+    // changePage("/view/mytask/taskDetail.html",checkedAppealTableObj);
+}

+ 242 - 0
VisualInspection/qzd/js/appeal_management/appeal_list.js

@@ -0,0 +1,242 @@
+var cur_status;
+var cur_page;
+
+function initAppealPage() {
+    initQueryParams();
+    initTableRowBtn();
+    queryAppeal();
+}
+
+function initQueryParams() {
+    // 仅选择日期
+    $.jeDate("#start_time", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+
+    });
+    $("#start_time").val(getCurrentTimeFormat());
+    //去上次查询保留的参数
+    var store_params = $.zui.store.get('store_param_' + current_url);
+    var checked_dept = null;
+
+    if (store_params) {
+        checked_dept = store_params.checked_dept;
+        $("#start_time").val(moment(store_params.start_time).add(1, "month").format("YYYY/MM"));
+        cur_page = store_params.currentpage;
+    }
+
+    setSASelect("#fsList", checked_dept);
+
+    //获取页面参数
+    var page_params = $.zui.store.get("page_params");
+    if (page_params && page_params.status) {
+        cur_status = page_params.status;
+    }
+
+    if (cur_status == 14 || cur_status == 15 || cur_status == 16) {
+        $("#appealResultDiv").show();
+    }
+}
+//初始化表行按钮
+function initTableRowBtn() {
+    $.zui.store.set("task_table_btn_11", [{ func: 'seeCheckAudit', text: '处理', icon_class: 'icon-tasks' }]);
+    $.zui.store.set("task_table_btn_12", [{ func: 'showAppealCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_13", [{ func: 'showAppealCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_17", [{ func: 'showAppealContinueCheck', text: '继续稽查', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_14", [{ func: 'seeCheckAudit', text: '详情', icon_class: 'icon-tasks' },
+        { func: 'dispatchAppealTaskById', text: '下发', icon_class: 'icon-signin' }
+    ]);
+    // $.zui.store.set("task_table_btn_14",[{func:'showTaskDetail',text:'详情',icon_class:'icon-tasks'}]);
+    $.zui.store.set("task_table_btn_15", [{ func: 'seeCheckAudit', text: '详情', icon_class: 'icon-tasks' }]);
+    $.zui.store.set("task_table_btn_16", [{ func: 'seeCheckAudit', text: '详情', icon_class: 'icon-tasks' }]);
+}
+
+function initAppealList() {
+    queryTable();
+}
+
+function queryAppeal() {
+    var t = getTimeByMonth($("#start_time").val());
+
+    var data = {
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
+        "checked_dept": $("#fsList").val(),
+        "check_status": cur_status,
+        "appeal_result": $("#appealResultSelect").val()
+    }
+    var hide = false;
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
+        hide = true;
+    }
+
+    var appeal_result_hide = true;
+    if (cur_status == 14 || cur_status == 15 || cur_status == 16) {
+        appeal_result_hide = false;
+    }
+
+    var cols = [
+        { width: 30, text: '序号', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 100, text: '任务名称', flex: true, colClass: '', field: 'name' },
+        { width: 100, text: '申诉部门', flex: true, colClass: '', sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
+        { width: 80, text: '复核人员', type: 'string', flex: true, hide: hide, field: 'recheckman_name' },
+        { width: 120, text: '稽查时间段', type: 'string', flex: true, colClass: '', field: 'check_period' },
+        { width: 80, text: '申诉结果', type: 'string', flex: true, hide: appeal_result_hide, field: 'appeal_result_name' },
+        // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field:'check_status_name'},
+    ];
+    var colFunc = { width: 120, text: '操作', type: 'string', flex: true, field: 'id' };
+    colFunc.oper = $.zui.store.get("task_table_btn_" + cur_status);
+    cols.push(colFunc);
+    if (cur_status == 12 || cur_status == 13) {
+        data.check_status_arr = [12, 13];
+    }
+    appealTableObj = $('#appeal_list_table').mytable({
+        'cols': cols,
+        'url': "/f/checkAppeal/getTaskList",
+        'param': data,
+        'pager': {
+            'p_cur': cur_page
+        }
+    });
+    //保存本次查询参数
+    $.zui.store.set('store_param_' + current_url, data);
+}
+//查看稽查结果
+function seeCheckAudit(id, task_id) {
+    // alert("task_id:"+task_id+"---id:"+id)
+    // function showTaskDetail1(id){
+    var rowData = getItemByIdFromArr(id, $('#appeal_list_table').mytable('getTableData'));
+    post_common_service("/f/checkAppeal/getByTaskId", { "task_id": rowData.id }, function(data) {
+        if (!data) {
+            layer.msg('未获取到申诉内容!', {
+                time: 2000 //20s后自动关闭
+            });
+            return;
+        }
+        $.checkTask = rowData;
+        $.checkTask.appeal = data;
+        changePage("/fwq/view/task/taskDetail.html", appealTableObj);
+    });
+    // }
+}
+//再分配
+function distributionAgain(id, task_id) {
+    alert("task_id:" + task_id + "---id:" + id)
+}
+
+//详情
+function seeDetail(id, task_id) {
+    alert("task_id:" + task_id + "---id:" + id)
+}
+
+function queryUnAssignedTable() {
+    var data = {
+        "start_time": $("#start_time").val(),
+        "end_time": $("#end_time").val(),
+        "checked_dept": $("#dept_select").val(),
+    }
+    var hide = false;
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ)) {
+        hide = true;
+    }
+    var cols = [
+        // {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
+        // {width: 100, text: '任务名称', flex: false,colClass: '',field:'name'},
+        // {width: 80, text: '考核人员',  flex: false, colClass: '',field:'appeal_man_name'},
+        // {width: 100, text: '考核部门',  flex: false, colClass: '',sort: 'down',field:'appeal_dept_name'},
+        // {width: 80, text: '稽查人员', type: 'string', flex: false, hide:true,colClass: '',field:'verify_person_name'},
+        // {width: 120, text: '稽查时间段', type: 'string', flex: false, colClass: '',field:'start_time'},
+        // {width: 80, text: '状态', type: 'string', flex: false, colClass: '',field:'code_name'},
+        // {width: 120, text: '上次稽查时间', type: 'string', flex: false, colClass: '',field:'start_time'},
+        { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 160, text: '申诉部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
+        { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
+        { width: 80, text: '状态', type: 'string', flex: true, colClass: '', field: 'check_status_name' },
+        {
+            width: 100,
+            text: '操作',
+            flex: false,
+            colClass: '',
+            field: 'id',
+            field_other: 'task_id',
+            oper: [
+                { func: 'seeCheckAudit1', text: '查看稽查结果', col_class: '' }, { func: 'seeDetail', text: '详情', col_class: '' }
+            ]
+        },
+    ];
+
+    $('#appeal_list_table').mytable({
+        'cols': cols,
+        'url': "/f/checkAppeal/getList",
+        'param': data
+    });
+}
+//进入稽查页面
+function showAppealCheck(id) {
+    var rowData = getItemByIdFromArr(id, $('#appeal_list_table').mytable('getTableData'));
+    post_common_service("/f/checkAppeal/getByTaskId", { "task_id": rowData.id }, function(data) {
+        if (!data) {
+            layer.msg('未获取到申诉内容!', {
+                time: 2000 //20s后自动关闭
+            });
+            return;
+        }
+        $.checkTask = rowData;
+        $.checkTask.appeal = data;
+        // console.log(data);
+        // console.log("申诉:"+$.checkTask.appeal.id);
+        no_return_common_service('/f/task/update', { "id": id, "check_status": 13 })
+        changePage("/fwq/view/task/check.html", appealTableObj);
+    });
+}
+//进入继续稽查页面
+function showAppealContinueCheck(id) {
+    // $('#myModal').modal({name:"dd"});
+    var rowData = getItemByIdFromArr(id, $('#appeal_list_table').mytable('getTableData'));
+    post_common_service("/f/checkAppeal/getByTaskId", { "task_id": rowData.id }, function(data) {
+        if (!data) {
+            layer.msg('未获取到申诉内容!', {
+                time: 2000 //20s后自动关闭
+            });
+            return;
+        }
+        $.checkTask = rowData;
+        $.checkTask.appeal = data;
+        changePage("/fwq/view/mytask/check.html", appealTableObj);
+    });
+}
+
+//再分配
+function distributionAgain(id, task_id) {
+    alert("task_id:" + task_id + "---id:" + id)
+}
+
+//详情
+function seeDetail(id, task_id) {
+    alert("task_id:" + task_id + "---id:" + id)
+}
+
+//下发单条任务
+function dispatchAppealTaskById(id) {
+    layer.confirm('确定下发任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        var rowData = getItemByIdFromArr(id, $('#appeal_list_table').mytable('getTableData'));
+        var param = {
+            "id": rowData.id,
+            "check_status": 15
+        }
+        no_return_common_service('/f/task/dispatchById', param, function(data) {
+            queryAppeal();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
+
+}

+ 60 - 0
VisualInspection/qzd/js/appeal_management/appeal_submited.js

@@ -0,0 +1,60 @@
+// var page_size=10;
+function querySubmitedAppealTask() {
+    var t = getTimeByMonth($("#start_time").val());
+    var data = {
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
+        "checked_dept": $("#fsList").val(),
+        "status_search_type": 2,
+        "check_status": 11,
+        "check_status_end": 14
+    }
+    var hide = false;
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
+        hide = true;
+    }
+    var cols = [
+        { width: 30, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 100, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 80, text: '考核区域', type: 'string', flex: true, colClass: '', field: 'area_name' },
+        { width: 80, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
+        { width: 120, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
+        // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
+        {
+            width: 120,
+            text: '操作',
+            type: 'string',
+            flex: true,
+            field: 'id',
+            oper: [
+                { func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }
+            ]
+        }
+    ];
+
+    // var pager = {
+    //     page_size:10
+    // }
+    submitedAppealTableObj = $('#submited_datatable').mytable({
+        'cols': cols,
+        'url': "/f/checkAppeal/getTaskList/",
+        'param': data,
+        'pager': {
+            'p_cur': cur_page
+        }
+    });
+    //保存本次查询参数
+    $.zui.store.set('store_param_' + current_url, data);
+}
+
+function showTaskDetail(id) {
+    var rowData = getItemByIdFromArr(id, $('#submited_datatable').mytable('getTableData'));
+    $.checkTask = rowData;
+    post_common_service("/f/checkAppeal/getByTaskId", { "task_id": rowData.id }, function(data) {
+        $.checkTask = rowData;
+        $.checkTask.appeal = data;
+        console.log("申诉:" + $.checkTask.appeal.id);
+        changePage("/fwq/view/task/taskDetail.html", submitedAppealTableObj);
+    });
+}

+ 996 - 0
VisualInspection/qzd/js/other_check/other_check.js

@@ -0,0 +1,996 @@
+var file_src = "";
+var imgs_src = [];
+var idUpdate;
+var check_id;
+var check_type;
+var check_item_tree = null;
+var edittype = "add";
+var al_data = [];
+var isconfirmC = false;
+// 页面初始化
+function init() {
+    $(document).delegate("#editImage img", "mouseenter", function() {
+        var myself = $(this);
+        var xx = $("<i class='icon-remove' img_src='" + $(this).attr('img_src') + "'></i>");
+        xx.css({ "position": "absolute", "display": "" });
+        $(this).parent().append(xx);
+        $(".icon-remove").click(function() {
+            myself.hide();
+            imgs_src.push($(this).attr("img_src"));
+        });
+    })
+    $(document).delegate("#editImage div", "mouseleave", function() {
+            $(".icon-remove").hide();
+        })
+        // 初始化上传
+    refreshUploader();
+    setVisit();
+    $.jeDate("#month_date", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+    $.jeDate("#month_date2", {
+        isinitVal: true,
+        format: 'YYYY-MM-DD hh:mm',
+        zIndex: 300000000000 // 分隔符可以任意定义,该例子表示只显示年月日
+    });
+    $("#month_date").val(getCurrentTimeFormat());
+    var road_manager;
+    if (roleContains("STATION") || roleContains("WRECKER")) {
+        road_manager = getCurrentUser().road_manager_id;
+    }
+    if (roleContains("ROAD_MANAGER")) {
+        road_manager = getCurrentUser().organid;
+    }
+    // 设置道管
+    setRoadManagerSelect("#first", road_manager, true);
+    // 设置服务区
+    var checked_dept = null;
+    if (roleContains("SERVICEAREA")) {
+        checked_dept = getCurrentUser().organid;
+    }
+    setSASelect("#fsList", checked_dept);
+
+    // 新增服务区下拉框
+    var dept;
+    if (roleContains("STATION") || roleContains("WRECKER")) {
+        dept = getCurrentUser().organid;
+    }
+    var roadManager2;
+    if (roleContains("ROAD_MANAGER")) {
+        roadManager2 = getCurrentUser().organid;
+    }
+    var feeList = getOrganList(roadManager2);
+    setSASelectValueNoAll(feeList, "#select-dept", dept);
+    // setPersonal();// 2期不需要人员显示
+    var zTreeObj;
+    var zNodes = [];
+    check_item_tree = $.fn.zTree.init($("#check_rule_tree2"), {}, zNodes);
+
+    getOtherCheckItems();
+
+    $("#check_item_select input").on("click", function() {
+        //debugger;
+        var nodedata;
+        if ($("#check_item_select input") != undefined && $("#check_item_select input") != "") {
+            nodedata = check_item_tree.getNodeByParam("name", $("#check_item_select input").val(), null);
+        }
+        $("#add_btn").data("tree_flag", 1);
+        loadData(nodedata);
+        $("#add_btn").data("tree_flag", 0);
+    })
+
+    setCheckTypeSelect('#speacial_type_select', '', 'special_check_type', true);
+    queryTable();
+    setCheckTypeSelect('#select-check-type', '', 'wrecker_group_check_type');
+    setCheckTypeSelect('#select-special-check-type', '', 'special_check_type');
+}
+
+//关闭弹窗
+$("#close-layer").click(function() {
+        layer.closeAll();
+    })
+    //条件查询
+$("#conditional_query").click(function() {
+        queryTable();
+    })
+    //保存修改或添加
+$("#save-check").click(function() {
+        var dept_id = $("#select-dept").val();
+        // var user_id = $("#select-personal").val();
+        var check_item_id = dept_selectinput != null ? dept_selectinput.value : null;
+        var remark = $("#remark").val();
+        var check_score = $("#check_score").val();
+        var check_time = $("#month_date2").val();
+        var check_num = $("#check_num").val();
+        var wrecker_check_type = $("#select-check-type").val();
+        var special_check_type = $("#select-special-check-type").val();
+        if (idUpdate) {
+            if ($("#editImage").attr("file_src") != '') {
+                var src = $("#editImage").attr("file_src").split(",");
+                var flag = 1;
+                for (var i = 0; i < src.length; i++) {
+                    for (var j = 0; j < imgs_src.length; j++) {
+                        if (src[i] == imgs_src[j]) {
+                            flag = 0;
+                            break;
+                        }
+                    }
+                    if (flag == 1) {
+                        file_src += src[i] + ",";
+                    }
+                }
+            }
+        }
+        var file_ids = (file_src.substring(file_src.length - 1) == ',') ? file_src.substring(0, file_src.length - 1) : file_src;
+
+        // var check_time_name = timeStamp2String(new Date(),"yyyy/MM");
+        var check_time_name = timeStamp2String(new Date((check_time + ":00").replace("-g-/", "")), "yyyy/MM");
+        var timeday = moment(check_time);
+        var timec = moment(timeday.get("year") + "-" + (timeday.get('month') + 1) + "-26 00:00:00");
+
+
+        if (timeday.valueOf() > timec.valueOf()) {
+            var year = timeday.get("year");
+            var month = timeday.get('month') + 2;
+
+            if (month > 12) {
+                year += 1;
+                month -= 12;
+            }
+            check_time_name = year + "/" + (month > 9 ? month : ("0" + month));
+        } else {
+            var year = timeday.get("year");
+            var month = timeday.get('month') + 1;
+
+            if (month > 12) {
+                year += 1;
+                month -= 12;
+            }
+            check_time_name = year + "/" + (month > 9 ? month : ("0" + month));
+        }
+
+
+        if (dept_id == null || dept_id == undefined || dept_id == "") {
+            layer.msg('请选择服务区');
+            return;
+        } else if (check_item_id == null || check_item_id == undefined || check_item_id == "") {
+            layer.msg('请选择扣分类别');
+            return;
+        } else if (check_score == null || check_score == undefined || check_score == "") {
+            layer.msg('请选择扣分值');
+            return;
+        }
+        data = {
+            "id": check_id,
+            "dept_id": dept_id,
+            // "user_id": user_id,
+            "check_item_id": check_item_id,
+            "check_type": check_type,
+            "remark": remark,
+            "check_score": check_score,
+            "file_ids": file_ids,
+            "check_time": check_time,
+            "check_time_name": check_time_name,
+            "check_num": check_num,
+            "wrecker_check_type": wrecker_check_type,
+            "special_check_type": special_check_type
+        }
+        console.log(data);
+        if (idUpdate) {
+            post_common_service("f/checkOther/update", data, function(data) {
+                file_src = "";
+                imgs_src = [];
+                layer.closeAll();
+                queryTable();
+            }, function() {
+
+            });
+        } else {
+            post_common_service("f/checkOther/add", data, function(data) {
+                file_src = "";
+                imgs_src = [];
+                layer.closeAll();
+                queryTable();
+            }, function() {
+
+            });
+        }
+    })
+    //添加稽查记录
+$("#add_btn").click(function() {
+    idUpdate = false;
+    edittype = "add";
+    check_id = null;
+    $("#select-dept").val("");
+    // $("#select-personal").val("");
+    $(".treeSelect-input").val("");
+    $("#remark").val("");
+    $("#check_score").val("");
+    $("#month_date2").val(timeStamp2String(new Date(), "yyyy-MM-dd HH:mm"));
+    $("#check_num").val(1);
+    $("#editImage").empty();
+    layerUpdateTeam('form-div', '稽查记录新增', '550px');
+    $("#save-check").html("保存");
+
+    // if (check_type == 2) {
+    //     //特情稽查处理
+    //     $("#confirmC").prop('checked', false);
+    //     isconfirmC = false;
+    // }
+
+    //debugger;
+    var nodedata;
+    $("#add_btn").data("tree_flag", 1);
+    loadData(nodedata);
+    $("#add_btn").data("tree_flag", 0);
+
+
+    $("#check_item_select input").on("click", function() {
+        //debugger;
+        // var nodedata;
+        // $("#add_btn").data("tree_flag",1);
+        // loadData(nodedata);
+        // $("#add_btn").data("tree_flag",0);
+    })
+})
+
+function confirmCfun() {
+    isconfirmC = $("#confirmC").prop("checked");
+}
+
+function queryTable() {
+    $(".datatable").empty();
+    var data = {
+        "check_time_name": $("#month_date").val(),
+        "dept_id": $("#fsList").val(),
+        "check_type": check_type,
+        "special_check_type": $("#speacial_type_select").val()
+    }
+    var hide = true;
+    // if (check_type == 5) {
+    //     hide = false;
+    // }
+    operation = true;
+    var hide1 = true;
+    // if (check_type == 2) {
+    //     hide1 = false;
+    // }
+
+    // if (check_type == 4) {
+    //     data["scoretype"] = $("#scoretype").val();
+    // }
+
+    var cols = [
+        { width: 20, text: '序号', flex: false, colClass: 'text-center', field: 'num' },
+        { width: 70, text: '时间', flex: false, colClass: '', field: 'check_time' },
+        { width: 50, text: '部门', flex: false, colClass: '', field: 'organ_name' },
+        // {
+        //     width: 30,
+        //     text: '人员',
+        //     flex: false,
+        //     colClass: '',
+        //     field: 'username',
+        //     func: function(obj) {
+        //         if (obj == null || obj == undefined) {
+        //             return "站部";
+        //         }
+        //         return obj;
+        //     }
+        // },// 2期以服务区维度
+        { width: 50, text: '扣分类型', flex: false, colClass: '', field: 'pcheckname' },
+        { width: 50, text: '扣分项', flex: false, colClass: '', field: 'check_item_name' },
+        { width: 30, text: '扣分值', flex: false, colClass: '', field: 'check_score' },
+        { width: 120, text: '扣分描述', flex: false, colClass: '', field: 'remark' },
+        { width: 30, text: '检查类型', flex: false, hide: hide, field: 'wrecker_check_type_name' },
+        { width: 50, text: '稽查类型', flex: false, hide: hide1, field: 'special_check_type_name' },
+        { width: 70, text: '附件', type: 'imagedd', flex: false, colClass: '', field: 'file_ids' }
+    ];
+    if (roleContains("JICHA") || hasRole("ROLE_ADMIN")) {
+        cols.push({
+            width: 60,
+            text: '操作',
+            flex: false,
+            field: 'id',
+            oper: [
+                { func: 'updateCheckTeam', text: '修改', icon_class: 'icon-edit' }, { func: 'deleteCheckTeam', text: '删除', icon_class: 'icon-remove-circle' }
+            ]
+        });
+    }
+    $('.datatable').mytable({
+        'cols': cols,
+        'url': "f/checkOther/getAllCheckOther",
+        'param': data
+    });
+}
+
+function deleteCheckTeam(id) {
+    deleteItem4Common(id, "f/checkOther/delete", queryTable);
+}
+
+function updateCheckTeam(id) {
+    check_id = id;
+    data = {
+        "id": id
+    }
+    post_common_service("f/checkOther/getCheckById", data, function(data) {
+        var select_road = $(".div-roadManage select").val();
+        var feeList = getOrganList(select_road);
+        setSASelectValueNoAll(feeList, "#select-dept", data.dept_id);
+        // setPersonal(data.user_id);
+        // $("#select-dept").val(data.dept_id);
+        // $("#select-personal").val(data.user_id);
+        $("#check_item_select input").val(data.check_item_name);
+        $("#remark").val(data.remark);
+        $("#check_score").val(data.check_score);
+        var time = data.check_time;
+        $("#month_date2").val(data.check_time);
+        $("#check_num").val(data.check_num);
+        setCheckTypeSelect('#select-check-type', data.wrecker_check_type, "wrecker_group_check_type");
+        setCheckTypeSelect('#select-special-check-type', data.special_check_type, 'special_check_type');
+        $("#editImage").empty();
+        if (data.file_ids != null && data.file_ids != "") {
+            var ids = data.file_ids.split(",");
+            var str = "";
+            for (i = 0; i < ids.length; i++) {
+                str += ids[i] + ",";
+                $("#editImage").append("<div style='float:left;width:60px;'><img  img_src='" + ids[i] + "' class='pic-class  img-thumbnail' style='width:50px;height:50px;' alt='' src='http://file_release_yanhai.jsxt.jsjtyxt.com/" + ids[i] + "' ></div>");
+            }
+            $("#editImage").attr("file_src", (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str);
+        }
+
+        idUpdate = true;
+        edittype = "edit";
+        layerUpdateTeam('form-div', '稽查记录修改', '550px');
+        $("#save-check").html("修改");
+
+        var nodedata;
+        if ($("#check_item_select input") != undefined && $("#check_item_select input") != "") {
+            nodedata = check_item_tree.getNodeByParam("name", $("#check_item_select input").val(), null);
+        }
+        loadData(nodedata);
+
+
+        $("#check_item_select input").on("click", function() {
+            //debugger;
+            // var nodedata;
+            // if($("#check_item_select input") != undefined && $("#check_item_select input") != ""){
+            //     nodedata = check_item_tree.getNodeByParam("name",$("#check_item_select input").val(), null);
+            // }
+            // $("#add_btn").data("tree_flag",1);
+            // loadData(nodedata);
+            // $("#add_btn").data("tree_flag",0);
+        })
+    }, function() {
+
+    });
+
+}
+
+function refreshUploader() {
+    // 文件上传
+    $('#uploaderExample').uploader({
+        autoUpload: true, // 当选择文件后立即自动进行上传操作
+        unique_names: true, // 生成唯一名称
+        url: base_image_server_url + 'fileServer/file/upload', // 文件上传提交地址
+        filters: {
+            mime_types: [
+                { title: '图片', extensions: 'jpg,gif,png' },
+                { title: '图标', extensions: 'ico' },
+                { title: '视频', extensions: 'mp4,avi' },
+                { title: '文档', extensions: 'doc,docx' }
+            ],
+            // 不允许上传重复文件
+            prevent_duplicates: true
+        },
+        fileTemplate: '<div class="file"><div class="file-progress-bar"></div><div class="file-wrapper"><div class="file-icon"><i class="icon icon-file-o"></i></div><div class="content"></div><div class="actions"><div class="file-status" data-toggle="tooltip"><i class="icon"></i> <span class="text"></span></div><a data-toggle="tooltip" class="btn btn-link btn-download-file" target="_blank"><i class="icon icon-download-alt"></i></a><button type="button" data-toggle="tooltip" class="btn btn-link btn-reset-file" title="Repeat"><i class="icon icon-repeat"></i></button><button type="button" data-toggle="tooltip" class="btn btn-link btn-rename-file" title="Rename"><i class="icon icon-pencil"></i></button><button type="button" data-toggle="tooltip" title="Remove" class="btn btn-link btn-delete-file"><i class="icon icon-trash text-danger"></i></button></div></div></div>', // 设置模板
+        onFileUploaded: function(file, responseObject) {
+            var datas = eval('(' + responseObject.response + ')');
+            file_src += datas.result_data.path + ",";
+            //$(".file").append("<div style='float:left;width:60px;'><img  img_src='"+datas.result_data.path+"' class='pic-class  img-thumbnail' style='width:50px;height:50px;' alt='' src='http://file_release_yanhai.jsxt.jsjtyxt.com/"+datas.result_data.path+"' ></div>");
+        },
+        onInit: function() {
+            $("#file-list").empty();
+        },
+        onFilesRemoved: function(files) {
+            // alert(files);
+        }
+    });
+}
+
+function setVisit() {
+    if (roleContains("STATION") || roleContains("WRECKER")) {
+        $("#first").attr("disabled", "disabled");
+        $("#second").attr("disabled", "disabled");
+    }
+    if (roleContains("ROAD_MANAGER")) {
+        $("#first").attr("disabled", "disabled");
+    }
+
+    if (!(roleContains("JICHA") || hasRole("ROLE_ADMIN"))) {
+        $("#add_btn").hide();
+        // $("#second").hide();
+    }
+}
+/**
+ * 根据道管中心获取服务区列表(下拉框)
+ */
+$(".div-roadManage select").change(function() {
+    setSASelect("#fsList", null);
+    flag = true;
+});
+
+function getOrganList(select_road) {
+    var organList;
+    if (select_road) {
+        // if (check_type == 5) {
+        //     organList = cache_road_manager_wrecker_group_map.get(select_road);
+        // } else {
+            organList = cache_service_area_map.get(select_road);
+        // }
+    } else {
+        // if (check_type == 5) {
+        //     organList = $.zui.store.get("cache_wrecker_group_list");
+        // } else {
+            organList = $.zui.store.get("cache_service_area_list");
+        // }
+    }
+    return organList;
+}
+
+// function setSecond() {
+//     var select_road = $(".div-roadManage select").val();
+//     var feeList = getOrganList(select_road);
+//     var dept;
+//     if (roleContains("STATION") || roleContains("WRECKER")) {
+//         dept = getCurrentUser().organid;
+//     }
+//     refreshFee(feeList, dept);
+// }
+
+function setscoretype() {
+    var sec = document.getElementById('scoretype');
+    var tempStr = '<option value="all" selected>全部</option>'
+    if (all_data.length > 0) {
+        if (all_data[0].children.length > 0) {
+            all_data[0].children.forEach(child => {
+                tempStr += "<option value=" + child.name + " >" + child.name + "</option>";
+            });
+            sec.innerHTML = tempStr;
+        } else {
+            sec.innerHTML = '';
+        }
+    } else {
+        sec.innerHTML = '';
+    }
+}
+
+
+function refreshFee(data, selectId) {
+    var sec = document.getElementById('second');
+    var tempStr = '<option value="">全部</option>'
+    if (data.length != 0) {
+        for (var i = 0; i < data.length; i++) {
+            if (data[i].deptid == selectId)
+                tempStr += "<option value=" + data[i].deptid + " selected>" + data[i].name + "</option>";
+            else
+                tempStr += "<option value=" + data[i].deptid + ">" + data[i].name + "</option>";
+            // }
+            sec.innerHTML = tempStr;
+        }
+
+    } else {
+        sec.innerHTML = '';
+    }
+}
+
+// /**
+//  * 部门人员下拉框
+//  */
+// function setPersonal(selectUserId) {
+//     var select_road = $("#select-dept").val();
+//     var sec = document.getElementById('select-personal');
+//     var tempStr = ''
+//     var param = {
+//         "organid": select_road
+//     }
+//     var url = "user/getFsUserList";
+//     if (check_type == 5) {
+//         url = "user/getWGUserList";
+//     }
+//     post_common_service(url, param, function(data) {
+//         console.log(data);
+//         if (data.length != 0) {
+//             var userId;
+//             if (hasRole("ROLE_STATION")) {
+//                 userId = getCurrentUser().id;
+//             } else {
+//                 userId = selectUserId;
+//             }
+//             // console.log(data);
+//             if (check_type != 2) {
+//                 tempStr += "<option value=0>收费站</option>";
+//             }
+//             for (var i = 0; i < data.length; i++) {
+//                 // for (var j = 33; j <= 53; j++) {
+//                 // if (select_road == j) {
+//                 var workno = data[i].workno;
+//                 if (workno) workno = workno.substring(workno.length - 3);
+//                 if (data[i].id == userId) {
+//                     tempStr += "<option value='" + data[i].id + "' selected='selected' > " + workno + data[i].truename + "</option>";
+//                 } else {
+//                     tempStr += "<option value='" + data[i].id + "'" + (i == 0 ? " selected='selected'" : "") + "”>" + workno + data[i].truename + "</option>";
+//                 }
+//                 // }
+//                 // }
+
+
+//                 sec.innerHTML = tempStr;
+//             }
+
+//             sec.innerHTML = tempStr;
+//         } else {
+//             sec.innerHTML = '';
+//         }
+//     }, function(error) {
+//         return "";
+//     });
+// }
+// 部门改变后 重新生成人员下拉框
+// $("#select-dept").change(function() {
+//     if (check_type == 2) {
+//         if (isconfirmC) return;
+//     }
+//     setPersonal();
+// });
+
+$("#check_item_select").delegate("div[id*='treeSelect_panel_'] ", "blur", function() {
+    // alert(1)
+    if ($(this).is(":hidden")) {
+        if (map[dept_selectinput.value] != null) {
+            $("#check_score").val(map[dept_selectinput.value]);
+        } else {
+            $("#check_score").val("");
+        }
+    }
+})
+
+function layerUpdateTeam(domId, title, area) {
+    var uploader = $('#uploaderExample').data('zui.uploader');
+    uploader.destroy();
+    refreshUploader();
+    $(".file-list").empty();
+    file_src = "";
+    imgs_src = [];
+    layer.open({
+        type: 1,
+        title: false,
+        closeBtn: 1,
+        title: title,
+        shadeClose: true,
+        skin: 'yourclass',
+        area: area,
+        content: $("#" + domId)
+    });
+}
+
+// 增加和编辑框
+var dept_selectinput;
+
+function loadData(nodedata) {
+    var pnode = nodedata;
+    if (pnode != null) {
+        dept_selectinput = new TreeSelect({
+            element: '#check_item_select',
+            data: all_data,
+            valueKey: "id",
+            placeholder: "请选择扣分类别",
+            selectvalue: pnode.id
+        });
+    } else {
+        if ($("#add_btn").data("tree_flag") == 1) {
+            dept_selectinput = new TreeSelect({
+                element: '#check_item_select',
+                data: all_data,
+                valueKey: "id",
+                placeholder: "请选择扣分类别"
+            });
+        } else {
+
+        }
+    }
+}
+
+function getOtherCheckItems() {
+    function zTreeOnRename(event, treeId, treeNode, isCancel) {
+        alert(treeNode.tId + ", " + treeNode.name);
+    }
+
+    function zTreeOnRemove(event, treeId, treeNode) {
+        alert(treeNode.tId + ", " + treeNode.name);
+    }
+
+
+    function getTreeData(c_obj, id) {
+        if (c_obj.id == id) {
+            return c_obj;
+        } else {
+            if (c_obj.subCheckItem != null) {
+                for (var i = 0; i < c_obj.subCheckItem.length; i++) {
+                    var tmp = getTreeData(c_obj.subCheckItem[i], id);
+                    if (tmp != null) {
+                        return tmp;
+                    }
+                }
+            }
+            return null;
+        }
+    }
+
+    var seq = 0;
+
+    function getTree(obj, rowObj) {
+        var userdata = {};
+        userdata["checked"] = false;
+        if (obj.score != null) {
+            userdata["data"] = [++seq, obj.name, (obj.score != null ? obj.score : ""), '<a href="javascript:void(0)" onclick="modify_check_item(' + obj.id + ')"  ><i class="icon icon-edit"></i> 修改</a><a href="javascript:void(0)" onclick="delete_check_item(' + obj.id + ')" ><i class="icon icon-remove-circle"></i> 删除</a>'];
+            rowObj.push(userdata);
+        }
+
+        if (obj.subCheckItem != null) {
+            for (var i = 0; i < obj.subCheckItem.length; i++) {
+                getTree(obj.subCheckItem[i], rowObj);
+            }
+        }
+        return rowObj;
+    }
+
+    function zTreeOnClick(event, treeId, treeNode) {
+        var rowdata = [];
+
+        seq = 0;
+
+        for (var i = 0; i < z_cache.length; i++) {
+            var treeObj = getTreeData(z_cache[i], treeNode.id);
+            if (treeObj != null) {
+                rowdata = getTree(treeObj, rowdata);
+                break;
+            }
+        }
+
+        // 使用data参数更新数据:
+        $('.datatable').datatable('load', {
+            cols: cols,
+            rows: rowdata
+        });
+    };
+
+    var setting = {
+        data: {
+            simpleData: {
+                enable: true,
+                idKey: "id",
+                pIdKey: "pId",
+                rootPId: null
+            }
+        },
+        view: { //表示tree的显示状态
+            selectMulti: false //表示禁止多选
+        },
+        check: { //表示tree的节点在点击时的相关设置
+            enable: false, //是否显示radio/checkbox
+            chkStyle: "checkbox", //值为checkbox或者radio表示
+            checkboxType: { p: "", s: "" }, //表示父子节点的联动效果
+            radioType: "level" //设置tree的分组
+        },
+        callback: {
+            onRename: zTreeOnRename,
+            //  beforeDrop: zTreeBeforeDrop,
+            onRemove: zTreeOnRemove,
+            onClick: zTreeOnClick
+        },
+        edit: {
+            enable: true,
+            drag: {
+                autoExpandTrigger: true,
+                isMove: true,
+                prev: false,
+                next: true,
+                inner: true,
+                autoOpenTime: 0
+            },
+            showRenameBtn: false,
+            showRemoveBtn: false
+        }
+    };
+
+    var param = {};
+    // rule_type=8,服务区暗访考核办法.rule_type=9,服务区现场考核办法
+    // check_type=8,服务区第三方暗访,check_type=9,服务区现场稽查
+    if (check_type == 8) {
+        param.rule_type = 8;
+    } else if (check_type == 9) {
+        param.rule_type = 9;
+    }
+    post_common_service('checkRule/getItemListByRuleType', param, function(data) {
+        all_data = [];
+        z_cache = data;
+        if (data) {
+            for (var i = 0; i < data.length; i++) {
+                var m = data[i];
+                var zdataItem = {};
+                zdataItem["id"] = m.id;
+                zdataItem["value"] = m.id;
+                zdataItem["pId"] = null;
+                zdataItem["score"] = m.score;
+                zdataItem["name"] = m.name;
+                zdataItem["open"] = true;
+                zdataItem["children"] = addobj(m);
+                zdataItem.open = true;
+                all_data.push(zdataItem);
+            }
+            check_item_tree = $.fn.zTree.init($("#check_rule_tree2"), setting, all_data)
+
+            // if (check_type == 4) {
+            //     setscoretype();
+            // }
+        }
+    }, function(error) {})
+}
+
+function addobj(data) {
+    var zdata = [];
+    if (typeof(data.subCheckItem) != "undefinde" && data.subCheckItem != null &&
+        data.subCheckItem.length > 0) {
+        for (var i = 0; i < data.subCheckItem.length; i++) {
+            var m = data.subCheckItem[i];
+            var zdataItem = {};
+            //   if(m.score != null){
+            //      continue;
+            //   }
+            zdataItem["id"] = m.id;
+            zdataItem["value"] = m.id;
+            zdataItem["pId"] = data.id;
+            zdataItem["score"] = m.score;
+            zdataItem["icon"] = "";
+            zdataItem["name"] = m.name;
+            zdataItem["children"] = addobj(m);
+            zdataItem.open = false;
+            zdata.push(zdataItem);
+            map[m.id] = m.score;
+        }
+        return zdata;
+    } else {
+        return [];
+    }
+}
+
+var map = {};
+
+function setCheckTypeSelect(div, selectId, codeFlag, hasAll) {
+    post_common_service("/constant/getConstantByFlag", { code_flag: codeFlag }, function(data) {
+        var optStr = '';
+        if (hasAll) optStr = '<option value="">全部</option>';
+        for (var i in data) {
+            if (data[i].code_value == selectId)
+                optStr += '<option value="' + data[i].code_value + '" selected="selected">' + data[i].code_name + '</option>';
+            else
+                optStr += '<option value="' + data[i].code_value + '">' + data[i].code_name + '</option>';
+        }
+        $(div).html('');
+        $(div).html(optStr);
+    });
+}
+
+
+
+
+function static() {
+
+    var type = $("#speacial_type_select").val();
+
+    if (check_type == 8 || check_type == 9) {
+        var p = {
+            "check_type": check_type,
+            "check_period": $("#month_date").val(),
+            "special_check_type": type
+        };
+
+
+        post_common_service("f/checkOther/getOtherCheckStatistics", p, function(data) {
+
+            var names = new Array();
+            var totalnamesvalue = new HashMap();
+            var itemsname = "";
+            var datas = '';
+            var t8 = 0;
+            var title = "";
+            if (check_type == 8) title = "服务区第三方暗访情况";
+            if (check_type == 9) title = "服务区现场检查情况";
+            // if (check_type == 4) title = "数据平台应用情况";
+            // if (check_type == 2 && type == "1") title = "公司特情稽查情况";
+            // if (check_type == 2 && type == "2") title = "联网特情稽查情况";
+            for (var key in data) {
+                for (var i in data[key]) {
+                    itemsname = "";
+                    var itemvalue = "";
+                    names = new Array();
+                    for (var name in data[key][i].scoremap) {
+                        names.push(name);
+                        itemsname += '<td style="width:78px">' + name + '</td>';
+                        itemvalue += '<td>' + data[key][i].scoremap[name] + '</td>';
+
+                        var v = totalnamesvalue.get(name);
+                        if (v == null || v == undefined) v = 0;
+                        v += data[key][i].scoremap[name];
+                        totalnamesvalue.set(name, v);
+                    }
+
+
+                    datas += '<tr>';
+                    if (i == 0) {
+                        datas += '<td rowspan=' + data[key].length + '>' + key + "</td>";
+                    }
+                    datas += '<td>' + data[key][i].deptname + "</td>";
+                    datas += itemvalue;
+                    datas += '<td>' + data[key][i].totalScore + '</td>';
+                    datas += '<td>' + data[key][i].level + '</td>';
+                    datas += '</tr>';
+
+                    t8 += data[key][i].totalScore;
+                }
+            }
+
+            datas += '<tr><td colspan=2>合计</td>';
+            for (var i in names) {
+                datas += '<td>' + totalnamesvalue.get(names[i]) + '</td>';
+            }
+            datas += '<td>' + t8 + '</td><td> - </td></tr>';
+
+            var html = ' <table class="statable">' +
+                '            <thead style="font-size:  20px;text-align:  center;border:  0px;">' +
+                '                <tr>' +
+                '                    <td colspan="13" style="padding:  10px;border:  0px;">' + $("#month_date").val().replace("/", "-") + '月份' + title + '</td>' +
+                '                </tr>' +
+                '            </thead>' +
+                '            <tbody>' +
+                '                <tr>' +
+                '                    <td style="width:40px">道管</td>' +
+                '                    <td style="width:78px">服务区</td>' +
+                itemsname +
+                '                    <td>得分<br>(1000)</td>' +
+                '                    <td>服务<br>评价</td>' +
+                '                </tr>' +
+                datas +
+                '            </tbody>' +
+                '        </table>';
+
+            layer.open({
+                area: ["800px", "500px"],
+                type: 1,
+                title: '统计',
+                maxmin: true,
+                closeBtn: 1,
+                shadeClose: true,
+                skin: '#fff', //没有背景色
+                resize: true,
+                content: "<div style='width:100%;background: #fff;text-align: center;padding:10px'>   <button class=\"btn btn-info3\" type=\"button\" style=\"    position: absolute;right: 10px;top: 17px;\" onclick=\"exportThirds()\"> 导出Excel</button>" + html + "</div>"
+            });
+        });
+    }
+
+    // if (check_type == 2 && type == "") {
+
+    //     var p = {
+    //         "check_type": check_type,
+    //         "check_period": $("#month_date").val()
+    //     };
+
+
+    //     post_common_service("/f/checkOther/getOtherCheckStatistics", p, function(data) {
+
+    //         var names = new Array();
+    //         var totalnamesvalue = new HashMap();
+    //         var itemsname = "";
+    //         var datas = '';
+    //         var t8 = 0;
+    //         var t1 = 0;
+    //         var t2 = 0;
+    //         var t3 = 0;
+
+    //         //key 盐城道管
+    //         for (var key in data) {
+    //             //i list 盐城
+    //             for (var i in data[key]) {
+
+    //                 var itemvalue = "";
+    //                 //type 1
+    //                 for (var j in data[key][i].scoretypemap) {
+    //                     var scoremap = data[key][i].scoretypemap[j];
+    //                     names = new Array();
+    //                     itemsname = "";
+    //                     var totalvalue = 0;
+    //                     for (var name in scoremap) {
+    //                         names.push(name);
+    //                         itemsname += '<td style="width:78px">' + name + '</td>';
+    //                         itemvalue += '<td>' + scoremap[name] + '</td>';
+
+    //                         totalvalue += scoremap[name];
+
+    //                         var v = totalnamesvalue.get(name + j);
+    //                         if (v == null || v == undefined) v = 0;
+    //                         v += scoremap[name];
+    //                         totalnamesvalue.set(name + j, v);
+    //                     }
+    //                     itemvalue += '<td>' + totalvalue + '</td>';
+
+    //                     if (j == "1") t2 += totalvalue;
+    //                     if (j == "2") t3 += totalvalue;
+
+    //                 }
+
+    //                 datas += '<tr>';
+    //                 if (i == 0) {
+    //                     datas += '<td rowspan=' + data[key].length + '>' + key + "</td>";
+    //                 }
+    //                 datas += '<td>' + data[key][i].deptname + "</td>";
+    //                 datas += '<td>' + data[key][i].totalcheck + "</td>";
+    //                 datas += itemvalue;
+    //                 datas += '<td>' + data[key][i].totalScore + '</td>';
+    //                 datas += '</tr>';
+
+    //                 t1 += data[key][i].totalcheck;
+    //                 t8 += data[key][i].totalScore;
+    //             }
+    //         }
+
+    //         datas += '<tr><td colspan=2>合计</td>';
+    //         datas += '<td>' + t1 + '</td>';
+    //         for (var i in names) {
+    //             datas += '<td>' + totalnamesvalue.get(names[i] + "1") + '</td>';
+    //         }
+    //         datas += '<td>' + t2 + '</td>';
+    //         for (var i in names) {
+    //             datas += '<td>' + totalnamesvalue.get(names[i] + "2") + '</td>';
+    //         }
+    //         datas += '<td>' + t3 + '</td>';
+    //         datas += '<td>' + t8 + '</td></tr>';
+
+    //         var html = ' <table class="statable">' +
+    //             '            <thead style="font-size:  20px;text-align:  center;border:  0px;">' +
+    //             '                <tr>' +
+    //             '                    <td colspan="13" style="padding:  10px;border:  0px;">' + $("#month_date").val().replace("/", "-") + '月份特情稽查情况汇总</td>' +
+    //             '                </tr>' +
+    //             '            </thead>' +
+    //             '            <tbody>' +
+    //             '                <tr>' +
+    //             '<td rowspan=2>道管</td>' +
+    //             '<td rowspan=2>服务区</td>' +
+    //             '<td rowspan=2>存在问题特情数量</td>' +
+    //             '<td colspan=' + (names.length + 1) + '>内部特情稽查存在问题数量</td>' +
+    //             '<td colspan=' + (names.length + 1) + '>联网中心特情稽查存在问题数量</td>' +
+    //             '<td rowspan=2>合计扣分</td>' +
+    //             '                </tr>' +
+    //             '                <tr>' +
+    //             itemsname +
+    //             '<td >合计</td>' +
+    //             itemsname +
+    //             '<td >合计</td>' +
+    //             '                </tr>' +
+    //             datas +
+    //             '            </tbody>' +
+    //             '        </table>';
+    //         layer.open({
+    //             area: ["800px", "500px"],
+    //             type: 1,
+    //             title: '统计',
+    //             maxmin: true,
+    //             closeBtn: 1,
+    //             shadeClose: true,
+    //             skin: '#fff', //没有背景色
+    //             resize: true,
+    //             content: "<div style='width:100%;background: #fff;text-align: center;padding:10px'>   <button class=\"btn btn-info3\" type=\"button\" style=\"    position: absolute;right: 10px;top: 17px;\" onclick=\"exportThirds()\"> 导出Excel</button>" + html + "</div>"
+    //         });
+    //     });
+    // }
+}

+ 334 - 0
VisualInspection/qzd/js/statistics/assess_type.js

@@ -0,0 +1,334 @@
+var lianyungang_Station = new Array;
+var yancheng_Station = new Array;
+var nantong_Station = new Array;
+var r1 = new Array();
+var r2 = new Array();
+var r3 = new Array();
+var rank = new Array();
+var itemArray = new Array();
+/**
+ * 点击查询
+ */
+function queryTypeClick() {
+    //每次点击前清空表格数据
+    $(".table-tbody").empty('');
+    var t = getTimeByMonth($("#start-time").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+    var param = {
+        "dept_id": $("#fsList").val(),
+        "start_date": start_date,
+        "end_date": end_date,
+    }
+    var url = "f/statistics/score/item/info";
+    var strTbody = '';
+    post_common_service(url, param, function(data) {
+        // 管道中心受检人平均每人次扣分
+        check_people_avg(data);
+    }, function(error) {
+        return "";
+    });
+}
+
+/**
+ * 表格初始化
+ */
+function initQueryType() {
+    var t = getTimeByMonth($("#start-time").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+
+    var param = {
+        "start_date": start_date,
+        "end_date": end_date,
+    }
+    var url = "f/statistics/score/item/info";
+    var strTbody = '';
+
+    post_common_service(url, param, function(data) {
+        // 管道中心受检人平均每人次扣分
+        check_people_avg(data);
+    }, function(error) {
+        return "";
+    });
+
+}
+
+/**
+ * 表头拼接及数据传入
+ * @param {*} data
+ */
+function getHeadHtml(data) {
+    var strHead = "";
+    itemArray = data.itemList;
+    var colspanNum = data.itemList.length + 1;
+    strHead += "<tr><th rowspan='2' width='6%'>道管整体排名</th><th rowspan='2' width='6%'>道管</th><th rowspan='2' width='6%'>管道内服务区排名</th>";
+    strHead += "<th rowspan='2' width='10%'>服务区</th><th rowspan='2' width='6%'>受检次数</th>";
+    strHead += "<th colspan=" + colspanNum + " height='40px'>存在问题扣分详情</th><th rowspan='2' width='6%'>管道中心受检服务区平均扣分(千分制)</th></tr><tr>";
+    for(var i=0;i<data.itemList.length;i++){
+        strHead += "<th width='55px'>"+data.itemList[i]+"</th>";
+    }
+    strHead += "<th width='55px'>扣分合计</th></tr>";
+    return strHead;
+}
+
+/**
+ * 表格拼接及数据传入
+ * @param {*} data
+ * @param {*} i
+ * @param {*} avg
+ */
+function gethtml(data, i, organList, avg, lists) {
+    var strTbody = "";
+    if (i == 0 || i == organList[0] || i == organList[1]) {
+
+        var ranking;
+        var name = "";
+        var rowspan = 0;
+        order = 1;
+        if (i == 0) {
+            name = "连云港";
+            rowspan = organList[0];
+            ranking = rank[i];
+            for (var i = 0; i < lists.length; i++) {
+                if (avg > lists[i]) {
+                    order = order + 1;
+                }
+            }
+        } else if (i == organList[0]) {
+            name = "盐城";
+            rowspan = organList[1]-organList[0];
+            ranking = rank[i];
+            for (var i = 0; i < lists.length; i++) {
+                if (avg > lists[i]) {
+                    order = order + 1;
+                }
+            }
+        } else if (i == organList[1]) {
+            name = "南通";
+            rowspan = organList[2]-organList[1];
+            ranking = rank[i];
+            for (var i = 0; i < lists.length; i++) {
+                if (avg > lists[i]) {
+                    order = order + 1;
+                }
+            }
+        }
+        strTbody += "<tr><td rowspan=" + rowspan + " width='6%'>" + order + "</td><td rowspan=" + rowspan + " width='6%'>" + name + "</td>";
+        strTbody += "<td width='6%'>" + ranking + "</td><td width='10%'>" + data.name + "</td><td width='6%'>" + filter(data.checked_num, '0');
+        for (var i=0;i<itemArray.length;i++) {
+            strTbody += "</td><td width='55px'>" + getItemScore(data, itemArray[i]);
+        }
+        strTbody += "</td><td width='55px'>" + data.all_check_score + "</td><td rowspan=" + rowspan + " width='6%'>" + avg + "</td>";
+        strTbody += "</tr>";
+    } else {
+        strTbody += "<tr><td>" + rank[i] + "</td>";
+        strTbody += "<td>" + data.name + "</td><td>" + filter(data.checked_num, '0');
+        for (var i=0;i<itemArray.length;i++) {
+            strTbody += "</td><td>" + getItemScore(data, itemArray[i]);
+        }
+        strTbody += "</td><td>" + data.all_check_score + "</td>";
+        strTbody += "</tr>";
+
+    }
+    return strTbody;
+}
+
+function getTotalHtml(data) {
+    var html = "<tr><td>合计</td><td></td><td></td><td></td><td>" + data.totalcheckedCount;
+        for (var i=0;i<itemArray.length;i++) {
+            html += "</td><td>" + getTotalScore(data, itemArray[i]);
+        }
+        html += "</td><td>" + data.totalAll + "</td><td>-</td></tr>";
+    return html;
+}
+
+/**
+ * 获取扣分合计
+ * @param {*} obj
+ * @param {*} check_item_name
+ */
+function getTotalScore(data, check_item_name) {
+    for (var i in data) {
+        // console.log(i);
+        if (i.indexOf(check_item_name) > -1) {
+            return data[i];
+        }
+    }
+    return 0;
+}
+/**
+ * 管道中心受检服务区平均扣分
+ * @param {*} data
+ */
+function check_people_avg(data) {
+    var list = data.list;
+    var organList = data.organList;
+    var organArray = new Array();
+    var organCount = 0;
+    for (h=0;h<organList.length;h++) {
+        organCount += organList[h].sacount;
+        organArray.push(organCount);
+    }
+    var dataArray = new Array();
+    var sum = 0;
+    var sum1 = 0;
+    var id = 1;
+    for (k = 0; k < list.length; k++) {
+        sum = parseFloat(sum) + parseFloat(filterByZeroHandle(list[k].all_check_score, '0'));
+        sum1 = parseFloat(sum1) + parseFloat(filterByZeroHandle(list[k].checked_num, '0'));
+        if (k == organArray[0]-1) {
+            dataArray.push(filterJudge(sum, sum1));
+            sum = 0;
+            sum1 = 0;
+        }
+        if (k == organArray[1]-1) {
+            dataArray.push(filterJudge(sum, sum1));
+            sum = 0;
+            sum1 = 0;
+        }
+        if (k == organArray[2]-1) {
+            dataArray.push(filterJudge(sum, sum1));
+            sum = 0;
+            sum1 = 0;
+        }
+    }
+
+    // 组装表格头部
+    $(".table-thead")[0].innerHTML = getHeadHtml(data);
+
+    // 道管下的服务区排名
+    ranking_method(list,organArray);
+    for (i = 0; i < list.length; i++) {
+        if (i == 0) {
+            $(".table-tbody").append(gethtml(list[i], i, organArray, dataArray[0], dataArray));
+        } else if (i == organArray[0]) {
+            $(".table-tbody").append(gethtml(list[i], i, organArray, dataArray[1], dataArray));
+        } else if (i == organArray[1]) {
+            $(".table-tbody").append(gethtml(list[i], i, organArray, dataArray[2], dataArray));
+        } else {
+            $(".table-tbody").append(gethtml(list[i], i, organArray));
+        }
+    }
+    $(".table-tbody").append(getTotalHtml(data));
+}
+/**
+ * 道管下的服务区排名
+ * @param {*} data
+ */
+function ranking_method(data,organArray) {
+    //清空数组
+    lianyungang_Station.length = 0;
+    yancheng_Station.length = 0;
+    nantong_Station.length = 0;
+    r1.length = 0;
+    r2.length = 0;
+    r3.length = 0;
+    rank.length = 0;
+    // 把收费站得分分别添加到3个数组
+    for (i = 0; i < data.length; i++) {
+        if (i >= 0 && i <= organArray[0]-1)
+            lianyungang_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
+        else if (i > organArray[0]-1 && i <= organArray[1]-1)
+            yancheng_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
+        else
+            nantong_Station.push(filterByZeroHandle(filterJudge(data[i].all_check_score, data[i].checked_num), '0'));
+    }
+    // 得分转化为3个排名数组
+    for (var i = 1; i <= 3; i++) {
+        station_rank(i);
+    }
+    // 将3个排名数组合并成一个数组
+    rank = r1.concat(r2).concat(r3);
+}
+
+/**
+ * 排名
+ */
+function station_rank_method(array, rank) {
+    rank[0] = 1;
+    for (var i = 1; i < array.length; i++) {
+        if (array[i - 1] == array[i]) {
+            rank[i] = rank[i - 1];
+        } else {
+            rank[i] = i + 1;
+        }
+    }
+}
+
+/**
+ * 得分转化为排名
+ * @param {*} type
+ */
+function station_rank(type) {
+    if (type == 1) {
+        station_rank_method(lianyungang_Station, r1);
+    } else if (type == 2) {
+        station_rank_method(yancheng_Station, r2);
+    } else if (type == 3) {
+        station_rank_method(nantong_Station, r3);
+    }
+}
+
+/**
+ * 过滤undefined
+ * @param {*} value
+ * @param {*} default_display_value
+ */
+function filter(value, default_display_value) {
+    if (value != '' && value != undefined) {
+        return value;
+    } else if (default_display_value != undefined) {
+        return default_display_value;
+    } else {
+        return "";
+    }
+}
+
+/**
+ * 获取扣分详情
+ * @param {*} obj
+ * @param {*} check_item_name
+ */
+function getItemScore(obj, check_item_name) {
+    var names = obj.checked_socre_name;
+    var scores = obj.checked_score;
+
+    for (var i = 0; i < names.length; i++) {
+        if (names[i] != null && names[i].indexOf(check_item_name) > -1) {
+            return scores[i];
+        }
+    }
+    return 0;
+}
+
+/**
+ * 过滤除数为0和保留二位小数时出现的0.00
+ * @param {*} value
+ * @param {*} default_display_value
+ */
+function filterByZeroHandle(value, default_display_value) {
+    if (isNaN(value)) {
+        return default_display_value;
+    } else {
+        if ((value + '').endsWith('.00')) {
+            return value.substring(0, value.length - 3);
+        }
+        return value;
+    }
+}
+
+function filterJudge(num1, num2) {
+    if (num2 == 0) {
+        return 0;
+    } else {
+        return (num1 / num2).toFixed(2);
+    }
+}
+
+function exportExcel() {
+    var t = getTimeByMonth($("#start-time").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+    window.open(getExcelServeraddr() + "f/file/score/item/info?start_date=" + start_date + "&end_date=" + end_date);
+}

+ 122 - 0
VisualInspection/qzd/js/statistics/dept_check_statistics.js

@@ -0,0 +1,122 @@
+var year = new Date().getFullYear();
+$(function() {
+    // 公用方法,根据当前年月动态将13个月push数组
+    month_method();
+    // 公用方法,月份下拉框
+    // select_option();
+    // 回显当前年月份
+    // $(".div-month select").val(initDate);
+    $.jeDate("#month_date_from", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+    $.jeDate("#month_date_to", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+
+    $("#month_date_from").val("2018/04");
+    $("#month_date_to").val(getCurrentTimeFormat());
+
+
+    $("#searchbtn").on("click", function() {
+        getdeptscore($("#month_date_from").val(), $("#month_date_to").val());
+
+    });
+
+
+    getdeptscore($("#month_date_from").val(), $("#month_date_to").val());
+
+});
+
+
+
+
+function exportExcel() {
+    var start_date = moment($("#month_date_from").val() + "-25 23:00:00").valueOf();
+    var end_date = moment($("#month_date_to").val() + "-25 23:00:00").valueOf();
+    if (start_date == '' || end_date == '') {
+        tip("请选择起止日期");
+        return;
+    }
+    window.open(getExcelServeraddr() + "f/file/dept/static/excel?start_date=" + start_date + "&end_date=" + end_date);
+}
+
+
+
+
+function getdeptscore(starttime, endtime) {
+
+    $("#table_title").html("(" + starttime + "---" + endtime + ")");
+
+    var time_m = moment(endtime).diff(moment(starttime), 'month')
+
+    var data_p = {
+        "start_date": moment(starttime + "-25 23:00:00").valueOf(),
+        "end_date": moment(endtime + "-25 23:00:00").valueOf(),
+
+    };
+
+    //获取该人员排班
+    var url = "f/statistics/dept";
+    
+    post_common_service(url, data_p, function(data) {
+
+        //     var table = '';
+
+        //先确定表格标题
+        var h_html = "<tr><th rowspan=2 style='width:30px'>序号</th><th rowspan=2 style='width:95px'>站名</th>";
+        var h_html_t = "<tr>"
+        for (var i = 0; i <= time_m; i++) {
+            h_html += "<th colspan=4 style='width:240px'>" + (moment(starttime).add(i, "month").format("MM月")) + "</th>";
+            h_html_t += "<th style='width:60px'>考核分</th><th style='width:60px'>积分</th><th style='width:60px'>累计积分</th><th style='width:60px'>排名</th>"
+        }
+        h_html += "</tr>";
+        h_html_t += "</tr>";
+        h_html += h_html_t;
+
+        $("#table_h").html(h_html)
+        $(".tb").css("width", (time_m + 1) * 4 * 60 + 125)
+            // $("#table").css("width",time_m*4*30+80)
+
+        var b_html = ""
+
+
+        //再确定表格列
+        if (Object.keys(data).length > 0) {
+            var cc = 0;
+            for (var i in data) {
+                var dd = data[i];
+                b_html += "<tr><td style='width:30px'>" + (++cc) + "</td><td style='width:95px'>" + dd[0].dept_name + "</td>"
+                var tt = moment(dd[0].time).diff(moment(starttime), 'month')
+                for (var op = 0; op < tt; op++) {
+                    b_html += "<td style='width:60px'>-</td>"
+                    b_html += "<td style='width:60px'>-</td>"
+                    b_html += "<td style='width:60px'>-</td>"
+                    b_html += "<td style='width:60px'>-</td>"
+                }
+                for (var p in dd) {
+                    var ss = dd[p];
+                    b_html += "<td style='width:60px'>" + ss.score + "</td>"
+                    b_html += "<td style='width:60px'>" + ss.integral + "</td>"
+                    b_html += "<td style='width:60px'>" + ss.total_integral + "</td>"
+                    b_html += "<td style='width:60px'>" + ss.total_ranking + "</td>"
+                }
+
+                var tt1 = moment(endtime).diff(moment(dd[dd.length - 1].time), 'month')
+                for (var op = 0; op < tt1; op++) {
+                    b_html += "<td style='width:60px'>-</td>"
+                    b_html += "<td style='width:60px'>-</td>"
+                    b_html += "<td style='width:60px'>-</td>"
+                    b_html += "<td style='width:60px'>-</td>"
+                }
+            }
+            b_html += "</tr>"
+
+        }
+
+        $("#table").html(b_html);
+
+    });
+
+}

+ 162 - 0
VisualInspection/qzd/js/statistics/operation_management_integration.js

@@ -0,0 +1,162 @@
+var lianyungang_Station = new Array;
+var yancheng_Station = new Array;
+var nantong_Station = new Array;
+var r1 = new Array();
+var r2 = new Array();
+var r3 = new Array();
+var rank = new Array();
+/**
+ * 点击查询
+ */
+function queryTypeClick() {
+    //每次点击前清空表格数据
+    $(".table-tbody").empty('');
+    var t = getTimeByMonth($("#start-time").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+   
+    var param = {
+        "dept_id": $("#fsList").val(),
+        "start_date": start_date,
+        "end_date": end_date,
+    }
+    var url = "f/statistics/operation/manage/integration";
+    var strTbody = '';
+    post_common_service(url, param, function(data) {
+        // 运营管理综合检查情况
+        check_operation_avg(data);
+    }, function(error) {
+        return "";
+    });
+}
+
+/**
+ * 表格初始化
+ */
+function initQueryType() {
+    var t = getTimeByMonth($("#start-time").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+    var param = {
+        "start_date": start_date,
+        "end_date": end_date,
+    }
+    var url = "f/statistics/operation/manage/integration";
+    var strTbody = '';
+
+    post_common_service(url, param, function(data) {
+        // 运营管理综合检查情况
+        check_operation_avg(data);
+    }, function(error) {
+        return "";
+    });
+
+}
+
+/**
+ * 表格拼接及数据传入
+ * @param {*} data
+ * @param {*} i
+ * @param {*} avg
+ */
+function gethtml(data, i, avg, lists) {
+    var strTbody = "";
+
+    strTbody += "<tr><td width='8%'>" + data.company_ranking2 + "</td>";
+    strTbody += "<td width='8%'>" + data.name + "</td><td width='6%'>" + data.company_check_num +
+        "</td><td width='6%'>" + data.company_total_score + "</td><td width='6%'>" + data.third_check_num +
+        "</td><td width='6%'>" + data.third_total_score + "</td><td width='6%'>" + data.onsite_check_num +
+        "</td><td width='6%'>" + data.onsite_total_score + "</td><td width='8%'>" +
+        data.check_total_avg + "</td>" +
+        "<td width='8%'>" + data.score_avg + "</td>";
+    strTbody += "</tr>";
+    return strTbody;
+}
+
+function getTotalHtml(data) {
+    var html = "<tr><td>合计</td><td></td><td>" + data.totalCompanyNum + "</td><td>" + data.totalCompanyScore + "</td><td>" +
+        data.totalThirdNum + "</td><td>" + data.totalThirdScore + "</td><td>" + data.totalOnsiteNum + "</td><td>" + data.totalOnsiteScore +
+         "</td><td>-</td><td>-</td></tr>";
+    return html;
+}
+
+/**
+ * 管道中心受检人平均每人次扣分
+ * @param {*} data
+ */
+function check_operation_avg(data) {
+    var list = data.list;
+    var dataArray = new Array();
+    var sum = 0;
+    var sum1 = 0;
+    for (k = 0; k < list.length; k++) {
+        sum = parseFloat(sum) + parseFloat(list[k].check_total_avg);
+        sum1++;
+        if (k == 6) {
+            dataArray.push(filterJudge(sum, sum1));
+            sum = 0;
+            sum1 = 0;
+        }
+        if (k == 12) {
+            dataArray.push(filterJudge(sum, sum1));
+            sum = 0;
+            sum1 = 0;
+        }
+        if (k == 20) {
+            dataArray.push(filterJudge(sum, sum1));
+            sum = 0;
+            sum1 = 0;
+        }
+    }
+
+    for (i = 0; i < list.length; i++) {
+        $(".table-tbody").append(gethtml(list[i], i, dataArray[0], dataArray));
+    }
+    $(".table-tbody").append(getTotalHtml(data));
+}
+
+/**
+ * 过滤undefined
+ * @param {*} value
+ * @param {*} default_display_value
+ */
+function filter(value, default_display_value) {
+    if (value != '' && value != undefined) {
+        return value;
+    } else if (default_display_value != undefined) {
+        return default_display_value;
+    } else {
+        return "";
+    }
+}
+
+/**
+ * 过滤除数为0和保留二位小数时出现的0.00
+ * @param {*} value
+ * @param {*} default_display_value
+ */
+function filterByZeroHandle(value, default_display_value) {
+    if (isNaN(value)) {
+        return default_display_value;
+    } else {
+        if ((value + '').endsWith('.00')) {
+            return value.substring(0, value.length - 3);
+        }
+        return value;
+    }
+}
+
+function filterJudge(num1, num2) {
+    if (num2 == 0) {
+        return 0;
+    } else {
+        return (num1 / num2).toFixed(2);
+    }
+}
+
+function exportExcel() {
+    var t = getTimeByMonth($("#start-time").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+    window.open(getExcelServeraddr() + "f/file/operation/manage/integration?start_date=" + start_date + "&end_date=" + end_date);
+}

+ 99 - 0
VisualInspection/qzd/js/statistics/service_area_check_statistics.js

@@ -0,0 +1,99 @@
+var year = new Date().getFullYear();
+$(function() {
+    // 公用方法,根据当前年月动态将13个月push数组
+    month_method();
+    // 公用方法,月份下拉框
+    // select_option();
+    // 回显当前年月份
+    // $(".div-month select").val(initDate);
+    $.jeDate("#month_date_from", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+    $.jeDate("#month_date_to", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+
+    $("#month_date_from").val("2018-04");
+    $("#month_date_to").val(getCurrentTimeFormat());
+
+
+    $("#searchbtn").on("click", function() {
+        var s_s = $("#start-score").val();
+        var e_s = $("#end-score").val();
+        var m_s = $("#month_number").val();
+        if (!isRealNum(s_s) || !isRealNum(e_s) || !isRealNum(m_s)) {
+            layer.msg('参数有错误!');
+            return;
+        }
+        getscore($("#month_date_from").val(), $("#month_date_to").val(), m_s, s_s, e_s);
+    });
+
+
+    getscore("2018-04", moment(moment().format("YYYY-MM")).subtract(1, "month").format("YYYY-MM"), 3, 985, 1000);
+
+
+
+});
+
+
+
+
+function getscore(starttime, endtime, limitnumber, limitscore, limitscore2) {
+
+    var data_p = {
+        "start_date": moment(starttime + "-25 23:00:00").valueOf(),
+        "end_date": moment(endtime + "-25 23:00:00").valueOf(),
+        "limitnumber": limitnumber,
+        "limitscore": limitscore,
+        "limitscore2": limitscore2
+    };
+
+    //获取该人员排班
+    var url = "f/statistics/user/score";
+
+    post_common_service(url, data_p, function(data) {
+
+        var table = '';
+        // $("#totlapeople").html(data.length);
+        for (var i in data) {
+            var ss = data[i];
+            var dat = "";
+            for (var j in ss.fwqStatistics) {
+                var po = ss.fwqStatistics[j];
+                dat += po.p_str + "月、";
+            }
+            dat = dat.substring(0, dat.length - 1);
+            table += "<tr><td width='5%;'>" + (parseInt(i) + 1) + "</td><td width='15%;'><a href='JavaScript:void(0)' onclick='jumpuser(\"" + ss.dept_id + "\")'>" + ss.dept + "</a></td><td width='60%;'>" + dat + "</td></tr>";
+        }
+        $(".table-tbody").html(table);
+        $('[data-toggle="tooltip"]').tooltip();
+        $("tr:gt(0):odd").css("background", "#EFEFEF");
+
+    });
+
+}
+
+function jumpuser(deptid) {
+
+
+    var param = {
+        "parent_dept_id": GV("#center-manager"),
+        "dept_id": GV("#fsList"),
+        "start_date": $("#start-time").val(),
+        "end_date": $("#end-time").val(),
+        "start_num": $("#start-num").val(),
+        "end_num": $("#end-num").val(),
+        "start_score": $("#start-score").val(),
+        "end_score": $("#end-score").val(),
+        "job_select": $("#jobSelect").val()
+    }
+    $.zui.store.set('store_param_' + current_url, param);
+
+    url = "/fwq/view/statistics/service_area_data_statistics.html?deptid=" + deptid + "&jump=1"
+
+    isnew = false;
+    changePage(url);
+
+}

+ 718 - 0
VisualInspection/qzd/js/statistics/service_area_data_statistics.js

@@ -0,0 +1,718 @@
+var year = new Date().getFullYear();
+var x_m_array = new Array();
+var x_m_array_temp = new Array();
+var months = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
+var monthsCH = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
+var array_year_score = new Array();
+var array_check_type = new Array();
+var score_statistics;
+var check_type;
+var cur_status;
+var hide = false;
+
+var array_points = new Array();
+var array_points2 = new Array();
+
+// 仅选择日期
+$.jeDate("#start-time", {
+    isinitVal: true,
+    format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+});
+$("#start-time").val(getCurrentTimeFormat());
+
+var t = getTimeByMonth($("#start-time").val());
+var start_date = getMomentTimeFormat(t.starttime);
+var end_date = getMomentTimeFormat(t.endtime);
+
+/**
+ * 预加载方法
+ */
+$(function() {
+    setVisit();
+
+    // var temp_time = $.zui.store.get('page_data_param_temp_time');
+    // if (temp_time) {
+
+    //     var year = temp_time.split('/')[0];
+    //     var month = temp_time.split('/')[1];
+
+    //     var starty = year;
+    //     var startm = parseInt(month) - 1;
+
+    //     if (startm <= 0) {
+    //         startm = 12;
+    //         starty = parseInt(year) - 1;
+    //     }
+
+    //     $(".div-start input").val(starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-25');
+    //     $(".div-end input").val(year + '-' + month + '-25');
+    //     $.zui.store.set('page_data_param_temp_time', null)
+    // }
+
+    //*************************************数据表格******************************************
+    function initAppealPage(start_date, end_date, dept_id) {
+        initQueryParams();
+        queryAppeal(start_date, end_date, dept_id);
+    }
+
+    function initQueryParams() {
+        //获取页面参数
+        var page_params = $.zui.store.get("page_params");
+        if (page_params && page_params.status) {
+            cur_status = page_params.status;
+        }
+    }
+
+    function queryAppeal(start_date, end_date, dept_id) {
+
+        $("#station_name").html($("#select-dept").find("option:selected").text())
+
+        // $("#station_user_name").html("-")
+
+        //请求数据
+        var data_t = {
+            "start_date": start_date,
+            "end_date": end_date,
+            "dept_id": dept_id
+        }
+        var url_t = "f/statistics/employee/order/detail"
+        post_common_service(url_t, data_t, function(res) {
+
+            $("#c_com_ranking").html("-");
+            $("#c_score_ranking").html("-");         
+            $("#l_com_ranking").html("-");
+            $("#l_score_ranking").html("-");
+
+            var isshow_c = false;
+            var isshow_l = false;
+            if (typeof(res.currentP) != undefined && res.currentP != null) {
+                var p = res.currentP;          
+                $("#c_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
+                $("#c_score_ranking").html(p.check_all_score + p.check_all_m_score);
+                isshow_c = true;
+            }
+            if (typeof(res.lastP) != undefined && res.lastP != null) {
+                var p = res.lastP;
+                $("#l_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
+                $("#l_score_ranking").html(p.check_all_score + p.check_all_m_score);
+                isshow_l = true;
+            }
+
+            if (isshow_c && isshow_l) {
+                var p_c = res.currentP;
+                var p_l = res.lastP;
+                // if (p_c.service_area_ranking != undefined && p_l.service_area_ranking != undefined) {
+                    // var dept_r = p_c.service_area_ranking - p_l.service_area_ranking;
+                    // if (dept_r != 0) {
+                    //     $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
+                    // }
+                    var com_r = p_c.company_ranking - p_l.company_ranking;
+                    if (com_r != 0) {
+                        $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
+                    }
+                    // var road_r = p_c.center_ranking - p_l.center_ranking;
+                    // if (road_r != 0) {
+                    //     $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
+                    // }
+                // }
+            }
+        }, function(error) {})
+
+        $.ajax({
+            type: "OPTIONS",
+            url: base_ui_url,
+            complete: function(x) {
+
+                //计算当前周期
+                var now_date_time = moment(new Date(x.getResponseHeader("Date")))
+                var current_start_date = null;
+
+                if (now_date_time.date() >= 25) {
+                    current_start_date = moment(now_date_time.format("YYYY-MM") + "-25 23:00:00Z").subtract(0, "month");
+                } else {
+                    current_start_date = moment(now_date_time.format("YYYY-MM") + "-25 23:00:00Z").subtract(1, "month");
+                }
+                var end_date_time = moment(end_date + "Z");
+
+                if (end_date_time.valueOf() > current_start_date.valueOf()) {
+                    if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || roleContains('STATION')) {
+                        $(".score-select").val(1)
+                    }
+                }
+
+                var data = {
+                    "start_date": start_date,
+                    "end_date": end_date,
+                    "dept_id": dept_id,
+                    "queryType": 0,
+                }
+                if ($(".score-select").val() == "0") {
+                    data["score_flag"] = 0;
+                }
+                if ($(".score-select").val() == "1") {
+                    data["score_flag"] = 1;
+                }
+
+                if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || hasRole(ROLE_JICHA) || roleContains('STATION')) {
+                    hide = true;
+                }
+
+                var cols = [
+                    { width: 50, text: '序号', flex: true, colClass: 'text-center', field: 'num' },
+                    { width: 100, text: '时间段', flex: true, colClass: 'text-center', field: 'check_task_time_name' },
+                    // { width: 80, text: '扣分人', flex: true, colClass: 'text-center', field: 'checked_name' },
+                    {
+                        width: 100,
+                        text: '服务区',
+                        flex: true,
+                        colClass: 'text-center',
+                        field: 'dept_id',
+                        func: function(value) {
+                            return getfeeName(value);
+                        }
+                    },
+                    { width: 40, text: '扣分数', flex: true, colClass: 'text-center', field: 'score', nullvalue: '0' },
+                    { width: 120, text: '考核类型', flex: true, colClass: 'text-center', sort: 'down', field: 'parent_name' },
+                    { width: 120, text: '考核项', flex: true, colClass: 'text-center', sort: 'down', field: 'name' },
+                    { width: 120, text: '扣分凭证', type: 'imagedd', flex: true, hide: hide, field: 'pics' },
+                ];
+                if (cur_status == 12 || cur_status == 13) {
+                    data.check_status_arr = [12, 13];
+                }
+                $('#personal_data_table').mytable({
+                    'cols': cols,
+                    'url': "f/statistics/one/checkedItem/detail/info",
+                    'param': data
+                });
+            }
+        })
+    }
+
+    function getfeeName(id) {
+        for (var i in feeList) {
+            var fee = feeList[i];
+            if (fee.deptid == id) {
+                return fee.name;
+            }
+        }
+    }
+
+
+
+
+
+    //*************************************画图******************************************
+
+    // 加载图配置
+    echart();
+
+    $(".query button").click(function() {
+        // var user_id = $("#select-personal").val();
+        var dept_id = $("#select-dept").val();
+        var t = getTimeByMonth($("#start-time").val());
+        var start_date = getMomentTimeFormat(t.starttime);
+        var end_date = getMomentTimeFormat(t.endtime);
+        
+        // 查询图一
+        init_personal_score_statistics("f/statistics/one/serviceArea/year/info", dept_id);
+        // 查询图二
+        init_personal_check_type("f/statistics/one/serviceArea/checkedItem/info", dept_id, start_date, end_date);
+        // 表格
+        initAppealPage(start_date, end_date, dept_id);
+        // 加载图配置
+        echart();
+    });
+
+    /**
+     * 初始化图一(服务区得分统计)
+     * @param {*} url
+     * @param {*} dept_id
+     */
+    function init_personal_score_statistics(url, dept_id) {
+
+        var t = getTimeByMonth($("#start-time").val());
+        var start_date = getMomentTimeFormat(t.starttime);
+        var end_date = getMomentTimeFormat(t.endtime);        
+
+        var date = moment(end_date);
+        var y = date.get('y');
+        var m = date.get('M') + 1;
+
+        x_m_array = new Array();
+        for (var i = 1; i <= 12; i++) {
+            var month = parseInt(m) + i;
+            var starty = parseInt(y) - 1
+            if (month > 12) {
+                month = month - 12;
+                starty = y;
+            }
+            x_m_array.push(starty + "/" + (month >= 10 ? month : ("0" + month)));
+        }
+
+        var param = {
+            "start_date": (y - 1) + "-" + new Date().getMonth() + "-25" + " 00:00:00",
+            "end_date": end_date,
+            "dept_id": dept_id
+        }
+
+        initRqueset(url, param, 1);
+    }
+
+
+    /**
+     * 初始化图二
+     * @param {*} url
+     * @param {*} dept_id
+     */
+    function init_personal_check_type(url, dept_id, start_date, end_date) {
+        var param = {
+            "start_date": start_date,
+            "end_date": end_date,
+            "dept_id": dept_id
+        }
+        initRqueset(url, param, 2);
+    }
+
+
+    /**
+     * 请求
+     * @param {*} url
+     * @param {*} param
+     * @param {*} type
+     */
+    function initRqueset(url, param, type) {
+        post_common_service(url, param, function(data) {
+            data_array(data, type);
+            if (type == 1) {
+                // 画图
+                score_statistics.setOption(personal_score_statistics());
+            } else if (type == 2) {
+                // 画图
+                check_type.setOption(personal_check_type());
+            }
+        }, function(error) {
+            return "";
+        });
+    }
+
+    function getsymbol(score) {
+        var sy = 'Circle';
+        var col = 'green'
+
+        if (score == 1000) {
+            sy = "star"
+            col = 'red'
+        } else
+        if (score > 990) {
+            sy = "star"
+            col = 'orange'
+        } else {
+            sy = "Triangle"
+            col = 'green'
+        }
+
+
+
+        // itemStyle: {        // 数据级个性化折线样式
+        //   normal: {
+        //       color: 'yellowgreen'
+        //   },
+        // }
+
+        return { value: (score), symbol: sy, symbolSize: 5, itemStyle: { normal: { color: col } } };
+
+    }
+
+    /**
+     * 数组数据
+     * @param {*} data
+     * @param {*} type
+     */
+    function data_array(data, type) {
+        if (type == 1) {
+            array_year_score.length = 0;
+
+            if (data != '' && data.length != 0) {
+
+                x_m_array_temp = new Array();
+                for (var i = 0; i < x_m_array.length; i++) {
+
+                    var index = -1;
+                    for (var j = 0; j < data.length; j++) {
+                        if (x_m_array[i] == data[j].mth) {
+                            index = j;
+                            break;
+                        }
+                    }
+                    if (index < 0) {
+
+                    } else {
+
+                        x_m_array_temp.push(x_m_array[i]);
+                        var score = (1000 - (filter(data[index].all_check_score, data[index].checked_num, 1.0, 0)));
+                        var data_s = getsymbol(score)
+
+                        // console.log(data_s)
+                        array_year_score.push(data_s);
+                    }
+                }
+            } else {
+                array_year_score.length = 0;
+                x_m_array = new Array();
+                x_m_array_temp = new Array();
+            }
+
+        } else if (type == 2) {
+            array_points = new Array();
+            array_points2 = new Array();
+            var map = new HashMap();
+
+            if (data.length != 0) {
+                for (var i = 0; i < data.length; i++) {
+                    if (typeof(data[i].all_check_score) == "undefined" || data[i].all_check_score == null) continue;
+                    if (map.get(data[i].name) == null) {
+                        map.set(data[i].name, data[i].all_check_score);
+                    } else {
+                        map.set(data[i].name, map.get(data[i].name) + data[i].all_check_score);
+                    }
+                    array_points2.push({ "value": (data[i].all_check_score), "name": data[i].name, "itemStyle": { "normal": { "color": getchildColor(data[i].name, i).hexStr() } } });
+                }
+            }
+            map.forEach(function(value, key) {
+                array_points.push({ "value": value, "name": key, "itemStyle": { "normal": { "color": getColor(key).hexStr() } } });
+            });
+        }
+    }
+
+    // var userid_t = $.zui.store.get("page_params").userid
+    var dept_t = $.zui.store.get("page_params").deptid
+
+
+    // 收费站下拉框
+    var dept;
+    // if (roleContains("STATION")) {
+    //     dept = getCurrentUser().organid;
+    // }
+    if (dept_t) {
+        dept = dept_t;
+    }
+
+    // var roadManager;
+    // if (roleContains("ROAD_MANAGER")) {
+    //     roadManager = getCurrentUser().organid;
+    // }
+    var feeList = $.zui.store.get("cache_service_area_list");
+    // if (roadManager) feeList = cache_road_manager_fee_list_map.get(roadManager);
+    setSASelectValueNoAll2(feeList, "#select-dept", dept);
+
+    getInit();
+    // setSecond();
+    /**
+     * 部门人员下拉框
+     */
+    // 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) {
+    //             var userId;
+    //             if (hasRole("ROLE_STATION")) {
+    //                 userId = getCurrentUser().id;
+    //             }
+    //             if (userid_t) {
+    //                 userId = userid_t;
+    //             }
+
+    //             for (var i = 0; i < data.length; i++) {
+    //                 for (var j = 33; j <= 100; j++) {
+    //                     if (select_road == j) {
+    //                         if (data[i].id == userId) {
+    //                             tempStr += "<option value=" + data[i].id + " selected='selected'>" + data[i].truename + "</option>";
+    //                         } else {
+    //                             tempStr += "<option value=" + data[i].id + ">" + data[i].truename + "</option>";
+    //                         }
+    //                     }
+    //                 }
+    //                 sec.innerHTML = tempStr;
+    //             }
+
+    //         } else {
+    //             sec.innerHTML = '';
+    //         }
+    //         // 请求数据
+    //         getInit();
+    //     }, function(error) {
+    //         return "";
+    //     });
+    // }
+
+    function getInit() {
+        var t = getTimeByMonth($("#start-time").val());
+        var start_date = getMomentTimeFormat(t.starttime);
+        var end_date = getMomentTimeFormat(t.endtime);
+        // var user_id = $("#select-personal").val();
+        var dept_id = $("#select-dept").val();
+        // 页面初始化
+        echart();
+
+        initAppealPage(start_date, end_date, dept_id);
+        init_personal_score_statistics("f/statistics/one/serviceArea/year/info", dept_id);
+        init_personal_check_type("f/statistics/one/serviceArea/checkedItem/info", dept_id, start_date, end_date);
+    }
+
+
+    // $("#select-dept").change(function() {
+    //     setSecond();
+    // });
+
+    // $("#select-personal").change(function() {
+    //     getInit();
+    // })
+    $("#select-dept").change(function() {
+        getInit();
+    });
+
+
+    /**
+     * 除数为0处理
+     * @param {*} num
+     * @param {*} num1
+     * @param {*} num2
+     * @param {*} num4
+     */
+    function filter(num, num1, num2) {
+        if (num1 == 0) {
+            return num2;
+        } else {
+            return (num / num1).toFixed(2);
+        }
+    }
+
+    function echart() {
+        // 路径配置
+        require.config({
+            paths: {
+                echarts: '/js/lib/echarts/build/dist'
+            }
+        });
+        // 使用
+        require(
+            [
+                'echarts',
+                'echarts/theme/macarons',
+                'echarts/chart/line',
+                'echarts/chart/pie'
+            ],
+            function(ec, theme) {
+                // 基于准备好的dom,初始化echarts图表
+                score_statistics = ec.init(document.getElementById('personal-score-statistics'), theme);
+                check_type = ec.init(document.getElementById('personal-check-type'), theme);
+            }
+        );
+    }
+
+    /**
+     * 图一
+     */
+    function personal_score_statistics() {
+        option = {
+            color: ['#00ced1'],
+            tooltip: {
+                trigger: 'axis'
+            },
+
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            grid: {
+                width: "75%"
+            },
+            toolbox: {
+                show: true,
+            },
+            calculable: true,
+            xAxis: [{
+                type: 'category',
+                boundaryGap: false,
+                data: x_m_array_temp
+            }],
+            yAxis: [{
+                type: 'value',
+                min: 700,
+                max: 1000,
+                axisLabel: {
+                    formatter: '{value}'
+                }
+            }],
+            series: [{
+                    name: '平均分',
+                    type: 'line',
+                    data: array_year_score,
+                    // markPoint: {
+                    //     data: [
+                    //         { type: 'max', name: '最大值' },
+                    //         { type: 'min', name: '最小值' }
+                    //     ]
+                    // },
+                    // markLine: {
+                    //     data: [
+                    //         { type: 'average', name: '平均值' }
+                    //     ]
+                    // }
+                },
+
+            ]
+        };
+        return option;
+    }
+
+
+    /**
+     * 图二
+     */
+    function personal_check_type() {
+
+        option = {
+            tooltip: {
+                trigger: 'item',
+                formatter: "服务区温馨服务检查问题类别占比 <br/>{b} : {c}分 ({d}%)"
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            toolbox: {
+                show: true,
+            },
+            calculable: false,
+            series: [{
+                    name: '访问来源',
+                    type: 'pie',
+                    selectedMode: 'single',
+                    radius: [0, 80],
+
+                    // for funnel
+                    x: '20%',
+                    width: '40%',
+                    funnelAlign: 'right',
+                    max: 1548,
+
+                    itemStyle: {
+                        normal: {
+                            label: {
+                                show: true,
+                                formatter: '{b}:\n{c}分({d}%)',
+                                textStyle: {
+                                    alias: 'center',
+                                    fontSize: 10,
+                                    color: '#888'
+                                }
+                            },
+                            labelLine: {
+                                show: true,
+                                length: 80,
+                                lineStyle: {
+                                    color: '#888'
+                                }
+
+                            }
+                        }
+                    },
+                    data: array_points
+                },
+                {
+                    name: '访问来源',
+                    type: 'pie',
+                    radius: [100, 125],
+
+                    // for funnel
+                    x: '60%',
+                    width: '35%',
+                    funnelAlign: 'left',
+                    max: 1048,
+                    itemStyle: {
+                        normal: {
+                            label: {
+                                show: false,
+                                formatter: '{b}:{c}人({d}%)'
+                            },
+                            labelLine: {
+                                show: false
+                            }
+                        }
+                    },
+                    data: array_points2
+                }
+            ]
+        };
+
+        return option;
+    }
+
+});
+
+function setVisit() {
+    if (roleContains("STATION")) {
+        $("#select-dept").attr("disabled", "disabled");
+    }
+}
+
+function getColor(name) {
+
+    var color = new $.zui.Color('#52D017');
+    switch (name) {
+        case "环境卫生":
+            { color = new $.zui.Color('#52D017'); break; }
+        case "仪容仪表着装":
+            { color = new $.zui.Color('#00FFFF'); break; }
+        case "动作":
+            { color = new $.zui.Color('#7F38EC'); break; }
+        case "表情":
+            { color = new $.zui.Color('#FFA500'); break; }
+        case "文明用语":
+            { color = new $.zui.Color('#0000A0'); break; }
+        case "环境卫生":
+            { color = new $.zui.Color('#52D017'); break; }
+        case "工作纪律及行为举止":
+            { color = new $.zui.Color('#48CCCD'); break; }
+        case "便民服务":
+            { color = new $.zui.Color('#FFFF00'); break; }
+        case "安全管理":
+            { color = new $.zui.Color('#00FF00'); break; }
+    }
+    return color;
+}
+
+function getchildColor(name, p) {
+    var color1 = getColor(name);
+
+
+    var color = new $.zui.Color(color1.r - p * 20, color1.g - p * 20, color1.b - p * 20);
+
+    return color;
+}

+ 1285 - 0
VisualInspection/qzd/js/statistics/total_company_statistics.js

@@ -0,0 +1,1285 @@
+var year = new Date().getFullYear();
+var x_m_array = new Array();
+var x_m_array_temp = new Array();
+var date = new Date().getDate();
+var array_year_score = new Array();
+var array_points = new Array();
+var array_points2 = new Array();
+
+var array_road = new Array();
+var array_road_score = new Array();
+var array_road_score_temp = new Array();
+var array_allStation = new Array();
+var array_allStation_score = new Array();
+var array_allStation_score_temp = new Array();
+var array_check_type = new Array();
+
+var map_per_data = new HashMap();
+var map_month_data = new HashMap();
+var array_all_name = new Array()
+var array_all_deptname = new Array()
+
+
+
+var array_points_name = new Array();
+var array_points_pre = new Array();
+var arrar_points_month = new Array();
+var year_assess;
+var points_assess;
+var score_rank;
+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() {
+    // 公用方法,根据当前年月动态将13个月push数组
+    month_method();
+    // 公用方法,月份下拉框
+    // select_option();
+    // 回显当前年月份
+    // $(".div-month select").val(initDate);
+    $.jeDate("#month_date", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+    $("#month_date").val(getCurrentTimeFormat());
+
+    var p = $.zui.store.get('store_param_' + current_url);
+    $.zui.store.set('store_param_' + current_url, null)
+    if (p) {
+        $("#month_date").val(p.time)
+    }
+
+    refresh(true);
+    $(".query-company").click(function() {
+        // var select_month = $("#month_date").val();
+        // flag = false;
+        // console.log(select_month);
+
+        // // 加载图配置
+        // echart();
+        refresh(false);
+    });
+
+
+    function refresh(flag) {
+        // 加载图配置
+        echart(flag);
+        var select_month = $("#month_date").val();
+        // console.log(select_month);
+        init_company_year_assess(select_month.split('/')[0], select_month.split('/')[1]);
+        // 查询图二
+        //	init_company_points_assess("statistics/lost/score/rate",select_month+'');
+        init_company_points_assess("f/statistics/score/info", select_month.split('/')[0], select_month.split('/')[1]);
+        // 查询图三
+        init_road_manager_score_rank_three("f/statistics/score/center/manage/info", select_month + '');
+        // 查询图四
+        init_stationAll_rank_four("f/statistics/score/tollgate/info", select_month + '');
+        // 查询图五
+        init_server_check_type_five("f/statistics/lost/itemscore/rate", select_month + "");
+        // 查询图六
+        init_each_people_points_six("f/statistics/lost/twice/itemscore/rate", select_month + "");
+    }
+    /**
+     * 初始化图一
+     */
+    function init_company_year_assess(y, m) {
+
+        x_m_array = new Array();
+        for (var i = 1; i <= 12; i++) {
+            var month = parseInt(m) + i;
+            var starty = parseInt(y) - 1
+            if (month > 12) {
+                month = month - 12;
+                starty = y;
+            }
+            x_m_array.push(starty + "/" + (month >= 10 ? month : ("0" + month)));
+        }
+
+
+        var param = {
+            "start_date": (parseInt(y) - 1) + "-" + m + "-25" + " 23:00:00",
+            "end_date": y + "-" + (m) + "-25" + " 23:00:00"
+        }
+
+
+        initRqueset("f/statistics/score/year/info", param, 1);
+
+    }
+    // init_company_year_assess();
+    /**
+     * 初始化图二
+     */
+    function init_company_points_assess(url, y, mon) {
+        var starty = y;
+        var startm = parseInt(mon) - 1;
+
+        if (startm <= 0) {
+            startm = 12;
+            starty = parseInt(y) - 1;
+        }
+        var param = {
+            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-25 23:00:00',
+            "end_date": y + '-' + mon + '-25 23:00:00'
+        }
+        initRqueset(url, param, 2);
+    }
+    // init_company_points_assess("statistics/lost/score/rate",initDate+"");
+
+
+    /**
+     * 初始化图三
+     */
+    function init_road_manager_score_rank_three(url, mon) {
+        var param = {
+            "mth": mon
+        };
+        initRqueset(url, param, 3);
+    }
+    // init_road_manager_score_rank_three("statistics/score/center/manage/info",initDate+"");
+
+    /**
+     * 初始化图四
+     */
+    function init_stationAll_rank_four(url, mon) {
+        var param = {
+            "mth": mon
+        };
+        initRqueset(url, param, 4);
+    }
+    // init_stationAll_rank_four("statistics/score/tollgate/info",initDate+"");
+
+    /**
+     * 初始化图五
+     */
+    function init_server_check_type_five(url, mon) {
+        var param = {
+            "mth": mon,
+            "queryType": 0
+        };
+        initRqueset(url, param, 5);
+    }
+    // init_server_check_type_five("statistics/lost/itemscore/rate",initDate+"");
+
+    /**
+     * 初始化图六
+     */
+    function init_each_people_points_six(url, mon) {
+        var prev_mth;
+        // 判断当前年月是否为一月
+        if (parseInt((mon + '').substr(5)) == 1) {
+            prev_mth = ((parseInt((mon + '').substr(0, 4))) - 1) + "/12";
+        } else {
+            var m = (parseInt((mon + '').substr(5)) - 1);
+            if ((parseInt((mon + '').substr(5)) + '').length == 1) {
+                prev_mth = (mon + '').substr(0, 4) + '/' + (m > 9 ? m : "0" + m);
+            } else {
+                prev_mth = (mon + '').substr(0, 4) + '/' + (m > 9 ? m : "0" + m);
+            }
+
+        }
+        var param = {
+            "mth": mon,
+            "prev_mth": prev_mth,
+            "queryType": 0
+        };
+        initRqueset(url, param, 6);
+    }
+    // init_each_people_points_six("statistics/lost/twice/itemscore/rate",initDate+"");
+
+    /**
+     * 请求
+     * @param {*} url
+     * @param {*} param
+     * @param {*} type
+     */
+    function initRqueset(url, param, type) {
+        post_common_service(url, param, function(data) {
+            data_array(data, type);
+            if (type == 1) {
+                // 画图
+                year_assess.setOption(company_year_assess_one());
+            } else if (type == 2) {
+                //array_points= [];
+                // 画图
+                points_assess.setOption(company_points_assess_two());
+            } else if (type == 3) {
+                // 画图
+                score_rank.setOption(road_manager_score_rank_three());
+            } else if (type == 4) {
+                // 画图
+                stationAll_rank.setOption(company_stationAll_rank_four());
+            } else if (type == 5) {
+                // 画图
+                check_type.setOption(server_check_type_five());
+            } else if (type == 6) {
+                // 画图
+                people_points.setOption(each_people_points_six());
+            }
+        }, function(error) {
+            return "";
+        });
+    }
+
+
+    function pushDate(data, organArray, names, appendname) {
+        var temp = [0, 0, 0];
+        for (var i = 0; i < data.list.length; i++) {
+            if (i < organArray[0]) {
+                temp[0] += data.list[i][names];
+            } else if (i < organArray[1]) {
+                temp[1] += data.list[i][names];
+            } else if (i < organArray[2]) {
+                temp[2] += data.list[i][names];
+            }
+        }
+
+        var color1 = "red"
+        var color2 = "red"
+        var color3 = "red"
+        if (appendname == "0-15分") {
+            color1 = "#56A5EC"
+            color2 = "#5CB3FF"
+            color3 = "#82CAFA"
+
+        }
+        if (appendname == "15-50分") {
+            color1 = "#FDD017"
+            color2 = "#FBB917"
+            color3 = "#FFA62F"
+
+        }
+        if (appendname == "50分以上") {
+            color1 = "#8E35EF"
+            color2 = "#8467D7"
+            color3 = "#D462FF"
+        }
+
+
+
+        if (temp[0] != 0) {
+            array_points2.push({ "value": temp[0], "name": '连云港道管', "itemStyle": { "normal": { "color": color1 } } });
+        }
+        if (temp[1] != 0) {
+            array_points2.push({ "value": temp[1], "name": '盐城道管', "itemStyle": { "normal": { "color": color2 } } });
+        }
+        if (temp[2] != 0) {
+            array_points2.push({ "value": temp[2], "name": '南通道管', "itemStyle": { "normal": { "color": color3 } } });
+        }
+    }
+
+    /**
+     * 数组数据
+     * @param {*} data
+     * @param {*} type
+     */
+    function data_array(data, type) {
+        if (type == 1) {
+
+            array_year_score.length = 0;
+            if (data != '' && data.length != 0) {
+
+                x_m_array_temp = new Array();
+                for (var i = 0; i < x_m_array.length; i++) {
+
+                    var index = -1;
+                    for (var j = 0; j < data.length; j++) {
+                        if (x_m_array[i] == data[j].mth) {
+                            index = j;
+                            break;
+                        }
+                    }
+                    if (index < 0) {
+
+                    } else {
+
+                        x_m_array_temp.push(x_m_array[i]);
+                        array_year_score.push(
+                            (1000 - (filter_handler(data[index].all_check_score, data[index].checked_num, 1.0, 0))));
+                    }
+                }
+            } else {
+                array_year_score.length = 0;
+                x_m_array = new Array();
+                x_m_array_temp = new Array();
+            }
+
+
+            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) {
+            // 获得各个道管下面所有服务区的数量
+            debugger
+            var organList = data.organList;
+            var organArray = new Array();
+            var organCount = 0;
+            for (h=0;h<organList.length;h++) {
+                organCount += organList[h].sacount;
+                organArray.push(organCount);
+            }
+
+            array_points2 = [];
+            array_points = [];
+            // console.log(data);
+            if (data != null) {
+                array_points.push({ "value": (data.total0), "name": '满分', "itemStyle": { "normal": { "color": '#48CCCD' } } });
+                array_points.push({ "value": data.total15, "name": '0-15分', "itemStyle": { "normal": { "color": '#38ACEC' } } });
+                array_points.push({ "value": data.total50, "name": '15-50分', "itemStyle": { "normal": { "color": '#FFD801' } } });
+                array_points.push({ "value": data.totalOver50, "name": '50分以上', "itemStyle": { "normal": { "color": '#7F38EC' } } });
+                var temp = [0, 0, 0];
+
+                // 满分
+                for (var i = 0; i < data.list.length; i++) {
+                    if (i < organArray[0]) {
+                        temp[0] += data.list[i].checked_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
+                    } else if (i < organArray[1]) {
+                        temp[1] += data.list[i].checked_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
+                    } else if (i < organArray[2]) {
+                        temp[2] += data.list[i].checked_num - data.list[i].score_fifteen - data.list[i].score_fifty - data.list[i].score_over_fifty;
+                    }
+                }
+                if (temp[0] != 0) {
+                    array_points2.push({ "value": temp[0], "name": '连云港道管', "itemStyle": { "normal": { "color": '#7BCCB5' } } });
+                }
+                if (temp[1] != 0) {
+                    array_points2.push({ "value": temp[1], "name": '盐城道管', "itemStyle": { "normal": { "color": '#3EA99F' } } });
+                }
+                if (temp[2] != 0) {
+                    array_points2.push({ "value": temp[2], "name": '南通道管', "itemStyle": { "normal": { "color": '#008080' } } });
+                }
+                pushDate(data, organArray, 'score_fifteen', '0-15分');
+                pushDate(data, organArray, 'score_fifty', '15-50分');
+                pushDate(data, organArray, 'score_over_fifty', '50分以上');
+            } else {
+                array_points.length = 0;
+            }
+        } else if (type == 3) {
+            array_road.length = 0;
+            array_road_score.length = 0;
+            for (var i = 0; i < data.length; i++) {
+                if (data != '') {
+                    array_road_score.push((1000 - (filter_handler(data[i].all_check_score, data[i].checked_num, 1.0, 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;
+
+            // 给道管中心排名次
+            var rank = new Array();
+            rank[0] = 1;
+            for (var i = 1; i < array_road_score.length; i++) {
+                if (array_road_score[i - 1] == array_road_score[i]) {
+                    rank[i] = rank[i - 1];
+                } else {
+                    rank[i] = i + 1;
+                }
+            }
+            array_road_score_temp = new Array();
+            for (var i = 0; i < array_road_score.length; i++) {
+                array_road.push(data[i].feeStationName + "\n" + (rank[i]));
+                array_road_score_temp.push({ value: array_road_score[i], name: data[i].feeStationName })
+            }
+        } else if (type == 4) {
+            array_allStation_score.length = 0;
+            array_allStation.length = 0;
+            for (var i = 0; i < data.length; i++) {
+                if (data != '' && data.length != 0) {
+
+                    array_allStation_score.push((1000 - (filter_handler(data[i].all_check_score, data[i].checked_num, 1.0, 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;
+
+            // 给收费站排名次
+            var rank = new Array();
+            rank[0] = 1;
+            for (var i = 1; i < array_allStation_score.length; i++) {
+                if (array_allStation_score[i - 1] == array_allStation_score[i]) {
+                    rank[i] = rank[i - 1];
+                } else {
+                    rank[i] = i + 1;
+                }
+            }
+            array_allStation_score_temp = new Array();
+            for (var i = 0; i < array_allStation_score.length; i++) {
+                array_allStation.push(data[i].feeStationName.substr(0, data[i].feeStationName.length - 3) + "\n" + (rank[i]));
+                array_allStation_score_temp.push({ value: array_allStation_score[i], name: data[i].feeStationName })
+            }
+        } else if (type == 5) {
+            array_check_type = [];
+            if (data.length != 0) {
+                var map = new HashMap();
+                for (var i = 0; i < data.length; i++) {
+                    if (map.get(data[i].name) == null) {
+                        map.set(data[i].name, data[i].all_check_score)
+                    } else {
+                        map.set(data[i].name, data[i].all_check_score + map.get(data[i].name))
+                    }
+
+                }
+
+                map.forEach(function(value, key) {
+                    array_check_type.push({ "value": value, "name": key });
+                });
+            } else {
+                array_check_type.length = 0;
+            }
+        } else if (type == 6) {
+            array_all_deptname = new Array();
+            map_month_data = new HashMap();
+            map_per_data = new HashMap();
+
+            // array_points_name.length = 0;
+            // array_points_pre.length = 0;
+            // arrar_points_month.length = 0;
+            if (data != '' && data.list.Pmth.length != 0 || data.list.Tmth.length != 0) {
+                data_each_people_points(data);
+            } else {
+                // array_points_name.length = 0;
+                // array_points_pre.length = 0;
+                // arrar_points_month.length = 0;
+            }
+        }
+    }
+
+    function data_each_people_points(data) {
+        var flag = false;
+        var name = data.itemList;
+        array_all_name = name;
+        // array_all_deptname = ["连云港道管", "盐城道管", "南通道管"];
+        var Tmth = data.list.Tmth;
+        var Pmth = data.list.Pmth;
+
+        for (var i = 0; i < name.length; i++) {
+            
+            for (var j = 0; j < Tmth.length; j++) {
+                flag = false;
+                if (array_all_deptname.length > 0) {
+                    for (var p = 0; p < array_all_deptname.length; p++) {
+                        if (array_all_deptname[p] == Tmth[j].pfeeStationName) {
+                            flag = true;
+                            break;
+                        }
+                    }
+                }
+                if (!flag) {
+                    array_all_deptname.push(Tmth[j].pfeeStationName);
+                }
+
+                if (name[i] == Tmth[j].name) {
+                    if (map_month_data.get(Tmth[j].pfeeStationName) != null) {
+                        var map = map_month_data.get(Tmth[j].pfeeStationName)
+                        if (map.get(name[i]) != null) {
+                            map.set(name[i], map.get(name[i]) + Tmth[j].all_check_score);
+                        } else {
+                            map.set(name[i], Tmth[j].all_check_score);
+                        }
+                        map_month_data.set(Tmth[j].pfeeStationName, map);
+                    } else {
+                        var map = new HashMap();
+                        map.set(name[i], Tmth[j].all_check_score);
+                        map_month_data.set(Tmth[j].pfeeStationName, map);
+                    }
+                }
+
+            }
+
+            for (var j = 0; j < Pmth.length; j++) {
+                flag = false;
+                if (array_all_deptname.length > 0) {
+                    for (var p = 0; p < array_all_deptname.length; p++) {
+                        if (array_all_deptname[p] == Pmth[j].pfeeStationName) {
+                            flag = true;
+                            break;
+                        }
+                    }
+                }
+                if (!flag) {
+                    array_all_deptname.push(Pmth[j].pfeeStationName);
+                }
+                if (name[i] == Pmth[j].name) {
+                    if (map_per_data.get(Pmth[j].pfeeStationName) != null) {
+                        var map = map_per_data.get(Pmth[j].pfeeStationName)
+                        if (map.get(name[i]) != null) {
+                            map.set(name[i], map.get(name[i]) + Pmth[j].all_check_score);
+                        } else {
+                            map.set(name[i], Pmth[j].all_check_score);
+                        }
+                        map_per_data.set(Pmth[j].pfeeStationName, map);
+                    } else {
+                        var map = new HashMap();
+                        map.set(name[i], Pmth[j].all_check_score);
+                        map_per_data.set(Pmth[j].pfeeStationName, map);
+                    }
+                }
+            }
+        }       
+    }
+
+    /**
+     * 除数为0处理
+     * @param {*} num
+     * @param {*} num1
+     * @param {*} num2
+     * @param {*} num4
+     */
+    function filter_handler(num, num1, num2, num4) {
+        if (num1 == 0 || num2 == 0) {
+            return num4;
+        } else {
+            return ((num / num1) / num2).toFixed(2);
+        }
+    }
+
+    /**
+     * 图配置
+     */
+    function echart(flag) {
+        // 路径配置
+        require.config({
+            paths: {
+                echarts: '/js/lib/echarts/build/dist'
+            }
+        });
+        // 使用
+        require(
+            [
+                'echarts',
+                'echarts/theme/macarons',
+                'echarts/chart/line',
+                'echarts/chart/bar',
+                'echarts/chart/pie',
+                'echarts/config'
+            ],
+            function(ec, theme) {
+
+                // 基于准备好的dom,初始化echarts图表
+                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'), theme);
+                people_points = ec.init(document.getElementById('each-people-points'));
+
+                // points_assess.on(ecConfig.EVENT.CLICK, point_c)
+                // score_rank.on(ecConfig.EVENT.CLICK, score_c)
+                // stationAll_rank.on(ecConfig.EVENT.CLICK, station_c)
+
+            }
+        );
+    }
+
+    /**
+     * 图一
+     */
+    function company_year_assess_one() {
+        //debugger;
+        option = {
+            color: ['#00ced1'],
+            tooltip: {
+                trigger: 'axis'
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            legend: {
+                data: ['公司得分']
+            },
+            toolbox: {
+                show: true,
+            },
+            calculable: true,
+            xAxis: [{
+                type: 'category',
+                boundaryGap: false,
+                data: x_m_array_temp
+            }],
+            yAxis: [{
+                type: 'value',
+                min: min_year,
+                max: 1000,
+                axisLabel: {
+                    formatter: '{value}'
+                }
+            }],
+            series: [{
+                    name: '公司得分',
+                    type: 'line',
+                    data: array_year_score,
+                    markPoint: {
+                        data: [
+                            { type: 'max', name: '最大值' },
+                            { type: 'min', name: '最小值' }
+                        ]
+                    },
+                    markLine: {
+                        data: [
+                            { type: 'average', name: '平均值' }
+                        ]
+                    }
+                },
+
+            ]
+        };
+        return option;
+    }
+
+
+    /**
+     * 图二
+     */
+    function company_points_assess_two() {
+        option = {
+            tooltip: {
+                trigger: 'item',
+                formatter: "公司考核扣分占比 <br/>{b} : {c}次 ({d}%)"
+            },
+
+            toolbox: {
+                show: true,
+            },
+            calculable: false,
+            series: [{
+                    name: '访问来源',
+                    type: 'pie',
+                    selectedMode: 'single',
+                    radius: [0, 80],
+
+                    // for funnel
+                    x: '20%',
+                    width: '40%',
+                    funnelAlign: 'right',
+                    max: 1548,
+
+                    itemStyle: {
+                        normal: {
+                            label: {
+                                show: true,
+                                formatter: '{b}:\n{c}次({d}%)',
+                                textStyle: {
+                                    alias: 'center',
+                                    fontSize: 10,
+                                    color: '#888'
+                                }
+                            },
+                            labelLine: {
+                                show: true,
+                                length: 50,
+                                lineStyle: {
+                                    color: '#888'
+                                }
+
+                            }
+                        }
+                    },
+                    data: array_points
+                },
+                {
+                    name: '访问来源',
+                    type: 'pie',
+                    radius: [100, 125],
+
+                    // for funnel
+                    x: '60%',
+                    width: '35%',
+                    funnelAlign: 'left',
+                    max: 1048,
+                    itemStyle: {
+                        normal: {
+                            label: {
+                                show: false,
+                                formatter: '{b}:{c}次({d}%)'
+                            },
+                            labelLine: {
+                                show: false
+                            }
+                        }
+                    },
+                    data: array_points2
+                }
+            ]
+        };
+
+
+        return option;
+    }
+
+    /**
+     * 图三
+     */
+    function road_manager_score_rank_three() {
+        option = {
+            color: ['#00ced1'], // 条形图颜色
+            tooltip: {
+                trigger: 'axis'
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            grid: {
+                width: "75%",
+
+            },
+            calculable: true,
+            xAxis: [{
+                axisLabel: {
+                    interval: 0
+                },
+                type: 'category',
+                data: array_road
+            }],
+            yAxis: [{
+                type: 'value',
+                min: min_road,
+                max: 1000
+            }],
+            series: [{
+
+                type: 'bar',
+                data: array_road_score_temp,
+                itemStyle: {
+                    normal: {
+                        label: {
+                            show: true,
+                            position: 'insideTop'
+                        }
+                    }
+                },
+                markLine: {
+                    data: [
+                        { type: 'average', name: '平均值' }
+                    ]
+                }
+            }]
+        };
+
+        return option;
+    }
+
+    /**
+     * 图四
+     */
+    function company_stationAll_rank_four() {
+        option = {
+            color: ['#00ced1'], // 条形图颜色
+            tooltip: {
+                trigger: 'axis'
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            legend: {
+                data: ['公司全体服务区得分']
+            },
+            calculable: true,
+            xAxis: [{
+                axisLabel: {
+                    interval: 0
+                },
+                type: 'category',
+                data: array_allStation
+            }],
+            yAxis: [{
+                type: 'value',
+                min: min_allStation,
+                max: 1000
+            }],
+            series: [{
+                name: '公司全体服务区得分',
+                type: 'bar',
+                data: array_allStation_score_temp,
+                itemStyle: {
+                    normal: {
+                        label: {
+                            show: true,
+                            position: 'insideTop'
+                        }
+                    }
+                },
+                markLine: {
+                    data: [
+                        { type: 'average', name: '平均值' }
+                    ]
+                }
+            }]
+        };
+
+        return option;
+    }
+
+    /**
+     * 图五
+     */
+    function server_check_type_five() {
+        option = {
+            tooltip: {
+                trigger: 'item',
+                formatter: "温馨服务检查占比 <br/>{b} : {c}分 ({d}%)"
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            toolbox: {
+                show: true,
+                feature: {
+
+                    magicType: {
+
+                        type: ['pie', 'funnel'],
+                        option: {
+                            funnel: {
+                                x: '25%',
+                                width: '50%',
+                                funnelAlign: 'left',
+                                max: 1548
+                            }
+                        }
+                    },
+                }
+            },
+            calculable: true,
+            series: [{
+                name: '访问来源',
+                type: 'pie',
+                radius: '55%',
+                center: ['50%', '50%'],
+                data: array_check_type,
+                itemStyle: {
+                    normal: {
+                        label: {
+                            show: true,
+                            formatter: '{b} :\n{c}分 ({d}%)'
+                        },
+                        labelLine: { show: true }
+                    }
+                }
+            }]
+        };
+        return option;
+    }
+
+    /**
+     * 图六
+     */
+    function each_people_points_six() {
+
+        var t_map_p = new HashMap();
+        var t_map_c = new HashMap();
+
+
+        var sdata = new Array();
+
+        for (var j = 0; j < array_all_deptname.length; j++) {
+            var dept = array_all_deptname[j]
+
+            if (map_per_data.get(dept) != null) {
+                var data_a = new Array();
+                var d_t = map_per_data.get(dept);
+                for (var i = 0; i < array_all_name.length; i++) {
+                    var name = array_all_name[i];
+                    data_a.push(d_t.get(name) == null ? 0 : d_t.get(name));
+
+                    if (t_map_p.get(name) == null) {
+                        t_map_p.set(name, d_t.get(name) == null ? 0 : d_t.get(name))
+                    } else {
+                        t_map_p.set(name, t_map_p.get(name) + (d_t.get(name) == null ? 0 : d_t.get(name)));
+                    }
+                }
+                var d_tt = {
+                    name: dept,
+                    type: 'bar',
+                    stack: '上月',
+                    barGap: 5,
+                    barCategoryGap: 20,
+                    data: data_a
+                }
+                if (j == array_all_deptname.length - 1) {
+                    d_tt['itemStyle'] = {
+                        normal: {
+                            label: {
+                                show: true,
+                                position: 'top',
+                                formatter: function(params) {
+                                    var name = params.name
+                                    if (name == '仪表') {
+                                        name = '仪容仪表着装';
+                                    }
+                                    if (name == '行为') {
+                                        name = '工作纪律及行为举止';
+                                    }
+
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
+                                },
+                                textStyle: {
+                                    color: 'blue'
+                                }
+                            }
+                        }
+                    }
+                }
+                sdata.push(d_tt);
+            } else {
+                var data_a = new Array();
+                for (var i = 0; i < array_all_name.length; i++) {
+                    var name = array_all_name[i];
+                    data_a.push(0);
+
+                    if (t_map_p.get(name) == null) {
+                        t_map_p.set(name, 0)
+                    } else {
+                        t_map_p.set(name, t_map_p.get(i) + 0);
+                    }
+                }
+                var d_tt = {
+                    name: dept,
+                    type: 'bar',
+                    stack: '上月',
+                    data: data_a
+                }
+                if (j == array_all_deptname.length - 1) {
+                    d_tt['itemStyle'] = {
+                        normal: {
+                            label: {
+                                show: true,
+                                position: 'top',
+                                formatter: function(params) {
+                                    var name = params.name
+                                    if (name == '仪表') {
+                                        name = '仪容仪表着装';
+                                    }
+                                    if (name == '行为') {
+                                        name = '工作纪律及行为举止';
+                                    }
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
+                                },
+                                textStyle: {
+                                    color: 'blue'
+                                }
+                            }
+                        }
+                    }
+                }
+                sdata.push(d_tt);
+            }
+            if (map_month_data.get(dept) != null) {
+                var data_a = new Array();
+                var d_t = map_month_data.get(dept);
+                for (var i = 0; i < array_all_name.length; i++) {
+                    var name = array_all_name[i];
+                    data_a.push(d_t.get(name) == null ? 0 : d_t.get(name));
+
+                    if (t_map_c.get(name) == null) {
+                        t_map_c.set(name, d_t.get(name) == null ? 0 : d_t.get(name))
+                    } else {
+                        t_map_c.set(name, t_map_c.get(name) + (d_t.get(name) == null ? 0 : d_t.get(name)));
+                    }
+                }
+                var d_tt = {
+                    name: dept,
+                    type: 'bar',
+                    stack: '本月',
+                    data: data_a
+                }
+                if (j == array_all_deptname.length - 1) {
+                    d_tt['itemStyle'] = {
+
+                        normal: {
+                            label: {
+                                show: true,
+                                position: 'top',
+                                formatter: function(params) {
+                                    var name = params.name
+                                    if (name == '仪表') {
+                                        name = '仪容仪表着装';
+                                    }
+                                    if (name == '行为') {
+                                        name = '工作纪律及行为举止';
+                                    }
+
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
+                                },
+                                textStyle: {
+                                    color: 'red'
+                                }
+                            }
+                        }
+                    }
+                }
+                sdata.push(d_tt);
+            } else {
+                var data_a = new Array();
+                for (var i = 0; i < array_all_name.length; i++) {
+                    var name = array_all_name[i];
+                    data_a.push(0);
+                    if (t_map_c.get(name) == null) {
+                        t_map_c.set(name, 0)
+                    } else {
+                        t_map_c.set(name, t_map_c.get(name) + 0);
+                    }
+                }
+                var d_tt = {
+                    name: dept,
+                    type: 'bar',
+                    stack: '本月',
+                    data: data_a
+                }
+                if (j == array_all_deptname.length - 1) {
+                    d_tt['itemStyle'] = {
+                        normal: {
+                            label: {
+                                show: true,
+                                position: 'top',
+                                formatter: function(params) {
+                                    var name = params.name
+                                    if (name == '仪表') {
+                                        name = '仪容仪表着装';
+                                    }
+                                    if (name == '行为') {
+                                        name = '工作纪律及行为举止';
+                                    }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+
+                                    return '本月\n' + v;
+                                },
+                                textStyle: {
+                                    color: 'red'
+                                }
+                            }
+                        }
+                    }
+                }
+                sdata.push(d_tt);
+            }
+        }
+
+        var maxvaluedata = 0;
+        t_map_c.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+        t_map_p.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+
+
+
+        var namelist = new Array();
+        for (var i = 0; i < array_all_name.length; i++) {
+            var name = array_all_name[i];
+            if (name == '仪容仪表着装') {
+                name = '仪表';
+            }
+            if (name == '工作纪律及行为举止') {
+                name = '行为';
+            }
+            namelist.push(name);
+        }
+
+
+        option = {
+            tooltip: {
+                trigger: 'axis',
+                axisPointer: { // 坐标轴指示器,坐标轴触发有效
+                    type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
+                },
+                formatter: function(params, ticket, callback) {
+                    var name = "";
+                    var content = "";
+                    if (params.length > 0) {
+                        for (var i = 0; i < params.length; i++) {
+                            var p = params[i];
+                            name = p.name;
+                            if (p.series.stack == "本月") {
+                                content += "<br>本月 " + p.seriesName.replace("道管中心", "") + ":" + p.value + "分"
+                            } else {
+                                content += "<br>上月 " + p.seriesName.replace("道管中心", "") + ":" + p.value + "分"
+                            }
+                        }
+                    }
+                    return name + content;
+                }
+            },
+            noDataLoadingOption: {
+                text: '暂无数据',
+                effect: 'bubble',
+                effectOption: {
+                    effect: {
+                        n: 0 //气泡个数为0
+                    }
+                },
+                textStyle: {
+                    fontSize: 20,
+                    fontFamily: 'cursive',
+                    fontWeight: 'bold'
+                }
+            },
+            grid: {
+                width: "80%",
+            },
+            legend: {
+                data: array_all_deptname
+            },
+            calculable: true,
+            xAxis: [{
+                type: 'category',
+                data: namelist
+            }],
+            yAxis: [{
+                type: 'value',
+                max: (maxvaluedata + 200)
+            }],
+            series: sdata
+        };
+        return option;
+    }
+
+
+});
+
+var ecConfig = require('echarts/config');
+
+
+// var temp_time = null;
+// var road_p = null;
+// var station_p = null;
+
+function point_c(param) {
+    if (typeof param.seriesIndex == 'undefined') {
+        return;
+    }
+    if (param.type == 'click') {
+
+        var pdata = {
+            time: $("#month_date").val()
+        }
+
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/fwq/view/statistics/assess_situation.html");
+
+    }
+}
+
+function score_c(param) {
+    if (typeof param.seriesIndex == 'undefined') {
+        return;
+    }
+    if (param.type == 'click') {
+
+        var pdata = {
+            time: $("#month_date").val()
+        }
+
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+        $.zui.store.set('page_data_param_road_p', param.data.name);
+
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/fwq/view/statistics/road_manage_statistics.html");
+    }
+}
+
+function station_c(param) {
+    if (typeof param.seriesIndex == 'undefined') {
+        return;
+    }
+    if (param.type == 'click') {
+        var pdata = {
+            time: $("#month_date").val()
+        }
+        $.zui.store.set('page_data_param_temp_time', $("#month_date").val());
+
+
+
+        var stationlist = $.zui.store.get("cache_fee_station_list");
+        var roadlist = $.zui.store.get("cache_road_manager_list");
+
+        for (var i in stationlist) {
+            if (stationlist[i].name == param.data.name) {
+                for (var j in roadlist) {
+                    if (roadlist[j].deptid == stationlist[i].parentid) {
+                        $.zui.store.set('page_data_param_road_p', roadlist[j].name);
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+        $.zui.store.set('page_data_param_station_p', param.data.name);
+        $.zui.store.set('store_param_' + current_url, pdata);
+        isnew = false;
+        changePage("/fwq/view/statistics/toll_station_statistics.html");
+    }
+}

+ 407 - 0
VisualInspection/qzd/js/task/add.js

@@ -0,0 +1,407 @@
+var selectedData = { cols: [], array: [] };
+var checkusersselect = null;
+var checkuserlist = null;
+var tabledatagride = null;
+$(document).ready(function() {
+    $.jeDate("#month_date", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+    $("#month_date").val(getCurrentTimeFormat());
+    var checked_dept = null;
+    if (roleContains("SERVICEAREA")) {
+        checked_dept = getCurrentUser().organid;
+    }
+    setSASelecttemp("#fwq", checked_dept);
+
+    //默认值 $("#fwq").val()
+    var dd = 89;
+    if ($("#fwq").val() != "") {
+        dd = $("#fwq").val();
+    }
+    inittAreaable($("#month_date").val(), dd);
+
+    initselecttable();
+
+    laydate.render({
+        elem: '#starttime',
+        type: 'time'
+    });
+    laydate.render({
+        elem: '#endtime',
+        type: 'time'
+    });
+
+
+
+
+});
+
+var arealist = null;
+var stimemonth = null;
+
+function initselecttable() {
+    selectedData = { cols: [], array: [], cache: false };
+    selectedData.cols.push({ width: 0.3, name: "time", label: '时间', style: { 'text-align': 'center', 'line-height': '34px' } });
+    selectedData.cols.push({ width: 0.2, name: "dept_name", label: '部门', style: { 'text-align': 'center', 'line-height': '34px' } });
+    selectedData.cols.push({ width: 0.2, name: "area_name", label: '区域', style: { 'text-align': 'center', 'line-height': '34px' } });
+    selectedData.cols.push({ width: 0.3, name: "option", label: '操作', html: true, style: { 'text-align': 'center', 'line-height': '34px' } });
+    reloadtable();
+
+}
+
+function reloadtable() {
+
+    $('#selected_table').datagrid({
+        dataSource: selectedData,
+        states: { fixedTopUntil: 0 },
+        rowDefaultHeight: 50,
+        height: 200,
+    });
+
+}
+var layindex = null;
+var taskMap = new HashMap();
+
+function inittAreaable(time, dept) {
+
+    layindex = layer.load(0, { shade: false });
+    var t = time.replace("/", "-") + "";
+    var endtime = moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss");
+    var starttime = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+
+
+    var param1 = { "start_time": starttime.format("YYYY-MM-DD HH:mm:ss"), "end_time": endtime.format("YYYY-MM-DD HH:mm:ss"), "checked_dept": dept }
+    post_common_service("/f/task/getall/0/0", param1, function(taskdata) {
+
+        taskMap = new HashMap();
+        taskdata.forEach(t => {
+            var key = t.area_id + "_" + moment(t.start_time).format("YYYY-MM-DD");
+            if (taskMap.get(key) != null) {
+                var list = taskMap.get(key);
+                list.push(t);
+                taskMap.set(key, list);
+            } else {
+                var list = [];
+                list.push(t);
+                taskMap.set(key, list);
+            }
+
+        });
+
+
+        var param = { "dept_id": dept };
+        post_common_service('/f/area/getall', param, function(redata) {
+
+            layer.close(layer.index);
+            var data = redata.areas;
+            checkuserlist = redata.checkusers;
+
+            var datac = { cols: [], array: [] };
+
+            var days = endtime.diff(starttime, 'days');
+
+            datac.cols.push({ width: 120, name: 'type', label: "", });
+
+            for (var i = 1; i <= days; i++) {
+                var temp = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                var currentday = temp.add(i, "day");
+                var day = currentday.date();
+                datac.cols.push({ width: 80, name: "day_" + i, label: currentday.format("MM-DD"), html: true, className: "table_content" });
+            }
+            arealist = data;
+            stimemonth = time;
+
+            for (var index in data) {
+                var area = data[index];
+                var data_table = {};
+                data_table.type = area.name;
+                for (var i = 1; i <= days; i++) {
+                    //内容
+                    var temp = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                    var currentday = temp.add(i, "day");
+                    var key = area.id + "_" + currentday.format("YYYY-MM-DD");
+
+                    var temphtml = "";
+
+                    if (taskMap.get(key) != null) {
+                        //存在稽查记录
+                        var list = taskMap.get(key);
+                        var hasc = 0;
+                        var invc = 0;
+                        list.forEach(t => {
+                            if (t.check_status == 4 || t.check_status == 16 || t.check_status == 6) {
+                                //完成稽查
+                                hasc++;
+                            }
+                            if (t.check_status == 22) {
+                                //存在无效任务
+                                invc++;
+                            }
+                        });
+                        //无效
+                        if (invc == list.length) {
+                            temphtml = '<div class="btn-group btn_c" data-toggle="buttons" id="div_' + area.id + '_' + i + '" >' +
+                                '<label class="btn btn-info6" >' +
+                                '<input type="checkbox" name="options" onchange="selectedTask(this)" id="' + area.id + '_' + i + '"> 无效' +
+                                '</label>';
+                        } else
+                        //已完成
+                        if (hasc + invc == list.length) {
+                            temphtml = '<div class="btn-group btn_c" data-toggle="buttons"  id="div_' + area.id + '_' + i + '">' +
+                                '<label class="btn btn-info5 " >' +
+                                '<input type="checkbox" name="options" onchange="selectedTask(this)" id="' + area.id + '_' + i + '"> 已稽查' +
+                                '</label>';
+                        } else {
+                            //进行中
+                            temphtml = '<div class="btn-group btn_c" data-toggle="buttons" id="div_' + area.id + '_' + i + '" >' +
+                                '<label class="btn btn-info3" >' +
+                                '<input type="checkbox" name="options" onchange="selectedTask(this)" id="' + area.id + '_' + i + '"> 稽查中' +
+                                '</label>';
+                        }
+
+
+                    } else {
+                        //不存在稽查
+                        temphtml = '<div class="btn-group btn_c" data-toggle="buttons" id="div_' + area.id + '_' + i + '" >' +
+                            '<label class="btn btn-info2" >' +
+                            '<input type="checkbox" name="options" onchange="selectedTask(this)" id="' + area.id + '_' + i + '"> 待稽查' +
+                            '</label>';
+                    }
+
+                    data_table["day_" + i] = temphtml;
+                }
+                datac.array.push(data_table);
+            }
+
+            if (tabledatagride != null) {
+                tabledatagride.dataSource.data = null;
+                tabledatagride.setDataSource(datac);
+                tabledatagride.setPager(1, datac.array.length, datac.array.length);
+                tabledatagride.render();
+            } else {
+                $('#table_s').datagrid({
+                    dataSource: datac,
+                    states: { fixedLeftUntil: 1, fixedTopUntil: 0 },
+                    showRowIndex: false,
+
+                    onRender: function() {
+
+
+
+                        $(".btn_c").mouseover(function() {
+                            var tempids = this.id.split("_");
+                            var t = stimemonth.replace("/", "-") + "";
+                            var starttime = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                            var ctime = starttime.add(tempids[2], "day");
+                            var key = tempids[1] + "_" + ctime.format("YYYY-MM-DD");
+                            if (taskMap.get(key) != null) {
+                                var temphtml = "";
+                                var list = taskMap.get(key);
+
+                                list.forEach(t => {
+                                    var startus = "";
+                                    if (t.check_status == 4 || t.check_status == 16 || t.check_status == 6) {
+                                        startus = "已完成";
+                                    } else
+                                    if (t.check_status == 22) {
+                                        startus = "无效";
+                                    } else {
+                                        startus = "进行中";
+                                    }
+                                    temphtml += '<tr><td>' + moment(t.start_time).format("HH:mm:ss") + '</td><td>' + moment(t.end_time).format("HH:mm:ss") + '</td><td>' + startus + '</td></tr>';
+                                });
+
+                                var thtml = '<table border=1 style="border:solid 1px;width:180px;"><tr><th>开始时间</th><th>结束时间</th><th>状态</th></tr>' + temphtml + '</table>';
+                                layer.tips(thtml, "#" + this.id, {
+                                    tips: [1, '#8e8e8e'],
+                                    time: 0,
+                                    width: '240px'
+                                });
+                            }
+                        });
+                        $(".btn_c").mouseout(function() {
+                            layer.close(layer.index);
+                        });
+
+
+                    },
+                    configs: {
+                        C1: { className: "datagrid-cell-index", style: { 'text-align': 'center', } },
+                        R0: { style: { 'text-align': 'center', 'line-height': '36px' } }
+                    }
+                });
+                tabledatagride = $('#table_s').data('zui.datagrid');
+            }
+
+
+
+
+            for (var index in checkuserlist) {
+                var p = checkuserlist[index];
+                p.title = p.truename;
+            }
+
+
+            if (checkusersselect != null) {
+                reset();
+            } else {
+                checkusersselect = $('#check_users').comboTree({
+                    source: checkuserlist,
+                    isMultiple: true
+                });
+            }
+
+        });
+
+    });
+}
+
+function reset() {
+    initselecttable();
+    var myDataGrid = $('#selected_table').data('zui.datagrid');
+    myDataGrid.dataSource.data = null;
+    myDataGrid.setDataSource(selectedData);
+    myDataGrid.setPager(1, selectedData.array.length, selectedData.array.length);
+    myDataGrid.render();
+
+    if (checkusersselect != null) {
+        $("#check_users").val("");
+        checkusersselect.unbind();
+        checkusersselect.closeDropDownMenu();
+        checkusersselect.bindings();
+        $(".ComboTreeItemChlid").find("input").prop('checked', false);
+
+
+    }
+    $("#starttime").val("");
+    $("#endtime").val("");
+
+
+
+}
+
+
+function selectedTask(obj) {
+    changeListItem(obj.id);
+
+}
+
+function removeListItem(obj) {
+    var ids = obj.id.split("delete_");
+
+    $("#" + ids[1]).parent().removeClass("active");
+    $("#" + ids[1]).prop("checked", false);
+    changeListItem(ids[1]);
+
+}
+
+function changeListItem(id) {
+    var tempids = id.split("_");
+    var t = stimemonth.replace("/", "-") + "";
+    var starttime = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+    var ctime = starttime.add(tempids[1], "day");
+    var carea = null;
+    for (var i in arealist) {
+        var a = arealist[i];
+        if (a.id == tempids[0]) {
+            carea = a;
+        }
+    }
+
+
+    if ($("#" + id).prop('checked')) {
+        addlisttable(carea, ctime, id);
+    } else {
+        removelisttable(carea, ctime);
+    }
+}
+
+
+function addlisttable(area, time, id) {
+    var feeList = $.zui.store.get("cache_sa_station_list");
+    var dept_info = null;
+    for (var index in feeList) {
+        var dept = feeList[index];
+        if (area.dept_id == dept.deptid) {
+            dept_info = dept;
+        }
+    }
+    id = trim(id);
+    var btn = '<button class="btn btn-primary" type="button" onclick="removeListItem(this)" id="delete_' + id + '">删除</button>';
+    selectedData.array.push({ "time": time.format("YYYY-MM-DD"), "dept_name": dept_info.name, "area_name": area.name, "option": btn, areaInfo: area, deptInfo: dept_info });
+
+    var myDataGrid = $('#selected_table').data('zui.datagrid');
+    myDataGrid.dataSource.data = null;
+    myDataGrid.setDataSource(selectedData);
+    myDataGrid.setPager(1, selectedData.array.length, selectedData.array.length);
+    myDataGrid.render();
+
+    // $('#selected_table').data('zui.datagrid').setDataSource(selectedData);
+    // $('#selected_table').data('zui.datagrid').renderData();
+}
+
+function removelisttable(area, time) {
+    for (var index in selectedData.array) {
+        var o = selectedData.array[index];
+        if (o != null && o.areaInfo.id == area.id && time.format("YYYY-MM-DD") == o.time) {
+            selectedData.array.splice(index, 1);
+        }
+    }
+    var myDataGrid = $('#selected_table').data('zui.datagrid');
+    myDataGrid.dataSource.data = null;
+    myDataGrid.setDataSource(selectedData);
+    myDataGrid.setPager(1, selectedData.array.length, selectedData.array.length);
+
+    myDataGrid.render();
+    //reloadtable();
+}
+
+
+
+function search() {
+    inittAreaable($("#month_date").val(), $("#fwq").val());
+
+}
+
+
+function addTask() {
+    //获取列表
+    var tasklist = selectedData.array;
+    var start_time = $("#starttime").val();
+    var end_time = $("#endtime").val();
+
+    if (start_time == "" || end_time == "") {
+        layer.msg('须选择稽查时间段!', {
+            time: 2000, //20s后自动关闭
+        });
+        return;
+    }
+    if (moment("2018-01-01 " + end_time).valueOf() - moment("2018-01-01 " + start_time).valueOf() < 15 * 60 * 1000) {
+        layer.msg('稽查时间段需满足15分钟以上!', {
+            time: 2000, //20s后自动关闭
+        });
+        return;
+    }
+    if (tasklist.length < 1) {
+        layer.msg('未选择任务区域!', {
+            time: 2000, //20s后自动关闭
+        });
+        return;
+    }
+
+
+    var check_user_list = checkusersselect.getSelectedItemsId();
+    tasklist.forEach(t => {
+        t.start_time = t.time + " " + start_time;
+        t.end_time = t.time + " " + end_time;
+    });
+
+    var param = { "userids": check_user_list, "checkAreaData": tasklist };
+    post_common_service('/f/task/add', param, function(redata) {
+        // layer.msg('已添加', { icon: 1 });
+        inittAreaable($("#month_date").val(), $("#fwq").val());
+    });
+
+
+}

+ 193 - 0
VisualInspection/qzd/js/task/apply_task.js

@@ -0,0 +1,193 @@
+function initApplyPage() {
+    // 仅选择日期
+    $.jeDate("#start_time", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+    $("#start_time").val(getCurrentTimeFormat());
+
+    setSASelect("#fsList");
+
+
+    var page_params = $.zui.store.get("page_params");
+    if (page_params && page_params.status) {
+        cur_status = page_params.status;
+    }
+    if (cur_status == 21) {
+        $("#agreePatchBtn").show();
+    }
+    $("#check_zc").attr("checked", true);
+    $("#check_ss").attr("checked", true);
+
+    queryUnexaminedTask();
+}
+//初始化表行按钮
+function initTableRowBtn() {
+    $.zui.store.set("task_table_btn_21_" + ROLE_JICHA_ADMIN, [{ func: 'showCheck', text: '复查', icon_class: 'icon-eye-open' },
+        { func: 'showApplyDetail', text: '处理', icon_class: 'icon-eye-open' }
+    ]);
+    $.zui.store.set("task_table_btn_21_" + ROLE_JICHA, [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_22", [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-tasks' }]);
+    $.zui.store.set("task_table_btn_23", [{ func: 'showApplyDetail1', text: '详情', icon_class: 'icon-tasks' }]);
+}
+
+function queryUnexaminedTask() {
+    initTableRowBtn();
+    var t = getTimeByMonth($("#start_time").val());
+
+
+    var check_ss = $("#check_ss").prop("checked");
+    var check_zc = $("#check_zc").prop("checked");
+
+
+
+    var data = {
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
+        "checked_dept": $("#fsList").val(),
+        "checked_person": $("#feePersonList").val(),
+        "check_status": cur_status,
+        "invalidFrom": (check_ss && check_zc) ? -1 : (check_ss ? 1 : (check_zc ? 0 : -2))
+    };
+
+
+    var hide = false;
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
+        hide = true;
+    }
+    var cols = [
+        { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
+        { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' }
+        // {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
+        // {width: 100, text: '操作', type: 'string', flex: true, field: 'id',
+        //     oper:[
+        //         {func:'showApplyDetail',text:'处理',icon_class:'icon-hand-up'}
+        //     ]
+        // }
+    ];
+    var colFunc = { width: 120, text: '操作', type: 'string', flex: true, field: 'id' };
+    if (cur_status == 21) {
+        if (hasRole(ROLE_JICHA)) {
+            colFunc.oper = $.zui.store.get("task_table_btn_" + cur_status + "_" + ROLE_JICHA);
+        } else if (ROLE_JICHA_ADMIN) {
+            colFunc.oper = $.zui.store.get("task_table_btn_" + cur_status + "_" + ROLE_JICHA_ADMIN);
+        }
+    } else {
+        colFunc.oper = $.zui.store.get("task_table_btn_" + cur_status);
+    }
+    cols.push(colFunc);
+    var checkable = false;
+    if (cur_status == 21 && hasRole(ROLE_JICHA_ADMIN)) {
+        checkable = true;
+    }
+    $('#unexamined_datatable').mytable({
+        'cols': cols,
+        'checkable': checkable,
+        'url': "/f/task/getall/",
+        'param': data
+    });
+}
+//进入稽查页面
+function showCheck(id) {
+    $.checkTask = getItemByIdFromArr(id, $('#unexamined_datatable').mytable('getTableData'));
+    if (typeof($.checkTask) != "undefined" && typeof($.checkTask.appeal) != "undefined") {
+        $.checkTask.appeal = null;
+    }
+
+    //开始稽查
+    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 21, "record_status": 1, "check_status_name": "复查" });
+    changePage("/fwq/view/task/check.html");
+}
+
+function showApplyDetail1(id) {
+    layer.open({
+        type: 1,
+        area: ['400px', '500px'],
+        title: '申请处理',
+        closeBtn: 1,
+        shadeClose: true,
+        skin: 'layui-layer-lan',
+        content: $('#apply_detail_div'),
+        btn: ['关闭'],
+        btnAlign: 'c', //按钮居中
+        shade: 0, //不显示遮罩
+        yes: function(index) {
+            layer.close(index);
+        }
+    });
+    var param = {
+        'id': id
+    };
+    $('#apply_man').val("");
+    $('#apply_time').val("");
+    $('#apply_reason').val("");
+    $('#apply_id').val("");
+    post_common_service('/f/checkApply/getByTaskId', param, function(data) {
+        $('#apply_man').val(data.apply_man_name);
+        $('#apply_time').val(data.apply_time);
+        $('#apply_reason').val(data.apply_reason);
+        $('#apply_id').val(data.id);
+    });
+}
+
+function showApplyDetail(id) {
+    layer.open({
+        type: 1,
+        area: ['400px', '500px'],
+        title: '申请处理',
+        closeBtn: 1,
+        shadeClose: true,
+        skin: 'layui-layer-lan',
+        content: $('#apply_detail_div'),
+        btn: ['同意', '拒绝'],
+        btnAlign: 'c', //按钮居中
+        shade: 0, //不显示遮罩
+        yes: function(index) {
+            aggreeApply(id);
+            layer.close(index);
+        },
+        btn2: function(index) {
+            refuseApply(id)
+            layer.close(index);
+        }
+    });
+    var param = {
+        'id': id
+    };
+    $('#apply_man').val("");
+    $('#apply_time').val("");
+    $('#apply_reason').val("");
+    $('#apply_id').val("");
+    post_common_service('/f/checkApply/getByTaskId', param, function(data) {
+        $('#apply_man').val(data.apply_man_name);
+        $('#apply_time').val(data.apply_time);
+        $('#apply_reason').val(data.apply_reason);
+        $('#apply_id').val(data.id);
+    });
+}
+
+function aggreeApply(taskId) {
+    var param = {
+        'id': $('#apply_id').val(),
+        'task_id': taskId
+    };
+    addOrUpdateItem4Common(param, '/f/checkApply/agree', queryUnexaminedTask);
+}
+
+function refuseApply(taskId) {
+    var param = {
+        'id': $('#apply_id').val(),
+        'task_id': taskId
+    };
+    addOrUpdateItem4Common(param, '/f/checkApply/refuse', queryUnexaminedTask);
+}
+
+function agreeApplyTaskPatch() {
+    var param = {
+        'apply_ids': $('#unexamined_datatable').mytable('getTableCheckedIds')
+    };
+    addOrUpdateItem4Common(param, '/f/checkApply/agreePatch', queryUnexaminedTask);
+}

+ 972 - 0
VisualInspection/qzd/js/task/check.js

@@ -0,0 +1,972 @@
+function initCheck() {
+    addBreadMenu("/fwq/view/task/check.html", "服务区视频稽查");
+    $('#ex1').slider({ tooltip: 'hide' });
+    $("#ex1").on("slideStop", function(slideEvt) {
+        setVideoProcess(slideEvt.value);
+    });
+
+    //滑动快进
+    $("#ex1").on("change", function(sender) {
+        var width = $("#ex1").siblings(".slider").children(".slider-track").children(".slider-selection").width();
+        var total_width = $("#ex1").siblings(".slider").children(".slider-track").width();
+        var sp_width = $("#ex1_span").width();
+
+
+        var left = ((total_width - width) < (sp_width / 2.0)) ? (total_width - sp_width / 2.0 - 25) : (width - sp_width / 2.0) + 25
+        $("#ex1_span").css("left", ((left > 25 ? left : 25)) + "px")
+
+        if ($.checkTask) {
+            var time = moment($.checkTask.start_time);
+            var pos = $("#video_pos").val();
+            if ($("#full_video_pos").length > 0) {
+                pos = $("#full_video_pos").val();
+            }
+            var c_time = time.add(sender.value.newValue, "s");
+            if (/^(\+|-)?\d+($|\.\d+$)/.test(pos)) {
+                if (pos > 0) {
+                    c_time = time.add(Math.abs(pos), "s");
+                } else {
+                    c_time = time.subtract(Math.abs(pos), "s");
+                }
+            }
+
+
+            $("#ex1_span").html(c_time.format("YYYY-MM-DD HH:mm:ss"))
+        }
+    });
+
+
+
+    $("#tabcontent").css("height", ($("#video_content").height() - 80) + "px");
+    $("#score_datatable").css("height", ($("#video_content").height() - 120) + "px");
+    //设置视屏位置
+    if (ISCLIENT) {
+        event = document.createEvent('MessageEvent');
+        var origin = window.location.protocol + '//' + window.location.host;
+        event.initMessageEvent('setvideoposition', true, true, getVideoPosition(null), origin, 1234, window, null);
+        document.dispatchEvent(event);
+    }
+
+
+
+
+    if ($.checkTask) {
+        getAreaCheckCount();
+        initCheckAppealBtns();
+
+        $("#taskName").html($.checkTask.name);
+        $("#ex1_span").html($.checkTask.start_time)
+        $("#full_ex1_span").html($.checkTask.start_time)
+
+        $("#lane").val($.checkTask.checked_location);
+        $("#check_time").html($.checkTask.check_period);
+
+
+
+        //TODO 获取分数
+        queryCheckScores();
+
+        //TODO 查询录像播放列表
+
+    }
+
+
+}
+
+function setfastorslow(type, speed) {
+    if (type == 0) {
+        $("#fast_info").html("");
+        $("#slow_info").html("");
+        if ($("#full_fast_info")) {
+            $("#full_fast_info").html("");
+            $("#full_slow_info").html("");
+        }
+    }
+    if (type == 1) {
+        $("#fast_info").html(speed + "x");
+        $("#slow_info").html("");
+        if ($("#full_fast_info")) {
+            $("#full_fast_info").html(speed + "x");
+            $("#full_slow_info").html("");
+        }
+    }
+    if (type == 2) {
+        $("#slow_info").html(speed + "x");
+        $("#fast_info").html("");
+        if ($("#full_fast_info")) {
+            $("#full_fast_info").html("");
+            $("#full_slow_info").html(speed + "x");
+        }
+    }
+
+}
+
+function normalscreen() {
+    if (layer_full) {
+        layer.close(layer_full)
+        $("#video_pos").val($("#full_video_pos").val());
+    }
+
+}
+var layer_full = null;
+
+function fullscreen() {
+    var height = window.innerWidth * 0.8 * 1 / 2.0 + 110
+
+    var contenthtml = ' <div class="tab-content" id="full_tabcontent" style="height:400px;text-align: center;background:black;">' +
+        '                                    <p style="padding-top:180px;font-size:20px">加载中...</p>' +
+        '                                    <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->' +
+        '                                </div>' +
+        '                                <div class="row" class="col-md-12" style="padding:5px 10px 25px 10px;text-align:center;margin:0px">' +
+        '                                    <input id="full_ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"/>' +
+        '                                   <br/> <span id="full_ex1_span" style="position: absolute;left: 25px;">2017-06-12 23:00:00</span>' +
+        '                                    ' +
+        '                                </div>' +
+        '                                <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">' +
+        '                                    <select class="form-control" id="full_video_list" style="width:200px;float:left;display:none;"></select>' +
+        '                                      <div class="col-md-4 " style="padding-left:0">' +
+        '                                                                      <div class="input-group" style="padding-left:0">' +
+        '                                                                          <input type="text" id="full_video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">' +
+        '                                                                         <span class="input-group-btn">' +
+        '                                                                              <button class="btn btn-default" onclick="setVideoPos()" style="height:42px" type="button">校正</button>' +
+        '                                                                          </span>' +
+        '                                                                      </div>' +
+        '                                                                     </div>' +
+        '                                    <div class="btn-group1" style="float:right;">' +
+        '                                        <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction(\'start\')"><i class="icon icon-play-circle icon-2x"></i></button>' +
+        '                                        <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction(\'stop\')"><i class="icon icon-pause icon-2x"></i></button>' +
+        '                                        <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction(\'fast\')"><i class="icon icon-forward icon-2x"></i><span id=\"full_fast_info\"></span></button>' +
+        '                                        <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction(\'slow\')"><span id=\"full_slow_info\"></span><i class="icon icon-backward icon-2x"></i></button>' +
+        '                                        <button type="button" class="btn btn-info1" style="width:41px;height:41px" style="width:51px;height:42px" id="full_video_btn_start" onclick="doAction(\'video_start\')"><img id="full_video_btn_start_img" style="width:30px" src="/images/video.png"></img></i></button>' +
+        '                                        <button type="button" class="btn btn-info1 hidden" style="width:41px;height:41px" id="full_video_btn_stop" onclick="doAction(\'video_stop\')"><i class="icon icon-stop icon-2x"></i></button>' +
+        '                                        <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction(\'screenshot\')"><i class="icon icon-camera icon-2x"></i></button>' +
+        '                                    </div>' +
+        '                                </div>';
+
+
+    layer_full = layer.open({
+        area: ['80%', height + "px"],
+        type: 1,
+        title: false,
+        anim: -1,
+        closeBtn: 0,
+        shadeClose: false,
+        content: "<div id='layer_content' style='padding-bottom:10px' >" + contenthtml + "</div>",
+        success: function(layero, index) {
+
+            // slider_current_value = 90;
+            $("#full_video_pos").val($("#video_pos").val());
+
+            $('#full_ex1').slider({ tooltip: 'hide' });
+            $("#full_ex1").on("slideStop", function(slideEvt) {
+                setVideoProcess(slideEvt.value);
+            });
+
+            $("#full_video_btn_start").mouseover(function() {
+                $("#full_video_btn_start_img").attr("src", "/images/movie.png");
+            });
+            $("#full_video_btn_start").mouseout(function() {
+                $("#full_video_btn_start_img").attr("src", "/images/video.png");
+            });
+
+            $("#full_ex1").on("change", function(sender) {
+                var width = $("#full_ex1").siblings(".slider").children(".slider-track").children(".slider-selection").width();
+                var total_width = $("#full_ex1").siblings(".slider").children(".slider-track").width();
+
+                var sp_width = $("#full_ex1_span").width();
+
+
+                var left = ((total_width - width) < (sp_width / 2.0)) ? (total_width - sp_width + 10) : (width - sp_width / 2.0) + 10
+                $("#full_ex1_span").css("left", ((left > 0 ? left : 10)) + "px")
+
+                if ($.checkTask) {
+                    var time = moment($.checkTask.start_time);
+                    var pos = $("#video_pos").val();
+                    if ($("#full_video_pos").length > 0) {
+                        pos = $("#full_video_pos").val();
+                    }
+                    var c_time = time.add(sender.value.newValue, "s");
+                    if (/^(\+|-)?\d+($|\.\d+$)/.test(pos)) {
+                        if (pos > 0) {
+                            c_time = time.add(Math.abs(pos), "s");
+                        } else {
+                            c_time = time.subtract(Math.abs(pos), "s");
+                        }
+                    }
+
+
+
+                    $("#full_ex1_span").html(c_time.format("YYYY-MM-DD HH:mm:ss"))
+                }
+            });
+
+            $("#full_ex1").slider({ step: 5, min: 0, max: maxVV });
+
+            $("#full_ex1").slider('setValue', slider_current_value);
+
+
+
+            $("#full_fast_info").html($("#fast_info").html());
+            $("#full_slow_info").html($("#slow_info").html());
+
+
+            $("#full_tabcontent").css("height", (height - 110) + "px");
+            $("#full_tabcontent").css("width", "100%");
+            setTimeout(function() {
+                callFunc("setvideoposition", getVideoPosition($("#full_tabcontent")))
+            }, 800)
+
+        }
+    });
+
+}
+
+function getAreaCheckCount() {
+    var index = layer.load(1, {
+        shade: [0.1, '#fff'] //0.1透明度的白色背景
+    });
+    var param = {
+        "period_id": $.checkTask.period_id,
+        "area_id": $.checkTask.area_id
+    };
+    post_common_service("/f/task/getall/0/0", param, function(userList) {
+        var param = {
+            "id": $.checkTask.area_id
+        };
+        post_common_service("/f/area/getall", param, function(data) {
+            layer.closeAll('loading');
+            $.checkTask.areainfo = data.areas[0];
+            $("#checked_area").html(data.areas[0].name);
+            if (userList) {
+                $("#checked_count").html(userList.length);
+            } else {
+                $("#checked_count").html(0);
+            }
+        });
+
+    });
+}
+
+
+
+//显示考核次数
+function showCheckDetailCount() {
+    scoreDetailLayer = showPopup4Common('本周期已考核任务', null, ['450px', '350px'], '#checked_task_list_div', 'r', '确定');
+    var param = {
+        "period_id": $.checkTask.period_id,
+        "area_id": $.checkTask.area_id
+    };
+
+    var cols = [
+        { width: 40, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 80, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 50, text: '考核区域', type: 'href_link', flex: true, colClass: '', field: $.checkTask.areainfo.name },
+        { width: 80, text: '扣分情况', type: 'string', flex: true, sort: 'down', field: 'score_details' },
+        { width: 70, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' }
+    ];
+    $('#checked_user_task_datatable').mytable({
+        'cols': cols,
+        'url': "/f/task/getall/",
+        'param': param,
+        'isShoWPager': false
+    });
+}
+
+function initCheckAppealBtns() {
+    if ($.checkTask.appeal) {
+        $("#btn_appeal_task").show();
+        $("#btn_task").hide();
+        // $("#appeal_div").show();
+        $("#appeal_time").html($.checkTask.appeal.appeal_time);
+        $("#appeal_reason").html($.checkTask.appeal.appeal_reason);
+        $("#appeal_file_list").html(genAppeaFiles($.checkTask.appeal.file_src));
+        $("#recheck_result").html($.checkTask.appeal.recheck_result);
+        showAppealLayer();
+    } else {
+        // $("#appeal_div").hide();
+        $("#btn_appeal_task").hide();
+        $("#btn_task").show();
+    }
+}
+
+function showAppealLayer() {
+    layer.open({
+        type: 1,
+        area: ['400px', "400px"],
+        title: "申诉详情",
+        closeBtn: 1,
+        shade: false,
+        maxmin: false,
+        shadeClose: true,
+        offset: 'rb',
+        content: $('#appeal_div'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
+        cancel: function(index) {
+            layer.close(index);
+            layer.open({
+                type: 1,
+                title: "",
+                closeBtn: 0,
+                shade: false,
+                maxmin: false,
+                shadeClose: true,
+                content: $('#hide_div'),
+                offset: 'rb',
+                btn: ['申诉详情'],
+                yes: function(index) {
+                    layer.close(index);
+                    showAppealLayer();
+                }
+            });
+            return false;
+        }
+    });
+}
+// 使用data参数更新数据:
+function queryCheckScores() {
+    //$('#score_datatable').score_datatable("");
+    // console.log("任务id:" + $.checkTask.id);
+    var data = {
+            "task_id": $.checkTask.id
+        }
+        // alert("ff");
+    var cols = [
+        { width: 40, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 100, text: '评分记录', type: 'string', flex: true, sort: 'down', field: 'content' },
+        { width: 40, text: '分数', type: 'string', flex: true, colClass: '', field: 'check_item_score' },
+        { width: 100, text: '备注', type: 'string', flex: true, colClass: '', field: 'remark' },
+
+        // {width: 80, text: '图片', type: 'imagedd', flex: true, colClass: '',field: 'pics'},
+        // {
+        //     width: 150,
+        //     text: '操作',
+        //     type: 'string',
+        //     flex: true,
+        //     field: 'id',
+        //     oper: [
+        //         { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
+        //         { func: 'showEditPic', text: '图片', icon_class: 'icon-edit' },
+        //         { func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' }
+        //     ]
+        // }
+    ];
+
+    var colFunc = { width: 170, text: '操作', type: 'string', flex: true, field: 'id' };
+    colFunc.oper = [
+        { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
+        { func: 'showEditPic', text: '图片', icon_class: 'icon-edit' }
+    ];
+    if ($.checkTask.appeal) {
+        colFunc.oper.push({ func: 'backoutCheckScore', text: '撤销', icon_class: 'icon-reply' });
+    } else {
+        colFunc.oper.push({ func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' });
+    }
+    cols.push(colFunc);
+
+    // var pager = {
+    //     page_size:10
+    // }
+    $('#score_datatable').mytable({
+        'cols': cols,
+        'url': "/f/score/getScoreList/",
+        'param': data
+    });
+}
+
+function showEditPic(id) {
+    var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
+    showPics(rowData.pics);
+    $("#saveEditBtn").show();
+    editScoreId = id;
+}
+
+function showEditCheckScore(id) {
+    // deleteItem4Common(id,"/score/delete/",queryCheckScores);
+    var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
+    scoreDetailLayer = showPopup4Common('修改考核项', function(data) {
+        saveScoreEdit();
+    }, ['350px', '550px'], '#score-detail-div', 'r');
+
+    $("#score_id_text").val(rowData.id);
+    $("#check_item_text").val(rowData.content);
+    $("#check_score_text").val(rowData.check_item_score);
+    // setFeeUserSelect("#check_checked_person_select", rowData.checked_person);
+    // $("#check_checked_person_select").val(rowData.checked_person);
+    $("#check_remark_text").tagsInput({ 'defaultText': '添加备注', 'width': '240px' });
+    $("#check_remark_text").importTags('');
+    $("#check_remark_text").addTag(rowData.remark);
+    getTags("/f/score/getTopRemark", '#score_remark_div', '#check_remark_text', 'remark');
+}
+
+function setFeeUserSelect(div, selectId) {
+    var param = {
+        'organid': $.checkTask.checked_dept
+    };
+    post_common_service("/user/getUserList/", param, function(userList) {
+        // setFeeUserSelect("#check_checked_person_select",rowData.checked_person,data);
+        var optStr = '';
+        for (var i in userList) {
+            if (userList[i].id == selectId)
+                optStr += '<option value="' + userList[i].id + '" selected="selected">' + userList[i].truename + '</option>';
+            else
+                optStr += '<option value="' + userList[i].id + '">' + userList[i].truename + '</option>';
+        }
+        $(div).html('');
+        $(div).html(optStr);
+
+        $('#check_checked_person_select').chosen({
+            // width:'200px',
+            height: '100px',
+            no_results_text: '没有找到', // 当检索时没有找到匹配项时显示的提示文本
+            disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
+            search_contains: true // 从任意位置开始检索
+        });
+    });
+
+}
+
+function saveScoreEdit() {
+    var param = {
+        'id': $("#score_id_text").val(),
+        'content': $("#check_item_text").val(),
+        'check_item_score': $("#check_score_text").val(),
+        'remark': $("#check_remark_text").val(),
+        'checked_person': $("#check_checked_person_select").val(),
+    };
+    editScoreId = null;
+    $("#saveEditBtn").hide();
+    no_return_common_service("/f/score/update", param, function(data) {
+        if (scoreLayer) layer.close(scoreLayer);
+        //查询评分情况
+        queryCheckScores();
+        // layer.msg(data, {
+        //     time: 2000//20s后自动关闭
+        // });
+    });
+}
+var editScoreId;
+
+function saveEdit() {
+    if (editScoreId) {
+        var imgArr = $("#img_container .pic-class");
+        var picsStr = "";
+        if (imgArr && imgArr.length > 0) {
+            for (var i = 0; i < imgArr.length; i++) {
+                picsStr += imgArr[i].attributes.getNamedItem("path").textContent + ","
+            }
+            picsStr = picsStr.substr(0, picsStr.length - 1);
+        }
+        var param = {
+            'id': editScoreId,
+            'pics': picsStr
+        };
+        editScoreId = null;
+        $("#saveEditBtn").hide();
+        no_return_common_service("/f/score/update", param, function(data) {
+            if (scoreLayer) layer.close(scoreLayer);
+            //查询评分情况
+            queryCheckScores();
+            layer.msg(data, {
+                offset: 'r',
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }
+}
+
+function deleteCheckScore(id) {
+    deleteItem4Common(id, "/f/score/delete/", queryCheckScores, 'r');
+}
+
+function backoutCheckScore(id) {
+    layer.confirm('是否要撤销扣分?', {
+        btn: ['是', '否'], //按钮
+        shadeClose: true,
+        shade: 0, //不显示遮罩
+        offset: 'r'
+    }, function() {
+        var param = {
+            "id": id,
+            "check_item_score": 0
+        };
+        post_common_service("/f/score/backoutScore/", param, function(data) {
+            layer.msg('撤销成功!', {
+                offset: 'r',
+                time: 2000, //20s后自动关闭
+            });
+            queryCheckScores();
+        });
+    }, function() {
+
+    });
+}
+
+function setVideoList(videos) {
+    var videoArr;
+    if (videos) {
+        videoArr = videos.split("|");
+        var selectStr = "";
+        for (var i in videoArr) {
+            if (i == 0)
+                selectStr += '<option value="' + videoArr[i] + '" selected="selected">视频' + (videoArr[i] + 1) + '</option>'
+            else
+                selectStr += '<option value="' + videoArr[i] + '">视频' + (videoArr[i] + 1) + '</option>';
+        }
+    }
+    $('#video_list').html(selectStr);
+}
+
+function addPic(pic) {
+    if (pic) {
+        var i = 0;
+        // var imgArr = $("#img_container .pic-class");
+        // if(imgArr && imgArr.length>0) i = imgArr.length;
+
+        if (pic.startWith("http"))
+            pic = pic.replace(base_image_server_url, "/");
+
+        var picStr = genPicstr(pic);
+        $('#img_container').append(picStr);
+        $('a.lightbox-toggle').lightbox();
+    }
+}
+
+function showPics(pics, divId) {
+    var picStr = '';
+    if (!divId) divId = '#img_container';
+    $(divId).html(picStr);
+    if (pics) {
+        var picArr = pics.split(',');
+        for (var i in picArr) {
+            var pic = genPicstr(picArr[i]);
+            picStr += pic;
+        }
+        $(divId).html(picStr);
+        $('a.lightbox-toggle').lightbox();
+    }
+}
+
+function genPicstr(imgSrc) {
+    var src = imgSrc;
+    if (!src.startWith("http"))
+        src = base_image_server_url + src;
+
+    var ispic = true;
+    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 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>' +
+        (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" 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>';
+    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 + '\')' : '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>';
+    }
+    return pic;
+}
+
+
+function removeImg(this1) {
+    $(this1).parent('.img_item').remove();
+}
+
+function clearAllImg() {
+    $('#img_container').empty();
+}
+var changePersonLayer;
+
+
+
+
+function checkHasScore(id, old_person) {
+    var param = {
+        "task_id": $.checkTask.id,
+        "checked_person": old_person
+    };
+    post_common_service("/score/getScoreList/1/10", param, function(data) {
+        if (data.list && data.list.length > 0) {
+            layer.confirm('是否要同步更改扣分人?', {
+                btn: ['是', '否'], //按钮
+                shadeClose: true,
+                shade: 0, //不显示遮罩
+                offset: 'r'
+            }, function() {
+                var param = {
+                    "task_id": $.checkTask.id,
+                    "checked_person": old_person,
+                    "new_checked_person": id
+                };
+                post_common_service("/score/updateByTaskIdAndPerson/", param, function(data) {
+                    layer.msg('更改成功!', {
+                        offset: 'r',
+                        time: 2000, //20s后自动关闭
+                    });
+                    queryCheckScores();
+                });
+            }, function() {
+
+            });
+        }
+    });
+}
+
+
+
+
+
+function changePersonContent(data) {
+    resetUserImgInfo();
+    var name = data.truename;
+    if (data.workno) name = data.workno + " " + data.truename;
+    $("#checked_person").html(name);
+    var imgSrc = base_image_server_url + data.pic;
+    $("#person_img > img").attr("src", imgSrc);
+    if (ISCLIENT) {
+        $("#person_img").attr("href", "javascript:void(0)");
+        $("#person_img").removeClass("lightbox-toggle");
+        $("#person_img").click(function() {
+            showClientImg(imgSrc);
+        });
+        $("#person_img > img").attr("src", imgSrc);
+        return;
+    } else {
+        $("#person_img").attr("href", imgSrc);
+        $('a.lightbox-toggle').lightbox();
+    }
+    getUserCheckCount();
+}
+var scoreLayer;
+
+function showScore() {
+    scoreLayer = showPopup4Common('选择考核项', null, ['400px', '500px'], '#items-div', 'r');
+    buildTree();
+}
+
+function buildTree() {
+    var zTreeObj;
+    var zNodes = [];
+    check_item_tree = $.fn.zTree.init($("#items_tree"), {}, zNodes);
+    getCheckItems();
+}
+
+function getCheckItems() {
+    function zTreeOnRename(event, treeId, treeNode, isCancel) {
+        alert(treeNode.tId + ", " + treeNode.name);
+    }
+
+    function zTreeOnRemove(event, treeId, treeNode) {
+        alert(treeNode.tId + ", " + treeNode.name);
+    }
+
+
+    var setting = {
+        data: {
+            simpleData: {
+                enable: true,
+                idKey: "id",
+                pIdKey: "pId",
+                rootPId: null
+            }
+        },
+        view: { //表示tree的显示状态
+            selectMulti: false //表示禁止多选
+        },
+        check: { //表示tree的节点在点击时的相关设置
+            enable: false, //是否显示radio/checkbox
+            chkStyle: "checkbox", //值为checkbox或者radio表示
+            checkboxType: { p: "", s: "" }, //表示父子节点的联动效果
+            radioType: "level" //设置tree的分组
+        },
+        callback: {
+            onDblClick: zTreeOnClick
+        },
+        edit: {
+            enable: true,
+            drag: {
+                autoExpandTrigger: true,
+                isMove: true,
+                prev: false,
+                next: true,
+                inner: true,
+                autoOpenTime: 0
+            },
+            showRenameBtn: false,
+            showRemoveBtn: false
+        }
+    };
+    var param = { "rule_type": 10 };
+
+    post_common_service('checkRule/getItemListByRuleType', param, function(data) {
+        // console.log(data);
+        zdata = [];
+        for (var i = 0; i < data.length; i++) {
+            var m = data[i];
+            zdata.push(genNode(m));
+        }
+        // console.log(zdata);
+        menu_tree = $.fn.zTree.init($("#items_tree"), setting, zdata)
+    }, function(error) {
+
+    });
+}
+
+function addobj_checkitem(data) {
+    // console.log(data.subCheckItem);
+    var zdata = [];
+    if (typeof(data.subCheckItem) != "undefined" && data.subCheckItem != null &&
+        data.subCheckItem.length > 0) {
+        for (var i = 0; i < data.subCheckItem.length; i++) {
+            var m = data.subCheckItem[i];
+            zdata.push(genNode(m));
+        }
+        return zdata;
+    } else {
+        return [];
+    }
+}
+
+function genNode(m) {
+    var zdataItem = {};
+    zdataItem["id"] = m.id;
+    zdataItem["value"] = m.name;
+    zdataItem["pId"] = m.parent_id;
+    zdataItem["score"] = m.score;
+    zdataItem["icon"] = "";
+    zdataItem["name"] = m.name;
+    //zdataItem["content"] = m.name;
+    if (m.score) zdataItem["name"] = m.name + '(' + m.score + ')';
+    zdataItem["open"] = true;
+    // console.log(m.subCheckItem);
+    zdataItem["children"] = addobj_checkitem(m);
+    return zdataItem;
+}
+
+function zTreeOnClick(event, treeId, treeNode) {
+    var imgArr = $("#img_container .pic-class");
+    var picsStr = "";
+    if (imgArr && imgArr.length > 0) {
+        for (var i = 0; i < imgArr.length; i++) {
+            picsStr += $(imgArr[i]).attr("path") + ","
+        }
+        picsStr = picsStr.substr(0, picsStr.length - 1);
+    }
+    var param = {
+        'task_id': $.checkTask.id,
+        'pics': picsStr,
+        'name': treeNode.value,
+        'check_item_score': treeNode.score,
+        'content': treeNode.value,
+        'check_item_id': treeNode.id,
+        'checkman': $.checkTask.checkman,
+        'checked_area': $.checkTask.area_id,
+        'checked_dept': $.checkTask.checked_dept
+    };
+    no_return_common_service("/f/score/add", param, function(data) {
+        if (scoreLayer) layer.close(scoreLayer);
+        clearAllImg();
+        //查询评分情况
+        queryCheckScores();
+        layer.msg(data, {
+            offset: 'r',
+            time: 2000 //20s后自动关闭
+        });
+    });
+
+}
+
+function submitCheck() {
+    var param = {
+        "id": $.checkTask.id,
+        "check_status": 4
+    }
+    no_return_common_service("/f/task/update/", param, function(data) {
+        layer.msg("提交成功", {
+            offset: 'r',
+            time: 2000 //20s后自动关闭
+        });
+        redirectLastPage();
+    });
+
+}
+
+function showPre(id) {
+    // $('#myModal').modal({name:"dd"});
+    //预览提交把任务状态改为待提交
+    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 7 })
+    changePage("/fwq/view/task/taskDetail.html");
+}
+
+var isappeal = false;
+
+function appeal_showInvalid() {
+    isappeal = true;
+    showInvalidView();
+}
+
+function showInvalid() {
+    isappeal = false;
+    showInvalidView();
+}
+
+function showInvalidView() {
+    invalidLayer = showPopup4Common('申请无效', function() {
+        saveValidReason();
+    }, ['400px', '500px'], '#invalid_div', 'r');
+
+    $('#apply_reason').tagsInput({ 'defaultText': '添加原因' });
+    getTags("/f/checkApply/getTopReason", "#top_reason_div", '#apply_reason', 'apply_reason');
+}
+
+
+
+function submitCheck4AppealDirect() {
+    var appeal_result = 1;
+    //询问框
+    layer.confirm('该申诉是否成功?', {
+        offset: 'r',
+        btn: ['成功', '失败'], //按钮
+        // shadeClose: true,
+        shade: 0 //不显示遮罩
+    }, function() {
+        appeal_result = 1;
+        submitCheck4AppealResult(appeal_result);
+    }, function() {
+        appeal_result = 2;
+        submitCheck4AppealResult(appeal_result);
+    });
+
+
+}
+
+function submitCheck4AppealResult(appeal_result) {
+    var param = {
+        "id": $.checkTask.id,
+        "check_status": 14,
+        "appeal_id": $.checkTask.appeal.id,
+        "appeal_result": appeal_result
+    }
+    no_return_common_service("/f/task/update/", param, function(data) {
+        layer.msg("提交成功", {
+            offset: 'r',
+            time: 2000 //20s后自动关闭
+        });
+        redirectLastPage();
+    });
+}
+
+function showPre4Appeal(id) {
+    // $('#myModal').modal({name:"dd"});
+    //预览提交把任务状态改为待提交
+    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 17 })
+    changePage("/fwq/view/task/taskDetail.html");
+}
+
+function saveValidReason() {
+    var param = {
+        "task_id": $.checkTask.id,
+        "apply_reason": $('#apply_reason').val(),
+        "isappeal": isappeal
+    };
+
+
+    no_return_common_service("/f/checkApply/add/", param, function(data) {
+        layer.msg("申请提交成功", {
+            offset: 'r',
+            time: 2000 //20s后自动关闭
+        });
+        redirectLastPage();
+    });
+}
+
+
+function score(score) {
+    alert("扣分:" + score);
+    $('#scoreWin').modal('toggle');
+}
+
+function refuseApply() {
+    alert("拒绝申请");
+    $('#refuseApplyWin').modal('toggle');
+}
+
+function agreeApply() {
+    alert("同意申请");
+}
+
+
+function getVideoPosition(obj) {
+    if (obj == null) obj = $('#tabcontent');
+    var X = obj.offset().top;
+    var Y = obj.offset().left;
+    var width = obj.width();
+    var height = obj.height();
+    return parseInt(Y) + "|" + parseInt(X) + "|" + parseInt(width) + "|" + parseInt(height);
+}
+
+function initUpLoad() {
+
+    var uploader = WebUploader.create({
+
+        // swf文件路径
+        swf: 'lib/webuploader/js/Uploader.swf',
+
+        // 文件接收服务端。
+        server: base_image_server_url + '/filesSrver/' + FILE_UPLOAD,
+
+        // 选择文件的按钮。可选。
+        // 内部根据当前运行是创建,可能是input元素,也可能是flash.
+        pick: '#picker',
+
+        // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
+        resize: false
+    });
+}
+
+function saveRecheckResult() {
+    var param = {
+        "id": $.checkTask.appeal.id,
+        "recheck_result": $("#recheck_result").val()
+    }
+    post_common_service("/f/checkAppeal/update", param, function(data) {
+        layer.msg("保存成功", {
+            offset: 'r',
+            time: 2000 //20s后自动关闭
+        });
+        $.checkTask.appeal = data;
+    });
+}
+
+function addTag(text, tagDiv) {
+    if (!$(tagDiv).tagExist(text)) {
+        $(tagDiv).addTag(text);
+    }
+}
+
+// function getTags(){
+//     post_common_service("/checkApply/getTopReason", null, function(data) {
+//         if(data){
+//             var str="";
+//             for(var i=0;i<data.length;i++){
+//                 str+='<a href="javascript:void(0)" onclick="addTag(\''+data[i].apply_reason+'\')" style="float:left;margin:5px;"><span class="label label-success" style="padding:5px;">'+data[i].apply_reason+'</span></a>';
+//             }
+//             $("#top_reason_div").html(str);
+//         }
+//     });
+// }

+ 56 - 0
VisualInspection/qzd/js/task/checked.js

@@ -0,0 +1,56 @@
+// var page_size=10;
+function queryCheckedTask() {
+
+    var t = getTimeByMonth(GV("#start_time"));
+
+    var data = {
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
+        "checked_dept": $("#fsList").val(),
+        "hasScore": $("#hasScoreList").val(),
+        "check_status_arr": [4, 5, 6]
+    };
+    var hide = false;
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
+        hide = true;
+    }
+    var cols = [
+        { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
+        { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
+        // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
+        {
+            width: 160,
+            text: '操作',
+            type: 'string',
+            flex: true,
+            field: 'id',
+            oper: [
+                { func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }
+            ]
+        }
+    ];
+
+    // var pager = {
+    //     page_size:10
+    // }
+    checkedTaskTableObj = $('#checked_datatable').mytable({
+        'cols': cols,
+        'url': "/f/task/getall/",
+        'param': data,
+        'pager': {
+            'page_size': 10,
+            'p_cur': cur_page
+        }
+    });
+    //保存上次查询参数
+    $.zui.store.set('store_param_' + current_url, data);
+}
+
+function showTaskDetail(id) {
+    var rowData = getItemByIdFromArr(id, $('#checked_datatable').mytable('getTableData'));
+    $.checkTask = rowData;
+    changePage("/fwq/view/task/taskDetail.html", checkedTaskTableObj);
+}

+ 229 - 0
VisualInspection/qzd/js/task/task_list.js

@@ -0,0 +1,229 @@
+var cur_status;
+var cur_page;
+
+function initTaskPage() {
+    initQueryParams();
+    initTableRowBtn();
+    queryTask();
+}
+
+function initQueryParams() {
+    // 仅选择日期
+    $.jeDate("#start_time", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+
+    $("#start_time").val(getCurrentTimeFormat());
+    var page_params = $.zui.store.get("page_params");
+    if (page_params && page_params.status) {
+        cur_status = page_params.status;
+    }
+
+    var checked_dept = null;
+    if (roleContains("SERVICEAREA")) {
+        checked_dept = getCurrentUser().organid;
+    }
+    setSASelect("#fsList", checked_dept);
+
+
+    if (hasRole(ROLE_JICHA_ADMIN) && cur_status == 4) {
+        $("#dispatchPatchBtn").show();
+        $("#dispatchAllNoScoreBtn").show();
+    }
+    if (roleContains("STATION") && cur_status == 5) {
+        $("#confirmPatchBtn").show();
+    }
+    $("#checkPersonDiv").show();
+
+    if (cur_status == 4 || cur_status == 5 || cur_status == 6) {
+        $("#hasScoreDiv").show();
+    }
+
+}
+//初始化表行按钮
+function initTableRowBtn() {
+    $.zui.store.set("task_table_btn_2", [{ func: 'showCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_3", [{ func: 'showCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_7", [{ func: 'showContinueCheck', text: '继续稽查', icon_class: 'icon-eye-open' }]);
+    $.zui.store.set("task_table_btn_4", [{ func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' },
+        { func: 'dispatchTaskById', text: '下发', icon_class: 'icon-signin' }
+    ]);
+    $.zui.store.set("task_table_btn_5", [{ func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }]);
+    $.zui.store.set("task_table_btn_6", [{ func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }]);
+    $.zui.store.set("task_table_btn_21", [{ func: 'showApplyDetail', text: '处理', icon_class: 'icon-hand-up' }]);
+}
+//查询任务
+function queryTask() {
+
+    var t = getTimeByMonth(GV("#start_time"));
+    var data = {
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
+        "checked_dept": $("#fsList").val(),
+        "check_status": cur_status
+    };
+    // console.log(data);
+    var hide = false;
+    if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
+        hide = true;
+    }
+    var cols = [
+        { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+        { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
+        { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
+        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, colClass: '', field: 'checkman_name' },
+        { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
+        // {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
+    ];
+    var colFunc = { width: 120, text: '操作', type: 'string', flex: true, field: 'id' };
+    colFunc.oper = $.zui.store.get("task_table_btn_" + cur_status);
+    cols.push(colFunc);
+    //只有下发才显示复选框
+    var checkable = false;
+    if ((hasRole(ROLE_JICHA_ADMIN) && cur_status == 4) || (roleContains("STATION") && cur_status == 5)) {
+        checkable = true;
+    }
+    // console.log("checkable:" + checkable);
+    if (cur_status == 2 || cur_status == 3) {
+        data.check_status_arr = [2, 3];
+        data.check_status = null;
+    }
+    taskTableObj = $('#task_list_table').mytable({
+        'cols': cols,
+        'checkable': checkable,
+        'url': "/f/task/getall/",
+        'param': data,
+        'pager': {
+            'p_cur': cur_page
+        }
+    });
+    $.zui.store.set('store_param_' + current_url, data);
+}
+
+
+//进入稽查页面
+function showCheck(id) {
+    // $('#myModal').modal({name:"dd"});
+    $.checkTask = getItemByIdFromArr(id, $('#task_list_table').mytable('getTableData'));
+    $.checkTask.appeal = null;
+    //开始稽查
+    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 3 });
+
+    changePage("/fwq/view/task/check.html", taskTableObj);
+}
+
+//任务详情页面
+function showTaskDetail(id) {
+    var rowData = getItemByIdFromArr(id, $('#task_list_table').mytable('getTableData'));
+    $.checkTask = rowData;
+    if (typeof($.checkTask) != "undefined" && typeof($.checkTask.appeal) != "undefined") {
+        $.checkTask.appeal = null;
+    }
+
+    changePage("/fwq/view/task/taskDetail.html", taskTableObj);
+}
+
+//进入继续稽查页面
+function showContinueCheck(id) {
+    // $('#myModal').modal({name:"dd"});
+    $.checkTask = getItemByIdFromArr(id, $('#task_list_table').mytable('getTableData'));
+    $.checkTask.appeal = null;
+    changePage("/fwq/view/task/check.html", taskTableObj);
+}
+
+//下发所有任务
+function dispatchTaskPatch() {
+    var param = {
+            "check_status": 4,
+            "dispatch_ids": $('#task_list_table').mytable('getTableCheckedIds')
+        }
+        // console.log("放假啦:"+param.dispatch_ids);
+    if (!param.dispatch_ids || param.dispatch_ids.length == 0) {
+        layer.msg('请选择下发任务!', {
+            time: 2000 //20s后自动关闭
+        });
+        return;
+    }
+    layer.confirm('确定下发选中任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        no_return_common_service('/f/task/dispatch', param, function(data) {
+            queryTask();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
+    var datas = $('#task_list_table').mytable('getTableData');
+    //    console.log(datas);
+}
+
+
+//下发单条任务
+function dispatchTaskById(id) {
+    layer.confirm('确定下发任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        var param = {
+            "id": id,
+            "check_status": 5
+        }
+        no_return_common_service('/f/task/dispatchById', param, function(data) {
+            queryTask();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
+
+}
+
+function dispatchAllNoScoreTask() {
+    layer.confirm('确定下发选择时间内所有无扣分任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        var t = getTimeByMonth(GV("#start_time"));
+        var param = {
+            "start_time": getMomentTimeFormat(t.starttime),
+            "end_time": getMomentTimeFormat(t.endtime),
+        };
+        no_return_common_service('/f/task/dispatchAllNoScoreTask', param, function(data) {
+            queryTask();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
+}
+
+function confirmTaskPatch() {
+    var param = {
+        "check_status": 5,
+        "dispatch_ids": $('#task_list_table').mytable('getTableCheckedIds')
+    }
+    if (!param.dispatch_ids) {
+        layer.msg("请选择需确认任务!", {
+            time: 2000 //20s后自动关闭
+        });
+        return;
+    }
+    layer.confirm('确定确认选中任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        no_return_common_service('/f/task/confirm', param, function(data) {
+            queryTask();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
+}

+ 78 - 0
VisualInspection/qzd/view/appeal_management/appealDetail.html

@@ -0,0 +1,78 @@
+<div class="container-fluid ">
+    <form class="form-horizontal" style="margin-top:10px;">
+        <input type="hidden" class="form-control" id="apply_id" disabled="disabled" placeholder="">
+
+        <div class="form-group">
+            <label class="col-md-2">申诉原因:</label>
+            <div class="col-md-10">
+                <textarea class="col-md-12" id="add_appeal_reason" style="height:200px;" maxlength="2000"></textarea>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-md-2">申诉附件</label>
+            <div class="col-md-10">
+                <div id="uploaderExample" class="uploader">
+                    <div class="file-list" data-drag-placeholder="请拖拽文件到此处"></div>
+                    <button type="button" class="btn btn-primary uploader-btn-browse" style="float:left;"><i class="icon icon-cloud-upload"></i> 选择文件</button>
+                </div>
+            </div>
+        </div>
+    </form>
+</div>
+<script>
+    var file_src = "";
+    $('#uploaderExample').uploader({
+        autoUpload: true, // 当选择文件后立即自动进行上传操作
+        url: base_image_server_url + 'fileServer/file/upload', // 文件上传提交地址
+        filters: {
+            mime_types: [{
+                title: '图片',
+                extensions: 'jpg,gif,png'
+            }, {
+                title: '图标',
+                extensions: 'ico'
+            }, {
+                title: '视频',
+                extensions: 'mp4,avi'
+            }, {
+                title: '文档',
+                extensions: 'doc,docx'
+            }],
+            // 不允许上传重复文件
+            prevent_duplicates: true
+        },
+        onFileUploaded: function(file, responseObject) {
+            var datas = eval('(' + responseObject.response + ')');
+            file_src += datas.result_data.path + ",";
+        },
+        onFilesRemoved: function(files) {
+            // alert(files);
+        }
+    });
+    $(document).ready(function() {
+        //  initUpLoad();
+    });
+
+    function saveAppeal() {
+        if (file_src.substr(file_src.length - 1, 1) == ",") file_src = file_src.substr(0, file_src.length - 1);
+        if ($("#add_appeal_reason").val() == "" || $("#add_appeal_reason").val() == null) {
+            layer.alert("原因不能为空!");
+            return;
+        }
+        if ($("#add_appeal_reason").val() && $("#add_appeal_reason").val().length > 2000) {
+            layer.alert("原因长度不能超过2000字!");
+            return;
+        }
+        var param = {
+            "task_id": $.checkTask.id,
+            "appeal_reason": $("#add_appeal_reason").val(),
+            "file_src": file_src
+        }
+        no_return_common_service("/f/checkAppeal/add/", param, function(data) {
+            layer.msg("申诉提交成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+</script>

+ 23 - 0
VisualInspection/qzd/view/appeal_management/appealEdit.html

@@ -0,0 +1,23 @@
+<div class="container-fluid ">
+    <form class="form-horizontal" style="margin-top:10px;">
+        <input type="hidden" class="form-control" id="appeal_id" disabled="disabled" placeholder="">
+        <div class="form-group">
+            <label for="exampleInputAccount1" class="col-md-4 col-sm-2">申诉人</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="appeal_man" disabled="disabled" placeholder="">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-md-4 col-sm-2">申诉原因</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="appeal_reason" placeholder="">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-md-4 col-sm-2">申诉附件</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="appeal_file" placeholder="">
+            </div>
+        </div>
+    </form>
+</div>

+ 73 - 0
VisualInspection/qzd/view/appeal_management/appeal_checked.html

@@ -0,0 +1,73 @@
+<script src="/fwq/js/appeal_management/appeal_checked.js?__inline"></script>
+<div class="container-fluid ">
+    <div class="row">
+        <form class="form-horizontal">
+            <div class="form-group">
+                <div class="form-group col-sm-5">
+                    <label for="exampleInputAccount1" class="col-sm-2">稽查日期</label>
+                    <div class="col-sm-5">
+                        <input type="text" id="start_time" class="form-control form-date" placeholder="开始时间">
+                    </div>
+
+                </div>
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">考核部门</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="fsList">
+                        </select>
+                    </div>
+                </div>
+
+                <div class="col-sm-2">
+                    <button class="btn btn-info2" style="width:80px;" type="button" onclick="queryCheckedAppealTask()">查询</button>
+                </div>
+            </div>
+            <div class="form-group">
+
+                <div id="appealResultDiv" class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">申诉结果</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="appealResultSelect">
+                            <option value="">全部</option>
+                            <option value="1">成功</option>
+                            <option value="2">失败</option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <br>
+
+    <div class="datatable" id="checked_datatable"></div>
+</div>
+<script>
+    var cur_page;
+    $(document).ready(function() {
+        $.jeDate("#start_time", {
+            isinitVal: true,
+            format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        });
+        $("#start_time").val(getCurrentTimeFormat());
+        //去上次查询保留的参数
+        var store_params = $.zui.store.get('store_param_' + current_url);
+        var checked_dept = null;
+
+        if (store_params) {
+            checked_dept = store_params.checked_dept;
+
+            $("#start_time").val(moment(store_params.start_time).add(1, "month").format("YYYY/MM"));
+            // $("#hasScoreList").val(store_params.hasScore);
+            cur_page = store_params.currentpage;
+        }
+        if (roleContains("STATION")) {
+            checked_dept = getCurrentUser().organid;
+        }
+        setSASelect("#fsList", checked_dept);
+        if (roleContains("STATION")) {
+            $("#fsList").attr('disabled', 'disabled');
+        }
+
+        queryCheckedAppealTask();
+    });
+</script>

+ 60 - 0
VisualInspection/qzd/view/appeal_management/appeal_list.html

@@ -0,0 +1,60 @@
+<!--  start -->
+<div class="container-fluid ">
+    <div class="row">
+        <form class="form-horizontal">
+            <div class="form-group">
+                <div class="form-group col-sm-5">
+                    <label for="exampleInputAccount1" class="col-sm-2">稽查日期</label>
+                    <div class="col-sm-5">
+                        <input type="text" id="start_time" class="form-control form-date" placeholder="开始时间">
+                    </div>
+
+                </div>
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">考核部门</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="fsList">
+                                <option value="">全部</option>
+                            </select>
+                    </div>
+                </div>
+
+                <div class="col-sm-2">
+                    <button class="btn btn-info2" style="width:80px;" type="button" id="conditional_query" onclick="queryAppeal()">查询</button>
+                </div>
+            </div>
+            <div class="form-group">
+                <div class="form-group col-sm-5">
+
+                </div>
+                <div id="appealResultDiv" class="form-group col-sm-3" style="display:none;">
+                    <label for="exampleInputAccount1" class="col-sm-4">申诉结果</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="appealResultSelect">
+                                <option value="">全部</option>
+                                <option value="1">成功</option>
+                                <option value="2">失败</option>
+                            </select>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <hr style="margin-top:0px;">
+    <div class="row">
+        <!-- 使用一个div来显示数据表格 -->
+        <div class="datatable" id="appeal_list_table" data-checkable="true" data-sortable="true"></div>
+    </div>
+
+
+</div>
+<!--  end -->
+<script src="/fwq/js/appeal_management/appeal_list.js?_inline"></script>
+
+<script type="text/javascript">
+    $(document).ready(function() {
+        initAppealPage();
+    })
+</script>
+
+</html>

+ 66 - 0
VisualInspection/qzd/view/appeal_management/appeal_submited.html

@@ -0,0 +1,66 @@
+<script src="/fwq/js/appeal_management/appeal_submited.js?__inline"></script>
+<div class="container-fluid ">
+    <div class="row">
+        <form class="form-horizontal">
+            <div class="form-group">
+                <div class="form-group col-sm-5">
+                    <label for="exampleInputAccount1" class="col-sm-2">稽查日期</label>
+                    <div class="col-sm-5">
+                        <input type="text" id="start_time" class="form-control form-date" placeholder="开始时间">
+                    </div>
+
+                </div>
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">考核部门</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="fsList">
+                        </select>
+                    </div>
+                </div>
+
+                <div class="col-sm-2">
+                    <button class="btn btn-binfo2" style="width:80px;" type="button" onclick="querySubmitedAppealTask()">查询</button>
+                </div>
+            </div>
+            <div class="form-group">
+
+            </div>
+        </form>
+    </div>
+    <br>
+
+    <div class="datatable" id="submited_datatable"></div>
+</div>
+<script>
+    var cur_page;
+    $(document).ready(function() {
+        // 仅选择日期
+        $.jeDate("#start_time", {
+            isinitVal: true,
+            format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        });
+        $("#start_time").val(getCurrentTimeFormat());
+        //去上次查询保留的参数
+        var store_params = $.zui.store.get('store_param_' + current_url);
+        var checked_dept = null;
+
+        if (store_params) {
+            checked_dept = store_params.checked_dept;
+
+            $("#start_time").val(moment(store_params.start_time).add(1, "month").format("YYYY/MM"));
+            // $("#hasScoreList").val(store_params.hasScore);
+            cur_page = store_params.currentpage;
+        }
+        if (roleContains("STATION")) {
+            checked_dept = getCurrentUser().organid;
+        }
+        setSASelect("#fsList", checked_dept);
+        if (roleContains("STATION")) {
+            $("#fsList").attr('disabled', 'disabled');
+        }
+
+
+
+        querySubmitedAppealTask();
+    });
+</script>

+ 90 - 0
VisualInspection/qzd/view/main.html

@@ -0,0 +1,90 @@
+<!doctype html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>稽查</title>
+
+
+    <link rel="import" href="/view/common/commoncsslink.html?__inline">
+    <link rel="stylesheet" type="text/css" href="/css/main.css">
+    <link rel="import" href="/view/common/commonscriptlink.html?__inline">
+    <!--<link rel="stylesheet" type="text/css" href="/js/lib/jedate/skin/jedate.css">
+    <script src="/js/lib/jedate/jedate.js"></script>-->
+    <style>
+        html {
+            overflow: auto;
+        }
+        
+        img.lightbox-img {
+            width: 600px;
+        }
+        
+        .navbar-inverse {
+            background-color: #366ca5;
+        }
+        
+        .file-list,
+        .uploader-files {
+            border: 0px;
+        }
+        
+        html {
+            overflow: hidden
+        }
+        
+        body {
+            font-family: 'Microsoft Yahei';
+            overflow: hidden
+        }
+        /*.mum_left {
+            background-color: #2B7EB3;
+        }*/
+    </style>
+    <script src="/fwq/js/task/check.js"></script>
+    <!--<script src="/js/teamClass/check_team_schedule.js"></script>-->
+    <script src="/js/teamClass/charge_team_schedule.js"></script>
+</head>
+
+<body>
+    <link rel="import" href="/view/common/head.html?__inline">
+
+
+
+
+    <div id="main" class="container-fluid main">
+        <div class="row">
+            <div class="col-md-2" style="padding-right:0;z-index: 11;">
+                <div id="mum_left" class="mum_left">
+                    <link rel="import" href="/view/mum.html?__inline">
+                </div>
+            </div>
+            <div class="col-md-10">
+                <div id="mum_right" class="mum_right">
+
+                    <div class="panel" id="main_panel">
+                        <div class="panel-heading" id="main_content_title">
+                            <ol class="breadcrumb" id="breadcrumb_menu" style="margin-bottom: 0;padding:0px;">
+
+                            </ol>
+                        </div>
+                        <div class="panel-body" id="main_panel_body">
+                            <div id="main_content">
+                            </div>
+                            <!--<link rel="import" href="/view/mytask/unchecked.html?__inline">-->
+                        </div>
+                    </div>
+
+                    <link rel="import" href="/view/common/foot.html?__inline">
+                </div>
+
+            </div>
+
+        </div>
+    </div>
+
+    <script src="/js/main.js"></script>
+</body>
+
+
+</html>

+ 174 - 0
VisualInspection/qzd/view/other_check/onsite_check.html

@@ -0,0 +1,174 @@
+<!--现场稽查-->
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/fwq/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+    <div class="row">
+        <div>
+            <span style="float: left;
+                padding-top: 5px;">时间:</span>
+            <div class="div-month">
+                <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+            </div>
+            <!-- <span style="float: left;
+                 padding-top: 5px;">道管:</span>
+            <div class="div-roadManage">
+                <select class="form-control" id="first"></select>
+            </div> -->
+            <span style="float: left;
+                padding-top: 5px;">服务区:</span>
+            <div class="div-station">
+                <select class="form-control" id="fsList"></select>
+            </div>
+
+            <div class="col-xs-1">
+                <div class="input-group">
+                    <button class="btn btn-primary " type="button" id="conditional_query">查询</button>
+                </div>
+            </div>
+
+            <div style="float:right;margin-right:30px;">
+
+                <button class="btn btn-info3" type="button" style="margin-right:30px;" onclick="static()">统计</button>
+
+                <button class="btn btn-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</button>
+
+                <button class="btn btn-info3" type="button" style="margin-left:30px;" onclick="exportThird()"> 导出Excel</button>
+            </div>
+        </div>
+    </div>
+    <hr>
+    <div class="row">
+        <!-- 使用一个div来显示数据表格 -->
+        <div class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
+    <div class="">
+
+
+    </div>
+
+</div>
+<!--  end -->
+<div style="display:none;" id="form-div">
+    <div class="layer-content" style="width:100%;height:100%;">
+        <div style="width:350px;overflow:hidden;zoom:1;margin:auto;">
+            <div style="width:100%;margin-top:20px;overflow:hidden;zoom:1;">
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">选择服务区</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="div-select"><select class="form-control" id="select-dept"></select></button>
+                        </div>
+                        <!-- <div class="div-select"><select class="form-control" id="select-personal"></select></button>
+                        </div> -->
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">扣分类别</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div id="check_item_select" style="position: relative;">
+                            <input class="form-control" id="check_item_id">
+                        </div>
+                        <div class="form-group check_item_group">
+                            <!--<label for="exampleInputPassword4" class="col-sm-2">分类:</label>-->
+                            <div class="col-md-6 col-sm-10">
+                                <div id="check_item_select"></div>
+
+                            </div>
+                        </div>
+                    </div>
+                    <div class="panel-body" style="display:none;">
+                        <ul id="check_rule_tree2" class="ztree">
+
+                        </ul>
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">扣分描述</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <input class="form-control" id="remark">
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">扣分值</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <input class="form-control" id="check_score" onkeypress="return kkpager.keypress_gopage(event);">
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">附件上传</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="col-md-10">
+                            <div id="uploaderExample" class="uploader">
+                                <div id="editImage" file_src="" style="overflow:hidden;zoom:1;"></div>
+                                <div class="file-list" data-drag-placeholder="请拖拽文件到此处"></div>
+                                <button type="button" class="btn btn-primary  uploader-btn-browse" style="float:left;"><i class="icon icon-cloud-upload"></i> 选择文件</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">稽查时间</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="div-month2">
+                            <input id="month_date2" class="form-control form-date" type="text" placeholder="请选择" style="height:32px;">
+                        </div>
+                        <select class="form-control" style="width:130px;" id="check_num">
+                        <option value="1">第一次检查</option>
+                        <option value="2">第二次检查</option>
+                        <option value="3">第三次检查</option>
+                    </select>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="operation" style="width:100%;overflow:hidden;zoom:1;border-top:1px solid #ddd;margin-top:20px;padding:10px 10px 10px 10px;">
+            <button class="btn btn-primary" type="button" style="float:right;" id="save-check"> 保存</button>
+            <button class="btn btn-primary" type="button" style="float:right;background-color:#fff;color:#333;margin-right:20px;" id="close-layer"> 关闭</button>
+        </div>
+    </div>
+    <script>
+        $(document).ready(function() {
+            check_type = 9;
+            init();
+        });
+
+        function exportThird() {
+            var param = '';
+            var month_date = $("#month_date").val();
+            // var first = $("#first").val();
+            var second = $("#fsList").val();
+            if (month_date != '') {
+                param = "&check_time_name=" + month_date;
+            }
+            if (second != '') {
+                param += "&dept_id=" + second;
+            }
+            window.open(getExcelServeraddr() + "f/file/other/check/excel?check_type=9" + param);
+        }
+
+        function exportThirds() {
+            var param = '';
+            var month_date = $("#month_date").val();
+            // var first = $("#first").val();
+            var second = $("#fsList").val();
+            if (month_date != '') {
+                param = "&check_time_name=" + month_date;
+            }
+            if (second != '') {
+                param += "&dept_id=" + second;
+            }
+            window.open(getExcelServeraddr() + "f/file/other/check/static/excel?check_type=9" + param);
+        }
+    </script>

+ 178 - 0
VisualInspection/qzd/view/other_check/third_unannounced_check.html

@@ -0,0 +1,178 @@
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/fwq/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+    <div class="row">
+        <div>
+            <div class="col-xs-1" style="width:160px">
+                <span style="float: left;
+                padding-top: 5px;">时间:</span>
+                <div class="div-month">
+                    <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+                </div>
+            </div>
+            <!-- <div class="col-xs-1" style="width:220px">
+                <span style="float: left;
+                 padding-top: 5px;">道管:</span>
+                <div class="div-roadManage">
+                    <select class="form-control" id="first"></select>
+                </div>
+            </div> -->
+            <div class="col-xs-1" style="width:212px">
+                <span style="float: left;
+                padding-top: 5px;">服务区:</span>
+                <div class="div-station">
+                    <select class="form-control" id="fsList"></select>
+                </div>
+            </div>
+
+            <div class="col-xs-1">
+                <div class="input-group">
+                    <button class="btn btn-primary " type="button" id="conditional_query">查询</button>
+                </div>
+            </div>
+
+            <div class="col-xs-4" style="float:right;margin-right:30px;">
+                <button class="btn btn-info3" type="button" style="margin-right:30px;" onclick="static()">统计</button>
+
+                <button class="btn btn-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</button>
+
+                <button class="btn btn-info3" type="button" style="margin-left:30px;" onclick="exportThird()"> 导出Excel</button>
+            </div>
+
+        </div>
+    </div>
+    <hr>
+    <div class="row">
+        <!-- 使用一个div来显示数据表格 -->
+        <div class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
+    <div class="">
+
+    </div>
+
+</div>
+<!--  end -->
+<div style="display:none;" id="form-div">
+    <div class="layer-content" style="width:100%;height:100%;">
+        <div style="width:350px;overflow:hidden;zoom:1;margin:auto;">
+            <div style="width:100%;margin-top:20px;overflow:hidden;zoom:1;">
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">选择服务区</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="div-select"><select class="form-control" id="select-dept"></select></button>
+                        </div>
+                        <!-- <div class="div-select"><select class="form-control" id="select-personal"></select></button>
+                        </div> -->
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">扣分类别</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div id="check_item_select" style="position: relative;">
+                            <input class="form-control" id="check_item_id">
+                        </div>
+                        <div class="form-group check_item_group">
+                            <!--<label for="exampleInputPassword4" class="col-sm-2">分类:</label>-->
+                            <div class="col-md-6 col-sm-10">
+                                <div id="check_item_select"></div>
+
+                            </div>
+                        </div>
+                    </div>
+                    <div class="panel-body" style="display:none;">
+                        <ul id="check_rule_tree2" class="ztree">
+
+                        </ul>
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">扣分描述</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <input class="form-control" id="remark">
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">扣分值</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <input class="form-control" id="check_score" onkeypress="return kkpager.keypress_gopage(event);">
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">附件上传</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="col-md-10">
+                            <div id="uploaderExample" class="uploader">
+                                <div id="editImage" file_src="" style="overflow:hidden;zoom:1;"></div>
+                                <div class="file-list" data-drag-placeholder="请拖拽文件到此处"></div>
+                                <button type="button" class="btn btn-primary  uploader-btn-browse" style="float:left;"><i class="icon icon-cloud-upload"></i> 选择文件</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">稽查时间</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="div-month2">
+                            <input id="month_date2" class="form-control form-date" type="text" placeholder="请选择" style="height:32px;">
+                        </div>
+                        <select class="form-control" style="width:130px;" id="check_num">
+                        <option value="1">第一次检查</option>
+                        <option value="2">第二次检查</option>
+                        <option value="3">第三次检查</option>
+                    </select>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="operation" style="width:100%;overflow:hidden;zoom:1;border-top:1px solid #ddd;margin-top:20px;padding:10px 10px 10px 10px;">
+            <button class="btn btn-primary" type="button" style="float:right;" id="save-check"> 保存</button>
+            <button class="btn btn-primary" type="button" style="float:right;background-color:#fff;color:#333;margin-right:20px;" id="close-layer"> 关闭</button>
+        </div>
+    </div>
+    <script>
+        $(document).ready(function() {
+            check_type = 8;
+            init();
+        });
+
+        function exportThird() {
+            var param = '';
+            var month_date = $("#month_date").val();
+            // var first = $("#first").val();
+            var second = $("#fsList").val();
+            if (month_date != '') {
+                param = "&check_time_name=" + month_date;
+            }
+            if (second != '') {
+                param += "&dept_id=" + second;
+            }
+            window.open(getExcelServeraddr() + "f/file/other/check/excel?check_type=8" + param);
+        }
+
+        function exportThirds() {
+            var param = '';
+            var month_date = $("#month_date").val();
+            // var first = $("#first").val();
+            var second = $("#fsList").val();
+            if (month_date != '') {
+                param = "&check_time_name=" + month_date;
+            }
+            if (second != '') {
+                param += "&dept_id=" + second;
+            }
+            window.open(getExcelServeraddr() + "f/file/other/check/static/excel?check_type=8" + param);
+        }
+    </script>

+ 80 - 0
VisualInspection/qzd/view/statistics/assess_type.html

@@ -0,0 +1,80 @@
+<!--考核问题分布报表-->
+<script src="/fwq/js/statistics/assess_type.js?__inline"></script>
+<link rel="stylesheet" type="text/css" href="/css/statistics/assess_situation.css?__inline">
+<div class="container-fluid ">
+    <div class="form-div">
+        <form  class="form-horizontal">
+            <div class="form-group">
+                <div  class="form-group col-sm-5">
+                    <label class="col-sm-2">查询日期</label>
+                    <div class="col-sm-5">
+                        <input type="text" id="start-time" class="form-control form-date" placeholder="选择月份">
+                    </div>
+                    <!-- <div class="col-sm-5">
+                        <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
+                    </div> -->
+                </div>
+                <div  class="form-group col-sm-3">
+                    <div class="col-sm-6">
+                        <button class="btn btn-info2" type="button" onclick="queryTypeClick()">查询</button>
+                    </div>
+                    <div class="col-sm-6">
+                        <button class="btn btn-info3" type="button" onclick="exportExcel()" >导出Excel</button>
+                    </div>
+                </div>
+            </div>    
+        </form>
+    </div>
+    <div class="table-title"><span>温馨服务检查情况统计表</span></div>
+
+    <div class="row">
+          <!-- 使用一个div来显示数据表格 -->
+          <div class="datatable" data-checkable="false" data-sortable="false"  style="margin-bottom:0px;">
+              <div class="table-head" >
+                  <table border="1" width="100%" height="90px" align="center">
+                    <thead class="table-thead">
+                        <!-- <tr>
+                        <th rowspan="2" width="6%">道管整体排名</th>
+                        <th rowspan="2" width="6%">道管</th>
+                        <th rowspan="2" width="6%">管道内服务区排名</th>
+                        <th rowspan="2" width="8%">服务区</th>
+                        <th rowspan="2" width="6%">收费值机岗位人数</th>
+                        <th rowspan="2" width="6%">受检人数</th>
+                        <th rowspan="2" width="6%">受检次数</th>
+                        <th colspan="9" height="40px">存在问题扣分详情</th>
+                        <th rowspan="2" width="6%">受检人平均每人次扣分(千分制)</th>
+                        <th rowspan="2" width="6%">管道中心受检服务区平均扣分(千分制)</th>
+                        </tr>
+                        <tr>
+                        <th width="54px">环境卫生</th><th width="54px">仪容仪表</th><th width="54px">表情</th>
+                        <th width="54px">收费动作</th><th width="54px">文明用语</th><th width="54px">工作纪律</th>
+                        <th width="54px">便民服务</th><th width="54px">安全管理</th><th>扣分合计</th>
+                        </tr> -->
+                    </thead>
+                </table>
+            </div>
+          </div>
+          <div id="scrollTable" style="overflow:auto;">
+              <div class="table-head" style="margin:0px;">
+                  <table border="1" width="100%" height="90px" align="center" style="border-top:0px;">
+                    <tbody class="table-tbody" style="background:white" align="center">
+               
+                    </tbody>
+                  </table></div>
+          </div>
+    </div>
+</div>
+<script>
+   
+    $(document).ready(function() {
+        // 设置滚动表格的高度
+        $("#scrollTable").height($(window).height() - 300);
+        // 仅选择日期
+        $.jeDate("#start-time", {
+            isinitVal: true,
+            format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        });
+        $("#start-time").val(getCurrentTimeFormat());
+        initQueryType();
+    });
+</script>

+ 97 - 0
VisualInspection/qzd/view/statistics/dept_check_statistics.html

@@ -0,0 +1,97 @@
+<!--服务区-综合成绩汇总表-->
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/fwq/js/statistics/dept_check_statistics.js"></script>
+
+<style type="text/css">
+    table td,
+    table th {
+        text-align: center;
+        padding: 10px;
+        border: 1px solid #d9d9d9;
+        word-wrap: break-word;
+        padding: 0;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+    
+    table {
+        table-layout: fixed
+    }
+    
+    .table-title {
+        line-height: 50px;
+        text-align: center;
+    }
+    
+    .table-title span {
+        font-size: 22px;
+        color: #333;
+    }
+    
+    .table-head th {
+        border-color: #C7C6C5;
+        background-color: #d2d6de;
+    }
+    
+    .datatable {
+        background-color: rgba(0, 0, 0, 0)
+    }
+    
+    #table {
+        background-color: #fff
+    }
+    
+    .tb {
+        margin-left: auto;
+        margin-right: auto;
+    }
+</style>
+
+<div class="container-fluid ">
+    <div class="row">
+        <label class="col-sm-1" style="line-height:30px;width:80px">开始月</label>
+        <div class="div-month col-sm-1">
+            <input id="month_date_from" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+        </div>
+        <label class="col-sm-1" style="line-height:30px;width:80px">结束月</label>
+        <div class="div-month col-sm-1">
+            <input id="month_date_to" class="form-control form-date " type="text " placeholder="请选择 " style="height:30px; ">
+        </div>
+
+
+        <div class="col-sm-2 "><button class="btn btn-info2 col-sm-6 query-company " id="searchbtn">查询</button></div>
+        <div class="col-sm-1">
+            <button class="btn btn-primary " type="button" onclick="exportExcel()">导出Excel</button>
+        </div>
+    </div>
+
+
+</div>
+<div class="table-title"><span>营运管理提升综合成绩汇总表<span id="table_title"></span></span>
+</div>
+
+
+<div class="row">
+
+    <div class="datatable" data-checkable="false" style="margin-bottom: 0px; overflow-x: scroll;overflow-y: hidden; background: #ffffff00;" data-sortable="false">
+
+        <div class="tb" style="padding-right: 10px;">
+            <table border="0" class="table-head" width="100%" align="center" id="table_h">
+            </table>
+        </div>
+        <div class="tb" style="overflow-y: auto;height:500px;overflow-x: hidden;background:#fff">
+            <table border="0" width="100%" align="center" id="table"></table>
+
+        </div>
+        <!-- 使用一个div来显示数据表格   -->
+        <!-- <div id="scrollTable" style="height:500px;overflow:scroll;    margin-right: -10px;">
+            <table style="border-top:0;" border="0" width="100%" align="center" id="table" >
+                <tbody class="table-tbody" style="background:white; " align="center">
+
+                </tbody>
+            </table>
+        </div> -->
+    </div>
+
+</div>
+</div>

+ 77 - 0
VisualInspection/qzd/view/statistics/operation_management_integration.html

@@ -0,0 +1,77 @@
+<!--服务区-营运管理综合检查情况统计-->
+<script src="/fwq/js/statistics/operation_management_integration.js?__inline"></script>
+<link rel="stylesheet" type="text/css" href="/css/statistics/assess_situation.css?__inline">
+<div class="container-fluid ">
+    <div class="form-div">
+        <form  class="form-horizontal">
+            <div class="form-group">
+                <div class="from-label"><label>查询日期</label></div>
+                <div class="col-sm-2">
+                    <input type="text" id="start-time" class="form-control form-date" placeholder="选择月份">
+                </div>
+                <!-- <div class="col-sm-2">
+                    <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
+                </div> -->
+                <div class="col-sm-1">
+                    <button class="btn btn-primary " type="button" onclick="queryTypeClick()">查询</button>
+                </div>
+                <div class="col-sm-1">
+                    <button class="btn btn-primary " type="button" onclick="exportExcel()" >导出Excel</button>
+                </div>
+            </div>
+        </form>
+    </div>
+    <div class="table-title"><span>运营管理综合检查情况统计表</span></div>
+
+    <div class="row">
+          <!-- 使用一个div来显示数据表格 -->
+          <div class="datatable" data-checkable="false" data-sortable="false"  style="margin-bottom:0px;">
+              <div class="table-head" ><table border="1" width="100%" height="90px" align="center">
+                 <thead>
+                        <tr>
+                        <!--<th rowspan="3" width="6%">排名</th><th rowspan="3" width="6%">道管</th>-->
+                        <th rowspan="3" width="8%">排名</th>
+                        <!--<th rowspan="3" width="6%">道管内排名</th>-->
+                        <th rowspan="3" width="8%">服务区</th><th colspan="4" width="24%" height="40px">温馨服务</th>
+                        <th colspan="2" width="12%" height="40px">现场检查</th><th rowspan="3" width="8%">总平均扣分</th>
+                        <th rowspan="3" width="8%">平均得分</th>
+                        </tr>
+                        <tr> 
+                        <th colspan="2">公司检查</th><th colspan="2">第三方暗访</th>
+                        <th rowspan="2" width="54px">受检次数</th><th rowspan="2" width="54px">扣分合计</th>
+                        </tr>
+                        <tr> 
+                        <th width="54px">受检次数</th><th width="54px">扣分合计</th>
+                        <th width="54px">受检次数</th><th width="54px">扣分合计</th>
+                        </tr>
+                 </thead>
+                    <!-- <tbody class="table-tbody" style="background:white" align="center">
+               
+                    </tbody> -->
+                </table></div>
+          </div>
+          <div id="scrollTable" style="height:300px;overflow:scroll;margin-right:-10px;">
+              <div class="table-head" style="margin:0px;">
+                  <table border="1" width="100%" height="90px" align="center" style="border-top:0px;">
+                    <tbody class="table-tbody" style="background:white" align="center">
+               
+                    </tbody>
+                  </table></div>
+          </div>
+    </div>
+</div>
+<script>
+   
+    $(document).ready(function() {
+        // 设置滚动表格的高度
+        $("#scrollTable").height($(window).height() - 360);
+
+        // 仅选择日期
+        $.jeDate("#start-time", {
+            isinitVal: true,
+            format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        });
+        $("#start-time").val(getCurrentTimeFormat());
+        initQueryType();
+    });
+</script>

+ 121 - 0
VisualInspection/qzd/view/statistics/service_area_check_statistics.html

@@ -0,0 +1,121 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/fwq/js/statistics/service_area_check_statistics.js">
+</script>
+<style type="text/css">
+    table td,
+    table th {
+        text-align: center;
+        padding: 10px;
+        border: 1px solid #d9d9d9
+    }
+    
+    .table-title {
+        line-height: 50px;
+        text-align: center;
+    }
+    
+    .table-title span {
+        font-size: 22px;
+        color: #333;
+    }
+    
+    .table-head {
+        background-color: #EBF3FD;
+        margin-top: 10px;
+        width: 100%;
+    }
+    
+    .table-head table {
+        border: 1px solid #C7C6C5;
+    }
+    
+    #scrollTable table {
+        border: 1px solid #C7C6C5;
+    }
+    
+    .table-head table tr th {
+        font-size: 12px;
+        color: #333;
+        text-align: center;
+        border: 1px solid #C7C6C5;
+    }
+    
+    .table-tbody tr td {
+        height: 43px;
+    }
+    
+    table {
+        border-color: #d9d9d9;
+    }
+    
+    .div-score {
+        float: left;
+        padding-top: 6px;
+    }
+    
+    .special-style td {
+        border: 1px solid #c7c6c5;
+    }
+</style>
+
+<div class="container-fluid ">
+    <div class="row">
+        <label class="col-sm-1" style="line-height:30px;width:80px">开始月</label>
+        <div class="div-month col-sm-1">
+            <input id="month_date_from" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+        </div>
+        <label class="col-sm-1" style="line-height:30px;width:80px">结束月</label>
+        <div class="div-month col-sm-1">
+            <input id="month_date_to" class="form-control form-date " type="text " placeholder="请选择 " style="height:30px; ">
+        </div>
+
+        <label class="col-sm-1" style="line-height:30px;width:80px">连续月数</label>
+        <div class="div-month col-sm-2">
+            <input id="month_number" type="number" placeholder="请输入0以上的整数" style="height:30px;padding:5px " value="3" />
+        </div>
+        <div class="form-group col-sm-3">
+            <label for="exampleInputAccount1" class="col-sm-4" style="line-height:30px;width:80px">得分区间</label>
+            <div class="col-sm-3">
+                <input type="text" id="start-score" class="form-control form-date" value="985">
+            </div>
+            <div class="to-score col-sm-2" style="padding-top: 6px;text-align:center;width:10px"><label> - </label></div>
+            <div class="col-sm-3">
+                <input type="text" id="end-score" class="form-control form-date" value="1000">
+            </div>
+        </div>
+        <div class="col-sm-2 "><button class="btn btn-info2 col-sm-6 query-company " id="searchbtn">查询</button></div>
+    </div>
+
+
+</div>
+
+
+<div class="row ">
+
+    <div class="datatable" data-checkable="false" style="margin-bottom: 0px;margin-right:10px;    background: #ffffff00;" data-sortable="false">
+        <!-- <label style="margin: 0;">共查询到 <span id="totlapeople" >0</span> 人</label> -->
+        <div class="table-head">
+            <table border="0" width="100%" align="center" style="margin-right:10px;">
+                <thead class="table-thead" align="center">
+                    <tr>
+                        <th width="5%">序号</th>
+                        <!-- <th width="10%">工号</th> -->
+                        <th width="15%">服务区</th>
+                        <!-- <th width="10%">姓名</th> -->
+                        <th width="60%">满足条件月份</th>
+                    </tr>
+                </thead>
+            </table>
+        </div>
+        <!-- 使用一个div来显示数据表格   -->
+        <div id="scrollTable" style="height:500px;overflow:scroll;    margin-right: -10px;">
+            <table style="border-top:0" border="0" width="100%" align="center" id="table">
+                <tbody class="table-tbody" style="background:white; " align="center">
+
+                </tbody>
+            </table>
+        </div>
+    </div>
+
+</div>
+</div>

+ 110 - 0
VisualInspection/qzd/view/statistics/service_area_data_statistics.html

@@ -0,0 +1,110 @@
+<!--服务区数据查询分析-->
+<script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/fwq/js/statistics/service_area_data_statistics.js"></script>
+<link rel="stylesheet" type="text/css" href="/css/statistics/personal_data_statistics.css">
+<div class="container-fluid">
+    <!--<div class="row-1"><span>个人数据统计</span></div>
+    <div class="line-1"></div>-->
+    <div class="row">
+        <!--<div class="name"><span>刘娟</span></div>
+            <div class="div-select div-button"><button>选择人员</button></div>-->
+        <!--<div class="name1"><span  for="exampleInputAccount1">请选择收费站:</span></div>-->
+        <div class="div-select col-sm-2"><select class="form-control" id="select-dept"></select></button>
+        </div>
+        <!-- <div class="div-select col-sm-2"><select class="form-control" id="select-personal"></select></button>
+        </div> 2期无人员-->
+        <div class="col-sm-1">
+            <div class="div-start">
+                <input class="form-control" id="start-time" placeholder="选择年月"></input>
+            </div>
+            <!-- <div class="div-to col-sm-1"><label for="exampleInputAccount1">-</label></div>
+            <div class="div-end col-sm-5"><input class="form-control" placeholder="请选择考核结束时间"></input>
+            </div> -->
+        </div>
+        <div class="div-select col-sm-1">
+            <select class="form-control score-select" id="score_select">
+                    <option value="2">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
+                </select>
+        </div>
+        <div class="query div-button col-sm-2"><button class="btn-info2">查询</button></div>
+        <!--<div class="export div-button"><button>导出</button></div>-->
+    </div>
+    <div class="line-1"></div>
+    <div class="row-3" style="background: #fff;">
+        <div class="dept">
+            <div style="margin-top:14px;">
+                <span>部门</span><br/><br/>
+                <span class="s_d_name" id='station_name'>服务区</span>
+            </div>
+        </div>
+        <!-- <div class="line-4"></div>
+        <div class="job">
+            <div style="margin-top:14px;">
+                <span>职务</span><br/><br/>
+                <span class="s_d_name" id='station_user_name'>收费员</span>
+            </div>
+        </div> -->
+        <div class="line-5"></div>
+        <div class="current-month" style="width: 89.8%;">
+            <span style="margin-left:20px;">本月:</span>
+            <span>公司排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_com_ranking">-</span>
+            <span>总扣分:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_score_ranking">-</span>
+
+        </div>
+        <div class="line-6" style="width: 89.8%;"></div>
+        <div class="next-month" style="width: 89.8%;">
+            <span style="margin-left:20px;">上月:</span>
+            <span>公司排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_com_ranking">-</span>
+            <span>总扣分:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_score_ranking">-</span>
+
+        </div>
+    </div>
+
+
+
+    <div class="row">
+        <div class="col-sm-6" style="padding:0 5px;">
+            <div class="border-no">
+                <div class="title-div"><span>服务区得分统计</span></div>
+                <div class="row" style="padding:10px;width: 100%;position: absolute;">
+                    <div class="col-sm-4"><span style="color:red">★</span><span> 1000分</span></div>
+                    <div class="col-sm-4"><span style="color:orange">★</span><span> 990-1000分</span></div>
+                    <div class="col-sm-4"><span style="color:green">▲</span><span> 990分以下</span></div>
+                </div>
+                <div id="personal-score-statistics" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
+            </div>
+        </div>
+        <!-- <div class="line-3"></div> -->
+        <div class="col-sm-6" style="padding:0 5px;">
+            <div class="border-no">
+                <div class="title-div"><span class="title-span">服务区温馨服务检查问题类别占比</span></div>
+                <div id="personal-check-type" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
+            </div>
+        </div>
+    </div>
+
+    <div class="row" style="width:100%;margin:0 auto;">
+        <!-- 使用一个div来显示数据表格 -->
+        <div id="personal_data_table" style="margin-top:10px;" class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
+    <!-- <div class="border-line">
+        <div class="row-7">
+            <div class="col-1"><span style="font-family: '宋体';font-size:15px;">个人得分统计</span></div>
+            <div class="line-2"></div>
+            <div class="col-1"><span style="font-family: '宋体';font-size:15px;">个人温馨服务检查问题类别占比</span>
+
+            </div>
+        </div>
+        <div class="row-8">
+            <div id="personal-score-statistics" style="width:49%;height:400px;float:left;"></div>
+            <div class="line-3"></div>
+            <div id="personal-check-type" style="width:49%;height:400px;float:left;"></div>
+        </div>
+    </div> -->
+</div>
+<script>
+    $(document).ready(function() {
+        
+    });
+</script>

+ 81 - 0
VisualInspection/qzd/view/statistics/total_company_statistics.html

@@ -0,0 +1,81 @@
+<script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/fwq/js/statistics/total_company_statistics.js"></script>
+<link rel="stylesheet" type="text/css" href="/css/statistics/total_company_statistics.css">
+<div class="container-fluid statistic-panel">
+    <div class="row">
+        <div class="div-month col-sm-1">
+            <!--<select>-->
+            <!--<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>-->
+            <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+        </div>
+        <div class="col-sm-2"><button class="btn btn-info2 col-sm-6 query-company">查询</button></div>
+    </div>
+    <!-- <div class="line-1"></div> -->
+
+    <div class="border-line">
+        <div class="row-3">
+            <div class="title-div"><span>公司12个月考核得分总体变化趋势分析</span></div>
+        </div>
+        <div id="company-year-assess" style="height: 100%;height:400px;"></div>
+    </div>
+
+    <div class="row">
+        <div class="col-sm-6">
+            <div class="border-no">
+                <div class="title-div"><span>公司考核扣分情况占比</span></div>
+                <div id="company-points-assess" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
+            </div>
+        </div>
+        <!-- <div class="line-3"></div> -->
+        <div class="col-sm-6">
+            <div class="border-no">
+                <div class="title-div"><span class="title-span">道管中心得分排名</span></div>
+                <div id="roadManager-score-rank" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
+            </div>
+        </div>
+    </div>
+
+    <div class="row" style="margin-top: 15px;">
+        <div class="col-sm-6">
+            <div class="border-no">
+                <div class="title-div"><span>公司全体服务区排名</span></div>
+                <div id="company-stationAll-rank" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
+            </div>
+        </div>
+        <!-- <div class="line-3"></div> -->
+        <div class="col-sm-6">
+            <div class="border-no">
+                <div class="title-div"><span class="title-span">温馨服务检查问题类别占比</span></div>
+                <div id="server-check-type" style="width:100%;height:400px;float:left;background-color: #fff;"></div>
+            </div>
+        </div>
+    </div>
+
+    <div class="border-line">
+        <div>
+            <div class="border-no">
+                <div class="title-div"><span>各个问题类别的扣分情况</span></div>
+                <div id="each-people-points" style="width:100%;height:400px;float:left;"></div>
+            </div>
+        </div>
+    </div>
+
+</div>
+<script>
+    $(document).ready(function() {
+
+    });
+</script>

+ 101 - 0
VisualInspection/qzd/view/task/add.html

@@ -0,0 +1,101 @@
+<link href="/node_modules/zui/dist/lib/datagrid/zui.datagrid.min.css" rel="stylesheet">
+<script src="/node_modules/zui/dist/lib/datagrid/zui.datagrid.js"></script>
+<script src="/fwq/js/task/add.js?__inline"></script>
+
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+
+
+
+<style>
+    .table_content {
+        padding: 0;
+    }
+    
+    .btn_c,
+    .btn_c label {
+        width: 100% !important;
+        height: 100% !important;
+        border-radius: 0;
+    }
+    
+    table td,
+    table th {
+        text-align: center;
+    }
+</style>
+
+<div class="container-fluid ">
+    <div class="row">
+
+        <span style="float: left;
+        padding-top: 5px;">时间:</span>
+        <div class="div-month">
+            <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+        </div>
+        <span style="float: left;
+        padding-top: 5px;">服务区:</span>
+        <div class="div-station">
+            <select class="form-control" id="fwq"></select>
+        </div>
+
+        <div class="col-xs-1">
+            <div class="input-group">
+                <button class="btn btn-primary " type="button" id="conditional_query" onclick="search()">查询</button>
+            </div>
+        </div>
+    </div>
+
+    <div class="row" style="height: 400px;">
+        <div class="datagrid" id="table_s" data-checkable="false" data-sortable="false"></div>
+    </div>
+    <div class="row">
+        <div class="col-xs-6" style="">
+            <div class="row">
+                <span style="float: left;
+                padding-top: 5px;">已选任务:</span>
+            </div>
+            <div class="row" style="height: 200px;">
+                <div id="selected_table" class="datagrid" data-checkable="false" data-sortable="false"></div>
+            </div>
+        </div>
+        <div class="col-xs-4" style="padding: 0 15px 0 15px">
+            <div class="row">
+                <span style="float: left;
+                padding-top: 5px;">稽查时间段:</span>
+            </div>
+
+            <div class="row" style="padding-top: 10px">
+                <div class="col-xs-5">
+                    <input type="text" style="width:100%;" id="starttime">
+                </div>
+                <div class="col-xs-2" style="text-align: center"> ~ </div>
+
+                <div class="col-xs-5"><input type="text" style="width:100%;" id="endtime"></div>
+
+            </div>
+
+
+            <div class="row" style="margin-top: 100px">
+                <div class="row" style="margin: 0">
+                    <span style="float: left;
+                padding-top: 5px;">分配稽查任务:</span>
+                </div>
+                <div class="row" style="margin: 0;padding-top: 10px">
+                    <input type="text" style="width:100%;" id="check_users" class="form-control" placeholder="请选择稽查人员">
+
+                </div>
+            </div>
+
+        </div>
+        <div class="col-xs-2" style="margin-top: 190px;padding: 0;">
+
+            <div class="input-group" style="float: right ;">
+                <button class="btn btn-primary " style="width: 120px;" type="button" id="add_task_btn" onclick="addTask()">生成任务</button>
+            </div>
+
+        </div>
+
+    </div>
+
+
+</div>

+ 23 - 0
VisualInspection/qzd/view/task/applyDetail.html

@@ -0,0 +1,23 @@
+<div class="container-fluid ">
+    <form class="form-horizontal" style="margin-top:10px;">
+        <input type="hidden" class="form-control" id="apply_id" disabled="disabled" placeholder="">
+        <div class="form-group">
+            <label for="exampleInputAccount1" class="col-md-4 col-sm-2">申请人</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="apply_man" disabled="disabled" placeholder="">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="exampleInputAccount1" class="col-md-4 col-sm-2">申请时间</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="apply_time" disabled="disabled" placeholder="">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-md-4 col-sm-2">原因</label>
+            <div class="col-md-6 col-sm-10">
+                <textarea class="form-control" id="apply_reason" disabled="disabled" placeholder="" rows="10"></textarea>
+            </div>
+        </div>
+    </form>
+</div>

+ 55 - 0
VisualInspection/qzd/view/task/apply_task.html

@@ -0,0 +1,55 @@
+<script src="/fwq/js/task/apply_task.js?__inline"></script>
+<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-1" style="padding:0;">
+                    <input type="text" id="start_time" class="form-control form-date" placeholder="开始时间">
+                </div>
+
+                <label for="exampleInputAccount1" class="col-sm-1">考核部门</label>
+                <div class="col-sm-1" style="padding:0;;width:120px">
+                    <select class="form-control" id="fsList">
+                    </select>
+                </div>
+
+                <div class="form-group col-sm-3" style="text-align:center">
+                    <div class="col-sm-4">
+                        <div class="checkbox">
+                            <label>
+                              <input type="checkbox" id="check_ss" > 申诉任务
+                            </label>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="checkbox">
+                            <label>
+                              <input type="checkbox" id="check_zc"  checked=true> 正常任务
+                            </label>
+                        </div>
+                    </div>
+
+
+                </div>
+                <div class="col-sm-2">
+                    <button class="btn btn-info2" style="width:80px;" type="button" onclick="queryUnexaminedTask()">查询</button>
+                    <div id="agreePatchBtn" style="float:right;display:none;">
+                        <button class="btn btn-info3" type="button" onclick="agreeApplyTaskPatch()"><i class="icon icon-plus-sign"></i> 一键同意</button>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <hr style="margin-top:0px;">
+
+    <div id="unexamined_datatable"></div>
+</div>
+<div id="apply_detail_div" style="display:none;text-align:center;">
+    <link rel="import" href="/fwq/view/task/applyDetail.html?__inline">
+</div>
+<script>
+    $(document).ready(function() {
+        initApplyPage();
+    });
+</script>

+ 230 - 0
VisualInspection/qzd/view/task/check.html

@@ -0,0 +1,230 @@
+<script type="text/javascript" src="/js/lib/sonic.js?__inline"></script>
+<div class="container-fluid ">
+    <div class="row">
+        <form class="form-horizontal">
+            <div class="form-group" style="margin-bottom: 5px;">
+                <div class="form-group col-sm-7" style="margin-bottom: 0px;">
+                    <label class="col-sm-7" style="text-align:left">名称:<span id="taskName" class="label" style="vertical-align:baseline"></span></label>
+                    <label class="col-sm-5">时间:<span id="check_time" class="label" style="vertical-align:baseline"></span></label>
+                </div>
+                <div class="form-group col-sm-5" style="margin-bottom: 0px;">
+                    <label class="col-sm-3">考核区域:</label>
+                    <div class="col-sm-9" style="bottom:-5px">
+                        <label id="checked_area"></label> (次数:
+                        <a href="javascript:void(0)" onclick="showCheckDetailCount()"><span class="label label-primary" id="checked_count">-</span></a>)
+
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+
+    <div class="row">
+        <div class="col-sm-6">
+            <div id="dashboard" class="dashboard dashboard-draggable" data-height="300">
+                <section class="row">
+                    <div class="col-md-12">
+                        <div class="panel" data-id="1">
+
+                            <div class="panel-body" style="padding:0 0 5px 0">
+
+
+
+                                <div id="video_content">
+                                    <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;">
+                                        <p style="padding-top:180px;font-size:20px">加载中...</p>
+                                        <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->
+                                    </div>
+                                    <div class="row" class="col-md-12" style="padding:5px 10px 25px 10px;text-align:center;margin:0px">
+                                        <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0" />
+                                        <br/>
+                                        <span id="ex1_span" style="position: absolute;left: 25px;">2017-06-12 23:00:00</span>
+                                    </div>
+                                    <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
+                                        <div class="col-md-4 " style="padding-left:0">
+                                            <div class="input-group" style="padding-left:0">
+                                                <input type="text" id="video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">
+                                                <span class="input-group-btn">
+                                                <button class="btn btn-default" style="height:42px" onclick="setVideoPos()" type="button">校正</button>
+                                             </span>
+                                            </div>
+                                        </div>
+                                        <div class="btn-group1" style="float:right;">
+                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
+                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info1 " style="width:41px;height:41px" id="video_btn_start" onclick="doAction('video_start')"><img id="video_btn_start_img" style="width:30px" src="/images/video.png"></img></button>
+                                            <button type="button" class="btn btn-info1 hidden" style="width:41px;height:41px" id="video_btn_stop" onclick="doAction('video_stop')"><i class="icon icon-stop icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info1" style="width:41px;height:41px" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
+
+
+                                        </div>
+
+                                    </div>
+                                    <!--<hr>-->
+
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </section>
+
+
+            </div>
+
+        </div>
+        <div class="col-sm-6">
+            <div id="score_datatable" style="height:250px;overflow:auto;" data-checkable="true" data-sortable="true"></div>
+            <div class="row">
+                <div id="dashboard" class="dashboard dashboard-draggable" data-height="300">
+
+                    <div class="row" class="col-sm-11" style="margin:5px;">
+                        <button class="btn btn-info2" type="button" onclick="clearAllImg()" style="margin-right:10px;">清空</button>
+                        <button class="btn btn-info3" type="button" onclick="showScore()" style="margin-right:10px;">评分</button>
+                        <button id="saveEditBtn" class="btn btn-warning" type="button" onclick="saveEdit()" style="margin-right:10px;display:none;">保存修改</button>
+                        <form id="form1" runat="server" method="post" enctype="multipart/form-data" style="float:left;margin-right:10px;">
+                            <div>
+                                <button id="box" class="btn btn-info2" type="button">上传</button>
+                                <div style="display:none;">
+                                    <input type="file" name="_f" id="_f" />
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                    <div class="panel" style="margin-bottom:10px;">
+                        <div class="panel-body" style="padding:5px;" class="col-sm-12">
+                            <div id="img_container" class="cards cards-borderless col-sm-12" style="height:100px;overflow:auto;">
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+            </div>
+            <div class="row" style="margin-top:0px;">
+                <div class="col-sm-10" id="btn_task">
+                    <button class="btn btn-info2" type="button" onclick="submitCheck()">直接提交</button>
+                    <button class="btn btn-info2" type="button" onclick="showPre()">预览提交</button>
+                    <button class="btn btn-info3" type="button" onclick="showInvalid()">申请无效</button>
+                    <!--<button class="btn btn-primary" type="button" data-toggle="modal" data-target="#refuseApplyWin">拒绝申请</button>
+                    <button class="btn btn-primary" type="button" onclick="agreeApply()">同意申请</button>-->
+                </div>
+                <div class="col-sm-10" id="btn_appeal_task">
+                    <button class="btn btn-info2" type="button" onclick="submitCheck4AppealDirect()">直接提交</button>
+                    <button class="btn btn-info2" type="button" onclick="showPre4Appeal()">预览提交</button>
+                    <button class="btn btn-info3" type="button" onclick="appeal_showInvalid()">申请无效</button>
+                    <!--<button class="btn btn-primary" type="button" data-toggle="modal" data-target="#refuseApplyWin">拒绝申请</button>
+                    <button class="btn btn-primary" type="button" onclick="agreeApply()">同意申请</button>-->
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<div id="appeal_div" style="display:none;">
+    <link rel="import" href="/view/mytask/appealDetail.html?__inline">
+</div>
+
+<!-- 考核项 -->
+<div id="items-div" style="display:none;text-align:center;">
+    <ul id="items_tree" class="ztree"></ul>
+</div>
+
+<!-- 修改扣分 -->
+<div id="score-detail-div" style="display:none;text-align:center;">
+    <link rel="import" href="/fwq/view/task/scoreDetail.html?__inline">
+</div>
+<!-- 无效任务 -->
+<div class="modal fade" id="validSubmitWin">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
+                <h4 class="modal-title">无效申请</h4>
+            </div>
+            <div class="modal-body">
+                <form class="form-horizontal">
+                    <label for="exampleInputAccount1" class="col-sm-2">无效原因</label>
+                    <div class="form-group">
+                        <input class="col-sm-3" type="text" id="valid-reason" class="form-control" placeholder="原因">
+                    </div>
+                </form>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" onclick="saveValidReason()">保存</button>
+            </div>
+        </div>
+    </div>
+</div>
+
+<!-- 无效原因 -->
+<div id="invalid_div" style="display:none;text-align:center;">
+    <div class="container-fluid" style="overflow: hidden">
+        <div class="cards">
+            <div class="form-group">
+                <div class="col-md-6 col-sm-10">
+                    <input type="text" name="tags" class="form-control" id="apply_reason" placeholder="">
+                </div>
+            </div>
+            <br>
+            <div class="row" style="clear:both;height:100%;">
+            </div>
+            <div class="row" id="top_reason_div" style="padding:15px;">
+            </div>
+        </div>
+    </div>
+</div>
+
+<!-- 已稽查任务 -->
+<div id="checked_task_list_div" style="display:none;text-align:center;">
+    <div class="datatable" id="checked_user_task_datatable"></div>
+</div>
+
+<!-- 申诉详情 -->
+<div id="hide_div" style="display:none;text-align:center;">
+</div>
+
+
+<script>
+    $(document).ready(function() {
+        $("#video_btn_start").mouseover(function() {
+            $("#video_btn_start_img").attr("src", "/images/movie.png");
+        });
+        $("#video_btn_start").mouseout(function() {
+            $("#video_btn_start_img").attr("src", "/images/video.png");
+        });
+        if ($.checkTask.checked_location_type == 1) {
+            $("li.tab_lane").hide();
+            $("li.tab_not_lane").show();
+            $("li.tab_not_lane:first").addClass("active");
+        } else {
+            $("li.tab_lane").show();
+            $("li.tab_not_lane").hide();
+            $("li.tab_lane:first").addClass("active");
+        }
+        initCheck();
+    });
+
+    //文件上传
+    $("#box").click(function() {
+        return $("#_f").click();
+    });
+
+    $("#_f").change(function() {
+        UpladFile();
+    });
+
+    //文件上传 不变
+    function UpladFile() {
+        var fileObj = document.getElementById("_f").files[0]; // 获取文件对象
+        // var FileController = base_image_server_url +'fileServer/file/upload';// 接收上传文件的后台地址
+        // FormData 对象
+        // var form = new FormData();
+        // form.append("name", "hooyes");                        // 可以增加表单数据
+        // form.append("file", fileObj);                           // 文件对象
+        uploadFile(fileObj, "file", function(data) {
+            addPic(base_image_server_url + data.path);
+        }, function(error) {
+            console.log(error)
+        }, "task");
+    }
+</script>

+ 65 - 0
VisualInspection/qzd/view/task/checked.html

@@ -0,0 +1,65 @@
+<script src="/fwq/js/task/checked.js?__inline"></script>
+<div class="container-fluid ">
+    <div class="row">
+        <form class="form-horizontal">
+            <div class="form-group">
+                <div class="form-group col-sm-5" style="margin:0px;">
+                    <label for="exampleInputAccount1" class="col-sm-2">稽查日期</label>
+                    <div class="col-sm-5">
+                        <input type="text" id="start_time" class="form-control form-date" placeholder="开始时间">
+                    </div>
+                </div>
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">考核部门</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="fsList">
+                        </select>
+                    </div>
+                </div>
+
+
+                <div class="col-sm-2">
+                    <button class="btn btn-primary " type="button" onclick="queryCheckedTask()">查询</button>
+                </div>
+            </div>
+            <div class="form-group">
+
+                <div id="hasScoreDiv" class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">扣分</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="hasScoreList">
+                            <option value="" selected>全部</option>
+                            <option value="1">有</option>
+                            <option value="2">无</option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <hr style="margin-top:0px;">
+
+    <div class="datatable" id="checked_datatable"></div>
+</div>
+<script>
+    var cur_page;
+    $(document).ready(function() {
+        // 仅选择日期
+        $.jeDate("#start_time", {
+            isinitVal: true,
+            format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        });
+        $("#start_time").val(getCurrentTimeFormat());
+        //去上次查询保留的参数
+        var store_params = $.zui.store.get('store_param_' + current_url);
+        var checked_dept = null;
+        if (store_params) {
+            checked_dept = store_params.checked_dept;
+            $("#start_time").val(moment(store_params.start_time).add(1, "month").format("YYYY/MM"));
+            $("#hasScoreList").val(store_params.hasScore);
+            cur_page = store_params.currentpage;
+        }
+        setSASelect("#fsList", checked_dept);
+        queryCheckedTask();
+    });
+</script>

+ 9 - 0
VisualInspection/qzd/view/task/chooseCheckman.html

@@ -0,0 +1,9 @@
+<div class="container-fluid ">
+    <div class="cards" id="user_container" style="height:200px;overflow:auto;">
+        <label for="exampleInputAccount1" class="col-sm-4">考核部门</label>
+        <div class="col-sm-8">
+            <select class="form-control" id="choseCheckmanList">
+            </select>
+        </div>
+    </div>
+</div>

+ 27 - 0
VisualInspection/qzd/view/task/scoreDetail.html

@@ -0,0 +1,27 @@
+<div class="container-fluid ">
+    <form class="form-horizontal" style="margin-top:10px;">
+        <input type="hidden" class="form-control" id="score_id_text" disabled="disabled" placeholder="">
+        <div class="form-group">
+            <label for="exampleInputAccount1" class="col-md-3">考核项</label>
+            <div class="col-md-9">
+                <input type="text" class="form-control" id="check_item_text" placeholder="">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="exampleInputAccount1" class="col-md-3">分数</label>
+            <div class="col-md-9">
+                <input type="text" class="form-control" id="check_score_text" placeholder="">
+            </div>
+        </div>
+
+        <div class="form-group">
+            <label class="col-md-3">备注</label>
+            <div class="col-md-9">
+                <textarea class="form-control" id="check_remark_text" placeholder="" />
+            </div>
+        </div>
+        <div class="form-group">
+            <div class="col-md-12" id="score_remark_div"></div>
+        </div>
+    </form>
+</div>

+ 558 - 0
VisualInspection/qzd/view/task/taskDetail.html

@@ -0,0 +1,558 @@
+<div class="container-fluid ">
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核基本信息</h3>
+        <div>
+            <table style="width:100%;">
+                <tr>
+                    <td width="20%">考核任务名:<label id="name"></label></td>
+                    <td width="20%">考核时间: <label id="checktime"></label></td>
+                    <td width="20%">考核部门:<label id="checked_dept"></label></td>
+                </tr>
+            </table>
+        </div>
+    </div>
+    <hr>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核任务流程</h3>
+        <div id="flow_div">
+        </div>
+    </div>
+    <hr>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核详细内容</h3>
+        <div>
+            <div id="score_datatable" data-checkable="true" data-sortable="true"></div>
+        </div>
+    </div>
+    <hr>
+    <div class="row" id="appeal_div">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">申诉基本信息</h3>
+        <div>
+            <table style="width:100%;">
+                <tr>
+                    <td width="20%">申诉时间:<label id="appeal_time"></label></td>
+                    <td width="20%">申诉原因:<label id="appeal_reason"></label></td>
+                </tr>
+                <tr>
+                    <td width="20%">附件:
+                        <div class="file-list" id="appeal_file_list">
+                        </div>
+                    </td>
+                    <td>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="20%">复核结果:
+                        <label id="recheck_result"></label>
+                    </td>
+                    <td>
+                    </td>
+                </tr>
+            </table>
+        </div>
+    </div>
+    <div class="row" style="margin-top:5px;text-align:center">
+        <div>
+            <button id="submitBtn" style="display:none" type="button" class="btn btn-warning" onclick="submitCheck()">提交</button>
+            <button id="confirmBtn" style="display:none" type="button" class="btn btn-warning" onclick="confirmCheck()">确认</button>
+            <button id="submitAppealBtn" style="display:none" type="button" class="btn btn-warning" onclick="submitCheck4Appeal()">复核提交</button>
+            <button id="confirmAppealBtn" style="display:none" type="button" class="btn btn-warning" onclick="confirmCheck4Appeal()">申诉结果确认</button>
+            <button id="appealBtn" style="display:none" type="button" class="btn btn-danger" onclick="showAppeal()">申诉</button>
+            <button id="assignBtn" style="display:none" type="button" class="btn btn-danger" onclick="showAssign()">分配</button>
+            <button id="backBtn" style="display:none" type="button" class="btn btn-danger" onclick="back2Check()">退回重新稽查</button>
+            <button id="backAppealBtn" style="display:none" type="button" class="btn btn-danger" onclick="back2AppealCheck()">退回重新复查</button>
+            <button id="backConfirmBtn" style="display:none" type="button" class="btn btn-danger" onclick="back2Confirm()">退回重新确认</button>
+        </div>
+    </div>
+</div>
+<div id="form-div" style="display:none;text-align:center;height:300px;padding:5px;">
+    <div class="row">
+        <div id="img_container" class="cards cards-borderless col-sm-12">
+        </div>
+    </div>
+</div>
+<div id="appealDetail-div" style="display:none;text-align:center;">
+    <link rel="import" href="/fwq/view/appeal_management/appealDetail.html?__inline">
+</div>
+<div id="chooseCheckman-div" style="display:none;text-align:center;">
+    <link rel="import" href="/fwq/view/task/chooseCheckman.html?__inline">
+</div>
+<style>
+    .line {
+        text-align: center;
+        font-size: 20px;
+        height: 5px;
+        margin: 15px 0px;
+        width: 100%;
+        background: #1296db;
+        overflow: hidden;
+    }
+    
+    .timeline_item_station {
+        left: 42%;
+        /* margin-left: 55px; */
+        margin-top: 18px;
+        width: 25px;
+        height: 25px;
+        padding: 15px;
+        border-width: 6px;
+        background-color: rgb(50, 141, 199);
+        position: absolute;
+        border-radius: 50%;
+        padding: 10px;
+        top: 0;
+        -webkit-transition: all .3s ease-out;
+        transition: all .3s ease-out;
+    }
+</style>
+<script>
+    $(document).ready(function() {
+        addBreadMenu("/fwq/view/task/taskDetail.html", "稽查详情");
+        checkAuth();
+        $("#name").html($.checkTask.name);
+        $("#checkman").html($.checkTask.checkman_name);
+        $("#checktime").html($.checkTask.start_time);
+        $("#checked_dept").html($.checkTask.checked_dept_name);
+
+
+
+        if ($.checkTask.appeal) {
+            $("#appeal_div").show();
+            $("#appeal_time").html($.checkTask.appeal.appeal_time);
+            $("#appeal_reason").html($.checkTask.appeal.appeal_reason);
+            $("#appeal_file_list").html(genAppeaFiles($.checkTask.appeal.file_src));
+            $("#recheck_result").html($.checkTask.appeal.recheck_result);
+        } else {
+            $("#appeal_div").hide();
+        }
+
+        genFlow();
+        queryScores();
+    });
+
+    //初始化表行按钮
+    function initBtns() {
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_2", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_3", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_7", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_12", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_13", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_17", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_4", ["#backBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_6", ["#backConfirmBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_14", ["#backAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_11", ["#assignBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_FWQ_ADMIN + "_5", ["#confirmBtn", "#appealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_FWQ_ADMIN + "_15", ["#confirmAppealBtn"]);
+    }
+
+    function checkAuth() {
+        initBtns();
+        showBtn(ROLE_JICHA, $.checkTask.check_status);
+        showBtn(ROLE_JICHA_ADMIN, $.checkTask.check_status);
+        showBtn(ROLE_FWQ_ADMIN, $.checkTask.check_status);
+    }
+
+    function showBtn(role, status) {
+        if (hasRole(role)) {
+            var btnArr = $.zui.store.get("task_detail_btn_" + role + "_" + status);
+            if (btnArr) {
+                for (var i in btnArr) {
+                    $(btnArr[i]).show();
+                }
+            }
+        }
+    }
+
+    function queryScores() {
+        // 使用data参数更新数据:
+        var data = {
+            "task_id": $.checkTask.id
+        }
+
+        var cols = [{
+            width: 80,
+            text: '序号',
+            type: 'number',
+            flex: true,
+            colClass: 'text-center',
+            field: 'num'
+        }, {
+            width: 60,
+            text: '评分记录',
+            type: 'string',
+            flex: true,
+            sort: 'down',
+            field: 'content'
+        }, {
+            width: 80,
+            text: '分数',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'check_item_score'
+        }, {
+            width: 80,
+            text: '区域',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'checked_area_name'
+        }, {
+            width: 80,
+            text: '备注',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'remark'
+        }, {
+            width: 280,
+            text: '图片',
+            type: 'imagedd',
+            flex: true,
+            colClass: '',
+            field: 'pics'
+        }];
+        if (hasRole(ROLE_JICHA) && ($.checkTask.check_status == 2 || $.checkTask.check_status == 2 || $.checkTask.check_status == 12 ||
+                $.checkTask.check_status == 13)) {
+            var oper = {
+                width: 160,
+                text: '操作',
+                type: 'string',
+                flex: true,
+                field: 'id',
+                oper: [{
+                    func: 'showEditScore',
+                    text: '修改',
+                    icon_class: 'icon-edit'
+                }, {
+                    func: 'deleteScore',
+                    text: '删除',
+                    icon_class: 'icon-remove-circle'
+                }]
+            }
+            cols.push(oper);
+        }
+        $('#score_datatable').mytable({
+            'cols': cols,
+            'url': "/f/score/getScoreList/",
+            'param': data
+        });
+        $('a.lightbox-toggle').lightbox();
+    }
+    var curScoreId;
+
+    function showEditScore(id) {
+
+        var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
+        // alert(rowData.pics);
+        curScoreId = rowData.id;
+        scoreImageLayer = showPopup4Common('修改图片', updateImg, '600px');
+        showTaskDetailPics(rowData.pics);
+    }
+
+    function showTaskDetailPics(pics, divId) {
+        var picStr = '';
+        if (!divId) divId = '#img_container';
+        $(divId).html(picStr);
+        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>' +
+                    (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;
+            }
+            $(divId).html(picStr);
+            $('a.lightbox-toggle').lightbox();
+        }
+    }
+
+    function updateImg() {
+
+        var imgArr = $("#img_container .pic-class");
+        var picsStr = "";
+        if (imgArr && imgArr.length > 0) {
+            for (var i = 0; i < imgArr.length; i++) {
+                picsStr += imgArr[i].src + ","
+            }
+            picsStr = picsStr.substr(0, picsStr.length - 1);
+        }
+        var param = {
+                'id': curScoreId,
+                'pics': picsStr
+            }
+            // alert("dddd");
+        addOrUpdateItem4Common(param, "/f/score/update", queryScores);
+        curScoreId = "";
+    }
+
+    function deleteScore(id) {
+        deleteItem4Common(id, "/f/score/delete/", queryScores);
+    }
+
+    function genFlow() {
+        var data = {
+            "id": $.checkTask.id
+        };
+        post_common_service("/f/task/getStatusById/", data, function(data) {
+            if (data) {
+                // console.log(data)
+                var flowStr = "";
+
+                var color_t = new $.zui.Color("#63B8FF");
+                for (var i in data) {
+                    var color = new $.zui.Color(color_t.r - i * 10, color_t.g - i * 10, color_t.b - i * 10);
+
+                    var startcolor = new $.zui.Color(color_t.r - i * 10 + 5, color_t.g - i * 10 + 5, color_t.b - i * 10 + 5);
+
+                    var endcolor = new $.zui.Color(color_t.r - i * 10 - 5, color_t.g - i * 10 - 5, color_t.b - i * 10 - 5);
+
+                    var background = "background:-webkit-gradient(linear, 0 % 0 % , 0 % 100 % , from(" + startcolor.hexStr() + "), to(" + endcolor.hexStr() + "));" +
+                        "background:-webkit-linear-gradient(top, " + startcolor.hexStr() + ", " + endcolor.hexStr() + ");" + "background:-moz-linear-gradient(top," + startcolor.hexStr() + "," + endcolor.hexStr() + ");"
+
+
+
+                    var str = "";
+                    if (i == 0) {
+                        str = '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-60px;">' +
+                            '<img src="/images/start.png" style="width: 28px;right:-1px; position: absolute; top:16px;">' +
+                            '</div>'
+                    }
+                    str +=
+                        // '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-88px;">' +
+
+                        // '   <img src="/images/end.png" style="width: 35px;margin-left: 36px;margin-top: 25px;">' +
+                        // '</div>' +
+
+                        '<div class="col-sm-2" style="text-align:center;padding:0px;width: 140px;margin-bottom: 33px;">' +
+                        '<div class="row">' +
+                        '   <label>' + data[i].check_status_name + '</label>' +
+                        '</div>' +
+                        '<div class="row line" style="margin-top: 3px;' + background + '">' +
+                        '    <div class="timeline_item_station" style="background:' + color.hexStr() + '"></div>' +
+                        '</div>' +
+                        '<div class="row" style="margin-top: -5px;">' +
+                        '   <label style="    font-weight: 400;">' + data[i].update_time + '</label>' +
+                        '</div>' +
+                        (i == data.length - 1 ? (
+                            '<i class="icon icon-angle-right" style="font-size: 45px;right: -5px;position: absolute;top: 6px;color:' + endcolor.hexStr() + '"></i>'
+                            // '   <img src="/images/end.png" style="width: 28px;right:-10px; position: absolute; top:16px;">'
+                        ) : "") +
+                        '</div>';
+
+
+                    flowStr += str;
+
+
+                }
+                $("#flow_div").html(flowStr);
+            }
+        })
+    }
+
+    function submitCheck() {
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 4
+        }
+        no_return_common_service("/f/task/taskEnd/", param, function(data) {
+            layer.msg("提交成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+
+    }
+
+    function submitCheck4Appeal() {
+        var appeal_result = 1;
+        //询问框
+        layer.confirm('该申诉是否成功?', {
+            btn: ['成功', '失败'] //按钮
+        }, function() {
+            appeal_result = 1;
+            submitAppealResult(appeal_result);
+        }, function() {
+            appeal_result = 2;
+            submitAppealResult(appeal_result);
+        });
+    }
+
+    function submitAppealResult(appeal_result) {
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 14,
+            "appeal_id": $.checkTask.appeal.id,
+            "appeal_result": appeal_result
+        }
+        no_return_common_service("/f/task/update/", param, function(data) {
+            layer.msg("提交成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+    var appealLayer;
+
+    function showAppeal() {
+        // appealLayer = showPopup4Common('申诉',saveAppeal,'600px','#appealDetail-div');
+        layer.open({
+            type: 1,
+            area: '600px',
+            title: '申诉',
+            closeBtn: 1,
+            shadeClose: true,
+            skin: 'layui-layer-lan',
+            content: $('#appealDetail-div'),
+            btn: '保存',
+            btnAlign: 'c', //按钮居中
+            shade: 0, //不显示遮罩
+            yes: function(index) {
+                saveAppeal();
+            }
+        });
+    }
+
+    function confirmCheck() {
+        layer.confirm('是否确认该稽查结果?', {
+            btn: ['确认', '取消'], //按钮
+            offset: 'auto'
+        }, function() {
+            var param = {
+                "id": $.checkTask.id,
+                "check_status": 6
+            }
+            no_return_common_service("/f/task/update/", param, function(data) {
+                layer.msg("确认成功", {
+                    time: 2000 //20s后自动关闭
+                });
+                redirectLastPage();
+            });
+        }, function(index) {
+            layer.close(index);
+        });
+
+    }
+
+    function confirmCheck4Appeal() {
+        layer.confirm('是否确认该申诉结果?', {
+            btn: ['确认', '取消'], //按钮
+            offset: 'auto'
+        }, function() {
+            var param = {
+                "id": $.checkTask.id,
+                "check_status": 16
+            }
+            no_return_common_service("/f/task/update/", param, function(data) {
+                layer.msg("确认成功", {
+                    time: 2000 //20s后自动关闭
+                });
+                redirectLastPage();
+            });
+        }, function(index) {
+            layer.close(index);
+        });
+
+    }
+
+    function showAssign() {
+        showPopup4Common('分配稽查员', function() {
+            saveAssign();
+        }, '400px', '#chooseCheckman-div');
+        setCheckmanSelect('#choseCheckmanList', null, $.checkTask.checkman,
+            function() {
+                $('#choseCheckmanList').chosen({
+                    // width:'200px',
+                    height: '100px',
+                    no_results_text: '没有找到', // 当检索时没有找到匹配项时显示的提示文本
+                    disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
+                    search_contains: true // 从任意位置开始检索
+                });
+            });
+
+    }
+
+    function saveAssign() {
+        var param = {
+            "id": $.checkTask.id,
+            "recheckman": $('#choseCheckmanList').val(),
+            "check_status": 12
+        }
+        no_return_common_service("/f/task/update/", param, function(data) {
+            layer.msg("分配成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+
+    function back2Check() {
+        //退回到待提交页面
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 3,
+            "check_status_name": "退回"
+        }
+        no_return_common_service("/f/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+
+    function back2Confirm() {
+        //退回到待提交页面
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 5,
+            "check_status_name": "退回重新确认"
+        }
+        no_return_common_service("/f/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+
+    function back2AppealCheck() {
+        //退回到待提交页面
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 13,
+            "check_status_name": "退回"
+        }
+        no_return_common_service("/f/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+</script>

+ 64 - 0
VisualInspection/qzd/view/task/task_list.html

@@ -0,0 +1,64 @@
+<script src="/js/statistics/common_statistic.js?__inline"></script>
+<script src="/fwq/js/task/task_list.js?__inline"></script>
+
+<div class="container-fluid ">
+    <div class="row">
+        <form class="form-horizontal" style="margin:0px;">
+            <div class="form-group" style="margin:0px;">
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4" style="text-align: left;padding-right:0">稽查周期</label>
+                    <div class="col-sm-8">
+                        <input type="text" id="start_time" class="form-control form-date" placeholder="选择周期">
+                    </div>
+                </div>
+                <div class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">考核部门</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="fsList">
+                        </select>
+                    </div>
+                </div>
+
+
+                <div class="form-group col-sm-2">
+                    <button class="btn btn-info2 col-sm-1" style="width:80px;" type="button" onclick="queryTask()">查询</button>
+                    <div id="dispatchPatchBtn" class="col-sm-1" style="display:none;">
+                        <button class="btn btn-info3" type="button" onclick="dispatchTaskPatch()"><i class="icon icon-signin"></i> 批量下发</button>
+                    </div>
+                    <div id="confirmPatchBtn" class="col-sm-1" style="display:none;">
+                        <button class="btn btn-info3" type="button" onclick="confirmTaskPatch()"><i class="icon icon-hand-up"></i> 一键确认</button>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group" style="margin:0px;">
+                <div id="hasScoreDiv" style="display:none;" class="form-group col-sm-3">
+                    <label for="exampleInputAccount1" class="col-sm-4">有无扣分</label>
+                    <div class="col-sm-8">
+                        <select class="form-control" id="hasScoreList">
+                            <option value="" selected>全部</option>
+                            <option value="1">有</option>
+                            <option value="2">无</option>
+                        </select>
+                    </div>
+                </div>
+                <div class="form-group col-sm-2">
+                </div>
+                <div class="form-group col-sm-2">
+                    <div class="form-group col-sm-1">
+                    </div>
+                    <div id="dispatchAllNoScoreBtn" class="col-sm-1" style="display:none;padding:0px;">
+                        <button class="btn btn-info4" type="button" onclick="dispatchAllNoScoreTask()"><i class="icon icon-signin"></i> 下发无扣分任务</button>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <hr style="margin-top:0px;">
+
+    <div class="datatable" id="task_list_table"></div>
+</div>
+<script>
+    $(document).ready(function() {
+        initTaskPage();
+    });
+</script>

+ 25 - 0
Visuallnspection_qzd/visuallnspection_qzd/.gitignore

@@ -0,0 +1,25 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/

BIN
Visuallnspection_qzd/visuallnspection_qzd/.mvn/wrapper/maven-wrapper.jar


+ 1 - 0
Visuallnspection_qzd/visuallnspection_qzd/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1 @@
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip

+ 225 - 0
Visuallnspection_qzd/visuallnspection_qzd/mvnw

@@ -0,0 +1,225 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+echo $MAVEN_PROJECTBASEDIR
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 143 - 0
Visuallnspection_qzd/visuallnspection_qzd/mvnw.cmd

@@ -0,0 +1,143 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 296 - 0
Visuallnspection_qzd/visuallnspection_qzd/pom.xml

@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.xintong.visualInspection</groupId>
+    <artifactId>visuallnspection_qzd</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>visuallnspection_qzd</name>
+    <description>Demo project for Spring Boot</description>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>1.5.2.RELEASE</version>
+        <relativePath /> <!-- lookup parent from repository -->
+    </parent>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>com.xintong.visuallnspection.inteface</groupId>
+            <artifactId>visuallnspectioninteface</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <exclusions>  <exclusion>
+                <artifactId>spring-boot-starter-parent</artifactId>
+                <groupId>org.springframework.boot</groupId>
+            </exclusion>
+                <exclusion>
+                    <artifactId>spring-boot-starter-web</artifactId>
+                    <groupId>org.springframework.boot</groupId>
+                </exclusion>
+
+                <exclusion>
+                    <groupId>org.projectlombok</groupId>
+                    <artifactId>lombok</artifactId></exclusion></exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>1.3.0</version>
+        </dependency>
+
+
+
+
+
+
+
+
+
+
+
+
+        <!--<dependency> -->
+        <!--<groupId>org.springframework.session</groupId> -->
+        <!--<artifactId>spring-session-data-redis</artifactId> -->
+        <!--</dependency> -->
+
+
+
+        <!--<dependency> -->
+        <!--<groupId>redis.clients</groupId> -->
+        <!--<artifactId>jedis</artifactId> -->
+        <!--<version>2.9.0</version> -->
+        <!--</dependency> -->
+
+
+        <!--<dependency> -->
+        <!--<groupId>org.springframework.boot</groupId> -->
+        <!--<artifactId>spring-boot-starter-data-jpa</artifactId> -->
+        <!--</dependency> -->
+
+        <!-- http://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity4 -->
+        <dependency>
+            <groupId>org.thymeleaf.extras</groupId>
+            <artifactId>thymeleaf-extras-springsecurity4</artifactId>
+            <version>2.1.2.RELEASE</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.thymeleaf/thymeleaf-spring4 -->
+        <!--<dependency> -->
+        <!--<groupId>org.thymeleaf</groupId> -->
+        <!--<artifactId>thymeleaf-spring4</artifactId> -->
+        <!--<version>3.0.5.RELEASE</version> -->
+        <!--</dependency> -->
+
+
+
+        <!--<dependency> -->
+        <!--<groupId>org.springframework.security</groupId> -->
+        <!--<artifactId>spring-security-taglibs</artifactId> -->
+        <!--<version>4.2.1.RELEASE</version> -->
+        <!--</dependency> -->
+
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>4.2.1</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>5.1.41</version><!--$NO-MVN-MAN-VER$-->
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.0.29</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.31</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+            <version>1.8.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>1.8.10</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>3.12</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jxls</groupId>
+            <artifactId>jxls</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jxls</groupId>
+            <artifactId>jxls-poi</artifactId>
+            <version>1.0.9</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+
+
+
+
+        <!--dubbo-->
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>3.4.11</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+            <version>0.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba.boot</groupId>
+            <artifactId>dubbo-spring-boot-starter</artifactId>
+            <version>0.1.0</version>
+        </dependency>
+
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>Dalston.RELEASE</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>${basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/application*.yml</include>
+                    <include>**/application*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>${basedir}/src/main/resources</directory>
+                <excludes>
+                    <exclude>**/application*.yml</exclude>
+                    <exclude>**/application*.properties</exclude>
+                </excludes>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                    <include>**/*.xml</include>
+                </includes>
+                <filtering>false</filtering>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <targetPath>BOOT-INF/lib/</targetPath>
+                <includes>
+                    <include>**/*.jar</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>lib</directory>
+                <targetPath>BOOT-INF/lib/</targetPath>
+                <includes>
+                    <include>*.jar</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>spring-releases</id>
+            <name>Spring Releases</name>
+            <url>https://repo.spring.io/libs-release</url>
+        </repository>
+
+        <repository>
+            <id>xt-snapshots</id>
+            <name>snapshots</name>
+            <url>http://xt.wenhq.top:8084/nexus/content/repositories/snapshots</url>
+        </repository>
+    </repositories>
+    <pluginRepositories>
+        <pluginRepository>
+            <id>spring-releases</id>
+            <name>Spring Releases</name>
+            <url>https://repo.spring.io/libs-release</url>
+        </pluginRepository>
+    </pluginRepositories>
+
+
+</project>

+ 27 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/SystemInit.java

@@ -0,0 +1,27 @@
+package com.xintong.visualinspection.visuallnspection_qzd;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.visualinspection.service.*;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+
+@Component
+public class SystemInit implements CommandLineRunner {
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SystemInit.class);
+
+
+    @Override
+    public void run(String... strings) throws Exception {
+
+        System.out.println("_________________________________________________________________");
+
+       // System.out.println(commonService.getCodeFlagMap().toString());
+    }
+}

+ 22 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/VisuallnspectionFjqApplication.java

@@ -0,0 +1,22 @@
+package com.xintong.visualinspection.visuallnspection_qzd;
+
+import com.alibaba.fastjson.parser.ParserConfig;
+import org.apache.ibatis.logging.LogFactory;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+
+@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
+@ServletComponentScan
+public class VisuallnspectionFjqApplication {
+
+    public static void main(String[] args) {
+        ParserConfig.getGlobalInstance().addAccept("com.xintong.");
+        ParserConfig.getGlobalInstance().addAccept("org.springframework.security.core.");
+
+        LogFactory.useLog4JLogging();
+        SpringApplication.run(VisuallnspectionFjqApplication.class, args);
+    }
+}

+ 23 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/bean/Log.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.visuallnspection_qzd.bean;
+
+import lombok.Data;
+
+/**
+ * 文件名:Job
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class Log {
+    //编号
+    private Integer id;
+    //内容
+    private String content;
+    // 更改人
+    private Long update_user;
+    // 部门id
+    private Long dept_id;
+    // 任务id
+    private Long task_id;
+    //扣分id
+    private Long score_id;
+}

+ 180 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/controller/BaseController.java

@@ -0,0 +1,180 @@
+package com.xintong.visualinspection.visuallnspection_qzd.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.github.pagehelper.PageInfo;
+import org.slf4j.LoggerFactory;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.ObjectError;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:TestController
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@ControllerAdvice
+public class BaseController {
+	
+	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(BaseController.class);
+
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnResult(int result_code,String result_desc, Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", result_code);
+    	result.put("result_desc", result_desc);
+    	result.put("result_data", o);
+        return JSON.toJSON(result).toString();
+    }
+    
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessResult(String result_desc){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", result_desc);
+        return JSON.toJSON(result).toString();
+    }
+    
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessResult(){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", "success");
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm");
+    }
+    
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessResult(Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", "success");
+    	result.put("result_data", o);
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm");
+    }
+    
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessResultTime(Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", "success");
+    	result.put("result_data", o);
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm:00");
+    }
+    
+    /**
+     * 返回前台结果分页结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessPageResult(Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", "success");
+    	result.put("result_data", new PageInfo((List)o));
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm");
+    }
+    
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessResult(String result_desc, Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", result_desc);
+    	result.put("result_data", o);
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm");
+    }
+    
+    /**
+     * 返回前台结果结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessResult(String result_desc, Object o, String dateFormat){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", result_desc);
+    	result.put("result_data", o);
+        return JSON.toJSONStringWithDateFormat(result,dateFormat);
+    }
+    /** 基于@ExceptionHandler异常处理 *//*
+    @ExceptionHandler  
+    public String exp(HttpServletRequest request, Exception ex) {  
+        // 根据不同错误提示不同的错误  
+    	ErrorCode code;
+        if(ex instanceof NullPointerException) {  
+        	code = new ErrorCode(10001);
+        } else if (ex instanceof NumberFormatException) {  
+        	code = new ErrorCode(10002);
+        } else if (ex instanceof IndexOutOfBoundsException) {  
+        	code = new ErrorCode(10003);  
+        } else if (ex instanceof ArithmeticException) {  
+        	code = new ErrorCode(10004);  
+        } else if (ex instanceof FileNotFoundException) {  
+        	code = new ErrorCode(10005);  
+        } else if (ex instanceof IllegalArgumentException) {  
+        	code = new ErrorCode(10006); 
+        } else if (ex instanceof HttpMessageNotReadableException) {
+        	code = new ErrorCode(10007); 
+        } else if (ex instanceof BusinessException) {
+        	code = ((BusinessException) ex).getErrCode();
+        } else if(ex.getCause() instanceof TooManyResultsException){
+        	code = new ErrorCode(10008);
+        } else if (ex instanceof MethodArgumentNotValidException) {
+        	BindingResult bindingResult = ((MethodArgumentNotValidException) ex).getBindingResult();
+        	code = new ErrorCode(20001,getValidatorErrors(bindingResult)); 
+        } else{
+        	code = new ErrorCode(11000);  
+        }
+        logger.error(code.getDesc(), ex);
+        return returnResult(code.getCode(),code.getDesc(),null);
+    }*/
+    
+    public static String getValidatorErrors(BindingResult bindingResult){
+    	StringBuffer sb = new StringBuffer();
+    	for(ObjectError err:bindingResult.getAllErrors()){
+   		 	sb.append("["+err.getDefaultMessage()+"]");
+       	}
+       	return sb.toString();
+    }
+}

+ 105 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/controller/FileExcelController_Q.java

@@ -0,0 +1,105 @@
+package com.xintong.visualinspection.visuallnspection_qzd.controller;
+
+import com.xintong.visualinspection.bean.FwqCheckOther;
+import com.xintong.visualinspection.bean.FwqDeptStatistic;
+import com.xintong.visualinspection.bean.FwqStatisticsBean;
+import com.xintong.visualinspection.util.DateUtil;
+import com.xintong.visualinspection.visuallnspection_qzd.service.CheckOtherService_F;
+import com.xintong.visualinspection.visuallnspection_qzd.service.StatisticsService_F;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+
+@RestController
+@RequestMapping("/f/file")
+public class FileExcelController_F extends BaseController {
+
+    @Autowired
+    private CheckOtherService_F checkOtherService_f;
+    @Autowired
+    private StatisticsService_F statisticsService_f;
+
+    /**
+     * 稽查管理导出
+     * @param req
+     * @param resp
+     * @param fwqCheckOther
+     * @return
+     */
+    @RequestMapping(value = "/other/check/excel",method=RequestMethod.GET)
+    public String getOtherCheck(HttpServletRequest req,HttpServletResponse resp,
+                                FwqCheckOther fwqCheckOther){
+        checkOtherService_f.getOtherCheckExcel(fwqCheckOther, req, resp);
+        return super.returnSuccessResult(null);
+    }
+
+    /**
+     * 稽查统计-导出
+     * @param req
+     * @param resp
+     * @param fwqCheckOther
+     * @returnE
+     */
+    @RequestMapping(value = "/other/check/static/excel",method= RequestMethod.GET)
+    public String getOtherCheckststic(HttpServletRequest req,HttpServletResponse resp,
+                                      FwqCheckOther fwqCheckOther){
+        checkOtherService_f.getExcel(fwqCheckOther, req, resp);
+        return super.returnSuccessResult(null);
+    }
+
+    /**
+     * 服务区-营运管理综合检查情况统计导出
+     * @param req
+     * @param resp
+     * @param start_date
+     * @param end_date
+     * @return
+     */
+    @RequestMapping(value = "/operation/manage/integration",method=RequestMethod.GET)
+    public String getOperationInfo(HttpServletRequest req, HttpServletResponse resp,
+                                   @RequestParam String start_date, @RequestParam String end_date){
+        FwqStatisticsBean obj = new FwqStatisticsBean();
+        Date start = DateUtil.strParseDate(start_date);
+        Date end = DateUtil.strParseDate(end_date);
+        obj.setStart_date(start);
+        obj.setEnd_date(end);
+        statisticsService_f.getOperationInfo(obj, req, resp);
+        return super.returnSuccessResult(null);
+    }
+
+    /**
+     * 营运管理提升综合成绩汇总表导出
+     * @param req
+     * @param resp
+     * @param fwqDeptStatistic
+     * @return
+     */
+    @RequestMapping(value = "/dept/static/excel",method=RequestMethod.GET)
+    public String getDeptCheckststic(HttpServletRequest req,HttpServletResponse resp,
+                                     FwqDeptStatistic fwqDeptStatistic){
+        statisticsService_f.getDeptStatisticExcel(fwqDeptStatistic, req, resp);
+        return super.returnSuccessResult(null);
+    }
+
+    /**
+     * 考核问题分布报表
+     */
+    @RequestMapping(value = "/score/item/info",method=RequestMethod.GET)
+    public String getScoreItemInfo(HttpServletRequest req,HttpServletResponse resp,
+                                   @RequestParam String start_date,@RequestParam String end_date){
+        FwqStatisticsBean obj = new FwqStatisticsBean();
+        Date start = DateUtil.strParseDate(start_date);
+        Date end = DateUtil.strParseDate(end_date);
+        obj.setStart_date(start);
+        obj.setEnd_date(end);
+        statisticsService_f.getFeeStationCheckItemScore(obj, req, resp);
+        return super.returnSuccessResult(null);
+    }
+
+}

+ 20 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/CheckAppealDao.java

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

+ 22 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/CheckApplyDao.java

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

+ 16 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqAreaDao.java

@@ -0,0 +1,16 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.bean.AreaInfo;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 文件名:FwqAreaDao
+ * 版本信息:日期:2018/5/7 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Mapper
+public interface FwqAreaDao {
+    public List<AreaInfo> getall(AreaInfo areaInfo);
+
+}

+ 17 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqCheckDeptStatisticsDao.java

@@ -0,0 +1,17 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.bean.FwqDeptStatistic;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 文件名:FwqCheckDeptStatisticsDao
+ * 版本信息:日期:2018/5/2 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Mapper
+public interface FwqCheckDeptStatisticsDao {
+    void saveandupdate(FwqDeptStatistic ss);
+
+    List<FwqDeptStatistic> selectdepts(FwqDeptStatistic obj);
+}

+ 23 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqCheckOtherDao.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.bean.FwqCheckOther;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 文件名:FwqCheckOtherDao
+ * 版本信息:日期:2018/5/2 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Mapper
+public interface FwqCheckOtherDao {
+    List<FwqCheckOther> getAllCheckOther(FwqCheckOther fwqCheckOther);
+
+    void addCheckOther(FwqCheckOther fwqOtherCheck);
+
+    void deleteCheckOther(Long id);
+
+    void updateCheckOther(FwqCheckOther fwqCheckOther);
+
+    FwqCheckOther selectCheckById(Long id);
+}

+ 40 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqStatisticsDao.java

@@ -0,0 +1,40 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.bean.FwqStatisticsBean;
+import com.xintong.visualinspection.pojo.fwq.ServiceAreaStatistic;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 文件名:FwqCheckOtherDao
+ * 版本信息:日期:2018/5/2 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Mapper
+public interface FwqStatisticsDao {
+    List<FwqStatisticsBean> getselectFeeStationOperationScoreDetail(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectFeeStationCheckNum(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectFeeStationCheckedPersonScoreDetail(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectStatistics(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectCheckedTimes(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectOneCheckedDetailInfo(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectOneCheckedInfoData(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectOneCheckedItemInfo(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectYearScoreInfo(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectFeeStationCheckedScore(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectFeeStationScoreInfo(FwqStatisticsBean obj);
+
+    List<FwqStatisticsBean> selectCheckedItemScoreInfo(FwqStatisticsBean obj);
+
+    List<ServiceAreaStatistic> selectlimituser(ServiceAreaStatistic obj);
+}

+ 22 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/FwqTaskDao.java

@@ -0,0 +1,22 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.bean.FwqCheckTask;
+import com.xintong.visualinspection.bean.TaskStatus;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 文件名:FwqTaskDao
+ * 版本信息:日期:2018/4/11 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Mapper
+public interface FwqTaskDao {
+    public void addtask(FwqCheckTask fwqCheckTask);
+    public List<FwqCheckTask> getall(FwqCheckTask fwqCheckTask);
+    public void updateStatus(FwqCheckTask fwqCheckTask);
+    public FwqCheckTask getone(FwqCheckTask fwqCheckTask);
+    public void insertStatus(TaskStatus taskStatus);
+    public void insertStatusBatch(List<TaskStatus> taskStatusList);
+    public List<TaskStatus> getTaskStatusList(Long id);
+}

+ 15 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/LogDao.java

@@ -0,0 +1,15 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.visuallnspection_qzd.bean.Log;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 文件名:JobDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface LogDao  {
+    
+	public void insert(Log log);
+   
+}

+ 26 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/dao/ScoreDao.java

@@ -0,0 +1,26 @@
+package com.xintong.visualinspection.visuallnspection_qzd.dao;
+
+import com.xintong.visualinspection.bean.FwqScore;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:UserInfoDao
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface ScoreDao  {
+    public List<FwqScore> getAll();
+    public FwqScore getOne(Long id);
+    public List<FwqScore> getScoreList(FwqScore score);
+    public List<FwqScore> getScoreListByTaskId(Long task_id);
+    public void insert(FwqScore score);
+    public void update(FwqScore score);
+    public void updateByTaskIdAndPerson(FwqScore score);
+    public void delete(Long id);
+    public List<FwqScore> getTopRemarkList(Map<String, Object> param);
+    public void updateFormerScore(FwqScore score);
+    public void updateNowScore(FwqScore score);
+}

+ 19 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/druidTools/DruidStatFilter.java

@@ -0,0 +1,19 @@
+package com.xintong.visualinspection.visuallnspection_qzd.druidTools;
+
+import com.alibaba.druid.support.http.WebStatFilter;
+
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.annotation.WebInitParam;
+
+/**
+ * 文件名:DruidStatFilter
+ * 版本信息:日期:2017/3/31 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@WebFilter(filterName="druidWebStatFilter",urlPatterns="/*",
+        initParams={
+                @WebInitParam(name="exclusions",value="*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*")// 忽略资源
+        }
+)
+public class DruidStatFilter extends WebStatFilter{
+
+}

+ 23 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/druidTools/DruidStatViewServlet.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.visuallnspection_qzd.druidTools;
+
+import com.alibaba.druid.support.http.StatViewServlet;
+
+import javax.servlet.annotation.WebInitParam;
+import javax.servlet.annotation.WebServlet;
+
+/**
+ * 文件名:DruidStatViewServlet
+ * 版本信息:日期:2017/3/31 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = "/druid/*",
+        initParams={
+                @WebInitParam(name="allow",value=""),// IP白名单 (没有配置或者为空,则允许所有访问)
+                @WebInitParam(name="deny",value="192.168.16.111"),// IP黑名单 (存在共同时,deny优先于allow)
+                @WebInitParam(name="loginUsername",value="wen"),// 用户名
+                @WebInitParam(name="loginPassword",value="123456"),// 密码
+                @WebInitParam(name="resetEnable",value="false")// 禁用HTML页面上的“Reset All”功能
+        })
+public class DruidStatViewServlet extends StatViewServlet {
+
+}

+ 79 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/druidTools/MasterDataSourceConfig.java

@@ -0,0 +1,79 @@
+package com.xintong.visualinspection.visuallnspection_qzd.druidTools;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import com.github.pagehelper.PageHelper;
+import org.apache.ibatis.plugin.Interceptor;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+
+import javax.sql.DataSource;
+
+/**
+ * 文件名:MasterDataSourceConfig
+ * 版本信息:日期:2017/4/21 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Configuration
+// 扫描 Mapper 接口并容器管理
+@MapperScan(basePackages = MasterDataSourceConfig.PACKAGE, sqlSessionFactoryRef = "masterSqlSessionFactory")
+public class MasterDataSourceConfig {
+
+    // 精确到 master 目录,以便跟其他数据源隔离
+    static final String PACKAGE = "com.xintong.visualinspection.dao.master";
+//    static final String MAPPER_LOCATION = "classpath:mapper/master/*.xml";
+    @Value("${master.mapper-locations}")
+    private String  MAPPER_LOCATION;
+
+    @Value("${master.datasource.url}")
+    private String url;
+
+    @Value("${master.datasource.username}")
+    private String user;
+
+    @Value("${master.datasource.password}")
+    private String password;
+
+    @Value("${master.datasource.driver-class-name}")
+    private String driverClass;
+
+    @Autowired
+    private PageHelper pageHelper;
+    
+    @Bean(name = "masterDataSource")
+    @Primary
+    public DataSource masterDataSource() {
+        DruidDataSource dataSource = new DruidDataSource();
+        dataSource.setDriverClassName(driverClass);
+        dataSource.setUrl(url);
+        dataSource.setUsername(user);
+        dataSource.setPassword(password);
+        return dataSource;
+    }
+
+    @Bean(name = "masterTransactionManager")
+    @Primary
+    public DataSourceTransactionManager masterTransactionManager() {
+        return new DataSourceTransactionManager(masterDataSource());
+    }
+
+    @Bean(name = "masterSqlSessionFactory")
+    @Primary
+    public SqlSessionFactory masterSqlSessionFactory(@Qualifier("masterDataSource") DataSource masterDataSource)
+            throws Exception {
+        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
+        sessionFactory.setDataSource(masterDataSource);
+        Interceptor[] plugins =  new Interceptor[]{pageHelper};
+        sessionFactory.setPlugins(plugins);
+        sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
+                .getResources(MAPPER_LOCATION));
+        return sessionFactory.getObject();
+    }
+}

+ 31 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/PageHelperConfiguration.java

@@ -0,0 +1,31 @@
+package com.xintong.visualinspection.visuallnspection_qzd.mapper;
+
+import com.github.pagehelper.PageHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+/**
+ * 文件名:PageHelperConfiguration
+ * 版本信息:日期:2017/3/31 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Configuration
+public class PageHelperConfiguration {
+    private static final Logger log = LoggerFactory.getLogger(PageHelperConfiguration.class);
+    @Bean
+    public PageHelper pageHelper() {
+        log.info("------Register MyBatis PageHelper");
+        PageHelper pageHelper = new PageHelper();
+        Properties p = new Properties();
+        p.setProperty("offsetAsPageNum", "true");
+        p.setProperty("rowBoundsWithCount", "true");
+        p.setProperty("reasonable", "true");
+        //通过设置pageSize=0或者RowBounds.limit = 0就会查询出全部的结果。
+        p.setProperty("pageSizeZero", "true");
+        pageHelper.setProperties(p);
+        return pageHelper;
+    }
+}

+ 16 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/AreaMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.FwqAreaDao">
+
+
+    <select id="getall" parameterType="com.xintong.visualinspection.bean.AreaInfo" resultType="com.xintong.visualinspection.bean.AreaInfo">
+        select * from area_info where 1=1
+        <if test="id != null">AND id = #{id}</if>
+        <if test="dept_id != null">AND dept_id = #{dept_id}</if>
+        <if test="name != null ">AND name = #{name}  </if>
+        <if test="type != null">AND type = #{type}</if>
+    </select>
+
+
+</mapper>
+

+ 83 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckAppealMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.CheckAppealDao" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.CheckAppeal_F" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="file_src" property="file_src" jdbcType="VARCHAR" />
+        <result column="check_status" property="check_status" jdbcType="INTEGER" />
+        <result column="appeal_time" property="appeal_time" jdbcType="DATE" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+        <result column="appeal_man" property="appeal_man" jdbcType="INTEGER" />
+        <result column="verify_person" property="verify_person" jdbcType="INTEGER" />
+        <result column="appeal_dept" property="appeal_dept" jdbcType="INTEGER" />
+        <result column="task_id" property="task_id" jdbcType="INTEGER" />
+        <result column="appeal_reason" property="appeal_reason" jdbcType="VARCHAR" />
+        <result column="recheck_result" property="recheck_result" jdbcType="VARCHAR" />
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
+        <result column="appeal_result" property="appeal_result" jdbcType="VARCHAR" />
+        
+        
+        <result column="name" property="name" jdbcType="VARCHAR" />
+        <result column="start_time" property="start_time" jdbcType="DATE" />
+        <result column="end_time" property="end_time" jdbcType="DATE" />
+        <result column="check_period" property="check_period" jdbcType="VARCHAR" />
+        <result column="checkman" property="checkman" jdbcType="INTEGER" />
+        <result column="recheckman" property="recheckman" jdbcType="INTEGER" />
+        
+        <result column="code_name" property="code_name" jdbcType="VARCHAR" />
+        <result column="code_flag" property="code_flag" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <select id="getList" resultMap="BaseResultMap" parameterType="com.xintong.visualinspection.bean.CheckAppeal_F" >
+        SELECT ca.*,ct.name,ct.start_time,ct.end_time,ct.checkman,ct.recheckman,ct.check_status as check_status,
+        		CONCAT(substr(ct.start_time,1,16),'-',substr(ct.end_time,12,5)) as check_period,
+        		(select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=ct.check_status) as check_status_name    		
+        FROM check_appeal ca LEFT JOIN check_task ct ON ca.task_id=ct.id 
+        WHERE 1=1 
+        <if test="start_time != null">AND ct.start_time >= #{start_time}</if>
+        <if test="end_time != null">
+        	<![CDATA[ AND ct.end_time < #{end_time}]]>
+        </if>
+        <if test="appeal_dept != null">AND ca.appeal_dept = #{appeal_dept}</if>
+        <if test="check_status != null">AND ct.check_status = #{check_status}</if>
+        ORDER BY ct.start_time DESC
+    </select>
+
+    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_appeal
+        WHERE id = #{id}
+    </select>
+    
+    <select id="getByTaskId" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_appeal
+        WHERE task_id = #{task_id}
+    </select>
+    
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckAppeal_F" >
+        INSERT INTO
+        check_appeal
+        (file_src,check_status1,appeal_time,update_time,appeal_man,verify_person,appeal_dept,task_id,remark,appeal_reason,recheck_result)
+        VALUES
+        (#{file_src}, #{check_status},now(),now(),#{appeal_man},#{verify_person},#{appeal_dept},#{task_id},#{remark},#{appeal_reason},#{recheck_result})
+    </insert>
+
+    <update id="update" parameterType="com.xintong.visualinspection.bean.CheckAppeal_F" >
+        UPDATE
+        check_appeal
+        SET
+        <if test="check_status != null">check_status = #{check_status}</if>
+        <if test="recheck_result != null">recheck_result = #{recheck_result}</if>
+        <if test="appeal_result != null">appeal_result = #{appeal_result}</if>
+        WHERE
+        id = #{id}
+    </update>
+
+    <delete id="delete" parameterType="java.lang.Long" >
+        DELETE FROM
+        check_appeal
+        WHERE
+        id =#{id}
+    </delete>
+</mapper>

+ 91 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckApplylMapper.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.CheckApplyDao" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.CheckApply_F" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="apply_reason" property="apply_reason" jdbcType="VARCHAR" />
+        <result column="check_status" property="check_status" jdbcType="INTEGER" />
+        <result column="apply_time" property="apply_time" jdbcType="DATE" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+        <result column="apply_man" property="apply_man" jdbcType="INTEGER" />
+        <result column="verify_person" property="verify_person" jdbcType="INTEGER" />
+        <result column="apply_dept" property="apply_dept" jdbcType="INTEGER" />
+        <result column="task_id" property="task_id" jdbcType="INTEGER" />
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
+        
+        
+        <result column="name" property="name" jdbcType="VARCHAR" />
+        <result column="start_time" property="start_time" jdbcType="DATE" />
+        <result column="end_time" property="end_time" jdbcType="DATE" />
+        
+        <result column="code_name" property="code_name" jdbcType="VARCHAR" />
+        <result column="count" property="count" jdbcType="INTEGER" />
+    </resultMap>
+
+    <select id="getList" resultMap="BaseResultMap" parameterType="com.xintong.visualinspection.bean.CheckApply_F" >
+        SELECT ca.*,ct.name,ct.start_time,ct.end_time
+        FROM check_apply ca LEFT JOIN check_task ct ON ca.task_id=ct.id
+        WHERE 1=1 
+        <if test="start_time != null">AND ct.start_time >= #{start_time}</if>
+        <if test="end_time != null">
+        	<![CDATA[ AND ct.end_time < #{end_time}]]>
+        </if>
+        <if test="apply_dept != null">AND ca.apply_dept = #{apply_dept}</if>
+        <if test="apply_man != null">AND ct.checkman = #{apply_man}</if>
+        <if test="apply_ids != null and apply_ids.length > 0">AND
+       		ct.id in 
+       		<foreach collection="apply_ids" item="apply_id" index="index"
+	            open="(" close=")" separator=",">
+	            #{apply_id}
+	        </foreach>
+       	</if>
+        ORDER BY ct.start_time DESC
+    </select>
+
+    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_apply
+        WHERE id = #{id}
+    </select>
+    
+    <select id="getOneByTaskId" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_apply
+        WHERE task_id = #{id}
+    </select>
+    
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckApply_F" >
+        INSERT INTO
+        check_apply
+        (apply_reason,check_status,apply_time,update_time,apply_man,verify_person,apply_dept,task_id,remark)
+        VALUES
+        (#{apply_reason}, #{check_status},now(),now(),#{apply_man},#{verify_person},#{apply_dept},#{task_id},#{remark})
+    </insert>
+
+    <update id="update" parameterType="com.xintong.visualinspection.bean.CheckApply_F" >
+        UPDATE
+        	check_apply
+        SET
+	        <if test="check_status != null">check_status = #{check_status},</if>
+	        <if test="verify_person != null">verify_person = #{verify_person},</if>
+	        update_time = now()
+        WHERE
+        id = #{id}
+    </update>
+
+    <delete id="delete" parameterType="java.lang.Long" >
+        DELETE FROM
+        check_apply
+        WHERE
+        id =#{id}
+    </delete>
+    
+    <select id="getTopReasonList" parameterType="map" resultMap="BaseResultMap">
+    	SELECT count(*) as count,apply_reason
+		FROM check_apply
+		WHERE apply_reason!=''
+		GROUP BY apply_reason
+		ORDER BY count desc
+		LIMIT 0,#{num}
+    </select>
+</mapper>

+ 75 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckDeptStatisticsMapper.xml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckDeptStatisticsDao">
+
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.FwqDeptStatistic">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="period_id" property="period_id" jdbcType="INTEGER"/>
+        <result column="score" property="score" jdbcType="DOUBLE"/>
+        <result column="integral" property="integral" jdbcType="INTEGER"/>
+        <result column="dept_id" property="dept_id" jdbcType="INTEGER"/>
+    </resultMap>
+
+
+    <!--<select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >-->
+    <!--SELECT *-->
+    <!--FROM check_dept_score-->
+    <!--WHERE id = #{id}-->
+    <!--</select>-->
+    <!---->
+    <!--<select id="getByDept" parameterType="com.xintong.visualinspection.bean.DeptStatistic" resultMap="BaseResultMap" >-->
+    <!--SELECT *-->
+    <!--FROM check_dept_score-->
+    <!--WHERE dept_id = #{dept_id} and period_id = #{period_id}-->
+    <!--</select>-->
+    <!---->
+    <!--<insert id="insert" useGeneratedKeys="true" keyProperty="id"  parameterType="com.xintong.visualinspection.bean.DeptStatistic" >-->
+    <!--<include refid="insertc"/>-->
+    <!--</insert>-->
+
+    <!--<update id="update" parameterType="com.xintong.visualinspection.bean.DeptStatistic" >-->
+    <!--<include refid="updatec"/>-->
+    <!--</update>-->
+
+    <!--<delete id="delete" parameterType="java.lang.Long" >-->
+    <!--DELETE FROM-->
+    <!--check_dept_score-->
+    <!--WHERE-->
+    <!--id =#{id}-->
+    <!--</delete>-->
+
+    <insert id="saveandupdate" useGeneratedKeys="true" keyProperty="id" parameterType="com.xintong.visualinspection.bean.FwqDeptStatistic">
+        <selectKey keyProperty="count" resultType="int" order="BEFORE">
+            select count(*) as count from check_dept_score where dept_id = #{dept_id} and period_id = #{period_id}
+        </selectKey>
+        <if test="count>0">
+            <include refid="updatec"/>
+        </if>
+        <if test="count==0">
+            <include refid="insertc"/>
+        </if>
+    </insert>
+
+    <sql id="updatec">
+        UPDATE
+        check_dept_score
+        SET
+        <if test="score != null">score = #{score},</if>
+        <if test="integral != null">integral = #{integral},</if>
+        id = id
+        WHERE
+        dept_id = #{dept_id} and period_id = #{period_id}
+    </sql>
+    <sql id="insertc">
+         INSERT INTO
+        check_dept_score
+        (dept_id,period_id,score,integral)
+        VALUES
+        (#{dept_id}, #{period_id},#{score},#{integral})
+    </sql>
+
+    <select id="selectdepts" parameterType="com.xintong.visualinspection.bean.FwqDeptStatistic" resultMap="BaseResultMap">
+      select * from check_dept_score where  period_id >= #{startperiod_id} AND period_id &lt;= #{endperiod_id}
+    </select>
+
+</mapper>

+ 63 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/CheckOtherMapper.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckOtherDao">
+
+    <select id="getAllCheckOther" parameterType="com.xintong.visualinspection.bean.FwqCheckOther" resultType="com.xintong.visualinspection.bean.FwqCheckOther">
+        SELECT *
+        FROM other_check
+        WHERE check_type = #{check_type}
+        <if test="check_time_name != null and check_time_name != ''">
+            AND check_time_name = #{check_time_name}
+        </if>
+        <if test="dept_id != null">
+            AND dept_id = #{dept_id}
+        </if>
+        <if test="special_check_type != null">
+            AND special_check_type = #{special_check_type}
+        </if>
+        ORDER BY check_time DESC
+    </select>
+
+    <insert id="addCheckOther" parameterType="com.xintong.visualinspection.bean.FwqCheckOther">
+        INSERT INTO
+        other_check
+        (dept_id,check_person_id,check_score,check_item_id,remark,check_type,file_ids,check_num,check_time,check_time_name,update_time,wrecker_check_type, special_check_type)
+        VALUES
+        (#{dept_id},#{check_person_id},#{check_score},#{check_item_id},#{remark},#{check_type},#{file_ids},#{check_num},#{check_time},#{check_time_name},now(),#{wrecker_check_type},#{special_check_type})
+    </insert>
+
+    <delete id="deleteCheckOther" parameterType="java.lang.Long" >
+        DELETE FROM other_check WHERE id =#{id}
+    </delete>
+
+    <update id="updateCheckOther" parameterType="com.xintong.visualinspection.bean.FwqCheckOther" >
+        UPDATE
+        other_check
+        SET
+        <if test="dept_id != null">dept_id = #{dept_id}</if>
+        <if test="check_person_id != null">,check_person_id = #{check_person_id}</if>
+        <if test="check_type != null">,check_type = #{check_type}</if>
+        <if test="check_type != null">,check_type = #{check_type}</if>
+        <if test="check_item_id != null">,check_item_id = #{check_item_id}</if>
+        <if test="remark != null and remark !='' " >,remark = #{remark}</if>
+        <if test="check_score != null">,check_score = #{check_score}</if>
+        <if test="file_ids != null">,file_ids = #{file_ids}</if>
+        <if test="check_time != null">,check_time = #{check_time}</if>
+        <if test="check_time_name !=  null">,check_time_name= #{check_time_name} </if>
+        <if test="check_num != null">,check_num = #{check_num}</if>
+        <if test="wrecker_check_type != null">,wrecker_check_type = #{wrecker_check_type}</if>
+        <if test="special_check_type != null">,special_check_type = #{special_check_type}</if>
+        WHERE
+        id = #{id}
+    </update>
+
+    <select id="selectCheckById" parameterType="java.lang.Long" resultType="com.xintong.visualinspection.bean.FwqCheckOther" >
+        SELECT o.id,o.dept_id,o.check_person_id,o.check_score,o.check_item_id,o.remark,o.check_type,o.file_ids,o.check_num,o.check_time,
+        o.check_time_name,o.delete_flag,o.update_time, o.wrecker_check_type,o.special_check_type
+        FROM other_check o
+        WHERE o.id = #{id}
+    </select>
+
+</mapper>
+
+

+ 13 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/LogMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.LogDao" >
+
+  <insert id="insert" parameterType="com.xintong.visualinspection.visuallnspection_qzd.bean.Log" >
+       INSERT INTO
+       sys_log
+       (content,update_user,dept_id,task_id,score_id)
+       VALUES
+       (#{content},#{update_user},#{dept_id},#{task_id},#{score_id})
+   </insert>
+    
+</mapper>

+ 114 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/ScoreMapper.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.ScoreDao" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.FwqScore" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="task_id" property="task_id" jdbcType="INTEGER" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+        <result column="pics" property="pics" jdbcType="VARCHAR" />
+        <result column="videos" property="videos" jdbcType="VARCHAR" />
+        <result column="check_item_id" property="check_item_id" jdbcType="INTEGER" />
+        <result column="check_item_name" property="check_item_name" jdbcType="VARCHAR" />
+        <result column="check_item_score" property="check_item_score" jdbcType="INTEGER" />
+        <result column="content" property="content" jdbcType="VARCHAR" />
+        <result column="checkman" property="checkman" jdbcType="VARCHAR" />
+        <result column="checked_area" property="checked_area" jdbcType="INTEGER" />
+        <result column="checked_dept" property="checked_dept" jdbcType="INTEGER" />
+
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <select id="getAll" resultMap="BaseResultMap"  >
+        SELECT *
+        FROM check_score
+    </select>
+
+    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *,(select name from area_info where id = checked_area) as checked_area_name
+        FROM check_score
+        WHERE id = #{id}
+    </select>
+    
+    <select id="getScoreList" parameterType="com.xintong.visualinspection.bean.FwqScore" resultMap="BaseResultMap" >
+        SELECT *,(select name from area_info where id = checked_area) as checked_area_name
+        FROM check_score
+        WHERE 1=1
+        	 <if test="task_id != null">AND task_id = #{task_id}</if>
+        	 <if test="checked_area != null">AND checked_area = #{checked_area}</if>
+        	 <if test="check_item_id != null">AND check_item_id = #{check_item_id}</if>
+        	 <if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
+        	 <if test="start_time != null">AND update_time &gt;= #{start_time}</if>
+        	 <if test="end_time != null">AND update_time &lt;= #{end_time}</if>
+    </select>
+    
+    <select id="getScoreListByTaskId" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *,(select name from area_info where id = checked_area) as checked_area_name
+        FROM check_score
+        WHERE task_id = #{task_id}
+    </select>
+
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.FwqScore" >
+        INSERT INTO
+        check_score
+        (task_id,update_time,pics,videos,check_item_id,content,checkman,checked_area,checked_dept,remark,check_item_score)
+        VALUES
+        (#{task_id}, #{update_time},#{pics},#{videos},#{check_item_id},#{content},#{checkman},#{checked_area},#{checked_dept},#{remark},#{check_item_score})
+    </insert>
+
+    <update id="update" parameterType="com.xintong.visualinspection.bean.FwqScore" >
+        UPDATE
+        check_score
+        SET
+        <if test="update_time != null">update_time = #{update_time},</if>
+        <if test="pics != null">pics = #{pics},</if>
+        <if test="videos != null">videos = #{videos},</if>
+        <if test="checkman != null">checkman = #{checkman},</if>
+        <if test="checked_area != null">checked_area = #{checked_area},</if>
+        <if test="check_item_score != null">check_item_score = #{check_item_score},</if>
+        remark=#{remark}
+        WHERE
+        id = #{id}
+    </update>
+
+	<update id="updateByTaskIdAndPerson" parameterType="com.xintong.visualinspection.bean.FwqScore" >
+        UPDATE
+        	check_score
+        SET
+        	checked_area = #{checked_area}
+        WHERE
+        	  task_id = #{task_id}
+          and checked_area=#{checked_area}
+    </update>
+    
+    <delete id="delete" parameterType="java.lang.Long" >
+        DELETE FROM
+        check_score
+        WHERE
+        id =#{id}
+    </delete>
+    <select id="getTopRemarkList" parameterType="map" resultMap="BaseResultMap">
+    	SELECT count(*) as count,remark
+		FROM check_score
+		WHERE remark !=''
+		GROUP BY remark
+		ORDER BY count desc
+		LIMIT 0,#{num}
+    </select>
+    
+    <update id="updateFormerScore" parameterType="com.xintong.visualinspection.bean.FwqScore" >
+        UPDATE
+        	check_score
+        SET
+        	former_score=check_item_score
+        WHERE
+        id = #{id}
+    </update>
+    <update id="updateNowScore" parameterType="com.xintong.visualinspection.bean.FwqScore" >
+        UPDATE
+        	check_score
+        SET
+        	check_item_score=#{check_item_score}
+        WHERE
+        id = #{id}
+    </update>
+</mapper>

+ 382 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/StatisticsMapper.xml

@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.FwqStatisticsDao">
+
+    <select id="getselectFeeStationOperationScoreDetail"
+            parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        o.dept_id,
+        COUNT(1) checked_num,
+        SUM(o.check_score) check_total_score
+        FROM
+        other_check o
+        WHERE
+        o.check_type = #{check_type}
+        <if test="start_date!=null and end_date != null">
+            AND o.check_time &gt;= #{start_date} AND o.check_time &lt; #{end_date}
+        </if>
+        GROUP BY
+        dept_id
+    </select>
+
+    <select id="selectFeeStationCheckNum" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        COUNT(t.checked_dept) AS checked_num,
+        t.checked_dept AS dept_id
+        FROM view_check_task t
+        WHERE 1=1
+        <if test="start_date!=null and end_date != null">
+            AND t.start_time &gt;= #{start_date} AND t.end_time &lt; #{end_date}
+        </if>
+        <if test="period_id != null and period_id != ''">
+            AND t.period_id = #{period_id}
+        </if>
+        GROUP BY t.checked_dept
+    </select>
+
+    <select id="selectFeeStationCheckedPersonScoreDetail"
+            parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        t.checked_dept     AS dept_id,
+        t.check_item_id,
+        t.check_item_score AS score
+        FROM check_score t
+        JOIN view_check_task ct ON ct.id = t.task_id
+        WHERE t.check_item_score IS NOT NULL
+        <if test="start_date!=null and end_date != null">
+            AND ct.start_time &gt;= #{start_date} AND ct.end_time &lt; #{end_date}
+        </if>
+        <if test="period_id != null and period_id != ''">
+            AND ct.period_id = #{period_id}
+        </if>
+    </select>
+
+    <select id="selectStatistics" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        u.dept_id,
+        u.check_item_id,
+        sum(u.score) AS score
+        FROM (
+        SELECT
+        t.checked_dept  dept_id,
+        t.check_item_id,
+        t.check_item_score AS score
+        FROM check_score t
+        JOIN view_check_task ct ON ct.id = t.task_id
+        WHERE 1 = 1
+        <if test="start_date!=null and end_date != null">
+            AND ct.start_time &gt;= #{start_date} AND ct.end_time &lt; #{end_date}
+        </if>
+        <if test="dept_id!=null">
+            AND t.checked_dept =#{dept_id}
+        </if>
+        )
+        u GROUP BY check_item_id
+    </select>
+
+    <select id="selectCheckedTimes" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT COUNT(1) AS checked_num , t.checked_dept dept_id FROM view_check_task t
+        WHERE 1=1
+        <if test="dept_id != null and dept_id != ''">
+            AND t.checked_dept =#{dept_id}
+        </if>
+        <if test="start_date!=null and end_date != null">
+            AND t.start_time &gt;= #{start_date} AND t.end_time &lt; #{end_date}
+        </if>
+    </select>
+
+    <select id="selectOneCheckedDetailInfo" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        t.name              AS check_task_name,
+        t.start_time        AS start_date,
+        t.end_time          AS end_date,
+        cs.check_item_score AS score,
+        cs.pics,
+        t.checkman          AS checkman_id,
+        t.checked_dept      AS dept_id,
+        cs.check_item_id
+        <if test="queryType!=null and queryType==1">
+            ,cst.update_time,t.id as task_id
+        </if>
+        FROM
+        <if test="queryType!=null and queryType==0">
+            view_check_task
+        </if>
+        <if test="queryType==null or (queryType!=null and queryType==1) ">
+            v_check_task
+        </if>
+        t
+        LEFT JOIN check_score cs ON t.id = cs.task_id
+        <if test="queryType!=null and queryType==1">
+            left join ( select task_id,max(update_time) as update_time from check_task_status where check_status =4 or
+            check_status = 14 GROUP BY task_id ) cst on t.id = cst.task_id
+        </if>
+        where 1=1
+        <if test="dept_id != null and dept_id != ''">
+            AND t.checked_dept = #{dept_id}
+        </if>
+        <if test="start_date !=null and end_date !=null and queryType ==1">
+            AND t.check_time >= #{start_date} AND t.check_time &lt; #{end_date}
+        </if>
+        <if test="start_date !=null and queryType == 0">
+            AND t.start_time >= #{start_date}
+        </if>
+        <if test="end_date !=null and queryType == 0">
+            AND t.end_time &lt; #{end_date}
+        </if>
+        <if test="score_flag!=null and score_flag == 1">
+            AND cs.check_item_score IS NOT NULL
+        </if>
+        <if test="score_flag!=null and score_flag == 0">
+            AND cs.check_item_score IS NULL
+        </if>
+
+        <if test="queryType!=null and queryType==1">
+            ORDER BY cst.update_time desc
+        </if>
+    </select>
+
+    <select id="selectOneCheckedInfoData" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT * FROM (
+        <include refid="selectOneAllCheckedInfoData"/>
+        ) t
+    </select>
+
+    <select id="selectOneCheckedItemInfo" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        a.*
+        FROM (
+        SELECT
+        count(t.id)     AS checked_num,
+        sum(cs.check_item_score) AS all_check_score,
+        cs.check_item_id,
+        cs.checked_dept as dept_id
+        FROM
+        view_check_task t
+        LEFT JOIN check_score cs ON cs.task_id = t.id
+        WHERE
+        1 = 1
+        and cs.checked_dept = #{dept_id}
+        <if test="start_date !=null">
+            AND t.start_time >= #{start_date}
+        </if>
+        <if test="end_date !=null">
+            AND t.end_time &lt; #{end_date}
+        </if>
+        GROUP BY
+        check_item_id
+        ) a where a.all_check_score is not null
+    </select>
+
+    <select id="selectYearScoreInfo" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        sum(tab.checkd_all_score) AS all_check_score,
+        sum(tab.checked_num)      AS checked_num,
+        tab.mth
+        FROM (
+        <include refid="selectAllCheckedInfoAllCheck"/>
+        ) tab
+        WHERE 1=1
+        <if test="dept_list!=null and queryType == 1 and dept_list.size()>0 ">
+            AND tab.checked_dept IN
+            <foreach item="obj" collection="dept_list" open="("
+                     separator="," close=")">
+                #{obj.id}
+            </foreach>
+        </if>
+        <if test="dept_id!=null and queryType ==2">
+            AND tab.checked_dept=#{dept_id}
+        </if>
+        GROUP BY tab.mth
+    </select>
+
+    <select id="selectFeeStationCheckedScore" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        IFNULL(sum(ct.check_item_score), 0) AS score,
+        t.checked_dept                      AS dept_id
+        FROM view_check_task t
+        LEFT JOIN check_score ct ON t.id = ct.task_id
+        WHERE 1 = 1
+        <if test="start_date!=null and end_date != null">
+            AND t.start_time &gt;= #{start_date} AND t.end_time &lt; #{end_date}
+        </if>
+        <if test="period_id !=null and period_id != '' ">
+            AND t.period_id =  #{period_id}
+        </if>
+        GROUP BY t.checked_dept
+    </select>
+
+    <select id="selectFeeStationScoreInfo" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+        sum(tab.checkd_all_score) AS all_check_score,
+        sum(tab.checked_num)      AS checked_num,
+        tab.checked_dept          AS dept_id
+        FROM (
+        <include refid="selectAllCheckedInfoAllCheck"/>
+        ) tab
+        WHERE 1=1
+        GROUP BY tab.checked_dept
+    </select>
+
+    <select id="selectCheckedItemScoreInfo" parameterType="com.xintong.visualinspection.bean.FwqStatisticsBean"
+            resultType="com.xintong.visualinspection.bean.FwqStatisticsBean">
+        SELECT
+          count(DISTINCT m.task_id)   AS checked_num,
+          sum(m.check_item_score)     AS all_check_score,
+          m.check_item_id,
+          m.checked_dept              AS dept_id
+        FROM view_check_task t INNER JOIN
+          check_score m ON t.id = m.task_id
+        WHERE 1=1
+        AND monthfunc(t.start_time) = #{mth}
+        GROUP BY  m.check_item_id,m.checked_dept
+        ORDER BY m.checked_dept
+    </select>
+
+    <select id="selectlimituser"   parameterType="com.xintong.visualinspection.pojo.fwq.ServiceAreaStatistic" resultType="com.xintong.visualinspection.pojo.fwq.ServiceAreaStatistic">
+
+        select a.* from (
+        <include refid="selectc"/>
+        ) a where a.dept_id IN ( select d.dept_id from  (select p.dept_id,
+        COUNT(dept_id) AS COUNT from (<include refid="selectc"/>) p GROUP BY p.dept_id ) d where d.count >= #{limitnumber} )
+
+    </select>
+
+    <sql id="selectc">
+        SELECT *
+        FROM
+        check_dept_score AS user_total_score
+        WHERE
+        period_id >= #{startperiod_id}
+        AND period_id &lt;= #{endperiod_id}
+        AND score >= #{limitscore} AND score &lt;= #{limitscore2}
+        GROUP BY dept_id, period_id
+    </sql>
+
+
+    <sql id="selectOneAllCheckedInfoData">
+        SELECT
+        check_num_t.checked_num,
+        check_num_t.mth,
+        IFNULL(checked_score_t.checkd_all_score, 0) AS all_check_score,
+        check_num_t.checked_dept
+        FROM
+        (
+        SELECT
+        COUNT(t.id)             AS checked_num,
+        monthfunc(t.start_time) AS mth,
+        t.checked_dept
+        FROM
+        view_check_task t
+        WHERE 1 = 1
+        <if test="start_date !=null">
+            AND t.start_time &gt;= #{start_date}
+        </if>
+        <if test="end_date !=null">
+            AND t.end_time &lt; #{end_date}
+        </if>
+        <if test="dept_id !=null ">
+            AND t.checked_dept = #{dept_id}
+        </if>
+        GROUP BY mth
+        ) check_num_t
+            LEFT JOIN (
+            SELECT
+            monthfunc(t.start_time) AS mth,
+            sum(m.check_item_score) AS checkd_all_score,
+            m.*
+            FROM
+            check_score m INNER JOIN
+            (SELECT *
+            FROM view_check_task t
+            WHERE 1 = 1
+        <if test="start_date !=null">
+            AND t.start_time &gt;= #{start_date}
+        </if>
+        <if test="end_date !=null">
+            AND t.end_time &lt; #{end_date}
+        </if>
+        ) t
+        ON m.task_id = t.id
+        WHERE 1=1
+        <if test="dept_id !=null ">
+            AND m.checked_dept = #{dept_id}
+        </if>
+        GROUP BY mth
+
+        ) checked_score_t ON checked_score_t.checked_dept = check_num_t.checked_dept
+        AND check_num_t.mth = checked_score_t.mth
+    </sql>
+
+    <!--包含未扣分的-->
+    <sql id="selectAllCheckedInfoAllCheck">
+        SELECT
+        check_num_t.checked_num,
+        check_num_t.mth,
+        IFNULL(checked_score_t.checkd_all_score, 0) AS checkd_all_score,
+        check_num_t.checked_dept
+        FROM
+        (
+        SELECT
+        COUNT(t.checked_dept)   AS checked_num,
+        monthfunc(t.start_time) AS mth,
+        t.id,
+        t.checked_dept
+        FROM
+        view_check_task t
+        WHERE
+        t.checked_dept IS NOT NULL
+        <if test="start_date !=null">
+            AND t.start_time >= #{start_date}
+        </if>
+        <if test="end_date !=null">
+            AND t.end_time &lt; #{end_date}
+        </if>
+        <if test="mth!=null and mth!=''">
+            AND monthfunc (t.start_time) =#{mth}
+        </if>
+        GROUP BY
+        t.checked_dept,
+        mth
+        ) check_num_t
+        LEFT JOIN (
+        SELECT
+        monthfunc(t.start_time) AS mth,
+        sum(m.check_item_score) AS checkd_all_score,
+        m.*
+        FROM
+        check_score m INNER JOIN
+        (SELECT *
+        FROM view_check_task t
+        WHERE 1 = 1
+        <if test="start_date !=null">
+            AND t.start_time >= #{start_date}
+        </if>
+        <if test="end_date !=null">
+            AND t.end_time &lt; #{end_date}
+        </if>
+        <if test="mth!=null and mth!=''">
+            AND monthfunc (t.start_time) =#{mth}
+        </if>
+        ) t
+        ON m.task_id = t.id
+        WHERE 1 = 1
+        GROUP BY mth, m.checked_dept
+        ) checked_score_t ON checked_score_t.checked_dept = check_num_t.checked_dept
+        AND check_num_t.mth = checked_score_t.mth
+    </sql>
+
+</mapper>
+
+

+ 135 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/mapper/master/TaskMapper.xml

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.visuallnspection_qzd.dao.FwqTaskDao">
+    <resultMap id="taskStatusMap" type="com.xintong.visualinspection.bean.TaskStatus">
+        <id property="id" column="ID"/>
+        <result property="task_id" column="task_id"/>
+        <result property="update_time" column="update_time"/>
+        <result property="update_user" column="update_user"/>
+        <result property="update_username" column="update_username"/>
+        <result property="check_status" column="check_status"/>
+        <result property="check_status_name" column="check_status_name"/>
+    </resultMap>
+
+    <insert id="addtask" useGeneratedKeys="true"  keyProperty="id"  parameterType="com.xintong.visualinspection.bean.FwqCheckTask">
+        INSERT INTO check_task
+        (name,check_status,area_id,create_time,update_time,start_time,
+        	end_time,checkman,checked_dept,rule_id,remark,period_id
+        )
+        VALUES
+        (#{name}, #{check_status},#{area_id},now(),now(),#{start_time},
+        	#{end_time},#{checkman},#{checked_dept},#{rule_id},#{remark},#{period_id}
+        )
+    </insert>
+
+
+    <select id="getone" parameterType="com.xintong.visualinspection.bean.FwqCheckTask" resultType="com.xintong.visualinspection.bean.FwqCheckTask">
+        select *,CONCAT(substr(start_time,1,16),'-',substr(end_time,12,5)) as check_period from check_task where id = #{id}
+        ORDER BY start_time DESC
+    </select>
+
+    <select id="getall" parameterType="com.xintong.visualinspection.bean.FwqCheckTask" resultType="com.xintong.visualinspection.bean.FwqCheckTask">
+        select t.*,CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period,(select name from area_info where id = t.area_id) as area_name
+        ,ca.appeal_result as appeal_result
+        from check_task t
+        left join check_appeal ca on t.id=ca.task_id
+        where 1=1
+        <if test="period_id != null">AND t.period_id = #{period_id}</if>
+        <if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
+        <if test="start_time != null and end_time != null">AND t.start_time >= #{start_time} <![CDATA[ AND t.end_time < #{end_time}]]> </if>
+        <choose>
+            <when test="check_status_end != null and check_status != null">
+                AND t.check_status &gt;= #{check_status} AND t.check_status &lt;= #{check_status_end}
+            </when>
+            <otherwise>
+                <if test="check_status != null"> AND t.check_status = #{check_status}</if>
+            </otherwise>
+        </choose>
+
+        <if test="checkman != null">AND t.checkman = #{checkman}</if>
+        <if test="area_id != null">AND t.area_id = #{area_id}</if>
+        <if test="check_status_arr != null and check_status_arr.length > 0">AND
+            t.check_status in
+            <foreach collection="check_status_arr" item="status" index="index"
+                     open="(" close=")" separator=",">
+                #{status}
+            </foreach>
+        </if>
+        <if test="area_id != null">AND t.area_id = #{area_id}</if>
+        <if test="hasScore != null ">
+
+            <!--有扣分-->
+            <if test="hasScore == 1 ">
+                AND t.id in (select task_id from check_score where check_item_score>0 )
+            </if>
+            <!--无扣分-->
+            <if test="hasScore == 2 ">
+                AND t.id not in (select task_id from check_score where check_item_score>0 )
+            </if>
+
+        </if>
+        <if test="invalidFrom == -1">AND
+            ( t.invalid_from = 0 OR t.invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            t.invalid_from = #{invalidFrom}
+        </if>
+        <if test="dispatch_ids != null and dispatch_ids.length > 0">AND
+            t.id in
+            <foreach collection="dispatch_ids" item="dispatch_id" index="index"
+                     open="(" close=")" separator=",">
+                #{dispatch_id}
+            </foreach>
+        </if>
+        ORDER BY t.start_time DESC
+    </select>
+
+    <update id="updateStatus" parameterType="com.xintong.visualinspection.bean.FwqCheckTask" >
+        update check_task set
+        <if test="check_status != null">check_status = #{check_status},</if>
+        <if test="recheckman != null">recheckman = #{recheckman},</if>
+        update_time=now()
+        WHERE
+        id = #{id}
+    </update>
+
+
+
+
+
+
+    <insert id="insertStatus" parameterType="com.xintong.visualinspection.bean.TaskStatus">
+        INSERT INTO check_task_status
+        (task_id,update_time,update_user,update_username,check_status,
+        	check_status_name
+        )
+        VALUES
+        (#{task_id}, now(),#{update_user},#{update_username},#{check_status},
+        	#{check_status_name}
+        )
+    </insert>
+
+    <select id="getTaskStatusList" parameterType="java.lang.Long" resultMap="taskStatusMap">
+        SELECT *
+        FROM check_task_status
+        WHERE task_id = #{id}
+        order by update_time
+    </select>
+
+    <insert id="insertStatusBatch" parameterType="java.util.List">
+        INSERT INTO check_task_status
+        (task_id,update_time,update_user,update_username,check_status,
+        check_status_name
+        )
+        VALUES
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.task_id}, #{item.update_time},#{item.update_user},#{item.update_username},#{item.check_status},
+            #{item.check_status_name}
+            )
+        </foreach>
+    </insert>
+
+</mapper>
+
+

+ 30 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/securityTools/CorsConfig.java

@@ -0,0 +1,30 @@
+package com.xintong.visualinspection.visuallnspection_qzd.securityTools;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * 文件名:CorsConfig
+ * 版本信息:日期:2017/4/7 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+
+
+@Configuration
+public class CorsConfig {
+    private CorsConfiguration buildConfig() {
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.addAllowedOrigin("*"); // 1
+        corsConfiguration.addAllowedHeader("*"); // 2
+        corsConfiguration.addAllowedMethod("*"); // 3
+        return corsConfiguration;
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", buildConfig()); // 4
+        return new CorsFilter(source);
+    }
+}

+ 43 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/securityTools/ThreadConfig.java

@@ -0,0 +1,43 @@
+package com.xintong.visualinspection.visuallnspection_qzd.securityTools;
+
+/**
+ * 文件名:ThreadConfig
+ * 版本信息:日期:2018/2/5 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+@Configuration
+@EnableAsync
+public class ThreadConfig {
+
+    private int corePoolSize = 10;//线程池维护线程的最少数量
+
+    private int maxPoolSize = 30;//线程池维护线程的最大数量
+
+    private int queueCapacity = 8; //缓存队列
+
+    private int keepAlive = 60;//允许的空闲时间
+
+    @Bean
+    public Executor threadExecutor() {
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(corePoolSize);
+        executor.setMaxPoolSize(maxPoolSize);
+        executor.setQueueCapacity(queueCapacity);
+        executor.setThreadNamePrefix("myExecutor-");
+        // rejection-policy:当pool已经达到max size的时候,如何处理新任务
+        // CALLER_RUNS:不在新线程中执行任务,而是由调用者所在的线程来执行
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); //对拒绝task的处理策略
+        executor.setKeepAliveSeconds(keepAlive);
+        executor.initialize();
+        return executor;
+    }
+
+}

+ 71 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/securityTools/WebSecurityConfig.java

@@ -0,0 +1,71 @@
+package com.xintong.visualinspection.visuallnspection_qzd.securityTools;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.builders.WebSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.http.SessionCreationPolicy;
+
+/**
+ * 文件名:WebSecurityConfig
+ * 版本信息:日期:2017/3/31 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Configuration
+@EnableWebSecurity
+@EnableGlobalMethodSecurity(securedEnabled = true,prePostEnabled=true)
+public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
+    @Override
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+    }
+
+    @Override
+    public void configure(WebSecurity web) throws Exception {
+        super.configure(web);
+        web.ignoring().antMatchers("/css/**","/js/**");
+    }
+
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+    	
+    	http
+         // 由于使用的是JWT,我们这里不需要csrf
+         .csrf().disable()
+         .cors().and()
+         // 基于token,所以不需要session
+         .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
+         .authorizeRequests()
+         // 允许对于网站静态资源的无授权访问
+         .antMatchers(
+                 HttpMethod.GET,
+                 "/",
+                 "/*.html",
+                 "/favicon.ico",
+                 "/**/*.html",
+                 "/**/*.css",
+                 "/**/*.js"
+         ).permitAll()
+         .antMatchers("/**").permitAll()
+         // 除上面外的所有请求全部需要鉴权认证
+         .anyRequest().authenticated();
+    	// 禁用缓存
+        http.headers().cacheControl();
+    }
+
+    /**
+     * 设置用户密码的加密方式为MD5加密
+     * @return
+     */
+    @Bean
+    public Md5PasswordEncoder passwordEncoder() {
+        return new Md5PasswordEncoder();
+
+    }
+    
+  
+}

+ 35 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/CheckOtherService_F.java

@@ -0,0 +1,35 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service;
+
+import com.xintong.visualinspection.bean.FwqCheckOther;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+public interface CheckOtherService_F {
+
+    /**
+     * 统计数据
+     *
+     * @param fwqOtherCheck
+     * @return
+     */
+    Map<String, Object> getCheckOtherStatistics(FwqCheckOther fwqOtherCheck);
+
+    /**
+     * 统计数据导出
+     *
+     * @param fwqOtherCheck
+     * @param req
+     * @param resp
+     */
+    void getExcel(FwqCheckOther fwqOtherCheck, HttpServletRequest req, HttpServletResponse resp);
+
+    /**
+     * 第三方暗访稽查导出excel
+     * @param fwqOtherCheck
+     * @param req
+     * @param resp
+     */
+    void getOtherCheckExcel(FwqCheckOther fwqOtherCheck, HttpServletRequest req, HttpServletResponse resp);
+}

+ 16 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/StatisticsService_F.java

@@ -0,0 +1,16 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service;
+
+import com.xintong.visualinspection.bean.FwqDeptStatistic;
+import com.xintong.visualinspection.bean.FwqStatisticsBean;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public interface StatisticsService_F {
+
+    void getOperationInfo(FwqStatisticsBean obj, HttpServletRequest req, HttpServletResponse resp);
+
+    void getDeptStatisticExcel(FwqDeptStatistic fwqDeptStatistic, HttpServletRequest req, HttpServletResponse resp);
+
+    void getFeeStationCheckItemScore(FwqStatisticsBean obj, HttpServletRequest req, HttpServletResponse resp);
+}

+ 27 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/AreaInfoServiceImpl.java

@@ -0,0 +1,27 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.xintong.visualinspection.bean.AreaInfo;
+import com.xintong.visualinspection.service.AreaInfoService_F;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqAreaDao;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 文件名:AreaInfoServiceImpl
+ * 版本信息:日期:2018/5/8 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+public class AreaInfoServiceImpl implements AreaInfoService_F {
+
+    @Autowired
+    private FwqAreaDao fwqAreaDao;
+
+    @Override
+    public Object getAllArea(AreaInfo areaInfo) {
+        return fwqAreaDao.getall(areaInfo);
+    }
+}

+ 77 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckAppealServiceImpl.java

@@ -0,0 +1,77 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.xintong.visualinspection.bean.CheckAppeal_F;
+import com.xintong.visualinspection.service.CheckAppealService_F;
+import com.xintong.visualinspection.util.CacheUtil;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.CheckAppealDao;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 文件名:UserServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+public class CheckAppealServiceImpl implements CheckAppealService_F {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CheckAppealServiceImpl.class);
+
+
+    @Autowired
+    private CheckAppealDao checkAppealDao;
+
+
+	@Override
+	public List<CheckAppeal_F> getList(CheckAppeal_F param) {
+		List<CheckAppeal_F> list = checkAppealDao.getList(param);
+		return getList(list) ;
+	}
+	public List<CheckAppeal_F> getList(List<CheckAppeal_F> checkAppeallist){
+		for (CheckAppeal_F checkAppeal : checkAppeallist) {
+			checkAppeal.setAppeal_man_name(CacheUtil.getUserTurenameFromMap(checkAppeal.getAppeal_man()));
+			checkAppeal.setVerify_person_name(CacheUtil.getUserTurenameFromMap(checkAppeal.getVerify_person()));
+			checkAppeal.setCheckman_name(CacheUtil.getUserTurenameFromMap(checkAppeal.getCheckman()));
+			checkAppeal.setRecheckman_name(CacheUtil.getUserTurenameFromMap(checkAppeal.getRecheckman()));
+			checkAppeal.setAppeal_dept_name(CacheUtil.getOrgannameFromMap(checkAppeal.getAppeal_dept()));
+		}
+		return checkAppeallist;
+	}
+
+	@Override
+	public CheckAppeal_F getById(Long id) {
+		return checkAppealDao.getOne(id);
+	}
+
+
+	@Override
+	public void insert(CheckAppeal_F checkAppeal) {
+		checkAppealDao.insert(checkAppeal);
+	}
+
+
+	@Override
+	public void update(CheckAppeal_F checkAppeal) {
+		checkAppealDao.update(checkAppeal);
+	}
+
+
+	@Override
+	public void delete(Long id) {
+		checkAppealDao.delete(id);
+	}
+	@Override
+	public CheckAppeal_F getByTaskId(Long id) {
+		// TODO Auto-generated method stub
+		return checkAppealDao.getByTaskId(id);
+	}
+
+}

+ 87 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckApplyServiceImpl.java

@@ -0,0 +1,87 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.visualinspection.bean.CheckApply_F;
+import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.service.CheckApplyService_F;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.CheckApplyDao;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:UserServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+public class CheckApplyServiceImpl  implements CheckApplyService_F {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CheckApplyServiceImpl.class);
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+    @Autowired
+    private CheckApplyDao checkApplyDao;
+
+	@Override
+	public List<CheckApply_F> getList(CheckApply_F param) {
+		// TODO Auto-generated method stub
+        Map<String,Constant> codeMap =commonService.getCodeMap();
+
+        List<CheckApply_F> checkApply_fs = checkApplyDao.getList(param);
+        if(checkApply_fs!=null && checkApply_fs.size()>0){
+            for (CheckApply_F f:checkApply_fs
+                 ) {
+               Constant c =  (codeMap.get("task_status_"+f.getCheck_status()));
+               if(c!=null){
+                   f.setCode_name(c.getCode_name());
+               }
+
+            }
+        }
+
+		return checkApply_fs;
+	}
+	@Override
+	public CheckApply_F getById(Long id) {
+		// TODO Auto-generated method stub
+		return checkApplyDao.getOne(id);
+	}
+	@Override
+	public void insert(CheckApply_F checkApply) {
+		// TODO Auto-generated method stub
+		checkApplyDao.insert(checkApply);
+	}
+	@Override
+	public void update(CheckApply_F checkApply) {
+		// TODO Auto-generated method stub
+		checkApplyDao.update(checkApply);
+	}
+	@Override
+	public void delete(Long id) {
+		// TODO Auto-generated method stub
+		checkApplyDao.delete(id);
+	}
+	@Override
+	public CheckApply_F getByTaskId(Long id) {
+		// TODO Auto-generated method stub
+		return checkApplyDao.getOneByTaskId(id);
+	}
+	@Override
+	public List<CheckApply_F> getTopReasonList(Map<String, Object> param) {
+		// TODO Auto-generated method stub
+		return checkApplyDao.getTopReasonList(param);
+	}
+}

+ 268 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckOtherServiceImpl.java

@@ -0,0 +1,268 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.FeeStation;
+import com.xintong.visualinspection.bean.FwqCheckOther;
+import com.xintong.visualinspection.bean.FwqCheckOtherStatistics;
+import com.xintong.visualinspection.bean.Item;
+import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.service.CheckOtherService_F;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckOtherDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:OtherCheckServiceImpl_F
+ * 版本信息:日期:2017/4/7 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ *
+ * @author wenhongquan
+ * @date 2018/05/02
+ */
+
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+public class CheckOtherServiceImpl implements CheckOtherService_F {
+
+    private static final Logger logger = LoggerFactory.getLogger(CheckOtherServiceImpl.class);
+
+    @Autowired
+    private FwqCheckOtherDao fwqCheckOtherDao;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+    /**
+     * 第三方暗访稽查查询(查询条件:时间,道管,服务区)
+     *
+     * @param page
+     * @param size
+     * @param fwqCheckOther
+     * @return
+     */
+    @Override
+    public Object getAllCheckOther(Integer page, Integer size, FwqCheckOther fwqCheckOther) {
+        if (!(page.equals(0) && size.equals(0))) {
+            PageHelper.startPage(page, size);
+        }
+        List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
+        if (!(page.equals(0) && size.equals(0))) {
+            return new PageInfo<FwqCheckOther>(checkOtherList);
+        }
+        return checkOtherList;
+    }
+
+    /**
+     * 第三方暗访稽查查询(查询条件:时间,道管,服务区),<无分页>
+     *
+     * @param fwqCheckOther
+     * @return
+     */
+    private Object getAllCheckOther(FwqCheckOther fwqCheckOther) {
+
+        List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
+        return checkOtherList;
+    }
+
+    /**
+     * 新增稽查数据
+     *
+     * @param fwqOtherCheck
+     */
+    @Override
+    public void addCheckOther(FwqCheckOther fwqOtherCheck) {
+        fwqCheckOtherDao.addCheckOther(fwqOtherCheck);
+    }
+
+    @Override
+    public void deleteCheckOther(Long id) {
+        fwqCheckOtherDao.deleteCheckOther(id);
+    }
+
+    @Override
+    public void updateCheckOther(FwqCheckOther fwqCheckOther) {
+        fwqCheckOtherDao.updateCheckOther(fwqCheckOther);
+    }
+
+    @Override
+    public FwqCheckOther selectCheckById(Long id) {
+        FwqCheckOther fwqCheckOther = fwqCheckOtherDao.selectCheckById(id);
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        fwqCheckOther.setCheck_item_name(itemMap.get(fwqCheckOther.getCheck_item_id()).getName());
+        return fwqCheckOther;
+    }
+
+    /**
+     * 统计数据
+     *
+     * @param fwqCheckOther
+     * @return
+     */
+    @Override
+    public Map<String, Object> getCheckOtherStatistics(FwqCheckOther fwqCheckOther) {
+
+        Map<String, Object> datas = new HashMap<>();
+        List<FwqCheckOtherStatistics> fwqCheckOtherStatisticses = new ArrayList<>();
+
+        fwqCheckOther.setCheck_time_name(fwqCheckOther.getCheck_period());
+        List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        // 获得所有道管中心数据
+        List<FeeStation> rmList = commonService.getAllDeptByLayer("RM");
+
+        int checkType = fwqCheckOther.getCheck_type();
+        if (checkType == 8 || checkType == 9) {
+            Long id = 26L;
+            if (checkType == 8) {
+                id = 26L;
+            }
+            if (checkType == 9) {
+                id = 27L;
+            }
+            //获取考核办法对应的考核项
+            List<String> itemName = commonService.getCheckItemName(id);
+
+            for (FwqCheckOther c : checkOtherList) {
+                if (!itemName.contains(c.getPcheckname())) {
+                    itemName.add(c.getPcheckname());
+                }
+            }
+
+            for (FeeStation station : saList) {
+                FwqCheckOtherStatistics fwqCheckOtherStatistics = new FwqCheckOtherStatistics();
+                fwqCheckOtherStatistics.setDeptid(station.getDeptid());
+                fwqCheckOtherStatistics.setDeptname(station.getName().replaceAll("服务区", ""));
+                fwqCheckOtherStatistics.setPdeptid(station.getParentid());
+                HashMap<String, Integer> s = new HashMap<>();
+                for (String i : itemName) {
+                    s.put(i, 0);
+                }
+                for (FwqCheckOther c : checkOtherList) {
+                    if (c.getDept_id().toString().equals(station.getDeptid())) {
+                        Integer i = s.get(c.getPcheckname());
+                        if (i == null) {
+                            i = 0;
+                        }
+//                        if (checkType == 2) {
+                        s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+//                        } else {
+//                            if (c.getOrgan_name() == null || "".equals(c.getOrgan_name())) {
+//                                s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+//                            } else {
+//                                s.put(c.getPcheckname(), i);
+//                            }
+//                        }
+                    }
+                }
+                fwqCheckOtherStatistics.setScoremap(s);
+                fwqCheckOtherStatisticses.add(fwqCheckOtherStatistics);
+            }
+
+            for (FeeStation a : rmList) {
+                List<FwqCheckOtherStatistics> s = new ArrayList<>();
+                for (FwqCheckOtherStatistics o : fwqCheckOtherStatisticses) {
+                    if (o.getPdeptid().equals(a.getDeptid())) {
+                        o.setPdeptname(a.getName());
+                        s.add(o);
+                    }
+                }
+                datas.put(a.getName().replaceAll("道管中心", ""), s);
+            }
+
+        }
+
+        return datas;
+    }
+
+
+
+}

+ 283 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/CheckOtherService_FImpl.java

@@ -0,0 +1,283 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.FeeStation;
+import com.xintong.visualinspection.bean.FwqCheckOther;
+import com.xintong.visualinspection.bean.FwqCheckOtherStatistics;
+import com.xintong.visualinspection.bean.Item;
+import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.util.DateUtil;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckOtherDao;
+import com.xintong.visualinspection.visuallnspection_qzd.service.CheckOtherService_F;
+import org.jxls.common.Context;
+import org.jxls.util.JxlsHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:OtherCheckServiceImpl_F
+ * 版本信息:日期:2017/4/7 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ *
+ * @author wenhongquan
+ * @date 2018/05/02
+ */
+@Service
+public class CheckOtherService_FImpl implements CheckOtherService_F {
+
+    private static final Logger logger = LoggerFactory.getLogger(CheckOtherService_FImpl.class);
+
+    @Autowired
+    private FwqCheckOtherDao fwqCheckOtherDao;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+    /**
+     * 第三方暗访稽查查询(查询条件:时间,道管,服务区),<无分页>
+     *
+     * @param fwqCheckOther
+     * @return
+     */
+    private Object getAllCheckOther(FwqCheckOther fwqCheckOther) {
+
+        List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
+        return checkOtherList;
+    }
+
+    /**
+     * 统计数据
+     *
+     * @param fwqCheckOther
+     * @return
+     */
+    @Override
+    public Map<String, Object> getCheckOtherStatistics(FwqCheckOther fwqCheckOther) {
+
+        Map<String, Object> datas = new HashMap<>();
+        List<FwqCheckOtherStatistics> fwqCheckOtherStatisticses = new ArrayList<>();
+
+        fwqCheckOther.setCheck_time_name(fwqCheckOther.getCheck_period());
+        List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        // 获得所有道管中心数据
+        List<FeeStation> rmList = commonService.getAllDeptByLayer("RM");
+
+        int checkType = fwqCheckOther.getCheck_type();
+        if (checkType == 8 || checkType == 9) {
+            Long id = 26L;
+            if (checkType == 8) {
+                id = 26L;
+            }
+            if (checkType == 9) {
+                id = 27L;
+            }
+            //获取考核办法对应的考核项
+            List<String> itemName = commonService.getCheckItemName(id);
+
+            for (FwqCheckOther c : checkOtherList) {
+                if (!itemName.contains(c.getPcheckname())) {
+                    itemName.add(c.getPcheckname());
+                }
+            }
+
+            for (FeeStation station : saList) {
+                FwqCheckOtherStatistics fwqCheckOtherStatistics = new FwqCheckOtherStatistics();
+                fwqCheckOtherStatistics.setDeptid(station.getDeptid());
+                fwqCheckOtherStatistics.setDeptname(station.getName().replaceAll("服务区", ""));
+                fwqCheckOtherStatistics.setPdeptid(station.getParentid());
+                HashMap<String, Integer> s = new HashMap<>();
+                for (String i : itemName) {
+                    s.put(i, 0);
+                }
+                for (FwqCheckOther c : checkOtherList) {
+                    if (c.getDept_id().toString().equals(station.getDeptid())) {
+                        Integer i = s.get(c.getPcheckname());
+                        if (i == null) {
+                            i = 0;
+                        }
+//                        if (checkType == 2) {
+                        s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+//                        } else {
+//                            if (c.getOrgan_name() == null || "".equals(c.getOrgan_name())) {
+//                                s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+//                            } else {
+//                                s.put(c.getPcheckname(), i);
+//                            }
+//                        }
+                    }
+                }
+                fwqCheckOtherStatistics.setScoremap(s);
+                fwqCheckOtherStatisticses.add(fwqCheckOtherStatistics);
+            }
+
+            for (FeeStation a : rmList) {
+                List<FwqCheckOtherStatistics> s = new ArrayList<>();
+                for (FwqCheckOtherStatistics o : fwqCheckOtherStatisticses) {
+                    if (o.getPdeptid().equals(a.getDeptid())) {
+                        o.setPdeptname(a.getName());
+                        s.add(o);
+                    }
+                }
+                datas.put(a.getName().replaceAll("道管中心", ""), s);
+            }
+
+        }
+
+        return datas;
+    }
+
+    @Override
+    public void getExcel(FwqCheckOther fwqCheckOther, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
+        String title = fwqCheckOther.getCheck_time_name();
+        int checkType = fwqCheckOther.getCheck_type();
+        fwqCheckOther.setCheck_period(title);
+        if (checkType == 8 || checkType == 9) {
+            Map<String, Object> m = getCheckOtherStatistics(fwqCheckOther);
+            Map<String, Object> map = new HashMap<>();
+            map.put("datas", m);
+
+            if (checkType == 8) {
+                title += "月份服务区第三方暗访情况";
+            }
+            if (checkType == 9) {
+                title += "月份服务区现场检查情况";
+            }
+            map.put("title", title.replaceAll("/", "-"));
+
+            exportExcel(title.replaceAll("/", "-"), "fwq_other_check_info_anfang", map, httpServletResponse);
+        }
+    }
+
+    @Override
+    public void getOtherCheckExcel(FwqCheckOther fwqCheckOther, HttpServletRequest req, HttpServletResponse resp) {
+        List<FwqCheckOther> checkOtherList = (List<FwqCheckOther>) getAllCheckOther(fwqCheckOther);
+
+        Long id = 1L;
+        for (FwqCheckOther co : checkOtherList) {
+            co.setId(id++);
+            co.setCheck_time_name(DateUtil.DateFormatStr(co.getCheck_time()));
+        }
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("list", checkOtherList);
+        if (fwqCheckOther.getCheck_type() == 8) {
+            exportExcel("服务区第三方暗访稽查", "fwq_third_check", map, resp);
+        } else if (fwqCheckOther.getCheck_type() == 9) {
+            exportExcel("服务区现场稽查", "fwq_duty_check", map, resp);
+        }
+    }
+
+    private void exportExcel(String fileName, String excelTemplateName, Map<String, Object> map,
+                             HttpServletResponse resp) {
+        String path = "./" + fileName + ".xls";
+        try (InputStream is = this.getClass().getResourceAsStream("/" + excelTemplateName + ".xls")) {
+            try (OutputStream os = new FileOutputStream(path)) {
+                Context context = new Context();
+                // context.putVar("list", map.get("list"));
+                // context.putVar("totalMan", map.get("totalMan"));
+                for (String key : map.keySet()) {
+                    context.putVar(key, map.get(key));
+                }
+                JxlsHelper.getInstance().processTemplate(is, os, context);
+            }
+            Thread.sleep(1000);
+            // path是指欲下载的文件的路径。
+            File file = new File(path);
+            // 取得文件名。
+            String filename = file.getName();
+            // 以流的形式下载文件。
+            InputStream bis = new BufferedInputStream(new FileInputStream(file));
+            byte[] buffer = new byte[bis.available()];
+            bis.read(buffer);
+            bis.close();
+            // 清空response
+            resp.reset();
+            // 设置response的Header
+            resp.addHeader("Content-Disposition",
+                    "attachment;filename=" + new String(filename.getBytes("gb2312"), "ISO8859-1"));
+            resp.addHeader("Content-Length", "" + file.length());
+            OutputStream toClient = new BufferedOutputStream(resp.getOutputStream());
+            resp.setContentType("application/vnd.ms-excel;charset=gb2312");
+            toClient.write(buffer);
+            toClient.flush();
+            toClient.close();
+            // 删除生成的临时文件
+            if (file.exists()) {
+                file.delete();
+            }
+
+        } catch (Exception e) {
+            logger.error(e.toString());
+        }
+    }
+}

+ 144 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/ScoreServiceImpl.java

@@ -0,0 +1,144 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.visualinspection.bean.FwqScore;
+import com.xintong.visualinspection.bean.Item;
+import com.xintong.visualinspection.service.ItemService;
+import com.xintong.visualinspection.service.ScoreService_F;
+import com.xintong.visualinspection.visuallnspection_qzd.bean.Log;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.LogDao;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.ScoreDao;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:ScoreServiceImpl
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+@Service
+public class ScoreServiceImpl  implements ScoreService_F {
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ScoreServiceImpl.class);
+
+
+    @Autowired
+    private ScoreDao scoreDao;
+    @Autowired
+    private LogDao logDao;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private ItemService itemService;
+
+	@Override
+	public List<FwqScore> getAll() {
+		// TODO Auto-generated method stub
+		return scoreDao.getAll();
+	}
+
+	@Override
+	public FwqScore getOne(Long id) {
+		// TODO Auto-generated method stub
+		return scoreDao.getOne(id);
+	}
+
+	@Override
+	public List<FwqScore> getScoreList(FwqScore score) {
+		// TODO Auto-generated method stub
+		List<FwqScore> scoreList = scoreDao.getScoreList(score);
+        List<Item> items = itemService.getAll();
+        for (FwqScore s:scoreList
+                ) {
+            for (Item i:items
+                 ) {
+                if(s.getCheck_item_id().equals(i.getId())){
+                    s.setCheck_item_name(i.getName());
+                    s.setCheck_item_score(i.getScore());
+                }
+
+            }
+
+        }
+		return scoreList;
+	}
+
+	@Override
+	public List<FwqScore> getScoreListByTaskId(Long task_id) {
+		// TODO Auto-generated method stub
+		return scoreDao.getScoreListByTaskId(task_id);
+	}
+
+	@Override
+	public void insert(FwqScore score) {
+		// TODO Auto-generated method stub
+		score.setUpdate_time(new Date());
+		scoreDao.insert(score);
+	}
+
+	@Override
+	public void update(FwqScore score) {
+        FwqScore oldScore = getOne(score.getId());
+		// TODO Auto-generated method stub
+		scoreDao.update(score);
+
+		//扣分不一致保存日志
+		if(score.getCheck_item_score()!=null && !oldScore.getCheck_item_score().equals(score.getCheck_item_score())){
+			Log log = new Log();
+			log.setTask_id(oldScore.getTask_id());
+			log.setUpdate_user(score.getUpdate_user());
+			log.setDept_id(oldScore.getChecked_dept());
+			log.setScore_id(score.getId());
+			log.setContent("更改扣分:"+oldScore.getCheck_item_score()+"-->"+score.getCheck_item_score());
+			logDao.insert(log);
+		}
+	}
+
+	@Override
+	public void delete(Long id) {
+		// TODO Auto-generated method stub
+		scoreDao.delete(id);
+	}
+
+	@Override
+	public List<FwqScore> getTopRemarkList(Map<String, Object> param) {
+		// TODO Auto-generated method stub
+		return scoreDao.getTopRemarkList(param);
+	}
+
+	@Override
+	public void updateByTaskIdAndPerson(FwqScore score) {
+		// TODO Auto-generated method stub
+		scoreDao.updateByTaskIdAndPerson(score);
+	}
+
+	@Override
+	public void backoutScore(FwqScore score) {
+		// TODO Auto-generated method stub
+        FwqScore oldScore = getOne(score.getId());
+		//记录之前扣分
+		scoreDao.updateFormerScore(score);
+		//之前扣分撤销
+		scoreDao.updateNowScore(score);
+		
+		//保存日志
+		Log log = new Log();
+		log.setTask_id(oldScore.getTask_id());
+		log.setUpdate_user(score.getUpdate_user());
+		log.setDept_id(oldScore.getChecked_dept());
+		log.setScore_id(score.getId());
+		log.setContent("撤销扣分:"+oldScore.getCheck_item_score()+"-->"+score.getCheck_item_score());
+		logDao.insert(log);
+	}
+}

+ 1152 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsServiceImpl.java

@@ -0,0 +1,1152 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.visualinspection.bean.CheckTaskPeriod;
+import com.xintong.visualinspection.bean.FeeStation;
+import com.xintong.visualinspection.bean.FwqDeptStatistic;
+import com.xintong.visualinspection.bean.FwqStatisticsBean;
+import com.xintong.visualinspection.bean.FwqStatisticsBo;
+import com.xintong.visualinspection.bean.Item;
+import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.pojo.fwq.FwqRankingData;
+import com.xintong.visualinspection.pojo.fwq.FwqStatisiticPojo;
+import com.xintong.visualinspection.pojo.fwq.ServiceAreaStatistic;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.service.StatisticsService_F;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckDeptStatisticsDao;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqStatisticsDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 文件名:StatisticsServiceImpl
+ * 版本信息:日期:2017/4/7 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ *
+ * @author huangcheng
+ * @date 2018/05/02
+ */
+
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}",
+        timeout = 3000
+)
+public class StatisticsServiceImpl implements StatisticsService_F {
+
+    private static final Logger logger = LoggerFactory.getLogger(StatisticsServiceImpl.class);
+
+    @Autowired
+    private FwqStatisticsDao fwqStatisticsDao;
+    @Autowired
+    private FwqCheckDeptStatisticsDao fwqCheckDeptStatisticsDao;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+    @Override
+    public List<FwqStatisticsBean> getOperationInfo(FwqStatisticsBean obj) {
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
+        }
+
+        // 获取公司检查的某个收费站的受检次数和扣分合计
+        List<FwqStatisticsBean> company_beans =  getFeeStationCheckItemScore(obj);
+        // 获取第三方暗访稽查的某个服务区的受检次数和扣分合计
+        obj.setCheck_type(8);
+        List<FwqStatisticsBean> third_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
+        // 获取现场稽查的某个服务区的受检次数和扣分合计
+        obj.setCheck_type(9);
+        List<FwqStatisticsBean> onsite_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
+
+        for (FwqStatisticsBean company_bean : company_beans) {
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_check_num(company_bean.getChecked_num());
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_total_score(company_bean.getAll_check_score());
+        }
+        for (FwqStatisticsBean third_bean : third_beans) {
+            mapStationInfos.get(third_bean.getDept_id()).setThird_check_num(third_bean.getChecked_num() > 1 ? 1 : third_bean.getChecked_num());
+            mapStationInfos.get(third_bean.getDept_id()).setThird_total_score(third_bean.getCheck_total_score());
+        }
+
+        for (FwqStatisticsBean onsite_bean : onsite_beans) {
+            mapStationInfos.get(onsite_bean.getDept_id()).setOnsite_check_num(onsite_bean.getChecked_num() > 1 ? 1 : onsite_bean.getChecked_num());
+            mapStationInfos.get(onsite_bean.getDept_id()).setOnsite_total_score(onsite_bean.getCheck_total_score());
+        }
+        // 计算出每个收费站的总平均扣分和平均得分
+        Set<Map.Entry<Long, FwqStatisticsBean>> stationInfos = mapStationInfos.entrySet();
+        // 保留二位小数
+        DecimalFormat df = new DecimalFormat("0.00");
+        for (Map.Entry<Long, FwqStatisticsBean> station : stationInfos) {
+            float avg = 0;
+            FwqStatisticsBean value = station.getValue();
+            value.setThird_check_num(1);
+            value.setOnsite_check_num(1);
+            // 设置总平均扣分
+            if (value.getCompany_check_num() > 0 || value.getThird_check_num() > 0) {
+                avg += (value.getCompany_total_score() + value.getThird_total_score()) / 2.0 / (value.getCompany_check_num() + value.getThird_check_num());
+            }
+            if (value.getOnsite_check_num() > 0) {
+                avg += value.getOnsite_total_score() / 2.0 / value.getOnsite_check_num();
+            }
+            value.setCheck_total_avg(df.format(avg));
+            // 设置平均得分
+            Float score_avg = (1000 - Float.valueOf(df.format(avg)));
+            value.setScore_avg(score_avg.toString());
+        }
+        List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+        sortList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                return o1.compare3To(o2);
+            }
+        });
+
+        List<FwqStatisticsBean> temp = new ArrayList<>();
+        temp.addAll(sortList);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        for (FwqStatisticsBean aSortList : sortList) {
+            if (deptMap.get(aSortList.getDept_id()) != null) {
+                if (deptMap.get(aSortList.getDept_id()).getCreattime().getTime() > obj.getEnd_date().getTime()) {
+                    temp.remove(aSortList);
+                }
+            }
+
+        }
+        sortList = temp;
+
+        for (int j = 0; j < sortList.size(); j++) {
+            FwqStatisticsBean statisticsBean = sortList.get(j);
+            // 公司排名
+            if (j == 0) {
+                statisticsBean.setCompany_ranking2(1);
+            } else {
+                FwqStatisticsBean bean = sortList.get(j - 1);
+                if (statisticsBean.compare3To(bean) == 0) {
+                    statisticsBean.setCompany_ranking2(bean.getCompany_ranking2());
+                } else {
+                    statisticsBean.setCompany_ranking2(j + 1);
+                }
+            }
+        }
+
+        CheckTaskPeriod period = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+
+        if (period != null) {
+            for (FwqStatisticsBean s : sortList) {
+                FwqDeptStatistic ss = new FwqDeptStatistic();
+                ss.setScore(Double.parseDouble(s.getScore_avg()));
+                ss.setIntegral(sortList.size() - s.getCompany_ranking2() + 1);
+                ss.setDept_id(s.getDept_id());
+                ss.setPeriod_id(period.getId());
+                fwqCheckDeptStatisticsDao.saveandupdate(ss);
+            }
+        }
+
+        return sortList;
+    }
+
+    @Override
+    public Map<String, List<FwqDeptStatistic>> getDeptStatistic(FwqDeptStatistic obj) {
+
+        List<CheckTaskPeriod> checkTaskPeriods = commonService.getAllCheckTaskPeriod();
+        SimpleDateFormat ff = new SimpleDateFormat("yyyy-MM");
+        SimpleDateFormat ff1 = new SimpleDateFormat("MM月");
+
+        for (CheckTaskPeriod p : checkTaskPeriods) {
+            if (obj.getStart_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                obj.setStartperiod_id(p.getId());
+            }
+            if (obj.getEnd_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                obj.setEndperiod_id(p.getId());
+            }
+        }
+        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            return null;
+        }
+        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            return null;
+        }
+        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            obj.setStartperiod_id(checkTaskPeriods.get(0).getId());
+        }
+        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            obj.setEndperiod_id(checkTaskPeriods.get(checkTaskPeriods.size() - 1).getId());
+        }
+
+        List<FwqDeptStatistic> deptStatistics = fwqCheckDeptStatisticsDao.selectdepts(obj);
+        Map<String, List<FwqDeptStatistic>> listMap = new HashMap<>();
+        Map<Long, List<FwqDeptStatistic>> listMap1 = new HashMap<>();
+        if (deptStatistics.size() > 0) {
+            Map<Long, Organ> deptMap = commonService.getDeptMap();
+            for (FwqDeptStatistic s : deptStatistics) {
+                //按月统计
+                if (listMap.get(s.getPeriod_id() + "") == null) {
+                    List<FwqDeptStatistic> t = new ArrayList<>();
+                    t.add(s);
+                    listMap.put(s.getPeriod_id() + "", t);
+                } else {
+                    List<FwqDeptStatistic> t = listMap.get(s.getPeriod_id() + "");
+                    t.add(s);
+                    listMap.put(s.getPeriod_id() + "", t);
+                }
+
+
+                //按部门统计
+                if (listMap1.get(s.getDept_id()) == null) {
+                    List<FwqDeptStatistic> t = new ArrayList<>();
+                    t.add(s);
+                    listMap1.put(s.getDept_id(), t);
+                } else {
+                    List<FwqDeptStatistic> t = listMap1.get(s.getDept_id());
+                    t.add(s);
+                    listMap1.put(s.getDept_id(), t);
+                }
+            }
+
+            //按月划分
+            for (CheckTaskPeriod p : checkTaskPeriods) {
+                if (p.getId() >= obj.getStartperiod_id() && p.getId() <= obj.getEndperiod_id()) {
+                    //符合要求的周期 计算得分
+                    for (Long tp : listMap1.keySet()
+                            ) {
+                        List<FwqDeptStatistic> deptStatistics1 = listMap1.get(tp);
+                        //该周期每一个部门
+                        //计算累计
+                        Integer s = 0;
+                        for (FwqDeptStatistic ss : deptStatistics1
+                                ) {
+                            if (ss.getPeriod_id() <= p.getId()) {
+                                s += ss.getIntegral();
+                            }
+                        }
+
+                        //赋值
+                        for (FwqDeptStatistic ss : deptStatistics1
+                                ) {
+                            if (ss.getPeriod_id().equals(p.getId())) {
+                                ss.setTotal_integral(s);
+                                ss.setDept_name(deptMap.get(ss.getDept_id()).getOrganname());
+                                ss.setTime(ff.format(p.getEndtime()));
+                            }
+                        }
+                    }
+
+                    //计算排名
+                    List<FwqDeptStatistic> deptStatistics1 = listMap.get(p.getId() + "");
+                    if (deptStatistics1 != null) {
+                        deptStatistics1.sort(new Comparator<FwqDeptStatistic>() {
+                            @Override
+                            public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                                return o1.getTotal_integral() > o2.getTotal_integral() ? -1 : 1;
+                            }
+                        });
+                        for (int j = 0; j < deptStatistics1.size(); j++) {
+                            FwqDeptStatistic statisticsBean = deptStatistics1.get(j);
+                            // 排名
+                            if (j == 0) {
+                                statisticsBean.setTotal_ranking(1);
+                            } else {
+                                FwqDeptStatistic bean = deptStatistics1.get(j - 1);
+                                if (statisticsBean.getTotal_integral().equals(bean.getTotal_integral())) {
+                                    statisticsBean.setTotal_ranking(bean.getTotal_ranking());
+                                } else {
+                                    statisticsBean.setTotal_ranking(j + 1);
+                                }
+                            }
+                        }
+                    }
+
+                }
+            }
+
+            //排序
+            for (String i : listMap.keySet()
+                    ) {
+                listMap.get(i).sort(new Comparator<FwqDeptStatistic>() {
+                    @Override
+                    public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                        return o1.getDept_id() > o2.getDept_id() ? 1 : -1;
+                    }
+                });
+            }
+            listMap.clear();
+            for (Long s : listMap1.keySet()
+                    ) {
+                List<FwqDeptStatistic> l = listMap1.get(s);
+                l.sort(new Comparator<FwqDeptStatistic>() {
+                    @Override
+                    public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                        return o1.getPeriod_id() > o2.getPeriod_id() ? 1 : -1;
+                    }
+                });
+                listMap.put(l.get(0).getDept_id() + "", l);
+            }
+
+            if (obj.getType() != null && obj.getType().equals(1)) {
+                //excel数据
+                for (CheckTaskPeriod p : checkTaskPeriods) {
+                    if (p.getId() >= obj.getStartperiod_id() && p.getId() <= obj.getEndperiod_id()) {
+                        //符合要求的周期 计算得分
+                        for (String i : listMap.keySet()
+                                ) {
+                            //单个部门的
+                            List<FwqDeptStatistic> l = listMap.get(i);
+                            FwqDeptStatistic temp = null;
+                            if (l.size() < 1) {
+                                continue;
+                            }
+                            boolean isin = false;
+                            for (FwqDeptStatistic s : l
+                                    ) {
+                                if (s.getPeriod_id().equals(p.getId())) {
+                                    isin = true;
+                                    temp = s;
+                                    break;
+                                }
+                            }
+                            //不在里面
+                            if (!isin) {
+                                FwqDeptStatistic s = l.get(0).clone();
+                                s.setScore((double) -1);
+                                s.setPeriod_id(p.getId());
+                                s.setIntegral(-1);
+                                s.setTotal_integral(-1);
+                                s.setTotal_ranking(-1);
+                                temp = s;
+                                l.add(s);
+                            }
+
+                            temp.setMString(ff1.format(p.getEndtime()));
+                            listMap.put(i, l);
+
+                        }
+                    }
+                }
+                //再次排序
+                for (String s : listMap.keySet()
+                        ) {
+                    List<FwqDeptStatistic> l = listMap.get(s);
+                    l.sort(new Comparator<FwqDeptStatistic>() {
+                        @Override
+                        public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                            return o1.getPeriod_id() > o2.getPeriod_id() ? 1 : -1;
+                        }
+                    });
+                    listMap.put(l.get(0).getDept_id() + "", l);
+                }
+            }
+        }
+
+
+        return listMap;
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getFeeStationCheckItemScore(FwqStatisticsBean obj) {
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            // 30:连云港道管;31:盐城道管;32:南通道管
+            if ("30".equals(sta.getParentid())) {
+                obj2.setId(1);
+            } else if ("31".equals(sta.getParentid())) {
+                obj2.setId(2);
+            } else if ("32".equals(sta.getParentid())) {
+                obj2.setId(3);
+            }
+            mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
+        }
+
+        if (obj.getStart_date() != null && obj.getEnd_date() != null) {
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+            if (p != null) {
+                obj.setPeriod_id(p.getId());
+            }
+        }
+
+        //服务区检查次数
+        List<FwqStatisticsBean> listCheckNum = fwqStatisticsDao.selectFeeStationCheckNum(obj);
+        for (FwqStatisticsBean sta : listCheckNum) {
+            if (mapStationInfos.containsKey(sta.getDept_id())) {
+                mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+//                mapStationInfos.get(sta.getDept_id()).setChecked_people_num(sta.getChecked_people_num());
+            }
+        }
+
+        List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectFeeStationCheckedPersonScoreDetail(obj);
+
+        // 处理同一个服务区中,如果item的parent_id是一样的话,将这些数据结合在一起
+        for (FwqStatisticsBean sta : listCheckedScore) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+        }
+        for (int i = 0; i < listCheckedScore.size(); i++) {
+            for (int j = listCheckedScore.size() - 1; j > i; j--) {
+                if (listCheckedScore.get(j).getDept_id().equals(listCheckedScore.get(i).getDept_id()) && listCheckedScore.get(j).getItem_id().equals(listCheckedScore.get(i).getItem_id())) {
+                    listCheckedScore.get(i).setScore(listCheckedScore.get(i).getScore() + listCheckedScore.get(j).getScore());
+                    listCheckedScore.remove(j);
+                }
+            }
+        }
+
+        for (FwqStatisticsBean sta : listCheckedScore) {
+            if (mapStationInfos.containsKey(sta.getDept_id())) {
+                FwqStatisticsBean statis = mapStationInfos.get(sta.getDept_id());
+                statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
+                // 组装扣分类型内容
+                if (itemMap.get(sta.getCheck_item_id().longValue()).getParent_id() != null) {
+                    sta.setId(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+                    if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
+                        sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
+                    } else {
+                        sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+                    }
+                }
+                statis.getChecked_socre_name().add(sta.getName());
+                statis.getChecked_score().add(sta.getScore());
+                statis.getChecked_score_ids().add(sta.getId());
+            }
+        }
+
+        List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+
+        sortList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                if (o1.getId() > o2.getId()) {
+                    return 1;
+                } else if (o1.getId().equals(o2.getId())) {
+                    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;
+                        }
+                    }
+                } else {
+                    return -1;
+                }
+            }
+        });
+
+        return sortList;
+
+    }
+
+    @Override
+    public FwqRankingData getEmployeeRankingData(FwqStatisticsBean obj) {
+        FwqRankingData data = new FwqRankingData();
+
+        CheckTaskPeriod lastTaskPeriod = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+        if (lastTaskPeriod != null) {
+            FwqStatisticsBean temp = new FwqStatisticsBean();
+            temp.setStart_date(new Date(lastTaskPeriod.getStarttime().getTime() - 1 * 1000 * 60 * 60));
+            temp.setEnd_date(new Date(lastTaskPeriod.getEndtime().getTime() - 1 * 1000 * 60 * 60));
+            List<FwqStatisticsBo> list = getEmployeeCheckedInfo(temp);
+            if (list == null || list.size() < 1) {
+                return data;
+            }
+            for (FwqStatisticsBo b : list) {
+                if (b.getDept_id().intValue() == obj.getDept_id().intValue()) {
+                    data.setLastP(b);
+                    break;
+                }
+            }
+        }
+        List<FwqStatisticsBo> list = getEmployeeCheckedInfo(obj);
+        if (list == null || list.size() < 1) {
+            return data;
+        }
+        for (FwqStatisticsBo b : list) {
+            if (b.getDept_id().intValue() == obj.getDept_id().intValue()) {
+                data.setCurrentP(b);
+                break;
+            }
+        }
+
+        return data;
+    }
+
+    @Override
+    public Object getOneCheckedDetailInfo(Integer page, Integer size, FwqStatisticsBean obj) {
+        if (!(page.equals(0) && size.equals(0))) {
+            PageHelper.startPage(page, size);
+        }
+        List<FwqStatisticsBean> list = fwqStatisticsDao.selectOneCheckedDetailInfo(obj);
+        Map<Long, Item> itemMap = commonService.getItemMap();
+
+        for (FwqStatisticsBean sta : list) {
+            // 组装扣分类型内容
+            if (sta.getCheck_item_id() != null) {
+                if (itemMap.get(sta.getCheck_item_id().longValue()) != null) {
+                    sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
+                    if (itemMap.get(sta.getCheck_item_id().longValue()).getParent_id() != null) {
+                        if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
+                            sta.setParent_name(itemMap.get(sta.getCheck_item_id().longValue()).getName());
+                        } else {
+                            sta.setParent_name(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+                        }
+                    }
+                }
+            }
+        }
+
+        if (obj.getQueryType() == 0) {
+            for (FwqStatisticsBean sta : list) {
+                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()));
+//                if (sta.getDept_id() != null && obj.getDept_id() != null) {
+//                    sta.setChecked_name(CacheUtil.getUserFromMap(sta.getUser_id()).getTruename()
+//                            + (obj.getUser_id().intValue() == sta.getUser_id().intValue() ? "" : "(组员)"));
+//
+//                }
+            }
+        } /*else if (obj.getQueryType() == 1) {
+            for (FwqStatisticsBean sta : list) {
+                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()));
+
+                if (sta.getUser_id() != null && obj.getUser_id() != null && obj.getQueryType() != null
+                        && obj.getQueryType().intValue() == 0) {
+                    sta.setChecked_name(CacheUtil.getUserFromMap(sta.getUser_id()).getTruename()
+                            + (obj.getUser_id().intValue() == sta.getUser_id().intValue() ? "" : "(组员)"));
+
+                }
+            }
+        }*/
+
+        if (!(page.equals(0) && size.equals(0))) {
+            return new PageInfo<FwqStatisticsBean>(list);
+        }
+        return list;
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getOneSACheckedInfo(FwqStatisticsBean obj) {
+        return fwqStatisticsDao.selectOneCheckedInfoData(obj);
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getOneCheckedItemInfo(FwqStatisticsBean obj) {
+        List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectOneCheckedItemInfo(obj);
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        // 处理同一个服务区中,如果item的parent_id是一样的话,将这些数据结合在一起
+        for (FwqStatisticsBean sta : listCheckedScore) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+            if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
+                sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
+            } else {
+                sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+            }
+        }
+        for (int i = 0; i < listCheckedScore.size(); i++) {
+            for (int j = listCheckedScore.size() - 1; j > i; j--) {
+                if (listCheckedScore.get(j).getDept_id().equals(listCheckedScore.get(i).getDept_id()) && listCheckedScore.get(j).getItem_id().equals(listCheckedScore.get(i).getItem_id())) {
+                    listCheckedScore.get(i).setAll_check_score(listCheckedScore.get(i).getAll_check_score() + listCheckedScore.get(j).getAll_check_score());
+                    listCheckedScore.remove(j);
+                }
+            }
+        }
+        return listCheckedScore;
+    }
+
+    @Override
+    public List<FwqStatisticsBo> getEmployeeCheckedInfo(FwqStatisticsBean obj) {
+
+        // 将检索出来的数据放到如map中
+        List<FwqStatisticsBean> list = fwqStatisticsDao.selectStatistics(obj);
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        // 将list中的数据找到项目的父项目,然后去除重复的
+        for (FwqStatisticsBean sta : list) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+        }
+        for (int i = 0; i < list.size(); i++) {
+            for (int j = list.size() - 1; j > i; j--) {
+                if (list.get(j).getDept_id().equals(list.get(i).getDept_id()) && list.get(j).getItem_id().equals(list.get(i).getItem_id())) {
+                    list.get(i).setScore(list.get(i).getScore() + list.get(j).getScore());
+                    list.remove(j);
+                }
+            }
+        }
+
+        // 查询服务区受检次数
+        List<FwqStatisticsBean> timesList = fwqStatisticsDao.selectCheckedTimes(obj);
+
+        Map<Long, FwqStatisticsBo> statisticBoMap = new HashMap<>();
+
+        // 获得所有服务区数据,将服务区数据保存在map中
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        for (FeeStation sta : saList) {
+            FwqStatisticsBo obj2 = new FwqStatisticsBo();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            // 30:连云港道管;31:盐城道管;32:南通道管
+            if ("30".equals(sta.getParentid())) {
+                obj2.setId(1);
+            } else if ("31".equals(sta.getParentid())) {
+                obj2.setId(2);
+            } else if ("32".equals(sta.getParentid())) {
+                obj2.setId(3);
+            }
+            statisticBoMap.put(Long.valueOf(sta.getDeptid()), obj2);
+        }
+
+        for (FwqStatisticsBean statisticsBean : list) {
+            if (statisticBoMap.containsKey(statisticsBean.getDept_id())) {
+                FwqStatisticsBo tmp = statisticBoMap.get(statisticsBean.getDept_id());
+                // 组装扣分类型内容
+                if (itemMap.get(statisticsBean.getCheck_item_id().longValue()).getParent_id() != null) {
+                    statisticsBean.setId(itemMap.get(statisticsBean.getCheck_item_id().longValue()).getParent_id().intValue());
+                    if (itemMap.get(statisticsBean.getCheck_item_id().longValue()).getScore() == null) {
+                        statisticsBean.setName(itemMap.get(statisticsBean.getCheck_item_id().longValue()).getName());
+                    } else {
+                        statisticsBean.setName(itemMap.get(itemMap.get(statisticsBean.getCheck_item_id().longValue()).getParent_id()).getName());
+                    }
+                }
+                tmp.getChecked_socre_name().add(statisticsBean.getName());
+                tmp.getChecked_score().add(statisticsBean.getScore());
+                tmp.setCheck_all_score(tmp.getCheck_all_score() + statisticsBean.getScore());
+            }
+        }
+
+        for (FwqStatisticsBean statisticsBean : timesList) {
+            if (statisticBoMap.containsKey(statisticsBean.getDept_id())) {
+                FwqStatisticsBo tmp = statisticBoMap.get(statisticsBean.getDept_id());
+                tmp.setChecked_num(statisticsBean.getChecked_num());
+            }
+        }
+
+        List<FwqStatisticsBo> lists = new ArrayList<>(statisticBoMap.values());
+        // 进行排序
+        lists.sort(new Comparator<FwqStatisticsBo>() {
+            @Override
+            public int compare(FwqStatisticsBo o1, FwqStatisticsBo o2) {
+                return o1.compareTo(o2);
+            }
+        });
+        // 道管Map
+        // 排名
+//        Map<String, Integer> center_ranking = new HashMap<>();
+        // 留last
+//        Map<String, FwqStatisticsBo> center_ranking2 = new HashMap<>();
+//        center_ranking.put("30", 1);
+//        center_ranking.put("31", 1);
+//        center_ranking.put("32", 1);
+//
+//        center_ranking2.put("30", null);
+//        center_ranking2.put("31", null);
+//        center_ranking2.put("32", null);
+
+//        Map<String, Integer> service_area_ranking = new HashMap<>();
+//        Map<String, FwqStatisticsBo> service_area_ranking2 = new HashMap<>();
+        // 这边需要对道管和服务区进行排名
+//        for (FeeStation fee : saList) {
+//            service_area_ranking.put(fee.getDeptid(), 1);
+//            service_area_ranking2.put(fee.getDeptid(), null);
+//        }
+
+        for (int i = 0; i < lists.size(); i++) {
+
+            FwqStatisticsBo statisticsBo = lists.get(i);
+            if (statisticsBo.getChecked_num() + statisticsBo.getChecked_m_num() == 0) {
+                continue;
+            }
+            // 计算平均扣分
+            DecimalFormat df = new DecimalFormat(".##");
+            double count = statisticsBo.getChecked_num() + statisticsBo.getChecked_m_num();
+            Double sc = (statisticsBo.getCheck_all_score() + statisticsBo.getCheck_all_m_score()) * 1.00
+                    / (count == 0 ? 1 : count);
+            statisticsBo.setCheck_score_avg(sc == 0 ? "0" : df.format(sc));
+
+            // 累计道管排名
+            // 获取道管id
+//            String centerId = deptMap.get(statisticsBo.getDept_id()).getParentid().toString();
+//
+//            if (center_ranking2.get(centerId) == null) {
+//                statisticsBo.setCenter_ranking(center_ranking.get(centerId));
+//            } else {
+//                center_ranking.put(centerId, center_ranking.get(centerId) + 1);
+//                if (statisticsBo.compareTo(center_ranking2.get(centerId)) == 0) {
+//                    statisticsBo.setCenter_ranking(center_ranking2.get(centerId).getCenter_ranking());
+//                } else {
+//                    statisticsBo.setCenter_ranking(center_ranking.get(centerId));
+//                }
+//            }
+//            center_ranking2.put(centerId, statisticsBo);
+
+            // 累计服务区的排名
+//            String serviceAreaId = statisticsBo.getDept_id().toString();
+
+//            if (service_area_ranking2.get(serviceAreaId) == null) {
+//                statisticsBo.setService_area_ranking(service_area_ranking.get(serviceAreaId));
+//            } else {
+//                service_area_ranking.put(serviceAreaId, service_area_ranking.get(serviceAreaId) + 1);
+//                if (statisticsBo.compareTo(service_area_ranking2.get(serviceAreaId)) == 0) {
+//                    statisticsBo.setService_area_ranking(service_area_ranking2.get(serviceAreaId).getService_area_ranking());
+//                } else {
+//                    statisticsBo.setService_area_ranking(service_area_ranking.get(serviceAreaId));
+//                }
+//            }
+//            service_area_ranking2.put(serviceAreaId, statisticsBo);
+
+            // 公司排名s
+            if (i == 0) {
+                statisticsBo.setCompany_ranking(1);
+            } else {
+                FwqStatisticsBo lastbo = lists.get(i - 1);
+                if (statisticsBo.compareTo(lastbo) == 0) {
+                    statisticsBo.setCompany_ranking(lastbo.getCompany_ranking());
+                } else {
+                    statisticsBo.setCompany_ranking(i + 1);
+                }
+            }
+        }
+
+        return lists;
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getYearScoreChange(FwqStatisticsBean obj) {
+        List<FwqStatisticsBean> list = fwqStatisticsDao.selectYearScoreInfo(obj);
+        return list;
+
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getFeeStationCheckedScore(FwqStatisticsBean obj) {
+
+        Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
+        // 获得所有服务区数据,将服务区数据保存在map中
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            // 30:连云港道管;31:盐城道管;32:南通道管
+            if ("30".equals(sta.getParentid())) {
+                obj2.setId(1);
+            } else if ("31".equals(sta.getParentid())) {
+                obj2.setId(2);
+            } else if ("32".equals(sta.getParentid())) {
+                obj2.setId(3);
+            }
+            mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
+        }
+
+        if (obj.getStart_date() != null && obj.getEnd_date() != null) {
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+            if (p != null) {
+                obj.setPeriod_id(p.getId());
+            }
+        }
+
+        // 检查次数
+        List<FwqStatisticsBean> listCheckNum = fwqStatisticsDao.selectFeeStationCheckNum(obj);
+        for (FwqStatisticsBean sta : listCheckNum) {
+            if (mapStationInfos.containsKey(sta.getDept_id())) {
+                mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+            }
+        }
+
+        List<FwqStatisticsBo> list = getEmployeeCheckedInfo(obj);
+        Map<Integer, FwqStatisticsBo> listmap = new HashMap<>();
+        for (FwqStatisticsBo b : list) {
+            listmap.put(b.getDept_id().intValue(), b);
+        }
+
+        List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectFeeStationCheckedScore(obj);
+        for (FwqStatisticsBean sta : listCheckedScore) {
+            if (mapStationInfos.containsKey(sta.getDept_id())) {
+
+                FwqStatisticsBean statis = mapStationInfos.get(sta.getDept_id());
+                statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
+
+                FwqStatisticsBo b = listmap.get(sta.getDept_id().intValue());
+
+                if (b == null || b.getCheck_score_avg() == null) {
+                    continue;
+                }
+                double sc = Double.parseDouble(b.getCheck_score_avg());
+                if (sc == 0) {
+                    statis.setScore(statis.getScore() + 1);
+                } else if (sc <= 15) {
+                    statis.setScore_fifteen(statis.getScore_fifteen() + 1);
+                } else if (sc <= 50) {
+                    statis.setScore_fifty(statis.getScore_fifty() + 1);
+                } else {
+                    statis.setScore_over_fifty(statis.getScore_over_fifty() + 1);
+                }
+            }
+        }
+
+        List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+
+        sortList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                if (o1.getId() > o2.getId()) {
+                    return 1;
+                } else if (o1.getId().equals(o2.getId())) {
+                    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;
+                        }
+                    }
+                } else {
+                    return -1;
+                }
+            }
+        });
+
+        return sortList;
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getCenterManageScoreInfo(FwqStatisticsBean obj) {
+        // 道管中心
+        List<FwqStatisticsBean> centerManageList = new ArrayList<>();
+        for (int i = 0; i < 3; i++) {
+            FwqStatisticsBean e = new FwqStatisticsBean();
+            centerManageList.add(e);
+        }
+
+        List<FwqStatisticsBean> scoreList = reFeeStationScoreInfo(obj);
+        Map<Long, FwqStatisticsBean> centerManageMap = new HashMap<>();
+        for (FwqStatisticsBean sta : scoreList) {
+            if (!centerManageMap.containsKey(sta.getDept_id())) {
+                centerManageMap.put(sta.getDept_id(), sta);
+            }
+        }
+
+        // 获取所有的服务区
+        List<FwqStatisticsBean> lists = new ArrayList<>();
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            obj2.setParent_dept_id(Long.valueOf(sta.getParentid()));
+            lists.add(obj2);
+        }
+
+        for (FwqStatisticsBean sta : lists) {
+            if (sta.getParent_dept_id() == 30) {
+                centerManageList.get(0).setAll_check_score(centerManageList.get(0).getAll_check_score()
+                        + centerManageMap.get(sta.getDept_id()).getAll_check_score());
+                centerManageList.get(0).setChecked_num(centerManageList.get(0).getChecked_num()
+                        + centerManageMap.get(sta.getDept_id()).getChecked_num());
+                centerManageList.get(0).setFeeStationName("连云港");
+            } else if (sta.getParent_dept_id() == 31) {
+                centerManageList.get(1).setAll_check_score(centerManageList.get(1).getAll_check_score()
+                        + centerManageMap.get(sta.getDept_id()).getAll_check_score());
+                centerManageList.get(1).setChecked_num(centerManageList.get(1).getChecked_num()
+                        + centerManageMap.get(sta.getDept_id()).getChecked_num());
+                centerManageList.get(1).setFeeStationName("盐城");
+            } else if (sta.getParent_dept_id() == 32) {
+                centerManageList.get(2).setAll_check_score(centerManageList.get(2).getAll_check_score()
+                        + centerManageMap.get(sta.getDept_id()).getAll_check_score());
+                centerManageList.get(2).setChecked_num(centerManageList.get(2).getChecked_num()
+                        + centerManageMap.get(sta.getDept_id()).getChecked_num());
+                centerManageList.get(2).setFeeStationName("南通");
+            }
+        }
+
+        // 进行排序
+        centerManageList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                return o1.compareTo(o2);
+            }
+        });
+
+        return centerManageList;
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getFeeStationScoreInfo(FwqStatisticsBean obj) {
+        List<FwqStatisticsBean> scoreList = reFeeStationScoreInfo(obj);
+
+        scoreList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                return o1.compareTo(o2);
+            }
+        });
+
+        return scoreList;
+    }
+
+    @Override
+    public List<FwqStatisticsBean> getCheckedItemScoreInfo(FwqStatisticsBean obj) {
+        List<FwqStatisticsBean> list = fwqStatisticsDao.selectCheckedItemScoreInfo(obj);
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        for (FwqStatisticsBean sta : list) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+            sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+            sta.setParent_dept_id(deptMap.get(sta.getDept_id()).getParentid().longValue());
+        }
+        for (int i = 0; i < list.size(); i++) {
+            for (int j = list.size() - 1; j > i; j--) {
+                if (list.get(j).getDept_id().equals(list.get(i).getDept_id()) && list.get(j).getItem_id().equals(list.get(i).getItem_id())) {
+                    list.get(i).setAll_check_score(list.get(i).getAll_check_score() + list.get(j).getAll_check_score());
+                    list.get(i).setChecked_num(list.get(i).getChecked_num() + list.get(j).getChecked_num());
+                    list.remove(j);
+                }
+            }
+        }
+
+        return list;
+    }
+
+    @Override
+    public Map<String, List<FwqStatisticsBean>> get2CheckedItemScoreInfo(FwqStatisticsBean obj) {
+
+        Map<String, List<FwqStatisticsBean>> map = new HashMap<>();
+        List<FwqStatisticsBean> objList = fwqStatisticsDao.selectCheckedItemScoreInfo(obj);
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        for (FwqStatisticsBean sta : objList) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+            sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+            sta.setFeeStationName(deptMap.get(sta.getDept_id()).getOrganname());
+            sta.setPfeeStationName(deptMap.get(deptMap.get(sta.getDept_id()).getParentid().longValue()).getOrganname());
+            sta.setParent_dept_id(deptMap.get(sta.getDept_id()).getParentid().longValue());
+        }
+        for (int i = 0; i < objList.size(); i++) {
+            for (int j = objList.size() - 1; j > i; j--) {
+                if (objList.get(j).getDept_id().equals(objList.get(i).getDept_id()) && objList.get(j).getItem_id().equals(objList.get(i).getItem_id())) {
+                    objList.get(i).setAll_check_score(objList.get(i).getAll_check_score() + objList.get(j).getAll_check_score());
+                    objList.get(i).setChecked_num(objList.get(i).getChecked_num() + objList.get(j).getChecked_num());
+                    objList.remove(j);
+                }
+            }
+        }
+
+        map.put("Tmth", objList);
+        obj.setMth(obj.getPrev_mth());
+        objList = fwqStatisticsDao.selectCheckedItemScoreInfo(obj);
+
+        for (FwqStatisticsBean sta : objList) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+            sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+            sta.setFeeStationName(deptMap.get(sta.getDept_id()).getOrganname());
+            sta.setPfeeStationName(deptMap.get(deptMap.get(sta.getDept_id()).getParentid().longValue()).getOrganname());
+            sta.setParent_dept_id(deptMap.get(sta.getDept_id()).getParentid().longValue());
+        }
+        for (int i = 0; i < objList.size(); i++) {
+            for (int j = objList.size() - 1; j > i; j--) {
+                if (objList.get(j).getDept_id().equals(objList.get(i).getDept_id()) && objList.get(j).getItem_id().equals(objList.get(i).getItem_id())) {
+                    objList.get(i).setAll_check_score(objList.get(i).getAll_check_score() + objList.get(j).getAll_check_score());
+                    objList.get(i).setChecked_num(objList.get(i).getChecked_num() + objList.get(j).getChecked_num());
+                    objList.remove(j);
+                }
+            }
+        }
+
+        map.put("Pmth", objList);
+
+        return map;
+    }
+
+    @Override
+    public List<FwqStatisiticPojo> getFwqStatistic(ServiceAreaStatistic obj) {
+
+        List<CheckTaskPeriod> checkTaskPeriods = commonService.getAllCheckTaskPeriod();
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+
+        for (CheckTaskPeriod p : checkTaskPeriods) {
+            if (obj.getStart_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                obj.setStartperiod_id(p.getId());
+            }
+            if (obj.getEnd_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                obj.setEndperiod_id(p.getId());
+            }
+        }
+        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            return new ArrayList<>();
+        }
+        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            return new ArrayList<>();
+        }
+        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            obj.setStartperiod_id(checkTaskPeriods.get(0).getId());
+        }
+        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            obj.setEndperiod_id(checkTaskPeriods.get(checkTaskPeriods.size() - 1).getId());
+        }
+
+        List<CheckTaskPeriod> temp_p = new ArrayList<>();
+        for (CheckTaskPeriod p : checkTaskPeriods) {
+            if (p.getId() >= obj.getStartperiod_id() && p.getId() <= obj.getEndperiod_id()) {
+                temp_p.add(p);
+            }
+        }
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM");
+        //获取满足条件的服务区
+        List<ServiceAreaStatistic> fwqStatistics = fwqStatisticsDao.selectlimituser(obj);
+
+        HashMap<Integer, List<ServiceAreaStatistic>> usm = new HashMap<>();
+
+        for (ServiceAreaStatistic c : fwqStatistics
+                ) {
+            List<ServiceAreaStatistic> s = usm.get(c.getDept_id());
+            if (s == null) {
+                s = new ArrayList<>();
+            }
+            s.add(c);
+            usm.put(c.getDept_id(), s);
+            for (CheckTaskPeriod p : checkTaskPeriods) {
+                if (c.getPeriod_id().equals(p.getId())) {
+                    c.setP_str(simpleDateFormat.format(p.getEndtime()));
+                }
+            }
+        }
+
+        List<FwqStatisiticPojo> fwq_ids = new ArrayList<>();
+
+        //判断是否连续
+        for (Integer k : usm.keySet()) {
+            List<ServiceAreaStatistic> user_temp = new ArrayList<>();
+            boolean isM = false;
+
+            List<ServiceAreaStatistic> pp = new ArrayList<>();
+            //获取得分
+            List<ServiceAreaStatistic> ll = usm.get(k);
+            int count = 0;
+            for (CheckTaskPeriod p : temp_p) {
+                boolean isfond = false;
+                for (ServiceAreaStatistic s : ll) {
+                    if (s.getPeriod_id().equals(p.getId())) {
+                        isfond = true;
+                        pp.add(s);
+                        break;
+                    }
+                }
+                if (isfond) {
+                    count++;
+                    if (count >= obj.getLimitnumber()) {
+                        isM = true;
+                        user_temp.addAll(pp);
+                        pp.clear();
+                    }
+                } else {
+                    if (count >= obj.getLimitnumber()) {
+                        isM = true;
+                        user_temp.addAll(pp);
+                    }
+                    count = 0;
+                    pp.clear();
+                }
+            }
+
+            if (isM) {
+                FwqStatisiticPojo p = new FwqStatisiticPojo();
+                p.setDept_id(k.longValue());
+                p.setDept(deptMap.get(k.longValue()).getOrganname());
+                p.setFwqStatistics(user_temp);
+                fwq_ids.add(p);
+            }
+        }
+
+        return fwq_ids;
+    }
+
+    private List<FwqStatisticsBean> reFeeStationScoreInfo(FwqStatisticsBean obj) {
+        List<FwqStatisticsBean> scoreList = fwqStatisticsDao.selectFeeStationScoreInfo(obj);
+        Map<Long, FwqStatisticsBean> feeStationMap = new HashMap<>();
+
+        for (FwqStatisticsBean feeObj : scoreList) {
+            if (!feeStationMap.containsKey(feeObj.getDept_id())) {
+                feeStationMap.put(feeObj.getDept_id(), feeObj);
+            }
+        }
+        // 需要补充的
+        List<FwqStatisticsBean> reList = new ArrayList<>();
+
+        // 获取所有的服务区
+        List<FwqStatisticsBean> feeStationList = new ArrayList<>();
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            feeStationList.add(obj2);
+        }
+        for (FwqStatisticsBean sta : feeStationList) {
+            if (feeStationMap.containsKey(sta.getDept_id())) {
+                feeStationMap.get(sta.getDept_id()).setFeeStationName(sta.getName());
+            } else {
+                sta.setAll_check_score(0);
+                sta.setChecked_num(0);
+                sta.setFeeStationName(sta.getName());
+                reList.add(sta);
+            }
+        }
+        scoreList.addAll(reList);
+        return scoreList;
+    }
+}

+ 644 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/StatisticsService_FImpl.java

@@ -0,0 +1,644 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.visualinspection.bean.CheckTaskPeriod;
+import com.xintong.visualinspection.bean.FeeStation;
+import com.xintong.visualinspection.bean.FwqDeptStatistic;
+import com.xintong.visualinspection.bean.FwqStatisticsBean;
+import com.xintong.visualinspection.bean.Item;
+import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckDeptStatisticsDao;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqStatisticsDao;
+import com.xintong.visualinspection.visuallnspection_qzd.service.StatisticsService_F;
+import org.jxls.common.Context;
+import org.jxls.util.JxlsHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 文件名:StatisticsService_FImpl
+ * 版本信息:日期:2017/4/7 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ *
+ * @author wenhongquan
+ * @date 2018/05/02
+ */
+
+@Service
+public class StatisticsService_FImpl implements StatisticsService_F {
+
+    private static final Logger logger = LoggerFactory.getLogger(StatisticsService_FImpl.class);
+
+    @Autowired
+    private FwqStatisticsDao fwqStatisticsDao;
+    @Autowired
+    private FwqCheckDeptStatisticsDao fwqCheckDeptStatisticsDao;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+    public List<FwqStatisticsBean> getOperationInfo(FwqStatisticsBean obj) {
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
+        }
+
+        // 获取公司检查的某个收费站的受检次数和扣分合计
+        List<FwqStatisticsBean> company_beans =  getFeeStationCheckItemScore(obj);
+        // 获取第三方暗访稽查的某个服务区的受检次数和扣分合计
+        obj.setCheck_type(8);
+        List<FwqStatisticsBean> third_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
+        // 获取现场稽查的某个服务区的受检次数和扣分合计
+        obj.setCheck_type(9);
+        List<FwqStatisticsBean> onsite_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
+
+        for (FwqStatisticsBean company_bean : company_beans) {
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_check_num(company_bean.getChecked_num());
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_total_score(company_bean.getAll_check_score());
+        }
+        for (FwqStatisticsBean third_bean : third_beans) {
+            mapStationInfos.get(third_bean.getDept_id()).setThird_check_num(third_bean.getChecked_num() > 1 ? 1 : third_bean.getChecked_num());
+            mapStationInfos.get(third_bean.getDept_id()).setThird_total_score(third_bean.getCheck_total_score());
+        }
+
+        for (FwqStatisticsBean onsite_bean : onsite_beans) {
+            mapStationInfos.get(onsite_bean.getDept_id()).setOnsite_check_num(onsite_bean.getChecked_num() > 1 ? 1 : onsite_bean.getChecked_num());
+            mapStationInfos.get(onsite_bean.getDept_id()).setOnsite_total_score(onsite_bean.getCheck_total_score());
+        }
+        // 计算出每个收费站的总平均扣分和平均得分
+        Set<Map.Entry<Long, FwqStatisticsBean>> stationInfos = mapStationInfos.entrySet();
+        // 保留二位小数
+        DecimalFormat df = new DecimalFormat("0.00");
+        for (Map.Entry<Long, FwqStatisticsBean> station : stationInfos) {
+            float avg = 0;
+            FwqStatisticsBean value = station.getValue();
+            value.setThird_check_num(1);
+            value.setOnsite_check_num(1);
+            // 设置总平均扣分
+            if (value.getCompany_check_num() > 0 || value.getThird_check_num() > 0) {
+                avg += (value.getCompany_total_score() + value.getThird_total_score()) / 2.0 / (value.getCompany_check_num() + value.getThird_check_num());
+            }
+            if (value.getOnsite_check_num() > 0) {
+                avg += value.getOnsite_total_score() / 2.0 / value.getOnsite_check_num();
+            }
+            value.setCheck_total_avg(df.format(avg));
+            // 设置平均得分
+            Float score_avg = (1000 - Float.valueOf(df.format(avg)));
+            value.setScore_avg(score_avg.toString());
+        }
+        List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+        sortList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                return o1.compare3To(o2);
+            }
+        });
+
+        List<FwqStatisticsBean> temp = new ArrayList<>();
+        temp.addAll(sortList);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        for (FwqStatisticsBean aSortList : sortList) {
+            if (deptMap.get(aSortList.getDept_id()) != null) {
+                if (deptMap.get(aSortList.getDept_id()).getCreattime().getTime() > obj.getEnd_date().getTime()) {
+                    temp.remove(aSortList);
+                }
+            }
+
+        }
+        sortList = temp;
+
+        for (int j = 0; j < sortList.size(); j++) {
+            FwqStatisticsBean statisticsBean = sortList.get(j);
+            // 公司排名
+            if (j == 0) {
+                statisticsBean.setCompany_ranking2(1);
+            } else {
+                FwqStatisticsBean bean = sortList.get(j - 1);
+                if (statisticsBean.compare3To(bean) == 0) {
+                    statisticsBean.setCompany_ranking2(bean.getCompany_ranking2());
+                } else {
+                    statisticsBean.setCompany_ranking2(j + 1);
+                }
+            }
+        }
+
+        return sortList;
+    }
+
+    @Override
+    public void getOperationInfo(FwqStatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
+        List<FwqStatisticsBean> lists = getOperationInfo(obj);
+        Map<String, Object> map = new HashMap<>(1);
+        map.put("list", lists);
+        exportExcel("运营管理综合检查情况统计表", "fwq_operation_info", map, resp);
+    }
+
+    public Map<String, List<FwqDeptStatistic>> getDeptStatistic(FwqDeptStatistic obj) {
+
+        List<CheckTaskPeriod> checkTaskPeriods = commonService.getAllCheckTaskPeriod();
+        SimpleDateFormat ff = new SimpleDateFormat("yyyy-MM");
+        SimpleDateFormat ff1 = new SimpleDateFormat("MM月");
+
+        for (CheckTaskPeriod p : checkTaskPeriods) {
+            if (obj.getStart_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                obj.setStartperiod_id(p.getId());
+            }
+            if (obj.getEnd_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                obj.setEndperiod_id(p.getId());
+            }
+        }
+        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            return null;
+        }
+        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            return null;
+        }
+        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            obj.setStartperiod_id(checkTaskPeriods.get(0).getId());
+        }
+        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
+            obj.setEndperiod_id(checkTaskPeriods.get(checkTaskPeriods.size() - 1).getId());
+        }
+
+        List<FwqDeptStatistic> deptStatistics = fwqCheckDeptStatisticsDao.selectdepts(obj);
+        Map<String, List<FwqDeptStatistic>> listMap = new HashMap<>();
+        Map<Long, List<FwqDeptStatistic>> listMap1 = new HashMap<>();
+        if (deptStatistics.size() > 0) {
+            Map<Long, Organ> deptMap = commonService.getDeptMap();
+            for (FwqDeptStatistic s : deptStatistics) {
+                //按月统计
+                if (listMap.get(s.getPeriod_id() + "") == null) {
+                    List<FwqDeptStatistic> t = new ArrayList<>();
+                    t.add(s);
+                    listMap.put(s.getPeriod_id() + "", t);
+                } else {
+                    List<FwqDeptStatistic> t = listMap.get(s.getPeriod_id() + "");
+                    t.add(s);
+                    listMap.put(s.getPeriod_id() + "", t);
+                }
+
+
+                //按部门统计
+                if (listMap1.get(s.getDept_id()) == null) {
+                    List<FwqDeptStatistic> t = new ArrayList<>();
+                    t.add(s);
+                    listMap1.put(s.getDept_id(), t);
+                } else {
+                    List<FwqDeptStatistic> t = listMap1.get(s.getDept_id());
+                    t.add(s);
+                    listMap1.put(s.getDept_id(), t);
+                }
+            }
+
+            //按月划分
+            for (CheckTaskPeriod p : checkTaskPeriods) {
+                if (p.getId() >= obj.getStartperiod_id() && p.getId() <= obj.getEndperiod_id()) {
+                    //符合要求的周期 计算得分
+                    for (Long tp : listMap1.keySet()
+                            ) {
+                        List<FwqDeptStatistic> deptStatistics1 = listMap1.get(tp);
+                        //该周期每一个部门
+                        //计算累计
+                        Integer s = 0;
+                        for (FwqDeptStatistic ss : deptStatistics1
+                                ) {
+                            if (ss.getPeriod_id() <= p.getId()) {
+                                s += ss.getIntegral();
+                            }
+                        }
+
+                        //赋值
+                        for (FwqDeptStatistic ss : deptStatistics1
+                                ) {
+                            if (ss.getPeriod_id().equals(p.getId())) {
+                                ss.setTotal_integral(s);
+                                ss.setDept_name(deptMap.get(ss.getDept_id()).getOrganname());
+                                ss.setTime(ff.format(p.getEndtime()));
+                            }
+                        }
+                    }
+
+                    //计算排名
+                    List<FwqDeptStatistic> deptStatistics1 = listMap.get(p.getId() + "");
+                    if (deptStatistics1 != null) {
+                        deptStatistics1.sort(new Comparator<FwqDeptStatistic>() {
+                            @Override
+                            public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                                return o1.getTotal_integral() > o2.getTotal_integral() ? -1 : 1;
+                            }
+                        });
+                        for (int j = 0; j < deptStatistics1.size(); j++) {
+                            FwqDeptStatistic statisticsBean = deptStatistics1.get(j);
+                            // 排名
+                            if (j == 0) {
+                                statisticsBean.setTotal_ranking(1);
+                            } else {
+                                FwqDeptStatistic bean = deptStatistics1.get(j - 1);
+                                if (statisticsBean.getTotal_integral().equals(bean.getTotal_integral())) {
+                                    statisticsBean.setTotal_ranking(bean.getTotal_ranking());
+                                } else {
+                                    statisticsBean.setTotal_ranking(j + 1);
+                                }
+                            }
+                        }
+                    }
+
+                }
+            }
+
+            //排序
+            for (String i : listMap.keySet()
+                    ) {
+                listMap.get(i).sort(new Comparator<FwqDeptStatistic>() {
+                    @Override
+                    public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                        return o1.getDept_id() > o2.getDept_id() ? 1 : -1;
+                    }
+                });
+            }
+            listMap.clear();
+            for (Long s : listMap1.keySet()
+                    ) {
+                List<FwqDeptStatistic> l = listMap1.get(s);
+                l.sort(new Comparator<FwqDeptStatistic>() {
+                    @Override
+                    public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                        return o1.getPeriod_id() > o2.getPeriod_id() ? 1 : -1;
+                    }
+                });
+                listMap.put(l.get(0).getDept_id() + "", l);
+            }
+
+            if (obj.getType() != null && obj.getType().equals(1)) {
+                //excel数据
+                for (CheckTaskPeriod p : checkTaskPeriods) {
+                    if (p.getId() >= obj.getStartperiod_id() && p.getId() <= obj.getEndperiod_id()) {
+                        //符合要求的周期 计算得分
+                        for (String i : listMap.keySet()
+                                ) {
+                            //单个部门的
+                            List<FwqDeptStatistic> l = listMap.get(i);
+                            FwqDeptStatistic temp = null;
+                            if (l.size() < 1) {
+                                continue;
+                            }
+                            boolean isin = false;
+                            for (FwqDeptStatistic s : l
+                                    ) {
+                                if (s.getPeriod_id().equals(p.getId())) {
+                                    isin = true;
+                                    temp = s;
+                                    break;
+                                }
+                            }
+                            //不在里面
+                            if (!isin) {
+                                FwqDeptStatistic s = l.get(0).clone();
+                                s.setScore((double) -1);
+                                s.setPeriod_id(p.getId());
+                                s.setIntegral(-1);
+                                s.setTotal_integral(-1);
+                                s.setTotal_ranking(-1);
+                                temp = s;
+                                l.add(s);
+                            }
+
+                            temp.setMString(ff1.format(p.getEndtime()));
+                            listMap.put(i, l);
+
+                        }
+                    }
+                }
+                //再次排序
+                for (String s : listMap.keySet()
+                        ) {
+                    List<FwqDeptStatistic> l = listMap.get(s);
+                    l.sort(new Comparator<FwqDeptStatistic>() {
+                        @Override
+                        public int compare(FwqDeptStatistic o1, FwqDeptStatistic o2) {
+                            return o1.getPeriod_id() > o2.getPeriod_id() ? 1 : -1;
+                        }
+                    });
+                    listMap.put(l.get(0).getDept_id() + "", l);
+                }
+            }
+        }
+
+
+        return listMap;
+    }
+
+    @Override
+    public void getDeptStatisticExcel(FwqDeptStatistic obj, HttpServletRequest req, HttpServletResponse resp) {
+        obj.setType(1);
+        Map<String, List<FwqDeptStatistic>> listMap = this.getDeptStatistic(obj);
+        SimpleDateFormat d = new SimpleDateFormat("yyyy/MM");
+        List<Integer> temp = new ArrayList<>();
+        for (int i = 1; i <= listMap.keySet().size(); i++) {
+            temp.add(i);
+        }
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("datas", listMap);
+        map.put("list", temp);
+        map.put("title", "服务区-营运管理提升综合成绩汇总表" + "(" + d.format(obj.getStart_date()) + "---" + d.format(obj.getEnd_date()) + ")");
+        exportExcel("服务区-营运管理提升综合成绩汇总表", "fwq_dept_statistic", map, resp);
+    }
+
+    public List<FwqStatisticsBean> getFeeStationCheckItemScore(FwqStatisticsBean obj) {
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
+        for (FeeStation sta : saList) {
+            FwqStatisticsBean obj2 = new FwqStatisticsBean();
+            obj2.setDept_id(Long.valueOf(sta.getDeptid()));
+            obj2.setName(sta.getName());
+            // 30:连云港道管;31:盐城道管;32:南通道管
+            if ("30".equals(sta.getParentid())) {
+                obj2.setId(1);
+            } else if ("31".equals(sta.getParentid())) {
+                obj2.setId(2);
+            } else if ("32".equals(sta.getParentid())) {
+                obj2.setId(3);
+            }
+            mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
+        }
+
+        if (obj.getStart_date() != null && obj.getEnd_date() != null) {
+            CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
+            if (p != null) {
+                obj.setPeriod_id(p.getId());
+            }
+        }
+
+        //服务区检查次数
+        List<FwqStatisticsBean> listCheckNum = fwqStatisticsDao.selectFeeStationCheckNum(obj);
+        for (FwqStatisticsBean sta : listCheckNum) {
+            if (mapStationInfos.containsKey(sta.getDept_id())) {
+                mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+//                mapStationInfos.get(sta.getDept_id()).setChecked_people_num(sta.getChecked_people_num());
+            }
+        }
+
+        List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectFeeStationCheckedPersonScoreDetail(obj);
+
+        // 处理同一个服务区中,如果item的parent_id是一样的话,将这些数据结合在一起
+        for (FwqStatisticsBean sta : listCheckedScore) {
+            sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+        }
+        for (int i = 0; i < listCheckedScore.size(); i++) {
+            for (int j = listCheckedScore.size() - 1; j > i; j--) {
+                if (listCheckedScore.get(j).getDept_id().equals(listCheckedScore.get(i).getDept_id()) && listCheckedScore.get(j).getItem_id().equals(listCheckedScore.get(i).getItem_id())) {
+                    listCheckedScore.get(i).setScore(listCheckedScore.get(i).getScore() + listCheckedScore.get(j).getScore());
+                    listCheckedScore.remove(j);
+                }
+            }
+        }
+
+        for (FwqStatisticsBean sta : listCheckedScore) {
+            if (mapStationInfos.containsKey(sta.getDept_id())) {
+                FwqStatisticsBean statis = mapStationInfos.get(sta.getDept_id());
+                statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
+                // 组装扣分类型内容
+                if (itemMap.get(sta.getCheck_item_id().longValue()).getParent_id() != null) {
+                    sta.setId(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
+                    if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
+                        sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
+                    } else {
+                        sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
+                    }
+                }
+                statis.getChecked_socre_name().add(sta.getName());
+                statis.getChecked_score().add(sta.getScore());
+                statis.getChecked_score_ids().add(sta.getId());
+            }
+        }
+
+        List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+
+        sortList.sort(new Comparator<FwqStatisticsBean>() {
+            @Override
+            public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
+                if (o1.getId() > o2.getId()) {
+                    return 1;
+                } else if (o1.getId().equals(o2.getId())) {
+                    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;
+                        }
+                    }
+                } else {
+                    return -1;
+                }
+            }
+        });
+
+        return sortList;
+
+    }
+
+    @Override
+    public void getFeeStationCheckItemScore(FwqStatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
+        List<FwqStatisticsBean> list = getFeeStationCheckItemScore(obj);
+        int totalcheckedCount = 0, totalAll = 0;
+        float lygScore = 0.00f, ycScore = 0.00f, ntScore = 0.00f;
+        int lygCheckNum = 0, ycCheckNum = 0, ntCheckNum = 0;
+        Map<String, Integer> scoreTypeMap = new HashMap<>();
+        List<String> itemAll = commonService.getCheckItemName(28L);
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        // 处理数据
+        for (FwqStatisticsBean st : list) {
+            // id值设置 seq_checked_score
+            // 平均值
+            st.setCheck_score_avg(
+                    (st.getChecked_num() != 0) ? st.getAll_check_score() / (st.getChecked_num() + 0.00f) : 0.00f);
+            for (String i : itemAll) {
+                st.getSeq_checked_score().add(getItemScore2(st, i));
+            }
+            st.setParent_dept_id(deptMap.get(st.getDept_id()).getParentid().longValue());
+            totalcheckedCount += st.getChecked_num();
+            totalAll += st.getAll_check_score();
+            if (st.getParent_dept_id() == 30) {
+                lygScore += st.getAll_check_score();
+                lygCheckNum += st.getChecked_num();
+            }
+            if (st.getParent_dept_id() == 31) {
+                ycScore += st.getAll_check_score();
+                ycCheckNum += st.getChecked_num();
+            }
+            if (st.getParent_dept_id() == 32) {
+                ntScore += st.getAll_check_score();
+                ntCheckNum += st.getChecked_num();
+            }
+            st.setCheck_total_avg("");
+            st.setParent_name("");
+            List<String> names = st.getChecked_socre_name();
+            List<Integer> scores = st.getChecked_score();
+            for (int j = 0; j < names.size(); j++) {
+                Integer score = scoreTypeMap.get(names.get(j));
+                if (score == null) {
+                    score = 0;
+                }
+                score += scores.get(j);
+                scoreTypeMap.put(names.get(j), score);
+            }
+        }
+        boolean lyg = false, yc = false, nt = false;
+        float lygTemp = 0.00f, ycTemp = 0.00f, ntTemp = 0.00f;
+        for (int i = 0; i < list.size(); i++) {
+            if (list.get(i).getParent_dept_id() == 30 && !lyg) {
+                list.get(i).setParent_name(deptMap.get(deptMap.get(list.get(i).getDept_id()).getParentid().longValue()).getOrganname());
+                list.get(i).setCheck_total_avg(String.format("%.2f", lygCheckNum != 0 ? lygScore / (lygCheckNum + 0.00f) : 0.00));
+                lygTemp = lygCheckNum != 0 ? lygScore / (lygCheckNum + 0.00f) : 0.00f;
+                lyg = true;
+            } else if (list.get(i).getParent_dept_id() == 31 && !yc) {
+                list.get(i).setParent_name(deptMap.get(deptMap.get(list.get(i).getDept_id()).getParentid().longValue()).getOrganname());
+                list.get(i).setCheck_total_avg(String.format("%.2f", ycCheckNum != 0 ? ycScore / (ycCheckNum + 0.00f) : 0.00));
+                ycTemp = ycCheckNum != 0 ? ycScore / (ycCheckNum + 0.00f) : 0.00f;
+                yc = true;
+            } else if (list.get(i).getParent_dept_id() == 32 && !nt) {
+                list.get(i).setParent_name(deptMap.get(deptMap.get(list.get(i).getDept_id()).getParentid().longValue()).getOrganname());
+                list.get(i).setCheck_total_avg(String.format("%.2f", ntCheckNum != 0 ? ntScore / (ntCheckNum + 0.00f) : 0.00));
+                ntTemp = ntCheckNum != 0 ? ntScore / (ntCheckNum + 0.00f) : 0.00f;
+                nt = true;
+            }
+        }
+        int lygOrder = 1, ycOrder = 1, ntOrder = 1;
+        for (int i = 0; i < list.size(); i++) {
+            if (!"".equals(list.get(i).getParent_name()) && list.get(i).getParent_dept_id() == 30) {
+                if (lygTemp > ycTemp) {
+                    lygOrder += 1;
+                }
+                if (lygTemp > ntTemp) {
+                    lygOrder += 1;
+                }
+                list.get(i).setFee_station_ranking2(lygOrder);
+            }
+            if (!"".equals(list.get(i).getParent_name()) && list.get(i).getParent_dept_id() == 31) {
+                if (ycTemp > lygTemp) {
+                    ycOrder += 1;
+                }
+                if (ycTemp > ntTemp) {
+                    ycOrder += 1;
+                }
+                list.get(i).setFee_station_ranking2(ycOrder);
+            }
+            if (!"".equals(list.get(i).getParent_name()) && list.get(i).getParent_dept_id() == 32) {
+                if (ntTemp > lygTemp) {
+                    ntOrder += 1;
+                }
+                if (ntTemp > ycTemp) {
+                    ntOrder += 1;
+                }
+                list.get(i).setFee_station_ranking2(ntOrder);
+            }
+        }
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("list", list);
+        map.put("itemList", itemAll);
+        exportExcel("温馨服务检查情况统计表", "fwq_checked_item_info", map, resp);
+    }
+
+    private void exportExcel(String fileName, String excelTemplateName, Map<String, Object> map,
+                             HttpServletResponse resp) {
+        String path = "./" + fileName + ".xls";
+        try (InputStream is = this.getClass().getResourceAsStream("/" + excelTemplateName + ".xls")) {
+            try (OutputStream os = new FileOutputStream(path)) {
+                Context context = new Context();
+                // context.putVar("list", map.get("list"));
+                // context.putVar("totalMan", map.get("totalMan"));
+                for (String key : map.keySet()) {
+                    context.putVar(key, map.get(key));
+                }
+                JxlsHelper.getInstance().processTemplate(is, os, context);
+            }
+            Thread.sleep(1000);
+            // path是指欲下载的文件的路径。
+            File file = new File(path);
+            // 取得文件名。
+            String filename = file.getName();
+            // 以流的形式下载文件。
+            InputStream bis = new BufferedInputStream(new FileInputStream(file));
+            byte[] buffer = new byte[bis.available()];
+            bis.read(buffer);
+            bis.close();
+            // 清空response
+            resp.reset();
+            // 设置response的Header
+            resp.addHeader("Content-Disposition",
+                    "attachment;filename=" + new String(filename.getBytes("gb2312"), "ISO8859-1"));
+            resp.addHeader("Content-Length", "" + file.length());
+            OutputStream toClient = new BufferedOutputStream(resp.getOutputStream());
+            resp.setContentType("application/vnd.ms-excel;charset=gb2312");
+            toClient.write(buffer);
+            toClient.flush();
+            toClient.close();
+            // 删除生成的临时文件
+            if (file.exists()) {
+                file.delete();
+            }
+
+        } catch (Exception e) {
+            logger.error(e.toString());
+        }
+    }
+
+    private Integer getItemScore2(FwqStatisticsBean obj, String name) {
+        List<String> names = obj.getChecked_socre_name();
+        List<Integer> scores = obj.getChecked_score();
+        for (int i = 0; i < names.size(); i++) {
+            if (names.get(i) == null) {
+                continue;
+            }
+            if (names.get(i).contains(name)) {
+                return scores.get(i);
+            }
+        }
+        return 0;
+    }
+}

+ 186 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/TaskServiceImpl.java

@@ -0,0 +1,186 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+/**
+ * 文件名:TaskServiceImpl_F
+ * 版本信息:日期:2017/4/7 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ *
+ * @author wenhongquan
+ * @date 2018/04/11
+ */
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.visualinspection.bean.*;
+import com.xintong.visualinspection.pojo.fwq.CheckAreaData;
+import com.xintong.visualinspection.pojo.fwq.TaskData_F;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.service.TaskService_F;
+import com.xintong.visualinspection.util.Constants;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqTaskDao;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.*;
+
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+public class TaskServiceImpl implements TaskService_F {
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TaskServiceImpl.class);
+
+    @Autowired
+    private FwqTaskDao fwqTaskDao;
+
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+    @Override
+    public Object getAllTask(Integer page, Integer size, FwqCheckTask fwqCheckTasktemp) {
+        if (!(page.equals(0) && size.equals(0))) {
+            PageHelper.startPage(page, size);
+        }
+        if(fwqCheckTasktemp.getCheck_status_arr()!=null){
+            fwqCheckTasktemp.setCheck_status(null);
+        }
+
+        List<FwqCheckTask> fwqCheckTaskList = fwqTaskDao.getall(fwqCheckTasktemp == null ? new FwqCheckTask() : fwqCheckTasktemp);
+
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, User> userMap = commonService.getUserMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+
+        for (FwqCheckTask fwqCheckTask : fwqCheckTaskList
+                ) {
+            if (deptMap.get(fwqCheckTask.getChecked_dept()) != null) {
+                fwqCheckTask.setChecked_dept_name(deptMap.get(fwqCheckTask.getChecked_dept()).getOrganname());
+            }
+            if (userMap.get(fwqCheckTask.getCheckman()) != null) {
+                fwqCheckTask.setCheckman_name(userMap.get(fwqCheckTask.getCheckman()).getTruename());
+            }
+            if (fwqCheckTask.getCheckman() != null) {
+                fwqCheckTask.setCheckman_name(userMap.get(fwqCheckTask.getCheckman()).getTruename());
+            }
+
+            if (fwqCheckTask.getChecked_dept() != null) {
+                if (deptMap.get(fwqCheckTask.getChecked_dept()) != null) {
+                    fwqCheckTask.setChecked_dept_name(deptMap.get(fwqCheckTask.getChecked_dept()).getOrganname());
+                }
+            }
+            if(fwqCheckTask.getRecheckman()!=null){
+                fwqCheckTask.setRecheckman_name(userMap.get(fwqCheckTask.getRecheckman()).getTruename());
+            }
+            if(fwqCheckTask.getAppeal_result()!=null){
+                fwqCheckTask.setAppeal_result_name(codeMap.get("appeal_result" + "_" + fwqCheckTask.getAppeal_result() + "").getCode_name());
+            }
+        }
+
+        if (!(page.equals(0) && size.equals(0))) {
+            return new PageInfo<FwqCheckTask>(fwqCheckTaskList);
+        }
+        return fwqCheckTaskList;
+    }
+
+    @Override
+    public void addTask(FwqCheckTask fwqCheckTask) {
+        fwqTaskDao.addtask(fwqCheckTask);
+    }
+
+    @Override
+    public void updateStatus(FwqCheckTask fwqCheckTask) {
+        fwqTaskDao.updateStatus(fwqCheckTask);
+        //添加状态
+        if (fwqCheckTask.getCheck_status() != null) {
+            TaskStatus taskStatus = new TaskStatus();
+            taskStatus.setCheck_status(fwqCheckTask.getCheck_status());
+            taskStatus.setCheck_status_name((commonService.getCodeMap().get("task_status_" + fwqCheckTask.getCheck_status())).getCode_name());
+            User u = commonService.getUserMap().get((long) fwqCheckTask.getUpdate_user());
+            if (u != null) {
+                taskStatus.setUpdate_username(u.getTruename());
+            }
+            taskStatus.setTask_id((long) fwqCheckTask.getId());
+            fwqTaskDao.insertStatus(taskStatus);
+
+
+        }
+    }
+
+    @Override
+    public FwqCheckTask getTask(FwqCheckTask fwqCheckTask) {
+        return fwqTaskDao.getone(fwqCheckTask);
+    }
+
+    @Override
+    public void addTask(TaskData_F taskData_f) throws Exception {
+        List<CheckAreaData> checkAreaData = taskData_f.getCheckAreaData();
+        List<User> users = taskData_f.getUsers();
+
+        CheckTaskPeriod p = commonService.getCheckTaskPeriod(checkAreaData.get(0).getStart_time().getTime(), checkAreaData.get(0).getEnd_time().getTime());
+        if (p == null) {
+            throw new Exception("所选任务超出当前稽查周期内!");
+        }
+
+        try {
+            //获取列表
+
+            List<FwqCheckTask> tasks = new ArrayList<>();
+            int count = checkAreaData.size() / users.size();
+            int u_index = 0;
+            int index = 0;
+            for (CheckAreaData s : checkAreaData
+                    ) {
+                if (index++ == count) {
+                    u_index++;
+                    if (u_index == users.size()) {
+                        u_index--;
+                    }
+                }
+                try {
+                    FwqCheckTask t = new FwqCheckTask();
+                    t.setName(s.getDeptInfo().getName() + s.getAreaInfo().getName());
+                    t.setCheck_status(Constants.STATUS_ASSIGN);
+                    t.setArea_id(s.getAreaInfo().getId());
+                    t.setStart_time(s.getStart_time());
+                    t.setEnd_time(s.getEnd_time());
+                    t.setCheckman((long) users.get(u_index).getId());
+                    t.setCheckman_name(users.get(u_index).getTruename());
+                    t.setChecked_dept((long) s.getAreaInfo().getDept_id());
+                    t.setUpdate_user((long) taskData_f.getUser_id());
+                    //服务区视频稽查考核办法 id
+                    t.setRule_id(10);
+                    if (p != null && p.getEndtime().getTime() > s.getStart_time().getTime()) {
+                        t.setPeriod_id(p.getId());
+                    }
+                    fwqTaskDao.addtask(t);
+                    TaskStatus taskStatus = new TaskStatus();
+                    taskStatus.setCheck_status(t.getCheck_status());
+                    taskStatus.setCheck_status_name((commonService.getCodeMap().get("task_status_" + t.getCheck_status())).getCode_name());
+                    User u = commonService.getUserMap().get((long) taskData_f.getUser_id());
+                    if (u != null) {
+                        taskStatus.setUpdate_username(u.getTruename());
+                    }
+                    taskStatus.setTask_id((long) t.getId());
+                    fwqTaskDao.insertStatus(taskStatus);
+
+                } catch (Exception e) {
+                    logger.error(e.getMessage());
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
+
+    @Override
+    public List<TaskStatus> getTaskStatusList(Long id) {
+        return fwqTaskDao.getTaskStatusList(id);
+    }
+
+
+}

+ 61 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/java/com/xintong/visualinspection/visuallnspection_qzd/service/impl/ThreadTaskServiceImpl.java

@@ -0,0 +1,61 @@
+package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.visualinspection.bean.CheckTaskPeriod;
+import com.xintong.visualinspection.bean.FwqDeptStatistic;
+import com.xintong.visualinspection.bean.FwqStatisticsBean;
+import com.xintong.visualinspection.service.CommonService;
+import com.xintong.visualinspection.service.ThreadTaskService_F;
+import com.xintong.visualinspection.visuallnspection_qzd.dao.FwqCheckDeptStatisticsDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+
+import java.util.List;
+
+/**
+ * 文件名:ThreadTaskServiceImpl
+ * 版本信息:日期:2018/5/11 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ *
+ * @author huangcheng
+ * @since 2018/5/11
+ */
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
+public class ThreadTaskServiceImpl implements ThreadTaskService_F {
+
+    private static final Logger logger = LoggerFactory.getLogger(ThreadTaskServiceImpl.class);
+
+    @Autowired
+    private FwqCheckDeptStatisticsDao fwqCheckDeptStatisticsDao;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
+
+
+    @Override
+    @Async("threadExecutor")
+    public void saveDeptStatic(List<FwqStatisticsBean> statisticsBos, Long starttime, Long endtime) {
+
+        CheckTaskPeriod period = commonService.getCheckTaskPeriod(starttime, endtime);
+
+        if (period == null) {
+            return;
+        }
+        for (FwqStatisticsBean s : statisticsBos) {
+            FwqDeptStatistic ss = new FwqDeptStatistic();
+            ss.setScore(Double.parseDouble(s.getScore_avg()));
+            ss.setIntegral(statisticsBos.size() - s.getCompany_ranking2() + 1);
+            ss.setDept_id(s.getDept_id());
+            ss.setPeriod_id(period.getId());
+            fwqCheckDeptStatisticsDao.saveandupdate(ss);
+        }
+    }
+}

+ 42 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/application.properties

@@ -0,0 +1,42 @@
+server.port = 9001
+spring.thymeleaf.cache=false
+
+# Base packages to scan Dubbo Components (e.g., @Service, @Reference)
+dubbo.scan.basePackages  =com.xintong.visualinspection.visuallnspection_qzd.service.impl
+
+# Dubbo Config properties
+## ApplicationConfig Bean
+dubbo.application.id = jicha_qzd-provider_consumer
+dubbo.application.name = jicha_qzd-provider_consumer
+
+# ProtocolConfig Bean
+dubbo.protocol.id = dubbo
+dubbo.protocol.name = dubbo
+dubbo.protocol.port = 7683
+dubbo.protocol.status = server
+
+## RegistryConfig Bean
+dubbo.registry.id = qzd_service
+#dubbo.registry.address = zookeeper://git.topm.win:9994
+dubbo.registry.address = zookeeper://127.0.0.1:2181
+dubbo.registry.file = ./output/dubbo1.cache
+dubbo.reference.check=false
+dubbo.consumer.check=false
+
+
+
+#master.datasource.url = jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://xt.wenhq.top:8082/visualinspection_3?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_2?useUnicode=true&characterEncoding=utf-8
+master.datasource.username = root
+master.datasource.password = root
+master.datasource.driver-class-name = com.mysql.jdbc.Driver
+master.mapper-locations=classpath:com/xintong/visualinspection/visuallnspection_qzd/mapper/master/*.xml
+
+
+log.path=./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

BIN
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_checked_item_info.xls


BIN
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_dept_statistic.xls


BIN
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_duty_check.xls


BIN
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_operation_info.xls


BIN
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_other_check_info_anfang.xls


BIN
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/fwq_third_check.xls


+ 36 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/main/resources/logback.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+	<property resource="application.properties" />
+	
+	<logger name="com.roncoo" level="debug" />
+
+	<!-- 控制台设置 -->
+	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+
+	<!-- 文件设置 -->
+	<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 文件路径 -->
+		<file>${log.path}${log.file}.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<!-- 文件名称 -->
+			<fileNamePattern>${log.path}${log.file}.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 文件最大保存历史数量 -->
+			<MaxHistory>${log.maxHistory}</MaxHistory>
+		</rollingPolicy>
+
+		<layout class="ch.qos.logback.classic.PatternLayout">
+			<pattern>${log.pattern}</pattern>
+		</layout>
+	</appender>
+
+	<root level="${log.lever}">
+		<appender-ref ref="CONSOLE" />
+		<appender-ref ref="LOGFILE" />
+	</root>
+	<!-- 打印sql语句 -->
+	<logger name="com.xintong.visualinspection.visuallnspection_qzd.dao" level="DEBUG"></logger>
+</configuration>

+ 16 - 0
Visuallnspection_qzd/visuallnspection_qzd/src/test/java/com/xintong/visualinspection/visuallnspection_qzd/VisuallnspectionFjqApplicationTests.java

@@ -0,0 +1,16 @@
+package com.xintong.visualinspection.visuallnspection_qzd;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class VisuallnspectionFjqApplicationTests {
+
+    @Test
+    public void contextLoads() {
+    }
+
+}