modifiche a procedura di generazione ordine di lavorazione
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-04-08 12:48:23 +02:00
parent b33b2f7ca9
commit bd98f523b7
2 changed files with 36 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import static it.integry.ems.rules.completing.QueryRules.getSingleValue;
@@ -218,6 +219,11 @@ public class GeneraOrdLav {
codJfas = UtilityHashMap.getValueIfExists(datiDistinta, "cod_jfas");
qtaProdDist = UtilityHashMap.getValueIfExists(datiDistinta, "qta_prod");
}
if ( row.getDistinta() != null && !row.getDistinta().isEmpty()) {
datiDistinta.put("qta_prod", row.getQta());
datiDistinta.put("rap_conv_prod", row.getRapConv());
}
}
// Acquisizione numero ordine di lavorazione da generare ed assegnazione fase di riga
@@ -1030,8 +1036,8 @@ public class GeneraOrdLav {
// }
artDist.stream()
.sorted(Comparator.comparing(ExplodeDistDTO::getNumFase));
artDist = artDist.stream()
.sorted(Comparator.comparing(ExplodeDistDTO::getNumFase)).collect(Collectors.toList());
// ------------------------------------------------------------------
// ATTIVITA' ASSOCIATE ALLA DISTINTA (RISORSE o STEPS)
@@ -1109,7 +1115,21 @@ public class GeneraOrdLav {
boolean pesoInQtaLav = ordProdSetupDTO.isPesoInQtaLav();
boolean visCodJfas = ordProdSetupDTO.isVisCodJfas();
Date dataIniz = null, dataFine = null;
for (ExplodeDistDTO explodeDistDTO : explodeDistDTOList) {
List<ExplodeDistDTO> explodeDistDistinct = explodeDistDTOList.stream().map(x -> {
ExplodeDistDTO e = new ExplodeDistDTO()
.setCodJfasRow(x.getCodJfasRow())
.setCodProd(x.getCodProd())
.setUntMis(x.getUntMis())
.setQtaProd(x.getQtaProd())
.setRapConv(x.getRapConv())
.setRoot(x.isRoot())
.setDataCons(x.getDataCons());
return e;
}).distinct().collect(Collectors.toList());
for (ExplodeDistDTO explodeDistDTO : explodeDistDistinct) {
boolean multiLavorazione = false;
String[] elencoFasi;
String codJfasRow = "";

View File

@@ -2,6 +2,7 @@ package it.integry.ems_model.business_logic.dto;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
public class ExplodeDistDTO {
private boolean sameLav;
@@ -174,4 +175,16 @@ public class ExplodeDistDTO {
this.untMis = untMis;
return this;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof ExplodeDistDTO)) return false;
ExplodeDistDTO that = (ExplodeDistDTO) o;
return isSameLav() == that.isSameLav() && isRoot() == that.isRoot() && Objects.equals(getNumFase(), that.getNumFase()) && Objects.equals(getIdRigaStep(), that.getIdRigaStep()) && Objects.equals(getIdRigaContrCQ(), that.getIdRigaContrCQ()) && Objects.equals(getCodProd(), that.getCodProd()) && Objects.equals(getCodMdep(), that.getCodMdep()) && Objects.equals(getQtaProd(), that.getQtaProd()) && Objects.equals(getRapConv(), that.getRapConv()) && Objects.equals(getDataCons(), that.getDataCons()) && Objects.equals(getCodJfasRow(), that.getCodJfasRow()) && Objects.equals(getCodJfasDist(), that.getCodJfasDist()) && Objects.equals(getTipoValCosto(), that.getTipoValCosto()) && Objects.equals(getGestione(), that.getGestione()) && Objects.equals(getDataOrd(), that.getDataOrd()) && Objects.equals(getNumOrd(), that.getNumOrd()) && Objects.equals(getUntMis(), that.getUntMis());
}
@Override
public int hashCode() {
return Objects.hash(isSameLav(), isRoot(), getNumFase(), getIdRigaStep(), getIdRigaContrCQ(), getCodProd(), getCodMdep(), getQtaProd(), getRapConv(), getDataCons(), getCodJfasRow(), getCodJfasDist(), getTipoValCosto(), getGestione(), getDataOrd(), getNumOrd(), getUntMis());
}
}