1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| --[[
| 编码: WMS-08-03
| 名称: 功能按钮-清除出错动作
| 作者:HAN
| 日期:2025-1-29
|
| 入口函数: Delete
|
| 功能说明:
| 删除 错误 状态的设备动作
|
| 更改记录:
|
| --]]
| json = require ("json")
| mobox = require ("OILua_JavelinExt")
| m3 = require("oi_base_mobox")
|
| function Delete ( strLuaDEID )
| local nRet, strRetInfo
| local strCondition = "N_B_STATE = 2"
|
| nRet, strRetInfo = mobox.deleteDataObject( strLuaDEID, "MQ_EQAction", strCondition )
| if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除作业相关的【设备动作队列】失败! "..strRetInfo ) end
| -- 刷新当前页面
| local strAction = '[{"action_type":"refresh","value":""}]'
| nRet, strRetInfo = mobox.setAction(strLuaDEID, strAction)
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction错误: "..strRetInfo) end
| end
|
|