Răsfoiți Sursa

清障队清障记录放空

MSI\liwei 7 ani în urmă
părinte
comite
4db70d335c

+ 71 - 14
VisualInspection/qzd/js/task/add.js

@@ -130,7 +130,23 @@ function inittAreaable(time, dept) {
             };
             reloadtableData();
             $(".completec").mouseover(function() {
-                var titlehtml = "稽查完成";
+                var ids = this.id.split("_");
+                var temp = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                var currentday = temp.add(ids[1], "day");
+                var key = ids[0] + "_" + currentday.format("YYYY-MM-DD");
+                var temphtml = '';
+                for(var i in taskMap.get(key)){
+                    if(taskMap.get(key)[i].id == ids[2]){
+                        var typename = '';
+                        if(taskMap.get(key)[i].type == 1){
+                            typename="抛锚";
+                        }else if(taskMap.get(key)[i].type == 2){
+                            typename="事故";
+                        }
+                        temphtml = '<tr><th>'+typename+'</th><th>'+taskMap.get(key)[i].addr+'</th><th>'+taskMap.get(key)[i].task.check_status_name+'</th></tr>';
+                    }
+               }
+                var titlehtml = '<table border=1 style="border:solid 1px;width:180px;"><tr><th>事件</th><th>桩号</th><th>状态</th></tr>' + temphtml + '</table>';
                 layer.tips(titlehtml, "#" + this.id, {
                     tips: [1, '#8e8e8e'],
                     time: 0,
@@ -144,9 +160,16 @@ function inittAreaable(time, dept) {
                 var key = ids[0] + "_" + currentday.format("YYYY-MM-DD");
                 for(var i in taskMap.get(key)){
                      if(taskMap.get(key)[i].id == ids[2]){
-                        var titlehtml = taskMap.get(key)[i].task.check_status_name;
+                        var typename = '';
+                        if(taskMap.get(key)[i].type == 1){
+                            typename="抛锚";
+                        }else if(taskMap.get(key)[i].type == 2){
+                            typename="事故";
+                        }
+                        temphtml = '<tr><th>'+typename+'</th><th>'+taskMap.get(key)[i].addr+'</th><th>'+taskMap.get(key)[i].task.check_status_name+'</th></tr>';
                      }
                 }
+                var titlehtml = '<table border=1 style="border:solid 1px;width:180px;"><tr><th>事件</th><th>桩号</th><th>状态</th></tr>' + temphtml + '</table>';
                 layer.tips(titlehtml, "#" + this.id, {
                     tips: [1, '#8e8e8e'],
                     time: 0,
@@ -154,7 +177,22 @@ function inittAreaable(time, dept) {
                 });
             });
             $(".unusec").mouseover(function() {
-                var titlehtml = "无效";
+                var ids = this.id.split("_");
+                var temp = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                var currentday = temp.add(ids[1], "day");
+                var key = ids[0] + "_" + currentday.format("YYYY-MM-DD");
+                for(var i in taskMap.get(key)){
+                     if(taskMap.get(key)[i].id == ids[2]){
+                        var typename = '';
+                        if(taskMap.get(key)[i].type == 1){
+                            typename="抛锚";
+                        }else if(taskMap.get(key)[i].type == 2){
+                            typename="事故";
+                        }
+                        temphtml = '<tr><th>'+typename+'</th><th>'+taskMap.get(key)[i].addr+'</th><th>'+'无效'+'</th></tr>';
+                     }
+                }
+                var titlehtml = '<table border=1 style="border:solid 1px;width:180px;"><tr><th>事件</th><th>桩号</th><th>状态</th></tr>' + temphtml + '</table>';
                 layer.tips(titlehtml, "#" + this.id, {
                     tips: [1, '#8e8e8e'],
                     time: 0,
@@ -162,7 +200,22 @@ function inittAreaable(time, dept) {
                 });
             });
             $(".novideoc").mouseover(function() {
-                var titlehtml = "未上传视屏";
+                var ids = this.id.split("_");
+                var temp = moment(moment(t + "-25T23:00:00", "YYYY-MM-DD HH:mm:ss").subtract(1, 'month'));
+                var currentday = temp.add(ids[1], "day");
+                var key = ids[0] + "_" + currentday.format("YYYY-MM-DD");
+                for(var i in taskMap.get(key)){
+                     if(taskMap.get(key)[i].id == ids[2]){
+                        var typename = '';
+                        if(taskMap.get(key)[i].type == 1){
+                            typename="抛锚";
+                        }else if(taskMap.get(key)[i].type == 2){
+                            typename="事故";
+                        }
+                        temphtml = '<tr><th>'+typename+'</th><th>'+taskMap.get(key)[i].addr+'</th><th>'+'未上传视频'+'</th></tr>';
+                     }
+                }
+                var titlehtml = '<table border=1 style="border:solid 1px;width:180px;"><tr><th>事件</th><th>桩号</th><th>状态</th></tr>' + temphtml + '</table>';
                 layer.tips(titlehtml, "#" + this.id, {
                     tips: [1, '#8e8e8e'],
                     time: 0,
@@ -453,17 +506,21 @@ function reloadtableData() {
                     var t = r.task;
                     //未生成任务
                     if (t == null) {
-                        if (r.videos == null || r.videos == undefined || r.videos == "") {
-                            if(r.pics == null || r.pics == undefined || r.pics == ""){
-                                temphtml += '<button data-toggle="button" class="btc novideoc" style="margin:10px;background:#fff;border-color:#fff;color:#03b8cf"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
-                            }else{
-                                temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info7 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
-                            }
-                        } else {
-                            temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info2 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
-                            //temphtml += '<button data-toggle="button" class="btc normal" style="margin:10px" onclick="selectedTask(this)" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
+                        if(r.isApply == 1){
+                            temphtml += '<button data-toggle="button" class="btc noAppy" style="margin:10px;background:#FFDEAD;border-color:#FFDEAD;color:#fff"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "放空任务" + '</button>';
+                        }else{
+                            if (r.videos == null || r.videos == undefined || r.videos == "") {
+                                if(r.pics == null || r.pics == undefined || r.pics == ""){
+                                    temphtml += '<button data-toggle="button" class="btc novideoc" style="margin:10px;background:#fff;border-color:#fff;color:#03b8cf"  type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
+                                }else{
+                                    temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info7 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
+                                }
+                            } else {
+                                temphtml += '<div class="btn-group normal" style="margin:10px;" data-toggle="buttons" id="btn_u_' + user.id + '_r_' + r.id + '"> <label class="btn btn-info2 "> <input type="checkbox"  onchange="selectedTask(this)" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</label></div>';
+                                //temphtml += '<button data-toggle="button" class="btc normal" style="margin:10px" onclick="selectedTask(this)" type="button" id="' + user.id + '_' + i + '_' + r.id + '">' + moment(r.received_time).format("HH:mm") + "~" + moment(r.back_time).format("HH:mm") + '</button>';
+                            } 
                         }
-
+                       
                     } else
                     if (t.check_status == 2 || t.check_status == 7) {
                         //考核进行中

+ 19 - 13
VisualInspection/qzd/js/task/new.js

@@ -92,7 +92,6 @@ function queryTask() {
         { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
         { width: 80, text: '清障队', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'deptName' },
         { width: 80, text: '桩号', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'addr' },
-        { width: 80, text: '车牌号', type: 'string', flex: true, hide: hide, colClass: 'text-center', field: 'car_info' },
         { width: 80, text: '客户信息', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'car_user_info' },
         { width: 120, text: '接警时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'received_time' },
         // { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' },
@@ -108,16 +107,20 @@ function queryTask() {
         $("#saveButton").show();
     } else if (hasRole(ROLE_WRECKER_MANAGER) || hasRole(ROLE_WRECKER_NQ) || hasRole(ROLE_WRECKER)) {
         setMonitor();
-        cols = [
+         cols = [
             { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
+          //  { width: 80, text: '清障队', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'deptName' },
             { width: 80, text: '桩号', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'addr' },
-            { width: 80, text: '车牌号', type: 'string', flex: true, hide: hide, colClass: 'text-center', field: 'car_info' },,
+           // { width: 80, text: '客户信息', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'car_user_info' },
             { width: 120, text: '接警时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'received_time' },
             // { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' },
             { width: 120, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
             // {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
         ];
         var colFunc3 = { width: 160, text: '正副班长', type: 'monitor', flex: true, field: 'id', colClass: 'text-center' };
+       // var colFunc5 = { width: 160, text: '正副班长', type: 'monitor', flex: true, field: 'id', colClass: 'text-center' };
+        //var colFunc3 = { width: 160, text: '视频上传', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
+       // var colFunc4 = { width: 160, text: '是否按时到达', type: 'arrive', flex: true, field: 'id', colClass: 'text-center' };
         var colFunc1 = { width: 160, text: '视频上传', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
         var colFunc2 = { width: 160, text: '图片上传', type: 'imagebutton', flex: true, field: 'pics', colClass: 'text-center' };
         var colFunc = { width: 40, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
@@ -125,10 +128,13 @@ function queryTask() {
         cols.push(colFunc3);
         cols.push(colFunc1);
         cols.push(colFunc2);
+       // cols.push(colFunc3);
+        //cols.push(colFunc5);
         cols.push(colFunc);
         $("#isCompleteDiv").hide();
         $("#isComplete").val(1);
         data.isComplete = 1;
+        data.isApply = 0;
     }
     //只有下发才显示复选框
     var checkable = false;
@@ -235,39 +241,39 @@ function checkUpdate(id) {
         $("#type").val(redata.type);
         $("#carinfo").val(redata.car_info);
         if (redata.arrive_time != null) {
-            var time = moment(redata.arrive_time).format("YYYY-MM-DD HH:mm:ss");
+            var time = moment(redata.arrive_time).format("YYYY-MM-DD HH:mm");
             $("#arrive_time").val(time);
         }
-        if (redata.arrive_time != null) {
-            time = moment(redata.received_time).format("YYYY-MM-DD HH:mm:ss");
+        if (redata.received_time != null) {
+            time = moment(redata.received_time).format("YYYY-MM-DD HH:mm");
             $("#received_time").val(time);
         }
         if (redata.start_time != null) {
-            time = moment(redata.start_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.start_time).format("YYYY-MM-DD HH:mm");
             $("#startTime").val(time);
         }
         if (redata.back_time != null) {
-            time = moment(redata.back_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.back_time).format("YYYY-MM-DD HH:mm");
             $("#back_time").val(time);
         }
         if (redata.backfield_time != null) {
-            time = moment(redata.backfield_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.backfield_time).format("YYYY-MM-DD HH:mm");
             $("#backfield_time").val(time);
         }
         if (redata.delivery_time != null) {
-            time = moment(redata.delivery_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.delivery_time).format("YYYY-MM-DD HH:mm");
             $("#delivery_time").val(time);
         }
         if (redata.accept_time != null) {
-            time = moment(redata.accept_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.accept_time).format("YYYY-MM-DD HH:mm");
             $("#accept_time").val(time);
         }
         if (redata.rescue_time != null) {
-            time = moment(redata.rescue_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.rescue_time).format("YYYY-MM-DD HH:mm");
             $("#rescue_time").val(time);
         }
         if (redata.relief_time != null) {
-            time = moment(redata.relief_time).format("YYYY-MM-DD HH:mm:ss");
+            time = moment(redata.relief_time).format("YYYY-MM-DD HH:mm");
             $("#relief_time").val(time);
         }
         $("#carUserinfo").val(redata.car_user_info);

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

@@ -69,6 +69,14 @@
         border-color: #fff;
         text-shadow: none;
     }
+
+     .noApply {
+        color: #03b8cf;
+        background-color: #FFDEAD;
+        border-radius: 4px;
+        border-color: #FFDEAD;
+        text-shadow: none;
+    }
     
     .divstyle {
         width: 30px;
@@ -141,6 +149,9 @@
         <div class="col-xs-2">
             <div class="divstyle" style="background-color: #ed980f"></div><span style="float: left;">&nbsp;&nbsp;无效</span>
         </div>
+        <div class="col-xs-2">
+            <div class="divstyle" style="background-color:#FFDEAD"></div><span style="float: left;">&nbsp;&nbsp;放空</span>
+        </div>
     </div>
 
     <div class="row">

+ 12 - 5
VisualInspection/qzd/view/task/addtask.html

@@ -111,12 +111,15 @@
             <input type="text" style="width:100%;" id="back_time" class="form-control" autocomplete="off">
         </div>
     </div>
-    <!-- <div class="form-group col-xs-7">
-        <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding-right:0">离场时间:</label>
+    <div class="form-group col-xs-7">
+        <label for="exampleInputAccount1" class="col-xs-4" style="text-align: left;padding-right:0">是否放空:</label>
         <div class="col-xs-6">
-            <input type="text" style="width:100%;" id="back_time" class="form-control">
+            <select class="form-control" id="isApply">
+                <option value="0">否</option>
+                <option value="1">是</option>
+        </select>
         </div>
-    </div> -->
+    </div>
 </div>
 <!-- <div class="form-group" style="margin:0px;">
     <div class="form-group col-xs-5">
@@ -281,7 +284,8 @@ function setRecordUserID(usersid) {
         // var userid = userids.join(',');
 
         var data = {
-            "isComplete":1
+            "isComplete":1,
+            "isApply":$("#isApply").val()
         }  
         // if($("#backfield_time").val() != null && $("#backfield_time").val() !=''){
         //         data.backfield_time =moment($("#backfield_time").val()).format("YYYY-MM-DD HH:mm:ss");
@@ -334,6 +338,9 @@ function setRecordUserID(usersid) {
             data.unimpeded_in_time  = 1;
         }
         }
+        if($("#isApply").val() == 1){
+            data.isComplete = 1;
+        }
         // if($("#startTime").val() != null && $("#startTime").val() !=''){
         //         data.start_time =moment($("#startTime").val()).format("YYYY-MM-DD HH:mm:ss");
         // }else{

+ 2 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/QzdRecord.java

@@ -81,4 +81,6 @@ public class QzdRecord implements Serializable {
     private  int monitor;
 
     private  int vice_monitor;
+   //是否放空 0:否 1:是
+    private  int isApply;
 }

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

@@ -71,6 +71,7 @@
         <if test="isComplete != null">isComplete = #{isComplete},</if>
         <if test="monitor != null">monitor = #{monitor},</if>
         <if test="vice_monitor != null">vice_monitor = #{vice_monitor},</if>
+        <if test="isApply != null">isApply = #{isApply},</if>
         id=#{id}
         WHERE
         id = #{id}