--[[
|
编码: WMS-24-19
|
名称: 出库单-自动配盘回调
|
作者:HAN
|
日期:2025-1-29
|
|
级别:项目
|
|
函数: CallBack
|
|
功能:
|
系统在后台执行自动配盘后调用这个脚本,输入参数
|
inputparamter = {
|
err_code = 0~xxx, msg = "",
|
result = {}
|
}
|
更改记录:
|
|
--]]
|
wms_base = require ("wms_base")
|
|
function CallBack ( strLuaDEID )
|
local nRet, strRetInfo
|
local oo_obj = {}
|
|
lua.DebugEx( strLuaDEID, "自动配盘回调-->", "CallBack")
|
|
nRet, oo_obj = m3.GetSysCurEditDataObj( strLuaDEID, "Outbound_Order" )
|
if (nRet ~= 0) then
|
lua.Stop( strLuaDEID, "获取【出库单】对象属性失败!"..oo_obj )
|
return
|
end
|
local paramter
|
nRet, paramter = m3.GetSysInputParameter( strLuaDEID )
|
if ( nRet ~= 0 ) then
|
lua.Stop( strLuaDEID, "获取输入采参数失败!"..paramter )
|
return
|
end
|
|
if paramter.err_code > 0 then
|
local strSetAttr = "N_B_STATE = "..OUTBOUND_ORDER_STATE.Error..", N_PRE_B_STATE = "..oo_obj.b_state..
|
", S_ERR_MSG = '"..lua.FormatSQLString(paramter.msg).."'"
|
local strCondition = "S_NO = '"..oo_obj.no.."'"
|
nRet, strRetInfo = mobox.updateDataAttrByCondition( strLuaDEID, "Outbound_Order", strCondition, strSetAttr )
|
if ( nRet ~= 0 ) then
|
lua.Stop( strLuaDEID, "更新【出库单】状态息失败!"..strRetInfo )
|
return
|
end
|
end
|
|
|
end
|