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 00c71191f5..3cd5d09689 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 @@ -189,6 +189,7 @@ public class MtbColr extends EntityBase implements EquatableEntityInterface> mtbColrValues = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), mtbColrsSql); - - List rows = new ArrayList(); - - for (HashMap mapRow : mtbColrValues) { - MtbColr row = new MtbColr(); - - row.setGestione(UtilityHashMap.getValueIfExists(mapRow, "gestione")); - row.setDataCollo(UtilityLocalDate.localDateFromDate(UtilityHashMap.getValueIfExists(mapRow, "data_collo"))); - row.setSerCollo(UtilityHashMap.getValueIfExists(mapRow, "ser_collo")); - row.setNumCollo(UtilityHashMap.getValueIfExists(mapRow, "num_collo")); - row.setCodMart(UtilityHashMap.getValueIfExists(mapRow, "cod_mart")); - row.setPartitaMag(UtilityHashMap.getValueIfExists(mapRow, "partita_mag")); - row.setQtaCol(UtilityHashMap.getValueIfExists(mapRow, "qta_col")); - row.setQtaCnf(UtilityHashMap.getValueIfExists(mapRow, "qta_cnf")); - row.setNumCnf(UtilityHashMap.getValueIfExists(mapRow, "num_cnf")); - row.setRiga(UtilityHashMap.getValueIfExists(mapRow, "riga")); - row.setRigaOrd(UtilityHashMap.getValueIfExists(mapRow, "riga_ord")); - row.setDataOrd(UtilityLocalDate.localDateFromDate(UtilityHashMap.getValueIfExists(mapRow, "data_ord"))); - row.setNumOrd(UtilityHashMap.getValueIfExists(mapRow, "num_ord")); - row.setNumEtich(UtilityHashMap.getValueIfExists(mapRow, "num_etich")); - row.setDatetimeRow(UtilityLocalDate.localDateTimeFromDate(UtilityHashMap.getValueIfExists(mapRow, "datetime_row"))); - row.setCodJcom(UtilityHashMap.getValueIfExists(mapRow, "cod_jcom")); - row.setDescrizione(UtilityHashMap.getValueIfExists(mapRow, "descrizione")); - row.setGestioneRif(UtilityHashMap.getValueIfExists(mapRow, "gestione_rif")); - row.setDataColloRif(UtilityLocalDate.localDateFromDate(UtilityHashMap.getValueIfExists(mapRow, "data_collo_rif"))); - row.setNumColloRif(UtilityHashMap.getValueIfExists(mapRow, "num_collo_rif")); - row.setSerColloRif(UtilityHashMap.getValueIfExists(mapRow, "ser_collo_rif")); - row.setBarcodeUlIn(UtilityHashMap.getValueIfExists(mapRow, "barcode_ul_in")); - row.setCodMdepIn(UtilityHashMap.getValueIfExists(mapRow, "cod_mdep_in")); - row.setPosizioneIn(UtilityHashMap.getValueIfExists(mapRow, "posizione_in")); - row.setOperation(OperationType.SELECT_OBJECT); - row.setOnlyPkMaster(false); - - rows.add(row); - } - - mtbColtToReturn.setMtbColr(rows); + mtbColtToReturn.setMtbColr( + UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), mtbColrsSql, MtbColr.class) + ); } else { final List giacenzaList = wmsGiacenzaULService.retrieveArtsInGiacenzaByBarcodeUl(multiDBTransactionManager.getPrimaryConnection(), barcodeUl); @@ -2055,11 +2020,11 @@ public class PvmService { continue; } - if (!flagResoTec ) { + if (!flagResoTec) { BigDecimal qtaCnf = UtilityHashMap.getValueIfExists(lotto, "qta_cnf"); BigDecimal qtaCol = UtilityHashMap.getValueIfExists(lotto, "qta_col"); - BigDecimal numCnf = qtaCol.divide(qtaCnf,5, RoundingMode.HALF_UP); - if (!UtilityBigDecimal.equalsTo(numCnf, new BigDecimal(numCnf.intValue()))){ + BigDecimal numCnf = qtaCol.divide(qtaCnf, 5, RoundingMode.HALF_UP); + if (!UtilityBigDecimal.equalsTo(numCnf, new BigDecimal(numCnf.intValue()))) { anomalieResiDTO.add(setAnomalia(anomalieResiDTO, codMart, dataScad, "Per l'articolo bisogna rendere un cartone intero.")); continue;