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
ÿþ--[[
    x: WMS-04-51
     Tðy: 'MO- Rd–“^:S'MO
    \O€ÿHAN  
    åegÿ2024-5-18
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ DeleteAreaLocation
 
    ŸRý€:
        --  Rd–cš[“^:S„v'MO
    
    ôf9e°‹U_:
  
--]]
wms_wh = require( "wms_wh" )
 
function DeleteAreaLocation ( strLuaDEID ) 
    local nRet, strRetInfo
 
    -- ·ƒÖS“eQLub—-N„v^\'`
    nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_AREA_CODE"  )  
    if ( nRet ~= 0 )  then lua.Error( strLuaDEID, debug.getinfo(1), "·ƒÖSS_MR‘^\'`1Y%! "..strRetInfo ) end 
    local obj_attrs = json.decode( strRetInfo ) 
    local area_code = obj_attrs[1].value                        -- “^:Sx        
 
    --  Rd–“^:S-N„v@b    g'MOš[IN
    local strCondition = "S_AREA_CODE = '"..area_code.."'"
    nRet, strRetInfo = mobox.dbdeleteData( strLuaDEID, "Location", strCondition )
    if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–0'MO0áOo`1Y%!  "..strRetInfo ) end  
    nRet, strRetInfo = mobox.dbdeleteData( strLuaDEID, "Location_Group", strCondition )
    if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–0'MOÄ~0áOo`1Y%!  "..strRetInfo ) end  
    nRet, strRetInfo = mobox.dbdeleteData( strLuaDEID, "Roadway", strCondition )
    if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–0÷]S0áOo`1Y%!  "..strRetInfo ) end          
end