温红权 před 8 roky
rodič
revize
6536627ba0
55 změnil soubory, kde provedl 2969 přidání a 329 odebrání
  1. 63 0
      VisualInspection/fwq/js/appeal_management/appeal_checked.js
  2. 242 0
      VisualInspection/fwq/js/appeal_management/appeal_list.js
  3. 60 0
      VisualInspection/fwq/js/appeal_management/appeal_submited.js
  4. 6 0
      VisualInspection/fwq/js/task/add.js
  5. 192 0
      VisualInspection/fwq/js/task/apply_task.js
  6. 64 201
      VisualInspection/fwq/js/task/check.js
  7. 56 0
      VisualInspection/fwq/js/task/checked.js
  8. 62 7
      VisualInspection/fwq/js/task/task_list.js
  9. 71 0
      VisualInspection/fwq/view/appeal_management/appealDetail.html
  10. 23 0
      VisualInspection/fwq/view/appeal_management/appealEdit.html
  11. 72 0
      VisualInspection/fwq/view/appeal_management/appeal_checked.html
  12. 60 0
      VisualInspection/fwq/view/appeal_management/appeal_list.html
  13. 65 0
      VisualInspection/fwq/view/appeal_management/appeal_submited.html
  14. 23 0
      VisualInspection/fwq/view/task/applyDetail.html
  15. 55 0
      VisualInspection/fwq/view/task/apply_task.html
  16. 22 47
      VisualInspection/fwq/view/task/check.html
  17. 64 0
      VisualInspection/fwq/view/task/checked.html
  18. 27 0
      VisualInspection/fwq/view/task/scoreDetail.html
  19. 2 9
      VisualInspection/fwq/view/task/taskDetail.html
  20. 12 0
      VisualInspection/js/util/util.js
  21. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/AreaInfoController_F.java
  22. 162 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/CheckAppealController_F.java
  23. 255 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/CheckApplyController_F.java
  24. 144 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/ScoreController_F.java
  25. 7 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/TaskController_F.java
  26. 6 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/ItemServiceImpl.java
  27. 9 6
      VisualInspection_server/src/main/resources/application.properties
  28. 43 39
      VisualInspection_server/src/main/resources/errcode.properties
  29. 23 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/bean/Log.java
  30. 20 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/CheckAppealDao.java
  31. 22 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/CheckApplyDao.java
  32. 15 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/LogDao.java
  33. 26 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/ScoreDao.java
  34. 0 1
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/AreaMapper.xml
  35. 83 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/CheckAppealMapper.xml
  36. 91 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/CheckApplylMapper.xml
  37. 13 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/LogMapper.xml
  38. 114 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/ScoreMapper.xml
  39. 27 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/TaskMapper.xml
  40. 78 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/CheckAppealServiceImpl.java
  41. 88 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/CheckApplyServiceImpl.java
  42. 146 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/ScoreServiceImpl.java
  43. 22 9
      Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/TaskServiceImpl.java
  44. 3 3
      Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/application.properties
  45. 36 0
      Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/logback.xml
  46. 79 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CheckAppeal_F.java
  47. 61 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CheckApply_F.java
  48. 5 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqCheckTask.java
  49. 57 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqScore.java
  50. 4 4
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqStatisticsBean.java
  51. 26 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CheckAppealService_F.java
  52. 28 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CheckApplyService_F.java
  53. 1 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CommonService.java
  54. 31 0
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/ScoreService_F.java
  55. 1 1
      Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/TaskService_F.java

+ 63 - 0
VisualInspection/fwq/js/appeal_management/appeal_checked.js

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

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

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

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

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

+ 6 - 0
VisualInspection/fwq/js/task/add.js

@@ -382,6 +382,12 @@ function addTask() {
         });
         return;
     }
+    if (tasklist.length < 1) {
+        layer.msg('未选择任务区域!', {
+            time: 2000, //20s后自动关闭
+        });
+        return;
+    }
 
 
     var check_user_list = checkusersselect.getSelectedItemsId();

+ 192 - 0
VisualInspection/fwq/js/task/apply_task.js

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

+ 64 - 201
VisualInspection/fwq/js/task/check.js

@@ -1,10 +1,11 @@
 function initCheck() {
-    addBreadMenu("/view/mytask/check.html", "视频稽查");
+    addBreadMenu("/fwq/view/task/check.html", "服务区视频稽查");
     $('#ex1').slider({ tooltip: 'hide' });
     $("#ex1").on("slideStop", function(slideEvt) {
         setVideoProcess(slideEvt.value);
     });
 
+    //滑动快进
     $("#ex1").on("change", function(sender) {
         var width = $("#ex1").siblings(".slider").children(".slider-track").children(".slider-selection").width();
         var total_width = $("#ex1").siblings(".slider").children(".slider-track").width();
@@ -38,6 +39,7 @@ function initCheck() {
 
     $("#tabcontent").css("height", ($("#video_content").height() - 80) + "px");
     $("#score_datatable").css("height", ($("#video_content").height() - 120) + "px");
+    //设置视屏位置
     if (ISCLIENT) {
         event = document.createEvent('MessageEvent');
         var origin = window.location.protocol + '//' + window.location.host;
@@ -47,64 +49,26 @@ function initCheck() {
 
 
 
-    // 仅选择日期
-    $("#start-time").datetimepicker({
-        language: "zh-CN",
-        weekStart: 1,
-        todayBtn: 1,
-        autoclose: 1,
-        todayHighlight: 1,
-        startView: 2,
-        minView: 2,
-        forceParse: 0,
-        format: "yyyy-mm-dd"
-    });
-    // 仅选择日期
-    $("#end-time").datetimepicker({
-        language: "zh-CN",
-        weekStart: 1,
-        todayBtn: 1,
-        autoclose: 1,
-        todayHighlight: 1,
-        startView: 2,
-        minView: 2,
-        forceParse: 0,
-        format: "yyyy-mm-dd"
-    });
+
     if ($.checkTask) {
-        getUserCheckCount();
+        getAreaCheckCount();
         initCheckAppealBtns();
-        // setFeSelect("#fsList", $.checkTask.checked_dept);
+
         $("#taskName").html($.checkTask.name);
         $("#ex1_span").html($.checkTask.start_time)
         $("#full_ex1_span").html($.checkTask.start_time)
 
         $("#lane").val($.checkTask.checked_location);
         $("#check_time").html($.checkTask.check_period);
-        $("#monitor").html($.checkTask.monitor_user_name);
-        // setLaneSelect("#lane", $.checkTask.checked_location);
-        get_common_service('user/getUserById/' + $.checkTask.checked_person, null, function(data) {
-                changePersonContent(data);
-            })
-            //查询评分情况
+
+
+
+        //TODO 获取分数
         queryCheckScores();
-        //查询录像播放列表
-        var videos = $.checkTask.video_id.split(',');
-        if (videos[0]) {
-            curVideo = videos[0];
-            queryVideoList();
-        } else {
-            callFunc("showvideoview", "false");
-            layer.msg('该处暂无视屏!', {
-                offset: 'r',
-                time: 2000, //20s后自动关闭
-            });
-            callFunc("stop", "");
-        }
+
+        //TODO 查询录像播放列表
+
     }
-    $("select#video_list").change(function() {
-        playVideo($(this).val());
-    });
 
 
 }
@@ -257,56 +221,52 @@ function fullscreen() {
 
 }
 
-function getUserCheckCount() {
-    var param = {
-        "id": $.checkTask.id,
-        "checked_person": $.checkTask.checked_person
-    };
-    post_common_service("/task/getUserCount/", param, function(userList) {
-        if (userList) {
-            $("#checked_count").html(userList.length);
-        } else {
-            $("#checked_count").html(0);
-        }
+function getAreaCheckCount() {
+    var index = layer.load(1, {
+        shade: [0.1, '#fff'] //0.1透明度的白色背景
     });
-}
-
-function checkUserCount() {
     var param = {
-        "id": $.checkTask.id,
-        "checked_person": $.checkTask.checked_person,
-        "class_type": $.checkTask.class_type
+        "period_id": $.checkTask.period_id,
+        "area_id": $.checkTask.area_id
     };
-    post_common_service("/task/getUserCount/", param, function(data) {
-        if (data >= 2) {
-            layer.msg("本周期稽查次数已满,不能再被稽查!", {
-                offset: 'r',
-                time: 2000 //20s后自动关闭
-            });
-            return false;
-        }
-        return true;
+    post_common_service("/f/task/getall/0/0", param, function(userList) {
+        var param = {
+            "id": $.checkTask.area_id
+        };
+        post_common_service("/f/area/getall", param, function(data) {
+            layer.closeAll('loading');
+            $.checkTask.areainfo = data.areas[0];
+            $("#checked_area").html(data.areas[0].name);
+            if (userList) {
+                $("#checked_count").html(userList.length);
+            } else {
+                $("#checked_count").html(0);
+            }
+        });
+
     });
 }
 
+
+
+//显示考核次数
 function showCheckDetailCount() {
     scoreDetailLayer = showPopup4Common('本周期已考核任务', null, ['450px', '350px'], '#checked_task_list_div', 'r', '确定');
     var param = {
         "period_id": $.checkTask.period_id,
-        "checked_person": $.checkTask.checked_person,
-        "status_search_type": 1
+        "area_id": $.checkTask.area_id
     };
 
     var cols = [
         { width: 40, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
         { width: 80, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
-        { width: 50, text: '考核人员', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
+        { width: 50, text: '考核区域', type: 'href_link', flex: true, colClass: '', field: $.checkTask.areainfo.name },
         { width: 80, text: '扣分情况', type: 'string', flex: true, sort: 'down', field: 'score_details' },
         { width: 70, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' }
     ];
     $('#checked_user_task_datatable').mytable({
         'cols': cols,
-        'url': "/task/getUserCheckedTaskByPage/",
+        'url': "/f/task/getall/",
         'param': param,
         'isShoWPager': false
     });
@@ -374,7 +334,7 @@ function queryCheckScores() {
         { width: 100, text: '评分记录', type: 'string', flex: true, sort: 'down', field: 'content' },
         { width: 40, text: '分数', type: 'string', flex: true, colClass: '', field: 'check_item_score' },
         { width: 100, text: '备注', type: 'string', flex: true, colClass: '', field: 'remark' },
-        { width: 50, text: '考核人', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
+
         // {width: 80, text: '图片', type: 'imagedd', flex: true, colClass: '',field: 'pics'},
         // {
         //     width: 150,
@@ -390,7 +350,7 @@ function queryCheckScores() {
         // }
     ];
 
-    var colFunc = { width: 120, text: '操作', type: 'string', flex: true, field: 'id' };
+    var colFunc = { width: 170, text: '操作', type: 'string', flex: true, field: 'id' };
     colFunc.oper = [
         { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
         { func: 'showEditPic', text: '图片', icon_class: 'icon-edit' }
@@ -407,7 +367,7 @@ function queryCheckScores() {
     // }
     $('#score_datatable').mytable({
         'cols': cols,
-        'url': "/score/getScoreList/",
+        'url': "/f/score/getScoreList/",
         'param': data
     });
 }
@@ -429,11 +389,12 @@ function showEditCheckScore(id) {
     $("#score_id_text").val(rowData.id);
     $("#check_item_text").val(rowData.content);
     $("#check_score_text").val(rowData.check_item_score);
-    setFeeUserSelect("#check_checked_person_select", rowData.checked_person);
+    // setFeeUserSelect("#check_checked_person_select", rowData.checked_person);
     // $("#check_checked_person_select").val(rowData.checked_person);
     $("#check_remark_text").tagsInput({ 'defaultText': '添加备注', 'width': '240px' });
+    $("#check_remark_text").importTags('');
     $("#check_remark_text").addTag(rowData.remark);
-    getTags("/score/getTopRemark", '#score_remark_div', '#check_remark_text', 'remark');
+    getTags("/f/score/getTopRemark", '#score_remark_div', '#check_remark_text', 'remark');
 }
 
 function setFeeUserSelect(div, selectId) {
@@ -473,7 +434,7 @@ function saveScoreEdit() {
     };
     editScoreId = null;
     $("#saveEditBtn").hide();
-    no_return_common_service("/score/update", param, function(data) {
+    no_return_common_service("/f/score/update", param, function(data) {
         if (scoreLayer) layer.close(scoreLayer);
         //查询评分情况
         queryCheckScores();
@@ -490,7 +451,7 @@ function saveEdit() {
         var picsStr = "";
         if (imgArr && imgArr.length > 0) {
             for (var i = 0; i < imgArr.length; i++) {
-                picsStr += imgArr[i].attr("path") + ","
+                picsStr += imgArr[i].attributes.getNamedItem("path").textContent + ","
             }
             picsStr = picsStr.substr(0, picsStr.length - 1);
         }
@@ -500,7 +461,7 @@ function saveEdit() {
         };
         editScoreId = null;
         $("#saveEditBtn").hide();
-        no_return_common_service("/score/update", param, function(data) {
+        no_return_common_service("/f/score/update", param, function(data) {
             if (scoreLayer) layer.close(scoreLayer);
             //查询评分情况
             queryCheckScores();
@@ -513,7 +474,7 @@ function saveEdit() {
 }
 
 function deleteCheckScore(id) {
-    deleteItem4Common(id, "/score/delete/", queryCheckScores, 'r');
+    deleteItem4Common(id, "/f/score/delete/", queryCheckScores, 'r');
 }
 
 function backoutCheckScore(id) {
@@ -527,7 +488,7 @@ function backoutCheckScore(id) {
             "id": id,
             "check_item_score": 0
         };
-        post_common_service("/score/backoutScore/", param, function(data) {
+        post_common_service("/f/score/backoutScore/", param, function(data) {
             layer.msg('撤销成功!', {
                 offset: 'r',
                 time: 2000, //20s后自动关闭
@@ -631,84 +592,8 @@ function clearAllImg() {
 }
 var changePersonLayer;
 
-function showChangeUser() {
-    var param = {
-        'organid': $.checkTask.checked_dept
-    };
 
-    post_common_service("/user/getUserList/", param, function(data) {
-        changePersonLayer = showPopup4Common('更改人员', null, ['550px', '600px'], null, 'r', '确定');
-        $("#user_container").empty();
-        var userStr = "";
-        for (var i in data) {
-            var name = data[i].truename;
-            if (data[i].workno) name = name + " " + data[i].workno.substr(data[i].workno.length - 3);
-            var pic = "../../images/body-bg.png";
-            if (data[i].pic) pic = base_image_server_url + data[i].pic;
-            str = '<div style="width:90px;float:left;margin:5px;">' +
-                '<a class="card" href="javascript:void(0)">' +
-                '<img src="' + pic + '" alt="" style="height:100px;width:90px;" onclick="showBigImg(\'' + pic + '\')">' +
-                '<div class="card-heading"><strong>' + name + '</strong></div>' +
-                '<div class="card-actions">' +
-                '<button type="button" class="btn btn-mini btn-danger" onclick="changePerson(\'' + data[i].id + '\')">选择</button>' +
-                '</div>' +
-                '</a>' +
-                '</div>';
-            userStr += str;
-        }
-        $("#user_container").html(userStr);
-    })
-}
 
-function changePerson(id) {
-    layer.confirm('是否要更改考核人?', {
-        btn: ['是', '否'], //按钮
-        shadeClose: true,
-        shade: 0, //不显示遮罩
-        offset: 'r'
-    }, function(index) {
-        layer.close(index);
-        var flag = true;
-        var param = {
-            "id": $.checkTask.id,
-            "checked_person": id,
-            "class_type": $.checkTask.class_type
-        };
-        post_common_service("/task/getUserCount/", param, function(data) {
-            if (data && data.length >= 2) {
-                layer.msg("本周期稽查次数已满,不能再被稽查!", {
-                    time: 2000, //20s后自动关闭
-                    offset: 'r'
-                });
-            } else {
-                // $('#checked_person').html(id);
-                var param1 = {
-                    "id": $.checkTask.id,
-                    "checked_person": id,
-                }
-                post_common_service("task/update/", param1, function(task_data) {
-                    checkHasScore(id, $.checkTask.checked_person);
-                    //重置当前任务
-                    $.checkTask = task_data;
-                    //获取用户信息
-                    get_common_service('user/getUserById/' + id, null, function(data) {
-                            changePersonContent(data);
-                        })
-                        //更新用户次数表
-                    no_return_common_service('task/updateUserCount/', param, function(data) {
-                        // changePersonContent(data);
-                    })
-                    layer.close(changePersonLayer);
-                }, function(error) {
-                    // alert(error);
-                });
-            }
-        });
-    }, function() {
-
-    });
-
-}
 
 function checkHasScore(id, old_person) {
     var param = {
@@ -742,29 +627,9 @@ function checkHasScore(id, old_person) {
     });
 }
 
-function showBigImg(src) {
-    $('#userBigImg').attr("src", src);
-    layer.open({
-        offset: 'r',
-        type: 1,
-        title: false,
-        closeBtn: 1,
-        area: '450px',
-        skin: 'layui-layer-nobg', //没有背景色
-        shadeClose: true,
-        shade: 0,
-        content: $('#userBigImg')
-    });
-}
 
-function resetUserImgInfo() {
-    $("#user_img_container").empty();
-    var str = '<a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle">' +
-        '<img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>' +
-        '<label id="checked_person"></label>' +
-        '(次数:<a href="javascript:void(0)" onclick="showCheckDetailCount()"><span class="label label-primary" id="checked_count">Primary</span></a>)';
-    $("#user_img_container").html(str);
-}
+
+
 
 function changePersonContent(data) {
     resetUserImgInfo();
@@ -846,8 +711,8 @@ function getCheckItems() {
             showRemoveBtn: false
         }
     };
-    var param = { "rule_type": 1 };
-    console.log(param);
+    var param = { "rule_type": 10 };
+
     post_common_service('checkRule/getItemListByRuleType', param, function(data) {
         // console.log(data);
         zdata = [];
@@ -913,7 +778,7 @@ function zTreeOnClick(event, treeId, treeNode) {
         'checked_person': $.checkTask.checked_person,
         'checked_dept': $.checkTask.checked_dept
     };
-    no_return_common_service("/score/add", param, function(data) {
+    no_return_common_service("/f/score/add", param, function(data) {
         if (scoreLayer) layer.close(scoreLayer);
         clearAllImg();
         //查询评分情况
@@ -931,13 +796,11 @@ function submitCheck() {
         "id": $.checkTask.id,
         "check_status": 4
     }
-    no_return_common_service("/task/taskEnd/", param, function(data) {
+    no_return_common_service("/f/task/update/", param, function(data) {
         layer.msg("提交成功", {
             offset: 'r',
             time: 2000 //20s后自动关闭
         });
-        // var currentpage = $.zui.store.get("currentpage");
-        // getPageInfo(currentpage);
         redirectLastPage();
     });
 
@@ -946,8 +809,8 @@ function submitCheck() {
 function showPre(id) {
     // $('#myModal').modal({name:"dd"});
     //预览提交把任务状态改为待提交
-    no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 7 })
-    changePage("/view/mytask/taskDetail.html");
+    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 7 })
+    changePage("/fwq/view/task/taskDetail.html");
 }
 
 var isappeal = false;
@@ -968,7 +831,7 @@ function showInvalidView() {
     }, ['400px', '500px'], '#invalid_div', 'r');
 
     $('#apply_reason').tagsInput({ 'defaultText': '添加原因' });
-    getTags("/checkApply/getTopReason", "#top_reason_div", '#apply_reason', 'apply_reason');
+    getTags("/f/checkApply/getTopReason", "#top_reason_div", '#apply_reason', 'apply_reason');
 }
 
 
@@ -999,7 +862,7 @@ function submitCheck4AppealResult(appeal_result) {
         "appeal_id": $.checkTask.appeal.id,
         "appeal_result": appeal_result
     }
-    no_return_common_service("/task/taskEnd/", param, function(data) {
+    no_return_common_service("/f/task/update/", param, function(data) {
         layer.msg("提交成功", {
             offset: 'r',
             time: 2000 //20s后自动关闭
@@ -1011,8 +874,8 @@ function submitCheck4AppealResult(appeal_result) {
 function showPre4Appeal(id) {
     // $('#myModal').modal({name:"dd"});
     //预览提交把任务状态改为待提交
-    no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 17 })
-    changePage("/view/mytask/taskDetail.html");
+    no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 17 })
+    changePage("/fwq/view/task/taskDetail.html");
 }
 
 function saveValidReason() {
@@ -1023,7 +886,7 @@ function saveValidReason() {
     };
 
 
-    no_return_common_service("/checkApply/add/", param, function(data) {
+    no_return_common_service("/f/checkApply/add/", param, function(data) {
         layer.msg("申请提交成功", {
             offset: 'r',
             time: 2000 //20s后自动关闭
@@ -1081,7 +944,7 @@ function saveRecheckResult() {
         "id": $.checkTask.appeal.id,
         "recheck_result": $("#recheck_result").val()
     }
-    post_common_service("/checkAppeal/update", param, function(data) {
+    post_common_service("/f/checkAppeal/update", param, function(data) {
         layer.msg("保存成功", {
             offset: 'r',
             time: 2000 //20s后自动关闭

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

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

+ 62 - 7
VisualInspection/fwq/js/task/task_list.js

@@ -41,15 +41,14 @@ function initTableRowBtn() {
 //查询任务
 function queryTask() {
 
-
-
+    var t = getTimeByMonth(GV("#start_time"));
     var data = {
-        "start_time": timeTranslate(GV("#start_time")),
-        "end_time": (GV("#start_time") + "/25 23:00:00").replace("/", "-").replace("/", "-"),
+        "start_time": getMomentTimeFormat(t.starttime),
+        "end_time": getMomentTimeFormat(t.endtime),
         "checked_dept": $("#fsList").val(),
         "check_status": cur_status
-    }
-    console.log(data);
+    };
+    // console.log(data);
     var hide = false;
     if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || hasRole(ROLE_JICHA) || roleContains('STATION')) {
         hide = true;
@@ -70,9 +69,10 @@ function queryTask() {
     if ((hasRole(ROLE_JICHA_ADMIN) && cur_status == 4) || (roleContains("STATION") && cur_status == 5)) {
         checkable = true;
     }
-    console.log("checkable:" + checkable);
+    // console.log("checkable:" + checkable);
     if (cur_status == 2 || cur_status == 3) {
         data.check_status_arr = [2, 3];
+        data.check_status = null;
     }
     taskTableObj = $('#task_list_table').mytable({
         'cols': cols,
@@ -107,4 +107,59 @@ function showTaskDetail(id) {
     }
 
     changePage("/fwq/view/task/taskDetail.html", taskTableObj);
+}
+
+//进入继续稽查页面
+function showContinueCheck(id) {
+    // $('#myModal').modal({name:"dd"});
+    $.checkTask = getItemByIdFromArr(id, $('#task_list_table').mytable('getTableData'));
+    $.checkTask.appeal = null;
+    changePage("/fwq/view/task/check.html", taskTableObj);
+}
+
+
+
+
+//下发单条任务
+function dispatchTaskById(id) {
+    layer.confirm('确定下发任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        var param = {
+            "id": id,
+            "check_status": 5
+        }
+        no_return_common_service('/f/task/dispatchById', param, function(data) {
+            queryTask();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
+
+}
+
+function dispatchAllNoScoreTask() {
+    layer.confirm('确定下发选择时间内所有无扣分任务?', {
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        var start_time = "";
+        if ($("#start_time").val()) start_time = $("#start_time").val() + " 00:00:00";
+        var end_time = "";
+        if ($("#end_time").val()) end_time = $("#end_time").val() + " 23:59:59";
+        var param = {
+            "start_time": start_time,
+            "end_time": end_time
+        }
+        no_return_common_service('/f/task/dispatchAllNoScoreTask', param, function(data) {
+            queryTask();
+            layer.msg(data, {
+                time: 2000 //20s后自动关闭
+            });
+        });
+    }, function(index) {
+        layer.close(index);
+    });
 }

+ 71 - 0
VisualInspection/fwq/view/appeal_management/appealDetail.html

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

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

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

+ 72 - 0
VisualInspection/fwq/view/appeal_management/appeal_checked.html

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

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

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

+ 65 - 0
VisualInspection/fwq/view/appeal_management/appeal_submited.html

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

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

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

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

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

+ 22 - 47
VisualInspection/fwq/view/task/check.html

@@ -3,21 +3,18 @@
     <div class="row">
         <form class="form-horizontal">
             <div class="form-group" style="margin-bottom: 5px;">
-                <div class="form-group col-sm-6" style="margin-bottom: 0px;">
-                    <label class="col-sm-4">名称:<span id="taskName" class="label" style="vertical-align:baseline"></span></label>
+                <div class="form-group col-sm-7" style="margin-bottom: 0px;">
+                    <label class="col-sm-7" style="text-align:left">名称:<span id="taskName" class="label" style="vertical-align:baseline"></span></label>
                     <label class="col-sm-5">时间:<span id="check_time" class="label" style="vertical-align:baseline"></span></label>
                 </div>
                 <div class="form-group col-sm-5" style="margin-bottom: 0px;">
                     <label class="col-sm-3">考核区域:</label>
-                    <div class="col-sm-9" id="user_img_container">
-                        <!-- 使用图片 -->
-                        <a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle"><img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>
-                        <label id="checked_person"></label>
-                        <a href="javascript:void(0)" onclick="showCheckDetailCount()">次数<label id="checked_count"></label></a>
+                    <div class="col-sm-9" style="bottom:-5px">
+                        <label id="checked_area"></label> (次数:
+                        <a href="javascript:void(0)" onclick="showCheckDetailCount()"><span class="label label-primary" id="checked_count">-</span></a>)
+
                     </div>
                 </div>
-
-
             </div>
         </form>
     </div>
@@ -44,7 +41,6 @@
                                         <span id="ex1_span" style="position: absolute;left: 25px;">2017-06-12 23:00:00</span>
                                     </div>
                                     <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
-                                        <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
                                         <div class="col-md-4 " style="padding-left:0">
                                             <div class="input-group" style="padding-left:0">
                                                 <input type="text" id="video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">
@@ -127,16 +123,17 @@
 <div id="appeal_div" style="display:none;">
     <link rel="import" href="/view/mytask/appealDetail.html?__inline">
 </div>
-<div id="form-div" style="display:none;text-align:center;">
-    <link rel="import" href="/view/mytask/changePerson.html?__inline">
-</div>
+
+<!-- 考核项 -->
 <div id="items-div" style="display:none;text-align:center;">
     <ul id="items_tree" class="ztree"></ul>
 </div>
+
+<!-- 修改扣分 -->
 <div id="score-detail-div" style="display:none;text-align:center;">
-    <link rel="import" href="/view/mytask/scoreDetail.html?__inline">
+    <link rel="import" href="/fwq/view/task/scoreDetail.html?__inline">
 </div>
-<!-- 对话框HTML -->
+<!-- 无效任务 -->
 <div class="modal fade" id="validSubmitWin">
     <div class="modal-dialog">
         <div class="modal-content">
@@ -158,7 +155,8 @@
         </div>
     </div>
 </div>
-<!-- 对话框HTML -->
+
+<!-- 无效原因 -->
 <div id="invalid_div" style="display:none;text-align:center;">
     <div class="container-fluid" style="overflow: hidden">
         <div class="cards">
@@ -175,15 +173,18 @@
         </div>
     </div>
 </div>
+
+<!-- 已稽查任务 -->
 <div id="checked_task_list_div" style="display:none;text-align:center;">
     <div class="datatable" id="checked_user_task_datatable"></div>
 </div>
-<!-- 对话框HTML -->
+
+<!-- 申诉详情 -->
 <div id="hide_div" style="display:none;text-align:center;">
 </div>
-<img id="userBigImg" style="display:none;margin-right:20px;" />
+
+
 <script>
-    var curVideo;
     $(document).ready(function() {
         $("#video_btn_start").mouseover(function() {
             $("#video_btn_start_img").attr("src", "/images/movie.png");
@@ -201,36 +202,9 @@
             $("li.tab_lane:first").addClass("active");
         }
         initCheck();
-
-        $('[data-tab]').on('shown.zui.tab', function(e) {
-            // console.log('当前被激活的标签页', $(e.target).attr('bbb'));
-            // console.log('上一个标签页', e.relatedTarget);
-            var i = $(e.target).attr('bbb');
-            var showVideo;
-            if (i == 3 || i == 4) {
-                var videos = $.checkTask.video_id.split(',');
-                showVideo = videos[i - 3];
-            } else {
-                var videos = $.checkTask.video_id.split(',');
-                showVideo = videos[i];
-            }
-
-            if (showVideo != "" && showVideo && showVideo != "undefined") {
-                curVideo = showVideo;
-                queryVideoList();
-            } else {
-                callFunc("showvideoview", "false");
-                layer.msg('暂无视屏!', {
-                    time: 2000, //20s后自动关闭
-                });
-                callFunc("stop", "");
-            }
-
-        });
-
-
     });
 
+    //文件上传
     $("#box").click(function() {
         return $("#_f").click();
     });
@@ -239,6 +213,7 @@
         UpladFile();
     });
 
+    //文件上传 不变
     function UpladFile() {
         var fileObj = document.getElementById("_f").files[0]; // 获取文件对象
         // var FileController = base_image_server_url +'fileServer/file/upload';// 接收上传文件的后台地址

+ 64 - 0
VisualInspection/fwq/view/task/checked.html

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

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

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

+ 2 - 9
VisualInspection/fwq/view/task/taskDetail.html

@@ -196,20 +196,13 @@
             field: 'check_item_score'
         }, {
             width: 80,
-            text: '扣分人',
-            type: 'string',
-            flex: true,
-            colClass: '',
-            field: 'checked_person_name'
-        }, {
-            width: 80,
             text: '备注',
             type: 'string',
             flex: true,
             colClass: '',
             field: 'remark'
         }, {
-            width: 200,
+            width: 280,
             text: '图片',
             type: 'imagedd',
             flex: true,
@@ -238,7 +231,7 @@
         }
         $('#score_datatable').mytable({
             'cols': cols,
-            'url': "/score/getScoreList/",
+            'url': "/f/score/getScoreList/",
             'param': data
         });
         $('a.lightbox-toggle').lightbox();

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

@@ -811,4 +811,16 @@ function isRealNum(val) {
 
 function trim(str) {
     return str.replace(/\s|\xA0/g, "");
+}
+
+
+function getTimeByMonth(time) {
+    var t = time.replace("/", "-") + "";
+    var endtime = moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss");
+    var starttime = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+    return { starttime: starttime, endtime: endtime };
+}
+
+function getMomentTimeFormat(t) {
+    return t.format("YYYY-MM-DD hh:mm:ss");
 }

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/AreaInfoController_F.java

@@ -51,4 +51,6 @@ public class AreaInfoController_F extends BaseController {
 
 
 
+
+
 }

+ 162 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/CheckAppealController_F.java

@@ -0,0 +1,162 @@
+package com.xintong.visualinspection.controller.gettway;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.*;
+import com.xintong.visualinspection.controller.BaseController;
+import com.xintong.visualinspection.service.*;
+import com.xintong.visualinspection.util.AuthorUtil;
+import com.xintong.visualinspection.util.Constants;
+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 javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 文件名:CheckItemController
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/f/checkAppeal")
+public class CheckAppealController_F extends BaseController {
+
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CheckAppealService_F checkAppealService;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private TaskService_F taskService;
+   
+    /**
+     * 添加考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/add")
+    public String add(HttpServletRequest request,@Valid @RequestBody CheckAppeal_F checkAppeal){
+//    	CheckAppeal ca = checkAppealService.getByTaskId(checkAppeal.getTask_id());
+//		if(ca!=null) {
+//			throw new BusinessException(21201);
+//		}
+    	CheckAppeal_F ca = checkAppealService.getByTaskId(checkAppeal.getTask_id());
+    	if(ca==null){
+    		User u = getCurrentUser(request);
+    		checkAppeal.setAppeal_man(new Long(u.getId()));
+    		checkAppeal.setCheck_status(Constants.STATUS_APPEALING);
+    		if(u.getOrganid()!=null) {
+                checkAppeal.setAppeal_dept(new Long(u.getOrganid()));
+            }
+    		checkAppealService.insert(checkAppeal);
+            FwqCheckTask task = new FwqCheckTask();
+            task.setId(checkAppeal.getTask_id().intValue());
+    		task = taskService.getTask(task);
+    		task.setCheck_status(checkAppeal.getCheck_status());
+    		task.setUpdate_user(new Long(u.getId()));
+    		taskService.updateStatus(task);
+    		return super.returnSuccessResult("添加成功");
+    	}else{
+    		throw new BusinessException(21401);
+    	}
+    }
+    
+    /**
+     * 修改考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody CheckAppeal_F checkAppeal){
+    	checkAppealService.update(checkAppeal);
+        CheckAppeal_F ca = checkAppealService.getById(checkAppeal.getId());
+    	return super.returnSuccessResult("修改成功",ca);
+    }
+    
+    /**
+     * 删除考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody CheckAppeal_F checkAppeal){
+    	checkAppealService.delete(checkAppeal.getId());
+    	return super.returnSuccessResult("删除成功");
+    }
+    
+    /**
+     * 根据id获取考核项数据
+     * @param checkAppeal
+     * @return
+     */
+    @RequestMapping(value = "/getById")
+    public String getById(@RequestBody CheckAppeal_F checkAppeal){
+    	if(checkAppeal.getId()==null){
+    		throw new BusinessException(20101);
+    	}
+        CheckAppeal_F checkItemOne =  checkAppealService.getById(checkAppeal.getId()) ;
+    	return super.returnSuccessResult(checkItemOne);
+    }
+    
+    /**
+     * 根据taskid获取申诉数据
+     * @param checkAppeal
+     * @return
+     */
+    @RequestMapping(value = "/getByTaskId")
+    public String getByTaskId(@RequestBody CheckAppeal_F checkAppeal){
+    	if(checkAppeal.getTask_id()==null){
+    		throw new BusinessException(20002);
+    	}
+        CheckAppeal_F checkItemOne =  checkAppealService.getByTaskId(checkAppeal.getTask_id()) ;
+    	return super.returnSuccessResult(checkItemOne);
+    }
+    
+    @RequestMapping(value = "/getList/{page}/{size}")
+    public String getList(@RequestBody CheckAppeal_F param ,@PathVariable Integer page,@PathVariable Integer size){
+    	PageHelper.startPage(page, size);
+    	param.setCode_flag("task_status");
+    	List<CheckAppeal_F> checkAppeal =  checkAppealService.getList(param) ;
+    	return super.returnSuccessResult(new PageInfo(checkAppeal));
+    }
+    
+    /**
+     * 通过多条件获取考核任务
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getTaskList/{page}/{size}")
+    public String getTaskList(HttpServletRequest request, @PathVariable Integer page,@PathVariable Integer size, @RequestBody FwqCheckTask task){
+    	PageHelper.startPage(page, size); 
+    	User user = getCurrentUser(request);
+    	if(AuthorUtil.hasRole(user, Constants.ROLE_STATION_ADMIN)
+    			||AuthorUtil.hasRole(user, Constants.ROLE_STATION)
+    			||AuthorUtil.hasRole(user, Constants.ROLE_STATION_AGENT)
+    			||AuthorUtil.containsRole(user, "ROLE_STATION")){
+    		task.setChecked_dept((long)user.getOrganid());
+    	}else if(AuthorUtil.hasRole(user, Constants.ROLE_JICHA)){
+    		task.setRecheckman(new Long(user.getId()));
+    	}
+    	List<FwqCheckTask> taskList = (List<FwqCheckTask>) taskService.getAllTask(0,0,task);
+    	if(taskList==null) return super.returnSuccessResult(new PageInfo(new ArrayList()));
+    	return super.returnSuccessResult(new PageInfo(taskList));
+    }
+}

+ 255 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/CheckApplyController_F.java

@@ -0,0 +1,255 @@
+package com.xintong.visualinspection.controller.gettway;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.*;
+import com.xintong.visualinspection.controller.BaseController;
+import com.xintong.visualinspection.service.CheckApplyService;
+import com.xintong.visualinspection.service.CheckApplyService_F;
+import com.xintong.visualinspection.service.TaskService;
+import com.xintong.visualinspection.service.TaskService_F;
+import com.xintong.visualinspection.util.AuthorUtil;
+import com.xintong.visualinspection.util.CacheUtil;
+import com.xintong.visualinspection.util.CodeUtil;
+import com.xintong.visualinspection.util.Constants;
+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 javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:CheckItemController
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/f/checkApply")
+public class CheckApplyController_F extends BaseController {
+
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CheckApplyService_F checkApplyService;
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private TaskService_F taskService;
+   
+    /**
+     * 添加考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/add")
+    public String add(HttpServletRequest request,@Valid @RequestBody CheckApply_F checkAppeal){
+    	
+    	CheckApply_F ca = checkApplyService.getByTaskId(checkAppeal.getTask_id());
+		if(ca!=null) {
+			throw new BusinessException(21201);
+		}
+		
+    	User u = getCurrentUser(request);
+    	checkAppeal.setApply_man(new Long(u.getId()));
+    	checkAppeal.setCheck_status(Constants.STATUS_APPLYING);
+    	if(u.getOrganid()!=null) {
+            checkAppeal.setApply_dept(new Long(u.getOrganid()));
+        }
+    	checkApplyService.insert(checkAppeal);
+    	FwqCheckTask task = new FwqCheckTask();
+    	task.setId( checkAppeal.getTask_id().intValue());
+        task = taskService.getTask(task);
+    	task.setCheck_status(checkAppeal.getCheck_status());
+    	task.setUpdate_user(new Long(u.getId()));
+    	if(checkAppeal.isIsappeal()){
+    	    task.setInvalidFrom(1);
+        }
+    	taskService.updateStatus(task);
+    	return super.returnSuccessResult("添加成功");
+    }
+    
+    /**
+     * 修改考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/update")
+    public String update(@Valid @RequestBody CheckApply_F checkAppeal){
+    	checkApplyService.update(checkAppeal);
+    	return super.returnSuccessResult("修改成功");
+    }
+    
+    /**
+     * 同意无效任务
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/agree")
+    public String agree(HttpServletRequest request,@Valid @RequestBody CheckApply_F checkAppeal){
+    	if(checkAppeal.getId()==null) {
+    		throw new BusinessException(20001); 
+    	}
+    	User user = getCurrentUser(request);
+    	checkAppeal.setVerify_person(new Long(user.getId()));
+    	int check_status = Constants.STATUS_APPLY_SUCCEED;
+    	checkAppeal.setCheck_status(check_status);
+    	checkApplyService.update(checkAppeal);
+    	FwqCheckTask task = new FwqCheckTask();
+    	task.setId(checkAppeal.getTask_id().intValue());
+    	task.setCheck_status(check_status);
+    	task.setUpdate_user(new Long(user.getId()));
+    	taskService.updateStatus(task);
+
+    	return super.returnSuccessResult("同意成功");
+    }
+    
+    /**
+     * 批量同意无效任务
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/agreePatch")
+    public String agreePatch(HttpServletRequest request,@Valid @RequestBody CheckApply_F checkAppeal){
+    	if(checkAppeal.getApply_ids()==null) {
+    		throw new BusinessException(20001); 
+    	}
+    	User user = getCurrentUser(request);
+    	List<CheckApply_F> checkApplyList = checkApplyService.getList(checkAppeal);
+    	for(CheckApply_F ca :checkApplyList) {
+    		ca.setVerify_person(new Long(user.getId()));
+    		int check_status = Constants.STATUS_APPLY_SUCCEED;
+    		ca.setCheck_status(check_status);
+    		checkApplyService.update(ca);
+    		//更新任务
+    		FwqCheckTask task = new FwqCheckTask();
+    		task.setId(ca.getTask_id().intValue());
+    		task.setCheck_status(check_status);
+    		task.setUpdate_user(new Long(user.getId()));
+    		taskService.updateStatus(task);
+
+    	}
+    	return super.returnSuccessResult("同意成功");
+    }
+    
+    /**
+     *拒绝无效任务
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/refuse")
+    public String refuse(HttpServletRequest request,@Valid @RequestBody CheckApply_F checkAppeal){
+    	if(checkAppeal.getId()==null) {
+    		throw new BusinessException(20001); 
+    	}
+    	User user = getCurrentUser(request);
+//    	checkAppeal.setVerify_person(new Long(user.getId()));
+//    	int check_status = Constants.STATUS_APPLY_FAILED;
+//    	checkAppeal.setCheck_status(check_status);
+//    	checkApplyService.update(checkAppeal);
+        checkApplyService.delete(checkAppeal.getId());
+    	FwqCheckTask task = new FwqCheckTask();
+    	task.setId(checkAppeal.getTask_id().intValue());
+    	FwqCheckTask temp = taskService.getTask(task);
+    	if(temp.getInvalidFrom()!=null && temp.getInvalidFrom().equals(1)){
+    	    //申诉任务  则退回申诉待稽查中
+            task.setCheck_status(Constants.STATUS_APPEAL_SUCCEED);
+        }else{
+            task.setCheck_status(Constants.STATUS_CHECK_SUBMIT);
+        }
+    	//无效任务拒绝后,任务该外待稽查状态
+
+    	task.setUpdate_user(new Long(user.getId()));
+    	taskService.updateStatus(task);
+    	return super.returnSuccessResult("拒绝成功");
+    }
+    
+    /**
+     * 删除考核项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody CheckApply checkAppeal){
+    	checkApplyService.delete(checkAppeal.getId());
+    	return super.returnSuccessResult("删除成功");
+    }
+    
+    /**
+     * 根据id获取考核项数据
+     * @param checkItem
+     * @return
+     */
+    @RequestMapping(value = "/getById")
+    public String getById(@RequestBody CheckApply_F checkAppeal){
+    	if(checkAppeal.getId()==null){
+    		throw new BusinessException(20001);
+    	}
+        CheckApply_F checkItemOne =  checkApplyService.getById(checkAppeal.getId()) ;
+    	return super.returnSuccessResult(checkItemOne);
+    }
+    
+    /**
+     * 根据任务id获取无效任务申请数据
+     * @param checkItem
+     * @return
+     */
+    @RequestMapping(value = "/getByTaskId")
+    public String getByTaskId(@RequestBody CheckApply_F checkAppeal){
+    	if(checkAppeal.getId()==null){
+    		throw new BusinessException(20101);
+    	}
+        CheckApply_F checkItemOne =  checkApplyService.getByTaskId(checkAppeal.getId()) ;
+    	checkItemOne.setApply_man_name(CacheUtil.getUserTurenameFromMap(checkItemOne.getApply_man()));
+    	return super.returnSuccessResult(checkItemOne);
+    }
+    
+    @RequestMapping(value = "/getList/{page}/{size}")
+    public String getList(HttpServletRequest request,@RequestBody CheckApply_F param ,@PathVariable Integer page,@PathVariable Integer size){
+		final Page<Object> objects = PageHelper.startPage(page, size);
+		User user = getCurrentUser(request);
+    	if(AuthorUtil.hasRole(user, Constants.ROLE_JICHA)){
+    		param.setApply_man(new Long(user.getId()));
+    	}
+    	List<CheckApply_F> checkAppeal =  checkApplyService.getList(param) ;
+    	return super.returnSuccessResult(new PageInfo(checkAppeal));
+    }
+    
+    /**
+     * 获取无效任务原因排名前10
+     * @param checkItem
+     * @return
+     */
+    @RequestMapping(value = "/getTopReason")
+    public String getTopReason(){
+    	Map<String,Object> param = new HashMap<String,Object>();
+    	// 获取原因显示条数
+    	int showNum = 10;
+		Constant t =  CodeUtil.getCodeByFlagAndValue("top_show_num", "1");
+		if(t!=null) showNum = Integer.parseInt(t.getCode_name());
+    	param.put("num", showNum);
+    	List<CheckApply_F> checkApplyList =  checkApplyService.getTopReasonList(param);
+    	return super.returnSuccessResult(checkApplyList);
+    }
+}

+ 144 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/ScoreController_F.java

@@ -0,0 +1,144 @@
+package com.xintong.visualinspection.controller.gettway;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.xintong.system.err.BusinessException;
+import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.FwqScore;
+import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.controller.BaseController;
+import com.xintong.visualinspection.service.ScoreService_F;
+import com.xintong.visualinspection.util.CodeUtil;
+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 javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 文件名:TestController
+ * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@RestController
+@RequestMapping("/f/score")
+public class ScoreController_F extends BaseController {
+
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private ScoreService_F scoreService;
+
+
+
+   
+    /**
+     * 添加扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/add")
+    public String add(@Valid @RequestBody FwqScore score){
+    	scoreService.insert(score);
+    	return super.returnSuccessResult("添加成功");
+    }
+    
+    /**
+     * 修改扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/update")
+    public String update(HttpServletRequest request,@Valid @RequestBody FwqScore score){
+    	User user = getCurrentUser(request);
+    	score.setUpdate_user(new Long(user.getId()));
+    	scoreService.update(score);
+    	return super.returnSuccessResult("修改成功");
+    }
+    
+    /**
+     * 删除扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/delete")
+    public String delete(@RequestBody FwqScore score){
+    	scoreService.delete(score.getId());
+    	return super.returnSuccessResult("删除成功");
+    }
+    
+    /**
+     * 通过任务id获取考核扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getByTaskId")
+    public String getByTaskId(@RequestBody FwqScore score){
+    	if(score.getTask_id()==null){
+    		throw new BusinessException(20002);
+    	}
+    	List<FwqScore> scorelist = scoreService.getScoreListByTaskId(score.getTask_id());
+    	return super.returnSuccessResult(scorelist);
+    }
+    
+    /**
+     * 通过多条件获取考核扣分项
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getScoreList/{page}/{size}")
+    public String getScoreList(@PathVariable Integer page,@PathVariable Integer size, @RequestBody FwqScore score){
+    	List<FwqScore> scorelist = scoreService.getScoreList(score);
+    	return super.returnSuccessPageResult(scorelist);
+    }
+    
+    /**
+     * 获取备注排名前10
+     * @param checkItem
+     * @return
+     */
+    @RequestMapping(value = "/getTopRemark")
+    public String getTopRemark(){
+    	Map<String,Object> param = new HashMap<String,Object>();
+    	// 获取原因显示条数
+    	int showNum = 10;
+		Constant t =  CodeUtil.getCodeByFlagAndValue("top_show_num", "1");
+		if(t!=null) showNum = Integer.parseInt(t.getCode_name());
+    	param.put("num", showNum);
+    	List<FwqScore> scoreList =  scoreService.getTopRemarkList(param);
+    	return super.returnSuccessResult(scoreList);
+    }
+    
+
+    
+    /**
+     * 撤销扣分
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/backoutScore")
+    public String backoutScore(HttpServletRequest request,@Valid @RequestBody FwqScore score){
+    	if(score.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	User user = getCurrentUser(request);
+    	score.setUpdate_user(new Long(user.getId()));
+    	scoreService.backoutScore(score);
+    	return super.returnSuccessResult("撤销成功");
+    }
+}

+ 7 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/TaskController_F.java

@@ -62,7 +62,7 @@ public class TaskController_F extends BaseController {
     @RequestMapping(value = "/add")
     public String addtask(HttpServletRequest request,@Valid @RequestBody TaskData_F taskData_f){
         if(taskData_f==null|| taskData_f.getCheckAreaData()==null || taskData_f.getUserids()==null  || taskData_f.getUserids().size()<1 || taskData_f.getCheckAreaData().size()<1){
-            throw new BusinessException(20002);
+            throw new BusinessException(21502);
         }
         List<User> us =new ArrayList<>();
         for (String u:taskData_f.getUserids()
@@ -74,7 +74,12 @@ public class TaskController_F extends BaseController {
 
         User user = getCurrentUser(request);
         taskData_f.setUser_id(user.getId());
-        taskService_f.addTask(taskData_f);
+        try {
+            taskService_f.addTask(taskData_f);
+        }catch (Exception e){
+            throw new BusinessException(21501);
+        }
+
         return super.returnSuccessResult("添加成功",null);
     }
     @RequestMapping(value = "/getStatusById")

+ 6 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/ItemServiceImpl.java

@@ -14,6 +14,12 @@ import java.util.List;
  * 文件名:UserServiceImpl 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017
  * 版权所有.
  */
+@com.alibaba.dubbo.config.annotation.Service(
+        version = "1.0.0",
+        application = "${dubbo.application.id}",
+        protocol = "${dubbo.protocol.id}",
+        registry = "${dubbo.registry.id}"
+)
 @Service
 public class ItemServiceImpl extends BaseService implements ItemService {
 

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

@@ -4,7 +4,7 @@ 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:9003/visualinspection?useUnicode=true&characterEncoding=utf-8
-master.datasource.url = jdbc:mysql://git.topm.win:9002/visualinspection?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://192.168.45.158:3306/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
@@ -14,7 +14,7 @@ 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:9003/visualinspection?useUnicode=true&characterEncoding=utf8
-cluster.datasource.url = jdbc:mysql://git.topm.win:9002/visualinspection?useUnicode=true&characterEncoding=utf-8
+cluster.datasource.url = jdbc:mysql://192.168.45.158:3306/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
@@ -57,13 +57,13 @@ spring.datasource.useGlobalDataSourceStat=true
 spring.redis.database=0  
 # Redis\u670D\u52A1\u5668\u5730\u5740
 #spring.redis.host=10.112.0.199
-spring.redis.host=git.topm.win
+spring.redis.host=192.168.45.158
 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
 #spring.redis.port=6379
 
-spring.redis.port=9001
+spring.redis.port=6379
 #spring.redis.port=9004
-#spring.redis.port=6380
+#spring.redis.port=7003
 # 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
@@ -135,7 +135,10 @@ dubbo.protocol.status = server
 
 ## RegistryConfig Bean
 dubbo.registry.id = demoservice
-dubbo.registry.address = zookeeper://git.topm.win:9994
+dubbo.registry.address = zookeeper://127.0.0.1:2181
+#dubbo.registry.address = zookeeper://git.topm.win:9994
+dubbo.registry.file = ./output/dubbo.cache
+
 
 
 

+ 43 - 39
VisualInspection_server/src/main/resources/errcode.properties

@@ -1,50 +1,54 @@
-#\u901a\u7528\u9519\u8bef
-10001=\u7a7a\u6307\u9488\u9519\u8bef
-10002=\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\u9519\u8bef
-10003=\u6570\u7ec4\u4e0b\u6807\u8d8a\u754c\u9519\u8bef
-10004=\u6570\u5b66\u8fd0\u7b97\u9519\u8bef
-10005=\u6587\u4ef6\u672a\u627e\u5230
-10006=\u53c2\u6570\u9519\u8bef
-10007=\u65e0\u6548\u7684\u53c2\u6570\u7c7b\u578b
-10008=\u67e5\u8be2\u7ed3\u679c\u8fc7\u591a\uff08\u4e00\u822c\u662f\u671f\u671b1\u4e2a\uff09
-11000=\u5176\u4ed6\u9519\u8bef
-#\u901a\u7528\u4e1a\u52a1\u9519\u8bef
-20001=\u8f93\u5165\u53c2\u6570\u9519\u8bef
-20002=id\u4e0d\u80fd\u4e3a\u7a7a
-20003=\u4fee\u6539\u5931\u8d25
-#\u5b57\u5178\u7ba1\u7406\u9519\u8bef
-20101=\u5b57\u5178Flag\u4e0d\u80fd\u4e3a\u7a7a
-20102=\u5b57\u5178\u503c\u4e0d\u80fd\u4e3a\u7a7a
-20103=\u5b57\u5178\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a
-#\u7528\u6237\u7ba1\u7406\u9519\u8bef
+#\u901A\u7528\u9519\u8BEF
+10001=\u7A7A\u6307\u9488\u9519\u8BEF
+10002=\u5B57\u7B26\u4E32\u8F6C\u6362\u4E3A\u6570\u5B57\u9519\u8BEF
+10003=\u6570\u7EC4\u4E0B\u6807\u8D8A\u754C\u9519\u8BEF
+10004=\u6570\u5B66\u8FD0\u7B97\u9519\u8BEF
+10005=\u6587\u4EF6\u672A\u627E\u5230
+10006=\u53C2\u6570\u9519\u8BEF
+10007=\u65E0\u6548\u7684\u53C2\u6570\u7C7B\u578B
+10008=\u67E5\u8BE2\u7ED3\u679C\u8FC7\u591A\uFF08\u4E00\u822C\u662F\u671F\u671B1\u4E2A\uFF09
+11000=\u5176\u4ED6\u9519\u8BEF
+#\u901A\u7528\u4E1A\u52A1\u9519\u8BEF
+20001=\u8F93\u5165\u53C2\u6570\u9519\u8BEF
+20002=id\u4E0D\u80FD\u4E3A\u7A7A
+20003=\u4FEE\u6539\u5931\u8D25
+#\u5B57\u5178\u7BA1\u7406\u9519\u8BEF
+20101=\u5B57\u5178Flag\u4E0D\u80FD\u4E3A\u7A7A
+20102=\u5B57\u5178\u503C\u4E0D\u80FD\u4E3A\u7A7A
+20103=\u5B57\u5178\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
+#\u7528\u6237\u7BA1\u7406\u9519\u8BEF
 20201=
-#\u90e8\u95e8\u7ba1\u7406\u9519\u8bef
+#\u90E8\u95E8\u7BA1\u7406\u9519\u8BEF
 20301=
-#\u89d2\u8272\u7ba1\u7406\u9519\u8bef
+#\u89D2\u8272\u7BA1\u7406\u9519\u8BEF
 20401=
-#\u6743\u9650\u7ba1\u7406\u9519\u8bef
+#\u6743\u9650\u7BA1\u7406\u9519\u8BEF
 20501=
-#\u83dc\u5355\u7ba1\u7406\u9519\u8bef
+#\u83DC\u5355\u7BA1\u7406\u9519\u8BEF
 20601=
-#\u89c6\u9891\u7ba1\u7406\u9519\u8bef
+#\u89C6\u9891\u7BA1\u7406\u9519\u8BEF
 20701=
-#\u73ed\u7ec4\u7ba1\u7406\u9519\u8bef
+#\u73ED\u7EC4\u7BA1\u7406\u9519\u8BEF
 20801=
-#\u73ed\u6b21\u7ba1\u7406\u9519\u8bef
-20901=\u90e8\u95e8\u7f16\u53f7\u4e0d\u80fd\u4e3a\u7a7a
-20902=\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u4e3a\u7a7a
-20903=\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u4e3a\u7a7a
-#\u8003\u6838\u9879\u7ba1\u7406\u9519\u8bef
+#\u73ED\u6B21\u7BA1\u7406\u9519\u8BEF
+20901=\u90E8\u95E8\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A
+20902=\u5F00\u59CB\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A
+20903=\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A
+#\u8003\u6838\u9879\u7BA1\u7406\u9519\u8BEF
 21001=
-#\u8003\u6838\u529e\u6cd5\u7ba1\u7406\u9519\u8bef
-21101=\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a
-#\u4efb\u52a1\u7ba1\u7406\u9519\u8bef
-21201=\u5df2\u63d0\u4ea4\u65e0\u6548\u7533\u8bf7\uff0c\u4e0d\u80fd\u91cd\u590d\u63d0\u4ea4
-#\u6263\u5206\u7ba1\u7406\u9519\u8bef
-21301=\u8003\u6838\u4eba\u4e0d\u80fd\u4e3a\u7a7a
-21302=\u4efb\u52a1\u7f16\u53f7\u4e0d\u80fd\u4e3a\u7a7a
-#\u7533\u8bc9\u7ba1\u7406\u9519\u8bef
-21401=\u5df2\u63d0\u4ea4\u7533\u8bc9\uff0c\u4e0d\u80fd\u91cd\u590d\u63d0\u4ea4
+#\u8003\u6838\u529E\u6CD5\u7BA1\u7406\u9519\u8BEF
+21101=\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
+#\u4EFB\u52A1\u7BA1\u7406\u9519\u8BEF
+21201=\u5DF2\u63D0\u4EA4\u65E0\u6548\u7533\u8BF7\uFF0C\u4E0D\u80FD\u91CD\u590D\u63D0\u4EA4
+#\u6263\u5206\u7BA1\u7406\u9519\u8BEF
+21301=\u8003\u6838\u4EBA\u4E0D\u80FD\u4E3A\u7A7A
+21302=\u4EFB\u52A1\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A
+#\u7533\u8BC9\u7BA1\u7406\u9519\u8BEF
+21401=\u5DF2\u63D0\u4EA4\u7533\u8BC9\uFF0C\u4E0D\u80FD\u91CD\u590D\u63D0\u4EA4
+
+#\u4EFB\u52A1\u751F\u6210
+21501=\u6240\u9009\u4EFB\u52A1\u8D85\u51FA\u5F53\u524D\u7A3D\u67E5\u5468\u671F\u5185\uFF01
+21502=\u65E0\u4EFB\u52A1\uFF01
 
 
 

+ 23 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/bean/Log.java

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

+ 20 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/CheckAppealDao.java

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

+ 22 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/CheckApplyDao.java

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

+ 15 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/LogDao.java

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

+ 26 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/ScoreDao.java

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

+ 0 - 1
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/AreaMapper.xml

@@ -14,4 +14,3 @@
 
 </mapper>
 
-

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

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

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

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

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

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

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

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

+ 27 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/TaskMapper.xml

@@ -36,6 +36,33 @@
         <if test="check_status != null">AND check_status = #{check_status}</if>
         <if test="checkman != null">AND checkman = #{checkman}</if>
         <if test="area_id != null">AND area_id = #{area_id}</if>
+        <if test="check_status_arr != null and check_status_arr.length > 0">AND
+            check_status in
+            <foreach collection="check_status_arr" item="status" index="index"
+                     open="(" close=")" separator=",">
+                #{status}
+            </foreach>
+        </if>
+        <if test="area_id != null">AND area_id = #{area_id}</if>
+        <if test="hasScore != null ">
+
+            <!--有扣分-->
+            <if test="hasScore == 1 ">
+                AND id in (select task_id from check_score where check_item_score>0 )
+            </if>
+            <!--无扣分-->
+            <if test="hasScore == 2 ">
+                AND id not in (select task_id from check_score where check_item_score>0 )
+            </if>
+
+        </if>
+        <if test="invalidFrom == -1">AND
+            ( invalid_from = 0 OR invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            invalid_from = #{invalidFrom}
+        </if>
         ORDER BY start_time DESC
     </select>
 

+ 78 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/CheckAppealServiceImpl.java

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

+ 88 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/CheckApplyServiceImpl.java

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

+ 146 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/ScoreServiceImpl.java

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

+ 22 - 9
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/TaskServiceImpl.java

@@ -75,6 +75,20 @@ public class TaskServiceImpl implements TaskService_F {
     @Override
     public void updateStatus(FwqCheckTask fwqCheckTask) {
         fwqTaskDao.updateStatus(fwqCheckTask);
+        //添加状态
+        if(fwqCheckTask.getCheck_status()!=null){
+            TaskStatus taskStatus = new TaskStatus();
+            taskStatus.setCheck_status(fwqCheckTask.getCheck_status());
+            taskStatus.setCheck_status_name((commonService.getCodeMap().get("task_status_"+fwqCheckTask.getCheck_status())).getCode_name());
+            User u = commonService.getUserMap().get((long)fwqCheckTask.getUpdate_user());
+            if(u!=null){
+                taskStatus.setUpdate_username(u.getTruename());
+            }
+            taskStatus.setTask_id((long)fwqCheckTask.getId());
+            fwqTaskDao.insertStatus(taskStatus);
+
+
+        }
     }
 
     @Override
@@ -83,14 +97,17 @@ public class TaskServiceImpl implements TaskService_F {
     }
 
     @Override
-    public void addTask(TaskData_F taskData_f) {
+    public void addTask(TaskData_F taskData_f) throws Exception {
+        List<CheckAreaData> checkAreaData = taskData_f.getCheckAreaData();
+        List<User> users = taskData_f.getUsers();
+
+        CheckTaskPeriod p = commonService.getCheckTaskPeriod(checkAreaData.get(0).getStart_time().getTime(), checkAreaData.get(0).getEnd_time().getTime());
+        if(p==null) {
+           throw new Exception("所选任务超出当前稽查周期内!");
+        }
 
         try {
             //获取列表
-            List<CheckAreaData> checkAreaData = taskData_f.getCheckAreaData();
-            List<User> users = taskData_f.getUsers();
-
-            CheckTaskPeriod p = commonService.getCheckTaskPeriod(checkAreaData.get(0).getStart_time().getTime(), checkAreaData.get(0).getEnd_time().getTime());
 
             List<FwqCheckTask> tasks = new ArrayList<>();
             int count = checkAreaData.size() / users.size();
@@ -134,10 +151,6 @@ public class TaskServiceImpl implements TaskService_F {
                 }catch (Exception e){
                     logger.error(e.getMessage());
                 }
-
-
-
-
             }
         }catch (Exception e){
             logger.error(e.getMessage());

+ 3 - 3
Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/application.properties

@@ -18,7 +18,7 @@ dubbo.protocol.status = server
 ## RegistryConfig Bean
 dubbo.registry.id = fjq_service
 #dubbo.registry.address = zookeeper://git.topm.win:9994
-dubbo.registry.address = zookeeper://localhost:2181
+dubbo.registry.address = zookeeper://127.0.0.1:2181
 dubbo.registry.file = ./output/dubbo1.cache
 dubbo.reference.check=false
 dubbo.consumer.check=false
@@ -26,9 +26,9 @@ dubbo.consumer.check=false
 
 
 #master.datasource.url = jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf-8
-master.datasource.url = jdbc:mysql://git.topm.win:9002/visualinspection_2?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://192.168.45.158:3306/visualinspection_2?useUnicode=true&characterEncoding=utf-8
 #master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
-#master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
+#master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection_2?useUnicode=true&characterEncoding=utf-8
 master.datasource.username = root
 master.datasource.password = root
 master.datasource.driver-class-name = com.mysql.jdbc.Driver

+ 36 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/logback.xml

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

+ 79 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CheckAppeal_F.java

@@ -0,0 +1,79 @@
+package com.xintong.visualinspection.bean;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class CheckAppeal_F implements Serializable {
+	//编号
+    private Long id;
+    //申诉证据
+    private String file_src;
+    //申诉状态
+    private Integer check_status;
+    //状态名称
+    private String check_status_name;
+    //申诉时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date appeal_time;
+    //更新时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date update_time;
+    //申诉人
+    private Long appeal_man;
+    //核实人
+    private Long verify_person;
+    //申诉部门
+    private Long appeal_dept;
+    //考核任务
+    private Long task_id;
+    //备注
+    private String remark;
+    //申诉原因
+    private String appeal_reason;
+    //复核结果
+    private String recheck_result;
+    
+    
+    //申诉人
+    private String appeal_man_name;
+    //核实人
+    private String verify_person_name;
+    //申诉部门
+    private String appeal_dept_name;
+    
+    
+    //稽查任务关联信息
+    //任务名称
+    private String name;
+    //任务开始时间
+    private Date start_time;
+    //任务结束时间
+    private Date end_time;
+    //申诉状态
+    private String code_name;
+    
+    private String code_flag;
+    //任务时间段
+    private String check_period;
+    //第一次稽查人
+    private Long checkman;
+    //第一次稽查人
+    private String checkman_name;
+    //第二次稽查人
+    private Long recheckman;
+    //第二次稽查人
+    private String recheckman_name;
+    //申诉结果
+    private Integer appeal_result;
+
+
+}

+ 61 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/CheckApply_F.java

@@ -0,0 +1,61 @@
+package com.xintong.visualinspection.bean;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class CheckApply_F implements Serializable {
+	//编号
+    private Long id;
+    //申诉证据
+    private String apply_reason;
+    //申诉状态
+    private Integer check_status;
+    //申诉时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date apply_time;
+    //更新时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date update_time;
+    //申诉人
+    private Long apply_man;
+    //核实人
+    private Long verify_person;
+    //申诉部门
+    private Long apply_dept;
+    //考核任务
+    private Long task_id;
+    //备注
+    private String remark;
+    
+    
+    //申诉人
+    private String apply_man_name;
+    //核实人
+    private String verify_person_name;
+    //申诉部门
+    private String apply_dept_name;
+    
+    
+    //稽查任务关联信息
+    //任务名称
+    private String name;
+    //任务开始时间
+    private Date start_time;
+    //任务结束时间
+    private Date end_time;
+    //申诉状态
+    private String code_name;
+    
+    private Long[] apply_ids;
+    
+    private Integer count;
+
+    private boolean isappeal;
+}

+ 5 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqCheckTask.java

@@ -17,6 +17,7 @@ public class FwqCheckTask implements Serializable {
     private Integer id;
     private String name;
     private Integer check_status;
+    private Integer[] check_status_arr;
     private Integer area_id;
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date create_time;
@@ -43,6 +44,10 @@ public class FwqCheckTask implements Serializable {
 
     private Long update_user;
 
+    private Integer hasScore;
+
+    private Integer invalidFrom;
+
 
 //            `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
 //            `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务名称',

+ 57 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqScore.java

@@ -0,0 +1,57 @@
+package com.xintong.visualinspection.bean;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 文件名:ScoreDeducting
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class FwqScore implements Serializable {
+    //编号
+    private Long id;
+    //任务id
+    private Long task_id;
+    //更新时间
+    @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 pics;
+    //视频数组
+    private String videos;
+    //考核项id
+    private Long check_item_id;
+    
+    private String check_item_name;
+    
+    private Integer check_item_score;
+    //扣分内容
+    private String content;
+    //考核人员ids
+    private String checkman;
+    //被考核人员id
+    private Long checked_area;
+    //被考核人员名称
+    private String checked_area_name;
+    //被考核部门
+    private Long checked_dept;
+    //备注
+    private String remark;
+    
+    //查询开始时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date start_time;
+    //查询结束时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")  
+    private Date end_time;
+    
+    private Long update_user;
+}

+ 4 - 4
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqStatisticsBean.java

@@ -72,14 +72,14 @@ public class FwqStatisticsBean implements Serializable {
     // 平均人均扣分
     private float check_score_avg;
 
-    private List<String> checked_socre_name = new ArrayList<>();
+    private List<String> checked_socre_name = new ArrayList<String>();
 
-    private List<Integer> checked_score = new ArrayList<>();
+    private List<Integer> checked_score = new ArrayList<Integer>();
 
-    private List<Integer> seq_checked_score = new ArrayList<>();
+    private List<Integer> seq_checked_score = new ArrayList<Integer>();
 
     private List<Organ> dept_list;
-    private List<Integer> checked_score_ids = new ArrayList<>();
+    private List<Integer> checked_score_ids = new ArrayList<Integer>();
 
 
     private String start_score;

+ 26 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CheckAppealService_F.java

@@ -0,0 +1,26 @@
+package com.xintong.visualinspection.service;
+
+import com.xintong.visualinspection.bean.CheckAppeal_F;
+
+import java.util.List;
+
+/**
+ * 
+ *
+ * ConstantService
+ * 
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ * 
+ * @version 1.0.0
+ *
+ */
+public interface CheckAppealService_F {
+    public List<CheckAppeal_F> getList(CheckAppeal_F param);
+    public CheckAppeal_F getById(Long id);
+    public CheckAppeal_F getByTaskId(Long id);
+    public void insert(CheckAppeal_F checkAppeal);
+    public void update(CheckAppeal_F checkAppeal);
+    public void delete(Long id);
+}

+ 28 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CheckApplyService_F.java

@@ -0,0 +1,28 @@
+package com.xintong.visualinspection.service;
+
+import com.xintong.visualinspection.bean.CheckApply_F;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 
+ *
+ * ConstantService
+ * 
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ * 
+ * @version 1.0.0
+ *
+ */
+public interface CheckApplyService_F {
+    public List<CheckApply_F> getList(CheckApply_F param);
+    public CheckApply_F getById(Long id);
+    public CheckApply_F getByTaskId(Long id);
+    public void insert(CheckApply_F checkApply);
+    public void update(CheckApply_F checkApply);
+    public void delete(Long id);
+    public List<CheckApply_F> getTopReasonList(Map<String, Object> param);
+}

+ 1 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CommonService.java

@@ -25,4 +25,5 @@ public interface CommonService {
 
     //获取周期信息
     public CheckTaskPeriod getCheckTaskPeriod(Long startDate,Long endDate);
+
 }

+ 31 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/ScoreService_F.java

@@ -0,0 +1,31 @@
+package com.xintong.visualinspection.service;
+
+import com.xintong.visualinspection.bean.FwqScore;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 
+ *
+ * ConstantService
+ * 
+ * tiger
+ * tiger
+ * 2017年5月4日 上午10:41:40
+ * 
+ * @version 1.0.0
+ *
+ */
+public interface ScoreService_F {
+	public List<FwqScore> getAll();
+    public FwqScore getOne(Long id);
+    public List<FwqScore> getScoreList(FwqScore score);
+    public List<FwqScore> getScoreListByTaskId(Long task_id);
+    public void insert(FwqScore score);
+    public void update(FwqScore score);
+    public void updateByTaskIdAndPerson(FwqScore score);
+    public void delete(Long id);
+    public List<FwqScore> getTopRemarkList(Map<String, Object> param);
+    public void backoutScore(FwqScore score);
+}

+ 1 - 1
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/TaskService_F.java

@@ -11,7 +11,7 @@ public interface TaskService_F {
     public void addTask(FwqCheckTask fwqCheckTask);
     public void updateStatus(FwqCheckTask fwqCheckTask);
     public FwqCheckTask getTask(FwqCheckTask fwqCheckTask);
-    public void addTask(TaskData_F taskData_f);
+    public void addTask(TaskData_F taskData_f)  throws Exception;
 
     public List<TaskStatus> getTaskStatusList(Long id);