From c57251bc2c450fcd25004c4647e2b3d3fb31317f Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Thu, 6 Feb 2025 17:06:29 +0100 Subject: [PATCH] [WMS] Implementata generazione documento durante la rettifica giacenze. Migliorie sulle LocalDate. --- .../model/Migration_20250205190829.java | 31 +++ .../model/Migration_20250206103823.java | 1 + .../java/it/integry/ems/user/UtilityUser.java | 2 +- .../it/integry/ems_model/entity/MtbColr.java | 7 +- .../production/dto/CaricoLavorazioneDTO.java | 7 +- .../Import/service/BiolexchImportService.java | 3 +- .../ems/retail/pvmRetail/dto/save/ArtDTO.java | 7 +- .../service/WMSAccettazioneService.java | 7 +- .../generic/service/WMSGenericService.java | 190 +++++++++++------- .../service/WMSMagazzinoBufferService.java | 6 +- .../service/WMSLavorazioneService.java | 2 +- .../service/WMSMaterialiService.java | 9 +- .../vendita/service/WMSSpedizioneService.java | 2 +- 13 files changed, 181 insertions(+), 93 deletions(-) create mode 100644 ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250205190829.java diff --git a/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250205190829.java b/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250205190829.java new file mode 100644 index 0000000000..3822ac0d41 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250205190829.java @@ -0,0 +1,31 @@ +package it.integry.ems.migration.model; + +import it.integry.ems.migration._base.BaseMigration; +import it.integry.ems.migration._base.MigrationModelInterface; + +public class Migration_20250205190829 extends BaseMigration implements MigrationModelInterface { + + @Override + public void up() throws Exception { + if (isHistoryDB()) + return; + + createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'"); + createSetup("PICKING", "RETTIFICA_GIACENZE", "FLAG_ENABLE_MOVIMENTO_FISCALE", "N", +"Flag che abilita o meno la generazione automatica di un movimento fiscale quando viene effettuata una rettifica giacenze", false, "SI_NO", false, false, +false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'"); + + + + createSetupQuery("COD_DTIP", "COD_DTIP", "SELECT COD_DTIP FROM DTB_TIPI ORDER BY 1"); + createSetup("PICKING", "RETTIFICA_GIACENZE", "TIPO_MOVIMENTO_FISCALE", null, +"Indica il tipo documento del movimento fiscale da utilizzare", false, "COD_DTIP", false, false, +false, false, false, null, false, "SELECT COD_DTIP FROM DTB_TIPI ORDER BY 1"); + } + + @Override + public void down() throws Exception { + + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250206103823.java b/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250206103823.java index 8c687bccf0..76b8929a50 100644 --- a/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250206103823.java +++ b/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250206103823.java @@ -14,6 +14,7 @@ public class Migration_20250206103823 extends BaseMigration implements Migration createSetup("W_GANAG_RC", "SETUP", "CHECK_COD_FISC", "N", "Blocca se codice fiscale è esistente", false, "SI_NO", false, false, false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'"); + createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'"); createSetup("W_GANAG_RC", "SETUP", "CHECK_PART_IVA", "N", "Blocca se partita iva è esistente", false, "SI_NO", false, false, diff --git a/ems-core/src/main/java/it/integry/ems/user/UtilityUser.java b/ems-core/src/main/java/it/integry/ems/user/UtilityUser.java index 8fc9e6b185..4492c04cf4 100644 --- a/ems-core/src/main/java/it/integry/ems/user/UtilityUser.java +++ b/ems-core/src/main/java/it/integry/ems/user/UtilityUser.java @@ -76,7 +76,7 @@ public class UtilityUser { List depos = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MtbDepo.class); if (depos == null || depos.isEmpty()) { - logger.info("Nessun deposito trovato per l'utente " + userDTO.getUsername()); + logger.trace("Nessun deposito trovato per l'utente " + userDTO.getUsername()); return null; } diff --git a/ems-core/src/main/java/it/integry/ems_model/entity/MtbColr.java b/ems-core/src/main/java/it/integry/ems_model/entity/MtbColr.java index fea4835960..0af7ee3978 100644 --- a/ems-core/src/main/java/it/integry/ems_model/entity/MtbColr.java +++ b/ems-core/src/main/java/it/integry/ems_model/entity/MtbColr.java @@ -15,6 +15,7 @@ import org.kie.api.definition.type.PropertyReactive; import java.math.BigDecimal; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.Date; import java.util.Objects; @@ -102,7 +103,7 @@ public class MtbColr extends EntityBase implements EquatableEntityInterface()); colloDest.setMtbCols(new ArrayList<>()); colloDest.setMtbColr(new ArrayList<>()); - colloCarico.getMtbColr().get(0).setDatetimeRow(DateUtils.addMinutes(Calendar.getInstance().getTime(), 5)); + colloCarico.getMtbColr().get(0).setDatetimeRow(UtilityLocalDate.getNowTime().plusMinutes(5)); wmsGenericService.spostaArtsTraUL(colloCarico, colloDest, false); return colloCarico; 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 a6038006e1..a25f1b65b3 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 @@ -26,6 +26,7 @@ import it.integry.ems.retail.wms.generic.dto.ordine.SM2OrdineBancaleDTO; import it.integry.ems.retail.wms.generic.dto.ordine.SM2OrdineSingoloDTO; import it.integry.ems.retail.wms.generic.dto.picking_list.*; import it.integry.ems.rules.completing.PackagesRules; +import it.integry.ems.service.AziendaService; import it.integry.ems.service.EntityProcessor; import it.integry.ems.service.PrinterService; import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager; @@ -62,11 +63,14 @@ public class WMSGenericService { private final Logger logger = LogManager.getLogger(); @Autowired - SetupGest setupGest; + private SetupGest setupGest; @Autowired private MultiDBTransactionManager multiDBTransactionManager; + @Autowired + private AziendaService aziendaService; + @Autowired private WMSGiacenzaService wmsGiacenzaService; @@ -1207,6 +1211,7 @@ public class WMSGenericService { boolean isPositiveUpdate = UtilityBigDecimal.lowerThan(sourceMtbColr.getQtaCol(), newQtaCol); boolean isNegativeUpdate = UtilityBigDecimal.greaterThan(sourceMtbColr.getQtaCol(), newQtaCol); + boolean shouldCreateMovimentoFiscale = setupGest.getSetupBoolean(multiDBTransactionManager.getPrimaryConnection(), "PICKING", "RETTIFICA_GIACENZE", "FLAG_ENABLE_MOVIMENTO_FISCALE"); BigDecimal differenceQtaCol = newQtaCol.subtract(sourceMtbColr.getQtaCol()); BigDecimal differenceNumCnf = newNumCnf.subtract(sourceMtbColr.getNumCnf()); @@ -1221,11 +1226,51 @@ public class WMSGenericService { MtbColr mtbColrToSave = null; MtbColr mtbColrOrphan; - if (isDocumentAttached || createNewCollo) { + try { - if (isPositiveUpdate) { - //Creo una UL L+ orfana che poi aggancio nel collo attuale - try { + DtbDoct dtbDoctInv = null; + + if (shouldCreateMovimentoFiscale && isDocumentAttached) { + String codDtipToUse = setupGest.getSetup(multiDBTransactionManager.getPrimaryConnection(), "PICKING", "RETTIFICA_GIACENZE", "TIPO_MOVIMENTO_FISCALE"); + + if (UtilityString.isNullOrEmpty(codDtipToUse)) + throw new Exception("Per poter generare il movimento fiscale è necessario configurare anche la setup TIPO_MOVIMENTO_FISCALE"); + + + String sqlCheckDocExists = Query.format("SELECT TOP 1 cod_anag, cod_dtip, ser_doc, data_doc, num_doc " + + " FROM " + DtbDoct.ENTITY + + " WHERE cod_mdep = {} AND data_doc = {} AND cod_dtip = {} " + + " ORDER BY num_doc DESC", + codMdep, UtilityLocalDate.getNow(), codDtipToUse); + + dtbDoctInv = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sqlCheckDocExists, DtbDoct.class); + + if (dtbDoctInv == null) { + String codAnagAziendale = aziendaService.retrieveInternalCodAnagFornitore(); + dtbDoctInv = new DtbDoct(codAnagAziendale, codDtipToUse, new Date(), null, null) + .setCodMdep(codMdep); + dtbDoctInv.setOperation(OperationType.INSERT); + } else { + dtbDoctInv.setOperation(OperationType.NO_OP); + } + + final DtbDocr dtbDocr = new DtbDocr() + .setCodMart(sourceMtbColr.getCodMart()) + .setPartitaMag(sourceMtbColr.getPartitaMag()) + .setQta(differenceQtaCol) + .setNumCnf(differenceNumCnf) + .setQtaCnf(qtaCnf); + dtbDocr.setOperation(OperationType.INSERT); + + dtbDoctInv.getDtbDocr() + .add(dtbDocr); + + entityProcessor.processEntity(dtbDoctInv, multiDBTransactionManager, true); + } + + if (isDocumentAttached || createNewCollo) { + if (isPositiveUpdate) { + //Creo una UL L+ orfana che poi aggancio nel collo attuale mtbColrOrphan = ((MtbColr) sourceMtbColr.clone()) .setNumCollo(null) @@ -1235,7 +1280,7 @@ public class WMSGenericService { .setQtaCol(differenceQtaCol) .setNumCnf(differenceNumCnf) .setQtaCnf(qtaCnf) - .setDatetimeRow(new Date()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setCausale(MtbColr.Causale.RETTIFICA) .setPesoNettoKg(null) .setPesoLordoKg(null); @@ -1250,6 +1295,14 @@ public class WMSGenericService { mtbColtOrphan.setOperation(OperationType.INSERT); mtbColtOrphan.getMtbColr().add(mtbColrOrphan); + if (dtbDoctInv != null) + mtbColtOrphan + .setDataDoc(dtbDoctInv.getDataDoc()) + .setNumDoc(dtbDoctInv.getNumDoc()) + .setSerDoc(dtbDoctInv.getSerDoc()) + .setCodAnag(dtbDoctInv.getCodAnag()) + .setCodDtip(dtbDoctInv.getCodDtip()); + entityProcessor.processEntity(mtbColtOrphan, true, multiDBTransactionManager); @@ -1257,8 +1310,7 @@ public class WMSGenericService { .setNumCollo(sourceMtbColr.getNumCollo()) .setGestione(sourceMtbColr.getGestione()) .setSerCollo(sourceMtbColr.getSerCollo()) - .setDataCollo(sourceMtbColr.getDataCollo()) - .setMtbColr(new ArrayList()); + .setDataCollo(sourceMtbColr.getDataCollo()); mtbColrToSave = ((MtbColr) sourceMtbColr.clone()) .setNumCollo(null) @@ -1275,7 +1327,7 @@ public class WMSGenericService { .setCausale(MtbColr.Causale.RETTIFICA) .setPesoNettoKg(null) .setPesoLordoKg(null) - .setDatetimeRow(new Date()); + .setDatetimeRow(UtilityLocalDate.getNowTime()); sourceMtbColt.setOperation(OperationType.UPDATE); mtbColrToSave.setOperation(OperationType.INSERT); @@ -1286,17 +1338,12 @@ public class WMSGenericService { entityProcessor.processEntity(sourceMtbColt, true, multiDBTransactionManager); - } catch (Exception ex) { - multiDBTransactionManager.rollbackAll(); - throw ex; - } - if (returnRettifica) { - mtbColrToSave = mtbColrOrphan; - } - } else if (isNegativeUpdate) { - //Creo una UL L- orfana che aggancerà il collo attuale + if (returnRettifica) { + mtbColrToSave = mtbColrOrphan; + } + } else if (isNegativeUpdate) { + //Creo una UL L- orfana che aggancerà il collo attuale - try { mtbColrOrphan = ((MtbColr) sourceMtbColr.clone()) .setNumCollo(null) @@ -1313,7 +1360,7 @@ public class WMSGenericService { .setNumColloRif(sourceMtbColr.getNumCollo()) .setPesoNettoKg(null) .setPesoLordoKg(null) - .setDatetimeRow(new Date()); + .setDatetimeRow(UtilityLocalDate.getNowTime()); mtbColrOrphan.setOperation(OperationType.INSERT); @@ -1325,6 +1372,14 @@ public class WMSGenericService { mtbColtOrphan.setOperation(OperationType.INSERT); mtbColtOrphan.getMtbColr().add(mtbColrOrphan); + if (dtbDoctInv != null) + mtbColtOrphan + .setDataDoc(dtbDoctInv.getDataDoc()) + .setNumDoc(dtbDoctInv.getNumDoc()) + .setSerDoc(dtbDoctInv.getSerDoc()) + .setCodAnag(dtbDoctInv.getCodAnag()) + .setCodDtip(dtbDoctInv.getCodDtip()); + entityProcessor.processEntity(mtbColtOrphan, true, multiDBTransactionManager); mtbColrToSave = ((MtbColr) sourceMtbColr.clone()) @@ -1334,54 +1389,57 @@ public class WMSGenericService { .setPesoNettoKg(null) .setPesoLordoKg(null); - } catch (Exception ex) { - multiDBTransactionManager.rollbackAll(); - throw ex; - } - if (returnRettifica) { - mtbColrToSave = mtbColrOrphan; + if (returnRettifica) { + mtbColrToSave = mtbColrOrphan; + } + } else { + //Le quantita precenti e quella attuale sono uguali } } else { - //Le quantita precenti e quella attuale sono uguali + MtbColt mtbColt = new MtbColt() + .setNumCollo(sourceMtbColr.getNumCollo()) + .setDataCollo(sourceMtbColr.getDataCollo()) + .setSerCollo(sourceMtbColr.getSerCollo()) + .setGestione(sourceMtbColr.getGestione()) + .setMtbColr(new ArrayList<>()); + mtbColt.setOperation(OperationType.NO_OP); + + mtbColrToSave = (MtbColr) sourceMtbColr.clone(); + mtbColrToSave + .setRiga(null) + .setNumCnf(differenceNumCnf) + .setQtaCnf(qtaCnf) + .setQtaCol(differenceQtaCol) + .setCausale(MtbColr.Causale.RETTIFICA) + .setDatetimeRow(UtilityLocalDate.getNowTime()) + .setPesoNettoKg(null) + .setPesoLordoKg(null) + .setOperation(OperationType.INSERT); + + mtbColt.getMtbColr().add(mtbColrToSave); + + entityProcessor.processEntity(mtbColt, true, multiDBTransactionManager); + + mtbColrToSave = ((MtbColr) sourceMtbColr.clone()) + .setQtaCol(newQtaCol) + .setNumCnf(newNumCnf) + .setQtaCnf(UtilityBigDecimal.divide(newQtaCol, newNumCnf)) + .setPesoNettoKg(null) + .setPesoLordoKg(null); } - } else { - MtbColt mtbColt = new MtbColt() - .setNumCollo(sourceMtbColr.getNumCollo()) - .setDataCollo(sourceMtbColr.getDataCollo()) - .setSerCollo(sourceMtbColr.getSerCollo()) - .setGestione(sourceMtbColr.getGestione()) - .setMtbColr(new ArrayList<>()); - mtbColt.setOperation(OperationType.NO_OP); - mtbColrToSave = (MtbColr) sourceMtbColr.clone(); - mtbColrToSave - .setRiga(null) - .setNumCnf(differenceNumCnf) - .setQtaCnf(qtaCnf) - .setQtaCol(differenceQtaCol) - .setCausale(MtbColr.Causale.RETTIFICA) - .setDatetimeRow(new Date()) - .setPesoNettoKg(null) - .setPesoLordoKg(null) - .setOperation(OperationType.INSERT); + if (mtbColrToSave != null) { + mtbColrToSave.setOperation(OperationType.SELECT_OBJECT); + mtbColrToSave.setOnlyPkMaster(false); + mtbColrToSave.setCausale(null); + } - mtbColt.getMtbColr().add(mtbColrToSave); - entityProcessor.processEntity(mtbColt, true, multiDBTransactionManager); - - mtbColrToSave = ((MtbColr) sourceMtbColr.clone()) - .setQtaCol(newQtaCol) - .setNumCnf(newNumCnf) - .setQtaCnf(UtilityBigDecimal.divide(newQtaCol, newNumCnf)) - .setPesoNettoKg(null) - .setPesoLordoKg(null); + } catch (Exception ex) { + multiDBTransactionManager.rollbackAll(); + throw ex; } - if (mtbColrToSave != null) { - mtbColrToSave.setOperation(OperationType.SELECT_OBJECT); - mtbColrToSave.setOnlyPkMaster(false); - mtbColrToSave.setCausale(null); - } return mtbColrToSave; } @@ -1424,7 +1482,6 @@ public class WMSGenericService { } - Date datetimeRow = new Date(); for (ScaricoMateriaPrimaDTO scaricoMateriaPrimaDTO : scaricoMateriaPrimaDTOList) { List mtbColtsToInsert = new ArrayList<>(); @@ -1552,7 +1609,7 @@ public class WMSGenericService { .setDataColloRif(UtilityLocalDate.localDateToDate(giacInPosizioneItem.getDataCollo())) .setSerColloRif(giacInPosizioneItem.getSerCollo()) .setGestioneRif(giacInPosizioneItem.getGestione()) - .setDatetimeRow(datetimeRow); + .setDatetimeRow(UtilityLocalDate.getNowTime()); mtbColr.setOperation(OperationType.INSERT); mtbColtToInsert.getMtbColr().add(mtbColr); @@ -1577,7 +1634,6 @@ public class WMSGenericService { private List scaricoMateriaPrimadaOrdine(String codMdep, String codJfas, boolean useRapportoMatPrima, List listScarichiOrdine) throws Exception { final List anomalieList = new ArrayList<>(); List mtbColtsToInsert = new ArrayList<>(); - Date datetimeRow = new Date(); for (ScaricoMateriaPrimaDaOrdineDTO scaricoDaOrdine : listScarichiOrdine) { String codJfasScarico = codJfas != null ? codJfas : scaricoDaOrdine.getCodJfas(); @@ -1705,7 +1761,7 @@ public class WMSGenericService { .setDataColloRif(UtilityLocalDate.localDateToDate(giacenza.getDataCollo())) .setSerColloRif(giacenza.getSerCollo()) .setGestioneRif(giacenza.getGestione()) - .setDatetimeRow(datetimeRow); + .setDatetimeRow(UtilityLocalDate.getNowTime()); mtbColr.setOperation(OperationType.INSERT); mtbColt.getMtbColr().add(mtbColr); @@ -2421,7 +2477,7 @@ public class WMSGenericService { .setGestioneRif(inputMtbColr.getGestione()) .setDataColloRif(UtilityLocalDate.localDateToDate(inputMtbColr.getDataCollo())) .setSerColloRif(inputMtbColr.getSerCollo()) - .setDatetimeRow(new Date()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setNumCollo(null) .setGestione(null) .setDataCollo(null) @@ -2742,8 +2798,6 @@ public class WMSGenericService { if (UtilityBigDecimal.equalsOrLowerThan(qtaToTake, BigDecimal.ZERO)) continue; - Date dateTimeRow = UtilityLocalDate.localDateToDate(maxDataCollo); - MtbColr mtbColr = new MtbColr() .setCodMart(giacenza.getCodMart()) .setCodJcom(giacenza.getCodJcom()) @@ -2756,7 +2810,7 @@ public class WMSGenericService { .setDataColloRif(UtilityLocalDate.localDateToDate(giacenza.getDataCollo())) .setSerColloRif(giacenza.getSerCollo()) .setGestioneRif(giacenza.getGestione()) - .setDatetimeRow(dateTimeRow); + .setDatetimeRow(UtilityLocalDate.localDateTimeFromLocalDate(maxDataCollo)); mtbColr.setOperation(OperationType.INSERT); mtbColt.getMtbColr().add(mtbColr); diff --git a/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSMagazzinoBufferService.java b/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSMagazzinoBufferService.java index d16119e269..41a505241a 100644 --- a/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSMagazzinoBufferService.java +++ b/ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSMagazzinoBufferService.java @@ -164,7 +164,7 @@ public class WMSMagazzinoBufferService { int totalNumCnf = magazzinoBufferVersamentoMaterialeRequestDTO.getNumCnfDaScaricare().intValue(); - LocalDateTime startDateTime = UtilityLocalDate.localDateTimeFromDate(udsMtbColr.getDatetimeRow()); + LocalDateTime startDateTime = udsMtbColr.getDatetimeRow(); LocalDateTime endDateTime = UtilityLocalDate.isNull(magazzinoBufferVersamentoMaterialeRequestDTO.getOraFineVersamento(),UtilityLocalDate.getNowTime()); long totalSeconds = ChronoUnit.SECONDS.between(startDateTime, endDateTime); @@ -187,11 +187,11 @@ public class WMSMagazzinoBufferService { for (int i = 0; i < totalNumCnf - 1; i++) { final MtbColr clone = (MtbColr) udsMtbColr.clone(); - LocalDateTime dateTimeRow = UtilityLocalDate.localDateTimeFromDate(clone.getDatetimeRow()); + LocalDateTime dateTimeRow = clone.getDatetimeRow(); dateTimeRow = dateTimeRow.plusSeconds((i + 1) * secondsPerSigleRow); clone.setRiga(null) - .setDatetimeRow(UtilityLocalDate.localDateTimeToDate(dateTimeRow, null)) + .setDatetimeRow(dateTimeRow) .setOperation(OperationType.INSERT); mtbColrsToSave.add(clone); diff --git a/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSLavorazioneService.java b/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSLavorazioneService.java index d00652c925..352717d19f 100644 --- a/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSLavorazioneService.java +++ b/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSLavorazioneService.java @@ -300,7 +300,7 @@ public class WMSLavorazioneService { .setDataOrd(UtilityLocalDate.localDateFromDate(insertUDSRowRequestDTO.getDataOrd())) .setNumOrd(insertUDSRowRequestDTO.getNumOrd()) .setRigaOrd(insertUDSRowRequestDTO.getRigaOrd()) - .setDatetimeRow(new Date()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setCodJcom(insertUDSRowRequestDTO.getCodJcom()) .setMtbColrInfoProd(mtbColrInfoProd); targetMtbColr.setOperation(OperationType.INSERT); diff --git a/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSMaterialiService.java b/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSMaterialiService.java index 91e42bb8e6..789d64263e 100644 --- a/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSMaterialiService.java +++ b/ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSMaterialiService.java @@ -1,6 +1,5 @@ package it.integry.ems.retail.wms.lavorazione.service; -import core.utility.UtilityDate; import it.integry.ems.product.importaz.service.ProductServices; import it.integry.ems.retail.wms.exceptions.InvalidArticoloException; import it.integry.ems.retail.wms.lavorazione.dto.RecuperaMaterialiRequestDTO; @@ -105,7 +104,7 @@ public class WMSMaterialiService { .setQtaCnf(inputQtaCnf) .setNumCnf(numCnfToSave) .setDescrizione(UtilityString.isNull(mtbAart.getDescrizioneEstesa(), mtbAart.getDescrizione())) - .setDatetimeRow(UtilityDate.getDateInstance()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setNumColloRif(request.getNumColloRif()) .setDataColloRif(UtilityLocalDate.localDateToDate(request.getDataColloRif())) .setGestioneRif(request.getGestioneRif()) @@ -152,7 +151,7 @@ public class WMSMaterialiService { .setQtaCnf(inputQtaCnf) .setNumCnf(numCnf) .setDescrizione(UtilityString.isNull(mtbAart.getDescrizioneEstesa(), mtbAart.getDescrizione())) - .setDatetimeRow(UtilityDate.getDateInstance()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setNumColloRif(request.getNumColloRif()) .setDataColloRif(UtilityLocalDate.localDateToDate(request.getDataColloRif())) .setGestioneRif(request.getGestioneRif()) @@ -172,7 +171,7 @@ public class WMSMaterialiService { .setQtaCnf(inputQtaCnf) .setNumCnf(numCnfToSave) .setDescrizione(UtilityString.isNull(mtbAart.getDescrizioneEstesa(), mtbAart.getDescrizione())) - .setDatetimeRow(UtilityDate.getDateInstance()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setNumColloRif(request.getNumColloRif()) .setDataColloRif(UtilityLocalDate.localDateToDate(request.getDataColloRif())) .setGestioneRif(request.getGestioneRif()) @@ -228,7 +227,7 @@ public class WMSMaterialiService { .setNumCnf(inputNumCnf) .setQtaCnf(inputQtaCnf) .setDescrizione(UtilityString.isNull(mtbAart.getDescrizioneEstesa(), mtbAart.getDescrizione())) - .setDatetimeRow(UtilityDate.getDateInstance()) + .setDatetimeRow(UtilityLocalDate.getNowTime()) .setNumColloRif(request.getNumColloRif()) .setDataColloRif(UtilityLocalDate.localDateToDate(request.getDataColloRif())) .setGestioneRif(request.getGestioneRif()) diff --git a/ems-engine/src/main/java/it/integry/ems/retail/wms/vendita/service/WMSSpedizioneService.java b/ems-engine/src/main/java/it/integry/ems/retail/wms/vendita/service/WMSSpedizioneService.java index 1ad2ac871c..aacfd48d3c 100644 --- a/ems-engine/src/main/java/it/integry/ems/retail/wms/vendita/service/WMSSpedizioneService.java +++ b/ems-engine/src/main/java/it/integry/ems/retail/wms/vendita/service/WMSSpedizioneService.java @@ -310,7 +310,7 @@ public class WMSSpedizioneService { .setNumCnf(insertUDSRowRequestDTO.getNumCnf()) .setDescrizione(mtbAart.getDescrizioneEstesa()) .setUtente(userSession.getFullname()) - .setDatetimeRow(new Date()); + .setDatetimeRow(UtilityLocalDate.getNowTime()); targetMtbColr.setOperation(OperationType.INSERT); targetMtbColt.getMtbColr().add(targetMtbColr);