--[[
|
编码: WMS-999-01
|
名称:
|
作者:
|
日期:2025-05-07
|
|
函数: Test
|
功能:
|
|
更改记录:
|
|
--]]
|
|
wms_base = require ("wms_base")
|
|
function Test( strLuaDEID )
|
local strUserLogin, strUserName, nRet
|
nRet, strUserLogin, strUserName = mobox.getCurUserInfo( strLuaDEID )
|
|
lua.DebugEx( strLuaDEID, "strUserLogin", strUserLogin )
|
|
if ( nRet ~= 0 ) then
|
return 2, "获取当前操作人员信息失败! "..strUserLogin
|
end
|
-- 获取当前操作人员的单位编码,作为工厂标识
|
nRet, strRetInfo = mobox.getUserSectionUnit( strUserLogin )
|
if ( nRet ~= 0 ) then
|
return 2, "获取当前操作人员所属单位失败! "..strRetInfo
|
end
|
|
lua.DebugEx( strLuaDEID, "strRetInfo", strRetInfo )
|
|
local factory = ''
|
if ( strRetInfo ~= '' ) then
|
local orgInfo = json.decode( strRetInfo )
|
factory = orgInfo.company_code
|
end
|
|
lua.DebugEx( strLuaDEID, "factory1", factory )
|
|
if factort == '' then
|
nRet, factory = wms_base.Get_sConst2( "WMS_Default_Factory")
|
|
lua.DebugEx( strLuaDEID, "factory2", factory )
|
|
if ( nRet ~= 0 ) then
|
return 2, "系统无法获取常量'WMS_Default_Factory'"
|
end
|
end
|
|
end
|