update glogle cache

This commit is contained in:
updsv7
2026-04-17 17:42:18 +09:00
parent f967c165c0
commit dd874cf811
5 changed files with 240 additions and 49 deletions

View File

@@ -29,9 +29,8 @@ Sub Generic_Master_Import(ByVal ws As Worksheet, ByVal expectedColumnCount As Lo
Dim colOffset As Long
For colOffset = 1 To expectedColumnCount
ws.Cells(writeRow, 2 + colOffset).Value = CleanCSVField(CStr(lines(i, colOffset)))
writeRow = writeRow + 1
Next colOffset
writeRow = writeRow + 1
End If
Next i

View File

@@ -18,9 +18,14 @@ Public m1KukanDCache As Object
Public z1Cache As Object
Public z2Cache As Object
Public z3Cache As Object
Public z4Cache As Object
Public o1Cache As Object
Public o2Cache As Object
Public m2Cache As Object
Public tokubetuList As Object
Public oufukuList As Object
Public koutaiList As Object
Public higaitouList As Object
' m1Cache - used by M2_Kukan_detail, Tukin_C1
' m1KukanDCache - nested dict {D: {F: [G]}}
@@ -229,6 +234,28 @@ Public Sub ClearZ3Cache()
Set z3Cache = Nothing
End Sub
' ============================================================
' z4Cache
' ============================================================
Public Sub RefreshZ4Cache()
On Error GoTo RefreshError
Set z4Cache = LoadLookup("Z4", keyCol:=3, valueCols:=Array(4), startRow:=7)
On Error GoTo 0
If z4Cache Is Nothing Or z4Cache.Count = 0 Then
Err.Raise 1003, "RefreshZ4Cache", "Enum reference data is empty"
End If
Exit Sub
RefreshError:
Err.Raise 1001, "RefreshZ4Cache", "Failed to load Enum lookup cache: " & Err.Description
End Sub
Public Sub ClearZ4Cache()
Set z4Cache = Nothing
End Sub
' ============================================================
' O1 Cache
' ============================================================
@@ -312,8 +339,6 @@ End Sub
' ============================================================
' tokubetuList
' ============================================================
Public tokubetuList As Object
Public Sub GetTokubetu()
On Error GoTo RefreshError
Set tokubetuList = LoadLookup("Enum", keyCol:=1, valueCols:=Array(1), startRow:=3)
@@ -333,38 +358,12 @@ Public Sub ClearTokubetu()
Set tokubetuList = Nothing
End Sub
' ============================================================
' todokeList
' ============================================================
Public todokeList As Object
Public Sub GetTodokeList()
On Error GoTo RefreshError
Set todokeList = LoadLookup("Enum", keyCol:=6, valueCols:=Array(7), startRow:=3)
On Error GoTo 0
If todokeList Is Nothing Or todokeList.Count = 0 Then
Err.Raise 1003, "GetTodokeList", "Enum reference data is empty"
End If
Exit Sub
RefreshError:
Err.Raise 1001, "GetTodokeList", "Failed to load Enum lookup cache: " & Err.Description
End Sub
Public Sub ClearTodokeList()
Set todokeList = Nothing
End Sub
' ============================================================
' oufukuList
' ============================================================
Public oufukuList As Object
Public Sub GetOufukuList()
On Error GoTo RefreshError
Set oufukuList = LoadLookup("Enum", keyCol:=9, valueCols:=Array(10), startRow:=3)
Set oufukuList = LoadLookup("Enum", keyCol:=6, valueCols:=Array(7), startRow:=3)
On Error GoTo 0
If oufukuList Is Nothing Or oufukuList.Count = 0 Then
@@ -384,11 +383,9 @@ End Sub
' ============================================================
' koutaiList
' ============================================================
Public koutaiList As Object
Public Sub GetKoutaiList()
On Error GoTo RefreshError
Set koutaiList = LoadLookup("Enum", keyCol:=12, valueCols:=Array(13), startRow:=3)
Set koutaiList = LoadLookup("Enum", keyCol:=9, valueCols:=Array(10), startRow:=3)
On Error GoTo 0
If koutaiList Is Nothing Or koutaiList.Count = 0 Then
@@ -403,4 +400,26 @@ End Sub
Public Sub ClearKoutaiList()
Set koutaiList = Nothing
End Sub
' ============================================================
' higaitouList
' ============================================================
Public Sub GetHigaitouList()
On Error GoTo RefreshError
Set higaitouList = LoadLookup("Enum", keyCol:=12, valueCols:=Array(13), startRow:=3)
On Error GoTo 0
If higaitouList Is Nothing Or higaitouList.Count = 0 Then
Err.Raise 1003, "GetHigaitouList", "Enum reference data is empty"
End If
Exit Sub
RefreshError:
Err.Raise 1001, "GetHigaitouList", "Failed to load Enum lookup cache: " & Err.Description
End Sub
Public Sub ClearHigaitouList()
Set higaitouList = Nothing
End Sub