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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| --[[
| 编码: JX-40-28
| 名称: 入库单-清空和作业相关的数据
| 作者:HAN
| 日期:2025-1-29
|
| 级别:固定 (说明本段代码在项目中不太会变化)
|
| 函数: ResetOperation
|
| 功能:
| 清除所有和作业业务相关的数据,包括
| -- 作业
| -- 任务
| -- 任务动作
| 更改记录:
|
| --]]
|
| json = require ("json")
| mobox = require ("OILua_JavelinExt")
| m3 = require("oi_base_mobox")
|
| function ResetOperation( strLuaDEID )
| local nRet, strRetInfo
|
| local strCondition = ""
| nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Operation")
| if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Operation】失败!"..strRetInfo) end
|
| nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Task")
| if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Task】失败!"..strRetInfo) end
|
| nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Task_Action")
| if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Task_Action】失败!"..strRetInfo) end
|
| local action = {
| {
| action_type = "refresh",
| value = ""
| }
| }
| nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str( action ))
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction错误: "..strRetInfo) end
|
| end
|
|