1
Jianw
2025-07-09 f6f5e6b632d6649386a380558d84003f3de7ec6c
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
40
41
42
43
44
45
46
47
48
49
50
51
--[[
    编码: WMS-69-06
    名称: 站台亮点处理-亮灯
    作者:HAN  
    日期:2025-1-29
 
    级别:固定 (说明本段代码在项目中不太会变化)
    
    函数: LightOn
 
    功能:
 
 
    更改记录:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require("oi_base_mobox")
 
function LightOn( strLuaDEID )
    local nRet, strRetInfo
 
    -- 获取站台编码
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "Location","Qty","CellNo" ) 
    if ( nRet ~= 0 )  then 
        lua.Stop( strLuaDEID,  "获取当前编辑属性失败! "..strRetInfo ) 
        return
    end 
    local obj_attrs = json.decode( strRetInfo ) 
    local location = lua.Get_StrAttrValue( obj_attrs[1].value )  
    local qty = lua.Get_NumAttrValue( obj_attrs[2].value ) 
    local cell_no = lua.Get_NumAttrValue( obj_attrs[3].value )  
    if ( location == '' ) then return end
 
    local login_info
    nRet, login_info = wms_base.Get_CurLoginUserInfo( strLuaDEID )
    if ( nRet ~= 0 ) then 
        wms_base.Notice_Audio( strLuaDEID, login_info, "error.mp3" )
        return
    end
 
    -- 亮灯  
    nRet, strRetInfo = gk_base.Lighting( location, cell_no, qty, PTL_COLOR.Green, 1, login_info.login, "PTL测试" )
    if nRet ~= 0 then
        wms_base.Notice_Audio( strLuaDEID, "货位'"..obj_attrs.S_PUT_WALL_NO.."' 亮灯失败! "..strRetInfo, "error.mp3" )
        return            
    end   
 
end