--[[
|
编码: WMS-69-06
|
名称: 站台亮点处理-亮灯
|
作者:HAN
|
日期:2025-1-29
|
|
级别:固定 (说明本段代码在项目中不太会变化)
|
|
函数: LightOff
|
|
功能:
|
|
|
更改记录:
|
|
--]]
|
|
json = require ("json")
|
mobox = require ("OILua_JavelinExt")
|
m3 = require("oi_base_mobox")
|
|
function LightOff( strLuaDEID )
|
local nRet, strRetInfo
|
|
-- 获取站台编码
|
nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "Location" )
|
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 )
|
|
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 = wms_ptl.TurnOff( location )
|
if nRet ~= 0 then
|
wms_base.Notice_Audio( strLuaDEID, "灭灯失败!", "error.mp3" )
|
end
|
|
end
|