Fix descrizione riga UL in ContenutoBancaleActivity
This commit is contained in:
parent
0ae1ac87d5
commit
4f4dea9097
@ -25,8 +25,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
applicationVariants.configureEach { variant ->
|
||||
variant.outputs.configureEach { output ->
|
||||
output.outputFileName = "android-release.apk"
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import java.util.Date;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class MtbColr extends EntityBase {
|
||||
|
||||
@ -372,7 +373,7 @@ public class MtbColr extends EntityBase {
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
return UtilityString.isNull(descrizione, getMtbAart() != null ? UtilityString.isNull(getMtbAart().getDescrizioneEstesa(), getMtbAart().getDescrizione()) : null);
|
||||
}
|
||||
|
||||
public MtbColr setDescrizione(String descrizione) {
|
||||
|
||||
@ -9,7 +9,6 @@ import java.util.List;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepo;
|
||||
|
||||
@Singleton
|
||||
@ -28,27 +27,4 @@ public class DepositoRESTConsumer extends _BaseRESTConsumer {
|
||||
}.getType();
|
||||
this.systemRESTConsumer.processSql("SELECT * FROM mtb_depo", typeOfObjectsList, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void getDepoByCodMdep(String codMdep, RunnableArgs<MtbDepo> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
MtbDepo mtbDepo = new MtbDepo();
|
||||
mtbDepo.setCodMdep(codMdep);
|
||||
mtbDepo.setOperation(CommonModelConsts.OPERATION.SELECT);
|
||||
mtbDepo.setOnlyPkMaster(false);
|
||||
|
||||
this.entityRESTConsumer.selectEntity(mtbDepo, new ISimpleOperationCallback<>() {
|
||||
@Override
|
||||
public void onSuccess(List<MtbDepo> value) {
|
||||
if (value != null && value.size() > 0) {
|
||||
onComplete.run(value.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
onFailed.run(ex);
|
||||
}
|
||||
}, MtbDepo.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -121,11 +121,12 @@ public class EntityRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public <T extends EntityBase> void selectEntity(T entityToSave, final ISimpleOperationCallback<List<T>> callback, Class type) {
|
||||
|
||||
EntityRESTConsumerService service = RESTBuilder.getService(EntityRESTConsumerService.class);
|
||||
Call<ServiceRESTResponse<JsonObject>> request = service.processEntity(entityToSave);
|
||||
request.enqueue(new Callback<ServiceRESTResponse<JsonObject>>() {
|
||||
request.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
|
||||
if (response.isSuccessful()) {
|
||||
|
||||
@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.databinding.ActivityContenutoBancaleBinding;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ui.ContenutoBancaleListAdapter;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
@ -124,9 +125,10 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
}
|
||||
|
||||
private void initColloInfo() {
|
||||
mDepositoRESTConsumer.getDepoByCodMdep(mtbColt.get().getCodMdep(), depo -> {
|
||||
descrizioneDepo.set("(" + depo.getDescrizione() + ")");
|
||||
}, this::onError);
|
||||
SettingsManager.iDB().getAvailableCodMdep().stream()
|
||||
.filter(x -> x.getCodMdep().equalsIgnoreCase(mtbColt.get().getCodMdep()))
|
||||
.findFirst()
|
||||
.ifPresent(x -> descrizioneDepo.set("(" + x.getDescrizione() + ")"));
|
||||
}
|
||||
|
||||
private void initFab() {
|
||||
@ -138,7 +140,7 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
fabPopupMenu.setForceShowIcon(true);
|
||||
fabPopupMenu.getMenuInflater().inflate(R.menu.contenuto_bancale_fab_menu, fabPopupMenu.getMenu());
|
||||
|
||||
if(mtbColt.get().isDocumentPresent()){
|
||||
if (mtbColt.get().isDocumentPresent()) {
|
||||
fabPopupMenu.getMenu().removeItem(R.id.delete_ul);
|
||||
}
|
||||
|
||||
|
||||
@ -26,18 +26,16 @@ public class ListaBancaliViewModel {
|
||||
public void dispatchMtbColt(MtbColt mtbColtToDispatch, boolean onlyResiduo, RunnableArgs<MtbColt> onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
new Thread(() -> {
|
||||
mColliMagazzinoRESTConsumer.getByTestata(mtbColtToDispatch, onlyResiduo, false, mtbColt -> {
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
ObservableArrayList<MtbColr> mtbColrObservableArrayList = new ObservableArrayList<>();
|
||||
if(mtbColt != null && mtbColt.getMtbColr() != null) mtbColrObservableArrayList.addAll(mtbColt.getMtbColr());
|
||||
if (mtbColt != null && mtbColt.getMtbColr() != null)
|
||||
mtbColrObservableArrayList.addAll(mtbColt.getMtbColr());
|
||||
mtbColtToDispatch.setMtbColr(mtbColrObservableArrayList);
|
||||
|
||||
onComplete.run(mtbColtToDispatch);
|
||||
}, this::sendError);
|
||||
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user