Merge branch 'develop' into feature/RefactoringGestioneColli

This commit is contained in:
2025-04-08 11:15:06 +02:00
3 changed files with 41 additions and 4 deletions

View File

@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 489
def appVersionName = '1.46.01'
def appVersionCode = 490
def appVersionName = '1.46.02'
signingConfigs {
release {

View File

@@ -40,6 +40,7 @@ import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
import it.integry.integrywmsnative.core.model.VtbDest;
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
@@ -649,6 +650,41 @@ 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()) &&
mCurrentMtbColt.getMtbColr().isEmpty();
String newCodMdep = shouldChangeCodMdep ? refMtbColt.getCodMdep() : null;
if (shouldChangeCodMdep) {
mColliMagazzinoRESTConsumer.spostaUlSynchronized(mCurrentMtbColt, newCodMdep, null, false);
mCurrentMtbColt.setCodMdep(newCodMdep);
}
}
private void executeTipoUlChangeIfNeeded(MtbColt refMtbColt) throws Exception {
boolean shouldChangeCodTcol = refMtbColt != null && refMtbColt.getCodTcol() != null &&
!refMtbColt.getCodTcol().equalsIgnoreCase(mCurrentMtbColt.getCodTcol()) &&
mCurrentMtbColt.getMtbColr().isEmpty();
String newTipoUL = shouldChangeCodTcol ? refMtbColt.getCodTcol() : null;
ObservableMtbTcol newMtbTcol = SettingsManager.iDB().getInternalImballi().stream()
.filter(x -> x.getCodTcol().equalsIgnoreCase(newTipoUL))
.findFirst()
.orElse(null);
if (!UtilityString.isNullOrEmpty(newTipoUL) && newMtbTcol == null) {
throw new Exception("Impossibile riconoscere il tipo UL " + newTipoUL);
}
if (shouldChangeCodTcol && newMtbTcol != null) {
mColliMagazzinoRESTConsumer.updateTipoULSynchronized(mCurrentMtbColt, newMtbTcol.getCodTcol());
mCurrentMtbColt.setCodTcol(newMtbTcol.getCodTcol());
}
}
private MtbColt loadRifULFromMtbColr(MtbColr mtbColr) throws Exception {
//Se ho dei riferimenti ad una UL devo leggere la QTA ancora disponibile sulla Ul
if (mtbColr != null &&

View File

@@ -874,13 +874,14 @@ public class SpedizioneViewModel {
ObservableArrayList<MtbColr> cloneMtbColrs = cloneMtbColt.getMtbColr();
cloneMtbColt.getMtbColr().stream()
var toBeRemoved = cloneMtbColt.getMtbColr().stream()
.filter(x -> !(UtilityString.equalsIgnoreCase(x.getCodMart(), matchedObject.getSitArtOrdDTO().getCodMart()) &&
UtilityString.equalsIgnoreCase(x.getCodTagl(), matchedObject.getSitArtOrdDTO().getCodTagl()) &&
UtilityString.equalsIgnoreCase(x.getCodCol(), matchedObject.getSitArtOrdDTO().getCodCol()) &&
(!mEnableCheckPartitaMag || UtilityString.equalsIgnoreCase(x.getPartitaMag(), matchedObject.getSitArtOrdDTO().getPartitaMag()) ||
UtilityString.isNullOrEmpty(matchedObject.getSitArtOrdDTO().getPartitaMag()))))
.forEach(cloneMtbColrs::remove);
.collect(Collectors.toList());
cloneMtbColrs.removeAll(toBeRemoved);
cloneMtbColt.setMtbColr(cloneMtbColrs);