BRG Auswertung DURMAZ - TELOTEC

BRG Auswertung UNISPED
This commit is contained in:
2024-08-20 09:00:22 +02:00
parent 7bc2bbe25a
commit 13b3671d4f
12 changed files with 488 additions and 294 deletions

View File

@@ -6,6 +6,7 @@ Imports System.Globalization
Public Class rptKontrolleLKW
Public datVon As Date
Public datBis As Date
Public brg As String
Public FIRMA As String = "DURMAZ"
'Public brg As String = "05DE0000000009345," 'default brg
Public erstelltVon As String = ""
@@ -47,6 +48,8 @@ Public Class rptKontrolleLKW
Dim brg_DE As String = "05DE0000000009345"
Dim brg_DE_NEU As String = "17DE0000000071678"
Dim mandant = FIRMA
If FIRMA = "DURMAZ" Then mandant = "SUW"
If FIRMA = "ATILLA" Then mandant = "SUW"

View File

@@ -7,6 +7,7 @@ Public Class rptKontrolleLKW_Dakosy
Public datVon As Date
Public datBis As Date
Public FIRMA As String = "ATILLA"
Public BRG As String = ""
Public NCTSSystemDY As String = "NCTS5"
Dim operatorID = "1"
Dim kundenSQL As New kundenSQL
@@ -50,6 +51,7 @@ Public Class rptKontrolleLKW_Dakosy
Dim brg_DE_NEU As String = "17DE0000000071678"
Dim firmaStr = ""
If FIRMA = "DURMAZ" Then
firmaStr = " AND (ncts_ObjectName LIKE 'DU%' OR ncts_firma='DURMAZ') "
@@ -69,10 +71,16 @@ Public Class rptKontrolleLKW_Dakosy
Select Case NCTSSystemDY
Case "NCTS5"
Dim whereBRG = " AND nctsGRT_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
If BRG <> "" Then
whereBRG = " AND nctsGRT_GRN IN ( '" & BRG & "') "
End If
sqlStr = " SELECT isnull(ncts_DepartureTransportMeans_1_IdentificationNumber,isnull(ncts_ActiveBorderTransportMeans_1_IdentificationNumber,'')) as Kennzeichen, cast([ncts_Trans_DatumZeit] as date) as AnmeldungsDatum,COUNT(*) ,isnull(SUM(nctsGRT_AmountToBeCovered),0) as GarantieWert "
sqlStr &= " FROM tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId "
sqlStr &= " WHERE cast ([ncts_Trans_DatumZeit] as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStr &= " AND nctsGRT_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
sqlStr &= whereBRG
sqlStr &= " AND ncts_status BETWEEN 50 AND 60 "
sqlStr &= firmaStr
' sqlStr &= " and vw.OperatorId IN (" & operatorID & ")"
@@ -84,16 +92,22 @@ Public Class rptKontrolleLKW_Dakosy
sqlStrSUB = " SELECT *, nctsGRT_AmountToBeCovered as nctsSA_AbgabenBetrag,nctsGRT_GRN as nctsSA_GRN, isnull(nctsGRT_AmountToBeCovered,0) as GarantieWert,isnull(ncts_DepartureTransportMeans_1_IdentificationNumber,isnull(ncts_ActiveBorderTransportMeans_1_IdentificationNumber,'')) as Kennzeichen,cast([ncts_Trans_DatumZeit] as date) as AnmeldungsDatum "
sqlStrSUB &= " FROM tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId "
sqlStrSUB &= " WHERE cast([ncts_Trans_DatumZeit] as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStrSUB &= " AND nctsGRT_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
sqlStrSUB &= whereBRG
sqlStrSUB &= " AND ncts_status BETWEEN 50 AND 60 "
sqlStrSUB &= firmaStr
' sqlStrSUB &= " and vw.OperatorId IN (" & operatorID & ")"
sqlStrSUB &= " order by cast([ncts_Trans_DatumZeit] as date),ncts_ObjectName"
Case Else
Dim whereBRG = " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
If BRG <> "" Then
whereBRG = " AND nctsSA_GRN IN ( '" & BRG & "') "
End If
sqlStr = " SELECT isnull(ncts_Befoerderungsmittel_KennzeichenAbgang,'') as Kennzeichen, cast([ncts_Trans_DatumZeit] as date) as AnmeldungsDatum,COUNT(*) ,isnull(SUM(nctsSA_AbgabenBetrag),0) as GarantieWert FROM tblDakosy_NCTSOut_Sicherheitsangaben inner join [VERAG].[dbo].[tblDakosy_NCTSOut] on ncts_Id = nctsSA_NctsId "
sqlStr &= " WHERE cast ([ncts_Trans_DatumZeit] as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStr &= " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
sqlStr &= whereBRG
sqlStr &= " AND ncts_status BETWEEN 50 AND 60 "
sqlStr &= firmaStr
' sqlStr &= " and vw.OperatorId IN (" & operatorID & ")"
@@ -103,7 +117,7 @@ Public Class rptKontrolleLKW_Dakosy
sqlStrSUB = " SELECT *, isnull(nctsSA_AbgabenBetrag,0) as GarantieWert,isnull(ncts_Befoerderungsmittel_KennzeichenAbgang,'') as Kennzeichen,cast([ncts_Trans_DatumZeit] as date) as AnmeldungsDatum FROM tblDakosy_NCTSOut_Sicherheitsangaben inner join [VERAG].[dbo].[tblDakosy_NCTSOut] on ncts_Id = nctsSA_NctsId "
sqlStrSUB &= " WHERE cast([ncts_Trans_DatumZeit] as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStrSUB &= " AND nctsSA_GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
sqlStrSUB &= whereBRG
sqlStrSUB &= " AND ncts_status BETWEEN 50 AND 60 "
sqlStrSUB &= firmaStr
' sqlStrSUB &= " and vw.OperatorId IN (" & operatorID & ")"

View File

@@ -7,6 +7,7 @@ Public Class rptKontrolleLKW_TELOTEC
Public datVon As Date
Public datBis As Date
Public FIRMA As String = "ATILLA"
Public BRG As String = ""
Dim operatorID = "1"
Dim kundenSQL As New kundenSQL
Dim SUB_DATA As DataTable = Nothing
@@ -48,6 +49,12 @@ Public Class rptKontrolleLKW_TELOTEC
Dim brg_DE As String = "05DE0000000009345"
Dim brg_DE_NEU As String = "17DE0000000071678"
Dim whereBRG = " AND GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
If BRG <> "" Then
whereBRG = " AND GRN IN ( '" & BRG & "') "
End If
Dim StatVon As String = "50"
Dim StatBis As String = "60"
@@ -57,7 +64,7 @@ Public Class rptKontrolleLKW_TELOTEC
Dim sqlStr As String = "SELECT isnull([Transp_CrossIdnt],'X') as Kennzeichen,cast(Hea_AccDT as date) AnmeldungsDatum ,COUNT(*) ,SUM(GVal) as GarantieWert
FROM tblTelotec_Sicherheit inner join [tblTelotec_Anmeldung] on telanm_id = telgrt_telanmId
WHERE [tblTelotec_Anmeldung].[Hea_AccDT] BETWEEN '" & datVon.ToShortDateString & " 00:00:00' AND '" & datBis.ToShortDateString & " 23:23:59' AND telanm_Status BETWEEN '" & StatVon & "' and '" & StatBis & "' AND [telnam_aktuellsteNachricht]=1
AND GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' )
" & whereBRG & "
AND tblTelotec_Anmeldung. [Mandant_ID]='" & FIRMA & "'
group by cast(Hea_AccDT as date),[Transp_CrossIdnt]
ORDER BY cast(Hea_AccDT as date)"
@@ -83,7 +90,7 @@ Public Class rptKontrolleLKW_TELOTEC
Dim sqlStrSUB As String = " SELECT isnull([Transp_CrossIdnt],'X') as Kennzeichen,cast(Hea_AccDT as date) AnmeldungsDatum, *
FROM tblTelotec_Sicherheit inner join [tblTelotec_Anmeldung] on telanm_id = telgrt_telanmId
WHERE [tblTelotec_Anmeldung].[Hea_AccDT] BETWEEN '" & datVon.ToShortDateString & " 00:00:00' AND '" & datBis.ToShortDateString & " 23:23:59' AND telanm_Status BETWEEN '" & StatVon & "' and '" & StatBis & "' AND [telnam_aktuellsteNachricht]=1
AND GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' )
" & whereBRG & "
AND tblTelotec_Anmeldung. [Mandant_ID]='" & FIRMA & "'
ORDER BY cast(Hea_AccDT as date)"

View File

@@ -6,7 +6,9 @@ Imports System.Globalization
Public Class rptKontrolleLKW_Zolaris
Public datVon As Date
Public datBis As Date
Public BRG As String = ""
Public FIRMA As String = "ATILLA"
Public EZOLL_SRV As String = "EZOLL"
Dim operatorID = "1"
Dim kundenSQL As New kundenSQL
Dim SUB_DATA As DataTable = Nothing
@@ -49,31 +51,46 @@ Public Class rptKontrolleLKW_Zolaris
Dim brg_DE_NEU As String = "17DE0000000071678"
Dim whereBRG = " AND GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
If BRG <> "" Then
whereBRG = " AND GRN IN ( '" & BRG & "') "
End If
'If FIRMA = "DURMAZ" Then mandant = "SUW"
If FIRMA = "ATILLA" Then operatorID = "'5','6'"
If FIRMA = "DURMAZ" Then operatorID = "'8'"
Dim whereOperator = " and vw.OperatorId IN (" & operatorID & ") "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "UNISPED" Or BRG = "17DE0000000071270" Or BRG = "05AT500000G000EU9" Then
' EZOLL_SRV = "EZOLL_UNISPED" --> Stimmt gar nciht, wenn ATILLA das VERAG DHF nutzt
' whereOperator = " "
End If
Dim sqlStr As String = " SELECT DepIdnt, vw.AnmeldungsDatum,COUNT(*) ,SUM(GarantieWert) as GarantieWert FROM ezoll.dbo.vwVERAG_Zolaris_EZoll_NCTS_Daten<65>bernahme as vw"
sqlStr &= " inner join [ezoll].[dbo].[zsAnmTransp] on [zsAnmTransp].AnmID=vw.AnmID and vw.OperatorID=[zsAnmTransp].OperatorID"
sqlStr &= " WHERE cast (vw.[AnmeldungsDatum] as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStr &= " AND GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
sqlStr &= " and vw.OperatorId IN (" & operatorID & ")"
sqlStr &= whereBRG
sqlStr &= whereOperator
sqlStr &= " group by vw.AnmeldungsDatum,DepIdnt"
sqlStr &= " order by vw.AnmeldungsDatum"
Me.DataSource = kundenSQL.loadDgvBySql(sqlStr, "EZOLL", 1000)
' MsgBox(sqlStr)
Me.DataSource = kundenSQL.loadDgvBySql(sqlStr, EZOLL_SRV, 1000)
Dim sqlStrSUB As String = " SELECT * FROM ezoll.dbo.vwVERAG_Zolaris_EZoll_NCTS_Daten<65>bernahme as vw"
sqlStrSUB &= " inner join [zsAnmTransp] on [zsAnmTransp].AnmID=vw.AnmID and vw.OperatorID=[zsAnmTransp].OperatorID"
sqlStrSUB &= " inner join [zzPersonal] on PersonalID =[zsAnmTransp].GeaendertVon and [zzPersonal].[KzAktiv] is not null "
sqlStrSUB &= " WHERE cast (vw.[AnmeldungsDatum] as date) BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "'"
sqlStrSUB &= " AND GRN IN ( '" & brg_AT & "' , '" & brg_DE & "' , '" & brg_DE_NEU & "' ) "
sqlStrSUB &= " and vw.OperatorId IN (" & operatorID & ")"
sqlStrSUB &= whereBRG
sqlStrSUB &= whereOperator
sqlStrSUB &= " order by vw.AnmeldungsDatum"
SUB_DATA = kundenSQL.loadDgvBySql(sqlStrSUB, "EZOLL", 1000)
SUB_DATA = kundenSQL.loadDgvBySql(sqlStrSUB, EZOLL_SRV, 1000)
lblText1.Text = lblText1.Text & " - " & FIRMA

View File

@@ -5,6 +5,7 @@ Imports System.Globalization
Public Class rptTGestellungskontrolleDY
Public datVon As Date
Public datBis As Date
Public FIRMA As String
Public statVon As String = "50"
Public statBis As String = "53"
Public brg As String = "" 'default brg
@@ -76,7 +77,12 @@ Public Class rptTGestellungskontrolleDY
' lblEmpfaenger.Text = CStr(Fields.Item("ArbNr").Value)
lblEmpfaenger.Text = CStr(Fields.Item("Empfaenger").Value)
lblBezugsnrValue.Text = CStr(Fields.Item("Bezugsnummer").Value)
lblGestDatValue.Text = If(Fields.Item("Gestellungsdatum").Value Is DBNull.Value, "", CStr(Fields.Item("Gestellungsdatum").Value))
If Fields.Item("Gestellungsdatum").Value IsNot Nothing AndAlso Fields.Item("Gestellungsdatum").Value Is DBNull.Value Then
lblGestDatValue.Text = ""
Else
lblGestDatValue.Text = CStr(Fields.Item("Gestellungsdatum").Value)
End If
lblMRNValue.Text = CStr(Fields.Item("MRN").Value)
lblSBValue.Text = CStr(Fields.Item("Sachbearbeiter").Value)
lblBuergschaft.Text = CStr(Fields.Item("Buergschaft").Value)

View File

@@ -134,23 +134,25 @@ Public Class frmPrintLayout
Viewer.LoadDocument(report)
Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
End Sub
Public Sub AuswertungKontrolleLKWZOLARIS(datvon, datbis, FIRMA)
Public Sub AuswertungKontrolleLKWZOLARIS(datvon, datbis, FIRMA, brg)
Me.Text = "Auswertung LKWs"
Dim report As rptKontrolleLKW_Zolaris = New rptKontrolleLKW_Zolaris
report.datVon = datvon
report.datBis = datbis
report.FIRMA = FIRMA
report.brg = brg
report.erstelltVon = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
Viewer.LoadDocument(report)
Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous
End Sub
Public Sub AuswertungKontrolleLKWDAKOSY(datvon, datbis, FIRMA, NCTSSystemDY)
Public Sub AuswertungKontrolleLKWDAKOSY(datvon, datbis, FIRMA, NCTSSystemDY, BRG)
Me.Text = "Auswertung LKWs"
Dim report As rptKontrolleLKW_Dakosy = New rptKontrolleLKW_Dakosy
report.datVon = datvon
report.datBis = datbis
report.FIRMA = FIRMA
report.BRG = BRG
report.NCTSSystemDY = NCTSSystemDY
report.erstelltVon = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
Viewer.LoadDocument(report)
@@ -170,11 +172,12 @@ Public Class frmPrintLayout
End Sub
Public Sub AuswertungKontrolleLKWTELOTEC(datvon, datbis, FIRMA)
Public Sub AuswertungKontrolleLKWTELOTEC(datvon, datbis, FIRMA, BRG)
Me.Text = "Auswertung LKWs"
Dim report As rptKontrolleLKW_TELOTEC = New rptKontrolleLKW_TELOTEC
report.datVon = datvon
report.datBis = datbis
report.BRG = BRG
report.FIRMA = FIRMA
report.erstelltVon = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
Viewer.LoadDocument(report)