Index: zTryout/THB/BOMBOL/TAOR/VergelijkCacheDotnet.cls.xml =================================================================== diff -u -r71249 -r71340 --- zTryout/THB/BOMBOL/TAOR/VergelijkCacheDotnet.cls.xml (.../VergelijkCacheDotnet.cls.xml) (revision 71249) +++ zTryout/THB/BOMBOL/TAOR/VergelijkCacheDotnet.cls.xml (.../VergelijkCacheDotnet.cls.xml) (revision 71340) @@ -66,8 +66,10 @@ #dim CountVerschillen As %Integer = 0 #dim CountVerschillenKleinerDan1Cent As %Integer = 0 #dim CountVerschillenTussen1en2Cent As %Integer = 0 + #dim CountVerschillenGroterDan2Cent As %Integer = 0 #dim LijstKleinerDan1CentVerschillenBeperkt As %String = "" #dim Product As DOM.PM.TAORProduct.TAORLade + #dim Kenmerken As DOM.PM.Maatwerk.Calc.Common.impl.TAORKenmerken #dim BerekeningSpecificatie As DOM.PM.Maatwerk.Calc.Common.BerekeningsSpecificatie #dim BerekenDatum As %Date #dim Node As %String = "" @@ -77,134 +79,52 @@ If (..ProductTypeApi.IsTAORboxProduct(ProductID)) { Set Product = ..ProductTypeApi.GeefTAORboxProduct(ProductID) + Set Kenmerken = Product.GeefIngegevenKenmerken() Set BerekeningSpecificatie = Product.GeefBerekeningsSpecificatie() Set BerekenDatum = BerekeningSpecificatie.GeefBerekenDatum() + #dim HeeftZijkantLogo As %Boolean = ($$$Not(Kenmerken.ZijkantLogoID = "")) - //If (BerekenDatum >= "66565") { // 66565 = 1/4/23 + // Volgende ZijkantLogos wijken af omwille van IsActief- of IsGratis-verschil tussen moment van berekening in Cache en actuele berekening via .net, nml.: Dexter, Warendorf, Dries Van Noten, Spaans Van Egmond + #dim IsZijkantLogoAfwijkend As %Boolean = ((Kenmerken.ZijkantLogoID = "156") || (Kenmerken.ZijkantLogoID = "244") || (Kenmerken.ZijkantLogoID = "242") || (Kenmerken.ZijkantLogoID = "144")) + #dim IsMoventoKoppeling As %Boolean = (Kenmerken.KoppelingType = ##class(DOM.PM.enu.TAORKoppelingType).Movento()) + + If ($$$Not(IsZijkantLogoAfwijkend) && IsMoventoKoppeling && (BerekenDatum >= "66444")) { // 66444 = 01/12/2022 + ;If ($$$Not(HeeftZijkantLogo)) { + ;If (BerekenDatum >= "66565") { // 66565 = 1/4/23 #dim ActuelePrijs As %Decimal = ..GeefPrijsVanProduct(+ProductID) - #dim ActuelePrijsAfgerond As %Decimal = ActuelePrijs // ##class(TECH.Math).Round(ActuelePrijs, 2) #dim SchaduwPrijs As %Decimal = ..GeefSchaduwPrijsVanProduct(+ProductID) - #dim SchaduwPrijsAfgerond As %Decimal = SchaduwPrijs // ##class(TECH.Math).Round(SchaduwPrijs, 2) Set CountTotaal = CountTotaal + 1 - Set Prijsverschil = SchaduwPrijsAfgerond - ActuelePrijsAfgerond + Set Prijsverschil = SchaduwPrijs - ActuelePrijs - If $$$Not(ActuelePrijsAfgerond = SchaduwPrijsAfgerond) { + If $$$Not(ActuelePrijs = SchaduwPrijs) { Set CountVerschillen = CountVerschillen + 1 If ((Prijsverschil < 0.01) && (Prijsverschil > -0.01)) { Set LijstKleinerDan1CentVerschillenBeperkt = $$$If(CountVerschillenKleinerDan1Cent > 30, LijstKleinerDan1CentVerschillenBeperkt, LijstKleinerDan1CentVerschillenBeperkt _ "/" _ ProductID) Set CountVerschillenKleinerDan1Cent = CountVerschillenKleinerDan1Cent + 1 - } - If ((Prijsverschil < 0.02) && (Prijsverschil > -0.02)) { + } ElseIf ((Prijsverschil < 0.02) && (Prijsverschil > -0.02)) { Set CountVerschillenTussen1en2Cent = CountVerschillenTussen1en2Cent +1 - } - If ((Prijsverschil >= 0.02) || (Prijsverschil <= -0.02)) { + ;Do ..Console.WriteLine("'"_$Justify(Prijsverschil,7,4)_"' verschil in prijs voor product '"_ProductID_"' "_$$$TAB_"- Prijs in Cache: '"_$Justify(ActuelePrijs,7,4)_"' "_$$$TAB_"en prijs in .net (nu in schaduw): '"_$Justify(SchaduwPrijs,7,4)_"' - BerekenDatum = '"_##class(TECH.DateTime.impl.DateTimeAPI).%New().HorologToTimeStamp(BerekenDatum)_"'") + } ElseIf ((Prijsverschil >= 0.02) || (Prijsverschil <= -0.02)) { Do ..Console.WriteLine("'"_$Justify(Prijsverschil,7,4)_"' verschil in prijs voor product '"_ProductID_"' "_$$$TAB_"- Prijs in Cache: '"_$Justify(ActuelePrijs,7,4)_"' "_$$$TAB_"en prijs in .net (nu in schaduw): '"_$Justify(SchaduwPrijs,7,4)_"' - BerekenDatum = '"_##class(TECH.DateTime.impl.DateTimeAPI).%New().HorologToTimeStamp(BerekenDatum)_"'") + Set CountVerschillenGroterDan2Cent = CountVerschillenGroterDan2Cent +1 } } - //} - } - } - /* - While ..ProductIterator.HasNext() { - Set ProductID = ..ProductIterator.Next().GetData(1) - - If (..ProductTypeApi.IsTAORboxProduct(ProductID)) { - Set Product = ..ProductTypeApi.GeefTAORboxProduct(ProductID) - Set BerekeningSpecificatie = Product.GeefBerekeningsSpecificatie() - Set BerekenDatum = BerekeningSpecificatie.GeefBerekenDatum() - - If (BerekenDatum >= "66565") { // 66565 = 1/4/23 - #dim ActuelePrijs As %Decimal = ..GeefPrijsVanProduct(+ProductID) - #dim ActuelePrijsAfgerond As %Decimal = ##class(TECH.Math).Round(ActuelePrijs, 2) - #dim SchaduwPrijs As %Decimal = ..GeefSchaduwPrijsVanProduct(+ProductID) - #dim SchaduwPrijsAfgerond As %Decimal = ##class(TECH.Math).Round(SchaduwPrijs, 2) - Set CountTotaal = CountTotaal + 1 - Set Prijsverschil = SchaduwPrijsAfgerond - ActuelePrijsAfgerond - - If $$$Not(ActuelePrijsAfgerond = SchaduwPrijsAfgerond) { - Set CountVerschillen = CountVerschillen + 1 - - If ((Prijsverschil = 0.01) || (Prijsverschil = -0.01)) { - Set CountVerschillen1Cent = CountVerschillen1Cent + 1 - } - If ((Prijsverschil > 0.01) || (Prijsverschil < -0.01)) { - Do ..Console.WriteLine("'"_$Justify(Prijsverschil,7,2)_"' verschil in prijs voor product '"_ProductID_"' "_$$$TAB_"- Prijs in Cache: '"_$Justify(ActuelePrijs,7,2)_"' "_$$$TAB_"en prijs in .net (nu in schaduw): '"_$Justify(SchaduwPrijs,7,2)_"' - BerekenDatum = '"_##class(TECH.DateTime.impl.DateTimeAPI).%New().HorologToTimeStamp(BerekenDatum)_"'") - } - } } } } - */ + Do ..Console.WriteLine("") Do ..Console.WriteLine("Totaal aantal TAOR-lades gecontrolleerd: '"_CountTotaal_"'") Do ..Console.WriteLine("Totaal aantal TAOR-lades met prijsverschillen '"_CountVerschillen_"'") Do ..Console.WriteLine("Totaal aantal TAOR-lades met KleinerDan-1-cent-prijsverschillen '"_CountVerschillenKleinerDan1Cent_"'") Do ..Console.WriteLine("Lijst KleinerDan-1-cent-prijsverschillen (eerst gevonden 30): "_LijstKleinerDan1CentVerschillenBeperkt) Do ..Console.WriteLine("Totaal aan TAOR-lades met prijsverschillen tussen 1 en 2 cent: '"_CountVerschillenTussen1en2Cent_"'") - Do ..Console.WriteLine("Totaal aantal TAOR-lades met prijsverschillen van meer dan 2 cent: '"_(CountVerschillen - CountVerschillenTussen1en2Cent)_"'") + Do ..Console.WriteLine("Totaal aantal TAOR-lades met prijsverschillen van meer dan 2 cent: '"_CountVerschillenGroterDan2Cent_"'") + Do ..Console.WriteLine("") ]]> - - - - - - - - ProductID:%Integer 1