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
| --[[
| 编码: WMS-38-100
| 名称: 任务类型-任务完成
| 日期:2025-1-29
|
| 作者:HAN
| 入口函数: TaskFinish
|
| 功能说明:
| -- 解绑开始货位
| -- 和终点货位绑定
| -- 目标货位解锁
|
| 变更记录:
| V2.0 HAN 20241115 加了起始货位解绑
| --]]
| wms_wh = require( "wms_wh" )
|
| function TaskFinish(strLuaDEID)
| local nRet, strRetInfo
|
| -- 获取当前触发脚本的任务信息(Task)
| local task
| nRet, task = m3.GetSysCurEditDataObj( strLuaDEID, "Task" )
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), '获取当前编辑对象失败!'..task ) end
|
| nRet, strRetInfo = wms_wh.Loc_Container_Unbinding( strLuaDEID, task.start_loc_code, task.cntr_code, "绑定解绑方法-系统", task.code.."搬运完成" )
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), '货位容器绑定失败!'..strRetInfo ) end
|
| nRet, strRetInfo = wms_wh.Loc_Container_Binding( strLuaDEID, task.end_loc_code, task.cntr_code, "绑定解绑方法-系统", task.code.."搬运完成" )
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), '货位容器绑定失败!'..strRetInfo ) end
| -- 解锁
| nRet, strRetInfo = wms.wms_UnlockByTask( strLuaDEID, task.code )
| if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "wms_UnlockByTask 失败! "..strRetInfo ) end
|
| end
|
|