Finish Biolevante_MRP_AggiuntaPriorita
This commit is contained in:
1
.idea/runConfigurations/Tomcat.xml
generated
1
.idea/runConfigurations/Tomcat.xml
generated
@@ -1,6 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" ALTERNATIVE_JRE_PATH="1.8" nameIsGenerated="true">
|
||||
<option name="COMMON_VM_ARGUMENTS" value="-Xms512m -Xmx2048m" />
|
||||
<option name="UPDATING_POLICY" value="restart-server" />
|
||||
<deployment>
|
||||
<artifact name="ems-engine:war exploded">
|
||||
<settings>
|
||||
|
||||
@@ -12,43 +12,64 @@ import java.util.Date;
|
||||
public class MrpDailyMaterialReqDetDTO {
|
||||
@JsonProperty("causale")
|
||||
private String causale;
|
||||
|
||||
@JsonProperty("data_mrp")
|
||||
private Date dataMrp;
|
||||
|
||||
@JsonProperty("colli")
|
||||
private BigDecimal colli;
|
||||
|
||||
@JsonProperty("pedane")
|
||||
private BigDecimal pedane;
|
||||
|
||||
@JsonProperty("qta")
|
||||
private BigDecimal qta;
|
||||
|
||||
@JsonProperty("unt_mis")
|
||||
private String untMis;
|
||||
|
||||
@JsonProperty("partita_mag")
|
||||
private String partitaMag;
|
||||
|
||||
@JsonProperty("gestione")
|
||||
private String gestione;
|
||||
|
||||
@JsonProperty("data_ord")
|
||||
private Date dataOrd;
|
||||
|
||||
@JsonProperty("num_ord")
|
||||
private Integer numOrd;
|
||||
|
||||
@JsonProperty("cod_jcom")
|
||||
private String codJcom;
|
||||
|
||||
@JsonProperty("cod_mdep")
|
||||
private String codMdep;
|
||||
|
||||
@JsonProperty("cod_mart")
|
||||
private String codMart;
|
||||
|
||||
@JsonProperty(value = "is_ord_trasf")
|
||||
private boolean isOrdTrasf;
|
||||
|
||||
@JsonProperty(value = "flag_sospeso")
|
||||
private boolean flagSospeso;
|
||||
|
||||
@JsonProperty("stato_partita")
|
||||
private String statoPartita;
|
||||
|
||||
@JsonProperty("colli_pedana")
|
||||
private BigDecimal colliPedana;
|
||||
|
||||
@JsonProperty("cod_tcol_UL")
|
||||
private String codTcolUL;
|
||||
|
||||
@JsonProperty("tipo_pedana")
|
||||
private String tipoPedana;
|
||||
|
||||
@JsonProperty("priorita")
|
||||
private Integer Priorita = 1;
|
||||
|
||||
public String getCausale() {
|
||||
return causale;
|
||||
}
|
||||
@@ -296,7 +317,7 @@ public class MrpDailyMaterialReqDetDTO {
|
||||
|
||||
@JsonIgnore
|
||||
public BigDecimal getImpLav() {
|
||||
if (gestione != null && (gestione.equalsIgnoreCase("L") && UtilityBigDecimal.lowerThan(qta, BigDecimal.ZERO))) {
|
||||
if (gestione != null && (gestione.equalsIgnoreCase("L") && UtilityBigDecimal.lowerThan(qta, BigDecimal.ZERO))) {
|
||||
return qta.multiply(new BigDecimal(-1));
|
||||
} else {
|
||||
return BigDecimal.ZERO;
|
||||
@@ -367,4 +388,11 @@ public class MrpDailyMaterialReqDetDTO {
|
||||
return getImpClie().add(getImpLav());
|
||||
}
|
||||
|
||||
public Integer getPriorita() {
|
||||
return Priorita;
|
||||
}
|
||||
|
||||
public void setPriorita(Integer priorita) {
|
||||
Priorita = priorita;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,15 +64,6 @@ public class MrpDailyMaterialReqService {
|
||||
List<MrpDailyMaterialReqDetDTO> mrpDailyMaterialReqDetDTO = getGiacenza(depositi, articoli, tableNameColli);
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getGiacenza: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getFabbProxOrdv(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getFabbProxOrdv: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getFabbProxContratti(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getFabbProxContratti: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getFabbProxBudget(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getFabbProxBudget: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getOrdiniVendita(depositi, articoli, tableNameColli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getOrdiniV: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
@@ -85,6 +76,15 @@ public class MrpDailyMaterialReqService {
|
||||
mrpDailyMaterialReqDetDTO.addAll(getOrdiniProd(depositi, articoli, includiArrivi));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getOrdiniProd: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getFabbProxOrdv(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getFabbProxOrdv: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getFabbProxContratti(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getFabbProxContratti: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getFabbProxBudget(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getFabbProxBudget: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
mrpDailyMaterialReqDetDTO.addAll(getContrattiV(depositi, articoli));
|
||||
logger.debug(MrpDailyMaterialReqService.class.getSimpleName() + " - getContrattiV: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
@@ -113,7 +113,9 @@ public class MrpDailyMaterialReqService {
|
||||
if (dettagliArt == null) continue;
|
||||
|
||||
dettagliArt = Stream
|
||||
.of(dettagliArt).sorted(Comparator.comparing(MrpDailyMaterialReqDetDTO::isFlagSospeso)
|
||||
.of(dettagliArt)
|
||||
.sorted(Comparator.comparing(MrpDailyMaterialReqDetDTO::isFlagSospeso)
|
||||
.thenComparing(MrpDailyMaterialReqDetDTO::getPriorita)
|
||||
.thenComparing(MrpDailyMaterialReqDetDTO::getDataMrp)
|
||||
.thenComparing(MrpDailyMaterialReqDetDTO::getGestione, Comparator.nullsFirst(Comparator.naturalOrder())))
|
||||
.toList();
|
||||
@@ -555,7 +557,8 @@ public class MrpDailyMaterialReqService {
|
||||
" Cast(getDate() as date) AS data_mrp,\n" +
|
||||
" -(mtb_part.qta_imp_prox) AS qta,\n" +
|
||||
" 'NP' AS gestione,\n" +
|
||||
" mtb_part.cod_mdep\n" +
|
||||
" mtb_part.cod_mdep,\n" +
|
||||
" 2 as priorita\n" +
|
||||
" FROM mtb_part \n" +
|
||||
" WHERE mtb_part.qta_imp_prox IS NOT NULL\n" +
|
||||
" AND mtb_part.qta_imp_prox <> 0" +
|
||||
@@ -572,7 +575,8 @@ public class MrpDailyMaterialReqService {
|
||||
" Cast(getDate() as date) AS data_mrp,\n" +
|
||||
" -(mtb_part.qta_imp_prox_contr) AS qta,\n" +
|
||||
" 'CV' AS gestione,\n" +
|
||||
" mtb_part.cod_mdep\n" +
|
||||
" mtb_part.cod_mdep,\n" +
|
||||
" 3 as priorita\n" +
|
||||
" FROM mtb_part \n" +
|
||||
" WHERE mtb_part.qta_imp_prox_contr IS NOT NULL\n" +
|
||||
" AND mtb_part.qta_imp_prox_contr <> 0" +
|
||||
@@ -589,7 +593,8 @@ public class MrpDailyMaterialReqService {
|
||||
" Cast(getDate() as date) AS data_mrp,\n" +
|
||||
" -(mtb_part.qta_imp_prox_bdg) AS qta,\n" +
|
||||
" 'BV' AS gestione,\n" +
|
||||
" mtb_part.cod_mdep\n" +
|
||||
" mtb_part.cod_mdep,\n" +
|
||||
" 4 as priorita\n" +
|
||||
" FROM mtb_part \n" +
|
||||
" WHERE mtb_part.qta_imp_prox_bdg IS NOT NULL\n" +
|
||||
" AND mtb_part.qta_imp_prox_bdg <> 0" +
|
||||
@@ -994,7 +999,7 @@ public class MrpDailyMaterialReqService {
|
||||
" -(ISNULL(ovw_budget_ordv.qta_saldo, 0)) AS qta,\n" +
|
||||
" 'BV' AS gestione,\n" +
|
||||
" ovw_budget_ordv.cod_mdep,\n" +
|
||||
" CAST( 1 as bit) AS flag_sospeso\n" +
|
||||
" CAST(1 as bit) AS flag_sospeso\n" +
|
||||
" FROM ovw_budget_ordv \n" +
|
||||
" WHERE ovw_budget_ordv.cod_mdep in ('%s')" +
|
||||
" AND ovw_budget_ordv.cod_mart in ('%s')";
|
||||
|
||||
Reference in New Issue
Block a user