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
47
48
ÿþ--[[
   x: GT-27-19
    Tðy: ¡[8hÇ
   \O€ÿLZH
   åegÿ2025-01-06
 
   ýQpeÿ AuditPass
   ŸRý€:  îO9e¶r`:N  ÑS^  ,$R­eeˆ'§~+R ck8^RîO9e¶r`:N ¡[8hÇ  ÿv^Rú^š[öegbLˆ,g ÿgbLˆöeô•:N_ËY,dЏöeô•
          eˆ'§~+R '}%`Rôv¥cRú^N¡RûN¡Rhˆ
 
   ôf9e°‹U_:
 
--]]
 
json  = require("json")
mobox = require("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function AuditPass(strLuaDEID)
    local nRet, strRetInfo, objs
 
    -- ·ƒÖSS_MR    -N„vpencù[aŒ
    nRet, objs = m3.GetSysDataJson(strLuaDEID)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), objs) end
    lua.Debug(strLuaDEID, debug.getinfo(1), '¡[8hÇ,g    -N„vpencù[aŒ:', objs)
 
    local obj_attrs
    local strCondition, strSetAttr
 
    for n = 1, #objs do
        local id = lua.trim_guid_str(objs[n].id)
        nRet, obj_attrs = m3.ObjAttrStrToLuaObj("GT_Allot_Order", lua.table2str(objs[n].attrs))
        if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "m3.ObjAttrStrToLuaObj(obj_attrs) 1Y%! " .. cg_detail) end
 
        -- 3u÷‹ûN¡R„v„vN¡R÷S
        local strHeader = 'FLDB'..os.date("%y%m%d")..'-'
        nRet,strCode = mobox.getSerialNumber( "‰|™eŒèb", strHeader, 5 )  
        if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), '3u÷‹0‰|™eŒèb0x1Y%!'..strCode ) end
 
        -- îO9e¶r`:N  ÑS^ 
        strCondition = "S_ID = '" .. id .. "'"
        strSetAttr = "S_STATE = 'ÑS^',S_B_STATE = 1,S_NO = '"..strCode.."'"
        nRet, strRetInfo = mobox.updateDataAttrByCondition(strLuaDEID, "GT_Allot_Order", strCondition, strSetAttr)
        if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "¾‹n¶r`1Y%!" .. strRetInfo) end
 
    end
    mobox.setInfo(strLuaDEID,"¡[8hŒ[b!")
end