ms jobs und interfaces

This commit is contained in:
SchreiberM 2020-08-10 17:27:45 +02:00
parent a825fc6d5e
commit 64d957a217
6 changed files with 35 additions and 15 deletions

View File

@ -1,3 +1,7 @@
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.2.0.0")>
<Assembly: AssemblyFileVersion("1.2.0.0")>
<Assembly: AssemblyVersion("1.3.0.0")>
<Assembly: AssemblyFileVersion("1.3.0.0")>

View File

@ -67,7 +67,7 @@ Public Class PropertyValues
Try
oPropertyValues = GetPropValue(Document, oProperty.Key)
Catch ex As Exception
_logger.Warn("Unknown error occurred while fetching property/TColumn [{0}] in group [{1}]:", oProperty.Value.TableColumn, oGroupScope)
_logger.Warn($"{MessageId} - Unknown error occurred while fetching property/TColumn [{0}] in group [{1}]:", oProperty.Value.TableColumn, oGroupScope)
_logger.Error(ex)
oPropertyValues = New List(Of Object)
End Try
@ -109,10 +109,10 @@ Public Class PropertyValues
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oColumn.Key.IsRequired Then
_logger.Warn($"oPropertyValue for specification [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.")
_logger.Warn($"{MessageId} # oPropertyValue for specification [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.")
oResult.MissingProperties.Add(oPropertyDescription)
Else
_logger.Debug($"oPropertyValue for specification [{oTableColumn}] is empty or not found. Continuing with Empty String.")
_logger.Debug($"{MessageId} # oPropertyValue for specification [{oTableColumn}] is empty or not found. Continuing with Empty String.")
End If
oPropertyValue = String.Empty
@ -146,7 +146,7 @@ Public Class PropertyValues
Try
oPropertyValueList = GetPropValue(Document, oItem.Key)
Catch ex As Exception
_logger.Warn("Unknown error occurred while fetching specification {0} in group {1}:", oTableColumn, oItem.Value.GroupScope)
_logger.Warn($"{MessageId} # Unknown error occurred while fetching specification {0} in group {1}:", oTableColumn, oItem.Value.GroupScope)
_logger.Error(ex)
oPropertyValueList = New List(Of Object)
End Try
@ -177,11 +177,11 @@ Public Class PropertyValues
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oItem.Value.IsRequired Then
_logger.Warn("Specification [{0}] is empty, but marked as required! Skipping.", oTableColumn)
_logger.Warn($"{MessageId} # Specification [{0}] is empty, but marked as required! Skipping.", oTableColumn)
oResult.MissingProperties.Add(oTableColumn)
Continue For
Else
_logger.Debug("oPropertyValue for specification [{0}] is empty or not found. Skipping.", oTableColumn)
_logger.Debug($"{MessageId} # oPropertyValue for specification [{0}] is empty or not found. Skipping.", oTableColumn)
Continue For
End If
End If

View File

@ -51,7 +51,9 @@ Public Class GraphQLJob
End Using
End Using
HandleResponse(oResult, oCurrentQuery, oDatabase)
If IsNothing(HandleResponse(oResult, oCurrentQuery, oDatabase)) Then
Continue For
End If
Next
' logout
@ -69,7 +71,8 @@ Public Class GraphQLJob
Dim oMappings = QueryData.MappingFields
If oResultList Is Nothing Then
_Logger.Warn("HandleResponse: Could not find BasePath: {0}", QueryData.MappingBasePath)
_Logger.Warn("HandleResponse: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name)
Return Nothing
End If
_Logger.Info("Processing Queue [{0}] with [{1}] Items", QueryData.Name, oResultList.Count)

View File

@ -420,6 +420,19 @@ Public Class ImportZUGFeRDFiles
If oCheckResult.MissingProperties.Count > 0 Then
Throw New MissingValueException(oFile)
End If
Dim oDelSQL = $"DELETE FROM TBEDMI_ITEM_VALUE where REFERENCE_GUID = '{oMessageId}'"
Dim oStep As String
Try
oStep = "Firebird TBEDMI_ITEM_VALUE Delete messageID Items"
_firebird.ExecuteNonQueryWithConnection(oDelSQL, oConnection, Firebird.TransactionMode.ExternalTransaction, oTransaction)
If oArgs.InsertIntoSQLServer = True Then
oStep = "MSSQL TBEDMI_ITEM_VALUE Delete messageID Items"
_mssql.ExecuteNonQuery(oDelSQL)
End If
Catch ex As Exception
_logger.Warn($"Delete Command [{oDelSQL}] was not successful.")
End Try
For Each oProperty In oCheckResult.ValidProperties
Dim oGroupCounterValue = oProperty.GroupCounter
@ -431,8 +444,8 @@ Public Class ImportZUGFeRDFiles
End If
Dim oCommand = $"INSERT INTO {oProperty.TableName} (REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, GROUP_COUNTER,SPEC_NAME,IS_REQUIRED) VALUES
('{oMessageId}', '{oProperty.Description}', '{oProperty.Value}', {oGroupCounterValue},'{oProperty.TableColumn}','{oProperty.ISRequired}')"
_logger.Debug("Mapping Property [{0}] with value [{1}], Will be inserted into table [{2}]", oProperty.TableColumn, oProperty.Value, oProperty.TableName)
('{oMessageId}', '{oProperty.Description}', '{oProperty.Value.Replace("'", "''")}', {oGroupCounterValue},'{oProperty.TableColumn}','{oProperty.ISRequired}')"
_logger.Debug("Mapping Property [{0}] with value [{1}], Will be inserted into table [{2}]", oProperty.TableColumn, oProperty.Value.Replace("'", "''"), oProperty.TableName)
' Insert into SQL Server
If oArgs.InsertIntoSQLServer = True Then
Dim oResult = _mssql.ExecuteNonQuery(oCommand)

View File

@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("1.3.0.2")>
<Assembly: AssemblyFileVersion("1.3.0.2")>
<Assembly: AssemblyVersion("1.3.0.4")>
<Assembly: AssemblyFileVersion("1.3.0.4")>