From a19133219811f9286fa71a0fb8c1deb628cf74a3 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 28 十一月 2024 16:51:08 +0800
Subject: [PATCH] #

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/Utils.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/Utils.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/Utils.java
index 998116d..5d947dd 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/Utils.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/Utils.java
@@ -19,14 +19,26 @@
 
     public static final String _LINK = "-";
 
-    public static final String _KEY_LINK = "_";
-
     public static String getMatUniqueKey(String matnr, String batch, List<FieldParam> params) {
         MatUniqueObjDto dto = new MatUniqueObjDto();
         dto.setMatnr(matnr);
         dto.setBatch(batch);
-        dto.setParams(params);
 
+        ArrayList<FieldParam> list = new ArrayList<>();
+        for (FieldParam param : params) {
+            FieldParam fieldParam = new FieldParam();
+            list.add(fieldParam);
+
+            String value = "";
+            if (!Cools.isEmpty(param.getValue())) {
+                value = param.getValue().toString();
+            }
+
+            fieldParam.setName(param.getName());
+            fieldParam.setType(param.getType());
+            fieldParam.setValue(value);
+        }
+        dto.setParams(list);
         String encode = Base64.getEncoder().encodeToString(JSON.toJSONString(dto).getBytes());
         return encode;
     }

--
Gitblit v1.9.1