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

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

minitiger 8 лет назад
Родитель
Сommit
ba14bdc1da
29 измененных файлов с 1854 добавлено и 115 удалено
  1. 81 0
      VisualInspection/css/other_check/other_check.css
  2. 1 0
      VisualInspection/js/lib/treeSelect.css
  3. 567 0
      VisualInspection/js/other_check/other_check.js
  4. 2 2
      VisualInspection/js/statistics/appeal.js
  5. 4 2
      VisualInspection/js/statistics/assess_ranking.js
  6. 209 34
      VisualInspection/js/statistics/personal_data_statistics.js
  7. 4 1
      VisualInspection/js/statistics/road_manage_statistics.js
  8. 5 1
      VisualInspection/js/statistics/total_company_statistics.js
  9. 8 3
      VisualInspection/js/user/userManager.js
  10. 10 9
      VisualInspection/js/util/const.js
  11. 134 0
      VisualInspection/view/other_check/data_platform_check.html
  12. 134 0
      VisualInspection/view/other_check/onsite_check.html
  13. 134 0
      VisualInspection/view/other_check/special_check.html
  14. 135 0
      VisualInspection/view/other_check/third_unannounced_check.html
  15. 25 25
      VisualInspection/view/statistics/emp_ranking.html
  16. 6 4
      VisualInspection/view/statistics/personal_data_statistics.html
  17. 53 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckOther.java
  18. 82 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckOtherController.java
  19. 43 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckOtherDao.java
  20. 7 4
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml
  21. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml
  22. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckApplylMapper.xml
  23. 60 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckOtherMapper.xml
  24. 38 20
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  25. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/pojo/UserRankingData.java
  26. 32 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckOtherService.java
  27. 47 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckOtherServiceImpl.java
  28. 23 5
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  29. 6 3
      VisualInspection_server/src/main/resources/application.properties

+ 81 - 0
VisualInspection/css/other_check/other_check.css

@@ -0,0 +1,81 @@
+
+.div-month{
+    width:80px;
+    height:32px;
+    float:left;
+    margin-left: 20px;
+    line-height: 50px;
+}
+.div-roadManage{
+    width:140px;
+    height:50px;
+    float:left;
+    margin-left: 20px;
+    line-height: 50px;
+}
+.div-station{
+    width:120px;
+    height:50px;
+    float:left;
+    margin-left: 20px;
+    line-height: 50px;
+}
+.div-roadManage select{
+    width:140px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}
+.div-station select{
+    width:110px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}
+.div-month select{
+    width:80px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}
+.div-month input{
+    width:80px;
+    height:30px;
+    /*margin-top: 9px;*/
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}
+
+.div-select {
+    width: 130px;
+    height: 32px;
+    float: left;
+    line-height: 50px;
+}
+
+.div-select select {
+    width: 130px;
+    height: 30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+}
+
+.div-month2{
+    width:130px;
+    height:32px;
+    float:left;
+    line-height: 50px;
+}
+
+.div-month2 input{
+    width:130px;
+    height:32px;
+    /*margin-top: 9px;*/
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    font-size: 14px;
+}

+ 1 - 0
VisualInspection/js/lib/treeSelect.css

@@ -7,6 +7,7 @@
     border-top-width: 0;
     z-index: 101;
     background: white;
+    max-height: 200px;
 }
 
 .treeSelect-input {

+ 567 - 0
VisualInspection/js/other_check/other_check.js

@@ -0,0 +1,567 @@
+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 = []; 
+    // 页面初始化
+    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// 分隔符可以任意定义,该例子表示只显示年月日
+        });
+        var road_manager;
+        if (roleContains("STATION")) {
+            road_manager = getCurrentUser().road_manager_id;
+        }
+        if (roleContains("ROAD_MANAGER")) {
+            road_manager = getCurrentUser().organid;
+        }
+        setRoadManagerSelect("#first", road_manager);
+        setSecond();
+
+        // 收费站下拉框
+        var dept;
+        if (roleContains("STATION")) {
+            dept = getCurrentUser().organid;
+        }
+        var roadManager2;
+        if (roleContains("ROAD_MANAGER")) {
+            roadManager2 = getCurrentUser().organid;
+        }
+        var feeList = $.zui.store.get("cache_fee_station_list");
+        if (roadManager2) feeList = cache_road_manager_fee_list_map.get(roadManager2);
+        setFeeSelectValueNoAll(feeList, "#select-dept", dept);
+        setPersonal();
+        var zTreeObj;
+        var zNodes = [];
+        check_item_tree = $.fn.zTree.init($("#check_rule_tree2"), {}, zNodes);
+
+        getCheckItems();
+
+        $("#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);
+        })
+        queryTable();
+    }
+     //关闭弹窗
+    $("#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();
+        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");
+        if(dept_id == null || dept_id == undefined ||dept_id == ""){
+            layer.msg('请选择部门');
+            return;
+        }else if(user_id == null || user_id == undefined ||user_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
+        }
+        if(idUpdate){
+            post_common_service("checkOther/update", data, function(data){
+                file_src = "";
+                imgs_src = [];
+                layer.closeAll();
+                queryTable();
+            }, function(){
+
+            });
+        }else{
+            post_common_service("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("保存");
+        $("#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 queryTable(){
+    $(".datatable").empty();
+    var data = {
+        "check_time_name":$("#month_date").val(),
+        "dept_id":$("#second").val(),
+        "check_type":check_type
+    }
+    var cols = [
+                    {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
+                    {width: 50, text: '时间', flex: false,colClass: '',field:'check_time'},
+                    {width: 50, text: '部门', flex: false,colClass: '',field:'organname'},
+                    {width: 50, text: '人员', flex: false,colClass: '',field:'username'},
+                    {width: 50, text: '扣分类型', flex: false,colClass: '',field:'check_item_name'},
+                    {width: 50, text: '扣分值', flex: false,colClass: '',field:'check_score'},
+                    {width: 120, text: '附件', type: 'imagedd',flex: false,colClass: '',field:'file_ids'},
+                    {width: 50, text: '扣分描述', flex: false,colClass: '',field:'remark'},
+                    {width: 50, text: '操作',  flex: false, colClass: '',field:'id',oper:[
+                        {func:'updateCheckTeam',text:'修改',icon_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',icon_class:'icon-remove-circle'}
+                    ]},
+                ] ;
+    
+    $('.datatable').mytable({'cols':cols,
+                            'url':"checkOther/getCheckByDeptId",
+                            'param':data}
+                            );
+}
+function deleteCheckTeam(id){
+        deleteItem4Common(id,"checkOther/delete",queryTable);
+    }
+function updateCheckTeam(id){
+    check_id = id;
+    data = {
+        "id":id
+    }
+    post_common_service("checkOther/getCheckById", data, function(data){
+        $("#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);
+        $("#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("修改");
+        $("#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")) {
+            $("#first").attr("disabled", "disabled");
+            $("#second").attr("disabled", "disabled");
+        }
+        if (roleContains("ROAD_MANAGER")) {
+            $("#first").attr("disabled", "disabled");
+        }
+    }
+     /**
+     * 根据道管中心获取收费站列表(下拉框)
+     */
+    $(".div-roadManage select").change(function() {
+        setSecond();
+        flag = true;
+    });
+
+    function setSecond() {
+        var select_road = $(".div-roadManage select").val();
+        var feeList = $.zui.store.get("cache_fee_station_list");
+        if (select_road) feeList = cache_road_manager_fee_list_map.get(select_road);
+
+        var dept;
+        if (roleContains("STATION")) {
+            dept = getCurrentUser().organid;
+        }
+        refreshFee(feeList, dept);
+    }
+    function refreshFee(data, selectId) {
+        var sec = document.getElementById('second');
+        var tempStr = ''
+        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() {
+        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;
+                }
+                for (var i = 0; i < data.length; i++) {
+                    for (var j = 33; j <= 53; 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 = '';
+            }
+        }, function(error) {
+            return "";
+        });
+    }
+    // 部门改变后 重新生成人员下拉框
+    $("#select-dept").change(function() {
+        setPersonal();
+    });
+
+    
+    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 getCheckItems() {
+     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
+         }
+     };
+
+     post_common_service("/checkItem/getAll","",function(data){
+        all_data = [];
+        z_cache = 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)
+     },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);
+        }
+        return zdata;
+    } else {
+        return [];
+    }
+}

+ 2 - 2
VisualInspection/js/statistics/appeal.js

@@ -135,8 +135,8 @@ function getTableContent(obj, seq) {
 
 
     var content = "<tr><td width='8%'>" + seq + "</td> <td  width='16%'>" + obj.fee_station_name + "</td> <td  width='16%'>" + GDV(obj.appeal_num, 0) + "&nbsp;&nbsp;&nbsp;" + (GDV(obj.appeal_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",0)'>" + "<i class=\"icon icon-th-list\"></i>" + "</a>") : "") +
-        "</td> <td >" + GDV(obj.appeal_success_num, 0) + "&nbsp;&nbsp;&nbsp;" + (GDV(obj.appeal_success_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",0)'>" + "<i class=\"icon icon-th-list\"></i>" + "</a>") : "") + "</td><td>" +
-        GDV(obj.appeal_fail_num, 0) + "&nbsp;&nbsp;&nbsp;" + (GDV(obj.appeal_fail_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",0)'>" + "<i class=\"icon icon-th-list\"></i>" + "</a>") : "") +
+        "</td> <td >" + GDV(obj.appeal_success_num, 0) + "&nbsp;&nbsp;&nbsp;" + (GDV(obj.appeal_success_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",1)'>" + "<i class=\"icon icon-th-list\"></i>" + "</a>") : "") + "</td><td>" +
+        GDV(obj.appeal_fail_num, 0) + "&nbsp;&nbsp;&nbsp;" + (GDV(obj.appeal_fail_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",2)'>" + "<i class=\"icon icon-th-list\"></i>" + "</a>") : "") +
         "</td> </tr>";
 
     return content;

+ 4 - 2
VisualInspection/js/statistics/assess_ranking.js

@@ -190,9 +190,11 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
             var flag = judgeParamFilter(data, i, score, start_score, end_score, check_number, start_num, end_num)
             if (flag) {
                 html = "";
-                if (hasRole(ROLE_JICHA_ADMIN) || hasRole(ROLE_ADMIN)) {
+                if (hasRole(ROLE_JICHA_ADMIN) || hasRole(ROLE_ADMIN) || hasRole(ROLE_ROAD_MANAGER)) {
                     isshownumber = true;
-                    html += "<button id=\"user_" + data[i].user.id + "\" onClick='addTask(" + data[i].user.id + ",\"" + data[i].user.truename + "\",\"" + data[i].user.fee_station_name + "\",\"" + data[i].checked_num + "\",\"" + param.start_date + "\",\"" + param.end_date + "\")'  class=\"btn\" style='margin-left: 10px;padding: 0px;border: 0;background: none;' type=\"button\"><i class=\"icon icon-plus-sign\"></i></button>"
+                    if (hasRole(ROLE_JICHA_ADMIN)) {
+                        html += "<button id=\"user_" + data[i].user.id + "\" onClick='addTask(" + data[i].user.id + ",\"" + data[i].user.truename + "\",\"" + data[i].user.fee_station_name + "\",\"" + data[i].checked_num + "\",\"" + param.start_date + "\",\"" + param.end_date + "\")'  class=\"btn\" style='margin-left: 10px;padding: 0px;border: 0;background: none;' type=\"button\"><i class=\"icon icon-plus-sign\"></i></button>"
+                    }
                 }
 
                 strTbody += "<tr><td width='4%;'>" + (count + 1) + "</td><td width='6%;'>" + data[i].user.fee_station_name + "</td>" +

+ 209 - 34
VisualInspection/js/statistics/personal_data_statistics.js

@@ -8,6 +8,10 @@ var score_statistics;
 var check_type;
 var cur_status;
 var hide = false;
+
+var array_points = new Array();
+var array_points2 = new Array();
+
 // 默认初始化日期一个月
 $(".div-start input").val(new Date().getFullYear() + "-" + (new Date().getMonth() > 10 ? new Date().getMonth() : "0" + new Date().getMonth()) + "-26");
 $(".div-end input").val(new Date().getFullYear() + "-" + (new Date().getMonth() + 1 > 10 ? new Date().getMonth() + 1 : "0" + (new Date().getMonth() + 1)) + "-25");
@@ -39,8 +43,8 @@ $(function() {
     function queryAppeal(start_date, end_date, user_id) {
 
         $("#station_name").html($("#select-dept").find("option:selected").text())
-        $("#station_user_name").html($("#select-personal").find("option:selected").text())
 
+        $("#station_user_name").html("-")
 
         //请求数据
         var data_t = {
@@ -57,6 +61,14 @@ $(function() {
             $("#l_dept_ranking").html("-");
             $("#l_com_ranking").html("-");
             $("#l_score_ranking").html("-");
+            if (typeof(res.user) != undefined && res.user != null) {
+                $("#station_user_name").html(res.user.position_name)
+            }
+
+
+
+
+
 
             var isshow_c = false;
             var isshow_l = false;
@@ -65,6 +77,7 @@ $(function() {
                 $("#c_dept_ranking").html(p.fee_station_ranking == undefined ? "-" : p.fee_station_ranking);
                 $("#c_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
                 $("#c_score_ranking").html(p.check_all_score + p.check_all_m_score);
+                $("#c_road_ranking").html(p.center_ranking == undefined ? "-" : p.center_ranking);
                 isshow_c = true;
             }
             if (typeof(res.lastP) != undefined && res.lastP != null) {
@@ -72,6 +85,7 @@ $(function() {
                 $("#l_dept_ranking").html(p.fee_station_ranking == undefined ? "-" : p.fee_station_ranking);
                 $("#l_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
                 $("#l_score_ranking").html(p.check_all_score + p.check_all_m_score);
+                $("#l_road_ranking").html(p.center_ranking == undefined ? "-" : p.center_ranking);
                 isshow_l = true;
             }
 
@@ -87,6 +101,10 @@ $(function() {
                     if (com_r != 0) {
                         $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "green") + "' 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" : "green") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
+                    }
                 }
             }
         }, function(error) {})
@@ -239,14 +257,48 @@ $(function() {
                 array_year_score.length = 0;
             }
         } else if (type == 2) {
-            array_check_type.length = 0;
+            array_points = new Array();
+            array_points2 = new Array();
+            var map = new HashMap();
+
             if (data.length != 0) {
                 for (var i = 0; i < data.length; i++) {
-                    array_check_type.push({ "value": data[i].all_check_score, "name": data[i].name });
+                    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].checked_name + ($("#select-personal").val() == data[i].user_id ? "" : "(组员)") + " " + data[i].name, "itemStyle": { "normal": { "color": getchildColor(data[i].name, i).hexStr() } } });
                 }
-            } else {
-                array_check_type.length = 0;
             }
+            map.forEach(function(value, key) {
+                array_points.push({ "value": value, "name": key, "itemStyle": { "normal": { "color": getColor(key).hexStr() } } });
+            });
+
+
+
+
+
+
+
+
+
+            // 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' } } });
+
+
+            // array_points2.push({ "value": temp[0], "name": '连云港道管', "itemStyle": { "normal": { "color": '#7BCCB5' } } });
+            // array_check_type.length = 0;
+            // if (data.length != 0) {
+            //     for (var i = 0; i < data.length; i++) {
+            //         array_check_type.push({ "value": data[i].all_check_score, "name": data[i].name });
+            //     }
+            // } else {
+            //     array_check_type.length = 0;
+            // }
         }
     }
 
@@ -439,10 +491,67 @@ $(function() {
      * 图二
      */
     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,
+        //         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 }
+        //             }
+        //         }
+        //     }]
+        // };
+
+
         option = {
             tooltip: {
                 trigger: 'item',
-                formatter: "个人服务检查问题占比 <br/>{b} : {c}分 ({d}%)"
+                formatter: "个人温馨服务检查问题类别占比 <br/>{b} : {c}分 ({d}%)"
             },
             noDataLoadingOption: {
                 text: '暂无数据',
@@ -460,40 +569,69 @@ $(function() {
             },
             toolbox: {
                 show: true,
-                feature: {
-
-                    magicType: {
+            },
+            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'
+                                }
 
-                        type: ['pie', 'funnel'],
-                        option: {
-                            funnel: {
-                                x: '25%',
-                                width: '50%',
-                                funnelAlign: 'left',
-                                max: 1548
                             }
                         }
                     },
+                    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
                 }
-            },
-            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;
     }
 
@@ -507,4 +645,41 @@ function setVisit() {
     if (hasRole("ROLE_STATION")) {
         $("#select-personal").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;
 }

+ 4 - 1
VisualInspection/js/statistics/road_manage_statistics.js

@@ -502,6 +502,9 @@ $(function() {
                 array_check_type.length = 0;
             }
         } else if (type == 7) {
+            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;
@@ -814,7 +817,7 @@ $(function() {
                             },
                             labelLine: {
                                 show: true,
-                                length: 80,
+                                length: 50,
                                 lineStyle: {
                                     color: '#888'
                                 }

+ 5 - 1
VisualInspection/js/statistics/total_company_statistics.js

@@ -382,6 +382,10 @@ $(function() {
                 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;
@@ -740,7 +744,7 @@ $(function() {
                             },
                             labelLine: {
                                 show: true,
-                                length: 80,
+                                length: 50,
                                 lineStyle: {
                                     color: '#888'
                                 }

+ 8 - 3
VisualInspection/js/user/userManager.js

@@ -146,7 +146,7 @@
 
              var userId = this.id;
              var user = UserMap.get(parseInt(userId));
-             
+
              layer.confirm('您确定要删除 "' + user.truename + '" ?', {
                  offset: offset,
                  shade: 0,
@@ -164,7 +164,7 @@
 
                      })
              }, function(index) {
-                layer.close(index);
+                 layer.close(index);
              });
          }
 
@@ -335,7 +335,7 @@
                      if (!roleContains("STATION")) {
                          btns += '<button class="btn btn-primary btn-sm" name="user_delete" id=' + user.id + ' ><i class="icon icon-remove-circle"></i>删除</button>';
                      }
-                     userdata["data"] = [i + 1, user.username, user.truename, user.workno == null ? -1 : user.workno, user.mobile == null ? "" : user.mobile, attr, btns];
+                     userdata["data"] = [i + 1, user.username, user.truename, stringlimit(user.workno == null ? -1 : user.workno, 6), stringlimit(user.mobile == null ? "" : user.mobile, 4), attr, btns];
                      rowdata.push(userdata);
                  }
              }
@@ -349,4 +349,9 @@
          function(error) {
 
          });
+ }
+
+ function stringlimit(string, linmit) {
+     if (string.length < linmit) return string;
+     return string.substr(0, linmit / 2) + "..." + string.substr(string.length - linmit / 2, linmit / 2)
  }

+ 10 - 9
VisualInspection/js/util/const.js

@@ -53,12 +53,13 @@ var VIDEO_GET_ID = "/webcam/getVideoById/"
 var FILE_UPLOAD = "/file/upload"
 
 
-var CURRENT_PAGE_URL="-1";
-
-var ROLE_JICHA_ADMIN="ROLE_JICHA_ADMIN";
-var ROLE_STATION_ADMIN="ROLE_STATION_ADMIN";
-var ROLE_STATION="ROLE_STATION";
-var ROLE_JICHA="ROLE_JICHA";
-var ROLE_MANAGER="ROLE_MANAGER";
-var ROLE_STATION_AGENT="ROLE_STATION_AGENT";
-var ROLE_ADMIN ="ROLE_ADMIN";
+var CURRENT_PAGE_URL = "-1";
+
+var ROLE_JICHA_ADMIN = "ROLE_JICHA_ADMIN";
+var ROLE_STATION_ADMIN = "ROLE_STATION_ADMIN";
+var ROLE_STATION = "ROLE_STATION";
+var ROLE_JICHA = "ROLE_JICHA";
+var ROLE_MANAGER = "ROLE_MANAGER";
+var ROLE_STATION_AGENT = "ROLE_STATION_AGENT";
+var ROLE_ADMIN = "ROLE_ADMIN";
+var ROLE_ROAD_MANAGER = "ROLE_ROAD_MANAGER";

+ 134 - 0
VisualInspection/view/other_check/data_platform_check.html

@@ -0,0 +1,134 @@
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+        <div class="row">
+             <div>
+                <div class="div-month">
+                    <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+                 </div>
+                 <div class="div-roadManage">
+                    <select class="form-control" id="first"></select>
+                </div>
+                <div class="div-station">
+                    <select class="form-control" id="second"></select>
+                </div>
+
+               <div class="col-xs-3">
+                    <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-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</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 = 4;
+        init();
+    });
+</script>

+ 134 - 0
VisualInspection/view/other_check/onsite_check.html

@@ -0,0 +1,134 @@
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+        <div class="row">
+             <div>
+                <div class="div-month">
+                    <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+                 </div>
+                 <div class="div-roadManage">
+                    <select class="form-control" id="first"></select>
+                </div>
+                <div class="div-station">
+                    <select class="form-control" id="second"></select>
+                </div>
+
+               <div class="col-xs-3">
+                    <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-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</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 = 3;
+        init();
+    });
+</script>

+ 134 - 0
VisualInspection/view/other_check/special_check.html

@@ -0,0 +1,134 @@
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+        <div class="row">
+             <div>
+                <div class="div-month">
+                    <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+                 </div>
+                 <div class="div-roadManage">
+                    <select class="form-control" id="first"></select>
+                </div>
+                <div class="div-station">
+                    <select class="form-control" id="second"></select>
+                </div>
+
+               <div class="col-xs-3">
+                    <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-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</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 = 2;
+        init();
+    });
+</script>

+ 135 - 0
VisualInspection/view/other_check/third_unannounced_check.html

@@ -0,0 +1,135 @@
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+        <div class="row">
+             <div>
+                <div class="div-month">
+                    <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+                 </div>
+                 <div class="div-roadManage">
+                    <select class="form-control" id="first"></select>
+                </div>
+                <div class="div-station">
+                    <select class="form-control" id="second"></select>
+                </div>
+
+               <div class="col-xs-3">
+                    <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-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</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 = 1;
+        init();
+    });
+</script>
+

+ 25 - 25
VisualInspection/view/statistics/emp_ranking.html

@@ -74,36 +74,36 @@
                 <table border="1" width="100%" align="center">
                     <thead class="table-thead" align="center">
                         <tr>
-                            <th rowspan="2" width="4%;">序号</th>
-                            <th rowspan="2" width="6%">站名</th>
-                            <th rowspan="2" width="6%">姓名</th>
-                            <th rowspan="2" width="6%">岗位</th>
-                            <th rowspan="2" width="7%">工号</th>
-                            <th rowspan="2" width="4%">公司排名</th>
-                            <th rowspan="2" width="4%">道管排名</th>
-                            <th rowspan="2" width="4%">收费站排名</th>
-                            <th colspan="9" height="40px">考核扣分</th>
-                            <th rowspan="2" width="6%">受检次数
+                            <th rowspan="2" width="4%;" id='th_1'>序号</th>
+                            <th rowspan="2" width="6%" id='th_2'>站名</th>
+                            <th rowspan="2" width="6%" id='th_3'>姓名</th>
+                            <th rowspan="2" width="6%" id='th_4'>岗位</th>
+                            <th rowspan="2" width="7%" id='th_5'>工号</th>
+                            <th rowspan="2" width="4%" id='th_6'>公司排名</th>
+                            <th rowspan="2" width="4%" id='th_7'>道管排名</th>
+                            <th rowspan="2" width="4%" id='th_8'>收费站排名</th>
+                            <th colspan="9" height="40px" id='th_9'>考核扣分</th>
+                            <th rowspan="2" width="6%" id='th_10'>受检次数
                                 <div class="switch switch-inline hidden" id="show_check_div" data-toggle="tooltip" data-placement="right" title="收费站是否显示该列数据">
                                     <input type="checkbox" id="show_check" onchange="show_check_fun()">
                                     <label style="color: #000;" id="show_check_text">显示</label>
                                 </div>
                             </th>
-                            <th rowspan="2" width="4%">平均扣分(千分制)</th>
-                            <th rowspan="2" width="4%">得分</th>
-                            <th rowspan="2" width="4%">服务评价</th>
-                            <th rowspan="2" width="4%">备注</th>
+                            <th rowspan="2" width="4%" id='th_11'>平均扣分(千分制)</th>
+                            <th rowspan="2" width="4%" id='th_12'>得分</th>
+                            <th rowspan="2" width="4%" id='th_13'>服务评价</th>
+                            <th rowspan="2" width="4%" id='th_14'>备注</th>
                         </tr>
                         <tr>
-                            <th width="4%">环境卫生</th>
-                            <th width="4%">仪容仪表</th>
-                            <th width="4%">表情</th>
-                            <th width="4%">收费动作</th>
-                            <th width="4%">文明用语</th>
-                            <th width="4%">工作纪律</th>
-                            <th width="4%">便民服务</th>
-                            <th width="4%">安全管理</th>
-                            <th width="4%">扣分合计</th>
+                            <th width="4%" id='th_9_1'>环境卫生</th>
+                            <th width="4%" id='th_9_2'>仪容仪表</th>
+                            <th width="4%" id='th_9_3'>表情</th>
+                            <th width="4%" id='th_9_4'>收费动作</th>
+                            <th width="4%" id='th_9_5'>文明用语</th>
+                            <th width="4%" id='th_9_6'>工作纪律</th>
+                            <th width="4%" id='th_9_7'>便民服务</th>
+                            <th width="4%" id='th_9_8'>安全管理</th>
+                            <th width="4%" id='th_9_9'>扣分合计</th>
                         </tr>
                     </thead>
                     <!-- <tbody class="table-tbody" style="background:white; " align="center">
@@ -113,11 +113,11 @@
             </div>
         </div>
         <div id="scrollTable" style="height:300px;overflow:scroll;">
-                <table style="border-top:0;" border="1" width="100%"  align="center">
+            <table style="border-top:0;" border="1" width="100%" align="center">
                 <tbody class="table-tbody" style="background:white; " align="center">
 
                 </tbody>
-                </table>
+            </table>
         </div>
     </div>
 </div>

+ 6 - 4
VisualInspection/view/statistics/personal_data_statistics.html

@@ -46,16 +46,18 @@
         <div class="line-5"></div>
         <div class="current-month">
             <span style="margin-left:20px;">本月:</span>
-            <span style="margin-left:50px;">部门排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_dept_ranking">-</span>
-            <span>总排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_com_ranking">-</span>
+            <span style="margin-left:50px;">站内排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_dept_ranking">-</span>
+            <span>道管排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_road_ranking">-</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"></div>
         <div class="next-month">
             <span style="margin-left:20px;">上月:</span>
-            <span style="margin-left:50px;">部门排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_dept_ranking">-</span>
-            <span>总排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_com_ranking">-</span>
+            <span style="margin-left:50px;">站内排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_dept_ranking">-</span>
+            <span>道管排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_road_ranking">-</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>

+ 53 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckOther.java

@@ -0,0 +1,53 @@
+package com.xintong.visualinspection.bean;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class CheckOther {
+	//编号
+    private Long id;
+    // 部门id
+    private Long dept_id;
+    // 稽查人员id
+    private Long user_id;
+    // 稽查人id
+    private Long check_person_id;
+    // 扣分值
+    private Long check_score;
+    // 考核项id
+    private Long check_item_id;
+    // 扣分描述
+    private String remark;
+    // 稽查类型 页面1,2,3,4
+    private Integer check_type;
+    // 附件ids
+    private String file_ids;
+    //稽查时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8") 
+    private Date check_time;
+    // 稽查次数
+    private Integer check_num;
+    //稽查月份名称 年/月
+    private String check_time_name;
+    // 删除标记
+    private Integer delete_flag;
+    // 更新时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date update_time;
+    // 部门名称
+    private String organname;
+    // 人员名称
+    private String username;
+    // 扣分类型名
+    private String check_item_name;
+}

+ 82 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckOtherController.java

@@ -0,0 +1,82 @@
+package com.xintong.visualinspection.controller;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.CheckAppeal;
+import com.xintong.visualinspection.bean.CheckOther;
+import com.xintong.visualinspection.bean.Task;
+import com.xintong.visualinspection.bean.Team;
+import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.service.CheckOtherService;
+import com.xintong.visualinspection.util.Constants;
+
+/**
+ * 文件名:CheckItemController 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation
+ * 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/checkOther")
+public class CheckOtherController extends BaseController {
+
+	@Autowired
+	private CheckOtherService checkOtherService;
+
+	/**添加其他稽查查记录
+	 * @param request
+	 * @param checkOther
+	 * @return
+	 */
+	@RequestMapping(value = "/add")
+	public String add(HttpServletRequest request, @Valid @RequestBody CheckOther checkOther) {
+		checkOtherService.insert(checkOther);
+		return super.returnSuccessResult("添加成功");
+	}
+	/**根据id删除稽查记录
+	 * @param checkOther
+	 * @return
+	 */
+	@RequestMapping(value = "/delete")
+    public String delete(@RequestBody CheckOther checkOther){
+    	checkOtherService.delete(checkOther.getId());
+    	return super.returnSuccessResult("删除成功");
+    }
+	@RequestMapping(value = "/update")
+    public String update(@RequestBody CheckOther checkOther){
+    	checkOtherService.update(checkOther);
+    	return super.returnSuccessResult("修改成功");
+    }
+	/**根据id获取稽查记录
+	 * @param checkOther
+	 * @return
+	 */
+	@RequestMapping(value = "/getCheckById")
+    public String getCheckById(@RequestBody CheckOther checkOther){
+    	CheckOther check =checkOtherService.getCheckById(checkOther.getId());
+    	return super.returnSuccessResult(check);
+    }
+	
+	/**根据dept_id 获取稽查记录
+	 * @param checkOther
+	 * @param page
+	 * @param size
+	 * @return
+	 */
+	@RequestMapping(value = "/getCheckByDeptId/{page}/{size}")
+    public String getCheckByDeptId(@RequestBody CheckOther checkOther,@PathVariable Integer page,@PathVariable Integer size){
+    	PageHelper.startPage(page, size);
+    	List<CheckOther> checkOtherList = checkOtherService.getCheckByDeptId(checkOther);
+    	return super.returnSuccessResult(new PageInfo(checkOtherList));
+    }
+}

+ 43 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckOtherDao.java

@@ -0,0 +1,43 @@
+package com.xintong.visualinspection.dao.master;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.xintong.visualinspection.bean.CheckAppeal;
+import com.xintong.visualinspection.bean.CheckOther;
+
+/**
+ * 文件名:CheckOtherDao
+ * 版本信息:日期:2017/8/11 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Mapper
+public interface CheckOtherDao  {
+
+	/**添加稽查记录
+	 * @param checkOther
+	 */
+	void insert(CheckOther checkOther);
+
+	/**根据条件查询稽查记录
+	 * @param checkOther
+	 * @return
+	 */
+	List<CheckOther> getCheckByDeptId(CheckOther checkOther);
+
+	/**根据id删除稽查记录
+	 * @param id
+	 */
+	void delete(Long id);
+
+	/**根据id获取稽查记录
+	 * @param id
+	 */
+	CheckOther getCheckById(Long id);
+
+	/**根据id修改稽查记录
+	 * @param id
+	 */
+	void update(CheckOther checkOther);
+    
+}

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

@@ -15,6 +15,7 @@
         <result column="workno" property="workno" jdbcType="VARCHAR" />
         <result column="fee_station_name" property="fee_station_name" jdbcType="VARCHAR" />
         <result column="delete_time" property="delete_time" jdbcType="DATE" />
+        <result column="position_name" property="position_name" jdbcType="VARCHAR" />
     </resultMap>
     <resultMap id="userMap" type="com.xintong.visualinspection.bean.User">
         <id property="id" column="ID"/>
@@ -28,6 +29,7 @@
         <result property="pic" column="pic" jdbcType="VARCHAR"/>
         <result column="workno" property="workno" jdbcType="VARCHAR" />
         <result column="delete_time" property="delete_time" jdbcType="DATE" />
+        <result column="position_name" property="position_name" jdbcType="VARCHAR" />
         <collection property="roles" ofType="com.xintong.visualinspection.bean.Role">
             <result column="name" property="name"/>
         </collection>
@@ -48,13 +50,14 @@
         <result column="fee_station_name" property="fee_station_name" jdbcType="VARCHAR" />
         <result column="delete_time" property="delete_time" jdbcType="DATE" />
         <result column="invalidtime" property="invalidtime" jdbcType="VARCHAR" />
+        <result column="position_name" property="position_name" jdbcType="VARCHAR" />
     </resultMap>
 
 
     <select id="getAll" resultMap="BaseResultMap"  >
         SELECT
-        *
-        FROM t_sys_users
+        a.*,(select NAME from  sys_job where id = a.POSITIONID ) as position_name
+        FROM t_sys_users a
     </select>
 
     <select id="getOne" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
@@ -66,7 +69,7 @@
 
 	<select id="getOneDetail" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
         SELECT
-        t.* ,  fs.name AS fee_station_name
+        t.* ,  fs.name AS fee_station_name,(select NAME from  sys_job where id = t.POSITIONID ) as position_name
         FROM t_sys_users t
         LEFT JOIN t_br_layer_fee_station fs ON t.organid = fs.organ_id
         WHERE t.id = #{id} 
@@ -111,7 +114,7 @@
 
 
     <select id="findByUserName" parameterType="String" resultMap="userMap">
-        select u.*,o.parentid as road_manager_id
+        select u.*,o.parentid as road_manager_id,(select NAME from  sys_job where id = u.POSITIONID ) as position_name
         from t_sys_users u left join t_sys_organ o on u.organid=o.id
         where username= #{username} and u.status >0
     </select>

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

@@ -40,7 +40,7 @@
         </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 ca.appeal_time DESC
+        ORDER BY ct.start_time DESC
     </select>
 
     <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >

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

@@ -40,7 +40,7 @@
 	            #{apply_id}
 	        </foreach>
        	</if>
-        ORDER BY ca.apply_time DESC
+        ORDER BY ct.start_time DESC
     </select>
 
     <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >

+ 60 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckOtherMapper.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xintong.visualinspection.dao.master.CheckOtherDao">
+
+	<insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckOther">
+		INSERT INTO
+		other_check
+		(dept_id,user_id,check_person_id,check_score,check_item_id,remark,check_type,file_ids,check_num,check_time,check_time_name,update_time)
+		VALUES
+		(#{dept_id},#{user_id},#{check_person_id},#{check_score},#{check_item_id},#{remark},#{check_type},#{file_ids},#{check_num},#{check_time},#{check_time_name},now())
+	</insert>
+	
+	<select id="getCheckByDeptId" parameterType="com.xintong.visualinspection.bean.CheckOther"
+	resultType="com.xintong.visualinspection.bean.CheckOther" >
+       SELECT
+		o.id,o.dept_id,o.user_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 , t.ORGANNAME organname,u.TRUENAME  username,c.name check_item_name
+		FROM
+			(SELECT * FROM other_check
+			where 1=1 and 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>
+			)o
+		LEFT JOIN t_sys_organ t ON o.dept_id = t.id
+		LEFT JOIN t_sys_users u ON o.user_id = u.id
+		LEFT JOIN check_item c ON o.check_item_id = c.id
+    </select>
+    <select id="getCheckById" parameterType="java.lang.Long" resultType="com.xintong.visualinspection.bean.CheckOther" >
+        SELECT o.id,o.dept_id,o.user_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,c.name check_item_name
+        FROM other_check o
+        LEFT JOIN check_item c ON o.check_item_id = c.id
+        WHERE o.id = #{id}
+    </select>
+    
+    <update id="update" parameterType="com.xintong.visualinspection.bean.CheckOther" >
+        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_num != null">,check_num = #{check_num}</if>
+        WHERE
+        id = #{id}
+    </update>
+
+    <delete id="delete" parameterType="java.lang.Long" >
+        DELETE FROM
+        other_check
+        WHERE
+        id =#{id}
+    </delete>
+</mapper>

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

@@ -58,7 +58,7 @@
          
     <select id="selectMList"  parameterType="com.xintong.visualinspection.pojo.TaskAndScore" resultType="com.xintong.visualinspection.pojo.TaskAndScore">
    
-	    SELECT * from check_task a LEFT JOIN check_score b on a.id=b.task_id where
+	    SELECT a.*,b.id as id1 ,b.update_time as update_time1,b.content,b.pics,b.videos,b.task_id,b.check_item_id,b.checkman as checkman1,b.checked_person as checked_person1 ,b.checked_dept as checked_dept1,b.remark as remark1,b.check_item_score  from check_task a LEFT JOIN check_score b on a.id=b.task_id where
 	          a.monitor_user_id != -1 and a.monitor_user_id != 0 and 
 	       a.start_time &gt;= #{start_time} and a.end_time &lt; #{end_time} and a.check_status !=22 and a.id not in <include refid="taskexclouddeleteUser"/>
 	    
@@ -460,24 +460,34 @@
      </select>
      
      <select id="selectOneCheckedItemInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
-     	SELECT count(DISTINCT m.task_id) AS checked_num , sum(m.check_item_score) AS all_check_score , m.parent_id,m.check_item_name AS name FROM check_task t INNER JOIN
-		(
-			select ci.name AS check_item_name , t.* FROM
-			(  SELECT ci.parent_id, t.* from check_score t LEFT JOIN check_item  ci ON t.check_item_id = ci.id
-				WHERE 1=1
-				AND checked_person = #{user_id}
-			 ) t 
-			LEFT JOIN check_item ci ON t.parent_id = ci.id
-			) m ON t.id = m.task_id
-			where t.check_status !=22 and t.id not in <include refid="taskexclouddeleteUser"/>
-			<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 m.parent_id
-     
+
+         select a.*,(select truename from t_sys_users where id = a.user_id LIMIT 1 ) as checked_name from (
+
+         SELECT
+         count(DISTINCT t.id) AS checked_num ,
+         sum(cs.check_item_score) AS all_check_score ,
+         (select parent_id from check_item where check_item.id = cs.check_item_id LIMIT 1) as parent_id,
+         ( select name from check_item where id = (select parent_id from check_item where check_item.id = cs.check_item_id LIMIT 1)) AS NAME,
+         t.checked_person as user_id
+         FROM
+         check_task t
+
+         left join  check_score cs on (cs.task_id = t.id )
+
+         WHERE
+         t.check_status != 22 and t.id not in <include refid="taskexclouddeleteUser"/> and (t.checked_person = #{user_id} or t.monitor_user_id = #{user_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
+         parent_id,user_id
+
+         ) a where a.all_check_score is not null
+
      </select>
      
      <select id="selectOneCheckedDetailInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
@@ -487,7 +497,15 @@
            ,cst.update_time,t.id as task_id
          </if>
 
-         FROM v_check_task t
+         FROM
+         <if test="queryType!=null and queryType==0">
+             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">

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/pojo/UserRankingData.java

@@ -1,6 +1,7 @@
 package com.xintong.visualinspection.pojo;
 
 import com.xintong.visualinspection.bean.StatisticsBo;
+import com.xintong.visualinspection.bean.User;
 import lombok.Data;
 
 /**
@@ -11,4 +12,5 @@ import lombok.Data;
 public class UserRankingData {
     private StatisticsBo lastP;
     private StatisticsBo currentP;
+    private User user;
 }

+ 32 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/CheckOtherService.java

@@ -0,0 +1,32 @@
+package com.xintong.visualinspection.service;
+
+import java.util.List;
+
+import com.xintong.visualinspection.bean.CheckOther;
+
+public interface CheckOtherService {
+
+	/**添加稽查记录
+	 * @param checkOther
+	 */
+	void insert(CheckOther checkOther);
+	/**根据id删除稽查记录
+	 * @param checkOther
+	 */
+	void delete(Long id);
+
+	/**根据部门id获取稽查记录
+	 * @param checkOther
+	 * @return
+	 */
+	List<CheckOther> getCheckByDeptId(CheckOther checkOther);
+	/**根据id获取稽查记录
+	 * @param id
+	 */
+	CheckOther getCheckById(Long id);
+	/**根据id修改稽查记录
+	 * @param id
+	 */
+	void update(CheckOther checkOther);
+
+}

+ 47 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/CheckOtherServiceImpl.java

@@ -0,0 +1,47 @@
+package com.xintong.visualinspection.service.impl;
+
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.xintong.visualinspection.bean.CheckOther;
+import com.xintong.visualinspection.dao.master.CheckOtherDao;
+import com.xintong.visualinspection.service.BaseService;
+import com.xintong.visualinspection.service.CheckOtherService;
+
+/**
+ * 文件名:CheckOtherServiceImpl
+ * 版本信息:日期:2017/8/11 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Service
+public class CheckOtherServiceImpl  extends BaseService implements CheckOtherService{
+
+	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CheckOtherServiceImpl.class);
+
+	@Autowired
+	private CheckOtherDao checkOtherDao;
+	@Override
+	public void insert(CheckOther checkOther) {
+		checkOtherDao.insert(checkOther);
+	}
+	@Override
+	public List<CheckOther> getCheckByDeptId(CheckOther checkOther) {
+		List<CheckOther> checkOtherList = checkOtherDao.getCheckByDeptId(checkOther);
+		return checkOtherList;
+	}
+	@Override
+	public void delete(Long id) {
+		checkOtherDao.delete(id);
+	}
+	@Override
+	public CheckOther getCheckById(Long id) {
+		CheckOther checkOther = checkOtherDao.getCheckById(id);
+		return checkOther;
+	}
+	@Override
+	public void update(CheckOther checkOther) {
+		checkOtherDao.update(checkOther);
+	}
+}

+ 23 - 5
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -97,6 +97,8 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
                 break;
             }
         }
+
+        data.setUser(CacheUtil.getUserFromMap(obj.getUser_id()));
 	    return data;
     }
 
@@ -170,11 +172,14 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			// 班长扣分加上成员的扣分
 			for (TaskAndScore s : taskAndScores) {
 				if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue()
-						&& s.getCheck_item_score() != null) {
+						&& s.getCheck_item_score() != null && ((s.getChecked_person1()==null && s.getChecked_person().intValue() != s.getMonitor_user_id().intValue())
+                        ||(s.getChecked_person1()!=null && s.getChecked_person1().intValue() !=s.getMonitor_user_id().intValue()))) {
 					b.setCheck_all_m_score(b.getCheck_all_m_score() + s.getCheck_item_score());
 				}
 
-				if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue()) {
+				if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue() &&
+                        ((s.getChecked_person1()==null && s.getChecked_person().intValue() != s.getMonitor_user_id().intValue())
+                                ||(s.getChecked_person1()!=null && s.getChecked_person1().intValue() !=s.getMonitor_user_id().intValue()))) {
 					b.setChecked_m_num(b.getChecked_m_num() + 1);
 				}
 			}
@@ -1717,7 +1722,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 					} else if (subObj.getAppeal_result() == 1) {
 						reObj.setAppeal_success_num(subObj.getAppeal_num());
 					} else {
-						reObj.setAppeal_fail_num(subObj.getAppeal_fail_num());
+						reObj.setAppeal_fail_num(subObj.getAppeal_num());
 					}
 				}
 				reObj.setAppeal_num(appeal_num);
@@ -1787,8 +1792,21 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
         		masterMap.put(score.getMonitor_user_id(), new StatisticsBo());
         	}
         	StatisticsBo sb = masterMap.get(score.getMonitor_user_id());
-        	sb.setCheck_all_m_score(sb.getCheck_all_m_score()+(score.getCheck_item_score()==null?0:score.getCheck_item_score()));
-        	sb.setChecked_m_num(sb.getChecked_m_num()+1);
+
+
+            if (score.getCheck_item_score() != null && ((score.getChecked_person1()==null && score.getChecked_person().intValue() != score.getMonitor_user_id().intValue())
+                    ||(score.getChecked_person1()!=null && score.getChecked_person1().intValue() !=score.getMonitor_user_id().intValue()))) {
+                sb.setCheck_all_m_score(sb.getCheck_all_m_score() + score.getCheck_item_score());
+            }
+
+            if (((score.getChecked_person1()==null && score.getChecked_person().intValue() != score.getMonitor_user_id().intValue())
+                    ||(score.getChecked_person1()!=null && score.getChecked_person1().intValue() !=score.getMonitor_user_id().intValue())) ) {
+                sb.setChecked_m_num(sb.getChecked_m_num() + 1);
+            }
+//
+//
+//        	sb.setCheck_all_m_score(sb.getCheck_all_m_score()+(score.getCheck_item_score()==null?0:score.getCheck_item_score()));
+//        	sb.setChecked_m_num(sb.getChecked_m_num()+1);
         }
         return masterMap;
     }

+ 6 - 3
VisualInspection_server/src/main/resources/application.properties

@@ -3,7 +3,8 @@ spring.thymeleaf.cache=false
 context.listener.classes=com.xintong.SystemInit
 
 #master.datasource.url = jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf-8
-master.datasource.url = jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf-8
+#master.datasource.url = jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
 #master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
 master.datasource.username = root
 master.datasource.password = root
@@ -12,7 +13,8 @@ master.mapper-locations=classpath:com/xintong/visualinspection/mapper/master/*.x
 
 ## \u7528\u6237\u6570\u636E\u6E90\u914D\u7F6E
 #cluster.datasource.url=jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf8
-cluster.datasource.url=jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf8
+#cluster.datasource.url=jdbc:mysql://git.topm.win:6400/visualinspection?useUnicode=true&characterEncoding=utf8
+cluster.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
 #cluster.datasource.url=jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf8
 cluster.datasource.username=root
 cluster.datasource.password=root
@@ -60,7 +62,8 @@ spring.redis.host=git.topm.win
 #spring.redis.port=6379
 
 #spring.redis.port=7003
-spring.redis.port=6401
+#spring.redis.port=6401
+spring.redis.port=6380
 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
 spring.redis.password=xintong
 # \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09