Index: AX/Uitgaand/PM/PakketReferenties/impl/PakketReferentiesDixfGenerator.cls.xml
===================================================================
diff -u -r48035 -r48039
--- AX/Uitgaand/PM/PakketReferenties/impl/PakketReferentiesDixfGenerator.cls.xml (.../PakketReferentiesDixfGenerator.cls.xml) (revision 48035)
+++ AX/Uitgaand/PM/PakketReferenties/impl/PakketReferentiesDixfGenerator.cls.xml (.../PakketReferentiesDixfGenerator.cls.xml) (revision 48039)
@@ -24,6 +24,16 @@
1
+
+AX.Uitgaand.PM.Product.impl.Product
+1
+
+
+
+%String
+1
+
+
TECH.File.FileWriter
1
@@ -97,27 +107,22 @@
Try {
Do StartTimer^vhLib
- Set ..ProductStream = ##class(%Library.GlobalCharacterStream).%New()
- Set ..VrijgegProductStream = ##class(%Library.GlobalCharacterStream).%New()
- Set ..WHSReservationHierarchyItemStream = ##class(%Library.GlobalCharacterStream).%New()
- Set ..ExtArtOmschrStream = ##class(%Library.GlobalCharacterStream).%New()
- Set ..StuklijstStream = ##class(%Library.GlobalCharacterStream).%New()
-
+ Do ..InitieerStreams()
Do ..MaakHeaders()
#dim NameArray As array Of %String = ##class(%ArrayOfDataTypes).%New()
#dim EcoResProductTranslationName As %String
Set PakketLijst = ##class(%ListOfDataTypes).%New()
While ..Iterator.HasNext() {
- #dim PakketOnderdeel As AX.Uitgaand.PM.Product.impl.Product = ..Iterator.Next()
- #dim Pakket As DOM.PM.impl.DataM.Pakket = PakketOnderdeel.PakketOnderdeel.Pakket
+ Set ..PakketOnderdeel = ..Iterator.Next()
+ #dim Pakket As DOM.PM.impl.DataM.Pakket = ..PakketOnderdeel.PakketOnderdeel.Pakket
#dim PakketNummer As %String = Pakket.PakketNummer
If $$$Not(##class(TECH.ListUtils).Contains(PakketLijst,PakketNummer)) {
#dim PakketNaam As %String = Pakket.Naam
#dim AxKlantNr As %String = ##class(TECH.StringUtils).AddLeadingChar(Pakket.KlantNr,"0",5)
- #dim NieuwArticleID As %String = ..ArticleIDGenerator.GeefNieuwArticleID()
+ Set ..NieuwArticleID = ..ArticleIDGenerator.GeefNieuwArticleID()
Set EcoResProductTranslationName = "K"_AxKlantNr_"R"_PakketNaam
If ($Length(EcoResProductTranslationName) > 25) {
@@ -132,26 +137,15 @@
}
#dim SearchName As %String = ##class(TECH.StringUtils).StringStrippenVanLeestekensSpatiesTabs(EcoResProductTranslationName)
- Do ..ProductStream.WriteLine("2;0;;"_NieuwArticleID_";;"_PakketNaam_";nl-be;"_EcoResProductTranslationName_";WMS;None;Nee;Nee;Product;Artikel;"_SearchName_";")
- Do ..VrijgegProductStream.WriteLine(";;;;;;;;;1;STK;Batch;;;VHEPN1;Productie;"_NieuwArticleID_";WMS;Batch;;;Nee;1;;VHEPN1;0;;;Nee;;Nee;Nee;1;;VHEPN1;;;Nee;;Nee;;Nee;CTP;;;VHEPN1;;;;Nee;;Nee;Nee;;;;;Nee;;;VHEPN1;Ja;;STK;Ja;0;G3;0;STK;Ja;;G3;STK;;Nee;;"_NieuwArticleID_";CACHE;Artikel;;;SOPR;"_SearchName_";;;;Ja;Stuklijst;;Finish;CACHE;;;;;;;;Handmatig;CACHE;;;;;;;;"_SearchName_";Nee;STK;")
- Do ..WHSReservationHierarchyItemStream.WriteLine("vhbe;"_NieuwArticleID_";5637144578")
- Do ..ExtArtOmschrStream.WriteLine("1;"_AxKlantNr_";"_PakketNaam_";;AllBlank;"_NieuwArticleID_";04")
+ Do ..ProductStream.WriteLine("2;0;;"_..NieuwArticleID_";;"_PakketNaam_";nl-be;"_EcoResProductTranslationName_";WMS;None;Nee;Nee;Product;Artikel;"_SearchName_";")
+ Do ..VrijgegProductStream.WriteLine(";;;;;;;;;1;STK;Batch;;;VHEPN1;Productie;"_..NieuwArticleID_";WMS;Batch;;;Nee;1;;VHEPN1;0;;;Nee;;Nee;Nee;1;;VHEPN1;;;Nee;;Nee;;Nee;CTP;;;VHEPN1;;;;Nee;;Nee;Nee;;;;;Nee;;;VHEPN1;Ja;;STK;Ja;0;G3;0;STK;Ja;;G3;STK;;Nee;;"_..NieuwArticleID_";CACHE;Artikel;;;SOPR;"_SearchName_";;;;Ja;Stuklijst;;Finish;CACHE;;;;;;;;Handmatig;CACHE;;;;;;;;"_SearchName_";Nee;STK;")
+ Do ..WHSReservationHierarchyItemStream.WriteLine("vhbe;"_..NieuwArticleID_";5637144578")
+ Do ..ExtArtOmschrStream.WriteLine("1;"_AxKlantNr_";"_PakketNaam_";;AllBlank;"_..NieuwArticleID_";04")
Do PakketLijst.Insert(PakketNummer)
+ Do ..SchrijfInStuklijstBestand()
} Else {
- #dim ProductId As %String = PakketOnderdeel.PakketOnderdeel.Product.ProductNr
- #dim GenerischProductId As %String = ..ProductApi.GeefProduct(ProductId).GeefGenerischProductID()
- #dim GenerischIsOk As %Boolean = $$$If(($$$HasLength(GenerischProductId)&&(..ProductApi.BestaatProduct(GenerischProductId))),$$$True,$$$False)
- #dim TeGebruikenProductNr As %String = $$$If(GenerischIsOk,GenerischProductId,ProductId)
-
- If ((..AxProductConvertor.IsSOPRInCache(TeGebruikenProductNr)) && $$$Not(..AxProductConvertor.IsSOPRInAX(TeGebruikenProductNr))) {
- Set TeGebruikenProductNr = ..AxProductConvertor.GeefVervangProductDoorSOPRInAX(TeGebruikenProductNr)
- }
-
- #dim PakketOnderdeelItemId As %String = ..ProductApi.GeefProduct(TeGebruikenProductNr).GeefIdentNr()
- #dim AdminProductNummer As %String = $$$If(GenerischIsOk,ProductId,"")
-
- Do ..StuklijstStream.WriteLine(PakketOnderdeel.PakketOnderdeel.Aantal_";"_AdminProductNummer_";"_PakketOnderdeelItemId_";"_NieuwArticleID)
+ Do ..SchrijfInStuklijstBestand()
}
}
@@ -167,36 +161,22 @@
]]>
+
+1
+
+
+
1
+
+
+1
+%ListOfDataTypes
+
+
+
+
+1
+
+