Finish v1.16.17(199)

This commit is contained in:
Giuseppe Scorrano 2021-03-16 17:55:28 +01:00
commit e55b6f4934
8 changed files with 22 additions and 16 deletions

View File

@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
android { android {
def appVersionCode = 198 def appVersionCode = 199
def appVersionName = '1.16.16' def appVersionName = '1.16.17'
signingConfigs { signingConfigs {
release { release {

View File

@ -411,7 +411,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) { if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
List<MtbColt> mtbColtList = new ArrayList<>(); List<MtbColt> mtbColtList = new ArrayList<>();
mtbColtList.add(mtbColt); mtbColtList.add(mtbColt);
fillMtbAartsOfMtbColts(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed); fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
} else { } else {
onComplete.run(mtbColt); 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<>(); List<String> codMarts = new ArrayList<>();
for (MtbColt mtbColt : mtbColts) { for (MtbColt mtbColt : mtbColts) {
@ -661,7 +664,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
@Override @Override
public void onResponse(Call<ServiceRESTResponse<List<MtbColt>>> call, Response<ServiceRESTResponse<List<MtbColt>>> response) { public void onResponse(Call<ServiceRESTResponse<List<MtbColt>>> call, Response<ServiceRESTResponse<List<MtbColt>>> response) {
analyzeAnswer(response, "getColliInBasket", mtbColts -> { analyzeAnswer(response, "getColliInBasket", mtbColts -> {
fillMtbAartsOfMtbColts(mtbColts, onComplete, onFailed); fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
}, onFailed); }, onFailed);
} }

View File

@ -173,7 +173,7 @@ public class AccettazionePickingViewModel {
public void retrieveExistentLU(RunnableArgs<ArrayList<RecoverMtbColt>> onComplete) { public void retrieveExistentLU(RunnableArgs<ArrayList<RecoverMtbColt>> onComplete) {
this.sendOnLoadingStarted(); this.sendOnLoadingStarted();
this.mAccettazionePickingRESTConsumer.getBancaliGiaRegistrati(this.mSitArts, mtbColtList -> { this.mAccettazionePickingRESTConsumer.getBancaliGiaRegistrati(this.mOrders, mtbColtList -> {
this.sendOnLoadingEnded(); this.sendOnLoadingEnded();
onComplete.run(mtbColtList); onComplete.run(mtbColtList);
}, this::sendError); }, this::sendError);

View File

@ -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.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityLogger; import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.integrywmsnative.core.utility.UtilityQuery; import it.integry.integrywmsnative.core.utility.UtilityQuery;
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO; import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
@Singleton @Singleton
public class AccettazionePickingRESTConsumer { public class AccettazionePickingRESTConsumer {
@ -28,18 +28,18 @@ public class AccettazionePickingRESTConsumer {
this.mSystemRestConsumer = systemRESTConsumer; 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<>(); List<HashMap<String, Object>> whereCondListMap = new ArrayList<>();
Stream Stream
.of(ordiniToShow) .of(ordiniToShow)
.distinctBy(x -> x.getDataOrd() + " " + x.getGestione() + " " + x.getNumOrd()) .distinctBy(x -> x.getData() + " " + x.getGestione() + " " + x.getNumero())
.forEach(x -> { .forEach(x -> {
try { try {
HashMap<String, Object> whereCondMap = new HashMap<>(); 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.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); whereCondListMap.add(whereCondMap);
} catch (Exception ex) { } catch (Exception ex) {

View File

@ -63,7 +63,7 @@ public class ListaBancaliViewModel implements IRecyclerItemClicked<MtbColt> {
ColliMagazzinoRESTConsumer.getByTestataStatic(item, mLoadOnlyResiduo, false, mtbColt -> { ColliMagazzinoRESTConsumer.getByTestataStatic(item, mLoadOnlyResiduo, false, mtbColt -> {
ObservableArrayList<MtbColr> mtbColrObservableArrayList = new ObservableArrayList<>(); ObservableArrayList<MtbColr> mtbColrObservableArrayList = new ObservableArrayList<>();
mtbColrObservableArrayList.addAll(mtbColt.getMtbColr()); if(mtbColt != null && mtbColt.getMtbColr() != null) mtbColrObservableArrayList.addAll(mtbColt.getMtbColr());
item.setMtbColr(mtbColrObservableArrayList); item.setMtbColr(mtbColrObservableArrayList);
progress.dismiss(); progress.dismiss();

View File

@ -1594,7 +1594,8 @@ public class SpedizioneViewModel {
IOrdiniVendita ordiniVendita = ClassRouter.getInstance(ClassRouter.PATH.ORDINI_VENDITA); IOrdiniVendita ordiniVendita = ClassRouter.getInstance(ClassRouter.PATH.ORDINI_VENDITA);
ordiniVendita.distribuisciCollo(cloneMtbColt, mTestateOrdini, mtbColts -> { 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); }, this::sendError);
} }

View File

@ -145,12 +145,11 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> { private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
BarcodeManager.disable(); BarcodeManager.disable();
this.openProgress(); this.openProgress();
this.mViewModel.processBarcodeDTO(data, () -> { this.mViewModel.processBarcodeDTO(data, () -> {
BarcodeManager.enable();
this.closeProgress(); this.closeProgress();
BarcodeManager.enable();
}); });
}; };

View File

@ -125,6 +125,9 @@ public class DialogInputQuantityV2ViewModel {
this.setNumCnf(BigDecimal.ONE); this.setNumCnf(BigDecimal.ONE);
this.setQtaCnf(UtilityBigDecimal.divide(this.getQtaTot(), this.getNumCnf())); this.setQtaCnf(UtilityBigDecimal.divide(this.getQtaTot(), this.getNumCnf()));
} }
this.unlockNumCnf();
this.unlockQtaCnf();
} }
onComplete.run(); onComplete.run();
@ -302,7 +305,7 @@ public class DialogInputQuantityV2ViewModel {
} }
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null) 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) else if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf); this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);