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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
ÿþ--[[
    x: WMS-07-05
     Tðy: 8^ϑ-ŸRý€    c®”-7R°eWMSW[xQ8^ϑ
    \O€ÿHAN  
    åegÿ2023-08-30
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
    
    ýQpeÿ GenWMSConst
 
    ŸRý€:
        ÇWMS„vN›NW[xQš[INub8^ϑ ÿÔk‚Y Ç WMS_ScheduleSystemType ubRÄ~= Œ¦^{|‹W „v8^ϑ
    ôf9e°‹U_:
        
--]]
 
wms_base = require( "wms_base" )
 
local function Conversion( strLuaDEID, group_name, dict_name )
    local nRet, strRetInfo
 
    if ( group_name == nil or group_name == '' or dict_name == '' or dict_name == nil ) then return end
 
    nRet, strRetInfo = mobox.getDictItemIInfo( dict_name )
    if ( nRet ~= 0 or strRetInfo == '') then lua.Error( strLuaDEID, debug.getinfo(1), "û|ß~¡l    gš[IN T:N'"..dict_name.."'„vW[xQ!") end
    local dict_items = json.decode( strRetInfo ) 
 
    local strCondition = "S_GROUP = '"..group_name.."'"
    nRet, strRetInfo = mobox.dbdeleteData( strLuaDEID, "WMS_Const", strCondition )
    if ( nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), " Rd–08^ϑ01Y%!  "..strRetInfo ) end 
 
    local n, nCount
    nCount = #dict_items
    for n = 1, nCount do
        local const = m3.AllocObject( strLuaDEID, "WMS_Const")
        const.name = group_name..'-'..dict_items[n].value
        const.value = dict_items[n].name
        const.group = group_name
        const.sys = "Y"
        const.note = "1uW[xQ"..dict_name.."ub"
        nRet, strRetInfo = m3.CreateDataObj(strLuaDEID, const)
        if (nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1),"Rú^WMS8^ϑ1Y%!"..strRetInfo) end     
    end
end
 
function GenWMSConst ( strLuaDEID ) 
    local dict_array = {}
    local nIndex = 1
 
    Conversion( strLuaDEID, "Œ¦^{|‹W", "WMS_ScheduleSystemType" )
    Conversion( strLuaDEID, "'MO{|‹W", "WMS_LocationType" )
    Conversion( strLuaDEID, "'MO(u", "WMS_LocationPurpose" )
    Conversion( strLuaDEID, "¥csš{|‹W", "WMS_ConnectType" )
    Conversion( strLuaDEID, "“^:S{|‹W", "WMS_AreaType" )
    Conversion( strLuaDEID, "ÀhŒš{|‹W", "WMS_InspectionType" )
    Conversion( strLuaDEID, "ûN¡R{|‹W", "WMS_TaskType" )
    Conversion( strLuaDEID, "¹[hV{|‹W", "WMS_ContainerType" )
    Conversion( strLuaDEID, "¾‹Y¨R\O", "WMS_EquipmentAction" )
    Conversion( strLuaDEID, "¾‹Y{|‹W", "WMS_EquipmentType" )
    Conversion( strLuaDEID, "\ON¶r`", "WMS_OperationState" )
    Conversion( strLuaDEID, "ŸRý€:S{|‹W", "WMS_FuncType" )
    Conversion( strLuaDEID, "úW@x{|‹W", "WMS_FAType" )
    Conversion( strLuaDEID, "ir™e¶r`", "WMS_ItemState" )
    Conversion( strLuaDEID, "“^:S¾‹Y{|‹W", "WMS_AreaDevice_Type" )
end