Finish v1.47.26(539)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good

This commit is contained in:
Marco Elefante 2025-10-29 11:11:43 +01:00
commit 50e2605ea5
9 changed files with 99 additions and 24 deletions

View File

@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App"> <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" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" /> <option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" /> <option name="DEPLOY_AS_INSTANT" value="false" />
@ -8,14 +9,17 @@
<option name="PM_INSTALL_OPTIONS" value="" /> <option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" /> <option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" 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="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" /> <option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" /> <option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" /> <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="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" /> <option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" /> <option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" /> <option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" /> <option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" /> <option name="DEBUGGER_TYPE" value="Auto" />
@ -59,6 +63,7 @@
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" /> <option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers> </Profilers>
<option name="DEEP_LINK" value="" /> <option name="DEEP_LINK" value="" />
<option name="ACTIVITY" value="" />
<option name="ACTIVITY_CLASS" value="" /> <option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" /> <option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" /> <option name="SKIP_ACTIVITY_VALIDATION" value="false" />

View File

@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services'
android { android {
def appVersionCode = 537 def appVersionCode = 539
def appVersionName = '1.47.24' def appVersionName = '1.47.26'
signingConfigs { signingConfigs {
release { release {

View File

@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest;
import java.io.IOException; import java.io.IOException;
import it.integry.integrywmsnative.core.settings.SettingsManager; import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityString;
import okhttp3.HttpUrl; import okhttp3.HttpUrl;
import okhttp3.Interceptor; import okhttp3.Interceptor;
import okhttp3.Request; import okhttp3.Request;
@ -17,15 +18,19 @@ public class HttpInterceptor implements Interceptor {
@Override @Override
public Response intercept(Chain chain) throws IOException { public Response intercept(Chain chain) throws IOException {
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB(); final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
final String APP_TOKEN = "fa3a21af-606b-4129-a22b-aedc2a52c7b6"; final String APP_TOKEN = "fa3a21af-606b-4129-a22b-aedc2a52c7b6";
final Request request = chain.request(); HttpUrl.Builder urlBuilder = chain.request().url().newBuilder();
final HttpUrl url = request.url().newBuilder()
.addQueryParameter("profileDb", PROFILE_DB)
.build();
Request.Builder builder = chain.request().newBuilder() if (!UtilityString.isNullOrEmpty(PROFILE_DB))
urlBuilder
.addQueryParameter("profileDb", PROFILE_DB);
HttpUrl url = urlBuilder.build();
final Request.Builder requestBuilder = chain.request().newBuilder();
Request.Builder builder = requestBuilder
.addHeader("Content-Type", "application/json") .addHeader("Content-Type", "application/json")
.addHeader("Accept", "*/*") .addHeader("Accept", "*/*")
.addHeader("x-app-token", APP_TOKEN); .addHeader("x-app-token", APP_TOKEN);

View File

@ -37,19 +37,19 @@ public class RESTBuilder {
} }
public <T> T getService(final Class<T> service, int timeout) { public <T> T getService(final Class<T> service, int timeout) {
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, true, timeout); return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, timeout);
} }
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors) { public <T> T getService(final Class<T> service, String protocol, String host, int port) {
return getService(service, protocol, host, port, addInterceptors, true, 60); return getService(service, protocol, host, port, true, 60);
} }
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi) { public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi) {
return getService(service, protocol, host, port, addInterceptors, addEmsApi, 60); return getService(service, protocol, host, port, addEmsApi, 60);
} }
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) { public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi, int timeout) {
OkHttpClient.Builder clientBuilder = getDefaultHttpClient(); OkHttpClient.Builder clientBuilder = getDefaultHttpClient();
timeout = 0; timeout = 0;
@ -62,7 +62,7 @@ public class RESTBuilder {
clientBuilder.retryOnConnectionFailure(true); clientBuilder.retryOnConnectionFailure(true);
clientBuilder.addInterceptor(authInterceptor); clientBuilder.addInterceptor(authInterceptor);
if (addInterceptors) clientBuilder.addInterceptor(new HttpInterceptor()); clientBuilder.addInterceptor(new HttpInterceptor());
if (ADD_LOGGER_INTERCEPTOR) clientBuilder.addInterceptor(new HttpLoggerInterceptor()); if (ADD_LOGGER_INTERCEPTOR) clientBuilder.addInterceptor(new HttpLoggerInterceptor());
OkHttpClient client = clientBuilder.build(); OkHttpClient client = clientBuilder.build();

View File

@ -99,6 +99,7 @@ public class DBSettingsModel {
private boolean flagSpedizioneEnableFastPicking = false; private boolean flagSpedizioneEnableFastPicking = false;
private boolean flagAccettazioneBollaEditableQtaTot = true; private boolean flagAccettazioneBollaEditableQtaTot = true;
private boolean flagViewSwitchDepoButton = true; private boolean flagViewSwitchDepoButton = true;
private boolean flagProduzioneSkipAskVersamentoAutomatico;
public boolean isFlagSpedizioneEnableFakeGiacenza() { public boolean isFlagSpedizioneEnableFakeGiacenza() {
return flagSpedizioneEnableFakeGiacenza; return flagSpedizioneEnableFakeGiacenza;
@ -833,4 +834,13 @@ public class DBSettingsModel {
public void setFlagViewSwitchDepoButton(boolean flagViewSwitchDepoButton) { public void setFlagViewSwitchDepoButton(boolean flagViewSwitchDepoButton) {
this.flagViewSwitchDepoButton = flagViewSwitchDepoButton; this.flagViewSwitchDepoButton = flagViewSwitchDepoButton;
} }
public boolean isFlagProduzioneSkipAskVersamentoAutomatico() {
return flagProduzioneSkipAskVersamentoAutomatico;
}
public DBSettingsModel setFlagProduzioneSkipAskVersamentoAutomatico(boolean flagProduzioneSkipAskVersamentoAutomatico) {
this.flagProduzioneSkipAskVersamentoAutomatico = flagProduzioneSkipAskVersamentoAutomatico;
return this;
}
} }

View File

@ -301,6 +301,12 @@ public class SettingsManager {
.setSection("PRODUZIONE") .setSection("PRODUZIONE")
.setKeySection("VIEW_POSIZIONI") .setKeySection("VIEW_POSIZIONI")
.setSetter(dbSettingsModelIstance::setViewPosizioni)); .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) stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
.setGestName("PICKING") .setGestName("PICKING")
.setSection("SPEDIZIONE") .setSection("SPEDIZIONE")

View File

@ -34,7 +34,7 @@ public class AuthenticationRESTConsumer extends _BaseRESTConsumer {
String host = CommonConst.Login.Azienda.host; String host = CommonConst.Login.Azienda.host;
int port = CommonConst.Login.Azienda.port; int port = CommonConst.Login.Azienda.port;
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port, false, true); AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port);
service.loginAzienda(codAzienda).enqueue(new ManagedErrorCallback<>() { service.loginAzienda(codAzienda).enqueue(new ManagedErrorCallback<>() {
@Override @Override
public void onResponse(Call<ServiceRESTResponse<LoginAziendaDTO>> call, Response<ServiceRESTResponse<LoginAziendaDTO>> response) { public void onResponse(Call<ServiceRESTResponse<LoginAziendaDTO>> call, Response<ServiceRESTResponse<LoginAziendaDTO>> response) {
@ -67,7 +67,7 @@ public class AuthenticationRESTConsumer extends _BaseRESTConsumer {
public void authenticate(String protocol, String host, int port, String username, String password, String profileDb, String deviceSalt, RunnableArgs<AuthenticationJwtResponseDTO> onComplete, RunnableArgs<Exception> onFailed) { public void authenticate(String protocol, String host, int port, String username, String password, String profileDb, String deviceSalt, RunnableArgs<AuthenticationJwtResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port, false); AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port);
LoginRequestDTO loginRequestDTO = new LoginRequestDTO() LoginRequestDTO loginRequestDTO = new LoginRequestDTO()
.setUsername(username) .setUsername(username)
@ -94,7 +94,7 @@ public class AuthenticationRESTConsumer extends _BaseRESTConsumer {
public void retrieveAvailableProfiles(String protocol, String host, int port, String username, String password, RunnableArgs<List<String>> onComplete, RunnableArgs<Exception> onFailed) { public void retrieveAvailableProfiles(String protocol, String host, int port, String username, String password, RunnableArgs<List<String>> onComplete, RunnableArgs<Exception> onFailed) {
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port, false); AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port);
service.retreiveAvailableProfiles(username, password) service.retreiveAvailableProfiles(username, password)
.enqueue(new ManagedErrorCallback<>() { .enqueue(new ManagedErrorCallback<>() {

View File

@ -40,14 +40,17 @@ import it.integry.integrywmsnative.core.model.MtbColr;
import it.integry.integrywmsnative.core.model.MtbColt; import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer; 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.core.utility.UtilityString;
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding; import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO; import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment; import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration; 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.DialogInputLUProdDTO;
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView; import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView;
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView; import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView;
import it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView;
/** /**
* A simple {@link Fragment} subclass. * 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() { public void addULButtonClick() {
this.onLoadingStarted(); this.onLoadingStarted();

View File

@ -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.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ProduzioneRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers.ProduzioneRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer; 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.CaricoProdFinDTO;
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinProdottoDTO; import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinProdottoDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager; import it.integry.integrywmsnative.core.settings.SettingsManager;
@ -173,13 +174,39 @@ public class ProdRientroMerceOrderDetailViewModel {
}, this::sendError); }, this::sendError);
} else { } else {
synchronized (this.mtbColtsOfOrder) { synchronized (this.mtbColtsOfOrder) {
this.sendOnLoadingEnded(); Runnable onVersamentoCompleted = () -> {
this.mListener.onDataSaved(mtbColtSaved); 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); }, 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) { public void deleteLU(MtbColt mtbColt) {
this.sendOnLoadingStarted(); this.sendOnLoadingStarted();
@ -251,11 +278,17 @@ public class ProdRientroMerceOrderDetailViewModel {
this::sendError); this::sendError);
} }
private void sendVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
}
public interface Listener extends ILoadingListener { public interface Listener extends ILoadingListener {
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
void onDataSaved(MtbColt mtbColt); void onDataSaved(MtbColt mtbColt);
void onError(Exception ex); void onError(Exception ex);
void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete);
} }
} }