From 9bb8751e2124a4c6c3e6bafdc4005922fdfa093c Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Fri, 11 Apr 2025 10:51:23 +0200 Subject: [PATCH] Implementate nuove logiche di barcode_ul in rettifica giacenze --- .../generic/service/WMSGenericService.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSGenericService.java b/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSGenericService.java index 0a01c83fa1..4985a752c8 100644 --- a/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSGenericService.java +++ b/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSGenericService.java @@ -1194,6 +1194,9 @@ public class WMSGenericService { } public MtbColr creaRettificaCollo(String codMdep, MtbColr sourceMtbColr, BigDecimal newNumCnf, BigDecimal newQtaCol, boolean createNewCollo, boolean returnRettifica, Boolean shouldCreateMovFiscale) throws Exception { + if(UtilityString.isNullOrEmpty(sourceMtbColr.getBarcodeUlIn())) + throw new MissingDataException("Il barcode UL in input non può essere nullo"); + /* Warning: il campo sourceMtbColr potrebbe non essere una reale mtb_colr ma potrebbe essere la somma delle qta delle mtb_colr con stesso cod_mart, partita_mag, cod_col, cod_tagl. @@ -1285,6 +1288,12 @@ public class WMSGenericService { .setDataCollo(null) .setSerCollo(null) .setGestione(null) + .setBarcodeUlIn(sourceMtbColr.getBarcodeUlIn()) + .setBarcodeUlOut(null) + .setCodMdepIn(sourceMtbColr.getCodMdepIn()) + .setCodMdepOut(null) + .setPosizioneIn(sourceMtbColr.getPosizioneIn()) + .setPosizioneOut(null) .setQtaCol(differenceQtaCol) .setNumCnf(differenceNumCnf) .setQtaCnf(qtaCnf) @@ -1299,7 +1308,7 @@ public class WMSGenericService { .setGestione("L") .setSegno(1) .setCodMdep(codMdep) - .setMtbColr(new ArrayList()); + .setMtbColr(new ArrayList<>()); mtbColtOrphan.setOperation(OperationType.INSERT); mtbColtOrphan.getMtbColr().add(mtbColrOrphan); @@ -1366,6 +1375,12 @@ public class WMSGenericService { .setDataColloRif(sourceMtbColr.getDataCollo()) .setGestioneRif(sourceMtbColr.getGestione()) .setNumColloRif(sourceMtbColr.getNumCollo()) + .setBarcodeUlIn(null) + .setBarcodeUlOut(sourceMtbColr.getBarcodeUlIn()) + .setCodMdepIn(null) + .setCodMdepOut(sourceMtbColr.getCodMdepIn()) + .setPosizioneIn(null) + .setPosizioneOut(sourceMtbColr.getPosizioneIn()) .setPesoNettoKg(null) .setPesoLordoKg(null) .setDatetimeRow(UtilityLocalDate.getNowTime()); @@ -1422,6 +1437,12 @@ public class WMSGenericService { .setDatetimeRow(UtilityLocalDate.getNowTime()) .setPesoNettoKg(null) .setPesoLordoKg(null) + .setBarcodeUlIn(sourceMtbColr.getBarcodeUlIn()) + .setBarcodeUlOut(null) + .setCodMdepIn(sourceMtbColr.getCodMdepIn()) + .setCodMdepOut(null) + .setPosizioneIn(sourceMtbColr.getPosizioneIn()) + .setPosizioneOut(null) .setOperation(OperationType.INSERT); mtbColt.getMtbColr().add(mtbColrToSave);