Jianw
2025-05-13 3b39fe3810c3ee2ec9ec97236c1769c5c85e062c
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
--[[
    编码: WMS-01-11
    名称: 容器-Unlock
    作者:HAN  
    日期:2025-1-29
 
    级别: 项目
    
    函数: Reset
 
    功能:
        -- 这个脚本一般有WPF进行调用
        -- 解锁容器
 
    更改记录:
 
--]]
wms_base = require ("wms_base")
 
function Unlock( strLuaDEID ) 
    local nRet, strRetInfo
    local cntr_code
 
    nRet, data_json = m3.GetSysDataJson( strLuaDEID )
    if ( nRet ~=0 ) then lua.Error( strLuaDEID, debug.getinfo(1), data_json ) end  
    
    cntr_code = data_json.cntr_code
    if ( cntr_code ~= '' and cntr_code ~= nil ) then
        nRet = wms.wms_UnlockCntr( strLuaDEID, cntr_code )
        if ( nRet ~= 0 ) then 
            lua.Error( strLuaDEID, debug.getinfo(1), "解锁容器'"..cntr.code.."'失败!" )
        end
    end
end