Index: APPS/VKP/Maatwerk/LadeRegistratie/impl/CodeGenerator.cls.xml =================================================================== diff -u -r57969 -r57972 --- APPS/VKP/Maatwerk/LadeRegistratie/impl/CodeGenerator.cls.xml (.../CodeGenerator.cls.xml) (revision 57969) +++ APPS/VKP/Maatwerk/LadeRegistratie/impl/CodeGenerator.cls.xml (.../CodeGenerator.cls.xml) (revision 57972) @@ -36,23 +36,34 @@ Set Dev=0 ;$$OPEN^vhDEV("c:\scratch","LadeCode "_Vanaf_" tot "_(Vanaf+Aantal-1)_".txt","W") Set Dev=$$OPEN^vhDEV("c:\temp","LadeCode "_Vanaf_" tot "_(Vanaf+Aantal-1)_".txt","W") //Set Dev=$$OPEN^vhDEV(,"LadeCode "_Vanaf_" tot "_(Vanaf+Aantal-1)_".txt","W","T") - Use Dev + //Use Dev Write "CodeNr CodeGeformateerd CodeBarcode Formaat",! - For CodeNr=Vanaf:1:Vanaf+Aantal-1 - { - Do ..Calculator.Bereken(CodeNr) - If ..BevatGeenOngewensteWoorden() + try { + For CodeNr=Vanaf:1:Vanaf+Aantal-1 { - Write ..Calculator.CodeNr,*9,Prefix_..Calculator.CodeGeformateerd,*9,Prefix_..Calculator.Code,*9,..Calculator.CodeFormat,! - - New OrgaluxLadecode - Set OrgaluxLadecode = ##class(DOM.VKP.Maatwerk.LadeRegistratie.impl.OrgaluxLadecode).%New() - Set OrgaluxLadecode.Basisgetal = CodeNr - Set OrgaluxLadecode.GegenereerdeCode = Prefix_..Calculator.Code - Set OrgaluxLadecode.Horolog = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentHorolog() - Do ..OrgaluxLadecodeRepository.Bewaar(OrgaluxLadecode) - } + Do ..Calculator.Bereken(CodeNr) + If ..BevatGeenOngewensteWoorden() + { + Write ..Calculator.CodeNr,*9,Prefix_..Calculator.CodeGeformateerd,*9,Prefix_..Calculator.Code,*9,..Calculator.CodeFormat,! + + New OrgaluxLadecode + Set OrgaluxLadecode = ##class(DOM.VKP.Maatwerk.LadeRegistratie.impl.OrgaluxLadecode).%New() + Set OrgaluxLadecode.Basisgetal = CodeNr + Set OrgaluxLadecode.GegenereerdeCode = Prefix_..Calculator.Code + Set OrgaluxLadecode.Horolog = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentHorolog() + Do ..OrgaluxLadecodeRepository.Bewaar(OrgaluxLadecode) + } + } + } catch { + New Exception + Set Exception = ##class(TECH.ExceptionHandler).Catch() + + Do CLOSE^vhDEV(Dev) + Write !, "Er is een fout opgetreden bij de codegeneratie. Laatste code = '"_CodeNr_"'" + + Do ##class(TECH.ExceptionHandler).Rethrow(Exception) } + Do CLOSE^vhDEV(Dev) ]]> Index: vhUnitTest/APPS/VKP/Maatwerk/LadeRegistratie/impl/CodeGenerator/Genereer/Test.cls.xml =================================================================== diff -u -r57971 -r57972 --- vhUnitTest/APPS/VKP/Maatwerk/LadeRegistratie/impl/CodeGenerator/Genereer/Test.cls.xml (.../Test.cls.xml) (revision 57971) +++ vhUnitTest/APPS/VKP/Maatwerk/LadeRegistratie/impl/CodeGenerator/Genereer/Test.cls.xml (.../Test.cls.xml) (revision 57972) @@ -32,6 +32,24 @@ ]]> + + + + Aantal:%Integer 1