Risolto bug di session ID nel caso si recupera un collo

This commit is contained in:
Giuseppe Scorrano 2019-01-24 15:39:45 +01:00
parent 6a32771164
commit 446572c2ee
4 changed files with 6 additions and 7 deletions

View File

@ -179,7 +179,7 @@ public class SettingsManager {
dbSettingsModelIstance.setEnableCheckPartitaMagCheckPickingV(valueEnableCheckPartitaMag); dbSettingsModelIstance.setEnableCheckPartitaMagCheckPickingV(valueEnableCheckPartitaMag);
GestSetupRESTConsumer.getBooleanValue("PICKING", "SETUP", "FLAG_MULTI_CLIENTE_ORD_VENDITA", valueFlagMultiClienteOrdVendita -> { GestSetupRESTConsumer.getBooleanValue("PICKING", "SETUP", "FLAG_MULTI_CLIENTE_ORD_VENDITA", valueFlagMultiClienteOrdVendita -> {
dbSettingsModelIstance.setFlagMultiClienteOrdV(valueFlagMultiClienteOrdVendita); dbSettingsModelIstance.setFlagMultiClienteOrdV(valueFlagMultiClienteOrdVendita);
GestSetupRESTConsumer.getValue("PICKING", "SETUP", "COD_ANAG_DEFAULT", valueCodAnagDefault -> { GestSetupRESTConsumer.getValue("PICKING", "SETUP", "COD_ANAG_DEFAULT", valueCodAnagDefault -> {
dbSettingsModelIstance.setDefaultCodAnag(valueCodAnagDefault.value); dbSettingsModelIstance.setDefaultCodAnag(valueCodAnagDefault.value);

View File

@ -402,8 +402,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
if(thereIsAnOpenedUL()) { if(thereIsAnOpenedUL()) {
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting), final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
mContext.getText(R.string.loading) + " ...", true);
if (thereIsAnyRowInUL()) { if (thereIsAnyRowInUL()) {

View File

@ -54,7 +54,7 @@ import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
public class MainVenditaFragment extends Fragment implements ITitledFragment, IScrollableFragment, ISelectAllFragment, IFilterableFragment { public class MainVenditaFragment extends Fragment implements ITitledFragment, IScrollableFragment, ISelectAllFragment, IFilterableFragment {
private static WaterfallToolbar mWaterfallToolbar; private WaterfallToolbar mWaterfallToolbar;
private VenditaHelper mHelper; private VenditaHelper mHelper;
private FragmentMainVenditaBinding mBinding = null; private FragmentMainVenditaBinding mBinding = null;

View File

@ -296,7 +296,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
} }
mtbColtSessionID = ColliDataRecover.startNewSession(recoveredMtbColt);
setULToCurrentContext(recoveredMtbColt); setULToCurrentContext(recoveredMtbColt);
refreshOrderBy(false); refreshOrderBy(false);
} }
@ -710,7 +710,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
if(thereIsAnyRowInUL()) { if(thereIsAnyRowInUL()) {
updateDataFine(progress, () -> distribuisciCollo(progress, (generatedMtbColts) -> printCollo(progress, generatedMtbColts))); updateDataFine(progress, () -> distribuisciCollo(progress, (generatedMtbColts) -> printCollo(progress, generatedMtbColts)));
} else { } else {
ColliDataRecover.closeSession(mtbColtSessionID); if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
deleteCollo(progress); deleteCollo(progress);
} }
@ -745,7 +745,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(), ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
mtbColts -> { mtbColts -> {
ColliDataRecover.closeSession(mtbColtSessionID); if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
onComplete.run(mtbColts); onComplete.run(mtbColts);
}, },
ex -> UtilityExceptions.defaultException(mActivity, ex, progress)); ex -> UtilityExceptions.defaultException(mActivity, ex, progress));