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