In Rientro merce, quando si effettua un carico è stato aggiunta la richiesta di versamento automatico
This commit is contained in:
parent
55c16e602d
commit
067443698a
11
.idea/runConfigurations/app.xml
generated
11
.idea/runConfigurations/app.xml
generated
@ -1,6 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
|
||||
<module name="WMS.app.main" />
|
||||
<module name="WMS_Native.app" />
|
||||
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
@ -8,14 +9,17 @@
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
|
||||
<option name="CLEAR_APP_STORAGE" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="RESTORE_ENABLED" value="false" />
|
||||
<option name="RESTORE_FILE" value="" />
|
||||
<option name="RESTORE_FRESH_INSTALL_ONLY" value="false" />
|
||||
<option name="CLEAR_LOGCAT" value="false" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
|
||||
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
@ -59,6 +63,7 @@
|
||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
||||
</Profilers>
|
||||
<option name="DEEP_LINK" value="" />
|
||||
<option name="ACTIVITY" value="" />
|
||||
<option name="ACTIVITY_CLASS" value="" />
|
||||
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
||||
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
||||
|
||||
@ -99,6 +99,7 @@ public class DBSettingsModel {
|
||||
private boolean flagSpedizioneEnableFastPicking = false;
|
||||
private boolean flagAccettazioneBollaEditableQtaTot = true;
|
||||
private boolean flagViewSwitchDepoButton = true;
|
||||
private boolean flagProduzioneSkipAskVersamentoAutomatico;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@ -833,4 +834,13 @@ public class DBSettingsModel {
|
||||
public void setFlagViewSwitchDepoButton(boolean flagViewSwitchDepoButton) {
|
||||
this.flagViewSwitchDepoButton = flagViewSwitchDepoButton;
|
||||
}
|
||||
|
||||
public boolean isFlagProduzioneSkipAskVersamentoAutomatico() {
|
||||
return flagProduzioneSkipAskVersamentoAutomatico;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagProduzioneSkipAskVersamentoAutomatico(boolean flagProduzioneSkipAskVersamentoAutomatico) {
|
||||
this.flagProduzioneSkipAskVersamentoAutomatico = flagProduzioneSkipAskVersamentoAutomatico;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,6 +301,12 @@ public class SettingsManager {
|
||||
.setSection("PRODUZIONE")
|
||||
.setKeySection("VIEW_POSIZIONI")
|
||||
.setSetter(dbSettingsModelIstance::setViewPosizioni));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("PRODUZIONE")
|
||||
.setKeySection("FLAG_SKIP_ASK_VERSAMENTO_AUTOMATICO")
|
||||
.setSetter(dbSettingsModelIstance::setFlagProduzioneSkipAskVersamentoAutomatico)
|
||||
.setDefaultValue(false));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
|
||||
@ -40,14 +40,17 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView;
|
||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView;
|
||||
import it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
@ -268,6 +271,19 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
|
||||
DialogAskShouldVersamentoAutomaticoULView.newInstance(onComplete).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||
|
||||
handler.post(() -> {
|
||||
DialogVersamentoAutomaticoULDoneView.newInstance(versamentoAutomaticoULResponseDTO, onComplete).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void addULButtonClick() {
|
||||
this.onLoadingStarted();
|
||||
|
||||
@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ProduzioneRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinProdottoDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -173,13 +174,39 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
}, this::sendError);
|
||||
} else {
|
||||
synchronized (this.mtbColtsOfOrder) {
|
||||
this.sendOnLoadingEnded();
|
||||
this.mListener.onDataSaved(mtbColtSaved);
|
||||
Runnable onVersamentoCompleted = () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.mListener.onDataSaved(mtbColtSaved);
|
||||
};
|
||||
|
||||
if (SettingsManager.iDB().isFlagProduzioneSkipAskVersamentoAutomatico()) {
|
||||
versaAutomaticamenteUL(mtbColtSaved, onVersamentoCompleted);
|
||||
} else {
|
||||
sendVersamentoAutomaticoULRequest(response -> {
|
||||
if (response) {
|
||||
versaAutomaticamenteUL(mtbColtSaved, onVersamentoCompleted);
|
||||
} else {
|
||||
onVersamentoCompleted.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void versaAutomaticamenteUL(MtbColt mtbColt, Runnable onComplete) {
|
||||
if (mtbColt == null) return;
|
||||
|
||||
colliMagazzinoRESTConsumer.versamentoAutomaticoUL(mtbColt, versamentoResult -> {
|
||||
this.notifyVersamentoAutomaticoResult(versamentoResult, onComplete);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void notifyVersamentoAutomaticoResult(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onULVersata(versamentoAutomaticoULResponseDTO, onComplete);
|
||||
}
|
||||
|
||||
public void deleteLU(MtbColt mtbColt) {
|
||||
this.sendOnLoadingStarted();
|
||||
@ -251,11 +278,17 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
private void sendVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
|
||||
|
||||
void onDataSaved(MtbColt mtbColt);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user