Update NewServer

This commit is contained in:
Stefan Hutter
2025-08-27 13:07:35 +02:00
parent a335fed256
commit 02db295701
70 changed files with 640 additions and 42 deletions

View File

@@ -14,6 +14,7 @@
''--------------------------------------------------------------------------------------------------------------------
Imports System.Timers
Imports IBM.WMQ
Imports IBM
Imports System.ServiceProcess
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
@@ -23,6 +24,8 @@ Imports System.IO
Imports System.Reflection
Imports bms
Imports System.Text.RegularExpressions
Imports IBM.WMQ.Nmqi
Public Class EDKB04OP
Inherits System.ServiceProcess.ServiceBase
@@ -110,7 +113,7 @@ Public Class EDKB04OP
tmrQueuePolling.AutoReset = False
If CInt(Params.TimerInterval) > 0 Then
tmrQueuePolling.Start()
m_log.Log("EDKB04: tmrQueuePolling.Started")
m_log.log("EDKB04: tmrQueuePolling.Started")
Else
tmrQueuePolling.Enabled = False
End If
@@ -159,7 +162,7 @@ Public Class EDKB04OP
writer.WriteLine(xmlstring)
writer.Close()
Catch ex As Exception
m_log.Log("EDKB04: Error beim Abspeichern der Debug .xml Daten")
m_log.log("EDKB04: Error beim Abspeichern der Debug .xml Daten")
result = False
End Try
Return filename
@@ -181,13 +184,16 @@ Public Class EDKB04OP
#Region "Timer"
Public Sub OnTimedEvent(ByVal source As Object, ByVal e As ElapsedEventArgs) Handles tmrQueuePolling.Elapsed
Try
m_log.Log("EDKB04: OnTimedEvent called", Common.Common.JournalEntryType.Information)
m_log.log("EDKB04: OnTimedEvent called", Common.Common.JournalEntryType.Information)
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Start")
ReadfromMQ()
Catch ex As Exception
m_log.Log("EDKB04: Exception catched in OnTimedEvent()")
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Error: " + ex.Message)
m_log.log("EDKB04: Exception catched in OnTimedEvent()")
Finally
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Finally")
tmrQueuePolling.Start()
m_log.Log("EDKB04: tmrQueuePolling.Started")
m_log.log("EDKB04: tmrQueuePolling.Started")
End Try
End Sub
#End Region
@@ -368,7 +374,7 @@ Public Class EDKB04OP
Dim currentDate2 As DateTime = DateTime.Now
Dim elapsedTicks As Long = currentDate2.Ticks - currentDate1.Ticks
Dim elapsedSpan As TimeSpan = New TimeSpan(elapsedTicks)
m_log.Log(String.Format("EDKB04: elapsedTicks = {0}", elapsedTicks))
m_log.log(String.Format("EDKB04: elapsedTicks = {0}", elapsedTicks))
End If
End If
Next
@@ -376,8 +382,9 @@ Public Class EDKB04OP
Private Function ReadfromMQ() As Boolean
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Globals")
Globals.archiveFilename = ""
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Dim")
Dim mqQMgr As MQQueueManager '* MQQueueManager instance
Dim mqQueue As MQQueue = Nothing '* MQQueue instance
Dim queueName As String '* Name of queue to use
@@ -386,25 +393,34 @@ Public Class EDKB04OP
'tmrQueuePolling.Stop()
'm_log.Log("EDKB04: Start MQ Verbindungsaufbau", Common.Common.JournalEntryType.Information)
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: QueueName:" + Params.MQQueueName)
queueName = Params.MQQueueName
Try
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: MQEnv: Hostname" + Params.MQHostname)
MQEnvironment.Hostname = Params.MQHostname 'Bsp: "vb0049d"
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: MQEnv: Port" + Params.MQPort)
MQEnvironment.Port = Params.MQPort 'Bsp: 1416
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: MQEnv: Channel" + Params.MQChannel)
MQEnvironment.Channel = Params.MQChannel 'Bsp: "TGKB.D16.EDOKA.CL"
Try
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: New MQQueueManager")
mqQMgr = New MQQueueManager()
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: AccessQueue")
mqQueue = mqQMgr.AccessQueue(queueName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING) '* open queue for input but not if MQM stopping
Catch ex As Exception
m_log.Log("EDKB04: MQ Error: " & ex.Message, Common.Common.JournalEntryType.Error)
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Error: " + ex.Message)
m_log.log("EDKB04: MQ Error: " & ex.Message, Common.Common.JournalEntryType.Error)
End Try
Catch mqe As IBM.WMQ.MQException
m_log.Log("EDKB04: Error: " & mqe.Message, Common.Common.JournalEntryType.Error)
m_log.Log("EDKB04: Errorcode: " & mqe.CompletionCode, Common.Common.JournalEntryType.Error)
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: MQExeption: " + mqe.Message)
m_log.log("EDKB04: Error: " & mqe.Message, Common.Common.JournalEntryType.Error)
m_log.log("EDKB04: Errorcode: " & mqe.CompletionCode, Common.Common.JournalEntryType.Error)
m_log.Log("EDKB04: Reasoncode: " & mqe.ReasonCode, Common.Common.JournalEntryType.Error)
End Try
Try
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Verarbeitung")
Dim isContinue As Boolean = True
Dim strXMLContent As String
Do While (isContinue = True)
@@ -426,6 +442,7 @@ Public Class EDKB04OP
mqGetMsgOpts.Options = MQC.MQGMO_WAIT
Try
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: GetQueue:")
mqQueue.Get(mqMsg, mqGetMsgOpts)
'mqQueue.
If (mqMsg.Format.CompareTo(MQC.MQFMT_STRING) = 0) Then
@@ -439,12 +456,16 @@ Public Class EDKB04OP
result = False
End If
Catch mqe As IBM.WMQ.MQException
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Error GetQueue: " + mqe.Message)
'* report reason, if any
If (mqe.Reason = MQC.MQRC_NO_MSG_AVAILABLE) Then
'* special report for normal end
m_log.log("EDKB04: no more messages", Common.Common.JournalEntryType.Information)
isContinue = False
Else
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Error: myStopper")
'* general report for other reasons
If Me.myStopper.insert Then m_log.log("EDKB04: MQQueue::Get ended with {0}: " & mqe.Message, Common.Common.JournalEntryType.Error)
@@ -460,6 +481,7 @@ Public Class EDKB04OP
End If
Loop
Catch ex As Exception
File.AppendAllText(appPath + "\debug.log", Environment.NewLine + "ReadFromMQ: Error bei GET: " + ex.Message)
If Me.myStopper.insert Then m_log.log("EDKB04: Error bei GET: " & ex.Message, Common.Common.JournalEntryType.Error)
result = False
Finally

View File

@@ -11,7 +11,7 @@
<AssemblyName>EDKB04</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Console</MyType>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
@@ -42,6 +42,7 @@
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>EDKB04.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -52,6 +53,7 @@
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>EDKB04.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
@@ -66,7 +68,8 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="amqmdnet">
<Reference Include="amqmdnet, Version=9.4.0.12, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dlls\amqmdnet.dll</HintPath>
</Reference>
<Reference Include="BMS">
@@ -112,6 +115,7 @@
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="EDKB04OP.vb">
<SubType>Component</SubType>
@@ -189,7 +193,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="demopartner.xml" />
<Content Include="dlls\amqmdnet.dll" />
<Content Include="dlls\BMS.dll" />
<Content Include="dlls\Common.dll" />
<Content Include="dlls\DataAccess.dll" />

View File

@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.34014
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.

View File

@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.34014
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.34014
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
@@ -15,21 +15,21 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "Funktion zum automatischen Speichern von My.Settings"
#Region "Automatische My.Settings-Speicherfunktion"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If

View File

@@ -20,4 +20,4 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

Binary file not shown.

View File

@@ -20,4 +20,4 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,2 @@
ReadFromMQ: Start

View File

@@ -6,7 +6,7 @@ SqlTimeOut =500000
CDMUTER =EDKB04
MuterNr =9996
WatchDir =k:\edoka\00_EDK_Files\EDKB04
TimerIntervall =0
TimerIntervall =100
Loop =false
Debugmode =true
DebugDir =k:\edoka\00_EDK_Files\EDKB04\Archiv

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -20,4 +20,4 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName:=".NET Framework 4.6")>

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName:=".NET Framework 4.8")>

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
8e71177d433b87085749bd8b060a3b51284e68e88e453de6e00601b342cdfee0
c472b761442ecb08cee397b1c4bf85951714e528476ccc67663ce44fe3d6f589

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName:=".NET Framework 4.6")>

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName:=".NET Framework 4.8")>

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
8e71177d433b87085749bd8b060a3b51284e68e88e453de6e00601b342cdfee0
cc2989dd8cb4421f93d5ac6b2f733bea2e64f8a62d2e9e932fddffce3662fe2a

View File

@@ -1,3 +1,8 @@
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.AssemblyReference.cache
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04.Resources.resources
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04.ProjectInstaller.resources
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.GenerateResource.cache
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.CoreCompileInputs.cache
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\bms_settings.xml
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\bms_conn.cfg
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\edokaconn.cfg
@@ -11,11 +16,6 @@ E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\amqmdnet
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\BMS.dll
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\Common.dll
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\bin\Release\DataAccess.dll
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.AssemblyReference.cache
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04.Resources.resources
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04.ProjectInstaller.resources
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.GenerateResource.cache
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.CoreCompileInputs.cache
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04OP.vbproj.Up2Date
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04.exe
E:\Software-Projekte\EDOKA\batch\EDKB04OP\EDKB04OP\EDKB04OP\obj\Release\EDKB04.xml

View File

@@ -440,6 +440,10 @@ Public Class xmlHandling
UpdateStringRow("steuerIdentAHV", dbRow, "steuerIdentAHV")
UpdateStringRow("zivilstand", dbRow, "zivilstand")
'ende 20240916
'20240917
UpdateStringRow("sex", dbRow, "geschlecht")
UpdateStringRow("bvg_versichert", dbRow, "bvg_versichert")
'ende 20240917
UpdateIntRow("sectorId", dbRow, "sector_id")
UpdateIntRow("rechtsFormId", dbRow, "legal_form_id")
UpdateIntRow("personRatingId", dbRow, "rate_intl_id")