Compare commits

...

4 Commits

Author SHA1 Message Date
8d2d0ad195 Finish v1.46.06(494) 2025-04-15 18:41:01 +02:00
f342cd0e5f -> v1.46.06 (494) 2025-04-15 18:40:53 +02:00
c287852ce6 Fix modal BatchLotSelection 2025-04-15 18:39:38 +02:00
edc9470e9b Finish v1.46.05(493) 2025-04-10 10:21:37 +02:00
2 changed files with 32 additions and 21 deletions

View File

@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android { android {
def appVersionCode = 493 def appVersionCode = 494
def appVersionName = '1.46.05' def appVersionName = '1.46.06'
signingConfigs { signingConfigs {
release { release {

View File

@@ -515,7 +515,6 @@ public class SpedizioneViewModel {
} }
private Pair<Boolean, MtbDepoPosizione> sendLUPositionChangeRequest() { private Pair<Boolean, MtbDepoPosizione> sendLUPositionChangeRequest() {
final CountDownLatch latch = new CountDownLatch(1); final CountDownLatch latch = new CountDownLatch(1);
AtomicReference<Pair<Boolean, MtbDepoPosizione>> result = new AtomicReference<>(); AtomicReference<Pair<Boolean, MtbDepoPosizione>> result = new AtomicReference<>();
@@ -533,9 +532,22 @@ public class SpedizioneViewModel {
return null; return null;
} }
private void sendBatchLotSelectionRequest(List<MtbPartitaMag> availableBatchLots, RunnableArgs<MtbPartitaMag> onComplete) { private MtbPartitaMag sendBatchLotSelectionRequest(List<MtbPartitaMag> availableBatchLots) {
if (this.mListener != null) final CountDownLatch latch = new CountDownLatch(1);
mListener.onBatchLotSelectionRequest(availableBatchLots, onComplete); 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 { public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) throws Exception {
@@ -1016,24 +1028,23 @@ public class SpedizioneViewModel {
.collect(Collectors.toList())); .collect(Collectors.toList()));
} }
this.sendBatchLotSelectionRequest(tmp, selected -> { var selected = this.sendBatchLotSelectionRequest(tmp);
this.sendOnLoadingEnded(); this.sendOnLoadingEnded();
if (selected != null) { if (selected != null) {
MtbColr scannedMtbColr = pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().stream() MtbColr scannedMtbColr = pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().stream()
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) && .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 && x.getPartitaMag().equalsIgnoreCase(selected.getPartitaMag()))
|| (x.getPartitaMag() == null && selected.getPartitaMag() == null))) || (x.getPartitaMag() == null && selected.getPartitaMag() == null)))
.findFirst() .findFirst()
.orElse(null); .orElse(null);
try { try {
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately); dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately);
} catch (Exception e) { } catch (Exception e) {
this.sendError(e); this.sendError(e);
}
} }
}); }
} else { } else {
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged, executeImmediately); dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged, executeImmediately);