From d0226747665355acecd5b4f2b5c0beb020586729 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 17 一月 2025 15:37:32 +0800
Subject: [PATCH] # 23. PDA拣货单据,勾选或点击确认按钮后,完成当前单据 (已完成) 24. PDA出库成功后,界面数据重置,避免重复操作  (已修复) 25. PDA接口请求,添加一个Loading遮档  (已修复) 27. 非平库单据,在平库可做入库操作  (已修复) 28. 平库已组拖数据,组拖完成后依然可组拖  (已修复) 29. 平库入库后,订单明细没有添加(已修复) 30. 平库入库后,单据类型没有修改(已修复) 31. 没有绑定播种位,不能进行播种,前后端都需加判定(已修复) 33. 平库入库未修改入库已完成数量(已修复) 34. cacheSite缓存站点逻辑需重新梳理,入库生成波次时(已完成) 35. PDA添加发货确认,默认全选 (已修复) 36. 大屏获取任务时,是由容器到达的拖盘码确认通知 (已修复) 37. 拣货单序号不显示 问题修复 (已修复) 42. pda发货确认,添加不同颜色区分是否全部完成拣货,绿色全部拣货完成,红色完成部分拣货(已修复) 43. CTU入库完成后,订单明细没有删除,执行中数量清空(已修复) 44. 平库入库完成后,历史档明细完成数量没有更新 (已修复) 45. PDA料号不显示  (已修复) 46. 发货完成后,波次管理数据未加入历史档 (已修复)

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/license/entity/license/LicenseVerify.java |  280 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 140 insertions(+), 140 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/license/entity/license/LicenseVerify.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/license/entity/license/LicenseVerify.java
index 08dd64b..bd30124 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/license/entity/license/LicenseVerify.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/license/entity/license/LicenseVerify.java
@@ -1,141 +1,141 @@
-package com.zy.asrs.wms.system.license.entity.license;
-
-import de.schlichtherle.license.*;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.poi.util.IOUtils;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.prefs.Preferences;
-
-/**
- * License鏍¢獙绫�
- */
-public class LicenseVerify {
-    private static Logger logger = LogManager.getLogger(LicenseVerify.class);
-
-    /**
-     * 瀹夎License璇佷功
-     */
-    public synchronized LicenseContent install(LicenseVerifyParam param){
-        LicenseContent result = null;
-        DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
-        //1. 瀹夎璇佷功
-        try{
-            LicenseManager licenseManager = LicenseManagerHolder.getInstance(initLicenseParam(param));
-            licenseManager.uninstall();
-
-            InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(param.getLicensePath());
-            File file = new File(param.getLicensePath());
-            try (FileOutputStream out = new FileOutputStream(file)) {
-                IOUtils.copy(inputStream, out);
-            }
-            result = licenseManager.install(file);
-            logger.info(MessageFormat.format("璁稿彲璇佸姞杞芥垚鍔燂紝璁稿彲璇佹湁鏁堟湡锛歿0} - {1}",format.format(result.getNotBefore()),format.format(result.getNotAfter())));
-        }catch (Exception e){
-            logger.error("璁稿彲璇佸姞杞藉け璐ワ紒",e);
-        }
-
-        return result;
-    }
-
-    /**
-     * 鏍¢獙License璇佷功
-     */
-    public boolean verify(){
-        try {
-            LicenseManager licenseManager = LicenseManagerHolder.getInstance(null);
-            DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
-            if (!updateSystemTime()) {
-                //鏃堕棿鏇存柊澶辫触锛岀郴缁熸椂闂磋鏇存敼
-                return false;
-            }
-
-            LicenseContent licenseContent = licenseManager.verify();
-            logger.info(MessageFormat.format("璁稿彲璇佹牎楠岄�氳繃锛岃鍙瘉鏈夋晥鏈燂細{0} - {1}",format.format(licenseContent.getNotBefore()),format.format(licenseContent.getNotAfter())));
-            return true;
-        }catch (Exception e){
-            logger.error("璁稿彲璇佹牎楠屽け璐ワ紒",e);
-            return false;
-        }
-    }
-
-    /**
-     * 鏍¢獙License璇佷功骞惰幏鍙栬瘉涔︿俊鎭�
-     */
-    public LicenseContent getVerifyInfo(){
-        LicenseManager licenseManager = LicenseManagerHolder.getInstance(null);
-
-        if (!updateSystemTime()) {
-            //鏃堕棿鏇存柊澶辫触锛岀郴缁熸椂闂磋鏇存敼
-            return null;
-        }
-
-        //鏍¢獙璇佷功
-        try {
-            LicenseContent licenseContent = licenseManager.verify();
-            return licenseContent;
-        }catch (Exception e){
-            logger.error("璁稿彲璇佹牎楠屽け璐ワ紒",e);
-            return null;
-        }
-    }
-
-    /**
-     * 鍒濆鍖栬瘉涔︾敓鎴愬弬鏁�
-     * @param param License鏍¢獙绫婚渶瑕佺殑鍙傛暟
-     * @return de.schlichtherle.license.LicenseParam
-     */
-    private LicenseParam initLicenseParam(LicenseVerifyParam param){
-        Preferences preferences = Preferences.userNodeForPackage(LicenseVerify.class);
-
-        CipherParam cipherParam = new DefaultCipherParam(param.getStorePass());
-
-        KeyStoreParam publicStoreParam = new CustomKeyStoreParam(LicenseVerify.class
-                ,param.getPublicKeysStorePath()
-                ,param.getPublicAlias()
-                ,param.getStorePass()
-                ,null);
-
-        return new DefaultLicenseParam(param.getSubject()
-                ,preferences
-                ,publicStoreParam
-                ,cipherParam);
-    }
-
-    /**
-     * 鏇存柊鏃堕棿鍒版敞鍐岃〃涓�
-     */
-    private boolean updateSystemTime() {
-        // 鑾峰彇鐢ㄦ埛鏍硅妭鐐�
-        Preferences userRoot = Preferences.userRoot();
-        // 鑾峰彇鎸囧畾璺緞涓嬬殑鑺傜偣
-        Preferences node = userRoot.node("/zhongyang");
-        String key = "time";
-        // 璇诲彇娉ㄥ唽琛�
-        String value = node.get(key, null);
-        if (value != null) {
-            long originTime = Long.parseLong(value);
-            long now = System.currentTimeMillis();
-            long diff = now - originTime;//鐜板湪鏃堕棿 - 婧愭椂闂� = 鏃堕棿宸�
-            if (diff > 0) {
-                //鏃堕棿宸ぇ浜�0鎵嶅厑璁告洿鏂版敞鍐岃〃鏃堕棿
-                node.put(key, String.valueOf(System.currentTimeMillis()));
-                return true;
-            }
-        }else {
-            // 鍐欏叆娉ㄥ唽琛�
-            node.put(key, String.valueOf(System.currentTimeMillis()));
-            return true;
-        }
-        return false;
-    }
-
+package com.zy.asrs.wms.system.license.entity.license;
+
+import de.schlichtherle.license.*;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.poi.util.IOUtils;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.prefs.Preferences;
+
+/**
+ * License鏍¢獙绫�
+ */
+public class LicenseVerify {
+    private static Logger logger = LogManager.getLogger(LicenseVerify.class);
+
+    /**
+     * 瀹夎License璇佷功
+     */
+    public synchronized LicenseContent install(LicenseVerifyParam param){
+        LicenseContent result = null;
+        DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+        //1. 瀹夎璇佷功
+        try{
+            LicenseManager licenseManager = LicenseManagerHolder.getInstance(initLicenseParam(param));
+            licenseManager.uninstall();
+
+            InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(param.getLicensePath());
+            File file = new File(param.getLicensePath());
+            try (FileOutputStream out = new FileOutputStream(file)) {
+                IOUtils.copy(inputStream, out);
+            }
+            result = licenseManager.install(file);
+            logger.info(MessageFormat.format("璁稿彲璇佸姞杞芥垚鍔燂紝璁稿彲璇佹湁鏁堟湡锛歿0} - {1}",format.format(result.getNotBefore()),format.format(result.getNotAfter())));
+        }catch (Exception e){
+            logger.error("璁稿彲璇佸姞杞藉け璐ワ紒",e);
+        }
+
+        return result;
+    }
+
+    /**
+     * 鏍¢獙License璇佷功
+     */
+    public boolean verify(){
+        try {
+            LicenseManager licenseManager = LicenseManagerHolder.getInstance(null);
+            DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+            if (!updateSystemTime()) {
+                //鏃堕棿鏇存柊澶辫触锛岀郴缁熸椂闂磋鏇存敼
+                return false;
+            }
+
+            LicenseContent licenseContent = licenseManager.verify();
+            logger.info(MessageFormat.format("璁稿彲璇佹牎楠岄�氳繃锛岃鍙瘉鏈夋晥鏈燂細{0} - {1}",format.format(licenseContent.getNotBefore()),format.format(licenseContent.getNotAfter())));
+            return true;
+        }catch (Exception e){
+            logger.error("璁稿彲璇佹牎楠屽け璐ワ紒",e);
+            return false;
+        }
+    }
+
+    /**
+     * 鏍¢獙License璇佷功骞惰幏鍙栬瘉涔︿俊鎭�
+     */
+    public LicenseContent getVerifyInfo(){
+        LicenseManager licenseManager = LicenseManagerHolder.getInstance(null);
+
+        if (!updateSystemTime()) {
+            //鏃堕棿鏇存柊澶辫触锛岀郴缁熸椂闂磋鏇存敼
+            return null;
+        }
+
+        //鏍¢獙璇佷功
+        try {
+            LicenseContent licenseContent = licenseManager.verify();
+            return licenseContent;
+        }catch (Exception e){
+            logger.error("璁稿彲璇佹牎楠屽け璐ワ紒",e);
+            return null;
+        }
+    }
+
+    /**
+     * 鍒濆鍖栬瘉涔︾敓鎴愬弬鏁�
+     * @param param License鏍¢獙绫婚渶瑕佺殑鍙傛暟
+     * @return de.schlichtherle.license.LicenseParam
+     */
+    private LicenseParam initLicenseParam(LicenseVerifyParam param){
+        Preferences preferences = Preferences.userNodeForPackage(LicenseVerify.class);
+
+        CipherParam cipherParam = new DefaultCipherParam(param.getStorePass());
+
+        KeyStoreParam publicStoreParam = new CustomKeyStoreParam(LicenseVerify.class
+                ,param.getPublicKeysStorePath()
+                ,param.getPublicAlias()
+                ,param.getStorePass()
+                ,null);
+
+        return new DefaultLicenseParam(param.getSubject()
+                ,preferences
+                ,publicStoreParam
+                ,cipherParam);
+    }
+
+    /**
+     * 鏇存柊鏃堕棿鍒版敞鍐岃〃涓�
+     */
+    private boolean updateSystemTime() {
+        // 鑾峰彇鐢ㄦ埛鏍硅妭鐐�
+        Preferences userRoot = Preferences.userRoot();
+        // 鑾峰彇鎸囧畾璺緞涓嬬殑鑺傜偣
+        Preferences node = userRoot.node("/zhongyang");
+        String key = "time";
+        // 璇诲彇娉ㄥ唽琛�
+        String value = node.get(key, null);
+        if (value != null) {
+            long originTime = Long.parseLong(value);
+            long now = System.currentTimeMillis();
+            long diff = now - originTime;//鐜板湪鏃堕棿 - 婧愭椂闂� = 鏃堕棿宸�
+            if (diff > 0) {
+                //鏃堕棿宸ぇ浜�0鎵嶅厑璁告洿鏂版敞鍐岃〃鏃堕棿
+                node.put(key, String.valueOf(System.currentTimeMillis()));
+                return true;
+            }
+        }else {
+            // 鍐欏叆娉ㄥ唽琛�
+            node.put(key, String.valueOf(System.currentTimeMillis()));
+            return true;
+        }
+        return false;
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.9.1