Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250401131752 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String value = "N";
|
||||
if (isCustomer(IntegryCustomer.Agricoper))
|
||||
value = "S";
|
||||
|
||||
createSetup("PVM","MAPPA_CAMPI_DI_RACCOLTA","ABILITA_REPORT",value,"Abilita gestione report in modulo [campi di raccolta]","SI_NO");
|
||||
|
||||
value = "N";
|
||||
if (isCustomer(IntegryCustomer.RossoGargano))
|
||||
value = "S";
|
||||
|
||||
createSetup("PVM","PREVISIONI_RACCOLTA","RICHIEDI_LOTTO_PROD",value,"Se Abilitata permette di inserire nel modulo [campi di raccolta] la partita del produttore","SI_NO");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,15 @@ public class StampaEtichetteCarciofiCalibratiJavabean extends BaseReportJavabean
|
||||
}
|
||||
}
|
||||
|
||||
int numEtichetteBianche = (dto.getNumCnf().intValue() - listEtichette.size());
|
||||
for (int i= 0; i< numEtichetteBianche; i++){
|
||||
EtichettaCalibriFieldsDTO javaBean = baseJavaBean.clone();
|
||||
javaBean.setRow_number(i + 1)
|
||||
.setRow_total(numEtichetteBianche)
|
||||
.setCalibro(null);
|
||||
listEtichette.add(javaBean);
|
||||
}
|
||||
|
||||
return listEtichette;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,11 @@ public class AgribookFieldService {
|
||||
.setQtaAttesa(dto.getQtaAttesa())
|
||||
.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(dto.getPartitaMagProd())) {
|
||||
partitaMag.setPartitaMagProd(dto.getPartitaMagProd());
|
||||
partitaMag.setDataProd(UtilityLocalDate.localDateToDate(dto.getDataInizProd()));
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(dto.getVarieta())) {
|
||||
MtbPartitaMagCarat carat = this.getVarieta(connection, dto.getCodMart(), dto.getPartitaMag());
|
||||
if (carat == null) {
|
||||
|
||||
@@ -10,6 +10,7 @@ public class AgribookNewFieldRequestDTO {
|
||||
private boolean newDes;
|
||||
private String codMart;
|
||||
private String partitaMag;
|
||||
private String partitaMagProd;
|
||||
private BigDecimal qtaAttesa;
|
||||
private BigDecimal valUnt;
|
||||
private String untMis;
|
||||
@@ -80,6 +81,15 @@ public class AgribookNewFieldRequestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMagProd() {
|
||||
return partitaMagProd;
|
||||
}
|
||||
|
||||
public AgribookNewFieldRequestDTO setPartitaMagProd(String partitaMagProd) {
|
||||
this.partitaMagProd = partitaMagProd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaAttesa() {
|
||||
return qtaAttesa;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package it.integry.ems.production.dto;
|
||||
|
||||
import it.integry.ems.Import.dto.AnomalieDTO;
|
||||
import it.integry.ems.retail.wms.generic.dto.MvwSitArtUdcDetInventarioDTO;
|
||||
import it.integry.ems_model.entity.MtbColt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -12,7 +13,8 @@ public class CheckMaterialeBarcodeInOrdineResponseDTO {
|
||||
private boolean isNewOrderRequired = false;
|
||||
private boolean canCreateNewUl = false;
|
||||
private MaterialeVersatoSuOrdineDTO versamento;
|
||||
private MtbColt collo;
|
||||
private GiacenzaArtInBarcodeDTO collo;
|
||||
|
||||
|
||||
public List<AnomalieDTO> getAnomalie() {
|
||||
return anomalie;
|
||||
@@ -32,11 +34,11 @@ public class CheckMaterialeBarcodeInOrdineResponseDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt getCollo() {
|
||||
public GiacenzaArtInBarcodeDTO getCollo() {
|
||||
return collo;
|
||||
}
|
||||
|
||||
public CheckMaterialeBarcodeInOrdineResponseDTO setCollo(MtbColt collo) {
|
||||
public CheckMaterialeBarcodeInOrdineResponseDTO setCollo(GiacenzaArtInBarcodeDTO collo) {
|
||||
this.collo = collo;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package it.integry.ems.production.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class GiacenzaArtInBarcodeDTO {
|
||||
private String barcodeUl;
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private String untMis;
|
||||
private String untMis2;
|
||||
private BigDecimal rapConv2;
|
||||
private BigDecimal qtaCol;
|
||||
private BigDecimal qtaCnf;
|
||||
private BigDecimal qtaCnfArt;
|
||||
private BigDecimal numCnf;
|
||||
private String partitaMag;
|
||||
|
||||
|
||||
public String getBarcodeUl() {
|
||||
return barcodeUl;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setBarcodeUl(String barcodeUl) {
|
||||
this.barcodeUl = barcodeUl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis2() {
|
||||
return untMis2;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setUntMis2(String untMis2) {
|
||||
this.untMis2 = untMis2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getRapConv2() {
|
||||
return rapConv2;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setRapConv2(BigDecimal rapConv2) {
|
||||
this.rapConv2 = rapConv2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCol() {
|
||||
return qtaCol;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setQtaCol(BigDecimal qtaCol) {
|
||||
this.qtaCol = qtaCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnfArt() {
|
||||
return qtaCnfArt;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setQtaCnfArt(BigDecimal qtaCnfArt) {
|
||||
this.qtaCnfArt = qtaCnfArt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public GiacenzaArtInBarcodeDTO setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,15 @@ package it.integry.ems.production.dto;
|
||||
import it.integry.ems_model.entity.DtbOrdt;
|
||||
import it.integry.ems_model.entity.MtbColt;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class VersamentoMaterialeSuOrdineDTO {
|
||||
|
||||
private MtbColt mtbColt;
|
||||
private DtbOrdt ordine;
|
||||
private boolean startOrdine = false;
|
||||
private boolean cloneOrdine = false;
|
||||
private BigDecimal qtaVersamento;
|
||||
private String codJfas;
|
||||
|
||||
|
||||
@@ -56,4 +59,13 @@ public class VersamentoMaterialeSuOrdineDTO {
|
||||
this.codJfas = codJfas;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaVersamento() {
|
||||
return qtaVersamento;
|
||||
}
|
||||
|
||||
public VersamentoMaterialeSuOrdineDTO setQtaVersamento(BigDecimal qtaVersamento) {
|
||||
this.qtaVersamento = qtaVersamento;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,7 +816,7 @@ public class MesProductionServiceV2 {
|
||||
}
|
||||
|
||||
|
||||
for (int i= 0;i<hmiData.getPrintQuantity();i++){
|
||||
for (int i = 0; i < hmiData.getPrintQuantity(); i++) {
|
||||
printerService.print(printerName, new ByteArrayInputStream(bytes), "application/pdf", orientation);
|
||||
}
|
||||
|
||||
@@ -1291,13 +1291,7 @@ public class MesProductionServiceV2 {
|
||||
CheckMaterialeBarcodeInOrdineResponseDTO response = new CheckMaterialeBarcodeInOrdineResponseDTO();
|
||||
List<AnomalieDTO> anomalie = new ArrayList<>();
|
||||
MtbColt collo;
|
||||
try {
|
||||
|
||||
collo = pvmService.getColloByBarcode(dto.getBarcode(), true);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
collo = null;
|
||||
}
|
||||
collo = pvmService.getColloByBarcode(dto.getBarcode(), true);
|
||||
|
||||
if (collo == null) {
|
||||
boolean canCreateUlFromEan128 = setupGest.getSetupBoolean(multiDBTransactionManager.getPrimaryConnection(), "PVM", "MONITORAGGIO_LINEE_V2", "CAN_CREATE_UL_FROM_EAN");
|
||||
@@ -1327,13 +1321,24 @@ public class MesProductionServiceV2 {
|
||||
String codMgrpSL = setupGest.getSetup("w_lpianoprod_rc", "SETUP", "GRUPPO_SL");
|
||||
boolean matchLottoSlToOrdine = setupGest.getSetupDetBoolean("MES", "SETUP", "VINCOLA_LOTTO_ORDINE_A_SL", dto.getCodJfas());
|
||||
List<MtbAart> arts = rows.stream().map(MtbColr::getCodMart).map(MtbAart::fromCodMart).distinct().collect(java.util.stream.Collectors.toList());
|
||||
if (arts.size() > 1)
|
||||
throw new Exception("Impossibile versare a produzione una pedana mista!");
|
||||
|
||||
final MtbAart rowArt = entityProcessor.processEntity(arts.get(0), true,multiDBTransactionManager);
|
||||
GiacenzaArtInBarcodeDTO invDto = new GiacenzaArtInBarcodeDTO();
|
||||
invDto
|
||||
.setBarcodeUl(dto.getBarcode())
|
||||
.setCodMart(rowArt.getCodMart())
|
||||
.setDescrizione(rowArt.getDescrizioneEstesa())
|
||||
.setUntMis(rowArt.getUntMis())
|
||||
.setUntMis2(rowArt.getUntMis2())
|
||||
.setRapConv2(rowArt.getRapConv2())
|
||||
.setQtaCol(BigDecimal.ZERO)
|
||||
.setQtaCnfArt(rowArt.getQtaCnf())
|
||||
.setNumCnf(BigDecimal.ZERO);
|
||||
|
||||
entityProcessor.processEntityList(arts, true);
|
||||
for (MtbColr row : rows) {
|
||||
MtbAart rowArt = arts.stream().filter(a -> a.getCodMart().equalsIgnoreCase(row.getCodMart())).findFirst().orElse(null);
|
||||
//non ha senso controllare ma lo facciamo lo stesso :D
|
||||
if (rowArt == null)
|
||||
continue;
|
||||
|
||||
DtbOrdr rowOrdine = ordineLav.getDtbOrdr().stream().filter(ordRow -> ordRow.getCodMart().equalsIgnoreCase(rowArt.getCodMart())).findFirst().orElse(null);
|
||||
if (rowOrdine == null) {
|
||||
throw new Exception(String.format("L'articolo '%s' non è presente nell'ordine selezionato!", rowArt.getCodMart()));
|
||||
@@ -1348,9 +1353,15 @@ public class MesProductionServiceV2 {
|
||||
anomalie.add(AnomalieDTO.warning(String.format("La partita di semilavorato che si vuole versare (%s) non corrisponde a quella dell'ordine (%s), per concludere la procedura di versamento verrà creato un nuovo ordine di lavorazione con la partita selezionata!", row.getPartitaMag(), ordineLav.getPartitaMag())));
|
||||
response.setNewOrderRequired(true);
|
||||
}
|
||||
invDto.setPartitaMag(row.getPartitaMag())
|
||||
.setQtaCnf(row.getQtaCnf())
|
||||
.setNumCnf(invDto.getNumCnf().add(row.getNumCnf()))
|
||||
.setQtaCol(invDto.getQtaCol().add(row.getQtaCol()));
|
||||
|
||||
|
||||
}
|
||||
response.setCollo(collo);
|
||||
|
||||
response.setCollo(invDto);
|
||||
response.setAnomalie(anomalie);
|
||||
return response;
|
||||
|
||||
@@ -1398,7 +1409,7 @@ public class MesProductionServiceV2 {
|
||||
public Object versaMaterialeSuOrdine(VersamentoMaterialeSuOrdineDTO dto) throws Exception {
|
||||
|
||||
|
||||
MtbColt colloDaVersare = dto.getMtbColt();
|
||||
MtbColt colloDaVersare = pvmService.getColloByBarcode(dto.getMtbColt().getBarcodeUl(),true);
|
||||
colloDaVersare.setOperation(OperationType.SELECT_OBJECT);
|
||||
entityProcessor.processEntity(colloDaVersare, multiDBTransactionManager);
|
||||
List<MvwSitArtUdcDetInventarioDTO> contenuto = wmsGenericService.getGiacenzaCollo(colloDaVersare);
|
||||
@@ -1478,7 +1489,7 @@ public class MesProductionServiceV2 {
|
||||
|
||||
InsertUDSRowRequestDTO insertRequestDto = new InsertUDSRowRequestDTO()
|
||||
.setCodMart(scarico.getCodMart())
|
||||
.setQtaTot(scarico.getQtaCol())
|
||||
.setQtaTot(UtilityBigDecimal.isNull(dto.getQtaVersamento(),scarico.getQtaCol()))
|
||||
.setPartitaMag(scarico.getPartitaMag())
|
||||
.setSourceMtbColr(sourceMtbColr)
|
||||
.setTargetMtbColt(uds)
|
||||
|
||||
@@ -335,8 +335,7 @@ public class ExchangeColliImportService {
|
||||
"FROM s1_Certificati\n" +
|
||||
"WHERE cod_anag = {}\n" +
|
||||
" AND data_cert = {}\n" +
|
||||
" AND {} like '%%'+TRIM(lotto_fornitore) \n" +
|
||||
" AND cod_mart_mp = {}", codAnag, dataCert, partitaMag, codMart),
|
||||
" AND {} like '%%'+TRIM(lotto_fornitore) " , codAnag, dataCert, partitaMag/*, codMart*/),
|
||||
CertificatiSinfoOneDTO.class);
|
||||
String codDtipLavCar = setupGest.getSetup(multiDBTransactionManager.getPrimaryConnection(), "CRUSCOTTO_PRODUZIONE",
|
||||
"SETUP",
|
||||
|
||||
Reference in New Issue
Block a user