--[[
|
编码: 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
|