lzh
2025-06-24 13c4a636539584ab977fddacfae884b3ec250aee
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
ÿþ--[[
   x: 
    Tðy: 
   \O€ÿ
   åegÿ2024/7/26
 
   ýQpeÿ Unlock
   ŸRý€:
 
   \O€:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
wms = require("OILua_WMS")
function Unlock( strLuaDEID )
    local nRet, strRetInfo, objs, nCount
 
    -- ·ƒÖSS_MR    -N„vpencù[aŒ
    nRet, objs = m3.GetSysDataJson( strLuaDEID )
    if ( nRet ~=0 ) then lua.Error( strLuaDEID, debug.getinfo(1), objs ) end
    lua.Debug( strLuaDEID, debug.getinfo(1), 'objs', objs )   
 
    local n
    local obj_attrs = {}
    local strCondition, strSetAttr
 
    for n = 1, #objs do
        obj_attrs = m3.KeyValueAttrsToObjAttr( objs[n].attrs )
        
        -- ã‰•
        nRet, strRetInfo = wms.wms_UnlockByTask(strLuaDEID,obj_attrs.S_TASK_CODE)
        if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "wms_UnlockByTask 1Y%! "..strRetInfo ) end 
    end  
    mobox.setInfo(strLuaDEID, "㉕bŸR!") 
end