This commit is contained in:
SchreiberM 2022-06-10 15:25:05 +02:00
parent 19e356e0cf
commit 9c7af8d470
4 changed files with 10 additions and 13 deletions

View File

@ -698,7 +698,7 @@ Public Class ImportZUGFeRDFiles
' Close the connection ' Close the connection
oConnection.Close() oConnection.Close()
If Message.Contains("REJECTED") Then If Message.Contains("REJECTED") Then
oSQL = $"UPDATE TBEMLP_HISTORY SET COMMENT = '{Message}', CUST_REJECTED = 1,CUST_REJECTED_WHEN = GETDATE() WHERE EMAIL_MSGID = '{MessageId}'" oSQL = $"UPDATE TBEMLP_HISTORY SET STATUS = 'REJECTED', COMMENT = '{Message}', CUST_REJECTED = 1,CUST_REJECTED_WHEN = GETDATE() WHERE EMAIL_MSGID = '{MessageId}'"
_mssql.ExecuteNonQuery(oSQL) _mssql.ExecuteNonQuery(oSQL)
End If End If
@ -780,7 +780,7 @@ Public Class ImportZUGFeRDFiles
oRejected = False oRejected = False
End Try End Try
_logger.Info("File has already been processed...")
' If the file was already rejected, it is allowed to be processed again, ' If the file was already rejected, it is allowed to be processed again,
' even if the Checksum exists in the history entries (default case) ' even if the Checksum exists in the history entries (default case)
' Which means, if it was not rejected before, it will be rejected in any case! ' Which means, if it was not rejected before, it will be rejected in any case!
@ -788,13 +788,10 @@ Public Class ImportZUGFeRDFiles
' This logic can be overwritten by the IgnoreRejectionStatus parameter. ' This logic can be overwritten by the IgnoreRejectionStatus parameter.
' If it is set to true, the file will be rejected if the file exists in the history entries, ' If it is set to true, the file will be rejected if the file exists in the history entries,
' regardless of the rejected parameter. ' regardless of the rejected parameter.
If oRejected = False Or pIgnoreRejectionStatus = True Then If oRejected = True And pIgnoreRejectionStatus = True Then
Throw New MD5HashException($"There is already an identical invoice! - HistoryID [{oHistoryId}]")
Else
_logger.Info("File has already been processed")
_logger.Info("ZuGFeRDFile already has been processed, but formerly obviously was rejected!") _logger.Info("ZuGFeRDFile already has been processed, but formerly obviously was rejected!")
Else
Throw New MD5HashException($"There is already an identical invoice! - HistoryID [{oHistoryId}]")
End If End If
Return oMD5CheckSum Return oMD5CheckSum

View File

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

View File

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

View File

@ -140,7 +140,7 @@ Public Class ThreadRunner
Private Sub DoWork(sender As Object, e As DoWorkEventArgs) Handles _workerThread.DoWork Private Sub DoWork(sender As Object, e As DoWorkEventArgs) Handles _workerThread.DoWork
Try Try
Try Try
Dim oSQL = "SELECT [EMAIL_MSGID] FROM TBEMLP_HISTORY WHERE STATUS = 'REJECTED' and DATEDIFF(DAY,CHANGED_WHEN,GETDATE()) <= 5 order by guid desc" Dim oSQL = "SELECT [EMAIL_MSGID] FROM TBEMLP_HISTORY WHERE (STATUS = 'REJECTED' OR CUST_REJECTED = 1) and DATEDIFF(DAY,CHANGED_WHEN,GETDATE()) <= 2 order by guid desc"
Dim oDT As DataTable = _mssql.GetDatatable(oSQL) Dim oDT As DataTable = _mssql.GetDatatable(oSQL)
If Not IsNothing(oDT) Then If Not IsNothing(oDT) Then
For Each oROW As DataRow In oDT.Rows For Each oROW As DataRow In oDT.Rows