Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
e491c56f3f
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 419
|
def appVersionCode = 420
|
||||||
def appVersionName = '1.40.02'
|
def appVersionName = '1.40.03'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -10,8 +10,6 @@ public enum ReportType {
|
|||||||
ETICHETTA_SSCC_LAVORAZIONE(1),
|
ETICHETTA_SSCC_LAVORAZIONE(1),
|
||||||
@SerializedName("2")
|
@SerializedName("2")
|
||||||
ETICHETTA_SSCC_SPEDIZIONE(2),
|
ETICHETTA_SSCC_SPEDIZIONE(2),
|
||||||
@SerializedName("3")
|
|
||||||
WMS_SPEDIZIONE_ETICHETTE_SSCC_ORD(3),
|
|
||||||
@SerializedName("4")
|
@SerializedName("4")
|
||||||
WMS_SPEDIZIONE_PACKING_LIST_ORD(4),
|
WMS_SPEDIZIONE_PACKING_LIST_ORD(4),
|
||||||
@SerializedName("5")
|
@SerializedName("5")
|
||||||
|
|||||||
@ -312,6 +312,11 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
|||||||
private void startPickingActivity(List<ProdFabbisognoLineeProdDTO> fabbisognoList) {
|
private void startPickingActivity(List<ProdFabbisognoLineeProdDTO> fabbisognoList) {
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
|
|
||||||
|
String ordini = UtilityDB.listValueToString(Stream.of(mProdFabbisognoItemModel)
|
||||||
|
.filter(x -> x instanceof ProdFabbisognoLineeItemModelDto && ((ProdFabbisognoLineeItemModelDto) x).selected.get())
|
||||||
|
.map(x -> ((ProdFabbisognoLineeItemModelDto) x).getOrdineLavorazioneDTO().getNumOrd().toString())
|
||||||
|
.toList());
|
||||||
|
|
||||||
List<SitArtOrdDTO> sitArtOrdDTOS = Stream.of(fabbisognoList)
|
List<SitArtOrdDTO> sitArtOrdDTOS = Stream.of(fabbisognoList)
|
||||||
.map(x -> {
|
.map(x -> {
|
||||||
SitArtOrdDTO sitArtOrdDTO = new SitArtOrdDTO()
|
SitArtOrdDTO sitArtOrdDTO = new SitArtOrdDTO()
|
||||||
@ -328,6 +333,7 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
|||||||
|
|
||||||
sitArtOrdDTO.getExtraInfo().put("dataInizio", x.getDataInizio());
|
sitArtOrdDTO.getExtraInfo().put("dataInizio", x.getDataInizio());
|
||||||
sitArtOrdDTO.getExtraInfo().put("dataFine", x.getDataFine());
|
sitArtOrdDTO.getExtraInfo().put("dataFine", x.getDataFine());
|
||||||
|
sitArtOrdDTO.getExtraInfo().put("ordini", ordini);
|
||||||
|
|
||||||
return sitArtOrdDTO;
|
return sitArtOrdDTO;
|
||||||
})
|
})
|
||||||
|
|||||||
@ -50,123 +50,26 @@ public class ProdFabbisognoLineeProdRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void loadFabbisogno(String codMart, Date startDate, Date endDate, String codMdep, RunnableArgs<List<ProdFabbisognoLineeProdDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void loadFabbisogno(String codMart, String ordini, Date startDate, Date endDate, String codMdep, RunnableArgs<List<ProdFabbisognoLineeProdDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
String sql = "WITH input_values AS ( " +
|
String sql = "SELECT DISTINCT cod_jfas\n" +
|
||||||
" SELECT " + UtilityDB.valueToString(startDate) + " AS data_inizio, " +
|
"FROM (SELECT DENSE_RANK() OVER (PARTITION BY dtb_ordt.gestione, dtb_ordt.data_ord, dtb_ordt.num_ord ORDER BY dtb_ord_steps.data_iniz DESC) AS row_n,\n" +
|
||||||
" " + UtilityDB.valueToString(endDate) + " AS data_fine, " +
|
" dtb_ord_steps.*\n" +
|
||||||
// " " + UtilityDB.valueToString(lineaProd) + " AS linea_prod, " +
|
" FROM dtb_ord_steps\n" +
|
||||||
" " + UtilityDB.valueToString(codMdep) + " AS cod_mdep)," +
|
" INNER JOIN dtb_ordt ON dtb_ord_steps.data_ord = dtb_ordt.data_ord\n" +
|
||||||
" withdraw_mtb_colr AS ( " +
|
" AND dtb_ord_steps.num_ord = dtb_ordt.num_ord\n" +
|
||||||
" SELECT cod_mart, " +
|
" AND dtb_ord_steps.gestione = dtb_ordt.gestione\n" +
|
||||||
" SUM(ISNULL(qta_col, 0)) as qta_col, " +
|
" INNER JOIN dtb_ordr ON dtb_ordr.gestione = dtb_ord_steps.gestione AND\n" +
|
||||||
" SUM(ISNULL(num_cnf, 0)) as num_cnf, " +
|
" dtb_ordr.data_ord = dtb_ord_steps.data_ord AND\n" +
|
||||||
" mtb_colr.data_ord, " +
|
" dtb_ordr.num_ord = dtb_ord_steps.num_ord\n" +
|
||||||
" mtb_colr.num_ord, " +
|
" WHERE dtb_ordt.gestione = 'L'\n" +
|
||||||
" mtb_colr.gestione " +
|
" AND dtb_ordr.flag_evaso = 'I'\n" +
|
||||||
" FROM mtb_colr " +
|
" AND dtb_ordr.flag_evaso_forzato = 'N'\n" +
|
||||||
" INNER JOIN mtb_colt mc on mtb_colr.gestione = mc.gestione and mtb_colr.data_collo = mc.data_collo and " +
|
" AND flag_annulla = 'N'\n" +
|
||||||
" mtb_colr.ser_collo = mc.ser_collo and mtb_colr.num_collo = mc.num_collo " +
|
" AND dtb_ordt.cod_mdep = " + UtilityDB.valueToString(codMdep) + "\n" +
|
||||||
" WHERE segno = -1 " +
|
" AND dtb_ordt.num_ord IN ( " + ordini + " )\n" +
|
||||||
" AND cod_dtip IS NULL " +
|
" AND dtb_ordt.data_ord BETWEEN " + UtilityDB.valueToString(startDate) + " AND " + UtilityDB.valueToString(endDate) + "\n" +
|
||||||
" GROUP BY cod_mart, " +
|
" AND dtb_ordr.cod_mart = " + UtilityDB.valueToString(codMart) + ") t\n" +
|
||||||
" mtb_colr.data_ord, " +
|
"WHERE t.row_n = 1";
|
||||||
" mtb_colr.num_ord, " +
|
|
||||||
" mtb_colr.gestione " +
|
|
||||||
" ), " +
|
|
||||||
" custom_mtb_colr AS (SELECT cod_mart, " +
|
|
||||||
" SUM(qta_col) AS qta_col, " +
|
|
||||||
" SUM(num_cnf) AS num_cnf, " +
|
|
||||||
" posizione " +
|
|
||||||
" FROM mvw_sitart_udc_det_inventario " +
|
|
||||||
" GROUP BY cod_mart, posizione), " +
|
|
||||||
" grouped_ord AS ( " +
|
|
||||||
" SELECT dtb_ordr.cod_mart, " +
|
|
||||||
" dtb_ordt.cod_jfas, " +
|
|
||||||
" dtb_ordt.cod_mdep, " +
|
|
||||||
" dtb_ordt.gestione, " +
|
|
||||||
" CONVERT(NUMERIC(15, 5), SUM(dtb_ordr.qta_ord * dtb_ordr.rap_conv) - " +
|
|
||||||
" SUM(dtb_ordr.qta_evasa * dtb_ordr.rap_conv)) AS qta_ord, " +
|
|
||||||
" SUM(dtb_ordr.num_cnf - dtb_ordr.num_cnf_evasa) AS num_cnf_ord, " +
|
|
||||||
" SUM(ISNULL(withdraw_mtb_colr.qta_col, 0)) AS qta_col_scaricata, " +
|
|
||||||
" SUM(ISNULL(withdraw_mtb_colr.num_cnf, 0)) AS num_cnf_scaricata " +
|
|
||||||
" FROM dtb_ordr " +
|
|
||||||
" INNER JOIN dtb_ordt on dtb_ordr.gestione = dtb_ordt.gestione AND " +
|
|
||||||
" dtb_ordr.data_ord = dtb_ordt.data_ord AND " +
|
|
||||||
" dtb_ordr.num_ord = dtb_ordt.num_ord " +
|
|
||||||
" LEFT OUTER JOIN withdraw_mtb_colr " +
|
|
||||||
" ON withdraw_mtb_colr.gestione = dtb_ordt.gestione AND " +
|
|
||||||
" withdraw_mtb_colr.num_ord = dtb_ordt.num_ord AND " +
|
|
||||||
" withdraw_mtb_colr.data_ord = dtb_ordt.data_ord AND " +
|
|
||||||
" withdraw_mtb_colr.cod_mart = dtb_ordr.cod_mart " +
|
|
||||||
" CROSS APPLY input_values " +
|
|
||||||
" WHERE dtb_ordt.gestione = 'L' " +
|
|
||||||
" AND flag_evaso = 'I' " +
|
|
||||||
" AND dtb_ordr.flag_evaso_forzato = 'N' " +
|
|
||||||
" AND flag_annulla = 'N' " +
|
|
||||||
" AND dtb_ordt.cod_mdep = input_values.cod_mdep " +
|
|
||||||
" AND dtb_ordt.data_ord BETWEEN input_values.data_inizio AND input_values.data_fine " +
|
|
||||||
" GROUP BY dtb_ordr.cod_mart, dtb_ordt.cod_jfas, dtb_ordt.cod_mdep, dtb_ordt.gestione " +
|
|
||||||
" ), " +
|
|
||||||
" tmp_ord AS (SELECT grouped_ord.cod_mart, " +
|
|
||||||
" mtb_aart.unt_mis, " +
|
|
||||||
" grouped_ord.cod_jfas, " +
|
|
||||||
" SUM(qta_ord) - SUM(qta_col_scaricata) AS qta_ord, " +
|
|
||||||
" SUM(num_cnf_ord) - SUM(num_cnf_scaricata) AS num_cnf_ord " +
|
|
||||||
" FROM grouped_ord " +
|
|
||||||
" INNER JOIN mtb_aart ON grouped_ord.cod_mart = mtb_aart.cod_mart " +
|
|
||||||
" CROSS APPLY input_values " +
|
|
||||||
" GROUP BY grouped_ord.cod_mart, mtb_aart.unt_mis, grouped_ord.cod_jfas " +
|
|
||||||
" ), " +
|
|
||||||
" ord_without_positioned_mtb_colt AS ( " +
|
|
||||||
" SELECT tmp_ord.cod_mart, " +
|
|
||||||
" tmp_ord.cod_jfas, " +
|
|
||||||
" ISNULL(custom_mtb_colr_on_linea.posizione, tmp_ord.cod_jfas) AS posizione, " +
|
|
||||||
" unt_mis, " +
|
|
||||||
" qta_ord AS qta_ord_calc, " +
|
|
||||||
" num_cnf_ord AS num_cnf_ord_calc, " +
|
|
||||||
" ISNULL(custom_mtb_colr_on_linea.qta_col, 0) AS qta_gia_posizionata, " +
|
|
||||||
" ISNULL(custom_mtb_colr_on_linea.num_cnf, 0) AS num_cnf_gia_posizionata, " +
|
|
||||||
" qta_ord - ISNULL(custom_mtb_colr_on_linea.qta_col, 0) AS qta_fabbisogno, " +
|
|
||||||
" num_cnf_ord - ISNULL(custom_mtb_colr_on_linea.num_cnf, 0) AS num_cnf_fabbisogno " +
|
|
||||||
" FROM tmp_ord " +
|
|
||||||
" INNER JOIN jrl_fase_posizioni ON tmp_ord.cod_jfas = jrl_fase_posizioni.cod_jfas " +
|
|
||||||
" AND tmp_ord.cod_jfas = jrl_fase_posizioni.posizione " +
|
|
||||||
" LEFT OUTER JOIN custom_mtb_colr custom_mtb_colr_on_linea " +
|
|
||||||
" ON tmp_ord.cod_mart = custom_mtb_colr_on_linea.cod_mart AND " +
|
|
||||||
" tmp_ord.cod_jfas = custom_mtb_colr_on_linea.posizione " +
|
|
||||||
" " +
|
|
||||||
" UNION ALL " +
|
|
||||||
" " +
|
|
||||||
" SELECT DISTINCT tmp_ord.cod_mart, " +
|
|
||||||
" null AS cod_jfas, " +
|
|
||||||
" jrl_fase_posizioni.posizione, " +
|
|
||||||
" unt_mis, " +
|
|
||||||
" 0 AS qta_ord_calc, " +
|
|
||||||
" 0 AS num_cnf_ord_calc, " +
|
|
||||||
" ISNULL(custom_mtb_colr_on_linea.qta_col, 0) AS qta_gia_posizionata, " +
|
|
||||||
" ISNULL(custom_mtb_colr_on_linea.num_cnf, 0) AS num_cnf_gia_posizionata, " +
|
|
||||||
" 0 AS qta_fabbisogno, " +
|
|
||||||
" 0 AS num_cnf_fabbisogno " +
|
|
||||||
" FROM tmp_ord " +
|
|
||||||
" INNER JOIN jrl_fase_posizioni ON tmp_ord.cod_jfas = jrl_fase_posizioni.cod_jfas " +
|
|
||||||
" AND tmp_ord.cod_jfas <> jrl_fase_posizioni.posizione " +
|
|
||||||
" " +
|
|
||||||
" " +
|
|
||||||
" LEFT OUTER JOIN custom_mtb_colr custom_mtb_colr_on_linea " +
|
|
||||||
" ON tmp_ord.cod_mart = custom_mtb_colr_on_linea.cod_mart AND " +
|
|
||||||
" jrl_fase_posizioni.posizione = custom_mtb_colr_on_linea.posizione " +
|
|
||||||
" ) " +
|
|
||||||
"SELECT DISTINCT cod_mart, " +
|
|
||||||
" unt_mis, " +
|
|
||||||
" cod_jfas, " +
|
|
||||||
" input_values.data_inizio, " +
|
|
||||||
" input_values.data_fine " +
|
|
||||||
"FROM ord_without_positioned_mtb_colt " +
|
|
||||||
"CROSS APPLY input_values " +
|
|
||||||
"WHERE cod_mart = " + UtilityDB.valueToString(codMart) + " " +
|
|
||||||
"GROUP BY cod_mart, unt_mis, cod_jfas, input_values.data_inizio, input_values.data_fine " +
|
|
||||||
"HAVING SUM(qta_ord_calc - qta_gia_posizionata) > 0 AND SUM(num_cnf_ord_calc - num_cnf_gia_posizionata) > 0 " +
|
|
||||||
"ORDER BY cod_mart";
|
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<ProdFabbisognoLineeProdDTO>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<ProdFabbisognoLineeProdDTO>>() {}.getType();
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import android.content.pm.ActivityInfo;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -46,6 +47,7 @@ import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
|||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainRettificaGiacenzeBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainRettificaGiacenzeBinding;
|
||||||
@ -398,6 +400,15 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||||
.setCanLUBeClosed(canLUBeClosed);
|
.setCanLUBeClosed(canLUBeClosed);
|
||||||
|
|
||||||
|
String codMart = dialogInputQuantityV2DTO.getMtbAart().getCodMart();
|
||||||
|
String flagStato = dialogInputQuantityV2DTO.getMtbAart().getFlagStato();
|
||||||
|
|
||||||
|
if (flagStato.equalsIgnoreCase("I")) {
|
||||||
|
DialogSimpleMessageView.makeInfoDialog(
|
||||||
|
getActivity().getResources().getString(R.string.confirm),
|
||||||
|
new SpannableString(Html.fromHtml(String.format(UtilityResources.getString(R.string.item_not_enabled), codMart))),
|
||||||
|
null,
|
||||||
|
() -> {
|
||||||
if (!mDialogInputQuantityV2View.isVisible())
|
if (!mDialogInputQuantityV2View.isVisible())
|
||||||
mDialogInputQuantityV2View
|
mDialogInputQuantityV2View
|
||||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||||
@ -414,8 +425,10 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
})
|
})
|
||||||
.setOnAbort(this::onLoadingEnded)
|
.setOnAbort(this::onLoadingEnded)
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
},
|
||||||
else this.onLoadingEnded();
|
this::onLoadingEnded)
|
||||||
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
|
} else this.onLoadingEnded();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -76,6 +76,7 @@ public class DialogRowInfoProdFabbisognoLineeProdView extends BaseDialogRowInfoV
|
|||||||
this.mViewModel.init(
|
this.mViewModel.init(
|
||||||
sitArtOrdDTO.getCodMart(),
|
sitArtOrdDTO.getCodMart(),
|
||||||
sitArtOrdDTO.getCodMdep(),
|
sitArtOrdDTO.getCodMdep(),
|
||||||
|
(String) sitArtOrdDTO.getExtraInfo().get("ordini"),
|
||||||
(Date) sitArtOrdDTO.getExtraInfo().get("dataInizio"),
|
(Date) sitArtOrdDTO.getExtraInfo().get("dataInizio"),
|
||||||
(Date) sitArtOrdDTO.getExtraInfo().get("dataFine"));
|
(Date) sitArtOrdDTO.getExtraInfo().get("dataFine"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,10 +23,10 @@ public class DialogRowInfoProdFabbisognoLineeProdViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void init(String codMart, String codMdep, Date startDate, Date endDate) {
|
public void init(String codMart, String codMdep, String ordni, Date startDate, Date endDate) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(codMart, startDate, endDate, codMdep, fabbisognoList -> {
|
this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(codMart, ordni, startDate, endDate, codMdep, fabbisognoList -> {
|
||||||
this.mFabbisognoList.postValue(fabbisognoList);
|
this.mFabbisognoList.postValue(fabbisognoList);
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
@ -352,6 +352,7 @@
|
|||||||
<string name="title_dynamic_frudis">Personalizzazioni Frudis</string>
|
<string name="title_dynamic_frudis">Personalizzazioni Frudis</string>
|
||||||
|
|
||||||
<string name="batch_lot_not_enabled"><![CDATA[Il lotto: <b>%s</b> non è attivo.]]></string>
|
<string name="batch_lot_not_enabled"><![CDATA[Il lotto: <b>%s</b> non è attivo.]]></string>
|
||||||
|
<string name="item_not_enabled"><![CDATA[L\'articolo: <b>%s</b> non è attivo.]]></string>
|
||||||
<string name="punto_vendita">Punto Vendita</string>
|
<string name="punto_vendita">Punto Vendita</string>
|
||||||
<string name="title_dynamic_saporiveri_pv">SaporiVeri PV</string>
|
<string name="title_dynamic_saporiveri_pv">SaporiVeri PV</string>
|
||||||
<string name="generate_orders">Genera ordini di acquisto</string>
|
<string name="generate_orders">Genera ordini di acquisto</string>
|
||||||
|
|||||||
@ -357,6 +357,7 @@
|
|||||||
<string name="title_dynamic_frudis">Frudis customizations</string>
|
<string name="title_dynamic_frudis">Frudis customizations</string>
|
||||||
|
|
||||||
<string name="batch_lot_not_enabled"><![CDATA[Batch lot: <b>%s</b> is inactive.]]></string>
|
<string name="batch_lot_not_enabled"><![CDATA[Batch lot: <b>%s</b> is inactive.]]></string>
|
||||||
|
<string name="item_not_enabled"><![CDATA[Item: <b>%s</b> is inactive.]]></string>
|
||||||
<string name="other">Other</string>
|
<string name="other">Other</string>
|
||||||
<string name="home">Home</string>
|
<string name="home">Home</string>
|
||||||
<string name="logout">Logout</string>
|
<string name="logout">Logout</string>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user