Fix vari
This commit is contained in:
parent
a939f0ba08
commit
d4f44c1ab7
@ -411,7 +411,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||
List<MtbColt> mtbColtList = new ArrayList<>();
|
||||
mtbColtList.add(mtbColt);
|
||||
fillMtbAartsOfMtbColts(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
|
||||
fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
|
||||
} else {
|
||||
onComplete.run(mtbColt);
|
||||
}
|
||||
@ -426,8 +426,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public static void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public static void fillMtbAartsOfMtbColtsStatic(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
List<String> codMarts = new ArrayList<>();
|
||||
|
||||
for (MtbColt mtbColt : mtbColts) {
|
||||
@ -661,7 +664,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<MtbColt>>> call, Response<ServiceRESTResponse<List<MtbColt>>> response) {
|
||||
analyzeAnswer(response, "getColliInBasket", mtbColts -> {
|
||||
fillMtbAartsOfMtbColts(mtbColts, onComplete, onFailed);
|
||||
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ public class AccettazionePickingViewModel {
|
||||
public void retrieveExistentLU(RunnableArgs<ArrayList<RecoverMtbColt>> onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mAccettazionePickingRESTConsumer.getBancaliGiaRegistrati(this.mSitArts, mtbColtList -> {
|
||||
this.mAccettazionePickingRESTConsumer.getBancaliGiaRegistrati(this.mOrders, mtbColtList -> {
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run(mtbColtList);
|
||||
}, this::sendError);
|
||||
|
||||
@ -16,7 +16,7 @@ import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
||||
|
||||
@Singleton
|
||||
public class AccettazionePickingRESTConsumer {
|
||||
@ -28,18 +28,18 @@ public class AccettazionePickingRESTConsumer {
|
||||
this.mSystemRestConsumer = systemRESTConsumer;
|
||||
}
|
||||
|
||||
public void getBancaliGiaRegistrati(List<SitArtOrdDTO> ordiniToShow, RunnableArgs<ArrayList<RecoverMtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public void getBancaliGiaRegistrati(List<OrdineAccettazioneInevasoDTO> ordiniToShow, RunnableArgs<ArrayList<RecoverMtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
List<HashMap<String, Object>> whereCondListMap = new ArrayList<>();
|
||||
|
||||
Stream
|
||||
.of(ordiniToShow)
|
||||
.distinctBy(x -> x.getDataOrd() + " " + x.getGestione() + " " + x.getNumOrd())
|
||||
.distinctBy(x -> x.getData() + " " + x.getGestione() + " " + x.getNumero())
|
||||
.forEach(x -> {
|
||||
try {
|
||||
HashMap<String, Object> whereCondMap = new HashMap<>();
|
||||
whereCondMap.put("mtb_colr.data_ord", UtilityDate.recognizeDate(x.getDataOrd()));
|
||||
whereCondMap.put("mtb_colr.data_ord", UtilityDate.recognizeDate(x.getData()));
|
||||
whereCondMap.put("mtb_colr.gestione", x.getGestione().equalsIgnoreCase("P") ? "L" : x.getGestione());
|
||||
whereCondMap.put("mtb_colr.num_ord", x.getNumOrd());
|
||||
whereCondMap.put("mtb_colr.num_ord", x.getNumero());
|
||||
|
||||
whereCondListMap.add(whereCondMap);
|
||||
} catch (Exception ex) {
|
||||
|
||||
@ -63,7 +63,7 @@ public class ListaBancaliViewModel implements IRecyclerItemClicked<MtbColt> {
|
||||
ColliMagazzinoRESTConsumer.getByTestataStatic(item, mLoadOnlyResiduo, false, mtbColt -> {
|
||||
|
||||
ObservableArrayList<MtbColr> mtbColrObservableArrayList = new ObservableArrayList<>();
|
||||
mtbColrObservableArrayList.addAll(mtbColt.getMtbColr());
|
||||
if(mtbColt != null && mtbColt.getMtbColr() != null) mtbColrObservableArrayList.addAll(mtbColt.getMtbColr());
|
||||
item.setMtbColr(mtbColrObservableArrayList);
|
||||
|
||||
progress.dismiss();
|
||||
|
||||
@ -1594,7 +1594,8 @@ public class SpedizioneViewModel {
|
||||
|
||||
IOrdiniVendita ordiniVendita = ClassRouter.getInstance(ClassRouter.PATH.ORDINI_VENDITA);
|
||||
ordiniVendita.distribuisciCollo(cloneMtbColt, mTestateOrdini, mtbColts -> {
|
||||
mColliMagazzinoRESTConsumer.getMultipleByTestate(mtbColts, false, onComplete, this::sendError);
|
||||
mColliMagazzinoRESTConsumer.fillMtbAartsOfMtbColts(mtbColts, onComplete, this::sendError);
|
||||
// mColliMagazzinoRESTConsumer.getMultipleByTestate(mtbColts, false, onComplete, this::sendError);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@ -145,12 +145,11 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
this.openProgress();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
BarcodeManager.enable();
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -125,6 +125,9 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.setNumCnf(BigDecimal.ONE);
|
||||
this.setQtaCnf(UtilityBigDecimal.divide(this.getQtaTot(), this.getNumCnf()));
|
||||
}
|
||||
|
||||
this.unlockNumCnf();
|
||||
this.unlockQtaCnf();
|
||||
}
|
||||
|
||||
onComplete.run();
|
||||
@ -302,7 +305,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
}
|
||||
|
||||
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null)
|
||||
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalQtaTot);
|
||||
this.internalQtaCnf = UtilityBigDecimal.divide(internalQtaTot, newValue);
|
||||
else if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
|
||||
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user