--[[
|
Copyright (c) 2025 openinfo Ltd.
|
|
OILua_WMS 是一个用于通过 Lua IDE来单独调试mobox3-WMS脚本用的 Lua 程序包,用来模拟mobox3 内嵌脚本执行时调用的WMS相关函数
|
可以实现和属主服务一起进行调试
|
--]]
|
|
http = require("socket.http")
|
ltn12 = require("ltn12")
|
url = require("socket.url")
|
json = require("json")
|
require("OILua_Debug")
|
|
local wms = {_version = "0.1.1"} -- 定义一个空表,用于存储模块的函数和变量
|
|
-- 获取常量
|
function wms.wms_GetConst( strConstName )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetConst",
|
strName = strConstName
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
-- 得到设备通讯项扩展信息
|
function wms.wms_GetDevCommExt( strDevCode, strCommCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetDevCommExt",
|
strDevCode = strDevCode,
|
strCommCode = strCommCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetDictTypeName( strDictName, nType )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetDictTypeName",
|
strDictName = strDictName,
|
nType = nType
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_TaskFinish( strLuaDEID, strTaskCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_TaskFinish",
|
strLuaDEID = strLuaDEID,
|
strTaskCode = strTaskCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_CreateNdcOrder( strFactory, nScheduleType,strOrderXML )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_CreateNdcOrder",
|
strFactory = strFactory,
|
nScheduleType = nScheduleType,
|
strOrderXML = strOrderXML
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_ChangeNdcOrderParameter( strFactory, nScheduleType,strOrderXML )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_ChangeNdcOrderParameter",
|
strFactory = strFactory,
|
nScheduleType = nScheduleType,
|
strOrderXML = strOrderXML
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_ChangeNdcOrderPriority( strFactory, nScheduleType,strOrderXML )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_ChangeNdcOrderPriority",
|
strFactory = strFactory,
|
nScheduleType = nScheduleType,
|
strOrderXML = strOrderXML
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_CancelNdcOrder( strFactory, nScheduleType,strOrderXML )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_CancelNdcOrder",
|
strFactory = strFactory,
|
nScheduleType = nScheduleType,
|
strOrderXML = strOrderXML
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaMostEmptyLoc( strLuaDEID, strAreaType, strAreaCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaMostEmptyLoc",
|
strLuaDEID = strLuaDEID,
|
strAreaType = strAreaType,
|
strAreaCode = strAreaCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneAvaliableLoc( strLuaDEID, strZoneCode, strExtParam )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneAvaliableLoc",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
strExtParam = strExtParam
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaCGLoc( strLuaDEID, strAreaCode, strExtInfo, bIsEmptyCntr )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaCGLoc",
|
strLuaDEID = strLuaDEID,
|
strAreaCode = strAreaCode,
|
strExtInfo = strExtInfo,
|
bIsEmptyCntr = bIsEmptyCntr
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneCGLoc( strLuaDEID, strZoneCode, strExtInfo, bIsEmptyCntr )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneCGLoc",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
strExtInfo = strExtInfo,
|
bIsEmptyCntr = bIsEmptyCntr
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_QueryAreaCGLoc( strLuaDEID, strAreaCode, strCGDetailWhere, strCntrWhere, strLocWhere, nRetCount )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_QueryAreaCGLoc",
|
strLuaDEID = strLuaDEID,
|
strAreaCode = strAreaCode,
|
strCGDetailWhere = strCGDetailWhere,
|
strCntrWhere = strCntrWhere,
|
strLocWhere = strLocWhere,
|
nRetCount = nRetCount
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_QueryZoneCGLoc( strLuaDEID, strZoneCode, strCGDetailWhere, strCntrWhere, strLocWhere, nRetCount )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_QueryZoneCGLoc",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
strCGDetailWhere = strCGDetailWhere,
|
strCntrWhere = strCntrWhere,
|
strLocWhere = strLocWhere,
|
nRetCount = nRetCount
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_QueryAreaECLoc( strLuaDEID, strAreaCode, strCntrWhere, strLocWhere, nRetCount )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_QueryAreaECLoc",
|
strLuaDEID = strLuaDEID,
|
strAreaCode = strAreaCode,
|
strCntrWhere = strCntrWhere,
|
strLocWhere = strLocWhere,
|
nRetCount = nRetCount
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_QueryZoneECLoc( strLuaDEID, strZoneCode, strCntrWhere, strLocWhere, nRetCount )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_QueryZoneECLoc",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
strCntrWhere = strCntrWhere,
|
strLocWhere = strLocWhere,
|
nRetCount = nRetCount
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_ContainerLocAction( strLuaDEID, strCntrCode, strLocCode, strAction )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_ContainerLocAction",
|
strLuaDEID = strLuaDEID,
|
strCntrCode = strCntrCode,
|
strLocCode = strLocCode,
|
strAction = strAction
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_ResetZoneStoreNum( strLuaDEID, strZoneCode, strExtParam )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_ResetZoneStoreNum",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
bResetLoc = bResetLoc
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneNumInfo( strZoneCodeList )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneNumInfo",
|
strZoneCodeList = strZoneCodeList
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_IsZoneLoc( strLocCode, strZoneCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_IsZoneLoc",
|
strLocCode = strLocCode,
|
strZoneCode = strZoneCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetLocActionEQ( strLocCode, strAction )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetLocActionEQ",
|
strLocCode = strLocCode,
|
strAction = strAction
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetLocBaseInfo( strLocCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetLocBaseInfo",
|
strLocCode = strLocCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetLocInfo( strLocCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetLocInfo",
|
strLocCode = strLocCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetLocZoneList( strLocCode, strZoneGroup )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetLocZoneList",
|
strLocCode = strLocCode,
|
strZoneGroup = strZoneGroup
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaInfo( strAreaCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaInfo",
|
strAreaCode = strAreaCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaInfo2( strAreaCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaInfo2",
|
strAreaCode = strAreaCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaZoneList( strAreaCode, strZoneGroup )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaZoneList",
|
strAreaCode = strAreaCode,
|
strZoneGroup = strZoneGroup
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaZoneList2( strAreaCode, strRuleType )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaZoneList2",
|
strAreaCode = strAreaCode,
|
strRuleType = strRuleType
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneInfo( strZoneCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneInfo",
|
strZoneCode = strZoneCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneInfo2( strZoneCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneInfo2",
|
strZoneCode = strZoneCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetRoadwayInfo( strWHCode, strAreaCode, nRoadway )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetRoadwayInfo",
|
strWHCode = strWHCode,
|
strAreaCode = strAreaCode,
|
nRoadway = nRoadway
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAisleInfo( strWHCode, strAreaCode, nAisle )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAisleInfo",
|
strWHCode = strWHCode,
|
strAreaCode = strAreaCode,
|
nAisle = nAisle
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_QueryCGDetail( strLuaDEID, strWHCode, strAreaCode, strCGDetailWhere, strCntrWhere )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_QueryCGDetail",
|
strLuaDEID = strLuaDEID,
|
strWHCode = strWHCode,
|
strAreaCode = strAreaCode,
|
strCGDetailWhere = strCGDetailWhere,
|
strCntrWhere = strCntrWhere
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetFuncArea( strMasterCls, strMasterCode, nAreaType )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetFuncArea",
|
strMasterCls = strMasterCls,
|
strMasterCode = strMasterCode,
|
nAreaType = nAreaType
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaLocInfo( strLuaDEID, strAreaCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaLocInfo",
|
strLuaDEID = strLuaDEID,
|
strAreaCode = strAreaCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneLocInfo( strLuaDEID, strZoneCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneLocInfo",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_LockLocation( strLuaDEID, strLocCode, nLockType, strTaskCode, strOpCode, strOpName )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_LockLocation",
|
strLuaDEID = strLuaDEID,
|
strLocCode = strLocCode,
|
nLockType = nLockType,
|
strTaskCode = strTaskCode,
|
strOpCode = strOpCode,
|
strOpName = strOpName
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockLocation( strLuaDEID, strLocCode, strTaskCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockLocation",
|
strLuaDEID = strLuaDEID,
|
strLocCode = strLocCode,
|
strTaskCode = strTaskCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_LockZone( strLuaDEID, strZoneCode, nLockType, strTaskCode, strOpCode, strOpName )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_LockZone",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
nLockType = nLockType,
|
strTaskCode = strTaskCode,
|
strOpCode = strOpCode,
|
strOpName = strOpName
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockZone( strLuaDEID, strZoneCode, strTaskCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockZone",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
strTaskCode = strTaskCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_LockLinkZone( strLuaDEID, strZoneCode, nLockType, strTaskCode, strOpCode, strOpName )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_LockLinkZone",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
nLockType = nLockType,
|
strTaskCode = strTaskCode,
|
strOpCode = strOpCode,
|
strOpName = strOpName
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockLinkZone( strLuaDEID, strZoneCode, strTaskCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockLinkZone",
|
strLuaDEID = strLuaDEID,
|
strZoneCode = strZoneCode,
|
strTaskCode = strTaskCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockByTask( strLuaDEID, strTaskCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockByTask",
|
strLuaDEID = strLuaDEID,
|
strTaskCode = strTaskCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockByOperation( strLuaDEID, strTaskCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockByOperation",
|
strLuaDEID = strLuaDEID,
|
strOpCode = strOpCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_CleanInvalidLocLock( strWHCode, strAreaCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_CleanInvalidLocLock",
|
strWHCode = strWHCode,
|
strAreaCode = strAreaCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_IsLockedCntr( strCntrCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_IsLockedCntr",
|
strCntrCode = strCntrCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_LockCntr( strContainerCode, nLockType, strTransCode, nTransTime )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_LockCntr",
|
strContainerCode = strContainerCode,
|
nLockType = nLockType,
|
strTransCode = strTransCode,
|
nTransTime = nTransTime
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockCntr( strLuaDEID, strContainerCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockCntr",
|
strLuaDEID = strLuaDEID,
|
strContainerCode = strContainerCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_UnlockCntrByTrans( strLuaDEID, strTransCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_UnlockCntrByTrans",
|
strLuaDEID = strLuaDEID,
|
strTransCode = strTransCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_CommitCntrLockTrans( strTransCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_CommitCntrLockTrans",
|
strTransCode = strTransCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_AbortCntrLockTrans( strTransCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_AbortCntrLockTrans",
|
strTransCode = strTransCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetWHInventory( strItemInfo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetWHInventory",
|
strItemInfo = strItemInfo
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetAreaInventory( strItemInfo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetAreaInventory",
|
strItemInfo = strItemInfo
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetZoneInventory( strItemInfo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetZoneInventory",
|
strItemInfo = strItemInfo
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_AddWHInventoryChange( strLuaDEID, nOpType, strItemInfo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_AddWHInventoryChange",
|
strLuaDEID = strLuaDEID,
|
nOpType = nOpType,
|
strItemInfo = strItemInfo
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_ResetInventory( strObjType, strObjCode )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_ResetInventory",
|
strObjType = strObjType,
|
strObjCode = strObjCode
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_StatInventory( strLuaDEID, strObjType, strObjCode, nPageSize )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
if ( strObjCode ~= nil and nPageSize ~= nil ) then
|
local post_data = {
|
func = "wms_StatInventory",
|
parameter_num = 4,
|
strLuaDEID = strLuaDEID,
|
strObjType = strObjType,
|
strObjCode = strObjCode,
|
nPageSize = nPageSize
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
else
|
local post_data = {
|
func = "wms_StatInventory",
|
parameter_num = 2,
|
strLuaDEID = strLuaDEID,
|
nPage = strObjType
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
end
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_IPA_Start( strWHCode, strAreaCode, strItemInfo, strAddKey, bForceSorting, nTransTime )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_IPA_Start",
|
strWHCode = strWHCode,
|
strAreaCode = strAreaCode,
|
strItemInfo = strItemInfo,
|
strAddKey = strAddKey,
|
bForceSorting = bForceSorting,
|
nTransTime = nTransTime
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_IPA_Commit( strTransID, bIsArray )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_IPA_Commit",
|
strTransID = strTransID,
|
bIsArray = bIsArray
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_IPA_Abort( strTransID, bIsArray )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_IPA_Abort",
|
strTransID = strTransID,
|
bIsArray = bIsArray
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_AddAccumQtyChg( strLuaDEID, strClassID, nProcType, strNo, nRowNo, strAddKey )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_AddAccumQtyChg",
|
strLuaDEID = strLuaDEID,
|
strClassID = strClassID,
|
nProcType = nProcType,
|
strNo = strNo,
|
nRowNo = nRowNo,
|
strAddKey = strAddKey
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_AddCloseQtyChg( strLuaDEID, strClassID, nProcType, strNo, nRowNo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_AddCloseQtyChg",
|
strLuaDEID = strLuaDEID,
|
strClassID = strClassID,
|
nProcType = nProcType,
|
strNo = strNo,
|
nRowNo = nRowNo,
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_GetOrderInfo( strClassID, strNo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_GetOrderInfo",
|
strClassID = strClassID,
|
strNo = strNo
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
function wms.wms_CheckAccumQty( strLuaDEID, strClassID, nProcType, strNo, nRowNo )
|
local nRet, strRetInfo
|
local api_url = MOBOX3.."/api/pei/callext/Lua/Call_WMS_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "wms_CheckAccumQty",
|
strLuaDEID = strLuaDEID,
|
strClassID = strClassID,
|
nProcType = nProcType,
|
strNo = strNo,
|
nRowNo = nRowNo,
|
}
|
nRet, strRetInfo = call_mobox_epi( api_url, post_data )
|
return nRet, strRetInfo
|
end
|
|
return wms
|