Gestito parametro per mostrare solo articoli disattivi in MRP
This commit is contained in:
@@ -18,6 +18,7 @@ public class MrpDailyMaterialInputDTO {
|
||||
private Integer pageSize;
|
||||
private String orderBy;
|
||||
private String whereCond;
|
||||
private boolean soloArtDis = false;
|
||||
|
||||
public Date getDataCons() {
|
||||
return dataCons;
|
||||
@@ -135,4 +136,13 @@ public class MrpDailyMaterialInputDTO {
|
||||
this.whereCond = whereCond;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSoloArtDis() {
|
||||
return soloArtDis;
|
||||
}
|
||||
|
||||
public MrpDailyMaterialInputDTO setSoloArtDis(boolean soloArtDis) {
|
||||
this.soloArtDis = soloArtDis;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ public class MrpDailyMaterialReqDTO {
|
||||
private BigDecimal qtaCnf;
|
||||
@JsonProperty("colli_pedana")
|
||||
private BigDecimal colliPedana;
|
||||
@JsonProperty("flag_attivo")
|
||||
private boolean flagAttivo;
|
||||
@JsonProperty("qta_arrivi_prox")
|
||||
private BigDecimal qtaArriviProx;
|
||||
@JsonProperty("qta_imp_prox_budget")
|
||||
@@ -334,6 +336,15 @@ public class MrpDailyMaterialReqDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagAttivo() {
|
||||
return flagAttivo;
|
||||
}
|
||||
|
||||
public MrpDailyMaterialReqDTO setFlagAttivo(boolean flagAttivo) {
|
||||
this.flagAttivo = flagAttivo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaArriviProx() {
|
||||
return qtaArriviProx;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,8 @@ public class MrpDailyMaterialReqService {
|
||||
" flag_qta_cnf_fissa,\n" +
|
||||
" cod_tcol_UL,\n" +
|
||||
" ingredienti,\n" +
|
||||
" colli_pedana\n" +
|
||||
" colli_pedana,\n" +
|
||||
" CAST(IIF(flag_stato = 'A', 1, 0) AS BIT) AS flag_attivo\n" +
|
||||
(loadDetails ?
|
||||
" ,jtb_cicl.cod_prod\n" +
|
||||
" ,jtb_cicl.unt_mis_prod\n" +
|
||||
@@ -411,7 +412,7 @@ public class MrpDailyMaterialReqService {
|
||||
(loadDetails ? "LEFT OUTER JOIN jtb_cicl ON mtb_aart.cod_mart = jtb_cicl.cod_prod\n" : "") +
|
||||
(loadDetails ? "LEFT OUTER JOIN mtb_unt_mis mtb_unt_mis_prod ON jtb_cicl.unt_mis_prod = mtb_unt_mis_prod.unt_mis\n" : "") +
|
||||
(loadDetails ? "LEFT OUTER JOIN mtb_tcol ON mtb_aart.cod_tcol_ul = mtb_tcol.cod_tcol\n" : "") +
|
||||
"WHERE mtb_aart.flag_stato = 'A'\n" +
|
||||
"WHERE mtb_aart.flag_stato = " + (mrpDailyMaterialInputDTO.isSoloArtDis() ? "'I'\n" : "'A'\n") +
|
||||
" AND EXISTS ( SELECT cod_mdep from mtb_part WHERE mtb_part.cod_mart = mtb_aart.cod_mart AND mtb_part.cod_mdep IN ('%s'))\n",
|
||||
depositi);
|
||||
if (mrpDailyMaterialInputDTO != null) {
|
||||
|
||||
Reference in New Issue
Block a user