Index: WSimpl/Halux/AAP/DnaCodeService/BufferHelper.cls.xml =================================================================== diff -u -r62905 -r62910 --- WSimpl/Halux/AAP/DnaCodeService/BufferHelper.cls.xml (.../BufferHelper.cls.xml) (revision 62905) +++ WSimpl/Halux/AAP/DnaCodeService/BufferHelper.cls.xml (.../BufferHelper.cls.xml) (revision 62910) @@ -48,6 +48,9 @@ Do ..UGLYPickingWrapper.CloseAndHandleBuffer(VolgNr, RGID) } } + If ##class(APPS.VisiDot.impl.Tech).IsFrameID(Pallet) { + Do ..MogelijkseTbxenBijVhosskastAfmelden(Pallet, Initialen) + } ]]> @@ -59,49 +62,36 @@ #dim DnaCode As DOM.Halux.AAP.DnaCode If DnaCodeIterator.HasNext() { Set DnaCode = DnaCodeIterator.Next() - #dim Query As %String + #dim QueryVoorInterneVhoss As %String + #dim QueryVoorDnaCode As %String #dim QueryParams As %List #dim ResultSet As TECH.ResultSet #dim InternVhossId As %String #dim InternZijvlakId As %String #dim DnaCodeTemp As DOM.Halux.AAP.DnaCode + + If ##class(TECH.StringUtils).StartsWith(DnaCode.DnaCode,"T") { - Set Query = "SELECT WPVerpak_Unitnr, WPVerpak_SubNr FROM PPS.TBX_Queue as pps join DOM_Halux_AAP.DnaCode as dna on dna.SequentieNummer = pps.Sequence and dna.batchid = pps.batchid where pps.BatchId = ? and PalletCode = ? " - Set QueryParams = $ListBuild(DnaCode.BatchId,Pallet) - Set ResultSet = ##class(TECH.Context).Instance().GeefQueryAPI().GeefQueryUitvoerder().VoerUit(Query, QueryParams) - While ResultSet.Next(){ - Set InternVhossId = ResultSet.GetData(1) - Set InternZijvlakId = ResultSet.GetData(2) - - Set Query = "SELECT DnaCode FROM PPS.TBX_Queue as pps join DOM_Halux_AAP.DnaCode as dna on dna.SequentieNummer = pps.Sequence and dna.batchid = pps.batchid where pps.BatchId = ? and WPVerpak_Unitnr = ? and WPVerpak_SubNr = ? and not(PalletCode like 'O1%') and dna.status = 'Gescand'" - Set QueryParams = $ListBuild(DnaCode.BatchId,InternVhossId,InternZijvlakId) - Set ResultSet = ##class(TECH.Context).Instance().GeefQueryAPI().GeefQueryUitvoerder().VoerUit(Query, QueryParams) - Set DnaCodeList = ##class(%ListOfObjects).%New() - While ResultSet.Next(){ - Set DnaCodeTemp = ..DnaCodeRepository.ZoekViaDnaCode(ResultSet.GetData(1)).Next() - Do DnaCodeList.Insert(DnaCodeTemp) - Do ..DnaCodesKlaarmakenVoorBuffer(##class(TECH.ListIterator).%New(DnaCodeList), ##class(DOM.Halux.AAP.enu.DnaCodeStatus).%New().InBuffer(),,DnaCodeTemp.PalletCode,Initialen) - } - } - + Set QueryVoorInterneVhoss = "SELECT WPVerpak_Unitnr, WPVerpak_SubNr FROM PPS.TBX_Queue as pps join DOM_Halux_AAP.DnaCode as dna on dna.SequentieNummer = pps.Sequence and dna.batchid = pps.batchid where pps.BatchId = ? and PalletCode = ? " + Set QueryVoorDnaCode = "SELECT DnaCode FROM PPS.TBX_Queue as pps join DOM_Halux_AAP.DnaCode as dna on dna.SequentieNummer = pps.Sequence and dna.batchid = pps.batchid where pps.BatchId = ? and WPVerpak_Unitnr = ? and WPVerpak_SubNr = ? and not(PalletCode like 'O1%') and dna.status = 'Gescand'" } Else { - Set Query = "SELECT VHOSSID, ZijvlakId FROM DOM_Halux_AAP.DnaCode as dna join APPS_Halux_common.VHOSSProductieSequentieItem as pps on dna.batchid = pps.batchid and dna.sequentienummer = pps.groepsequentienummer where pps.BatchId = ? and PalletCode = ?" - Set QueryParams = $ListBuild(DnaCode.BatchId,Pallet) - Set ResultSet = ##class(TECH.Context).Instance().GeefQueryAPI().GeefQueryUitvoerder().VoerUit(Query, QueryParams) + Set QueryVoorInterneVhoss = "SELECT VHOSSID, ZijvlakId FROM DOM_Halux_AAP.DnaCode as dna join APPS_Halux_common.VHOSSProductieSequentieItem as pps on dna.batchid = pps.batchid and dna.sequentienummer = pps.groepsequentienummer where pps.BatchId = ? and PalletCode = ?" + Set QueryVoorDnaCode = "SELECT DnaCode FROM DOM_Halux_AAP.DnaCode as dna join APPS_Halux_common.VHOSSProductieSequentieItem as pps on dna.batchid = pps.batchid and dna.sequentienummer = pps.groepsequentienummer where pps.BatchId = ? and VHOSSID = ? and ZijvlakId = ? and not(PalletCode like 'O1%') and dna.status = 'Gescand'" + } + + Set QueryParams = $ListBuild(DnaCode.BatchId,Pallet) + Set ResultSet = ##class(TECH.Context).Instance().GeefQueryAPI().GeefQueryUitvoerder().VoerUit(QueryVoorInterneVhoss, QueryParams) + While ResultSet.Next(){ + Set InternVhossId = ResultSet.GetData(1) + Set InternZijvlakId = ResultSet.GetData(2) + + Set QueryParams = $ListBuild(DnaCode.BatchId,InternVhossId,InternZijvlakId) + Set ResultSet = ##class(TECH.Context).Instance().GeefQueryAPI().GeefQueryUitvoerder().VoerUit(QueryVoorDnaCode, QueryParams) + Set DnaCodeList = ##class(%ListOfObjects).%New() While ResultSet.Next(){ - Set InternVhossId = ResultSet.GetData(1) - Set InternZijvlakId = ResultSet.GetData(2) - - Set Query = "SELECT DnaCode FROM DOM_Halux_AAP.DnaCode as dna join APPS_Halux_common.VHOSSProductieSequentieItem as pps on dna.batchid = pps.batchid and dna.sequentienummer = pps.groepsequentienummer where pps.BatchId = ? and VHOSSID = ? and ZijvlakId = ? and not(PalletCode like 'O1%') and dna.status = 'Gescand'" - Set QueryParams = $ListBuild(DnaCode.BatchId,InternVhossId,InternZijvlakId) - Set ResultSet = ##class(TECH.Context).Instance().GeefQueryAPI().GeefQueryUitvoerder().VoerUit(Query, QueryParams) - - Set DnaCodeList = ##class(%ListOfObjects).%New() - While ResultSet.Next(){ - Set DnaCodeTemp = ..DnaCodeRepository.ZoekViaDnaCode(ResultSet.GetData(1)).Next() - Do DnaCodeList.Insert(DnaCodeTemp) - Do ..DnaCodesKlaarmakenVoorBuffer(##class(TECH.ListIterator).%New(DnaCodeList), ##class(DOM.Halux.AAP.enu.DnaCodeStatus).InBuffer(),,DnaCodeTemp.PalletCode,Initialen) - } + Set DnaCodeTemp = ..DnaCodeRepository.ZoekViaDnaCode(ResultSet.GetData(1)).Next() + Do DnaCodeList.Insert(DnaCodeTemp) + Do ..DnaCodesKlaarmakenVoorBuffer(##class(TECH.ListIterator).%New(DnaCodeList), ##class(DOM.Halux.AAP.enu.DnaCodeStatus).InBuffer(),,DnaCodeTemp.PalletCode,Initialen) } } }