Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-05-15 12:14:35 +02:00
3 changed files with 35 additions and 11 deletions

View File

@@ -2950,7 +2950,7 @@ public class DocumentProdService {
List<DtbDoct> documentiScarico = new ArrayList<>();
ScaricoLavorazioneDTO dtoScarico = dto.getScaricoLavorazioneDTO();
if (dtoScarico.isScaricoDaCollo()) {
List<DtbDoct> scarichiDaCollo =generaDocumentiScaricoOrdineDaColli(dto);
List<DtbDoct> scarichiDaCollo = generaDocumentiScaricoOrdineDaColli(dto);
if (dto.isSalvaDocumenti()){
entityProcessor.processEntityList(scarichiDaCollo,multiDBTransactionManager,true);
UtilityEntity.throwEntitiesException(scarichiDaCollo);

View File

@@ -11,6 +11,7 @@ public class VersamentoMaterialeSuOrdineDTO {
private DtbOrdt ordine;
private boolean startOrdine = false;
private boolean cloneOrdine = false;
private boolean transferRequired = false;
private BigDecimal qtaVersamento;
private String codJfas;
@@ -51,6 +52,15 @@ public class VersamentoMaterialeSuOrdineDTO {
return this;
}
public boolean isTransferRequired() {
return transferRequired;
}
public VersamentoMaterialeSuOrdineDTO setTransferRequired(boolean transferRequired) {
this.transferRequired = transferRequired;
return this;
}
public String getCodJfas() {
return codJfas;
}

View File

@@ -22,7 +22,9 @@ import it.integry.ems.retail.wms.dto.CreateUDSRequestDTO;
import it.integry.ems.retail.wms.dto.CreateUDSRequestOrderDTO;
import it.integry.ems.retail.wms.dto.InsertUDSRowRequestDTO;
import it.integry.ems.retail.wms.generic.dto.MvwSitArtUdcDetInventarioDTO;
import it.integry.ems.retail.wms.generic.dto.SpostaUlRequestDTO;
import it.integry.ems.retail.wms.generic.service.WMSGenericService;
import it.integry.ems.retail.wms.generic.service.WMSGiacenzaULService;
import it.integry.ems.retail.wms.lavorazione.service.WMSLavorazioneService;
import it.integry.ems.rules.completing.DocumentRules;
import it.integry.ems.rules.completing.PartitaMagRules;
@@ -113,6 +115,9 @@ public class MesProductionServiceV2 {
@Autowired
private WMSGenericService wmsGenericService;
@Autowired
private WMSGiacenzaULService wmsGiacenzaULService;
public BasePanelAnswerDTO callSupervisorServiceGET(String serviceIp, int servicePort, String serviceName, HashMap<String, String> queryParams) throws Exception {
Integer timeout = setupGest.getSetupInteger(multiDBTransactionManager.getPrimaryConnection(), "MES", "HMI", "TIMEOUT_MACHINE_CONNECTION", 5);
@@ -1518,20 +1523,29 @@ public class MesProductionServiceV2 {
return ordine;
}
public Object versaMaterialeSuOrdine(VersamentoMaterialeSuOrdineDTO dto) throws Exception {
MtbColt colloDaVersare = pvmService.getColloByBarcode(dto.getMtbColt().getBarcodeUl(), true);
colloDaVersare.setOperation(OperationType.SELECT_OBJECT);
entityProcessor.processEntity(colloDaVersare, multiDBTransactionManager);
List<MvwSitArtUdcDetInventarioDTO> contenuto = wmsGenericService.getGiacenzaCollo(colloDaVersare);
if (UtilityList.isNullOrEmpty(contenuto)) {
throw new Exception("La UL selezionata non contiene alcun articolo da versare!");
}
public MtbColt versaMaterialeSuOrdine(VersamentoMaterialeSuOrdineDTO dto) throws Exception {
String sourceBarcodeUl = dto.getMtbColt().getBarcodeUl();
DtbOrdt ordine = dto.getOrdine();
ordine.setOperation(OperationType.SELECT_OBJECT);
entityProcessor.processEntity(ordine, multiDBTransactionManager);
if(dto.isTransferRequired()){
SpostaUlRequestDTO trasferimentoRequest = new SpostaUlRequestDTO();
trasferimentoRequest
.setCodMdep(dto.getOrdine().getCodMdep())
.setCreateDocAutomatically(true)
.setMtbColtsToMove(Collections.singletonList(dto.getMtbColt()));
wmsGenericService.spostaUL(trasferimentoRequest);
}
List<MvwSitArtUdcDetInventarioDTO> contenuto =
wmsGiacenzaULService.retrieveArtsInGiacenzaByBarcodeUl(multiDBTransactionManager.getPrimaryConnection(), sourceBarcodeUl);
if (UtilityList.isNullOrEmpty(contenuto)) {
throw new Exception("La UL selezionata non contiene alcun articolo da versare!");
}
MtbColt uds;
try {
@@ -1560,7 +1574,7 @@ public class MesProductionServiceV2 {
List<CreateUDSRequestOrderDTO> ordini = new ArrayList<>();
MaterialeVersatoSuOrdineDTO versamentoEsistente = getVersamentoBarcodeSuOrdine(dto.getOrdine(), colloDaVersare.getBarcodeUl());
MaterialeVersatoSuOrdineDTO versamentoEsistente = getVersamentoBarcodeSuOrdine(dto.getOrdine(), sourceBarcodeUl);
if (versamentoEsistente == null) {
CreateUDSRequestOrderDTO orderDTO = new CreateUDSRequestOrderDTO()