Aggiunto parametro lotto in CreateUDSRequestDTO

This commit is contained in:
2024-04-24 19:46:41 +02:00
parent 374fe08fe2
commit 1c2ec14677
2 changed files with 14 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ public class CreateUDSRequestDTO {
private String codAnag;
private String codVdes;
private Integer idLotto;
private String rifOrd;
private boolean orderRequired;
@@ -153,6 +154,15 @@ public class CreateUDSRequestDTO {
return this;
}
public Integer getIdLotto() {
return idLotto;
}
public CreateUDSRequestDTO setIdLotto(Integer idLotto) {
this.idLotto = idLotto;
return this;
}
public enum Causale implements IBaseEnum {
SCARICO(0),
POSIZIONAMENTO(1);

View File

@@ -160,14 +160,12 @@ public class WMSLavorazioneService {
.distinct().
toList();
if (idLotto.size() > 1) {
throw new Exception("Trovato più di 1 id lotto in corso.");
if (idLotto.size() == 1) {
//Assegnare l'ordine o l'id lotto al collo appena creato
udsMtbColt
.setIdLotto(idLotto.get(0));
}
//Assegnare l'ordine o l'id lotto al collo appena creato
udsMtbColt
.setIdLotto(idLotto.get(0));
final List<Integer> foundInCorsoOrders = ordiniLavorazioneInCorso.stream()
.map(OrdineLavorazioneDTO::getNumOrd)
.distinct()