--[[
|
编码: JX-108-23
|
名称: 巨星任务-巨星出库-站台变化
|
作者:HAN
|
日期:2025-1-29
|
|
级别:项目
|
|
函数: AfterStationChange
|
|
功能:
|
-- 根据输入的容器号,判断在当前巨星出库任务是否已经到站台
|
|
更改记录:
|
|
--]]
|
jx_base= require( "jx_base" )
|
|
function AfterStationChange ( strLuaDEID )
|
local nRet, strRetInfo
|
|
-- 获取站台编码
|
nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_STATION_NO" )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo ) end
|
local obj_attrs = json.decode( strRetInfo )
|
local station = lua.Get_StrAttrValue( obj_attrs[1].value )
|
if ( station == '' ) then return end
|
|
local strCondition = "S_STATION_NO = '"..station.."' AND N_B_STATE = 5 AND S_TASK_TYPE = '出库'"
|
local action = {}
|
action[1] = {
|
action_type = "set_query_condition",
|
value = {
|
condition = strCondition,
|
order = "S_SOURNO",
|
page_name = "已到站台"
|
}
|
}
|
strCondition = "S_STATION_NO = '"..station.."' AND (N_B_STATE = 0 OR N_B_STATE = 1) AND S_TASK_TYPE = '出库'"
|
action[2] = {
|
action_type = "set_query_condition",
|
value = {
|
condition = strCondition,
|
order = "S_SOURNO",
|
page_name = "出库搬运中..."
|
}
|
}
|
nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) )
|
if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo ) end
|
|
end
|