From 2dff6a55fee4ad77ea59eeb8562229632da03377 Mon Sep 17 00:00:00 2001
From: fy36 <1046342473@qq.com>
Date: 星期四, 22 五月 2025 14:08:16 +0800
Subject: [PATCH] 1. SKU数据同步代码更新返回格式,修复返回非xml报文格式问题 2. 盘点数据同步代码优化 3. 小件收货品信息同步代码优化

---
 lua_code/mobox_base/oi_base_xml.lua |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lua_code/mobox_base/oi_base_xml.lua b/lua_code/mobox_base/oi_base_xml.lua
index fc5548b..abd77bc 100644
--- a/lua_code/mobox_base/oi_base_xml.lua
+++ b/lua_code/mobox_base/oi_base_xml.lua
@@ -10,7 +10,7 @@
         local result = {}
         for k, v in pairs(tbl) do
             -- 鍘婚櫎鍛藉悕绌洪棿鍓嶇紑[6,9](@ref)
-            local new_key = k:gsub("v1:", ""):gsub("soap:", "")
+            local new_key = k:gsub("v1:", ""):gsub("soap:", ""):gsub("soapenv:", "")
             
             if type(v) == "table" then
                 -- 澶勭悊鏁扮粍缁撴瀯[4](@ref)
@@ -27,6 +27,7 @@
                 result[new_key] = v ~= "" and v or nil
             end
         end
+        if next(result) == nil then result = "" end
         return result
     end
     return process(data)

--
Gitblit v1.9.1