From ce9d304043b486361244fb6be90e5ef81e1e932e Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Mon, 15 Sep 2025 17:36:37 +0200 Subject: [PATCH 01/28] Aggiunto invio del file raw del log nel caso in cui vada in eccezione il parsine --- .../gest/settings/MainSettingsFragment.java | 46 ++++++++++++++++--- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java b/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java index 1ca01cb3..40ba35ac 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java @@ -280,15 +280,27 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT List attachmentDTOList = new ArrayList<>(); if (fileToShare != null) { - var htmlContent = createAppLogAttachment(fileToShare); + try { + var htmlContent = createAppLogAttachment(fileToShare); - byte[] buffer = htmlContent.getBytes();//specify the size to allow. - String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP); + byte[] buffer = htmlContent.getBytes();//specify the size to allow. + String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP); - var logAttachment = new MailAttachmentDTO() - .setFileName("wms_log.html") - .setFileb64Content(base64); - attachmentDTOList.add(logAttachment); + var logAttachment = new MailAttachmentDTO() + .setFileName("wms_log.html") + .setFileb64Content(base64); + attachmentDTOList.add(logAttachment); + } catch (Exception ex) { + String rawLogFile = getRawLogAttachment(fileToShare); + + byte[] buffer = rawLogFile.getBytes();//specify the size to allow. + String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP); + + var logAttachment = new MailAttachmentDTO() + .setFileName("raw_log.txt") + .setFileb64Content(base64); + attachmentDTOList.add(logAttachment); + } } @@ -461,4 +473,24 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT return htmlContent.toString(); } + + private String getRawLogAttachment(File logFile) { + //Read text from file + StringBuilder text = new StringBuilder(); + + try { + BufferedReader br = new BufferedReader(new FileReader(logFile)); + String line; + + while ((line = br.readLine()) != null) { + text.append(line); + text.append('\n'); + } + br.close(); + } catch (IOException e) { + //You'll need to add proper error handling here + } + + return text.toString(); + } } From b06f058ecffff4b90ae24ac699c30219051c5387 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 16 Sep 2025 10:05:35 +0200 Subject: [PATCH 02/28] -> v1.47.16 (529) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0287b3c4..0ab426ce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services' android { - def appVersionCode = 528 - def appVersionName = '1.47.15' + def appVersionCode = 529 + def appVersionName = '1.47.16' signingConfigs { release { From 60e725f554f47f22f2127ca17a6dac3f8b1074e4 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 16 Sep 2025 12:28:52 +0200 Subject: [PATCH 03/28] Fix su caricamento durante il chiudi ordini spedizione --- .../integrywmsnative/gest/spedizione/SpedizioneActivity.java | 2 -- .../integrywmsnative/gest/spedizione/SpedizioneViewModel.java | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneActivity.java b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneActivity.java index 3a93dcc5..5cd9e95f 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneActivity.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneActivity.java @@ -855,11 +855,9 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo public void closeOrder() { this.fabPopupMenu.dismiss(); - this.onLoadingStarted(); executorService.execute(() -> { try { this.mViewmodel.closeOrder(); - this.onLoadingEnded(); } catch (Exception e) { onError(e); } diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java index e24097f7..88f29c44 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java @@ -2127,7 +2127,10 @@ public class SpedizioneViewModel { if (SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose()) { var printRequestResult = this.sendOnCloseOrderPrintRequest(); + + this.sendOnLoadingStarted(); this.onCloseOrderPrintRequested(printRequestResult); + this.sendOnLoadingEnded(); } if (this.mIsOrdTrasf && !UtilityString.isNullOrEmpty(SettingsManager.iDB().getCodDtipOrdTrasfV())) { From b2ad4fdb62fd54185240057517fab1fdcb79d976 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 16 Sep 2025 17:40:15 +0200 Subject: [PATCH 04/28] Migliorata gestione file di log --- .../core/context/AppContext.java | 16 +++++++++++++++- .../gest/settings/MainSettingsFragment.java | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/core/context/AppContext.java b/app/src/main/java/it/integry/integrywmsnative/core/context/AppContext.java index 6709366e..21cbe253 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/context/AppContext.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/context/AppContext.java @@ -89,7 +89,21 @@ public class AppContext { private void initLogger() { Logger.addLogAdapter(new AndroidLogAdapter()); - logsFolder = new File(mApplicationContext.getExternalFilesDir(null).getAbsolutePath()); + File dataDir = mApplicationContext.getExternalFilesDir(null); + + logsFolder = new File(dataDir, "logs"); + + if (!logsFolder.exists()) + logsFolder.mkdirs(); + + //Temporary clean + File[] wrongFilesToBeDeleted = dataDir.listFiles((file, s) -> s.startsWith("logs_")); + + if (wrongFilesToBeDeleted != null) + for (File fileToDelete : wrongFilesToBeDeleted) { + fileToDelete.delete(); + } + removeOldLogs(logsFolder); int maxBytesSize = 5 * 1024 * 1024; diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java b/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java index 40ba35ac..cd9c3418 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/settings/MainSettingsFragment.java @@ -270,7 +270,7 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT File logFilePath = appContext.getLogFilePath(); - var files = logFilePath.listFiles(); + var files = logFilePath.listFiles(File::isFile); var fileToShare = Arrays.stream(files) .sorted(Comparator.reverseOrder()) From ba9da26ca06c16d0e4692c817c0ebe86a975c870 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 16 Sep 2025 17:41:48 +0200 Subject: [PATCH 05/28] -> v1.47.17 (530) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0ab426ce..9e1845f1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services' android { - def appVersionCode = 529 - def appVersionName = '1.47.16' + def appVersionCode = 530 + def appVersionName = '1.47.17' signingConfigs { release { From 9c72a2a628b96991d2cbb109ff0efb433e977a09 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Wed, 17 Sep 2025 15:09:01 +0200 Subject: [PATCH 06/28] Fix su retrieve degli ultimi versamenti di materiale --- .../core/di/BindableFloat.java | 7 - .../integrywmsnative/core/di/Converters.java | 17 +- .../rest/consumers/MaterialiRESTConsumer.java | 24 + .../MaterialiRESTConsumerService.java | 11 +- .../core/utility/UtilityNumber.java | 108 ++- .../ProdRecuperoMaterialeFragment.java | 30 +- .../ProdRecuperoMaterialeModule.java | 18 - .../ProdRecuperoMaterialeViewModel.java | 41 +- .../ProdRecuperoMaterialeRESTConsumer.java | 658 +++++++++++------- .../fragment_prod_recupero_materiale.xml | 20 +- 10 files changed, 561 insertions(+), 373 deletions(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/core/di/BindableFloat.java b/app/src/main/java/it/integry/integrywmsnative/core/di/BindableFloat.java index b6223f41..fcb58c50 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/di/BindableFloat.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/di/BindableFloat.java @@ -4,9 +4,6 @@ import androidx.databinding.BaseObservable; import java.math.BigDecimal; -import it.integry.integrywmsnative.core.CommonConst; -import it.integry.integrywmsnative.core.utility.UtilityNumber; - public class BindableFloat extends BaseObservable { private Float value; @@ -15,10 +12,6 @@ public class BindableFloat extends BaseObservable { } public BigDecimal getBigDecimal() { - int numberOfDigits = UtilityNumber.countNumberOfDecimalDigits(get()); - - if(numberOfDigits > CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS) numberOfDigits = CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS; - return BigDecimal.valueOf(get()); } diff --git a/app/src/main/java/it/integry/integrywmsnative/core/di/Converters.java b/app/src/main/java/it/integry/integrywmsnative/core/di/Converters.java index 6b7ece87..66990239 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/di/Converters.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/di/Converters.java @@ -261,7 +261,7 @@ public class Converters { BigDecimal value = null; if (!UtilityString.isNullOrEmpty(s.toString())) - value = new BigDecimal(s.toString()); + value = UtilityNumber.parseBigDecimal(s.toString(), Locale.getDefault()); observableBigDecimal.set(value); } @@ -271,7 +271,7 @@ public class Converters { } BigDecimal newValue = observableBigDecimal.get(); - BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? new BigDecimal(view.getText().toString()) : null; + BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? UtilityNumber.parseBigDecimal(view.getText().toString(), Locale.getDefault()) : null; if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) { view.setText(UtilityNumber.decimalToString(newValue)); @@ -292,7 +292,7 @@ public class Converters { String newValueString = s.toString().trim(); if (!UtilityString.isNullOrEmpty(newValueString)) - value = new BigDecimal(newValueString); + value = UtilityNumber.parseBigDecimal(newValueString, Locale.getDefault()); observableBigDecimal.set(value); } @@ -301,7 +301,7 @@ public class Converters { view.addTextChangedListener(watcher); } BigDecimal newValue = observableBigDecimal.get(); - BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? new BigDecimal(view.getText().toString()) : null; + BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? UtilityNumber.parseBigDecimal(view.getText().toString(), Locale.getDefault()) : null; if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) { view.setText(UtilityNumber.decimalToString(newValue)); @@ -322,7 +322,7 @@ public class Converters { String newValueString = s.toString().trim(); if (!UtilityString.isNullOrEmpty(newValueString)) - value = new BigDecimal(newValueString); + value = UtilityNumber.parseBigDecimal(newValueString, Locale.getDefault()); observableBigDecimal.set(value); } @@ -331,7 +331,7 @@ public class Converters { view.addTextChangedListener(watcher); } BigDecimal newValue = observableBigDecimal.get(); - BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? new BigDecimal(view.getText().toString()) : null; + BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? UtilityNumber.parseBigDecimal(view.getText().toString(), Locale.getDefault()) : null; if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) { view.setText(UtilityNumber.decimalToString(newValue)); @@ -350,7 +350,8 @@ public class Converters { public void onTextChanged(CharSequence s, int start, int before, int count) { BigDecimal value = null; if (!UtilityString.isNullOrEmpty(s.toString())) - value = new BigDecimal(s.toString()); + value = UtilityNumber.parseBigDecimal(s.toString(), Locale.getDefault()); + bindableBigDecimal.set(value); } }; @@ -358,7 +359,7 @@ public class Converters { view.addTextChangedListener(watcher); } BigDecimal newValue = bindableBigDecimal.get(); - BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? new BigDecimal(view.getText().toString()) : null; + BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? UtilityNumber.parseBigDecimal(view.getText().toString(), Locale.getDefault()) : null; if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) { view.setText(UtilityNumber.decimalToString(newValue)); diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumer.java index ada5b12f..2fd21ad6 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumer.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumer.java @@ -1,5 +1,6 @@ package it.integry.integrywmsnative.core.rest.consumers; +import java.util.List; import java.util.concurrent.ExecutorService; import javax.inject.Singleton; @@ -9,6 +10,7 @@ import it.integry.integrywmsnative.core.model.MtbColt; import it.integry.integrywmsnative.core.rest.RESTBuilder; import it.integry.integrywmsnative.core.rest.model.materiali.RecuperaMaterialiRequestDTO; import it.integry.integrywmsnative.core.rest.model.materiali.VersaMaterialiRequestDTO; +import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO; @Singleton public class MaterialiRESTConsumer extends _BaseRESTConsumer { @@ -21,6 +23,28 @@ public class MaterialiRESTConsumer extends _BaseRESTConsumer { this.executorService = executorService; } + public List makeSynchronousRetrieveLastVersamentiRequest(String codJfas) throws Exception { + var materialiRESTConsumerService = restBuilder.getService(MaterialiRESTConsumerService.class); + + var response = materialiRESTConsumerService.retrieveLastVersamenti(codJfas) + .execute(); + + + var data = analyzeAnswer(response, "retrieveLastVersamenti"); + return data; + } + + public void makeRetrieveLastVersamentiRequest(String codJfas, final RunnableArgs> onComplete, final RunnableArgs onFailed) { + executorService.execute(() -> { + try { + var response = makeSynchronousRetrieveLastVersamentiRequest(codJfas); + if (onComplete != null) onComplete.run(response); + } catch (Exception ex) { + if (onFailed != null) onFailed.run(ex); + } + }); + } + public MtbColt makeSynchronousRecuperaRequest(RecuperaMaterialiRequestDTO request) throws Exception { var materialiRESTConsumerService = restBuilder.getService(MaterialiRESTConsumerService.class); diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumerService.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumerService.java index b26c51a2..6d0f99f4 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumerService.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/MaterialiRESTConsumerService.java @@ -1,17 +1,26 @@ package it.integry.integrywmsnative.core.rest.consumers; +import java.util.List; + import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse; import it.integry.integrywmsnative.core.rest.model.materiali.RecuperaMaterialiRequestDTO; import it.integry.integrywmsnative.core.rest.model.materiali.RecuperaMaterialiResponseDTO; import it.integry.integrywmsnative.core.rest.model.materiali.VersaMaterialiRequestDTO; +import it.integry.integrywmsnative.core.rest.model.materiali.VersaMaterialiResponseDTO; +import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO; import retrofit2.Call; import retrofit2.http.Body; +import retrofit2.http.GET; import retrofit2.http.POST; +import retrofit2.http.Query; public interface MaterialiRESTConsumerService { @POST("wms/materiali/versa") - Call> versa(@Body VersaMaterialiRequestDTO request); + Call> versa(@Body VersaMaterialiRequestDTO request); + + @GET("wms/materiali/retrieveLastVersamenti") + Call>> retrieveLastVersamenti(@Query("codJfas") String codJfas); @POST("wms/materiali/recupera") Call> recupera(@Body RecuperaMaterialiRequestDTO request); diff --git a/app/src/main/java/it/integry/integrywmsnative/core/utility/UtilityNumber.java b/app/src/main/java/it/integry/integrywmsnative/core/utility/UtilityNumber.java index 4da65217..232b78fc 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/utility/UtilityNumber.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/utility/UtilityNumber.java @@ -1,6 +1,7 @@ package it.integry.integrywmsnative.core.utility; import java.math.BigDecimal; +import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; @@ -9,7 +10,8 @@ import it.integry.integrywmsnative.core.CommonConst; public class UtilityNumber { - private static DecimalFormat decimalFormatInstance; + // Locale italiano per la formattazione + private static final Locale ITALIAN_LOCALE = new Locale("it", "IT"); public static String decimalToString(Float bigDecimal){ if(bigDecimal == null) return "0"; @@ -23,71 +25,59 @@ public class UtilityNumber { public static String decimalToString(BigDecimal bigDecimal, int decimal){ if(bigDecimal == null) return "0"; - return decimalToString(bigDecimal.floatValue(), decimal); + + // Usa stripTrailingZeros per rimuovere gli zeri finali + BigDecimal stripped = bigDecimal.stripTrailingZeros(); + // Limita il numero di decimali visualizzati + int scale = Math.min(stripped.scale(), decimal); + stripped = stripped.setScale(scale, RoundingMode.DOWN); + + // Configura il formato italiano con virgola come separatore decimale + DecimalFormatSymbols italianSymbols = new DecimalFormatSymbols(ITALIAN_LOCALE); + italianSymbols.setDecimalSeparator(','); + + // Crea il pattern dinamico basato sul numero di decimali + StringBuilder patternBuilder = new StringBuilder("0"); + if (scale > 0) { + patternBuilder.append("."); + for (int i = 0; i < scale; i++) { + patternBuilder.append("0"); + } + } + + DecimalFormat formatter = new DecimalFormat(patternBuilder.toString(), italianSymbols); + String result = formatter.format(stripped); + + // Se il risultato termina con ',', rimuovilo (per i numeri interi) + if (result.endsWith(",")) { + result = result.substring(0, result.length() - 1); + } + + return result; } public static String decimalToString(float floatValue, int decimal) { - DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Locale.getDefault()); - otherSymbols.setDecimalSeparator('.'); - otherSymbols.setGroupingSeparator(','); - - final DecimalFormat decimalFormat = new DecimalFormat(); - decimalFormat.setMaximumFractionDigits(decimal); - decimalFormat.setDecimalFormatSymbols(otherSymbols); - decimalFormat.setGroupingUsed(false); - decimalFormat.setMinimumFractionDigits(Math.min(2, decimal)); - - return decimalFormat.format(floatValue); + return decimalToString(BigDecimal.valueOf(floatValue), decimal); } - public static DecimalFormat getNumberFormatInstance() { - - if(decimalFormatInstance == null) { - DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Locale.getDefault()); - otherSymbols.setDecimalSeparator('.'); - otherSymbols.setGroupingSeparator(','); - - decimalFormatInstance = new DecimalFormat(); - decimalFormatInstance.setMaximumFractionDigits(CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS); - decimalFormatInstance.setDecimalFormatSymbols(otherSymbols); - decimalFormatInstance.setGroupingUsed(false); + public static BigDecimal parseBigDecimal(String value, Locale locale) { + if (value == null || value.trim().isEmpty()) return null; + try { + DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale); + DecimalFormat format = new DecimalFormat(); + format.setDecimalFormatSymbols(symbols); + format.setParseBigDecimal(true); + return (BigDecimal) format.parse(value); + } catch (Exception e) { + return null; } - - return decimalFormatInstance; } - public static int countNumberOfDecimalDigits(Float value) { - String text = getNumberFormatInstance().format(Math.abs(value)); - int integerPlaces = text.indexOf('.'); - int decimalPlaces = text.length() - integerPlaces - 1; - - return decimalPlaces; - } - - public static String normalizeStringNumber(String numberString) { - return numberString.replaceAll(",", "."); - } - - - - - public static Float decimalToFloat(BigDecimal bigDecimalValue) { - float multiplier = (float) Math.pow(10, CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS); - - Float floatValue = null; - - if(bigDecimalValue != null) { - int intValue = (int) (bigDecimalValue.floatValue() * multiplier); - floatValue = Float.valueOf(intValue / multiplier); - } - - return floatValue; - } - - public static float truncateToDecimal(float v, int i) { - int delta = 10*i; - - return ((int)v*delta)/delta; - + /** + * Parsa una stringa numerica italiana (con virgola come separatore decimale) + * e restituisce un BigDecimal + */ + public static BigDecimal parseItalianBigDecimal(String value) { + return parseBigDecimal(value, ITALIAN_LOCALE); } } diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeFragment.java b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeFragment.java index 2a0eefeb..089dafcd 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeFragment.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeFragment.java @@ -122,7 +122,13 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl BarcodeManager.removeCallback(mBarcodeScannerInstanceID); } }); + mViewModel.init(codJfas); + mViewModel.refreshData(); // This will eventually trigger the LiveData observer for getOrderList + + mBinding.swiperefresh.setOnRefreshListener(() -> { + mViewModel.refreshData(); + }); } @@ -299,8 +305,30 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl @Override public void onDataSaved() { this.onLoadingEnded(); - this.requireActivity().runOnUiThread(() -> { + handler.post(() -> { DialogCommon.showDataSaved(requireActivity(), this::popMe); }); } + + @Override + public void onDataRefreshStarted() { + handler.post(() -> { + mBinding.swiperefresh.setRefreshing(true); + }); + } + + @Override + public void onDataRefreshEnded() { + handler.post(() -> { + mBinding.swiperefresh.setRefreshing(false); + // applyFilters(); // Non strettamente necessario qui se l'observer di getOrderList() fa il suo dovere + }); + } + + @Override + public void onError(Exception ex) { + super.onError(ex); + onDataRefreshEnded(); + } } + diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeModule.java b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeModule.java index 83f5cad7..deb9aa48 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeModule.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeModule.java @@ -1,28 +1,10 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale; import dagger.Module; -import dagger.Provides; -import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer; -import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer; -import it.integry.integrywmsnative.core.rest.consumers.MaterialiRESTConsumer; -import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer; -import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer; -import it.integry.integrywmsnative.gest.prod_recupero_materiale.rest.ProdRecuperoMaterialeRESTConsumer; @Module(subcomponents = ProdRecuperoMaterialeComponent.class) public class ProdRecuperoMaterialeModule { - @Provides - ProdRecuperoMaterialeRESTConsumer providesProdRecuperMaterialeRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) { - return new ProdRecuperoMaterialeRESTConsumer(systemRESTConsumer, articoloRESTConsumer); - } - @Provides - ProdRecuperoMaterialeViewModel providesProdRecuperoMaterialeViewModel(ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer, - ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, - PrinterRESTConsumer printerRESTConsumer, - MaterialiRESTConsumer materialiRESTConsumer) { - return new ProdRecuperoMaterialeViewModel(prodRecuperoMaterialeRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, materialiRESTConsumer); - } } diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java index 67cf8433..3cef2131 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java @@ -3,8 +3,10 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale; import androidx.lifecycle.MutableLiveData; import java.math.BigDecimal; +import java.util.Comparator; import java.util.List; import java.util.Objects; +import java.util.concurrent.ExecutorService; import java.util.stream.Collectors; import javax.inject.Inject; @@ -32,31 +34,46 @@ public class ProdRecuperoMaterialeViewModel { private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer; private final PrinterRESTConsumer mPrinterRESTConsumer; private final MaterialiRESTConsumer mMaterialiRESTConsumer; + private final ExecutorService mExecutorService; private final MutableLiveData> mUlList = new MutableLiveData<>(); private Listener mListener; + private String mCodJfas; + @Inject public ProdRecuperoMaterialeViewModel(ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, - MaterialiRESTConsumer materialiRESTConsumer) { + MaterialiRESTConsumer materialiRESTConsumer, + ExecutorService executorService) { this.mProdRecuperoMaterialeRESTConsumer = prodRecuperoMaterialeRESTConsumer; this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer; this.mPrinterRESTConsumer = printerRESTConsumer; this.mMaterialiRESTConsumer = materialiRESTConsumer; + this.mExecutorService = executorService; } public void init(String codJfas) { - this.sendOnLoadingStarted(); + this.mCodJfas = codJfas; + } - mProdRecuperoMaterialeRESTConsumer.loadLastULVersate(codJfas, ulList -> { - this.mUlList.postValue(ulList); + public void refreshData() { + this.sendOnDataRefreshStarted(); - this.sendOnLoadingEnded(); - }, this::sendError); + this.mExecutorService.execute(() -> { + try { + List lastUlVersate = mProdRecuperoMaterialeRESTConsumer.loadLastULVersateSynchronized(mCodJfas); + lastUlVersate.sort(Comparator.comparing(HistoryVersamentoProdULDTO::getCodJfas)); + + this.mUlList.postValue(lastUlVersate); + this.sendOnDataRefreshEnded(); + } catch (Exception e) { + this.sendError(e); + } + }); } public void processBarcodeDTO(BarcodeScanDTO data) { @@ -204,6 +221,14 @@ public class ProdRecuperoMaterialeViewModel { return this; } + private void sendOnDataRefreshStarted() { + if (this.mListener != null) mListener.onDataRefreshStarted(); + } + + private void sendOnDataRefreshEnded() { + if (this.mListener != null) mListener.onDataRefreshEnded(); + } + private void sendOnLoadingStarted() { if (this.mListener != null) mListener.onLoadingStarted(); } @@ -274,6 +299,10 @@ public class ProdRecuperoMaterialeViewModel { void onNoLUFound(Runnable onComplete); void onDataSaved(); + + void onDataRefreshStarted(); + + void onDataRefreshEnded(); } } diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/rest/ProdRecuperoMaterialeRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/rest/ProdRecuperoMaterialeRESTConsumer.java index 394459d9..faaa25c1 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/rest/ProdRecuperoMaterialeRESTConsumer.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/rest/ProdRecuperoMaterialeRESTConsumer.java @@ -1,310 +1,432 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.rest; -import com.annimon.stream.Stream; -import com.google.gson.reflect.TypeToken; +import androidx.annotation.NonNull; -import java.lang.reflect.Type; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; +import javax.inject.Inject; import javax.inject.Singleton; -import it.integry.integrywmsnative.core.expansion.RunnableArgs; import it.integry.integrywmsnative.core.model.MtbAart; import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer; -import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer; +import it.integry.integrywmsnative.core.rest.consumers.MaterialiRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer; -import it.integry.integrywmsnative.core.settings.SettingsManager; -import it.integry.integrywmsnative.core.utility.UtilityDB; -import it.integry.integrywmsnative.core.utility.UtilityString; import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO; import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO; @Singleton public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer { - private final SystemRESTConsumer mSystemRESTConsumer; private final ArticoloRESTConsumer mArticoloRESTConsumer; + private final MaterialiRESTConsumer mMaterialiRESTConsumer; - public ProdRecuperoMaterialeRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) { - this.mSystemRESTConsumer = systemRESTConsumer; + @Inject + public ProdRecuperoMaterialeRESTConsumer(ArticoloRESTConsumer articoloRESTConsumer, MaterialiRESTConsumer materialiRESTConsumer) { + this.mMaterialiRESTConsumer = materialiRESTConsumer; this.mArticoloRESTConsumer = articoloRESTConsumer; } - public void loadLastULVersate(RunnableArgs> onComplete, RunnableArgs onFailed) { - loadLastULVersate(null, onComplete, onFailed); + public List loadLastULVersateSynchronized() throws Exception { + return loadLastULVersateSynchronized(null); } - public void loadLastULVersate(String codJfas, RunnableArgs> onComplete, RunnableArgs onFailed) { + public @NonNull List loadLastULVersateSynchronized(String codJfas) throws Exception { + var ulList = mMaterialiRESTConsumer.makeSynchronousRetrieveLastVersamentiRequest(codJfas); - String sql = "WITH ul_list AS ( " + - " SELECT jtb_fasi.cod_jfas, " + - " jtb_fasi.descrizione AS descrizione_fase, " + - " mtb_colr.gestione, " + - " mtb_colr.data_collo, " + - " mtb_colr.num_collo, " + - " mtb_colr.ser_collo, " + - " mtb_colr.cod_mart, " + - " mtb_colr.cod_col, " + - " mtb_colr.cod_tagl, " + - " SUM(mtb_colr.qta_col) AS qta_col, " + - " mtb_colr.qta_cnf AS qta_cnf, " + - " SUM(mtb_colr.num_cnf) AS num_cnf, " + - " mtb_colr.partita_mag, " + - " mtb_colr.cod_jcom, " + - " mtb_colr.num_collo_rif, " + - " mtb_colr.data_collo_rif, " + - " mtb_colr.ser_collo_rif, " + - " mtb_colr.gestione_rif, " + - " mtb_colt.segno, " + - " ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " + - " mtb_aart.unt_mis, " + - " MAX(datetime_row) AS datetime_row, " + - " mtb_colr.num_ord, " + - " mtb_colr.data_ord, " + - " mtb_colr.gestione as gestione_ord, " + - " mtb_colr.riga_ord, " + - " dtb_ord_steps.hr_num as hr, " + - " CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " + - " SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " + - " SUM(CASE WHEN dtb_ord_steps.hr_num > 0 then dtb_ord_steps.hr_num else 1 end) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " + - " 0) as percentage_hr " + - " FROM mtb_colr " + - " INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " + - " AND mtb_colr.data_collo = mtb_colt.data_collo " + - " AND mtb_colr.ser_collo = mtb_colt.ser_collo " + - " AND mtb_colr.gestione = mtb_colt.gestione " + - " " + (SettingsManager.iDB().isFlagVersamentoDirettoProduzione() ? "INNER" : "LEFT OUTER") + " join dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " + - " AND dtb_ord_steps.gestione = mtb_colr.gestione " + - " AND dtb_ord_steps.num_ord = mtb_colr.num_ord " + - " AND dtb_ord_steps.data_iniz is not null " + - " AND dtb_ord_steps.data_fine is null " + - " INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " + - " LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " + - " WHERE jtb_fasi.cod_jfas IS NOT NULL " + - (UtilityString.isNullOrEmpty(codJfas) ? "" : " AND jtb_fasi.cod_jfas = " + UtilityDB.valueToString(codJfas)) + - " AND segno = -1 " + - " AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " + - " GROUP BY jtb_fasi.cod_jfas, " + - " jtb_fasi.descrizione, " + - " mtb_colr.gestione, " + - " mtb_colr.data_collo, " + - " mtb_colr.num_collo, " + - " mtb_colr.ser_collo, " + - " mtb_colr.qta_cnf, " + - " mtb_colr.cod_mart, " + - " mtb_colr.cod_col, " + - " mtb_colr.cod_tagl, " + - " mtb_colr.ser_collo, " + - " mtb_colr.partita_mag, " + - " mtb_colr.cod_jcom, " + - " mtb_aart.descrizione_estesa, " + - " mtb_aart.descrizione, " + - " mtb_aart.unt_mis, " + - " mtb_colr.num_collo_rif, " + - " mtb_colr.data_collo_rif, " + - " mtb_colr.ser_collo_rif, " + - " mtb_colr.gestione_rif, " + - " mtb_colt.segno, " + - " mtb_colr.num_ord, " + - " mtb_colr.data_ord, " + - " mtb_colr.gestione, " + - " mtb_colr.riga_ord, " + - " dtb_ord_steps.hr_num " + - " HAVING SUM(mtb_colr.qta_col) > 0 " + - "), max_ul AS ( " + - " SELECT " + - " cod_jfas, " + - " descrizione_fase, " + - " gestione, " + - " cod_mart, " + - " cod_col, " + - " cod_tagl, " + - " ser_collo, " + - " partita_mag, " + - " cod_jcom, " + - " descrizione_art, " + - " unt_mis, " + - " num_collo_rif, " + - " data_collo_rif, " + - " ser_collo_rif, " + - " gestione_rif, " + - " segno, " + - " num_ord, " + - " data_ord, " + - " gestione_ord, " + - " riga_ord, " + - " hr, " + - " MAX (datetime_row) as max_datetime_row " + - " FROM ul_list " + - " GROUP BY cod_jfas, " + - " descrizione_fase, " + - " gestione, " + - " cod_mart, " + - " cod_col, " + - " cod_tagl, " + - " ser_collo, " + - " partita_mag, " + - " cod_jcom, " + - " descrizione_art, " + - " unt_mis, " + - " num_collo_rif, " + - " data_collo_rif, " + - " ser_collo_rif, " + - " gestione_rif, " + - " segno, " + - " num_ord, " + - " data_ord, " + - " gestione_ord, " + - " riga_ord, " + - " hr " + - ") " + - " " + - "SELECT ul_list.* FROM max_ul " + - "LEFT OUTER JOIN ul_list ON " + - " ISNULL(max_ul.cod_jfas, '') = ISNULL(ul_list.cod_jfas, '') AND " + - " ISNULL(max_ul.descrizione_fase, '') = ISNULL(ul_list.descrizione_fase, '') AND " + - " ISNULL(max_ul.gestione, '') = ISNULL(ul_list.gestione, '') AND " + - " ISNULL(max_ul.cod_mart, '') = ISNULL(ul_list.cod_mart, '') AND " + - " ISNULL(max_ul.cod_col, '') = ISNULL(ul_list.cod_col, '') AND " + - " ISNULL(max_ul.cod_tagl, '') = ISNULL(ul_list.cod_tagl, '') AND " + - " ISNULL(max_ul.ser_collo, '') = ISNULL(ul_list.ser_collo, '') AND " + - " ISNULL(max_ul.partita_mag, '') = ISNULL(ul_list.partita_mag, '') AND " + - " ISNULL(max_ul.cod_jcom, '') = ISNULL(ul_list.cod_jcom, '') AND " + - " ISNULL(max_ul.descrizione_art, '') = ISNULL(ul_list.descrizione_art, '') AND " + - " ISNULL(max_ul.unt_mis, '') = ISNULL(ul_list.unt_mis, '') AND " + - " ISNULL(max_ul.num_collo_rif, '') = ISNULL(ul_list.num_collo_rif, '') AND " + - " ISNULL(max_ul.data_collo_rif, '') = ISNULL(ul_list.data_collo_rif, '') AND " + - " ISNULL(max_ul.ser_collo_rif, '') = ISNULL(ul_list.ser_collo_rif, '') AND " + - " ISNULL(max_ul.gestione_rif, '') = ISNULL(ul_list.gestione_rif, '') AND " + - " ISNULL(max_ul.segno, '') = ISNULL(ul_list.segno, '') AND " + - " ISNULL(max_ul.num_ord, '') = ISNULL(ul_list.num_ord, '') AND " + - " ISNULL(max_ul.data_ord, '') = ISNULL(ul_list.data_ord, '') AND " + - " ISNULL(max_ul.gestione_ord, '') = ISNULL(ul_list.gestione_ord, '') AND " + - " ISNULL(max_ul.riga_ord, '') = ISNULL(ul_list.riga_ord, '') AND " + - " ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " + - " max_ul.max_datetime_row = ul_list.datetime_row"; + if (ulList == null) { + return new ArrayList<>(); + } - Type typeOfObjectsList = new TypeToken>() { - }.getType(); - this.mSystemRESTConsumer.>processSql(sql, typeOfObjectsList, ulList -> { + List newUlList = new ArrayList<>(); - if (ulList == null) { - onComplete.run(null); - return; + Map, List> ulListGrouped = ulList.stream() + .collect(Collectors.groupingBy(x -> { + var keyMap = new HashMap(); + keyMap.put("gestione", x.getGestione()); + keyMap.put("data_collo", x.getDataCollo()); + keyMap.put("ser_collo", x.getSerCollo()); + keyMap.put("num_collo", x.getNumCollo()); + keyMap.put("cod_mart", x.getCodMart()); + keyMap.put("partita_mag", x.getPartitaMag()); + keyMap.put("gestione_rif", x.getGestioneRif()); + keyMap.put("data_collo_rif", x.getDataColloRif()); + keyMap.put("ser_collo_rif", x.getSerColloRif()); + keyMap.put("num_collo_rif", x.getNumColloRif()); + return keyMap; + }, Collectors.toList())); + + for (HashMap ulKey : ulListGrouped.keySet()) { + var matchingUls = ulList.stream().filter(x -> + Objects.equals(x.getGestione(), ulKey.get("gestione")) && + Objects.equals(x.getDataCollo(), ulKey.get("data_collo")) && + Objects.equals(x.getSerCollo(), ulKey.get("ser_collo")) && + Objects.equals(x.getNumCollo(), ulKey.get("num_collo")) && + Objects.equals(x.getCodMart(), ulKey.get("cod_mart")) && + Objects.equals(x.getPartitaMag(), ulKey.get("partita_mag")) && + Objects.equals(x.getGestioneRif(), ulKey.get("gestione_rif")) && + Objects.equals(x.getDataColloRif(), ulKey.get("data_collo_rif")) && + Objects.equals(x.getSerColloRif(), ulKey.get("ser_collo_rif")) && + Objects.equals(x.getNumColloRif(), ulKey.get("num_collo_rif")) + ).collect(Collectors.toUnmodifiableList()); + + ulKey.put("qta_col", matchingUls.stream().map(HistoryVersamentoProdULRestDTO::getQtaCol) + .reduce(BigDecimal.ZERO, BigDecimal::add)); + ulKey.put("num_cnf", matchingUls.stream().map(HistoryVersamentoProdULRestDTO::getNumCnf) + .reduce(BigDecimal.ZERO, BigDecimal::add)); + } + + ulListGrouped.forEach((key, value) -> { + + var listaOrdini = value.stream() + .filter(x -> x.getDataOrd() != null && + x.getGestioneOrd() != null && + x.getNumOrd() != null) + .map(x -> new HistoryVersamentoProdULDTO.OrdineDto() + .setData(x.getDataOrd()) + .setNumero(x.getNumOrd()) + .setGestione(x.getGestione()) + .setRigaOrd(x.getRigaOrd()) + .setQtaCol(x.getQtaCol()) + .setNumCnf(x.getNumCnf()) + .setPercentageHr(x.getPercentageHr())) + .distinct() + .collect(Collectors.toUnmodifiableList()); + + var restData = value.get(0); + var qtaCol = (BigDecimal) key.get("qta_col"); + var numCnf = (BigDecimal) key.get("num_cnf"); + + newUlList.add(new HistoryVersamentoProdULDTO() + .setGestione(restData.getGestione()) + .setDataCollo(restData.getDataCollo()) + .setSerCollo(restData.getSerCollo()) + .setNumCollo(restData.getNumCollo()) + .setSegno(restData.getSegno()) + .setCodMart(restData.getCodMart()) + .setCodCol(restData.getCodCol()) + .setCodTagl(restData.getCodTagl()) + .setCodJfas(restData.getCodJfas()) + .setDescrizioneArt(restData.getDescrizioneArt()) + .setDescrizioneFase(restData.getDescrizioneFase()) + .setQtaCol(qtaCol) + .setQtaCnf(restData.getQtaCnf()) + .setNumCnf(numCnf) + .setPartitaMag(restData.getPartitaMag()) + .setCodJcom(restData.getCodJcom()) + .setDatetimeRow(restData.getDatetimeRow()) + .setUntMis(restData.getUntMis()) + .setGestioneRif(restData.getGestioneRif()) + .setDataColloRif(restData.getDataColloRif()) + .setSerColloRif(restData.getSerColloRif()) + .setNumColloRif(restData.getNumColloRif()) + .setOrdini(listaOrdini)); + + }); + + + if (!newUlList.isEmpty()) { + List codMarts = newUlList.stream() + .map(HistoryVersamentoProdULDTO::getCodMart) + .filter(Objects::nonNull) + .distinct() + .collect(Collectors.toUnmodifiableList()); + + var arts = this.mArticoloRESTConsumer.getByCodMartsSynchronized(codMarts); + + if (arts != null && !arts.isEmpty()) { + for (HistoryVersamentoProdULDTO value : newUlList) { + + MtbAart foundMtbAart = arts.stream() + .filter(x -> x.getCodMart().equalsIgnoreCase(value.getCodMart())) + .findFirst() + .orElse(null); + + value.setMtbAart(foundMtbAart); + } } - List newUlList = new ArrayList<>(); + return newUlList; - Stream.of(ulList) - .distinctBy(x -> { - HashMap hashMap = new HashMap<>(); - hashMap.put("gestione", x.getGestione()); - hashMap.put("data_collo", x.getDataCollo()); - hashMap.put("ser_collo", x.getSerCollo()); - hashMap.put("num_collo", x.getNumCollo()); - hashMap.put("cod_mart", x.getCodMart()); - hashMap.put("gestione_rif", x.getGestioneRif()); - hashMap.put("data_collo_rif", x.getDataColloRif()); - hashMap.put("ser_collo_rif", x.getSerColloRif()); - hashMap.put("num_collo_rif", x.getNumColloRif()); - return hashMap; - }) - .forEach(restDTO -> { + } else { + return newUlList; + } + } - List ordineList = ulList.stream() - .filter(x -> x.getNumCollo().equals(restDTO.getNumCollo()) && - x.getDataCollo().equals(restDTO.getDataCollo()) && - x.getSerCollo().equals(restDTO.getSerCollo()) && - x.getGestione().equals(restDTO.getGestione()) && - (x.getRigaOrd() == null || Objects.equals(x.getRigaOrd(), restDTO.getRigaOrd()))) - .map(x -> new HistoryVersamentoProdULDTO.OrdineDto() - .setData(x.getDataOrd()) - .setNumero(x.getNumOrd()) - .setGestione(x.getGestione()) - .setRigaOrd(x.getRigaOrd()) - .setQtaCol(x.getQtaCol()) - .setNumCnf(x.getNumCnf()) - .setPercentageHr(x.getPercentageHr())) - .collect(Collectors.toList()); -// BigDecimal qtaColTot = BigDecimal.ZERO; -// BigDecimal numCnfColTot = BigDecimal.ZERO; +// public void loadLastULVersate(String codJfas, RunnableArgs> onComplete, RunnableArgs onFailed) { // -// for (HistoryVersamentoProdULDTO.OrdineDto ordine : -// ordineList) { -// qtaColTot = qtaColTot.add(ordine.getQtaCol()); -// numCnfColTot = numCnfColTot.add(ordine.getNumCnf()); +// String sql = "WITH ul_list AS ( " + +// " SELECT jtb_fasi.cod_jfas, " + +// " jtb_fasi.descrizione AS descrizione_fase, " + +// " mtb_colr.gestione, " + +// " mtb_colr.data_collo, " + +// " mtb_colr.num_collo, " + +// " mtb_colr.ser_collo, " + +// " mtb_colr.cod_mart, " + +// " mtb_colr.cod_col, " + +// " mtb_colr.cod_tagl, " + +// " SUM(mtb_colr.qta_col) AS qta_col, " + +// " mtb_colr.qta_cnf AS qta_cnf, " + +// " SUM(mtb_colr.num_cnf) AS num_cnf, " + +// " mtb_colr.partita_mag, " + +// " mtb_colr.cod_jcom, " + +// " mtb_colr.num_collo_rif, " + +// " mtb_colr.data_collo_rif, " + +// " mtb_colr.ser_collo_rif, " + +// " mtb_colr.gestione_rif, " + +// " mtb_colt.segno, " + +// " ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " + +// " mtb_aart.unt_mis, " + +// " MAX(datetime_row) AS datetime_row, " + +// " mtb_colr.num_ord, " + +// " mtb_colr.data_ord, " + +// " mtb_colr.gestione as gestione_ord, " + +// " mtb_colr.riga_ord, " + +// " dtb_ord_steps.hr_num as hr, " + +// " CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " + +// " SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)), " + +// " SUM(CASE WHEN dtb_ord_steps.hr_num > 0 then dtb_ord_steps.hr_num else 1 end) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " + +// " 0) as percentage_hr " + +// " FROM mtb_colr " + +// " INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " + +// " AND mtb_colr.data_collo = mtb_colt.data_collo " + +// " AND mtb_colr.ser_collo = mtb_colt.ser_collo " + +// " AND mtb_colr.gestione = mtb_colt.gestione " + +// " " + (SettingsManager.iDB().isFlagVersamentoDirettoProduzione() ? "INNER" : "LEFT OUTER") + " join dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " + +// " AND dtb_ord_steps.gestione = mtb_colr.gestione " + +// " AND dtb_ord_steps.num_ord = mtb_colr.num_ord " + +// " AND dtb_ord_steps.data_iniz is not null " + +// " AND dtb_ord_steps.data_fine is null " + +// " INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " + +// " LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " + +// " WHERE jtb_fasi.cod_jfas IS NOT NULL " + +// (UtilityString.isNullOrEmpty(codJfas) ? "" : " AND jtb_fasi.cod_jfas = " + UtilityDB.valueToString(codJfas)) + +// " AND segno = -1 " + +// " AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " + +// " GROUP BY jtb_fasi.cod_jfas, " + +// " jtb_fasi.descrizione, " + +// " mtb_colr.gestione, " + +// " mtb_colr.data_collo, " + +// " mtb_colr.num_collo, " + +// " mtb_colr.ser_collo, " + +// " mtb_colr.qta_cnf, " + +// " mtb_colr.cod_mart, " + +// " mtb_colr.cod_col, " + +// " mtb_colr.cod_tagl, " + +// " mtb_colr.ser_collo, " + +// " mtb_colr.partita_mag, " + +// " mtb_colr.cod_jcom, " + +// " mtb_aart.descrizione_estesa, " + +// " mtb_aart.descrizione, " + +// " mtb_aart.unt_mis, " + +// " mtb_colr.num_collo_rif, " + +// " mtb_colr.data_collo_rif, " + +// " mtb_colr.ser_collo_rif, " + +// " mtb_colr.gestione_rif, " + +// " mtb_colt.segno, " + +// " mtb_colr.num_ord, " + +// " mtb_colr.data_ord, " + +// " mtb_colr.gestione, " + +// " mtb_colr.riga_ord, " + +// " dtb_ord_steps.hr_num " + +// " HAVING SUM(mtb_colr.qta_col) > 0 " + +// "), max_ul AS ( " + +// " SELECT " + +// " cod_jfas, " + +// " descrizione_fase, " + +// " gestione, " + +// " cod_mart, " + +// " cod_col, " + +// " cod_tagl, " + +// " ser_collo, " + +// " partita_mag, " + +// " cod_jcom, " + +// " descrizione_art, " + +// " unt_mis, " + +// " num_collo_rif, " + +// " data_collo_rif, " + +// " ser_collo_rif, " + +// " gestione_rif, " + +// " segno, " + +// " num_ord, " + +// " data_ord, " + +// " gestione_ord, " + +// " riga_ord, " + +// " hr, " + +// " MAX (datetime_row) as max_datetime_row " + +// " FROM ul_list " + +// " GROUP BY cod_jfas, " + +// " descrizione_fase, " + +// " gestione, " + +// " cod_mart, " + +// " cod_col, " + +// " cod_tagl, " + +// " ser_collo, " + +// " partita_mag, " + +// " cod_jcom, " + +// " descrizione_art, " + +// " unt_mis, " + +// " num_collo_rif, " + +// " data_collo_rif, " + +// " ser_collo_rif, " + +// " gestione_rif, " + +// " segno, " + +// " num_ord, " + +// " data_ord, " + +// " gestione_ord, " + +// " riga_ord, " + +// " hr " + +// ") " + +// " " + +// "SELECT ul_list.* FROM max_ul " + +// "LEFT OUTER JOIN ul_list ON " + +// " ISNULL(max_ul.cod_jfas, '') = ISNULL(ul_list.cod_jfas, '') AND " + +// " ISNULL(max_ul.descrizione_fase, '') = ISNULL(ul_list.descrizione_fase, '') AND " + +// " ISNULL(max_ul.gestione, '') = ISNULL(ul_list.gestione, '') AND " + +// " ISNULL(max_ul.cod_mart, '') = ISNULL(ul_list.cod_mart, '') AND " + +// " ISNULL(max_ul.cod_col, '') = ISNULL(ul_list.cod_col, '') AND " + +// " ISNULL(max_ul.cod_tagl, '') = ISNULL(ul_list.cod_tagl, '') AND " + +// " ISNULL(max_ul.ser_collo, '') = ISNULL(ul_list.ser_collo, '') AND " + +// " ISNULL(max_ul.partita_mag, '') = ISNULL(ul_list.partita_mag, '') AND " + +// " ISNULL(max_ul.cod_jcom, '') = ISNULL(ul_list.cod_jcom, '') AND " + +// " ISNULL(max_ul.descrizione_art, '') = ISNULL(ul_list.descrizione_art, '') AND " + +// " ISNULL(max_ul.unt_mis, '') = ISNULL(ul_list.unt_mis, '') AND " + +// " ISNULL(max_ul.num_collo_rif, '') = ISNULL(ul_list.num_collo_rif, '') AND " + +// " ISNULL(max_ul.data_collo_rif, '') = ISNULL(ul_list.data_collo_rif, '') AND " + +// " ISNULL(max_ul.ser_collo_rif, '') = ISNULL(ul_list.ser_collo_rif, '') AND " + +// " ISNULL(max_ul.gestione_rif, '') = ISNULL(ul_list.gestione_rif, '') AND " + +// " ISNULL(max_ul.segno, '') = ISNULL(ul_list.segno, '') AND " + +// " ISNULL(max_ul.num_ord, '') = ISNULL(ul_list.num_ord, '') AND " + +// " ISNULL(max_ul.data_ord, '') = ISNULL(ul_list.data_ord, '') AND " + +// " ISNULL(max_ul.gestione_ord, '') = ISNULL(ul_list.gestione_ord, '') AND " + +// " ISNULL(max_ul.riga_ord, '') = ISNULL(ul_list.riga_ord, '') AND " + +// " ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " + +// " max_ul.max_datetime_row = ul_list.datetime_row"; +// +// Type typeOfObjectsList = new TypeToken>() { +// }.getType(); +// this.mSystemRESTConsumer.>processSql(sql, typeOfObjectsList, ulList -> { +// +// if (ulList == null) { +// onComplete.run(null); +// return; +// } +// +// List newUlList = new ArrayList<>(); +// +// Stream.of(ulList) +// .distinctBy(x -> { +// HashMap hashMap = new HashMap<>(); +// hashMap.put("gestione", x.getGestione()); +// hashMap.put("data_collo", x.getDataCollo()); +// hashMap.put("ser_collo", x.getSerCollo()); +// hashMap.put("num_collo", x.getNumCollo()); +// hashMap.put("cod_mart", x.getCodMart()); +// hashMap.put("gestione_rif", x.getGestioneRif()); +// hashMap.put("data_collo_rif", x.getDataColloRif()); +// hashMap.put("ser_collo_rif", x.getSerColloRif()); +// hashMap.put("num_collo_rif", x.getNumColloRif()); +// +// return hashMap; +// }) +// .forEach(restDTO -> { +// +// List ordineList = ulList.stream() +// .filter(x -> x.getNumCollo().equals(restDTO.getNumCollo()) && +// x.getDataCollo().equals(restDTO.getDataCollo()) && +// x.getSerCollo().equals(restDTO.getSerCollo()) && +// x.getGestione().equals(restDTO.getGestione()) && +// (x.getRigaOrd() == null || Objects.equals(x.getRigaOrd(), restDTO.getRigaOrd()))) +// .map(x -> new HistoryVersamentoProdULDTO.OrdineDto() +// .setData(x.getDataOrd()) +// .setNumero(x.getNumOrd()) +// .setGestione(x.getGestione()) +// .setRigaOrd(x.getRigaOrd()) +// .setQtaCol(x.getQtaCol()) +// .setNumCnf(x.getNumCnf()) +// .setPercentageHr(x.getPercentageHr())) +// .collect(Collectors.toList()); +// +//// BigDecimal qtaColTot = BigDecimal.ZERO; +//// BigDecimal numCnfColTot = BigDecimal.ZERO; +//// +//// for (HistoryVersamentoProdULDTO.OrdineDto ordine : +//// ordineList) { +//// qtaColTot = qtaColTot.add(ordine.getQtaCol()); +//// numCnfColTot = numCnfColTot.add(ordine.getNumCnf()); +//// } +// +// newUlList.add(new HistoryVersamentoProdULDTO() +// .setGestione(restDTO.getGestione()) +// .setDataCollo(restDTO.getDataCollo()) +// .setSerCollo(restDTO.getSerCollo()) +// .setNumCollo(restDTO.getNumCollo()) +// .setSegno(restDTO.getSegno()) +// .setCodMart(restDTO.getCodMart()) +// .setCodCol(restDTO.getCodCol()) +// .setCodTagl(restDTO.getCodTagl()) +// .setCodJfas(restDTO.getCodJfas()) +// .setDescrizioneArt(restDTO.getDescrizioneArt()) +// .setDescrizioneFase(restDTO.getDescrizioneFase()) +// .setQtaCol(restDTO.getQtaCol()) +// .setQtaCnf(restDTO.getQtaCnf()) +// .setNumCnf(restDTO.getNumCnf()) +// .setPartitaMag(restDTO.getPartitaMag()) +// .setCodJcom(restDTO.getCodJcom()) +// .setDatetimeRow(restDTO.getDatetimeRow()) +// .setUntMis(restDTO.getUntMis()) +// .setGestioneRif(restDTO.getGestioneRif()) +// .setDataColloRif(restDTO.getDataColloRif()) +// .setSerColloRif(restDTO.getSerColloRif()) +// .setNumColloRif(restDTO.getNumColloRif()) +// .setOrdini(ordineList)); +// +// }); +// +// +// if (!newUlList.isEmpty()) { +// List codMarts = Stream.of(newUlList) +// .map(HistoryVersamentoProdULDTO::getCodMart) +// .withoutNulls() +// .distinct() +// .toList(); +// +// this.mArticoloRESTConsumer.getByCodMarts(codMarts, arts -> { +// +// if (arts != null && !arts.isEmpty()) { +// for (HistoryVersamentoProdULDTO value : newUlList) { +// +// MtbAart foundMtbAart = null; +// +// List mtbAartStream = Stream.of(arts) +// .filter(x -> x.getCodMart().equalsIgnoreCase(value.getCodMart())).toList(); +// +// if (mtbAartStream != null && !mtbAartStream.isEmpty()) { +// foundMtbAart = mtbAartStream.get(0); +// } +// +// value.setMtbAart(foundMtbAart); // } - - newUlList.add(new HistoryVersamentoProdULDTO() - .setGestione(restDTO.getGestione()) - .setDataCollo(restDTO.getDataCollo()) - .setSerCollo(restDTO.getSerCollo()) - .setNumCollo(restDTO.getNumCollo()) - .setSegno(restDTO.getSegno()) - .setCodMart(restDTO.getCodMart()) - .setCodCol(restDTO.getCodCol()) - .setCodTagl(restDTO.getCodTagl()) - .setCodJfas(restDTO.getCodJfas()) - .setDescrizioneArt(restDTO.getDescrizioneArt()) - .setDescrizioneFase(restDTO.getDescrizioneFase()) - .setQtaCol(restDTO.getQtaCol()) - .setQtaCnf(restDTO.getQtaCnf()) - .setNumCnf(restDTO.getNumCnf()) - .setPartitaMag(restDTO.getPartitaMag()) - .setCodJcom(restDTO.getCodJcom()) - .setDatetimeRow(restDTO.getDatetimeRow()) - .setUntMis(restDTO.getUntMis()) - .setGestioneRif(restDTO.getGestioneRif()) - .setDataColloRif(restDTO.getDataColloRif()) - .setSerColloRif(restDTO.getSerColloRif()) - .setNumColloRif(restDTO.getNumColloRif()) - .setOrdini(ordineList)); - - }); - - - if (!newUlList.isEmpty()) { - List codMarts = Stream.of(newUlList) - .map(HistoryVersamentoProdULDTO::getCodMart) - .withoutNulls() - .distinct() - .toList(); - - this.mArticoloRESTConsumer.getByCodMarts(codMarts, arts -> { - - if (arts != null && !arts.isEmpty()) { - for (HistoryVersamentoProdULDTO value : newUlList) { - - MtbAart foundMtbAart = null; - - List mtbAartStream = Stream.of(arts) - .filter(x -> x.getCodMart().equalsIgnoreCase(value.getCodMart())).toList(); - - if (mtbAartStream != null && !mtbAartStream.isEmpty()) { - foundMtbAart = mtbAartStream.get(0); - } - - value.setMtbAart(foundMtbAart); - } - } - - onComplete.run(newUlList); - - }, onFailed); - - } else { - onComplete.run(newUlList); - } - - }, onFailed); - } +// } +// +// onComplete.run(newUlList); +// +// }, onFailed); +// +// } else { +// onComplete.run(newUlList); +// } +// +// }, onFailed); +// } } diff --git a/app/src/main/res/layout/fragment_prod_recupero_materiale.xml b/app/src/main/res/layout/fragment_prod_recupero_materiale.xml index 1dce94ef..be293fda 100644 --- a/app/src/main/res/layout/fragment_prod_recupero_materiale.xml +++ b/app/src/main/res/layout/fragment_prod_recupero_materiale.xml @@ -18,13 +18,23 @@ tools:context=".gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment"> - + android:layout_alignParentBottom="true" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> + + + + Date: Wed, 17 Sep 2025 15:22:40 +0200 Subject: [PATCH 07/28] -> v1.47.18 (531) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9e1845f1..bac2e054 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services' android { - def appVersionCode = 530 - def appVersionName = '1.47.17' + def appVersionCode = 531 + def appVersionName = '1.47.18' signingConfigs { release { From 6bd1e62190be904aee6291102909323373035068 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Thu, 18 Sep 2025 17:43:44 +0200 Subject: [PATCH 08/28] Fix errori multipli quando il menu non viene caricato --- .../integrywmsnative/gest/main/MainFragment.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/main/MainFragment.java b/app/src/main/java/it/integry/integrywmsnative/gest/main/MainFragment.java index e31fdc8f..368311fa 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/main/MainFragment.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/main/MainFragment.java @@ -284,8 +284,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab MenuConfiguration baseMenuConfiguration = new MenuConfiguration(); List menuGroups = baseMenuConfiguration.getGroups(); - for (int i = 0; i < menuGroups.size(); i++) { - try { + try { + for (int i = 0; i < menuGroups.size(); i++) { BaseMenuConfiguration.MenuGroup menuGroup = menuGroups.get(i); @@ -313,16 +313,12 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab menuListAdapter.setClickListener(this::onMenuClick); mBindings.menuContainer.addView(groupBinding.getRoot()); - - } - - - } catch (Exception exception) { - UtilityExceptions.defaultException(requireActivity(), exception); } - } + } catch (Exception exception) { + UtilityExceptions.defaultException(requireActivity(), exception); + } } private void onMenuClick(MenuConfiguration.MenuItem menuItem) { From 4f134bfc8eeb632e240e67ab45696bd3486a2e7f Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 23 Sep 2025 18:02:52 +0200 Subject: [PATCH 09/28] -> v1.47.19 (532) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bac2e054..cf086d8a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services' android { - def appVersionCode = 531 - def appVersionName = '1.47.18' + def appVersionCode = 532 + def appVersionName = '1.47.19' signingConfigs { release { From 64fcb7ccc8c1722ec0e0d0a440a453089b6a8d2d Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 30 Sep 2025 17:42:47 +0200 Subject: [PATCH 10/28] Fix tara pedana nulla in Bottom Sheet Fragment --- .../BottomSheetFragmentLUContentViewModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/view/bottom_sheet__lu_content/BottomSheetFragmentLUContentViewModel.java b/app/src/main/java/it/integry/integrywmsnative/view/bottom_sheet__lu_content/BottomSheetFragmentLUContentViewModel.java index 03a1608f..4f35bb6d 100644 --- a/app/src/main/java/it/integry/integrywmsnative/view/bottom_sheet__lu_content/BottomSheetFragmentLUContentViewModel.java +++ b/app/src/main/java/it/integry/integrywmsnative/view/bottom_sheet__lu_content/BottomSheetFragmentLUContentViewModel.java @@ -44,7 +44,7 @@ public class BottomSheetFragmentLUContentViewModel { if (collo == null) return; ObservableMtbTcol tipoPedana = collo.getMtbTCol(); - BigDecimal taraPedana = tipoPedana != null ? tipoPedana.getTaraKg() : BigDecimal.ZERO; + BigDecimal taraPedana = tipoPedana != null && tipoPedana.getTaraKg() != null ? tipoPedana.getTaraKg() : BigDecimal.ZERO; BigDecimal pesoNetto = BigDecimal.ZERO; for (MtbColr mtbColr : collo.getMtbColr()) { From 62adf491572b243e897425115750601da4a3f272 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Tue, 30 Sep 2025 17:44:34 +0200 Subject: [PATCH 11/28] -> v1.47.20 (533) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cf086d8a..f532c2f4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services' android { - def appVersionCode = 532 - def appVersionName = '1.47.19' + def appVersionCode = 533 + def appVersionName = '1.47.20' signingConfigs { release { From c16f5c17475f3ab2d9af8b4d88ffc713904de8ae Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Wed, 1 Oct 2025 12:50:02 +0200 Subject: [PATCH 12/28] Aggiornato style di alcune textbox --- .../layout-land-hdpi/dialog_input_lu_prod.xml | 2 +- .../dialog_input_quantity_v2.xml | 34 ++++----- ...agment_prod_rientro_merce_order_detail.xml | 70 +++++++++---------- ...ne_bolla_picking_main_list__group_item.xml | 16 ++--- .../accettazione_main_list_group_clienti.xml | 4 +- .../accettazione_main_list_group_model.xml | 2 +- ...e_ordine_inevaso_main_list__group_item.xml | 14 ++-- .../res/layout/activity_contenuto_bancale.xml | 18 ++--- app/src/main/res/layout/activity_main.xml | 2 - ...activity_picking_inventario__list_item.xml | 6 +- .../main/res/layout/activity_picking_resi.xml | 2 +- .../layout/activity_prod_dettaglio_linea.xml | 2 +- .../activity_pv_ordine_acquisto_edit.xml | 12 ++-- .../main/res/layout/activity_spedizione.xml | 2 +- app/src/main/res/layout/activity_splash.xml | 4 +- .../bottom_sheet__inventario_actions_view.xml | 10 +-- ...tom_sheet__inventario_row_actions_view.xml | 14 ++-- .../layout/bottom_sheet__item_edit_view.xml | 14 ++-- .../layout/bottom_sheet__mtb_colr_edit.xml | 14 ++-- .../bottom_sheet_fragment__lu_content.xml | 30 ++++---- ..._sheet_fragment__lu_content__list_item.xml | 10 +-- ...sk_cliente__dropdown_item_destinatario.xml | 2 +- .../dialog_basket_lu__mtb_colr_model.xml | 4 +- ...se_arts_from_mtb_aart_list__item_model.xml | 2 +- ...se_arts_from_mtb_colr_list__item_model.xml | 2 +- .../layout/dialog_info_giacenza_list_item.xml | 4 +- ...alog_info_giacenza_situazione_articolo.xml | 16 ++--- ...ituazione_articolo_available_list_item.xml | 8 +-- .../main/res/layout/dialog_input_lu_prod.xml | 2 +- .../res/layout/dialog_input_quantity_v2.xml | 34 ++++----- .../res/layout/dialog_pv_edit_articolo.xml | 16 ++--- ...atico_ul_done__not_completed_list_item.xml | 6 +- ...dropdown_simple_item_w_subtitle_bottom.xml | 2 +- ..._choose_ords_lav_from_list__item_model.xml | 8 +-- app/src/main/res/layout/fragment_main.xml | 2 +- ...n_accettazione_bolla__list_group_model.xml | 8 +-- .../fragment_main_menu_group_layout.xml | 7 +- .../layout/fragment_main_menu_item_layout.xml | 3 +- ...t_main_ordini_uscita__list_group_model.xml | 8 +-- ...prod_fabbisogno_linee_list_single_item.xml | 8 +-- ..._ordine_produzione__list_group_clienti.xml | 4 +- ...od_ordine_produzione__list_group_model.xml | 2 +- ...agment_prod_rientro_merce_order_detail.xml | 38 +++++----- ...erce_order_detail__mtb_colt_item_model.xml | 10 +-- ...tro_merce_order_list__list_group_model.xml | 8 +-- .../fragment_prod_versamento_materiale.xml | 2 +- ...nt_prod_versamento_materiale_in_buffer.xml | 12 ++-- .../main/res/layout/layout_filter_agente.xml | 2 +- .../layout_filter_agente__list_item.xml | 2 +- .../res/layout/layout_filter_automezzo.xml | 2 +- .../layout_filter_automezzo__list_item.xml | 2 +- .../main/res/layout/layout_filter_cliente.xml | 2 +- .../layout_filter_cliente__list_item.xml | 2 +- .../main/res/layout/layout_filter_cod_art.xml | 2 +- .../layout_filter_cod_art__list_item.xml | 2 +- .../res/layout/layout_filter_commessa.xml | 2 +- .../layout_filter_commessa__list_item.xml | 6 +- .../res/layout/layout_filter_deposito.xml | 2 +- .../layout_filter_deposito__list_item.xml | 6 +- .../main/res/layout/layout_filter_descr.xml | 2 +- .../layout/layout_filter_descr__list_item.xml | 2 +- .../res/layout/layout_filter_gruppo_merc.xml | 2 +- .../layout/layout_filter_numero_ordine.xml | 2 +- .../main/res/layout/layout_filter_paese.xml | 2 +- .../layout/layout_filter_paese__list_item.xml | 2 +- .../res/layout/layout_filter_posizione.xml | 2 +- .../layout_filter_posizione__list_item.xml | 4 +- .../res/layout/layout_filter_term_cons.xml | 2 +- .../layout_filter_term_cons__list_item.xml | 2 +- .../main/res/layout/layout_filter_vettore.xml | 2 +- .../layout_filter_vettore__list_item.xml | 2 +- .../main/res/layout/layout_filter_viaggio.xml | 2 +- .../layout_filter_viaggio__list_item.xml | 2 +- .../lista_contenuto_bancale_list_model.xml | 24 +++---- .../lista_giacenze_per_posizione_model.xml | 22 +++--- .../lista_picking_libero_list_model.xml | 10 +-- .../layout/lista_rettifica_giacenze_model.xml | 4 +- ...rifica_giacenze_picked_item_list_model.xml | 10 +-- .../layout/picking_resi_main_list__item.xml | 6 +- ...od_riposizionamento_da_prod__list_item.xml | 12 ++-- .../spedizione_main_list__group_item.xml | 14 ++-- app/src/main/res/values/colors.xml | 4 +- app/src/main/res/values/styles.xml | 4 -- 83 files changed, 335 insertions(+), 337 deletions(-) diff --git a/app/src/main/res/layout-land-hdpi/dialog_input_lu_prod.xml b/app/src/main/res/layout-land-hdpi/dialog_input_lu_prod.xml index 05a513ca..cb768358 100644 --- a/app/src/main/res/layout-land-hdpi/dialog_input_lu_prod.xml +++ b/app/src/main/res/layout-land-hdpi/dialog_input_lu_prod.xml @@ -101,7 +101,7 @@ tools:text="COD MART (Partita mag)" /> @@ -276,7 +276,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityDate.formatDate(view.currentOrder.getDataConsCommessaD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="01 Gen 2022" /> @@ -361,7 +361,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.currentOrder.numPedane, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -370,7 +370,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" UL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -419,7 +419,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.currentOrder.numCnf, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -428,7 +428,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" COL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -478,7 +478,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.currentOrder.qtaProd, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -488,7 +488,7 @@ android:layout_height="wrap_content" android:layout_marginStart="4dp" android:text="@{view.currentOrder.untOrd}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="KG" /> @@ -546,7 +546,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumLUNumber, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -555,7 +555,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" UL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -605,7 +605,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumColliNumber, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -615,7 +615,7 @@ android:layout_height="wrap_content" android:layout_marginStart="4dp" android:text="COL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -662,7 +662,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumNetKG, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -672,7 +672,7 @@ android:layout_height="wrap_content" android:layout_marginStart="4dp" android:text="KG" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -680,14 +680,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" (" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -696,7 +696,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" KG)" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -768,7 +768,7 @@ android:ellipsize="end" android:maxLines="1" android:text="@{view.currentOrder.ragSocAnag + ` (` + view.currentOrder.codAnag + `)`}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" android:visibility="@{view.currentOrder.ragSocAnag != null ? View.VISIBLE : View.GONE}" tools:text="FRUDIS S.R.L. (F0312)" /> @@ -813,7 +813,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumLUNumber, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -822,7 +822,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" UL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -830,14 +830,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" (" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -846,7 +846,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" COL)" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -906,7 +906,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{view.currentOrder.descCommessa != null ? view.currentOrder.descCommessa : `-`}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="GRUNDHOFER GBMH" /> @@ -949,7 +949,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumNetKG, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -958,7 +958,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" KG" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -1024,7 +1024,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityDate.formatDate(view.currentOrder.dataInizD, UtilityDate.COMMONS_DATE_FORMATS.DM_TIME_SLASH)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="11:00:00" /> @@ -1032,14 +1032,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" - " - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -1048,7 +1048,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="IN CORSO" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" android:visibility="@{view.currentOrder.dataFineD == null ? View.VISIBLE : View.GONE}" tools:text="IN CORSO" @@ -1061,7 +1061,7 @@ android:layout_height="wrap_content" android:text="Non avviato" android:textAllCaps="true" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" android:visibility="@{view.currentOrder.dataInizD == null ? View.VISIBLE : View.GONE}" tools:visibility="gone" /> @@ -1105,7 +1105,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumGrossKG, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -1114,7 +1114,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" KG" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -1176,7 +1176,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lista bancali" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" android:textStyle="bold" /> diff --git a/app/src/main/res/layout/accettazione_bolla_picking_main_list__group_item.xml b/app/src/main/res/layout/accettazione_bolla_picking_main_list__group_item.xml index 590b41e2..68d0cba9 100644 --- a/app/src/main/res/layout/accettazione_bolla_picking_main_list__group_item.xml +++ b/app/src/main/res/layout/accettazione_bolla_picking_main_list__group_item.xml @@ -21,7 +21,7 @@ + style="@style/TextAppearance.Material3.BodyMedium" /> + style="@style/TextAppearance.Material3.BodyMedium" /> \ No newline at end of file diff --git a/app/src/main/res/layout/accettazione_main_list_group_model.xml b/app/src/main/res/layout/accettazione_main_list_group_model.xml index b4f75028..86fa7298 100644 --- a/app/src/main/res/layout/accettazione_main_list_group_model.xml +++ b/app/src/main/res/layout/accettazione_main_list_group_model.xml @@ -36,7 +36,7 @@ android:layout_height="wrap_content" tools:text="Ord. Prod. 39 del 27 ott 2017" android:textColor="#000" - style="@style/AppTheme.NewMaterial.Text.Small"/> + style="@style/TextAppearance.Material3.BodyMedium"/> @@ -22,7 +21,6 @@ android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" - android:background="@android:color/white" app:headerLayout="@layout/nav_header_main" /> - + @@ -88,7 +88,7 @@ diff --git a/app/src/main/res/layout/activity_prod_dettaglio_linea.xml b/app/src/main/res/layout/activity_prod_dettaglio_linea.xml index 7deee321..9883adae 100644 --- a/app/src/main/res/layout/activity_prod_dettaglio_linea.xml +++ b/app/src/main/res/layout/activity_prod_dettaglio_linea.xml @@ -114,7 +114,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" app:text="@{view.isStarted.get() ? R.string.in_progress : view.isPaused.get() ? R.string.stand_by : R.string.stopped}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" app:textColor="@{ContextCompat.getColor(context, view.isStarted.get() ? R.color.green_600 : view.isPaused.get() ? R.color.orange_600 : R.color.red_600)}" tools:textColor="@color/green_600" android:textStyle="bold" diff --git a/app/src/main/res/layout/activity_pv_ordine_acquisto_edit.xml b/app/src/main/res/layout/activity_pv_ordine_acquisto_edit.xml index 30319a6b..364bbe39 100644 --- a/app/src/main/res/layout/activity_pv_ordine_acquisto_edit.xml +++ b/app/src/main/res/layout/activity_pv_ordine_acquisto_edit.xml @@ -80,7 +80,7 @@ android:orientation="horizontal"> diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml index 638dcf06..6eab359b 100644 --- a/app/src/main/res/layout/activity_splash.xml +++ b/app/src/main/res/layout/activity_splash.xml @@ -79,7 +79,7 @@ android:textColor="@android:color/white" android:alpha="0.7" android:layout_marginTop="12dp" - style="@style/AppTheme.NewMaterial.Text.Small"/> + style="@style/TextAppearance.Material3.BodyMedium"/> + style="@style/TextAppearance.Material3.BodyMedium"/> \ No newline at end of file diff --git a/app/src/main/res/layout/bottom_sheet__inventario_actions_view.xml b/app/src/main/res/layout/bottom_sheet__inventario_actions_view.xml index 4bfa501c..17c29d95 100644 --- a/app/src/main/res/layout/bottom_sheet__inventario_actions_view.xml +++ b/app/src/main/res/layout/bottom_sheet__inventario_actions_view.xml @@ -83,13 +83,13 @@ android:visibility="@{UtilityString.isNullOrEmpty(viewModel.currentItem.zona) ? View.GONE : View.VISIBLE}"> diff --git a/app/src/main/res/layout/bottom_sheet__inventario_row_actions_view.xml b/app/src/main/res/layout/bottom_sheet__inventario_row_actions_view.xml index 0b7ed174..a3c1ac8e 100644 --- a/app/src/main/res/layout/bottom_sheet__inventario_row_actions_view.xml +++ b/app/src/main/res/layout/bottom_sheet__inventario_row_actions_view.xml @@ -48,7 +48,7 @@ diff --git a/app/src/main/res/layout/bottom_sheet__item_edit_view.xml b/app/src/main/res/layout/bottom_sheet__item_edit_view.xml index c77bfb53..d231d37f 100644 --- a/app/src/main/res/layout/bottom_sheet__item_edit_view.xml +++ b/app/src/main/res/layout/bottom_sheet__item_edit_view.xml @@ -58,7 +58,7 @@ diff --git a/app/src/main/res/layout/bottom_sheet__mtb_colr_edit.xml b/app/src/main/res/layout/bottom_sheet__mtb_colr_edit.xml index da29f62c..b68e03ca 100644 --- a/app/src/main/res/layout/bottom_sheet__mtb_colr_edit.xml +++ b/app/src/main/res/layout/bottom_sheet__mtb_colr_edit.xml @@ -55,7 +55,7 @@ diff --git a/app/src/main/res/layout/bottom_sheet_fragment__lu_content.xml b/app/src/main/res/layout/bottom_sheet_fragment__lu_content.xml index 77dcc4cb..343bca25 100644 --- a/app/src/main/res/layout/bottom_sheet_fragment__lu_content.xml +++ b/app/src/main/res/layout/bottom_sheet_fragment__lu_content.xml @@ -478,7 +478,7 @@ app:layout_constraintGuide_percent="0.40" /> @@ -100,7 +100,7 @@ android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}" android:textSize="14sp" android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.GONE : View.VISIBLE}" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="Lotto: ABCDE" /> diff --git a/app/src/main/res/layout/dialog_choose_arts_from_mtb_aart_list__item_model.xml b/app/src/main/res/layout/dialog_choose_arts_from_mtb_aart_list__item_model.xml index df2d8991..a3149341 100644 --- a/app/src/main/res/layout/dialog_choose_arts_from_mtb_aart_list__item_model.xml +++ b/app/src/main/res/layout/dialog_choose_arts_from_mtb_aart_list__item_model.xml @@ -60,7 +60,7 @@ + style="@style/TextAppearance.Material3.BodyMedium" /> @@ -78,7 +78,7 @@ tools:text="Cod Jcom" android:layout_alignParentEnd="true" android:layout_below="@id/descrizione" - style="@style/AppTheme.NewMaterial.Text.Small" /> + style="@style/TextAppearance.Material3.BodyMedium" /> diff --git a/app/src/main/res/layout/fragment_main_menu_group_layout.xml b/app/src/main/res/layout/fragment_main_menu_group_layout.xml index c553e1d7..91f00078 100644 --- a/app/src/main/res/layout/fragment_main_menu_group_layout.xml +++ b/app/src/main/res/layout/fragment_main_menu_group_layout.xml @@ -17,7 +17,10 @@ diff --git a/app/src/main/res/layout/fragment_main_menu_item_layout.xml b/app/src/main/res/layout/fragment_main_menu_item_layout.xml index d6cf393a..e7fb76ee 100644 --- a/app/src/main/res/layout/fragment_main_menu_item_layout.xml +++ b/app/src/main/res/layout/fragment_main_menu_item_layout.xml @@ -32,10 +32,9 @@ android:layout_marginTop="16dp" android:text="@string/accettazione_ordine_title_fragment" android:textAllCaps="true" - android:textColor="@color/gray_700" android:gravity="center_horizontal" android:textStyle="bold" - style="@style/AppTheme.NewMaterial.Text.Small"/> + style="@style/TextAppearance.Material3.LabelMedium"/> diff --git a/app/src/main/res/layout/fragment_main_ordini_uscita__list_group_model.xml b/app/src/main/res/layout/fragment_main_ordini_uscita__list_group_model.xml index e68142ea..be1ddb89 100644 --- a/app/src/main/res/layout/fragment_main_ordini_uscita__list_group_model.xml +++ b/app/src/main/res/layout/fragment_main_ordini_uscita__list_group_model.xml @@ -47,7 +47,7 @@ android:ellipsize="end" android:maxLines="1" android:textColor="#000" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" app:layout_constraintStart_toEndOf="@id/checkbox" app:layout_constraintEnd_toStartOf="@id/right_descrizione" app:layout_constraintTop_toTopOf="parent" @@ -62,7 +62,7 @@ android:maxLines="1" android:ellipsize="end" tools:text="TextView" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" app:layout_constraintStart_toStartOf="@id/descrizione" app:layout_constraintEnd_toStartOf="@id/right_sub_descrizione" app:layout_constraintTop_toBottomOf="@+id/descrizione" @@ -75,7 +75,7 @@ android:layout_height="wrap_content" tools:text="Cons 07 nov 2018" android:textColor="#000" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBaseline_toBaselineOf="@id/descrizione" /> @@ -86,7 +86,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" tools:text="Cod Jcom" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/right_descrizione" app:layout_constraintBaseline_toBaselineOf="@id/sub_descrizione" /> diff --git a/app/src/main/res/layout/fragment_prod_fabbisogno_linee_list_single_item.xml b/app/src/main/res/layout/fragment_prod_fabbisogno_linee_list_single_item.xml index ca819b22..2cd31553 100644 --- a/app/src/main/res/layout/fragment_prod_fabbisogno_linee_list_single_item.xml +++ b/app/src/main/res/layout/fragment_prod_fabbisogno_linee_list_single_item.xml @@ -70,7 +70,7 @@ - + @@ -104,7 +104,7 @@ - + diff --git a/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_clienti.xml b/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_clienti.xml index 5db2422d..f432a144 100644 --- a/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_clienti.xml +++ b/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_clienti.xml @@ -12,7 +12,7 @@ android:maxLines="1" android:ellipsize="end" android:paddingEnd="6dp" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="TextView" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_model.xml b/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_model.xml index f406fde2..9778ce3c 100644 --- a/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_model.xml +++ b/app/src/main/res/layout/fragment_prod_ordine_produzione__list_group_model.xml @@ -36,7 +36,7 @@ android:layout_height="wrap_content" tools:text="Ord. Prod. 39 del 27 ott 2017" android:textColor="#000" - style="@style/AppTheme.NewMaterial.Text.Small"/> + style="@style/TextAppearance.Material3.BodyMedium"/> @@ -271,7 +271,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityDate.formatDate(view.currentOrder.getDataConsCommessaD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="01 Gen 2022" /> @@ -356,7 +356,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.currentOrder.numPedane, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -365,7 +365,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" UL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -414,7 +414,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.currentOrder.numCnf, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -423,7 +423,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" COL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -473,7 +473,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.currentOrder.qtaProd, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -483,7 +483,7 @@ android:layout_height="wrap_content" android:layout_marginStart="4dp" android:text="@{view.currentOrder.untOrd}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="KG" /> @@ -541,7 +541,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumLUNumber, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -550,7 +550,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" UL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -600,7 +600,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumColliNumber, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -610,7 +610,7 @@ android:layout_height="wrap_content" android:layout_marginStart="4dp" android:text="COL" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -657,7 +657,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{UtilityNumber.decimalToString(view.sumNetKG, 0)}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="0" /> @@ -667,7 +667,7 @@ android:layout_height="wrap_content" android:layout_marginStart="4dp" android:text="KG" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -675,14 +675,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" (" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -691,7 +691,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" KG)" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" /> @@ -757,7 +757,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lista bancali" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" android:textStyle="bold" /> diff --git a/app/src/main/res/layout/fragment_prod_rientro_merce_order_detail__mtb_colt_item_model.xml b/app/src/main/res/layout/fragment_prod_rientro_merce_order_detail__mtb_colt_item_model.xml index c905122d..867a2945 100644 --- a/app/src/main/res/layout/fragment_prod_rientro_merce_order_detail__mtb_colt_item_model.xml +++ b/app/src/main/res/layout/fragment_prod_rientro_merce_order_detail__mtb_colt_item_model.xml @@ -44,7 +44,7 @@ android:paddingEnd="12dp"> @@ -142,7 +142,7 @@ android:layout_alignParentStart="true" android:layout_toStartOf="@id/peso_netto_collo" android:text="@{`Linea: ` + mtbColt.codJfas}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.codJfas) ? View.INVISIBLE : View.VISIBLE}" tools:text="Linea: L3" /> @@ -153,7 +153,7 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="@{UtilityNumber.decimalToString(mtbColt.pesoNettoKg, 0) + `KG netto`}" - android:textAppearance="@style/AppTheme.NewMaterial.Text.Small" + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" android:textColor="@android:color/black" tools:text="628KG netto" /> diff --git a/app/src/main/res/layout/fragment_prod_rientro_merce_order_list__list_group_model.xml b/app/src/main/res/layout/fragment_prod_rientro_merce_order_list__list_group_model.xml index e2de01df..a67f3a23 100644 --- a/app/src/main/res/layout/fragment_prod_rientro_merce_order_list__list_group_model.xml +++ b/app/src/main/res/layout/fragment_prod_rientro_merce_order_list__list_group_model.xml @@ -48,7 +48,7 @@ @@ -70,7 +70,7 @@ android:text="@{mtbColr.getDescrizione()}" android:textColor="@android:color/black" android:textSize="16sp" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="Descrizione lunga articolo" /> @@ -80,7 +80,7 @@ android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}" android:textSize="14sp" android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.INVISIBLE : View.VISIBLE}" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="Lotto: ABCDE" /> @@ -111,7 +111,7 @@ android:textColor="@android:color/white" android:textStyle="bold" android:textAllCaps="true" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="280.45\nCONF" /> diff --git a/app/src/main/res/layout/lista_rettifica_giacenze_model.xml b/app/src/main/res/layout/lista_rettifica_giacenze_model.xml index 8aa96ad4..ab8ce7e9 100644 --- a/app/src/main/res/layout/lista_rettifica_giacenze_model.xml +++ b/app/src/main/res/layout/lista_rettifica_giacenze_model.xml @@ -74,7 +74,7 @@ android:background="@drawable/badge_round_corner" android:backgroundTint="@color/orange_600" android:textColor="@android:color/white" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="PESO KG" /> @@ -98,7 +98,7 @@ android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}" android:textSize="14sp" android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.GONE : View.VISIBLE}" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="Lotto: ABCDE" /> diff --git a/app/src/main/res/layout/lista_verifica_giacenze_picked_item_list_model.xml b/app/src/main/res/layout/lista_verifica_giacenze_picked_item_list_model.xml index 022b51eb..c388a94b 100644 --- a/app/src/main/res/layout/lista_verifica_giacenze_picked_item_list_model.xml +++ b/app/src/main/res/layout/lista_verifica_giacenze_picked_item_list_model.xml @@ -25,7 +25,7 @@ - + @@ -55,7 +55,7 @@ + style="@style/TextAppearance.Material3.BodyMedium"/> @@ -89,7 +89,7 @@ android:layout_marginTop="4dp" android:textSize="16sp" android:textColor="@android:color/black" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="DESCRIZIONE"/> diff --git a/app/src/main/res/layout/prod_riposizionamento_da_prod__list_item.xml b/app/src/main/res/layout/prod_riposizionamento_da_prod__list_item.xml index dd474c2f..73865e24 100644 --- a/app/src/main/res/layout/prod_riposizionamento_da_prod__list_item.xml +++ b/app/src/main/res/layout/prod_riposizionamento_da_prod__list_item.xml @@ -47,7 +47,7 @@ + style="@style/TextAppearance.Material3.BodyMedium" /> @@ -111,7 +111,7 @@ android:layout_marginTop="4dp" android:textSize="16sp" android:textColor="@android:color/black" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="DESCRIZIONE" /> @@ -139,7 +139,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" - style="@style/AppTheme.NewMaterial.Text.Small" + style="@style/TextAppearance.Material3.BodyMedium" tools:text="SUB DESCRIZIONE" /> @@ -167,7 +167,7 @@ android:layout_marginStart="8dp" android:textStyle="bold" android:layout_alignParentEnd="true" - style="@style/AppTheme.NewMaterial.Text.Small" /> + style="@style/TextAppearance.Material3.BodyMedium" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index c8ff0996..3b7bb0a5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,7 +1,7 @@ #4c4dcf - @color/colorPrimary + #1A73E8 #FFFFFF #E1DFFF #08006C @@ -30,7 +30,7 @@ #000000 #4C4DCF #4C4DCF - #C1C1FF + #1A73E8 #160AA2 #3231B6 #E1DFFF diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index e0c1d050..021c4dba 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -18,10 +18,6 @@ @drawable/material_text_color 12sp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From ba1118fdd8fac5dd02c5991b1c94b1326f771b2b Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Wed, 1 Oct 2025 17:45:26 +0200 Subject: [PATCH 15/28] Fix decodifica barcode in recupero materiale --- .../ProdRecuperoMaterialeViewModel.java | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java index 3cef2131..e2f56069 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/prod_recupero_materiale/ProdRecuperoMaterialeViewModel.java @@ -18,6 +18,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss; import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener; import it.integry.integrywmsnative.core.model.MtbAart; import it.integry.integrywmsnative.core.model.MtbColt; +import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers.MaterialiRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer; @@ -30,6 +31,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO; public class ProdRecuperoMaterialeViewModel { + private final BarcodeRESTConsumer mBarcodeRESTConsumer; private final ProdRecuperoMaterialeRESTConsumer mProdRecuperoMaterialeRESTConsumer; private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer; private final PrinterRESTConsumer mPrinterRESTConsumer; @@ -44,11 +46,13 @@ public class ProdRecuperoMaterialeViewModel { @Inject - public ProdRecuperoMaterialeViewModel(ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer, + public ProdRecuperoMaterialeViewModel(BarcodeRESTConsumer barcodeRESTConsumer, + ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, MaterialiRESTConsumer materialiRESTConsumer, ExecutorService executorService) { + this.mBarcodeRESTConsumer = barcodeRESTConsumer; this.mProdRecuperoMaterialeRESTConsumer = prodRecuperoMaterialeRESTConsumer; this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer; this.mPrinterRESTConsumer = printerRESTConsumer; @@ -78,29 +82,37 @@ public class ProdRecuperoMaterialeViewModel { public void processBarcodeDTO(BarcodeScanDTO data) { if (UtilityBarcode.isEtichettaAnonima(data) || UtilityBarcode.isEtichetta128(data)) { - this.executeEtichettaLU(data.getStringValue()); + this.executeEtichettaLU(data); } } - private void executeEtichettaLU(String sscc) { + private void executeEtichettaLU(BarcodeScanDTO barcodeScanDTO) { this.sendOnLoadingStarted(); + this.mBarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> { - this.mColliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColt -> { - this.sendOnLoadingEnded(); + if(ean128Model == null || ean128Model.Sscc == null) { + this.sendError(new NoLUFoundException()); + this.sendOnLoadingEnded(); + return; + } + + this.mColliMagazzinoRESTConsumer.getBySSCC(ean128Model.Sscc, true, false, mtbColt -> { + this.sendOnLoadingEnded(); + + if (mtbColt != null) { + HistoryVersamentoProdULDTO historyVersamentoProdULRestDTO = this.getHistoryElementFromMtbColt(mtbColt); + if (historyVersamentoProdULRestDTO != null) { + this.dispatchItem(historyVersamentoProdULRestDTO, mtbColt); + } else { + this.sendError(new NoLUFoundException()); + } - if (mtbColt != null) { - HistoryVersamentoProdULDTO historyVersamentoProdULRestDTO = this.getHistoryElementFromMtbColt(mtbColt); - if (historyVersamentoProdULRestDTO != null) { - this.dispatchItem(historyVersamentoProdULRestDTO, mtbColt); } else { this.sendError(new NoLUFoundException()); } - } else { - this.sendError(new NoLUFoundException()); - } - + }, this::sendError); }, this::sendError); } @@ -181,7 +193,7 @@ public class ProdRecuperoMaterialeViewModel { .setNumColloRif(item.getNumColloRif()) .setOrdini(ordiniRequest); - if(mtbColt != null) { + if (mtbColt != null) { request.setMtbColtCarico(mtbColt); } else { request.setMtbColtCarico(sourceMtbColt); From 03c02d662593e07537bdaa1e4f92aa30fa54a2cc Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Wed, 1 Oct 2025 18:22:10 +0200 Subject: [PATCH 16/28] Migliorie dark mode --- .../dialog_input_quantity_v2.xml | 14 +------ .../res/layout/dialog_input_quantity_v2.xml | 37 +++++++------------ .../fragment_prod_recupero_materiale.xml | 5 +-- .../prod_recupero_materiale_list_item.xml | 8 ++-- .../res/values/text_input_layout_style.xml | 9 ++--- 5 files changed, 27 insertions(+), 46 deletions(-) diff --git a/app/src/main/res/layout-land-hdpi/dialog_input_quantity_v2.xml b/app/src/main/res/layout-land-hdpi/dialog_input_quantity_v2.xml index 6afa0a44..e4742f39 100644 --- a/app/src/main/res/layout-land-hdpi/dialog_input_quantity_v2.xml +++ b/app/src/main/res/layout-land-hdpi/dialog_input_quantity_v2.xml @@ -31,7 +31,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" - android:background="@android:color/white" android:orientation="vertical" app:cardCornerRadius="12dp" app:cardElevation="0dp"> @@ -50,8 +49,7 @@ android:minHeight="?attr/actionBarSize" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:titleTextColor="@android:color/white"> + app:layout_constraintTop_toTopOf="parent"> @@ -113,8 +111,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_toStartOf="@id/qta_ord_panel" - android:text="@string/total_ordered" - android:textColor="@android:color/black" /> + android:text="@string/total_ordered" /> @@ -149,7 +144,6 @@ android:layout_alignParentEnd="true" android:layout_marginStart="4dp" android:text="(" - android:textColor="@android:color/black" android:textStyle="bold" /> @@ -912,7 +903,6 @@ android:layout_height="wrap_content" android:hint="@string/LU_weight" android:inputType="number" - android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}" android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }" app:binding="@{view.currentPesoLordo}" /> diff --git a/app/src/main/res/layout/dialog_input_quantity_v2.xml b/app/src/main/res/layout/dialog_input_quantity_v2.xml index c6ef1391..38955285 100644 --- a/app/src/main/res/layout/dialog_input_quantity_v2.xml +++ b/app/src/main/res/layout/dialog_input_quantity_v2.xml @@ -35,16 +35,15 @@ + android:orientation="vertical" + android:background="?attr/colorSurface"> + android:minHeight="?attr/actionBarSize"> @@ -120,12 +119,11 @@ + android:text="@string/total_ordered" /> @@ -929,7 +921,6 @@ android:layout_height="wrap_content" android:hint="@string/LU_weight" android:inputType="number" - android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}" app:binding="@{view.currentPesoLordo}" /> @@ -974,7 +965,7 @@ android:weightSum="11">