1
Jianw
9 天以前 70f29da38121b9a467841253e3268feb5df02902
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--[[
    编码: WMS-05-05
    名称: 逻辑库区-存储量重置
    作者:HAN  
    日期:2025-1-29
 
    级别:固定 (说明本段代码在项目中不太会变化)
    
    函数: ResetZoneStorage
 
    更改记录:
 
--]]
 
wms_base = require( "wms_base" )
 
function ResetZoneStorage ( strLuaDEID ) 
    local nRet, strRetInfo
    local zoneCode
 
    -- 获取当前操作选中的Zone对象
    -- step1: 获取触发脚本执行时的附加数据 --> DataJson
    nRet, zoneCode = m3.GetSysDataJson( strLuaDEID ) 
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "获取 WMS-05-04 场景参数失败! "..zoneCode ) end
 
    local n, nCount
    local strZoneCode = ''
 
    nCount = #zoneCode
    for n = 1, nCount do
        strZoneCode = strZoneCode..zoneCode[n]..';'
    end
 
    -- step2: 
    -- 调用 WMS 服务后台函数 重置逻辑库区 存储量
    nRet, strRetInfo = wms.wms_ResetZoneStoreNum( strLuaDEID, strZoneCode )
    if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end
 
end