[ROSSOGARGANO]

fix creazione colli di scarico mp
fix creazione campi senza destinatario
This commit is contained in:
2024-08-01 13:18:16 +02:00
parent 7052434ff1
commit 86ea8ccc36
3 changed files with 13 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ public class AgribookFieldService {
public List<EntityBase> createField(MultiDBTransactionManager connection, AgribookNewFieldRequestDTO dto, String username, RequestDataDTO requestDataDTO) throws Exception {
List<EntityBase> entityList = new ArrayList<>();
String codVdes = UtilityString.isNull(dto.getCodVdes(), this.suggestCodVdes(connection, dto.getCodAnag()));
String codVdes = UtilityString.isNull(dto.getCodVdes(), dto.isNewDes()?this.suggestCodVdes(connection, dto.getCodAnag()):null);
if (dto.isNewDes()) {
if (UtilityString.isNullOrEmpty(codVdes)) {
throw new Exception("Impossibile calcolare il codice destinatario!");
@@ -166,7 +166,7 @@ public class AgribookFieldService {
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),
"SELECT cod_mdep from mtb_depo where " +
" cod_anag = " + UtilityDB.valueToString(codAnag) + " " +
" and cod_vdes = " + UtilityDB.valueToString(codVdes));
" and ISNULL(cod_vdes,'') = ISNULL(" + UtilityDB.valueToString(codVdes)+",'')");
}
private String suggestCodVdes(MultiDBTransactionManager multiDBTransactionManager, String codAnag) throws Exception {

View File

@@ -11,6 +11,7 @@ public class MagazzinoBufferVersamentoMaterialeRequestDTO {
private String serCollo;
private Integer numCollo;
private LocalDate dataCollo;
private String codJfas;
public MtbColt getInputMtbColt() {
@@ -49,4 +50,13 @@ public class MagazzinoBufferVersamentoMaterialeRequestDTO {
this.dataCollo = dataCollo;
return this;
}
public String getCodJfas() {
return codJfas;
}
public MagazzinoBufferVersamentoMaterialeRequestDTO setCodJfas(String codJfas) {
this.codJfas = codJfas;
return this;
}
}

View File

@@ -99,6 +99,7 @@ public class WMSMagazzinoBufferService {
.setNumCollo(magazzinoBufferVersamentoMaterialeRequestDTO.getNumCollo())
.setCodMdep(mtbColtRef.getCodMdep())
.setPosizione(posizione)
.setCodJfas(magazzinoBufferVersamentoMaterialeRequestDTO.getCodJfas())
.setCausaleCollo(CreateUDSRequestDTO.Causale.SCARICO));
wmsLavorazioneService.insertUDSRow(new InsertUDSRowRequestDTO()