fix plose, import plose-pdfs
This commit is contained in:
@@ -531,7 +531,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces">
|
||||
<Version>1.0.0</Version>
|
||||
<Version>8.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SSH.NET">
|
||||
<Version>2024.0.0</Version>
|
||||
|
||||
@@ -25,7 +25,7 @@ Public Class cPLOSE_Inv_Data
|
||||
Property plInv_daId As Object = Nothing
|
||||
Property plInv_tstmp As DateTime = Now
|
||||
Property plInv_UStVAn_ID As Object = Nothing
|
||||
Property plInv_Archiv As Object = Nothing
|
||||
Property plInv_Archiv As Boolean = False
|
||||
Property plInv_ArchiviertDatum As Object = Nothing
|
||||
|
||||
|
||||
|
||||
@@ -430,13 +430,18 @@ Public Class frmMDMNachrichtenVerarbeitung
|
||||
'DatenArchiv-Id in tblPLOSE_Inv_Data Tabelle eintragen (über PDF-Name) :
|
||||
Dim EintragVorhanden As Integer = CInt(SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM tblPLOSE_Inv_Data where [plInv_PdfFileName] = '" & DS.da_name & "'", "FMZOLL"))
|
||||
If EintragVorhanden > 0 Then
|
||||
SQL.doSQL("Update [tblPLOSE_Inv_Data] SET [plInv_daId]='" & DS.da_id & "' where [plInv_PdfFileName] = '" & DS.da_name & "' and [plInv_Einlesedatum] > DATEADD(DAY,-30,getdate()) and [plInv_daId] is null ", "FMZOLL")
|
||||
SQL.doSQL("Update [tblPLOSE_Inv_Data] SET [plInv_daId]='" & DS.da_id & "' where [plInv_PdfFileName] = '" & DS.da_name & "' and [plInv_Einlesedatum] > DATEADD(DAY,-60,getdate()) and [plInv_daId] is null ", "FMZOLL")
|
||||
Else
|
||||
|
||||
'beispiel
|
||||
'beispiel 1
|
||||
'542073_2504495.01_2025-fln-000004495.pdf -> DATEINAME laut DB Eintrag
|
||||
'b_542073_2504495.01_2025-fln-000004495.pdf -> DATEINAME im Datenarchiv
|
||||
'alle vorangehenden Buchstaben und Zeichen abschneiden und mit der ersten Zahl beginnen!!
|
||||
|
||||
'beispiel 2
|
||||
'510101-2503740.01_2025-sfc-000003740.pdf -> DATEINAME laut DB Eintrag
|
||||
'b_510101_2503740.01_2025-sfc-000003740.pdf -> DATEINAME im Datenarchiv
|
||||
|
||||
Dim filename = frmStartOptions.getFileName(d)
|
||||
If Regex.IsMatch(filename, "^[A-Za-z]") Then
|
||||
Dim match As Match = Regex.Match(filename, "\d+")
|
||||
@@ -444,19 +449,19 @@ Public Class frmMDMNachrichtenVerarbeitung
|
||||
Dim fileNameNew = filename.Substring(match.Index).Trim
|
||||
EintragVorhanden = CInt(SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM tblPLOSE_Inv_Data where [plInv_PdfFileName] ='" & fileNameNew & "'", "FMZOLL"))
|
||||
If EintragVorhanden > 0 Then
|
||||
SQL.doSQL("Update [tblPLOSE_Inv_Data] SET [plInv_daId]='" & DS.da_id & "' where [plInv_PdfFileName] = '" & fileNameNew & "' and [plInv_Einlesedatum] > DATEADD(DAY,-30,getdate()) and [plInv_daId] is null ", "FMZOLL")
|
||||
SQL.doSQL("Update [tblPLOSE_Inv_Data] SET [plInv_daId]='" & DS.da_id & "' where [plInv_PdfFileName] = '" & fileNameNew & "' and [plInv_Einlesedatum] > DATEADD(DAY,-60,getdate()) and [plInv_daId] is null ", "FMZOLL")
|
||||
|
||||
Else
|
||||
If filename.Contains("-") Then
|
||||
Dim index As Integer = filename.IndexOf("-")
|
||||
If index <> -1 Then filename = filename.Remove(index, 1).Insert(index, "_")
|
||||
EintragVorhanden = CInt(SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM tblPLOSE_Inv_Data where [plInv_PdfFileName] ='" & fileNameNew & "'", "FMZOLL"))
|
||||
If EintragVorhanden > 0 Then SQL.doSQL("Update [tblPLOSE_Inv_Data] SET [plInv_daId]='" & DS.da_id & "' where [plInv_PdfFileName] = '" & fileNameNew & "' and [plInv_Einlesedatum] > DATEADD(DAY,-30,getdate()) and [plInv_daId] is null ", "FMZOLL")
|
||||
EintragVorhanden = CInt(SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM tblPLOSE_Inv_Data where replace([plInv_PdfFileName],'-','_') ='" & fileNameNew.ToString.Replace("-", "_") & "'", "FMZOLL"))
|
||||
If EintragVorhanden > 0 Then
|
||||
SQL.doSQL("Update [tblPLOSE_Inv_Data] SET [plInv_daId]='" & DS.da_id & "' where replace([plInv_PdfFileName],'-','_') ='" & fileNameNew.ToString.Replace("-", "_") & "' and [plInv_Einlesedatum] > DATEADD(DAY,-60,getdate()) and [plInv_daId] is null ", "FMZOLL")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user