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
ÿþ--[[
   x:
    Tðy:
   \O€ÿ
   åegÿ2024-10-31
 
   ýQpeÿ CallBack
   ŸRý€:
 
   ôf9e°‹U_:
 
--]]
 
json  = require("json")
mobox = require("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function CallBack(strLuaDEID)
    local nRet, strRetInfo
 
    -- ·ƒÖS¥cãS-N„vDatapenc
    nRet, strRetInfo = mobox.getCurEditDataObjAttr(strLuaDEID, "S_PDA_NO", "S_STATION")
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "Œ(u¹eÕlGetSysDataJsonúQ•") end
    local obj_attrs = json.decode(strRetInfo)
    local pda_no = obj_attrs[1].value
    local station_no = obj_attrs[2].value
    
    if(station_no == nil or station_no == '') then return end
 
    -- $R­ePDAå]MO/f&TX[(W
    local strCondition = "S_STATION = '" .. station_no .. "'"
    nRet, strRetInfo = m3.GetDataObjByCondition(strLuaDEID, "GT_PDA_Station", strCondition)
    if(nRet == 1) then
        lua.Error(strLuaDEID, debug.getinfo(1), station_no.."å]MO NX[(W!")
    elseif(nRet == 2) then
        lua.Error(strLuaDEID, debug.getinfo(1), "m3.GetDataObjByCondition 1Y%!" .. strRetInfo)
    end
 
    local strSetSQL_update = " S_PDA_NO = '"..pda_no.."'"
    nRet, strRetInfo = mobox.updateDataAttrByCondition(strLuaDEID, "GT_PDA_Station", strCondition,strSetSQL_update)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "îO9ePDAå]MOsQû|hˆ1Y%!" .. strRetInfo) end
end