This commit is contained in:
2020-02-26 14:53:13 +01:00
parent 1496d02e59
commit 73cb093fdf
23 changed files with 404 additions and 302 deletions

View File

@@ -144,7 +144,7 @@ Public Class clsProfil
Return False
End If
If windreamSucheErgebnisse.Count > 0 Then
Logger.Info(windreamSucheErgebnisse.Count & " files shall be worked!")
Logger.Info(windreamSucheErgebnisse.Count & " file(s) shall be worked!")
Logger.Debug("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
Dim DT_PROFIL_JOB As DataTable = _database.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
@@ -169,7 +169,7 @@ Public Class clsProfil
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
Case "Create Mail Attachment".ToUpper
Logger.Info("JobType: Create Mail Attachment")
Logger.Debug("JobType: Create Mail Attachment")
'XX
Dim Email_Empfänger = DR_PR_JB.Item("STRING1")
@@ -243,7 +243,7 @@ Public Class clsProfil
End If
Case "Export HDD".ToUpper
Logger.Info($"{oFileRunNo} JobType: Case Export HDD")
Logger.Debug($"{oFileRunNo} JobType: Case Export HDD")
'Für jedes Dokument in der Windream-Ergebnisliste
'For Each dok As WMObject In windreamSucheErgebnisse
' aktuelles Dokument zum Export bereitstellen
@@ -257,7 +257,7 @@ Public Class clsProfil
End If
'Next
Case "BNS json Download".ToUpper
Logger.Info($"{oFileRunNo} JobType: BNS json Download")
Logger.Debug($"{oFileRunNo} JobType: BNS json Download")
FileJobSuccessful = _dateiverarbeitung.BNSjsonDownload(WMdok, DR_PR_JB.Item("STRING1"), DR_PR_JB.Item("STRING2"))
'Case "Send to printer".ToUpper
' Logger.Info("JobType: Send to printer")
@@ -393,7 +393,6 @@ Public Class clsProfil
If arrValue Is Nothing = False Then
' MsgBox("now indexing with: " & idxvalue)
Dim oErrorOccurred = windream_index.RunIndexing(WMdok, arrIndex, arrValue, _profObjekttyp)
' 07.01.2019: Weitere Jobs bei Fehler in RunIndexing überspringen
@@ -644,27 +643,35 @@ Public Class clsProfil
Next
Case "Send InfoMail with WM-Search".ToUpper
Logger.Info("Working on CASE Send InfoMail with WM-Search.... ")
Dim oWMResults As WMObjects = windream.GetSearchDocuments(DR_PR_JB.Item("STRING5"))
If oWMResults Is Nothing Then
Logger.Warn("windreamSucheErgebnisse is nothing ( Send InfoMail with WM-Search)!", True, "clsProfil.Profil_Durchlauf")
Return False
End If
If oWMResults.Count > 0 Then
If _JobWork.New_Mail_with_attachment(DR_PR_JB.Item("STRING1"), DR_PR_JB.Item("STRING2"), DR_PR_JB.Item("STRING3"), DR_PR_JB.Item("STRING4"), clsCURRENT.DT_TBDD_EMAIL, DR_PR_JB.Item("STRING5")) = True Then
FileJobSuccessful = True
If DT_PROFIL_FILE_JOB.Rows.Count > 0 Then
For Each DR_PR_FILE_JOB As DataRow In DT_PROFIL_FILE_JOB.Rows
For Each oWMDoc As WMObject In oWMResults
_dateiverarbeitung.Check_File_job(oWMDoc, DR_PR_FILE_JOB.Item("TYP").ToString.ToLower, DR_PR_FILE_JOB.Item("STRING1").ToString, DR_PR_FILE_JOB.Item("STRING2").ToString, _profObjekttyp, windream_index)
Next
'Dim oWMResults As WMObjects = windream.GetSearchDocuments(DR_PR_JB.Item("STRING5"))
'If oWMResults Is Nothing Then
' Logger.Warn("windreamSucheErgebnisse is nothing ( Send InfoMail with WM-Search)!", True, "clsProfil.Profil_Durchlauf")
' Return False
'End If
Try
If windreamSucheErgebnisse.Count > 0 Then
Logger.Debug("windreamSucheErgebnisse.Count > 0 .... ")
If _JobWork.New_Mail_with_attachment(DR_PR_JB.Item("STRING1"), DR_PR_JB.Item("STRING2"), DR_PR_JB.Item("STRING3"), DR_PR_JB.Item("STRING4"), clsCURRENT.DT_TBDD_EMAIL, DR_PR_JB.Item("STRING5")) = True Then
FileJobSuccessful = True
'If DT_PROFIL_FILE_JOB.Rows.Count > 0 Then
' For Each DR_PR_FILE_JOB As DataRow In DT_PROFIL_FILE_JOB.Rows
' For Each oWMDoc As WMObject In oWMResults
' _dateiverarbeitung.Check_File_job(oWMDoc, DR_PR_FILE_JOB.Item("TYP").ToString.ToLower, DR_PR_FILE_JOB.Item("STRING1").ToString, DR_PR_FILE_JOB.Item("STRING2").ToString, _profObjekttyp, windream_index)
' Next
' Next
'End If
Next
End If
Else
Logger.Info("Attention: Send InfoMail with WM-Search - windreamSucheErgebnisse.Count = 0")
FileJobSuccessful = False
End If
Else
Logger.Info("Send InfoMail with WM-Search - oWMResults.Count = 0")
End If
Catch ex As Exception
Logger.Warn($"Unexpected Error in Case [Send InfoMail with WM-Search] Error: [{ex.Message}]")
FileJobSuccessful = False
End Try
End Select
If FileJobSuccessful = True Then