Index: APPS/Halux/Planning/impl/BatchService.cls.xml =================================================================== diff -u -r57927 -r75115 --- APPS/Halux/Planning/impl/BatchService.cls.xml (.../BatchService.cls.xml) (revision 57927) +++ APPS/Halux/Planning/impl/BatchService.cls.xml (.../BatchService.cls.xml) (revision 75115) @@ -4,13 +4,13 @@ %occIO TECH.RegisteredObject,APPS.Halux.Planning.BatchService - -APPS.Halux.common.BatchService + +APPS.Halux.common.ProductieService 1 - -APPS.Halux.common.ProductieService + +APPS.Halux.common.BatchService 1 @@ -19,16 +19,27 @@ 1 + +APPS.Halux.Planning.impl.BatchService.MaatwerkBatchBuilderFactory +1 + + + +DOM.PM.impl.ProductTypeAPIimpl + + -ProductieService:APPS.Halux.common.ProductieService="" +ProductieService:APPS.Halux.common.ProductieService="",BatchService:APPS.Halux.common.BatchService,ToeleveringAPI:DOM.AKP.ToeleveringAPI,MaatwerkBatchBuilderFactory:APPS.Halux.Planning.impl.BatchService.MaatwerkBatchBuilderFactory,ProductTypeAPI:DOM.PM.impl.ProductTypeAPIimpl 1 1 %Status 1 @@ -55,7 +66,6 @@ ELEMENTTYPE="APPS.Halux.Planning.dto.MaatwerkBatch" %ListOfObjects ELEMENTTYPE="APPS.Halux.Planning.dto.Toelevering" @@ -212,8 +222,21 @@ #dim ProductLijn As DOM.AKP.ProductToeleveringLijn = Toelevering.GeefTypeToeleveringLijnIterator(##class(DOM.AKP.enu.ToeleveringLijnType).Product()).Next() #dim ProductieGroep As APPS.Halux.common.enu.ProductieGroep = ..ProductieService.GeefProductieGroep(Toelevering.GeefKlantID(), ProductLijn.GeefProductID()) #dim ProductieLijnBepaler As APPS.Halux.Planning.impl.ProductieLijnBepaler = ##class(APPS.Halux.Planning.impl.ProductieLijnBepaler).%New() + #dim ProductieLijnBepalerOBJTMES As APPS.Halux.Planning.impl.ProductieLijnBepalerOBJTMES = ##class(APPS.Halux.Planning.impl.ProductieLijnBepalerOBJTMES).%New() - set Lijn = ProductieLijnBepaler.BepaalLijn(Categorie, ProductieGroep) + #dim MesFaseActief As %Integer = ##class(TECH.Config.ConfigMgr).Instance().GeefString("APPS.Halux.PPS.Document.impl.BatchNaarObjective_MESFase") + #dim CategorTLM As %Boolean = ((..ProductTypeAPI.IsLegraboxProduct(ProductLijn.GeefProductID()) || ..ProductTypeAPI.IsMerivoboxProduct(ProductLijn.GeefProductID()) || ..ProductTypeAPI.IsTandemboxProduct(ProductLijn.GeefProductID()))) + + Set IsProductieWijzeVolledigBepaler = ##class(DOM.PM.Maatwerk.IngegevenKenmerkenTypeAPI.IsProductieWijzeVolledigBepaler).%New() + #dim MaatwerkProduct As DOM.PM.MaatwerkProduct = ..ProductTypeAPI.GeefMaatwerkProduct(ProductLijn.GeefProductID()) + #dim IngegevenKenmerken As DOM.PM.Maatwerk.Calc.Common.IngegevenKenmerken = MaatwerkProduct.GeefIngegevenKenmerken() + #dim HeeftProductiewijzeVolledig As %Boolean = IsProductieWijzeVolledigBepaler.IsProductieWijzeVolledig(IngegevenKenmerken) + + If ((MesFaseActief > 1) && CategorTLM){ + set Lijn = ProductieLijnBepalerOBJTMES.BepaalLijn(Categorie, ProductieGroep, Toelevering.GeefKlantID(), HeeftProductiewijzeVolledig) + } Else { + set Lijn = ProductieLijnBepaler.BepaalLijn(Categorie, ProductieGroep) + } } quit Lijn @@ -250,6 +273,10 @@ do VerplaatsProblemen.Insert("De toelevering wordt verplaatst vanuit een batch die reeds is gestart") } + if (($IsObject(BronBatch)) && (BronBatch.GeefStatus() = ##class(APPS.Halux.common.enu.BatchStatus).BezigMetStarten())) { + do VerplaatsProblemen.Insert("De toelevering wordt verplaatst vanuit een batch die bezig is met starten") + } + if (MaatwerkBatch.Status = ##class(APPS.Halux.common.enu.BatchStatus).Gestart()) { do VerplaatsProblemen.Insert("De batch is reeds gestart") } @@ -288,6 +315,14 @@ do Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).Twee()) do Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).Drie()) do Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).B()) + + do:(##class(DOM.common.impl.ProjectSettingsAPI).%New().IsActiefLijn5()) Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).Vijf()) + } elseif (Categorie = ##class(APPS.Halux.common.enu.Categorie).Merivobox()) { + do Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).Vier()) + + do:(##class(DOM.common.impl.ProjectSettingsAPI).%New().IsActiefLijn5()) Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).Vijf()) + } elseif (Categorie = ##class(APPS.Halux.common.enu.Categorie).Revego()) { + do Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).SpecialWorkshop()) } else{ do Namen.Insert(##class(APPS.Halux.common.enu.ProductieLijn).Een()) } @@ -425,35 +460,34 @@ #dim MaatwerkBatches As array of APPS.Halux.Planning.dto.TandemboxBatch = ##class(%ArrayOfObjects).%New() #dim ToeleveringIterator As TECH.Iterator = ##class(DOM.DomeinContext).Instance().GeefAankoopAPI().GeefLeverancier(##class(DOM.AKP.enu.Leverancier).Halux()).GeefToeleveringIterator() - while (ToeleveringIterator.HasNext()) { + While (ToeleveringIterator.HasNext()) { #dim Toelevering As DOM.AKP.Toelevering = ToeleveringIterator.Next() - try { + Try { #dim GeplandOpDatum As %Date = ..GeefGeplandOpDatum(Toelevering.GeefID()) - if ((GeplandOpDatum = Datum) && $$$Not($IsObject(..BatchService.GeefBijhorendeBatch(Toelevering)))) { + If ((GeplandOpDatum = Datum) && $$$Not($IsObject(..BatchService.GeefBijhorendeBatch(Toelevering)))) { #dim Categorie As APPS.Halux.common.enu.Categorie = ..ProductieService.GeefCategorieVoorToelevering(Toelevering) #dim Builder As APPS.Halux.Planning.impl.BatchService.MaatwerkBatchBuilder = ..GeefMaatwerkBatchBuilder(Categorie) - if $$$Not(MaatwerkBatches.IsDefined(Categorie)) { + If $$$Not(MaatwerkBatches.IsDefined(Categorie)) { #dim MaatwerkBatch As APPS.Halux.Planning.dto.MaatwerkBatch = Builder.GeefNieuweMaatwerkBatchDto() - set MaatwerkBatch.Datum = Datum - set MaatwerkBatch.HeeftAandachtNodig = 0 - set MaatwerkBatch.Status = ##class(APPS.Halux.common.enu.BatchStatus).Auto() - set MaatwerkBatch.IsASAP = 0 - set MaatwerkBatch.Categorie = Categorie + Set MaatwerkBatch.Datum = Datum + Set MaatwerkBatch.HeeftAandachtNodig = 0 + Set MaatwerkBatch.Status = ##class(APPS.Halux.common.enu.BatchStatus).Auto() + Set MaatwerkBatch.IsASAP = 0 + Set MaatwerkBatch.Categorie = Categorie - do MaatwerkBatches.SetAt(MaatwerkBatch, Categorie) - } else { - set MaatwerkBatch = MaatwerkBatches.GetAt(Categorie) + Do MaatwerkBatches.SetAt(MaatwerkBatch, Categorie) + } Else { + Set MaatwerkBatch = MaatwerkBatches.GetAt(Categorie) } - do Builder.AggregeerToeleveringInBatch(Toelevering, MaatwerkBatch) + Do Builder.AggregeerToeleveringInBatch(Toelevering, MaatwerkBatch) } } catch { - Do ##class(Tools.Wlip).%New(207).String("Toelevering " _ Toelevering.GeefID()) - do ##class(vhLib.Logger).%New().LogEnMailExceptie(##class(TECH.ExceptionHandler).Catch()) + Do ##class(vhLib.Logger).%New().LogEnMailExceptie(##class(TECH.ExceptionHandler).Catch()) } } @@ -658,23 +692,7 @@ Categorie:APPS.Halux.common.enu.Categorie 1 APPS.Halux.Planning.impl.BatchService.MaatwerkBatchBuilder -