Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -19,6 +19,7 @@ public class MrpDailyMaterialInputDTO {
|
||||
private String orderBy;
|
||||
private String whereCond;
|
||||
private boolean soloArtDis = false;
|
||||
private boolean soloConDati = false;
|
||||
|
||||
public Date getDataCons() {
|
||||
return dataCons;
|
||||
@@ -145,4 +146,13 @@ public class MrpDailyMaterialInputDTO {
|
||||
this.soloArtDis = soloArtDis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSoloConDati() {
|
||||
return soloConDati;
|
||||
}
|
||||
|
||||
public MrpDailyMaterialInputDTO setSoloConDati(boolean soloConDati) {
|
||||
this.soloConDati = soloConDati;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,18 @@ public class MrpDailyMaterialReqDTO {
|
||||
private List<HashMap<String, Object>> depositi;
|
||||
private List<MRPDailyPromoAcqDTO> promozioni;
|
||||
|
||||
public boolean isEmpty() {
|
||||
return UtilityBigDecimal.isNullOrZero(this.getGiacenza())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getQtaArrivi())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getQtaArriviProx())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getQtaImpegni())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getQtaImpProxOrd())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getQtaImpProxContr())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getScortaMin())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getConsumiMedi())
|
||||
&& UtilityBigDecimal.isNullOrZero(this.getDisponibilita());
|
||||
}
|
||||
|
||||
public String getCodMgrp() {
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class MrpDailyMaterialReqService {
|
||||
|
||||
for (Map.Entry<HashMap<String, Object>, List<MrpDailyMaterialReqDetDTO>> gg : listGG) {
|
||||
MrpDailyMaterialReqDTO.DatiGg mrpGiorno;
|
||||
java.util.Optional<MrpDailyMaterialReqDTO.DatiGg> data = datiGg.stream().filter(x ->x. getDataMrp().compareTo(UtilityHashMap.getValueIfExists(gg.getKey(), "data"))==0).findFirst();
|
||||
java.util.Optional<MrpDailyMaterialReqDTO.DatiGg> data = datiGg.stream().filter(x -> x.getDataMrp().compareTo(UtilityHashMap.getValueIfExists(gg.getKey(), "data")) == 0).findFirst();
|
||||
if (data.isPresent()) {
|
||||
mrpGiorno = data.get();
|
||||
datiGg.remove(mrpGiorno);
|
||||
@@ -255,7 +255,13 @@ public class MrpDailyMaterialReqService {
|
||||
.setCriticita()
|
||||
.setSottoScorta(isSottoScorta(depoArt));
|
||||
}
|
||||
|
||||
if (mrpDailyMaterialInputDTO.isSoloConDati()) {
|
||||
datiArt = datiArt.stream().filter(x -> !x.isEmpty()).collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - fine: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
return datiArt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user