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ÿ2025-01-06
 
   ýQpeÿ AfterDataObjModify
   ŸRý€:
 
   ôf9e°‹U_:
 
--]]
 
json  = require ("json")
mobox = require ("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function AfterDataObjModify( strLuaDEID )
    local nRet, strRetInfo
    
    nRet, strRetInfo = mobox.getCurEditDataObjAttr(strLuaDEID,"T_START","T_END")
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖSS_S_MR‘ù[aŒ^\'`1Y%! " .. strRetInfo) end
 
    local obj_attrs = json.decode(strRetInfo)
    local t_start = obj_attrs[1].value
    local t_end = obj_attrs[2].value
    
    -- îO9e8^ϑ„v<P
    local strCondition = "S_NAME = 'sO-‰|™eŒèb_ËYöeô•'"
    local strSetSQL = "S_VALUE = '"..t_start.."'"
    local nRet, strRetInfo = mobox.updateTableAttrByCondition(strLuaDEID, "TN_WMS_Const", strCondition,strSetSQL)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), strRetInfo) end
    strCondition = "S_NAME = 'sO-‰|™eŒèbÓ~_göeô•'"
    strSetSQL = "S_VALUE = '"..t_end.."'"
    nRet, strRetInfo = mobox.updateTableAttrByCondition(strLuaDEID, "TN_WMS_Const", strCondition,strSetSQL)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), strRetInfo) end
    -- îO9e@b    g„v_ËYöeô•ŒTÓ~_göeô•
    strCondition = "S_ITEM_CODE = S_ITEM_CODE"
    strSetSQL = "T_START = '"..'2025-01-01 '..t_start.."',T_END = '"..'2025-01-01 '..t_end.."'"
    nRet, strRetInfo = mobox.updateTableAttrByCondition(strLuaDEID, "TN_GT_Allot_Order", strCondition,strSetSQL)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), strRetInfo) end
end