lzh
2025-06-24 13c4a636539584ab977fddacfae884b3ec250aee
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
ÿþ--[[ 
 x: GT-40-29
  Tðy: ûN¡RŒ[b 
 \O€: 
 eQãSýQpeÿTaskFinish 
 ŸRý€ô‹f: 
 ØSôf†SòS: 
 --]] 
 require("WMS-BASE") 
wms_op = require( "wms_operation" )
wms_cntr = require( "wms_container" )
wms_wh = require( "wms_wh" )
function TaskFinish ( strLuaDEID ) 
    local nRet, strRetInfo
 
    local operation
    nRet, operation = m3.GetSysCurEditDataObj( strLuaDEID, "Operation" )
    if (nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), operation ) end 
 
    nRet, strRetInfo = wms_op.SetFinish( strLuaDEID, operation.code )
    if ( nRet ~= 0 ) then
        lua.Error( strLuaDEID, debug.getinfo(1), "¾‹n\ON÷S='"..operation.code.."' „v\ONŒ[b1Y%!"..strRetInfo )
    end
    
    -- ·ƒÖSûN¡Rù[aŒ
    local task
    nRet, task = m3.SysInputParamToDataObj(strLuaDEID, "Task")
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), task) end
    
    nRet = wms.wms_ResetInventory( "Area", task.end_area_code )
    
    -- zzXbŒT¹[hVã‰Ñ~
    -- nRet, strRetInfo = wms_wh.Loc_Container_Unbinding(strLuaDEID, operation.end_loc_code, operation.cntr_code, "Ñ~š[ã‰Ñ~¹eÕl-û|ß~", "Œ[b")
    -- if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), ''MO¹[hVã‰Ñ~1Y%!' .. strRetInfo) end
 
    --  Rd–¹[hV'ÁTfÆ~°‹U_
    strCondition = "S_CNTR_CODE = '" .. operation.cntr_code .. "'"
    nRet, strRetInfo = mobox.deleteDataObject(strLuaDEID, "CG_Detail", strCondition)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), strRetInfo) end
    
    -- Í‘n“^:S“^X[
    nRet,strRetInfo = wms.wms_ResetInventory("Area", task.end_area_code)
    if (nRet ~= 0) then
        lua.Error(strLuaDEID, debug.getinfo(1), strRetInfo)
    end
end