Compare commits
41 Commits
v1.46.04(4
...
v1.46.13(5
| Author | SHA1 | Date | |
|---|---|---|---|
| 69d880b587 | |||
| f5c3dcfdc9 | |||
| d30af1e2a6 | |||
| 71a18e9ffa | |||
| 40e1fb4f83 | |||
| f3f0fd8fd8 | |||
| ed53b9e3b4 | |||
| 37ac05b8ab | |||
| 823d0d7a33 | |||
| 5b07ff5efa | |||
| c5639a643a | |||
| 012f75198b | |||
| d7e0e858d2 | |||
| 339a5e5b68 | |||
| 02a13911d8 | |||
| b6f51971f1 | |||
| 57079c0062 | |||
| 63c353a83c | |||
| c069d21cbf | |||
| afeb9ecc23 | |||
| 2ff8d80da3 | |||
| 891e2641fa | |||
| ca79107809 | |||
| 5c37b986ce | |||
| c426250cd5 | |||
| f090c11146 | |||
| 5c90f22a49 | |||
| f1ddaa1fca | |||
| 8490553a32 | |||
| 66824fccb1 | |||
| 39dce4d23f | |||
| c1dbbde905 | |||
| 8d2d0ad195 | |||
| 927b14c9fc | |||
| f342cd0e5f | |||
| c287852ce6 | |||
| edc9470e9b | |||
| 7adeee589e | |||
| 52a393c260 | |||
| 60a405536c | |||
| 5f5117c0f6 |
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-03-17T09:16:48.549771200Z">
|
||||
<DropdownSelection timestamp="2025-05-14T09:45:15.341614500Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=23324B682F" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 492
|
||||
def appVersionName = '1.46.04'
|
||||
def appVersionCode = 501
|
||||
def appVersionName = '1.46.13'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -101,7 +101,7 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
// androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
|
||||
// exclude group: 'com.android.support', module: 'support-annotations'
|
||||
@@ -112,11 +112,11 @@ dependencies {
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:33.9.0')
|
||||
implementation platform('com.google.firebase:firebase-bom:33.13.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.5.0'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.7.0'
|
||||
|
||||
//JJWT
|
||||
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
|
||||
@@ -128,7 +128,7 @@ dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
||||
|
||||
@@ -142,7 +142,7 @@ dependencies {
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.8.7'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.9.0'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
@@ -162,7 +162,7 @@ dependencies {
|
||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||
|
||||
//SQLite ROOM
|
||||
def room_version = "2.6.1"
|
||||
def room_version = "2.7.1"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||
|
||||
@@ -97,6 +97,8 @@ public class MtbAart extends EntityBase {
|
||||
|
||||
private List<MtbUntMis> mtbUntMis;
|
||||
|
||||
private List<MtbAartBarCode> mtbAartBarCode;
|
||||
|
||||
|
||||
public enum UntMisRifPesoEnum {
|
||||
C,
|
||||
@@ -965,6 +967,13 @@ public class MtbAart extends EntityBase {
|
||||
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
||||
}
|
||||
|
||||
public List<MtbAartBarCode> getMtbAartBarCode() {
|
||||
return mtbAartBarCode;
|
||||
}
|
||||
|
||||
public void setMtbAartBarCode(List<MtbAartBarCode> mtbAartBarCode) {
|
||||
this.mtbAartBarCode = mtbAartBarCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class MtbAartBarCode extends EntityBase {
|
||||
private String codBarre;
|
||||
private String codMart;
|
||||
private BigDecimal qtaCnf;
|
||||
private String flagPrimario;
|
||||
private String tipoCodBarre;
|
||||
|
||||
public MtbAartBarCode() {
|
||||
this.type = "mtb_aart_bar_code";
|
||||
}
|
||||
|
||||
public String getCodBarre() {
|
||||
return codBarre;
|
||||
}
|
||||
|
||||
public void setCodBarre(String codBarre) {
|
||||
this.codBarre = codBarre;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public void setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public void setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
}
|
||||
|
||||
public String getFlagPrimario() {
|
||||
return flagPrimario;
|
||||
}
|
||||
|
||||
public void setFlagPrimario(String flagPrimario) {
|
||||
this.flagPrimario = flagPrimario;
|
||||
}
|
||||
|
||||
public String getTipoCodBarre() {
|
||||
return tipoCodBarre;
|
||||
}
|
||||
|
||||
public void setTipoCodBarre(String tipoCodBarre) {
|
||||
this.tipoCodBarre = tipoCodBarre;
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,7 @@ public class DBSettingsModel {
|
||||
private List<String> allowedCodMgrpForArtCreation;
|
||||
private boolean flagAccettazioneGroupListForn = false;
|
||||
private boolean flagSpedizioneEnableFastPicking = false;
|
||||
private boolean flagAccettazioneBollaEditableQtaTot = true;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@@ -815,4 +816,12 @@ public class DBSettingsModel {
|
||||
public void setFlagSpedizioneEnableFastPicking(boolean flagSpedizioneEnableFastPicking) {
|
||||
this.flagSpedizioneEnableFastPicking = flagSpedizioneEnableFastPicking;
|
||||
}
|
||||
|
||||
public boolean isFlagAccettazioneBollaEditableQtaTot() {
|
||||
return flagAccettazioneBollaEditableQtaTot;
|
||||
}
|
||||
|
||||
public void setFlagAccettazioneBollaEditableQtaTot(boolean flagAccettazioneBollaEditableQtaTot) {
|
||||
this.flagAccettazioneBollaEditableQtaTot = flagAccettazioneBollaEditableQtaTot;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -564,6 +564,12 @@ public class SettingsManager {
|
||||
.setKeySection("ENABLE_FAST_PICKING")
|
||||
.setSetter(dbSettingsModelIstance::setFlagSpedizioneEnableFastPicking)
|
||||
.setDefaultValue(false));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("ACCETTAZIONE_BOLLA")
|
||||
.setKeySection("FLAG_QTA_TOT_EDITABLE")
|
||||
.setSetter(dbSettingsModelIstance::setFlagAccettazioneBollaEditableQtaTot)
|
||||
.setDefaultValue(true));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("PICKING")
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
@@ -54,7 +55,7 @@ public class BolleAccettazioneRESTConsumer extends _BaseRESTConsumer {
|
||||
.enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> call, Response<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> response) {
|
||||
analyzeAnswer(response, "retrievePickingListBolle", data -> onComplete.run(data.getSitArticoli()), onFailed);
|
||||
analyzeAnswer(response, "retrievePickingListBolle", data -> onComplete.run(data.getSitArticoli() == null ? new ArrayList<>() : data.getSitArticoli()), onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -620,6 +620,7 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
.setDataScad(dataScad)
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setCanLUBeClosed(true)
|
||||
.setQtaTotEditable(SettingsManager.iDB().isFlagAccettazioneBollaEditableQtaTot())
|
||||
.setCanOverflowOrderQuantity(canOverflowQuantity)
|
||||
.setDisableTracciabilitaCheck(SettingsManager.iDB().isFlagAccettazioneBollaDisableMandatoryTracciabilita());
|
||||
|
||||
|
||||
@@ -338,6 +338,8 @@ public class PickingLiberoViewModel {
|
||||
|
||||
if (this.mFlagAskCliente) {
|
||||
var data = this.sendLUClienteRequired();
|
||||
if (data == null) return;
|
||||
|
||||
vtbDest = data.first;
|
||||
codJcom = data.second;
|
||||
}
|
||||
@@ -648,7 +650,6 @@ public class PickingLiberoViewModel {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void executeDepositChangeIfNeeded(MtbColt refMtbColt) throws Exception {
|
||||
//Considero solo la prima UDC scansionata
|
||||
boolean shouldChangeCodMdep = refMtbColt != null && !refMtbColt.getCodMdep().equalsIgnoreCase(mCurrentMtbColt.getCodMdep()) &&
|
||||
@@ -860,7 +861,7 @@ public class PickingLiberoViewModel {
|
||||
|
||||
if (this.mDefaultGestione == GestioneEnum.LAVORAZIONE && SettingsManager.iDB().isProduzioneGeneraDocScar()) {
|
||||
|
||||
if(SettingsManager.iDB().getInternalCodAnags() == null || SettingsManager.iDB().getInternalCodAnags().isEmpty())
|
||||
if (SettingsManager.iDB().getInternalCodAnags() == null || SettingsManager.iDB().getInternalCodAnags().isEmpty())
|
||||
throw new Exception("Nessuna anagrafica aziendale configurata. Assicurarsi di aver abilitato il flag FLAG_USE_COD_ANAG_AZIENDALE.");
|
||||
|
||||
closeUDSRequest
|
||||
|
||||
@@ -4,6 +4,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.InputType;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
@@ -51,6 +53,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
@@ -68,6 +71,9 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
@Inject
|
||||
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||
|
||||
@Inject
|
||||
Handler handler;
|
||||
|
||||
private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel;
|
||||
|
||||
private ObservableArrayList<PickingResiListModel> mPickingResiMutableData = new ObservableArrayList<>();
|
||||
@@ -250,10 +256,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
public void createNewLU() {
|
||||
this.mBindings.mainFab.close(true);
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewmodel.createNewLU(null, null, () -> {
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
this.mViewmodel.createNewLU(null, null, this::onLoadingEnded);
|
||||
}
|
||||
|
||||
public void removeListFilter() {
|
||||
@@ -333,7 +336,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete(resultDTO -> {
|
||||
if(resultDTO == null || resultDTO.isAborted()) {
|
||||
if (resultDTO == null || resultDTO.isAborted()) {
|
||||
this.mViewmodel.resetMatchedRows();
|
||||
return;
|
||||
}
|
||||
@@ -369,7 +372,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
@Override
|
||||
public void onRowSaved() {
|
||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||
.setBackgroundTint(getResources().getColor(R. color. green_500))
|
||||
.setBackgroundTint(getResources().getColor(R.color.green_500))
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -385,21 +388,25 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
|
||||
@Override
|
||||
public void onLUOpened(MtbColt mtbColt) {
|
||||
noLUPresent.set(false);
|
||||
handler.post(() -> {
|
||||
noLUPresent.set(false);
|
||||
|
||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||
.setBackgroundTint(getResources().getColor(R. color. green_500))
|
||||
.show();
|
||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||
.setBackgroundTint(getResources().getColor(R.color.green_500))
|
||||
.show();
|
||||
|
||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUClosed() {
|
||||
noLUPresent.set(true);
|
||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||
handler.post(() -> {
|
||||
noLUPresent.set(true);
|
||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||
|
||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -201,6 +201,8 @@ public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFra
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(requireContext(), ex, false)));
|
||||
|
||||
BarcodeManager.enable(barcodeScannerIstanceID);
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
@@ -209,12 +211,12 @@ public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFra
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
this.mViewModel.processBarcodeDTO(data);
|
||||
this.onLoadingEnded();
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
}
|
||||
});
|
||||
|
||||
this.onLoadingEnded();
|
||||
};
|
||||
|
||||
|
||||
@@ -279,6 +281,8 @@ public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFra
|
||||
.setTotalNumCnfOrd(incomingNumCnf)
|
||||
.setPartitaMag(partitaMag)
|
||||
.setDataScad(dataScad)
|
||||
.setCanInputZeroQuantity(true)
|
||||
.setCanOverflowOrderQuantity(true)
|
||||
.setCanLUBeClosed(false);
|
||||
|
||||
if (!dialogInputQuantityV2View.isVisible())
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -24,6 +25,7 @@ import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGi
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbAartBarCode;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
@@ -116,7 +118,7 @@ public class VerificaGiacenzeViewModel {
|
||||
|
||||
public void randomizeElements(int elementsCount) {
|
||||
|
||||
for(int i = 0; i < elementsCount; i++) {
|
||||
for (int i = 0; i < elementsCount; i++) {
|
||||
var randomIndex = (int) (Math.random() * currentLoadedAnagrafiche.size());
|
||||
var randomAnagrafica = currentLoadedAnagrafiche.get(randomIndex);
|
||||
|
||||
@@ -168,7 +170,7 @@ public class VerificaGiacenzeViewModel {
|
||||
|
||||
|
||||
public void save() throws Exception {
|
||||
if(currentVerificaRows.getValue().isEmpty()) {
|
||||
if (currentVerificaRows.getValue().isEmpty()) {
|
||||
delete();
|
||||
return;
|
||||
}
|
||||
@@ -280,10 +282,21 @@ public class VerificaGiacenzeViewModel {
|
||||
}
|
||||
|
||||
public MtbAart searchAnagraficaByBarcode(String barcode) {
|
||||
return currentLoadedAnagrafiche.parallelStream()
|
||||
.filter(mtbAart -> barcode.equals(mtbAart.getBarCode()))
|
||||
MtbAart mtbAart = currentLoadedAnagrafiche.parallelStream()
|
||||
.filter(x -> barcode.equals(x.getBarCode()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
if (mtbAart == null) {
|
||||
mtbAart = currentLoadedAnagrafiche.parallelStream()
|
||||
.filter(x -> x.getMtbAartBarCode() != null &&
|
||||
x.getMtbAartBarCode().stream()
|
||||
.anyMatch(y -> barcode.equals(y.getCodBarre())))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
return mtbAart;
|
||||
}
|
||||
|
||||
public void insertRow(VerificaGiacenzeRowEntity rowEntity) {
|
||||
|
||||
@@ -515,7 +515,6 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
private Pair<Boolean, MtbDepoPosizione> sendLUPositionChangeRequest() {
|
||||
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
AtomicReference<Pair<Boolean, MtbDepoPosizione>> result = new AtomicReference<>();
|
||||
|
||||
@@ -533,9 +532,22 @@ public class SpedizioneViewModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void sendBatchLotSelectionRequest(List<MtbPartitaMag> availableBatchLots, RunnableArgs<MtbPartitaMag> onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onBatchLotSelectionRequest(availableBatchLots, onComplete);
|
||||
private MtbPartitaMag sendBatchLotSelectionRequest(List<MtbPartitaMag> availableBatchLots) {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
AtomicReference<MtbPartitaMag> result = new AtomicReference<>();
|
||||
|
||||
mListener.onBatchLotSelectionRequest(availableBatchLots, item -> {
|
||||
result.set(item);
|
||||
latch.countDown();
|
||||
});
|
||||
|
||||
try {
|
||||
latch.await(); // Attende che il dialog venga chiuso
|
||||
return result.get();
|
||||
} catch (InterruptedException e) {
|
||||
this.sendError(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
||||
@@ -1016,24 +1028,23 @@ public class SpedizioneViewModel {
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
this.sendBatchLotSelectionRequest(tmp, selected -> {
|
||||
this.sendOnLoadingEnded();
|
||||
var selected = this.sendBatchLotSelectionRequest(tmp);
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
if (selected != null) {
|
||||
MtbColr scannedMtbColr = pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().stream()
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) &&
|
||||
((x.getPartitaMag() != null && selected.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(selected.getPartitaMag()))
|
||||
|| (x.getPartitaMag() == null && selected.getPartitaMag() == null)))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (selected != null) {
|
||||
MtbColr scannedMtbColr = pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().stream()
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) &&
|
||||
((x.getPartitaMag() != null && selected.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(selected.getPartitaMag()))
|
||||
|| (x.getPartitaMag() == null && selected.getPartitaMag() == null)))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
try {
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately);
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
}
|
||||
try {
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately);
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged, executeImmediately);
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -63,6 +64,9 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
@Inject
|
||||
DialogProgressView dialogProgressView;
|
||||
|
||||
@Inject
|
||||
Handler handler;
|
||||
|
||||
public static DialogAskClienteView newInstance(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogAskClienteView(onComplete, onAbort);
|
||||
}
|
||||
@@ -119,6 +123,8 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
||||
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
||||
|
||||
viewModel1.setHandler(handler);
|
||||
|
||||
viewModel1.setOnConfirmClickListener(() -> {
|
||||
String codAnag = viewModel1.getCurrentCliente();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
@@ -37,9 +38,15 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
private Runnable onConfirmClickListener;
|
||||
private Runnable onAbortClickListener;
|
||||
|
||||
private Handler handler;
|
||||
|
||||
public DialogAskCliente_Page1ViewModel() {
|
||||
}
|
||||
|
||||
public void setHandler(Handler handler){
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContext(Context context) {
|
||||
this.mContext = context;
|
||||
@@ -147,33 +154,33 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
|
||||
private void initializeAdapter(ArrayList<DialogAskClienteClienteDTO> items) {
|
||||
handler.post(() -> {
|
||||
var orderedList = Stream.of(items)
|
||||
.sortBy(x -> x.getRagSoc() != null ? x.getRagSoc() : "")
|
||||
.toList();
|
||||
|
||||
var orderedList = Stream.of(items)
|
||||
.sortBy(x -> x.getRagSoc() != null ? x.getRagSoc() : "")
|
||||
.toList();
|
||||
DialogAskCliente_Page1_Cliente_ArrayAdapter adapter = new DialogAskCliente_Page1_Cliente_ArrayAdapter(mContext, orderedList);
|
||||
|
||||
DialogAskCliente_Page1_Cliente_ArrayAdapter adapter = new DialogAskCliente_Page1_Cliente_ArrayAdapter(mContext, orderedList);
|
||||
AutoCompleteTextView editTextDropdownCliente = mBinding.dropdownCliente;
|
||||
editTextDropdownCliente.setThreshold(0);
|
||||
editTextDropdownCliente.setAdapter(adapter);
|
||||
editTextDropdownCliente.setOnItemClickListener((parent, view, position, id) -> {
|
||||
refreshCodJcoms(items.get(position));
|
||||
});
|
||||
|
||||
AutoCompleteTextView editTextDropdownCliente = mBinding.dropdownCliente;
|
||||
editTextDropdownCliente.setThreshold(0);
|
||||
editTextDropdownCliente.setAdapter(adapter);
|
||||
editTextDropdownCliente.setOnItemClickListener((parent, view, position, id) -> {
|
||||
refreshCodJcoms(items.get(position));
|
||||
});
|
||||
DialogAskCliente_Page1_Commessa_ArrayAdapter commessaAdapter = new DialogAskCliente_Page1_Commessa_ArrayAdapter(mContext);
|
||||
|
||||
AutoCompleteTextView editTextDropdownCommessa = mBinding.dropdownCommessa;
|
||||
editTextDropdownCommessa.setThreshold(0);
|
||||
editTextDropdownCommessa.setAdapter(commessaAdapter);
|
||||
|
||||
DialogAskCliente_Page1_Commessa_ArrayAdapter commessaAdapter = new DialogAskCliente_Page1_Commessa_ArrayAdapter(mContext);
|
||||
|
||||
AutoCompleteTextView editTextDropdownCommessa = mBinding.dropdownCommessa;
|
||||
editTextDropdownCommessa.setThreshold(0);
|
||||
editTextDropdownCommessa.setAdapter(commessaAdapter);
|
||||
|
||||
codJcoms.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
commessaAdapter.clear();
|
||||
commessaAdapter.addAll(codJcoms);
|
||||
}
|
||||
codJcoms.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
commessaAdapter.clear();
|
||||
commessaAdapter.addAll(codJcoms);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
@@ -10,8 +12,8 @@ import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBask
|
||||
public class DialogBasketLUModule {
|
||||
|
||||
@Provides
|
||||
DialogBasketLU_Page1_ViewModel providesDialogBasketLUPage1ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
||||
return new DialogBasketLU_Page1_ViewModel(colliMagazzinoRESTConsumer);
|
||||
DialogBasketLU_Page1_ViewModel providesDialogBasketLUPage1ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, Handler handler) {
|
||||
return new DialogBasketLU_Page1_ViewModel(colliMagazzinoRESTConsumer, handler);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -36,7 +37,8 @@ public class DialogBasketLUView extends BaseDialogFragment {
|
||||
private final RunnableArgs<MtbColt> mOnComplete;
|
||||
private DialogBasketLuBinding mBindings;
|
||||
|
||||
|
||||
@Inject
|
||||
Handler handler;
|
||||
|
||||
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
|
||||
mOnComplete = onComplete;
|
||||
@@ -52,7 +54,7 @@ public class DialogBasketLUView extends BaseDialogFragment {
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
@@ -30,9 +31,12 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
|
||||
|
||||
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
||||
|
||||
private final Handler handler;
|
||||
|
||||
@Inject
|
||||
public DialogBasketLU_Page1_ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
||||
public DialogBasketLU_Page1_ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, Handler handler) {
|
||||
this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,16 +57,19 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
|
||||
@Override
|
||||
public void onShow() {
|
||||
this.mBinding.getRoot().requestLayout();
|
||||
|
||||
mBinding.constraintLayout.setMaxHeight((int) (mContext.getResources().getDisplayMetrics().heightPixels * 0.75));
|
||||
|
||||
colliMagazzinoRESTConsumer.retrieveBasketColli(mtbColts -> {
|
||||
availableMtbColts = mtbColts;
|
||||
if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts);
|
||||
handler.post(() -> {
|
||||
availableMtbColts = mtbColts;
|
||||
if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts);
|
||||
|
||||
mBinding.emptyView.setVisibility(mtbColts != null && !mtbColts.isEmpty() ? View.GONE : View.VISIBLE);
|
||||
mBinding.emptyView.setVisibility(mtbColts != null && !mtbColts.isEmpty() ? View.GONE : View.VISIBLE);
|
||||
});
|
||||
}, ex -> {
|
||||
mBinding.emptyView.setVisibility(View.VISIBLE);
|
||||
handler.post(() -> {
|
||||
mBinding.emptyView.setVisibility(View.VISIBLE);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class DialogChooseArtFromListaArtsView extends BaseDialogFragment {
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
dismiss();
|
||||
//dismiss();
|
||||
}
|
||||
|
||||
public void dismiss(MtbAart item) {
|
||||
|
||||
@@ -41,6 +41,7 @@ public class DialogInputQuantityV2DTO {
|
||||
private boolean isNotesAllowed = false;
|
||||
private boolean isNotesMandatory = false;
|
||||
private boolean isNumCnfEditable = true;
|
||||
private boolean isQtaTotEditable = true;
|
||||
private boolean isFocusOnStart = true;
|
||||
private boolean canLUBeClosed;
|
||||
private boolean saveOnImeDone = false;
|
||||
@@ -323,6 +324,15 @@ public class DialogInputQuantityV2DTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isQtaTotEditable() {
|
||||
return isQtaTotEditable;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setQtaTotEditable(boolean qtaTotEditable) {
|
||||
this.isQtaTotEditable = qtaTotEditable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> getSuggestPartitaMag() {
|
||||
return suggestPartitaMag;
|
||||
}
|
||||
|
||||
@@ -255,9 +255,9 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
handler.post(() -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
this.mViewModel.processBarcodeDTO(data);
|
||||
this.onLoadingEnded();
|
||||
@@ -397,7 +397,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
toggleTextInputLayoutError(textColorsNumCnf, this.mBindings.inputNumCnfLayout, value);
|
||||
|
||||
if (this.mViewModel.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||
this.enabledQtaTot.set(!value);
|
||||
this.enabledQtaTot.set(this.mDialogInputQuantityV2DTO.isQtaTotEditable() && !value);
|
||||
} else {
|
||||
if (value) {
|
||||
if (this.mViewModel.blockedQtaCnf.get()) {
|
||||
@@ -407,7 +407,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
} else {
|
||||
if (!this.enabledQtaTot.get()) {
|
||||
this.enabledQtaTot.set(true);
|
||||
this.enabledQtaTot.set(this.mDialogInputQuantityV2DTO.isQtaTotEditable());
|
||||
} else if (!this.enabledQtaCnf.get()) {
|
||||
this.enabledQtaCnf.set(true);
|
||||
}
|
||||
@@ -426,7 +426,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
} else {
|
||||
if (!this.enabledQtaTot.get()) {
|
||||
this.enabledQtaTot.set(true);
|
||||
this.enabledQtaTot.set(this.mDialogInputQuantityV2DTO.isQtaTotEditable());
|
||||
} else if (!this.enabledNumCnf.get()) {
|
||||
this.enabledNumCnf.set(this.mDialogInputQuantityV2DTO.isNumCnfEditable());
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public class DialogScanOrCreateLUViewModel {
|
||||
|
||||
} else {
|
||||
var createUdcRequest = new CreateUDCRequestDTO()
|
||||
.setBarcodeUl(barcodeScanDTO.getStringValue())
|
||||
.setBarcodeUl(ean128Model.Sscc)
|
||||
.setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
||||
|
||||
this.mColliLavorazioneRESTConsumer.createUDC(createUdcRequest, createdMtbColt -> {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '2.1.0'
|
||||
agp_version = '8.8.0'
|
||||
agp_version = '8.10.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Mon Feb 13 15:14:43 CET 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user