温红权 8 rokov pred
rodič
commit
5fa83eba00

BIN
.DS_Store


+ 126 - 113
VisualInspection/js/mytask/apply_task.js

@@ -1,126 +1,138 @@
-
-    function initApplyPage(){
-        // 仅选择日期
-        $("#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"
-        });
-        setFeSelect("#fsList");
-        setFeePersonSelect("#feePersonList",null,null);
-        $('#fsList').change(function(){ 
-            setFeePersonSelect("#feePersonList",null,$("#fsList").val());
-        }) 
+function initApplyPage() {
+    // 仅选择日期
+    $("#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"
+    });
+    setFeSelect("#fsList");
+    setFeePersonSelect("#feePersonList", null, null);
+    $('#fsList').change(function() {
+            setFeePersonSelect("#feePersonList", null, $("#fsList").val());
+        })
         //获取页面参数
-        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();
-        }
-        
-        queryUnexaminedTask();
+    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'}]);
+    $.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(){
+function queryUnexaminedTask() {
     initTableRowBtn();
     var start_time = "";
-    if($("#start_time").val()) start_time = $("#start_time").val()+" 00:00:00";
+    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"; 
+    if ($("#end_time").val()) end_time = $("#end_time").val() + " 23:59:59";
+
+
+    var check_ss = $("#check_ss").prop("checked");
+    var check_zc = $("#check_zc").prop("checked");
+
+    console.log("check_ss:" + check_ss);
+    console.log("check_zc:" + check_zc);
+
+
     var data = {
         "start_time": start_time,
         "end_time": end_time,
         "checked_dept": $("#fsList").val(),
         "checked_person": $("#feePersonList").val(),
-        "check_status":cur_status
-    }
+        "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')) {
+    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: 80, text: '考核人员', type: 'string', flex: true, colClass: '',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: 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);  
+        { 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, colClass: '', 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: 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);
+    } else {
+        colFunc.oper = $.zui.store.get("task_table_btn_" + cur_status);
     }
     console.log(colFunc.oper);
     cols.push(colFunc);
     var checkable = false;
-    if(cur_status==21 && hasRole(ROLE_JICHA_ADMIN)){
+    if (cur_status == 21 && hasRole(ROLE_JICHA_ADMIN)) {
         checkable = true;
     }
-    $('#unexamined_datatable').mytable({'cols':cols,
-                            'checkable':checkable,
-                            'url':"/task/getTaskList/",
-                            'param':data}
-                            );
+    $('#unexamined_datatable').mytable({
+        'cols': cols,
+        'checkable': checkable,
+        'url': "/task/getTaskList/",
+        'param': data
+    });
 }
 //进入稽查页面
-function showCheck(id){
-    $.checkTask =getItemByIdFromArr(id,$('#unexamined_datatable').mytable('getTableData'));
-    if(typeof($.checkTask)!="undefined" && typeof($.checkTask.appeal) != "undefined"){
+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('/task/update', {"id":$.checkTask.id,"check_status":21,"record_status":1,"check_status_name":"复查"});
+    no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 21, "record_status": 1, "check_status_name": "复查" });
     changePage("/view/mytask/check.html");
 }
 
-function showApplyDetail1(id){
+function showApplyDetail1(id) {
     layer.open({
         type: 1,
-        area: ['400px','500px'],
+        area: ['400px', '500px'],
         title: '申请处理',
         closeBtn: 1,
         shadeClose: true,
@@ -128,30 +140,30 @@ function showApplyDetail1(id){
         content: $('#apply_detail_div'),
         btn: ['关闭'],
         btnAlign: 'c', //按钮居中
-        shade: 0 ,//不显示遮罩
-        yes: function(index){
+        shade: 0, //不显示遮罩
+        yes: function(index) {
             layer.close(index);
         }
     });
     var param = {
-        'id':id
+        'id': id
     };
     $('#apply_man').val("");
     $('#apply_time').val("");
     $('#apply_reason').val("");
-    $('#apply_id').val("");   
+    $('#apply_id').val("");
     post_common_service('/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);        
+        $('#apply_id').val(data.id);
     });
 }
 
-function showApplyDetail(id){
+function showApplyDetail(id) {
     layer.open({
         type: 1,
-        area: ['400px','500px'],
+        area: ['400px', '500px'],
         title: '申请处理',
         closeBtn: 1,
         shadeClose: true,
@@ -159,49 +171,50 @@ function showApplyDetail(id){
         content: $('#apply_detail_div'),
         btn: ['同意', '拒绝'],
         btnAlign: 'c', //按钮居中
-        shade: 0 ,//不显示遮罩
-        yes: function(index){
+        shade: 0, //不显示遮罩
+        yes: function(index) {
             aggreeApply(id);
             layer.close(index);
         },
-        btn2: function(index){
+        btn2: function(index) {
             refuseApply(id)
             layer.close(index);
         }
     });
     var param = {
-        'id':id
+        'id': id
     };
     $('#apply_man').val("");
     $('#apply_time').val("");
     $('#apply_reason').val("");
-    $('#apply_id').val("");  
+    $('#apply_id').val("");
     post_common_service('/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);        
+        $('#apply_id').val(data.id);
     });
 }
-function aggreeApply(taskId){
+
+function aggreeApply(taskId) {
     var param = {
-        'id':$('#apply_id').val(),
-        'task_id':taskId
+        'id': $('#apply_id').val(),
+        'task_id': taskId
     };
-    addOrUpdateItem4Common(param,'/checkApply/agree',queryUnexaminedTask);
+    addOrUpdateItem4Common(param, '/checkApply/agree', queryUnexaminedTask);
 }
 
-function refuseApply(taskId){
-     var param = {
-        'id':$('#apply_id').val(),
-        'task_id':taskId
+function refuseApply(taskId) {
+    var param = {
+        'id': $('#apply_id').val(),
+        'task_id': taskId
     };
-    addOrUpdateItem4Common(param,'/checkApply/refuse',queryUnexaminedTask);
+    addOrUpdateItem4Common(param, '/checkApply/refuse', queryUnexaminedTask);
 }
 
-function agreeApplyTaskPatch(){
+function agreeApplyTaskPatch() {
     var param = {
-        'apply_ids':$('#unexamined_datatable').mytable('getTableCheckedIds')
+        'apply_ids': $('#unexamined_datatable').mytable('getTableCheckedIds')
     };
-    addOrUpdateItem4Common(param,'/checkApply/agreePatch',queryUnexaminedTask);
+    addOrUpdateItem4Common(param, '/checkApply/agreePatch', queryUnexaminedTask);
 }

+ 25 - 8
VisualInspection/view/mytask/apply_task.html

@@ -1,17 +1,17 @@
 <script src="/js/mytask/apply_task.js?__inline"></script>
 <div class="container-fluid ">
     <div class="row">
-        <form  class="form-horizontal">
+        <form class="form-horizontal">
             <div class="form-group">
                 <label for="exampleInputAccount1" class="col-sm-1">稽查日期</label>
-                <div class="col-sm-2">
+                <div class="col-sm-1" style="padding:0;width:80px">
                     <input type="text" id="start_time" class="form-control form-date" placeholder="开始时间">
                 </div>
-                <div class="col-sm-2">
+                <div class="col-sm-1" style="padding:0;margin-left:2px">
                     <input type="text" id="end_time" class="form-control form-date" placeholder="截止时间">
                 </div>
                 <label for="exampleInputAccount1" class="col-sm-1">考核部门</label>
-                <div class="col-sm-2">
+                <div class="col-sm-1" style="padding:0;;width:120px">
                     <select class="form-control" id="fsList">
                     </select>
                 </div>
@@ -22,6 +22,24 @@
                         </select>
                     </div>
                 </div>
+                <div class="form-group col-sm-3" style="text-align:center">
+                    <div class="col-sm-6">
+                        <div class="checkbox">
+                            <label>
+                              <input type="checkbox" id="check_ss" > 申诉任务
+                            </label>
+                        </div>
+                    </div>
+                    <div class="col-sm-6">
+                        <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;">
@@ -36,11 +54,10 @@
     <div id="unexamined_datatable"></div>
 </div>
 <div id="apply_detail_div" style="display:none;text-align:center;">
-    <link rel="import" href="/view/mytask/applyDetail.html?__inline">   
-</div> 
+    <link rel="import" href="/view/mytask/applyDetail.html?__inline">
+</div>
 <script>
     $(document).ready(function() {
         initApplyPage();
     });
-
-</script>
+</script>

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

@@ -100,4 +100,6 @@ public class Task{
     private Long monitor_user_id;
     
     private String monitor_user_name;
+
+    private Integer invalidFrom;
 }

+ 209 - 176
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml

@@ -1,29 +1,30 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xintong.visualinspection.dao.master.TaskDao" >
-    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.Task" >
-        <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="name" property="name" jdbcType="VARCHAR" />
-        <result column="check_status" property="check_status" jdbcType="INTEGER" />
-        <result column="check_status_name" property="check_status_name" jdbcType="VARCHAR" />
-        <result column="video_id" property="video_id" jdbcType="VARCHAR" />
-        <result column="create_time" property="create_time" jdbcType="VARCHAR" />
-        <result column="update_time" property="update_time" jdbcType="VARCHAR" />
-        <result column="start_time" property="start_time" jdbcType="VARCHAR" />
-        <result column="end_time" property="end_time" jdbcType="VARCHAR" />
-        <result column="checkman" property="checkman" jdbcType="INTEGER" />
-        <result column="recheckman" property="recheckman" jdbcType="INTEGER" />
-        <result column="checked_person" property="checked_person" jdbcType="INTEGER" />
-        <result column="checked_dept" property="checked_dept" jdbcType="INTEGER" />
-        <result column="rule_id" property="rule_id" jdbcType="INTEGER" />
-        <result column="checked_location" property="checked_location" jdbcType="VARCHAR" />
-        <result column="checked_location_type" property="checked_location_type" jdbcType="INTEGER" />
-        <result column="remark" property="remark" jdbcType="VARCHAR" />
-        <result column="check_period" property="check_period" jdbcType="VARCHAR" />
-        <result column="class_type" property="class_type" jdbcType="INTEGER" />
-        <result column="period_id" property="period_id" jdbcType="INTEGER" />
-        <result column="monitor_user_id" property="monitor_user_id" jdbcType="INTEGER" />
-        <result column="appeal_result" property="appeal_result" jdbcType="INTEGER" />
+<mapper namespace="com.xintong.visualinspection.dao.master.TaskDao">
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.Task">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="check_status" property="check_status" jdbcType="INTEGER"/>
+        <result column="check_status_name" property="check_status_name" jdbcType="VARCHAR"/>
+        <result column="video_id" property="video_id" jdbcType="VARCHAR"/>
+        <result column="create_time" property="create_time" jdbcType="VARCHAR"/>
+        <result column="update_time" property="update_time" jdbcType="VARCHAR"/>
+        <result column="start_time" property="start_time" jdbcType="VARCHAR"/>
+        <result column="end_time" property="end_time" jdbcType="VARCHAR"/>
+        <result column="checkman" property="checkman" jdbcType="INTEGER"/>
+        <result column="recheckman" property="recheckman" jdbcType="INTEGER"/>
+        <result column="checked_person" property="checked_person" jdbcType="INTEGER"/>
+        <result column="checked_dept" property="checked_dept" jdbcType="INTEGER"/>
+        <result column="rule_id" property="rule_id" jdbcType="INTEGER"/>
+        <result column="checked_location" property="checked_location" jdbcType="VARCHAR"/>
+        <result column="checked_location_type" property="checked_location_type" jdbcType="INTEGER"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="check_period" property="check_period" jdbcType="VARCHAR"/>
+        <result column="class_type" property="class_type" jdbcType="INTEGER"/>
+        <result column="period_id" property="period_id" jdbcType="INTEGER"/>
+        <result column="monitor_user_id" property="monitor_user_id" jdbcType="INTEGER"/>
+        <result column="appeal_result" property="appeal_result" jdbcType="INTEGER"/>
+        <result column="invalid_from" property="invalidFrom" jdbcType="INTEGER"/>
     </resultMap>
     <resultMap id="taskStatusMap" type="com.xintong.visualinspection.bean.TaskStatus">
         <id property="id" column="ID"/>
@@ -42,146 +43,178 @@
         <result property="period_id" column="period_id"/>
     </resultMap>
 
-    <select id="getAll" resultMap="BaseResultMap"  >
+    <select id="getAll" resultMap="BaseResultMap">
         SELECT *
         FROM check_task
         order by start_time desc
     </select>
 
-    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap">
         SELECT *
         FROM check_task
         WHERE id = #{id}
     </select>
-    
-    <select id="getTaskStatusList" parameterType="java.lang.Long" resultMap="taskStatusMap" >
+
+    <select id="getTaskStatusList" parameterType="java.lang.Long" resultMap="taskStatusMap">
         SELECT *
         FROM check_task_status
         WHERE task_id = #{id}
         order by update_time
     </select>
 
-    <select id="getTaskListByDept" parameterType="com.xintong.visualinspection.pojo.TaskListByDeptAppeal" resultMap="BaseResultMap" >
+    <select id="getTaskListByDept" parameterType="com.xintong.visualinspection.pojo.TaskListByDeptAppeal"
+            resultMap="BaseResultMap">
         select * from check_task where id in
         (select task_id from check_appeal where appeal_dept = #{deptId}
         <if test="start_time != null">AND appeal_time &gt;= #{start_time}</if>
-        <if test="end_time != null">AND appeal_time &lt;=  #{end_time}</if>
+        <if test="end_time != null">AND appeal_time &lt;= #{end_time}</if>
         <if test="status != null">AND appeal_result = #{status}</if>
         )
         order by start_time desc
     </select>
 
 
-
-    
-    <select id="getList" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
+    <select id="getList" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap">
         SELECT t.*,
-        		CONCAT(substr(t.start_time,1,16),'-',substr(t.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=t.check_status) as check_status_name,
-        	 ca.appeal_result as appeal_result
+        CONCAT(substr(t.start_time,1,16),'-',substr(t.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=t.check_status) as
+        check_status_name,
+        ca.appeal_result as appeal_result
         FROM check_task t left join t_sys_users u on t.checked_person=u.id
-        	 left join check_appeal ca on t.id=ca.task_id
+        left join check_appeal ca on t.id=ca.task_id
         WHERE 1=1
-        	<if test="check_status != null">AND t.check_status = #{check_status}</if>
-        	<if test="check_status_end != null">AND t.check_status &lt;= #{check_status_end}</if>
-        	<if test="start_time != null">AND t.start_time &gt;= #{start_time}</if>
-        	<if test="end_time != null">AND t.end_time &lt;= #{end_time}</if>
-        	<if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
-        	<if test="checkman != null">AND t.checkman = #{checkman}</if>
-        	<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
-        	<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
-        	<if test="position_id != null">AND u.positionid = #{position_id}</if>
-        	<if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
-        	<if test="hasScore == 1">AND 
-        		t.id in (select task_id from check_score)
-        	</if>
-        	<if test="hasScore == 2">AND 
-        		t.id not in (select task_id from check_score)
-        	</if>
-        	<if test="dispatch_ids != null and dispatch_ids.length > 0">AND
-        		t.id in 
-        		<foreach collection="dispatch_ids" item="dispatch_id" index="index"
-		            open="(" close=")" separator=",">
-		            #{dispatch_id}
-		        </foreach>
-        	</if>
-         order by t.start_time desc
+        <if test="check_status != null">AND t.check_status = #{check_status}</if>
+        <if test="check_status_end != null">AND t.check_status &lt;= #{check_status_end}</if>
+        <if test="start_time != null">AND t.start_time &gt;= #{start_time}</if>
+        <if test="end_time != null">AND t.end_time &lt;= #{end_time}</if>
+        <if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
+        <if test="checkman != null">AND t.checkman = #{checkman}</if>
+        <if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
+        <if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
+        <if test="position_id != null">AND u.positionid = #{position_id}</if>
+        <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
+        <if test="hasScore == 1">AND
+            t.id in (select task_id from check_score)
+        </if>
+        <if test="hasScore == 2">AND
+            t.id not in (select task_id from check_score)
+        </if>
+        <if test="dispatch_ids != null and dispatch_ids.length > 0">AND
+            t.id in
+            <foreach collection="dispatch_ids" item="dispatch_id" index="index"
+                     open="(" close=")" separator=",">
+                #{dispatch_id}
+            </foreach>
+        </if>
+        <if test="invalidFrom == -1">AND
+            ( t.invalid_from = 0 OR t.invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            t.invalid_from = #{invalidFrom}
+        </if>
+
+        order by t.start_time desc
     </select>
-    
-    <select id="getListInStatus" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
+
+    <select id="getListInStatus" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap">
         SELECT t.*,
-        		CONCAT(substr(t.start_time,1,16),'-',substr(t.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=t.check_status) as check_status_name,
-        	  ca.appeal_result as appeal_result
+        CONCAT(substr(t.start_time,1,16),'-',substr(t.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=t.check_status) as
+        check_status_name,
+        ca.appeal_result as appeal_result
         FROM check_task t left join t_sys_users u on t.checked_person=u.id
-        	 left join check_appeal ca on t.id=ca.task_id
+        left join check_appeal ca on t.id=ca.task_id
         WHERE 1=1
-       		<if test="check_status_arr != null and check_status_arr.length > 0">AND
-        		t.check_status in 
-        		<foreach collection="check_status_arr" item="status" index="index"
-		            open="(" close=")" separator=",">
-		            #{status}
-		        </foreach>
-        	</if>
-        	<if test="start_time != null">AND t.start_time &gt;= #{start_time}</if>
-        	<if test="end_time != null">AND t.end_time &lt;= #{end_time}</if>
-        	<if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
-        	<if test="checkman != null">AND t.checkman = #{checkman}</if>
-        	<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
-        	<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
-        	<if test="position_id != null">AND u.positionid = #{position_id}</if>
-        	<if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
-        	<if test="hasScore == 1">AND 
-        		t.id in (select task_id from check_score)
-        	</if>
-        	<if test="hasScore == 2">AND 
-        		t.id not in (select task_id from check_score)
-        	</if>
-        	<if test="dispatch_ids != null and dispatch_ids.length > 0">AND
-        		t.id in 
-        		<foreach collection="dispatch_ids" item="dispatch_id" index="index"
-		            open="(" close=")" separator=",">
-		            #{dispatch_id}
-		        </foreach>
-        	</if>
+        <if test="check_status_arr != null and check_status_arr.length > 0">AND
+            t.check_status in
+            <foreach collection="check_status_arr" item="status" index="index"
+                     open="(" close=")" separator=",">
+                #{status}
+            </foreach>
+        </if>
+        <if test="start_time != null">AND t.start_time &gt;= #{start_time}</if>
+        <if test="end_time != null">AND t.end_time &lt;= #{end_time}</if>
+        <if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
+        <if test="checkman != null">AND t.checkman = #{checkman}</if>
+        <if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
+        <if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
+        <if test="position_id != null">AND u.positionid = #{position_id}</if>
+        <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
+        <if test="hasScore == 1">AND
+            t.id in (select task_id from check_score)
+        </if>
+        <if test="hasScore == 2">AND
+            t.id not in (select task_id from check_score)
+        </if>
+        <if test="dispatch_ids != null and dispatch_ids.length > 0">AND
+            t.id in
+            <foreach collection="dispatch_ids" item="dispatch_id" index="index"
+                     open="(" close=")" separator=",">
+                #{dispatch_id}
+            </foreach>
+        </if>
+        <if test="invalidFrom == -1">AND
+            ( t.invalid_from = 0 OR t.invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            t.invalid_from = #{invalidFrom}
+        </if>
         order by t.start_time desc
     </select>
-    <select id="getListByChecked" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
+    <select id="getListByChecked" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap">
         SELECT t.*,
-        	  CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,11,6)) as check_period,
-              (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name,
-        	 ca.appeal_result as appeal_result
-        FROM check_task  t left join t_sys_users u on t.checked_person=u.id
-        	  left join check_appeal ca on t.id=ca.task_id
+        CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,11,6)) as check_period,
+        (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as
+        check_status_name,
+        ca.appeal_result as appeal_result
+        FROM check_task t left join t_sys_users u on t.checked_person=u.id
+        left join check_appeal ca on t.id=ca.task_id
         WHERE 1=1
-        	<if test="check_status != null">AND t.check_status &gt;= #{check_status}</if>
-        	<if test="start_time != null">AND t.start_time &gt;= #{start_time}</if>
-        	<if test="end_time != null">AND t.end_time &lt;= #{end_time}</if>
-        	<if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
-        	<if test="checkman != null">AND t.checkman = #{checkman}</if>
-        	<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
-        	<if test="period_id != null">AND t.period_id = #{period_id}</if>
-        	<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
-        	<if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
+        <if test="check_status != null">AND t.check_status &gt;= #{check_status}</if>
+        <if test="start_time != null">AND t.start_time &gt;= #{start_time}</if>
+        <if test="end_time != null">AND t.end_time &lt;= #{end_time}</if>
+        <if test="checked_dept != null">AND t.checked_dept = #{checked_dept}</if>
+        <if test="checkman != null">AND t.checkman = #{checkman}</if>
+        <if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
+        <if test="period_id != null">AND t.period_id = #{period_id}</if>
+        <if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
+        <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
+        <if test="invalidFrom == -1">AND
+            ( t.invalid_from = 0 OR t.invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            t.invalid_from = #{invalidFrom}
+        </if>
         order by t.start_time desc
     </select>
 
-	<select id="getListBySubmited" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
+    <select id="getListBySubmited" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap">
         SELECT *,
-        	  CONCAT(substr(start_time,1,16),'-',substr(end_time,11,6)) as check_period,
-              (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=check_status) as check_status_name
+        CONCAT(substr(start_time,1,16),'-',substr(end_time,11,6)) as check_period,
+        (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=check_status) as
+        check_status_name
         FROM check_task
         WHERE 1=1
-        	<if test="check_status != null">AND check_status &gt;= #{check_status}</if>
-        	<if test="check_status_end != null">AND check_status &lt;= #{check_status_end}</if>
-        	<if test="start_time != null">AND start_time &gt;= #{start_time}</if>
-        	<if test="end_time != null">AND end_time &lt;= #{end_time}</if>
-        	<if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
-        	<if test="checkman != null">AND checkman = #{checkman}</if>
-        	<if test="recheckman != null">AND recheckman = #{recheckman}</if>
-        	<if test="checked_person != null">AND checked_person = #{checked_person}</if>
+        <if test="check_status != null">AND check_status &gt;= #{check_status}</if>
+        <if test="check_status_end != null">AND check_status &lt;= #{check_status_end}</if>
+        <if test="start_time != null">AND start_time &gt;= #{start_time}</if>
+        <if test="end_time != null">AND end_time &lt;= #{end_time}</if>
+        <if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
+        <if test="checkman != null">AND checkman = #{checkman}</if>
+        <if test="recheckman != null">AND recheckman = #{recheckman}</if>
+        <if test="checked_person != null">AND checked_person = #{checked_person}</if>
+        <if test="invalidFrom == -1">AND
+            ( t.invalid_from = 0 OR t.invalid_from = 1)
+        </if>
+
+        <if test="invalidFrom != null  and invalidFrom != -1">AND
+            t.invalid_from = #{invalidFrom}
+        </if>
     </select>
-    <insert id="insert" parameterType="com.xintong.visualinspection.bean.Task" >
+    <insert id="insert" parameterType="com.xintong.visualinspection.bean.Task">
         INSERT INTO check_task
         (name,check_status,video_id,create_time,update_time,start_time,
         	end_time,checkman,checked_person,checked_dept,rule_id,checked_location,
@@ -193,8 +226,8 @@
         	#{checked_location_type},#{remark}
         )
     </insert>
-    
-    <insert id="insertStatus" parameterType="com.xintong.visualinspection.bean.TaskStatus" >
+
+    <insert id="insertStatus" parameterType="com.xintong.visualinspection.bean.TaskStatus">
         INSERT INTO check_task_status
         (task_id,update_time,update_user,update_username,check_status,
         	check_status_name
@@ -204,20 +237,20 @@
         	#{check_status_name}
         )
     </insert>
-    <insert id="insertStatusBatch" parameterType="java.util.List" >
+    <insert id="insertStatusBatch" parameterType="java.util.List">
         INSERT INTO check_task_status
         (task_id,update_time,update_user,update_username,check_status,
-        	check_status_name
+        check_status_name
         )
         VALUES
-        <foreach collection="list" item="item" index="index" separator="," >  
-	        (#{item.task_id}, #{item.update_time},#{item.update_user},#{item.update_username},#{item.check_status},
-	        	#{item.check_status_name}
-	        ) 
-	    </foreach>  
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.task_id}, #{item.update_time},#{item.update_user},#{item.update_username},#{item.check_status},
+            #{item.check_status_name}
+            )
+        </foreach>
     </insert>
 
-    <update id="update" parameterType="com.xintong.visualinspection.bean.Task" >
+    <update id="update" parameterType="com.xintong.visualinspection.bean.Task">
         UPDATE
         check_task
         SET
@@ -238,76 +271,76 @@
         WHERE
         id = #{id}
     </update>
-	
-	<update id="dispatch" parameterType="com.xintong.visualinspection.bean.Task" >
+
+    <update id="dispatch" parameterType="com.xintong.visualinspection.bean.Task">
         UPDATE
-        	check_task
+        check_task
         SET
-	        <if test="update_check_status != null">check_status = #{update_check_status},</if>
-	        update_time = now()
+        <if test="update_check_status != null">check_status = #{update_check_status},</if>
+        update_time = now()
         WHERE 1=1
-        	<if test="check_status != null">AND check_status = #{check_status}</if>
-        	<if test="start_time != null">AND create_time &gt;= #{start_time}</if>
-        	<if test="end_time != null">AND create_time &lt;= #{end_time}</if>
-        	<if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
-        	<if test="checkman != null">AND checkman = #{checkman}</if>
-        	<if test="checked_person != null">AND checked_person = #{checked_person}</if>
-        	<if test="dispatch_ids != null and dispatch_ids.length > 0">AND
-        		id in 
-        		<foreach collection="dispatch_ids" item="dispatch_id" index="index"
-		            open="(" close=")" separator=",">
-		            #{dispatch_id}
-		        </foreach>
-        	</if>
-        	<if test="hasScore == 1">AND 
-        		id in (select task_id from check_score)
-        	</if>
-        	<if test="hasScore == 2">AND 
-        		id not in (select task_id from check_score)
-        	</if>
+        <if test="check_status != null">AND check_status = #{check_status}</if>
+        <if test="start_time != null">AND create_time &gt;= #{start_time}</if>
+        <if test="end_time != null">AND create_time &lt;= #{end_time}</if>
+        <if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
+        <if test="checkman != null">AND checkman = #{checkman}</if>
+        <if test="checked_person != null">AND checked_person = #{checked_person}</if>
+        <if test="dispatch_ids != null and dispatch_ids.length > 0">AND
+            id in
+            <foreach collection="dispatch_ids" item="dispatch_id" index="index"
+                     open="(" close=")" separator=",">
+                #{dispatch_id}
+            </foreach>
+        </if>
+        <if test="hasScore == 1">AND
+            id in (select task_id from check_score)
+        </if>
+        <if test="hasScore == 2">AND
+            id not in (select task_id from check_score)
+        </if>
     </update>
-    
-    <update id="dispatchById" parameterType="com.xintong.visualinspection.bean.Task" >
+
+    <update id="dispatchById" parameterType="com.xintong.visualinspection.bean.Task">
         UPDATE
-        	check_task
+        check_task
         SET
-	        <if test="check_status != null">check_status = #{check_status},</if>
-	        update_time = now()
+        <if test="check_status != null">check_status = #{check_status},</if>
+        update_time = now()
         WHERE id=#{id}
     </update>
-    
-    <delete id="delete" parameterType="java.lang.Long" >
+
+    <delete id="delete" parameterType="java.lang.Long">
         DELETE FROM
         check_task
         WHERE
         id =#{id}
     </delete>
-    <delete id="deleteInvalidTaskCount" parameterType="java.lang.Long" >
+    <delete id="deleteInvalidTaskCount" parameterType="java.lang.Long">
         DELETE FROM
         	check_user_count
         WHERE
         	task_id =#{id}
     </delete>
-    <update id="updateInvalidTaskCount" parameterType="com.xintong.visualinspection.bean.Task" >
+    <update id="updateInvalidTaskCount" parameterType="com.xintong.visualinspection.bean.Task">
         UPDATE
-        	check_user_count
+        check_user_count
         SET
-	        <if test="checked_person != null">user_id = #{checked_person}</if>
+        <if test="checked_person != null">user_id = #{checked_person}</if>
         WHERE task_id=#{id}
     </update>
-    <select id="getUserCount" parameterType="com.xintong.visualinspection.bean.Task" resultMap="userCountMap" >
+    <select id="getUserCount" parameterType="com.xintong.visualinspection.bean.Task" resultMap="userCountMap">
         SELECT *
         FROM check_task
         WHERE check_status!=22
-          and checked_person = #{checked_person}
-          <if test="class_type != null">and class_type = #{class_type}</if>
-          and period_id = (
-          	select period_id
-          	from check_task
-          	where id = #{id}
-          )
+        and checked_person = #{checked_person}
+        <if test="class_type != null">and class_type = #{class_type}</if>
+        and period_id = (
+        select period_id
+        from check_task
+        where id = #{id}
+        )
     </select>
-    <select id="getTaskStatusByType" parameterType="map" resultMap="taskStatusMap" >
+    <select id="getTaskStatusByType" parameterType="map" resultMap="taskStatusMap">
         SELECT *
         FROM check_status
         WHERE task_id = #{task_id}

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

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

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 1617
VisualInspection_server/visual/visual.log


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov