--[[
|
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 mobox = { _version = "0.1.1" } -- 定义一个空表,用于存储模块的函数和变量
|
|
function mobox.getCurEditDataObjAttr(strLuaDEID, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getCurEditDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setCurEditDataObjAttr(strLuaDEID, strAttrSetInfo)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setCurEditDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
strAttrSetInfo = strAttrSetInfo
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCurEditDataObjID(strLuaDEID)
|
local nRet, strRetInfo, strClsID, strObjID
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCurEditDataObjID",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strClsID, strObjID = call_mobox_epi(api_url, post_data)
|
return nRet, strClsID, strObjID
|
end
|
|
function mobox.getCurMasterInfo(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCurMasterInfo",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCurEditOldDataObjAttr(strLuaDEID, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getCurEditOldDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCurEditExtInfo(strLuaDEID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCurEditExtInfo",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCurEditDataPacket(strLuaDEID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCurEditDataPacket",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttr(strLuaDEID, strClsName, strObjID, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strObjID = strObjID,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setDataObjAttr(strLuaDEID, strClsName, strObjID, strAttrInfo)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strObjID = strObjID,
|
strAttrInfo = strAttrInfo
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setDataObjAce(strLuaDEID, strClsName, strObjID, strAceSet)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setDataObjAce",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strObjID = strObjID,
|
strAceSet = strAceSet
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setDataObjState(strLuaDEID, strClsName, strObjID, strState)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setDataObjState",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strObjID = strObjID,
|
strState = strState
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setDataObjStateByCondition(strLuaDEID, strClassName, strCondition, strState, bTriggerEvent)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setDataObjStateByCondition",
|
strLuaDEID = strLuaDEID,
|
strClassName = strClassName,
|
strCondition = strCondition,
|
strState = strState,
|
bTriggerEvent = bTriggerEvent
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttrByKeyAttr(strLuaDEID, strClsName, strCondition, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getDataObjAttrByKeyAttr",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
attr_name = attrs
|
}
|
nRet, id, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, id, strRetInfo
|
end
|
|
function mobox.allocObject(strClassID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "allocObject",
|
strClassID = strClassID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.allocObject2(strClassID, bAllAttr)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "allocObject2",
|
strClassID = strClassID,
|
bAllAttr = bAllAttr
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.formatLuaJson(strLuaJson)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "formatLuaJson",
|
strLuaJson = strLuaJson
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.luaJsonToObjAttrs(strClassID, strLuaJson)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "luaJsonToObjAttrs",
|
strClassID = strClassID,
|
strLuaJson = strLuaJson
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.objAttrsToLuaJson(strClassID, strObjAttrs)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "objAttrsToLuaJson",
|
strClassID = strClassID,
|
strObjAttrs = strObjAttrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.luaJsonToObjJson(strClassID, strLuaJson)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "luaJsonToObjJson",
|
strClassID = strClassID,
|
strLuaJson = strLuaJson
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.objJsonToLuaJson(strClassID, strObjJson)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "objJsonToLuaJson",
|
strClassID = strClassID,
|
strObjJson = strObjJson
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.objAttrToObjJson(strClassID, strObjAttrs)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "objAttrToObjJson",
|
strClassID = strClassID,
|
strObjAttrs = strObjAttrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.objJsonToObjAttr(strClassID, strObjJson)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "objJsonToObjAttr",
|
strClassID = strClassID,
|
strObjJson = strObjJson
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.incDataObjAccQty(strLuaDEID, strClassID, strCondition, strMaxQtyAttr, strAccQtyAttr, fQty, bExactQty)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "incDataObjAccQty",
|
strLuaDEID = strLuaDEID,
|
strClassID = strClassID,
|
strCondition = strCondition,
|
strMaxQtyAttr = strMaxQtyAttr,
|
strAccQtyAttr = strAccQtyAttr,
|
fQty = fQty,
|
bExactQty = bExactQty
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.decDataObjAccQty(strLuaDEID, strClassID, strCondition, strAccQtyAttr, fQty)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "decDataObjAccQty",
|
strLuaDEID = strLuaDEID,
|
strClassID = strClassID,
|
strCondition = strCondition,
|
strAccQtyAttr = strAccQtyAttr,
|
fQty = fQty
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.createDataObj(strLuaDEID, strClsName, strAttrs, bReturnLuaAttr, bUpdateExist, bTrigSysEvent,
|
strMasterClsName, strMasterObjID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "createDataObj",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strAttrs = strAttrs,
|
bReturnLuaAttr = bReturnLuaAttr,
|
bUpdateExist = bUpdateExist,
|
bTrigSysEvent = bTrigSysEvent,
|
strMasterClsName = strMasterClsName,
|
strMasterObjID = strMasterObjID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.createDataObj2(strLuaDEID, strClsName, strObjJson, bReturnLuaAttr, bUpdateExist, bTrigSysEvent,
|
strMasterClsName, strMasterObjID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "createDataObj2",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strObjJson = strObjJson,
|
bUpdateExist = bUpdateExist,
|
bTrigSysEvent = bTrigSysEvent,
|
strMasterClsName = strMasterClsName,
|
strMasterObjID = strMasterObjID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.insertrDataObj(strLuaDEID, strClsName, strDataJson, bRunSysEvent, bUpdateExist)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "insertrDataObj",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strDataJson = strDataJson,
|
bRunSysEvent = bRunSysEvent,
|
bUpdateExist = bUpdateExist
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.updateDataObj(strLuaDEID, strClsName, strDataJson, bRunSysEvent)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "updateDataObj",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strDataJson = strDataJson,
|
bRunSysEvent = bRunSysEvent
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.updateDataAttrByCondition(strLuaDEID, strClsName, strCondition, strSetSQL)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "updateDataAttrByCondition",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
strSetSQL = strSetSQL
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.updateTableAttrByCondition(strLuaDEID, strTableName, strCondition, strSetSQL)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "updateTableAttrByCondition",
|
strLuaDEID = strLuaDEID,
|
strTableName = strTableName,
|
strCondition = strCondition,
|
strSetSQL = strSetSQL
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.dbdeleteData(strLuaDEID, strClsName, strCondition)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "dbdeleteData",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.deleteDataObject(strLuaDEID, strClsName, strCondition)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "deleteDataObject",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryDataObjAttr(strLuaDEID, strClsName, strCondition, strOrder, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "queryDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
strOrder = strOrder,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryDataObjAttr2(...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local args_count = #args
|
|
local post_data = {}
|
if (args_count == 2) then
|
post_data = {
|
func = "queryDataObjAttr2_1",
|
strQueryID = args[1],
|
nPage = lua.StrToNumber(args[2])
|
}
|
else
|
if (args_count < 5) then
|
return 1, "queryDataObjAttr2 输入参数不正确!"
|
end
|
local attrs = {}
|
for i = 6, args.n do
|
table.insert(attrs, args[i])
|
end
|
|
post_data = {
|
func = "queryDataObjAttr2",
|
strLuaDEID = args[1],
|
strClsName = args[2],
|
strCondition = args[3],
|
strOrder = args[4],
|
nPageSize = lua.StrToNumber(args[5]),
|
attr_name = attrs
|
}
|
end
|
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryDataObjAttr3(strLuaDEID, strClsName, strCondition, nRetCount, strOrder, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "queryDataObjAttr3",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
nRetCount = nRetCount,
|
strOrder = strOrder,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryOneDataObjAttr2(strLuaDEID, strClsName, strCondition, strOrderBy, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "queryOneDataObjAttr2",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
strOrderBy = strOrderBy,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryTable(strLuaDEID, strTabName, strFieldList, nRetCount, strCondition, strOrderBy)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "queryTable",
|
strLuaDEID = strLuaDEID,
|
strTabName = strTabName,
|
strFieldList = strFieldList,
|
nRetCount = nRetCount,
|
strCondition = lua.Get_StrAttrValue(strCondition),
|
strOrderBy = lua.Get_StrAttrValue(strOrderBy)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryTable2(...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local args_count = #args
|
|
local post_data = {}
|
if (args_count == 2) then
|
post_data = {
|
func = "queryTable2_1",
|
strLuaDEID = args[1],
|
nPage = lua.StrToNumber(args[2])
|
}
|
else
|
if (args_count < 4) then
|
return 1, "queryTable2 输入参数不正确!"
|
end
|
local attrs = {}
|
for i = 5, args.n do
|
table.insert(attrs, args[i])
|
end
|
post_data = {
|
func = "queryTable2",
|
strLuaDEID = args[1],
|
strTabName = args[2],
|
strFieldList = args[3],
|
nPageSize = lua.StrToNumber(args[4]),
|
attr_name = attrs
|
}
|
end
|
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryMultiTable(strLuaDEID, strAttrInfo, strFromTabInfo, nRetCount, strCondition, strOrderBy)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "queryMultiTable",
|
strLuaDEID = strLuaDEID,
|
strAttrInfo = strAttrInfo,
|
strFromTabInfo = strFromTabInfo,
|
nRetCount = nRetCount,
|
strCondition = lua.Get_StrAttrValue(strCondition),
|
strOrderBy = lua.Get_StrAttrValue(strOrderBy)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.queryMultiTable2(...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local args_count = #args
|
|
local post_data = {}
|
if (args_count == 2) then
|
post_data = {
|
func = "queryMultiTable2_1",
|
strLuaDEID = args[1],
|
nPage = lua.StrToNumber(args[2])
|
}
|
else
|
if (args_count < 4) then
|
return 1, "queryMultiTable2 输入参数不正确!"
|
end
|
local attrs = {}
|
for i = 5, args.n do
|
table.insert(attrs, args[i])
|
end
|
post_data = {
|
func = "queryMultiTable2",
|
strLuaDEID = args[1],
|
strAttrInfo = args[2],
|
strFromTabInfo = args[3],
|
nPageSize = lua.StrToNumber(args[4]),
|
attr_name = attrs
|
}
|
end
|
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjCount(strLuaDEID, strClsName, strCondition)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getDataObjCount",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.groupDataObjAttr(strLuaDEID, strClsName, strCondition, strAttr, strOrder)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "groupDataObjAttr",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
strAttr = strAttr,
|
strOrder = strOrder
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjGroupCount(strLuaDEID, strClassName, strGroupAttr, strCondition)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getDataObjGroupCount",
|
strLuaDEID = strLuaDEID,
|
strClassName = strClassName,
|
strGroupAttr = strGroupAttr,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.groupDataObjAttrSum(strLuaDEID, strClassName, strCondition, strGroupAttr, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "groupDataObjAttrSum",
|
strLuaDEID = strLuaDEID,
|
strClassName = strClassName,
|
strCondition = strCondition,
|
strGroupAttr = strGroupAttr,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttrGroupSum(strLuaDEID, strClassName, strCondition, strGroupAttrs, strSumAttrs, strOtherAttrs,
|
strOrderBy)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getDataObjAttrGroupSum",
|
strLuaDEID = strLuaDEID,
|
strClassName = strClassName,
|
strCondition = strCondition,
|
strGroupAttrs = strGroupAttrs,
|
strSumAttrs = strSumAttrs,
|
strOtherAttrs = strOtherAttrs,
|
strOrderBy = strOrderBy
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.groupDataObjAttrs(strLuaDEID, strClsName, strCondition, strOrderBy, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "groupDataObjAttrs",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
strOrderBy = strOrderBy,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.groupTableAttrs(strLuaDEID, strTabName, strCondition, strOrder, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "groupTableAttrs",
|
strLuaDEID = strLuaDEID,
|
strTabName = strTabName,
|
strCondition = strCondition,
|
strOrder = strOrder,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDBRecordCount(strLuaDEID, strTabName, strCondition)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getDBRecordCount",
|
strLuaDEID = strLuaDEID,
|
strTabName = strTabName,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttrSum(strLuaDEID, strClsName, strCondition, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getDataObjAttrSum",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttrSum2(strLuaDEID, strClsName, strCondition, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getDataObjAttrSum2",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttrAvg(strLuaDEID, strClsName, strCondition, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getDataObjAttrAvg",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDataObjAttrAvg2(strLuaDEID, strClsName, strCondition, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getDataObjAttrAvg2",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.existThisData(strLuaDEID, strClsName, strCondition)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "existThisData",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDictItemIInfo(strDirctName, strDirctItemName)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getDictItemIInfo",
|
strDirctName = strDirctName,
|
strDirctItemName = strDirctItemName
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getDictItemIInfo2(strLuaDEID, strDirctName, strDirctItemName)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getDictItemIInfo",
|
strLuaDEID = strLuaDEID,
|
strDirctName = strDirctName,
|
strDirctItemName = lua.Get_StrAttrValue(strDirctItemName)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addDictItem(strDirctName, strDirctItemName)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "addDictItem",
|
strDirctName = strDirctName,
|
strDirctItemName = strDirctItemName
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.deleteDictItem(strDirctName, strDirctItemName)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "deleteDictItem",
|
strDirctName = strDirctName,
|
strDirctItemName = strDirctItemName
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.reloadDictData(strLuaDEID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "reloadDictData",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getGlobalAttr(strLuaDEID, ...)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local args = table.pack(...)
|
local attrs = {}
|
for i = 1, args.n do
|
table.insert(attrs, args[i])
|
end
|
local post_data = {
|
func = "getGlobalAttr",
|
strLuaDEID = strLuaDEID,
|
attr_name = attrs
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setGlobalAttr(strLuaDEID, strAttrSet)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setGlobalAttr",
|
strLuaDEID = strLuaDEID,
|
strAttrSet = strAttrSet
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCacheValue(strKey, strGroupID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCacheValue",
|
strKey = strKey,
|
strGroupID = lua.Get_StrAttrValue(strGroupID)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setCacheValue(strKey, strValue, strGroupID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setCacheValue",
|
strKey = strKey,
|
strValue = strValue,
|
strGroupID = lua.Get_StrAttrValue(strGroupID)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.removeCacheValue(strKey, strGroupID)
|
local nRet, strRetInfo, i
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "removeCacheValue",
|
strKey = strKey,
|
strGroupID = lua.Get_StrAttrValue(strGroupID)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCurUserInfo(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCurUserInfo",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getUserSectionUnit(strLuaDEID,strUserLogin)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getUserSectionUnit",
|
strLuaDEID = strLuaDEID,
|
strUserLogin=strUserLogin
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getUserInfo(strUserLogin, bDetail, bWithClientInfo)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getUserInfo",
|
strUserLogin = strUserLogin,
|
bDetail = lua.Get_NumAttrValue(bDetail),
|
bWithClientInfo = lua.Get_NumAttrValue(bWithClientInfo)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getUserTerminalInfo(strUserLogin)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getUserTerminalInfo",
|
strUserLogin = strUserLogin
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getInputParameter2(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getInputParameter2",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.stopProgram(strLuaDEID, strMsgInfo)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "stopProgram",
|
strLuaDEID = strLuaDEID,
|
strMsgInfo = strMsgInfo
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.error(strLuaDEID, strErrInfo)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "error",
|
strLuaDEID = strLuaDEID,
|
strErrInfo = strErrInfo
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setAction(strLuaDEID, strAction)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setAction",
|
strLuaDEID = strLuaDEID,
|
strAction = strAction
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.setInfo(strLuaDEID, strInfo, nInfoCloseTime)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "setInfo",
|
strLuaDEID = strLuaDEID,
|
strInfo = strInfo,
|
nInfoCloseTime = lua.Get_NumAttrValue(nInfoCloseTime)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.returnValue(strLuaDEID, nRetStrIsJson, strReturn, nRetResType)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "returnValue",
|
strLuaDEID = strLuaDEID,
|
nRetStrIsJson = nRetStrIsJson,
|
strReturn = strReturn,
|
nRetResType = lua.Get_NumAttrValue(nRetResType)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getLuaDEInfo(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getLuaDEInfo",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getSerialNumber(strCodeType, strHeadCode, nCodeSize)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getSerialNumber",
|
strCodeType = strCodeType,
|
strHeadCode = strHeadCode,
|
nCodeSize = nCodeSize
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getSerialMaxNumber(strCodeType, strHeadCode, nCodeOrderLen)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getSerialMaxNumber",
|
strCodeType = strCodeType,
|
strHeadCode = strHeadCode,
|
nCodeOrderLen = lua.Get_NumAttrValue(nCodeOrderLen)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.removeSerialNumber(strCodeType, strHeadCode)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "removeSerialNumber",
|
strCodeType = strCodeType,
|
strHeadCode = strHeadCode
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.base64ToStr(strBase64)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "base64ToStr",
|
strBase64 = strBase64
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.strToBase64(strData)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "strToBase64",
|
strData = strData
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getParameter(strLuaDEID, strParameterCode)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getParameter",
|
strLuaDEID = strLuaDEID,
|
strParameterCode = strParameterCode
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.sendHttpRequest(strUrl, strHeader, strBody, strMethod)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "sendHttpRequest",
|
strUrl = strUrl,
|
strHeader = strHeader,
|
strBody = strBody,
|
strMethod = lua.Get_StrAttrValue(strMethod)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.sendHttpRequest_Get(strUrl, strHeader)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "sendHttpRequest_Get",
|
strUrl = strUrl,
|
strHeader = strHeader
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.genReqVerify(strAppKey, strAppSecret, strReqUser)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "genReqVerify",
|
strAppKey = strAppKey,
|
strAppSecret = strAppSecret,
|
strReqUser = strReqUser
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.triggerClsEvent(strLuaDEID, strClsName, strObjID, strEventName, strParameter, strDataJson)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "triggerClsEvent",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strObjID = strObjID,
|
strEventName = strEventName,
|
strParameter = lua.Get_StrAttrValue(strParameter),
|
strDataJson = lua.Get_StrAttrValue(strDataJson)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.triggerClsEventBatch(strLuaDEID, strClsName, strCondition, strEventName, strDataJson, strDisplayName)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "triggerClsEventBatch",
|
strLuaDEID = strLuaDEID,
|
strClsName = strClsName,
|
strCondition = strCondition,
|
strEventName = strEventName,
|
strDataJson = lua.Get_StrAttrValue(strDataJson),
|
strDisplayName = lua.Get_StrAttrValue(strDisplayName)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addBackendScriptProc(strClassID, strEventName, strDataJson)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "addBackendScriptProc",
|
strClassID = strClassID,
|
strEventName = strEventName,
|
strDataJson = lua.Get_StrAttrValue(strDataJson)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getBackendScriptProcResult(strProcID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getBackendScriptProcResult",
|
strProcID = strProcID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addSysWFP(strLuaDEID, nWFPType, strDataJson, strClsName, strObjID, strObjName, nTriggerType,
|
strTriggerTime, strEventName, strDisplayName, strSrcName, bIsSys)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getBackendScriptProcResult",
|
strLuaDEID = strLuaDEID,
|
nWFPType = nWFPType,
|
strDataJson = strDataJson,
|
strClsName = lua.Get_StrAttrValue(strClsName),
|
strObjID = lua.Get_StrAttrValue(strObjID),
|
strObjName = lua.Get_StrAttrValue(strObjName),
|
nTriggerType = lua.Get_NumAttrValue(nTriggerType),
|
strTriggerTime = lua.Get_StrAttrValue(strTriggerTime),
|
strEventName = lua.Get_StrAttrValue(strEventName),
|
strDisplayName = lua.Get_StrAttrValue(strDisplayName),
|
strSrcName = lua.Get_StrAttrValue(strSrcName),
|
bIsSys = lua.Get_NumAttrValue(bIsSys)
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.deleteSysWFP(strLuaDEID, strCondition)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "deleteSysWFP",
|
strLuaDEID = strLuaDEID,
|
strCondition = strCondition
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.writeSysLog(strLogType, strLogContent)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "writeSysLog",
|
strLogType = strLogType,
|
strLogContent = strLogContent
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.getCurTime_MS()
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "getCurTime_MS"
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addProcSQL(strSQL)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "addProcSQL",
|
strSQL = strSQL
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addProcSQL2(strClassName, strObjID, strUpdateSet)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "addProcSQL2",
|
strClassName = strClassName,
|
strObjID = strObjID,
|
strUpdateSet = strUpdateSet
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addProcSQL3(strClassName, strCondition, strUpdateSet)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "addProcSQL3",
|
strClassName = strClassName,
|
strCondition = strCondition,
|
strUpdateSet = strUpdateSet
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.addProcSQL4(strSQL)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "addProcSQL4",
|
strSQL = strSQL
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.writeLuaLog(strLogContent)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "writeLuaLog",
|
strLogContent = strLogContent
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.startTransaction(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "startTransaction",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.commit(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "commit",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
function mobox.abort(strLuaDEID)
|
local nRet, strRetInfo
|
local api_url = MOBOX3 .. "/api/pei/callext/Lua/Call_MOBOX_Func"
|
-- 设置 POST 请求的数据
|
local post_data = {
|
func = "abort",
|
strLuaDEID = strLuaDEID
|
}
|
nRet, strRetInfo = call_mobox_epi(api_url, post_data)
|
return nRet, strRetInfo
|
end
|
|
return mobox
|