Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
00515aaf9b
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 452
|
||||
def appVersionName = '1.41.04'
|
||||
def appVersionCode = 458
|
||||
def appVersionName = '1.41.10'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -53,16 +53,16 @@ public class BaseActivity extends AppCompatActivity {
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
executorService.execute(() -> {
|
||||
//executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(getSupportFragmentManager());
|
||||
});
|
||||
//});
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
executorService.execute(() -> {
|
||||
mCurrentProgress.dismissAllowingStateLoss();
|
||||
});
|
||||
//executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
//});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -77,22 +77,23 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
executorService.execute(() -> {
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||
});
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
executorService.execute(() -> {
|
||||
mCurrentProgress.dismissAllowingStateLoss();
|
||||
});
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
public void onError(Exception ex) {
|
||||
this.onLoadingEnded();
|
||||
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.onLoadingEnded();
|
||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||
});
|
||||
}
|
||||
|
||||
@ -66,16 +66,16 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
executorService.execute(() -> {
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||
});
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
executorService.execute(() -> {
|
||||
mCurrentProgress.dismissAllowingStateLoss();
|
||||
});
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
// });
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
|
||||
@ -17,7 +17,6 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.OrdineDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
@ -42,17 +41,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
||||
var startTime = new Date().getTime();
|
||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||
UtilityThread.executeParallel(() -> {
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, false);
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
||||
Log.e("getArticoliListino_pv", t.toString());
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@ -66,17 +61,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
||||
var startTime = new Date().getTime();
|
||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||
UtilityThread.executeParallel(() -> {
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, false);
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
||||
Log.e("getArticoliListino_pv", t.toString());
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@ -105,7 +96,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
var startTime = new Date().getTime();
|
||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||
UtilityThread.executeParallel(() -> {
|
||||
// UtilityThread.executeParallel(() -> {
|
||||
// if (data == null) {
|
||||
// onFailed.run(new Exception("Nessun ordine generato"));
|
||||
// return;
|
||||
@ -117,7 +108,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
// ordine.setCodMdep(data.getCodMdep());
|
||||
// ordine.setNumOrd(data.getNumOrd());
|
||||
onSuccess.run(ordine);
|
||||
}, false);
|
||||
// }, false);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
@ -63,6 +63,8 @@ public class UtilityExceptions {
|
||||
if (!BuildConfig.DEBUG && !toIgnore) {
|
||||
if (sendEmail) UtilityLogger.error(ex);
|
||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
} else {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -36,7 +37,8 @@ public class DialogSelectDocInfoViewModel extends ViewModel {
|
||||
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
||||
|
||||
public DialogSelectDocInfoViewModel() {
|
||||
List<String> requestNumDocList = Arrays.asList(SettingsManager.iDB().getDocInterniRequestNumDoc().split("\\|"));
|
||||
String docInterniRequestNumDoc = SettingsManager.iDB().getDocInterniRequestNumDoc();
|
||||
List<String> requestNumDocList = docInterniRequestNumDoc != null ? Arrays.asList(docInterniRequestNumDoc.split("\\|")) : new ArrayList<>();
|
||||
|
||||
tipoDoc.observeForever(val -> fornitoreRequired.postValue(val != null && (val.getGestioneDoc().equals("T") || val.getGestioneDoc().equals("A") || (val.getGestioneDoc().equals("P") && !val.getGestione().equals("L")))));
|
||||
|
||||
|
||||
@ -130,8 +130,10 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
||||
this.onLoadingStarted();
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
pvOrdiniAcquistoRESTConsumer.retrieveArticoli(codAlis, codMdep, dto -> {
|
||||
|
||||
this.onLoadingEnded();
|
||||
if (dto.getArticoli().size() == 0) {
|
||||
|
||||
if (dto.getArticoli().isEmpty()) {
|
||||
if (UtilityString.isNullOrEmpty(codAlis)) {
|
||||
onFailed.run(new NoArtsFoundException());
|
||||
} else {
|
||||
@ -146,6 +148,7 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
||||
mGriglia.setDescrDepo(dto.getDescrDepo());
|
||||
mListArticoli = dto.getArticoli();
|
||||
this.dismiss();
|
||||
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.sqlite.db.SimpleSQLiteQuery;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@ -45,6 +44,7 @@ import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@ -293,13 +293,16 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
});
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
DialogSimpleMessageView
|
||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
UtilityExceptions.defaultException(requireContext(), ex);
|
||||
this.closeProgress();
|
||||
|
||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
// requireActivity().runOnUiThread(() -> {
|
||||
// DialogSimpleMessageView
|
||||
// .makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||
// .show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
// });
|
||||
//
|
||||
// FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
}
|
||||
});
|
||||
})
|
||||
@ -309,15 +312,15 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
|
||||
|
||||
private void openProgress() {
|
||||
executorService.execute(() -> {
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||
});
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
executorService.execute(() -> {
|
||||
mCurrentProgress.dismissAllowingStateLoss();
|
||||
});
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
@ -330,6 +333,12 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
String line;
|
||||
|
||||
while ((line = br.readLine()) != null) {
|
||||
|
||||
if(!line.matches("\\d{13}.*")) {
|
||||
int lastNewLineChar = text.lastIndexOf("\n");
|
||||
text.deleteCharAt(text.length() - 1);
|
||||
}
|
||||
|
||||
text.append(line);
|
||||
text.append('\n');
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione;
|
||||
|
||||
import androidx.annotation.IntegerRes;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
@ -11,18 +10,15 @@ import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.exception.EmptyLUException;
|
||||
@ -89,7 +85,6 @@ import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.CurrentMonoLUPositionIsNotCorrectException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidMagazzinoAutomaticoMovementException;
|
||||
@ -99,7 +94,6 @@ import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadExceptio
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PrintOrderCloseDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowQtaTotOrderedQuantityException;
|
||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.TracciamentoImballoDTO;
|
||||
|
||||
public class SpedizioneViewModel {
|
||||
@ -193,19 +187,20 @@ public class SpedizioneViewModel {
|
||||
this.mUseQtaOrd = useQtaOrd;
|
||||
this.mUseColliPedana = useColliPedana;
|
||||
|
||||
if (enableGiacenza) {
|
||||
mOrdiniRestConsumerService.getSuggestedPickingList(this.mDefaultCodMdep, pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||
} else {
|
||||
getEmptyPickingList(pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
});
|
||||
}
|
||||
|
||||
getPartitaMagList(pickingList, mtbPartitaMagList -> {
|
||||
this.mPartitaMagList = mtbPartitaMagList;
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
if (enableGiacenza) {
|
||||
mOrdiniRestConsumerService.getSuggestedPickingList(this.mDefaultCodMdep, pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
this.sendOnLoadingEnded();
|
||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||
} else {
|
||||
getEmptyPickingList(pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.mDefaultGestioneOfUL = gestioneCol;
|
||||
|
||||
@ -64,7 +64,7 @@ public class DialogProgressView extends DialogFragment {
|
||||
}
|
||||
|
||||
public void show(@NonNull FragmentManager manager) {
|
||||
if (!isAdded() && !isInLayout()) {
|
||||
if (!isAdded() && !isInLayout() && !progressOpened) {
|
||||
this.progressOpened = true;
|
||||
super.show(manager, "loading-dialog");
|
||||
}
|
||||
@ -72,7 +72,7 @@ public class DialogProgressView extends DialogFragment {
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
if (isAdded() || isInLayout()) {
|
||||
if (isAdded() || isInLayout() || progressOpened) {
|
||||
this.progressOpened = false;
|
||||
super.dismissAllowingStateLoss();
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
" nazione\n" +
|
||||
"FROM vtb_dest\n" +
|
||||
"INNER JOIN vtb_clie ON vtb_clie.cod_anag = vtb_dest.cod_anag\n" +
|
||||
"WHERE vtb_clie.flag_stato = 'A'";
|
||||
"WHERE vtb_clie.flag_stato = 'A' AND vtb_dest.flag_attivo = 'S'";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteDestinatarioDTO>>() {
|
||||
}.getType();
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.9.20'
|
||||
agp_version = '8.7.1'
|
||||
agp_version = '8.7.2'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user