From 5592f1b0566500092fe39aefd3abe7a4b4001d7f Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 20 五月 2023 09:27:09 +0800
Subject: [PATCH] 持续时长

---
 src/main/webapp/static/wms/js/wrkMast/wrkMast.js       |    2 +-
 src/main/webapp/static/wms/js/wrkMastLog/wrkMastLog.js |    3 ++-
 src/main/webapp/views/wrkMastLog/wrkMastLog.html       |    2 +-
 src/main/java/com/zy/asrs/entity/WrkMastLog.java       |   22 ++++++++++++++++++++++
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/WrkMastLog.java b/src/main/java/com/zy/asrs/entity/WrkMastLog.java
index 409c23f..d6e5402 100644
--- a/src/main/java/com/zy/asrs/entity/WrkMastLog.java
+++ b/src/main/java/com/zy/asrs/entity/WrkMastLog.java
@@ -501,5 +501,27 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime);
     }
 
+    /**
+     * 鑾峰彇鎸佺画鏃堕棿
+     */
+    public String getDurationTime() {
+        if (Cools.isEmpty(this.ioTime)) {
+            return "";
+        }
+
+        Date endDate = new Date();
+
+        //鐢ㄦ潵鑾峰彇涓や釜鏃堕棿鐩稿樊鐨勬绉掓暟
+        long l = this.ioTime.getTime() - endDate.getTime();
+
+        //鍒嗗埆璁$畻鐩稿樊鐨勫ぉ銆佸皬鏃躲�佸垎銆佺
+        long day = l / (24 * 60 * 60 * 1000);
+        long hour = (l / (60 * 60 * 1000) - day * 24);
+        long min = ((l / (60 * 1000)) - day * 24 * 60 - hour * 60);
+        long s = (l / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60);
+
+        return Math.abs(day) + "澶�" + Math.abs(hour) + "灏忔椂" + Math.abs(min) + "鍒�" + Math.abs(s) + "绉�";
+    }
+
 
 }
diff --git a/src/main/webapp/static/wms/js/wrkMast/wrkMast.js b/src/main/webapp/static/wms/js/wrkMast/wrkMast.js
index 700a342..13a9de9 100644
--- a/src/main/webapp/static/wms/js/wrkMast/wrkMast.js
+++ b/src/main/webapp/static/wms/js/wrkMast/wrkMast.js
@@ -30,7 +30,7 @@
             , {field: 'ioTime$', align: 'center', title: '浠诲姟鏃堕棿', sort: true, width: 160}
             , {field: 'durationTime', align: 'center', title: '鎸佺画鏃堕暱', width: 160}
             , {field: 'wrkSts$', align: 'center', title: '浠诲姟鐘舵��'}
-            , {field: 'ioType$', align: 'center', title: '鍏ュ嚭搴撶被鍨�'}
+            , {field: 'ioType$', align: 'center', title: '浠诲姟绫诲瀷'}
             , {field: 'ioPri', align: 'center', title: '浼樺厛绾�'}
             , {field: 'crnNo$', align: 'center', title: '鍫嗗灈鏈�'}
             , {field: 'sourceStaNo$', align: 'center', title: '婧愮珯'}
diff --git a/src/main/webapp/static/wms/js/wrkMastLog/wrkMastLog.js b/src/main/webapp/static/wms/js/wrkMastLog/wrkMastLog.js
index 703d501..e8ebf77 100644
--- a/src/main/webapp/static/wms/js/wrkMastLog/wrkMastLog.js
+++ b/src/main/webapp/static/wms/js/wrkMastLog/wrkMastLog.js
@@ -25,8 +25,9 @@
 //             ,{field: 'id', align: 'center',title: '缂栧彿'}
             {field: 'wrkNo', align: 'center',title: '浠诲姟鍙�',event: 'wrkNo', sort: true}
             ,{field: 'ioTime$', align: 'center',title: '浠诲姟鏃堕棿', width:160, sort: true}
+            ,{field: 'durationTime', align: 'center',title: '鎸佺画鏃堕暱', width:160}
             ,{field: 'wrkSts$', align: 'center',title: '浠诲姟鐘舵��', width:160}
-            ,{field: 'ioType$', align: 'center',title: '鍏ュ嚭搴撶被鍨�', width:160}
+            ,{field: 'ioType$', align: 'center',title: '浠诲姟绫诲瀷', width:160}
             ,{field: 'ioPri', align: 'center',title: '浼樺厛绾�'}
             ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈哄彿'}
             ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯'}
diff --git a/src/main/webapp/views/wrkMastLog/wrkMastLog.html b/src/main/webapp/views/wrkMastLog/wrkMastLog.html
index 99b5828..fee6237 100644
--- a/src/main/webapp/views/wrkMastLog/wrkMastLog.html
+++ b/src/main/webapp/views/wrkMastLog/wrkMastLog.html
@@ -32,7 +32,7 @@
     <div class="layui-inline">
         <div class="layui-input-inline cool-auto-complete">
             <input id="ioType" class="layui-input" name="io_type" type="text" placeholder="璇疯緭鍏�" autocomplete="off" style="display: none">
-            <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="鍏ュ嚭搴撶被鍨�" onfocus=this.blur()>
+            <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="浠诲姟绫诲瀷" onfocus=this.blur()>
             <div class="cool-auto-complete-window">
                 <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))">
                 <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">

--
Gitblit v1.9.1