--[[
|
编码: WMS-17-11
|
名称: 计划盘点容器-刷新容器货位信息
|
作者:HAN
|
日期:2025-1-29
|
|
级别:固定 (说明本段代码在项目中不太会变化)
|
|
函数: ResetLocInfo
|
|
功能:
|
-- 触发 计划盘点 下面的计划盘点容器中的货位信息
|
|
更改记录:
|
|
--]]
|
|
wms_base = require( "wms_base" )
|
|
function ResetLocInfo ( strLuaDEID )
|
local nRet, strRetInfo
|
local area_code
|
|
-- 获取 主数据对象信息(计划盘点)
|
|
local runtime_paramter
|
nRet, runtime_paramter = m3.GetRuntimeParam(strLuaDEID)
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "GetRuntimeParam失败! "..runtime_paramter ) end
|
|
-- 获取主数据对象【盘点计划】
|
local master = runtime_paramter.master
|
|
if ( master == nil ) then lua.Error( strLuaDEID, debug.getinfo(1), "运行时参数缺少master属性! " ) end
|
local b_state = lua.StrToNumber( master.objAttr["N_B_STATE"] )
|
if ( b_state ~= 2 ) then lua.Error( strLuaDEID, debug.getinfo(1), "盘点计划的状态非执行状态,无法进行刷新计划盘点容器货位信息! " ) end
|
if ( master.clsId == nil or master.objId == nil ) then
|
lua.Error( strLuaDEID, debug.getinfo(1), "运行时参数master属性不完整! " )
|
end
|
|
-- 设置计划盘点容器表中的货位信息
|
local add_wfp_paramter = {}
|
add_wfp_paramter.wfp_type = 1 -- 触发数据对象事件(指定数据对象标识)
|
add_wfp_paramter.cls = master.clsId
|
add_wfp_paramter.obj_id = master.objId
|
add_wfp_paramter.trigger_event = "刷新计划盘点容器货位信息"
|
nRet, strRetInfo = m3.AddSysWFP( strLuaDEID, add_wfp_paramter )
|
if ( nRet ~= 0 ) then
|
lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo )
|
end
|
|
end
|