Finish v1_11_0(119)
This commit is contained in:
commit
0967f484a4
@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 117
|
def appVersionCode = 119
|
||||||
def appVersionName = '1.10.14'
|
def appVersionName = '1.11.0'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import androidx.databinding.Observable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableFloat;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ChooseOrdsLavFromListItemModel;
|
||||||
|
|
||||||
|
public class CheckableOrdineLavoro {
|
||||||
|
|
||||||
|
|
||||||
|
private ChooseOrdsLavFromListItemModel item;
|
||||||
|
private BindableBoolean checked = new BindableBoolean(false);
|
||||||
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
|
private String testata;
|
||||||
|
|
||||||
|
public CheckableOrdineLavoro(ChooseOrdsLavFromListItemModel item) {
|
||||||
|
this.item = item;
|
||||||
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
hidden.set(item.isHidden());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChooseOrdsLavFromListItemModel getItem() {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CheckableOrdineLavoro setItem(ChooseOrdsLavFromListItemModel item) {
|
||||||
|
this.item = item;
|
||||||
|
|
||||||
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
hidden.set(item.isHidden());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getChecked() {
|
||||||
|
return checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CheckableOrdineLavoro setChecked(BindableBoolean checked) {
|
||||||
|
this.checked = checked;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHidden() {
|
||||||
|
return hidden.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CheckableOrdineLavoro setHidden(BindableBoolean hidden) {
|
||||||
|
this.hidden = hidden;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableFloat getQtaCol() {
|
||||||
|
return item.getOrdineLav().getQtaColVersamento();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtaCol(float qtaCnf) {
|
||||||
|
this.item.getOrdineLav().setQtaColVersamento(qtaCnf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void toggleCheck() {
|
||||||
|
this.checked.set(!this.checked.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isChecked() {
|
||||||
|
return checked.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTestata() {
|
||||||
|
return testata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTestata(String testata) {
|
||||||
|
this.testata = testata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableFloat getNumCnf() {
|
||||||
|
return item.getOrdineLav().getNumCnfVersamento();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumCnf(float numCnf) {
|
||||||
|
this.item.getOrdineLav().setNumCnfVersamento(numCnf);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -37,14 +38,14 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteClienteDTO;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
public static void saveCollo(MtbColt mtbColtToSave, final ISimpleOperationCallback<MtbColt> callback){
|
public static void saveCollo(MtbColt mtbColtToSave, final ISimpleOperationCallback<MtbColt> callback) {
|
||||||
|
|
||||||
for (int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
|
||||||
mtbColtToSave.getMtbColr().get(i)
|
mtbColtToSave.getMtbColr().get(i)
|
||||||
@ -57,7 +58,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed){
|
public static void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
||||||
|
|
||||||
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
||||||
@ -65,28 +66,28 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
for (int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
|
||||||
mtbColtToSaveClone.getMtbColr().add(
|
mtbColtToSaveClone.getMtbColr().add(
|
||||||
((MtbColr) mtbColtToSave.getMtbColr().get(i).clone())
|
((MtbColr) mtbColtToSave.getMtbColr().get(i).clone())
|
||||||
.setMtbAart(null)
|
.setMtbAart(null)
|
||||||
.setRifPartitaMag(null));
|
.setRifPartitaMag(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityRESTConsumer.processEntity(mtbColtToSaveClone, new ISimpleOperationCallback<MtbColt>() {
|
EntityRESTConsumer.processEntity(mtbColtToSaveClone, new ISimpleOperationCallback<MtbColt>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColt value) {
|
public void onSuccess(MtbColt value) {
|
||||||
if(onComplete != null) onComplete.run(value);
|
if (onComplete != null) onComplete.run(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
}, MtbColt.class);
|
}, MtbColt.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed){
|
public static void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
for(MtbColt mtbColt : mtbColtsToSave) {
|
for (MtbColt mtbColt : mtbColtsToSave) {
|
||||||
mtbColt.setMtbCols(null);
|
mtbColt.setMtbCols(null);
|
||||||
|
|
||||||
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
||||||
@ -99,18 +100,18 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
EntityRESTConsumer.processEntityList(mtbColtsToSave, new ISimpleOperationCallback<List<MtbColt>>() {
|
EntityRESTConsumer.processEntityList(mtbColtsToSave, new ISimpleOperationCallback<List<MtbColt>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<MtbColt> value) {
|
public void onSuccess(List<MtbColt> value) {
|
||||||
if(onComplete != null) onComplete.run(value);
|
if (onComplete != null) onComplete.run(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
}, true, MtbColt.class);
|
}, true, MtbColt.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void saveRigaCollo(MtbColr mtbColrToSave, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed){
|
public static void saveRigaCollo(MtbColr mtbColrToSave, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
mtbColrToSave.setMtbAart(null);
|
mtbColrToSave.setMtbAart(null);
|
||||||
mtbColrToSave.setRifPartitaMag(null);
|
mtbColrToSave.setRifPartitaMag(null);
|
||||||
@ -118,12 +119,12 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
EntityRESTConsumer.processEntity(mtbColrToSave, new ISimpleOperationCallback<MtbColr>() {
|
EntityRESTConsumer.processEntity(mtbColrToSave, new ISimpleOperationCallback<MtbColr>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColr value) {
|
public void onSuccess(MtbColr value) {
|
||||||
if(onComplete != null) onComplete.run(value);
|
if (onComplete != null) onComplete.run(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
}, MtbColr.class);
|
}, MtbColr.class);
|
||||||
|
|
||||||
@ -143,12 +144,12 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
saveCollo(mtbColtToCreate, new ISimpleOperationCallback<MtbColt>() {
|
saveCollo(mtbColtToCreate, new ISimpleOperationCallback<MtbColt>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColt value) {
|
public void onSuccess(MtbColt value) {
|
||||||
if(onComplete != null) onComplete.run(value);
|
if (onComplete != null) onComplete.run(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -188,17 +189,17 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
// .setCodVdes(null)
|
// .setCodVdes(null)
|
||||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||||
|
|
||||||
if(posizione != null) {
|
if (posizione != null) {
|
||||||
newMtbColt
|
newMtbColt
|
||||||
.setPosizione(posizione.getPosizione());
|
.setPosizione(posizione.getPosizione());
|
||||||
|
|
||||||
if(posizione.isFlagLineaProduzione()) {
|
if (posizione.isFlagLineaProduzione()) {
|
||||||
newMtbColt
|
newMtbColt
|
||||||
.setCodJfas(posizione.getPosizione());
|
.setCodJfas(posizione.getPosizione());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < sourceMtbColt.getMtbColr().size(); i++) {
|
for (int i = 0; i < sourceMtbColt.getMtbColr().size(); i++) {
|
||||||
|
|
||||||
MtbColr mtbColrClone = (MtbColr) sourceMtbColt.getMtbColr().get(i).clone();
|
MtbColr mtbColrClone = (MtbColr) sourceMtbColt.getMtbColr().get(i).clone();
|
||||||
|
|
||||||
@ -222,12 +223,87 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
saveCollo(newMtbColt, new ISimpleOperationCallback<MtbColt>() {
|
saveCollo(newMtbColt, new ISimpleOperationCallback<MtbColt>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColt value) {
|
public void onSuccess(MtbColt value) {
|
||||||
if(onComplete != null) onComplete.run(value);
|
if (onComplete != null) onComplete.run(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void createColliScaricoDaOrdineLavorazione(MtbColt sourceMtbColt, MtbDepoPosizione posizione, List<OrdineLavorazioneDTO> ordini, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
MtbColt newMtbColt = new MtbColt()
|
||||||
|
.initDefaultFields()
|
||||||
|
.setCodAnag(null)
|
||||||
|
.setGestione(GestioneEnum.LAVORAZIONE)
|
||||||
|
.setSegno(-1)
|
||||||
|
.setCodTcol(sourceMtbColt.getCodTcol())
|
||||||
|
.setPesoKg(sourceMtbColt.getPesoKg())
|
||||||
|
.setPesoNettoKg(sourceMtbColt.getPesoNettoKg())
|
||||||
|
.setLarghezzaCm(sourceMtbColt.getLarghezzaCm())
|
||||||
|
.setLunghezzaCm(sourceMtbColt.getLunghezzaCm())
|
||||||
|
.setAltezzaCm(sourceMtbColt.getAltezzaCm())
|
||||||
|
.setCodMdep(sourceMtbColt.getCodMdep())
|
||||||
|
.setDataVers(UtilityDate.getDateInstance())
|
||||||
|
.setOraFinePrep(UtilityDate.getDateInstance());
|
||||||
|
|
||||||
|
newMtbColt.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||||
|
|
||||||
|
|
||||||
|
if (posizione != null) {
|
||||||
|
newMtbColt.setPosizione(posizione.getPosizione());
|
||||||
|
if (posizione.isFlagLineaProduzione()) {
|
||||||
|
newMtbColt.setCodJfas(posizione.getPosizione());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (sourceMtbColt.getMtbColr().size() != 1) {
|
||||||
|
onFailed.run(new Exception());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MtbColr original = sourceMtbColt.getMtbColr().get(0);
|
||||||
|
MtbColr mtbColrClone = new MtbColr();
|
||||||
|
mtbColrClone
|
||||||
|
.setNumCollo(null)
|
||||||
|
.setDataCollo(null)
|
||||||
|
.setRiga(null)
|
||||||
|
.setGestione(GestioneEnum.LAVORAZIONE)
|
||||||
|
.setDataColloRif(sourceMtbColt.getDataColloD())
|
||||||
|
.setNumColloRif(sourceMtbColt.getNumCollo())
|
||||||
|
.setGestioneRif(sourceMtbColt.getGestione())
|
||||||
|
.setSerColloRif(sourceMtbColt.getSerCollo())
|
||||||
|
.setCodMart(original.getCodMart())
|
||||||
|
.setCodCol(original.getCodCol())
|
||||||
|
.setQtaCnf(original.getQtaCnf())
|
||||||
|
.setCodTagl(original.getCodTagl())
|
||||||
|
.setPartitaMag(original.getPartitaMag())
|
||||||
|
.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||||
|
for (OrdineLavorazioneDTO ordLav : ordini) {
|
||||||
|
MtbColr ordColr = (MtbColr) mtbColrClone.clone();
|
||||||
|
ordColr.setQtaCol(ordLav.getQtaColVersamento().getBigDecimal());
|
||||||
|
ordColr.setNumCnf(ordLav.getNumCnfVersamento().getBigDecimal());
|
||||||
|
ordColr.setDataOrd(ordLav.getDataOrdProd())
|
||||||
|
.setNumOrd(ordLav.getNumOrdProd())
|
||||||
|
.setRigaOrd(ordLav.getRigaOrdProd());
|
||||||
|
newMtbColt.getMtbColr().add(ordColr);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
saveCollo(newMtbColt, new ISimpleOperationCallback<MtbColt>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(MtbColt value) {
|
||||||
|
if (onComplete != null) onComplete.run(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(Exception ex) {
|
||||||
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -248,15 +324,15 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
Integer customNumCollo = UtilityBarcode.getNumColloFromULAnonima(barcode);
|
Integer customNumCollo = UtilityBarcode.getNumColloFromULAnonima(barcode);
|
||||||
String customSerCollo = CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE;
|
String customSerCollo = CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE;
|
||||||
|
|
||||||
if(customNumCollo != null) {
|
if (customNumCollo != null) {
|
||||||
mtbColtToCreate.setNumCollo(customNumCollo);
|
mtbColtToCreate.setNumCollo(customNumCollo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(customSerCollo)) {
|
if (!UtilityString.isNullOrEmpty(customSerCollo)) {
|
||||||
mtbColtToCreate.setSerCollo(customSerCollo);
|
mtbColtToCreate.setSerCollo(customSerCollo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!UtilityBarcode.isEtichettaAnonimaOfCurrentYear(barcode)) {
|
if (!UtilityBarcode.isEtichettaAnonimaOfCurrentYear(barcode)) {
|
||||||
onFailed.run(new Exception("Per continuare scansiona un'etichetta dell'anno corrente"));
|
onFailed.run(new Exception("Per continuare scansiona un'etichetta dell'anno corrente"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -267,29 +343,29 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
saveCollo(mtbColtToCreate, new ISimpleOperationCallback<MtbColt>() {
|
saveCollo(mtbColtToCreate, new ISimpleOperationCallback<MtbColt>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColt value) {
|
public void onSuccess(MtbColt value) {
|
||||||
if(onComplete != null) onComplete.run(value);
|
if (onComplete != null) onComplete.run(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed){
|
public static void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
mtbColtToDelete.setOperation(CommonModelConsts.OPERATION.DELETE);
|
mtbColtToDelete.setOperation(CommonModelConsts.OPERATION.DELETE);
|
||||||
|
|
||||||
saveCollo(mtbColtToDelete, new ISimpleOperationCallback<MtbColt>() {
|
saveCollo(mtbColtToDelete, new ISimpleOperationCallback<MtbColt>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColt value) {
|
public void onSuccess(MtbColt value) {
|
||||||
if(onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -306,34 +382,34 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.distribuisciCollo(distribuzioneColloDTO)
|
colliMagazzinoRESTConsumerService.distribuisciCollo(distribuzioneColloDTO)
|
||||||
.enqueue(new Callback<ServiceRESTResponse<JsonObject>>() {
|
.enqueue(new Callback<ServiceRESTResponse<JsonObject>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
|
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
|
||||||
analyzeAnswerList(response, "DistribuzioneCollo", obj -> {
|
analyzeAnswerList(response, "DistribuzioneCollo", obj -> {
|
||||||
|
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
List<JsonObject> jsons = response.body().getEntityList();
|
List<JsonObject> jsons = response.body().getEntityList();
|
||||||
|
|
||||||
List<MtbColt> newList = new ArrayList<>();
|
List<MtbColt> newList = new ArrayList<>();
|
||||||
|
|
||||||
if(jsons != null) {
|
if (jsons != null) {
|
||||||
for (int i = 0; i < jsons.size(); i ++){
|
for (int i = 0; i < jsons.size(); i++) {
|
||||||
JsonObject jsonTmp = jsons.get(i);
|
JsonObject jsonTmp = jsons.get(i);
|
||||||
|
|
||||||
newList.add(gson.fromJson(jsonTmp, MtbColt.class));
|
newList.add(gson.fromJson(jsonTmp, MtbColt.class));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onComplete.run(newList);
|
||||||
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
onComplete.run(newList);
|
public void onFailure(Call<ServiceRESTResponse<JsonObject>> call, Throwable t) {
|
||||||
}, onFailed);
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<JsonObject>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +420,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||||
analyzeAnswer(response, "GetBySSCC", mtbColt -> {
|
analyzeAnswer(response, "GetBySSCC", mtbColt -> {
|
||||||
|
|
||||||
if(mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0){
|
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||||
List<String> codMarts = Stream.of(mtbColt.getMtbColr())
|
List<String> codMarts = Stream.of(mtbColt.getMtbColr())
|
||||||
.map(MtbColr::getCodMart)
|
.map(MtbColr::getCodMart)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
@ -353,7 +429,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
|
|
||||||
ArticoloRESTConsumer.getByCodMart(codMarts, arts -> {
|
ArticoloRESTConsumer.getByCodMart(codMarts, arts -> {
|
||||||
|
|
||||||
if(arts != null && arts.size() > 0) {
|
if (arts != null && arts.size() > 0) {
|
||||||
for (MtbColr mtbColr : mtbColt.getMtbColr()) {
|
for (MtbColr mtbColr : mtbColt.getMtbColr()) {
|
||||||
|
|
||||||
MtbAart foundMtbAart = null;
|
MtbAart foundMtbAart = null;
|
||||||
@ -361,7 +437,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
List<MtbAart> mtbAartStream = Stream.of(arts)
|
List<MtbAart> mtbAartStream = Stream.of(arts)
|
||||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart())).toList();
|
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart())).toList();
|
||||||
|
|
||||||
if(mtbAartStream != null && mtbAartStream.size() > 0){
|
if (mtbAartStream != null && mtbAartStream.size() > 0) {
|
||||||
foundMtbAart = mtbAartStream.get(0);
|
foundMtbAart = mtbAartStream.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +461,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -403,10 +478,8 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static void cyclicGetMultipleByTestate(@NotNull Iterator<MtbColt> sourceMtbColts, boolean onlyResiduo, ArrayList<MtbColt> resultMtbColt, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
private static void cyclicGetMultipleByTestate(@NotNull Iterator<MtbColt> sourceMtbColts, boolean onlyResiduo, ArrayList<MtbColt> resultMtbColt, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||||
if(sourceMtbColts.hasNext()){
|
if (sourceMtbColts.hasNext()) {
|
||||||
getByTestata(sourceMtbColts.next(), onlyResiduo, false, mtbColt -> {
|
getByTestata(sourceMtbColts.next(), onlyResiduo, false, mtbColt -> {
|
||||||
resultMtbColt.add(mtbColt);
|
resultMtbColt.add(mtbColt);
|
||||||
cyclicGetMultipleByTestate(sourceMtbColts, onlyResiduo, resultMtbColt, onComplete, onAbort);
|
cyclicGetMultipleByTestate(sourceMtbColts, onlyResiduo, resultMtbColt, onComplete, onAbort);
|
||||||
@ -419,7 +492,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
public static void getByTestata(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void getByTestata(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
String ssccString = null;
|
String ssccString = null;
|
||||||
|
|
||||||
if(testata.getSerCollo().equalsIgnoreCase(CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE)){
|
if (testata.getSerCollo().equalsIgnoreCase(CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE)) {
|
||||||
ssccString = "U";
|
ssccString = "U";
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yy");
|
SimpleDateFormat sdf = new SimpleDateFormat("yy");
|
||||||
@ -454,32 +527,29 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void changePosizione(MtbColt testata, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public static void changePosizione(MtbColt testata, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
testata.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
testata.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||||
|
|
||||||
if(posizione == null) testata.setPosizione(null);
|
if (posizione == null) testata.setPosizione(null);
|
||||||
else testata.setPosizione(posizione.getPosizione());
|
else testata.setPosizione(posizione.getPosizione());
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.saveCollo(testata, new ISimpleOperationCallback<MtbColt>() {
|
ColliMagazzinoRESTConsumer.saveCollo(testata, new ISimpleOperationCallback<MtbColt>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColt value) {
|
public void onSuccess(MtbColt value) {
|
||||||
if(onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void deleteRiga(MtbColr mtbColrToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
public static void deleteRiga(MtbColr mtbColrToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed){
|
|
||||||
MtbColr newMtbColr = new MtbColr();
|
MtbColr newMtbColr = new MtbColr();
|
||||||
|
|
||||||
newMtbColr.setNumCollo(mtbColrToDelete.getNumCollo());
|
newMtbColr.setNumCollo(mtbColrToDelete.getNumCollo());
|
||||||
@ -494,40 +564,36 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
EntityRESTConsumer.processEntity(newMtbColr, new ISimpleOperationCallback<MtbColr>() {
|
EntityRESTConsumer.processEntity(newMtbColr, new ISimpleOperationCallback<MtbColr>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColr value) {
|
public void onSuccess(MtbColr value) {
|
||||||
if(onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
}, MtbColr.class);
|
}, MtbColr.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateRiga(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed){
|
public static void updateRiga(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
mtbColrToUpdate.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
mtbColrToUpdate.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||||
|
|
||||||
EntityRESTConsumer.processEntity(mtbColrToUpdate, new ISimpleOperationCallback<MtbColr>() {
|
EntityRESTConsumer.processEntity(mtbColrToUpdate, new ISimpleOperationCallback<MtbColr>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MtbColr value) {
|
public void onSuccess(MtbColr value) {
|
||||||
if(onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
}, MtbColr.class);
|
}, MtbColr.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void updateDataFine(Context context, Dialog progress, MtbColt mtbColt, Runnable onComplete) {
|
public static void updateDataFine(Context context, Dialog progress, MtbColt mtbColt, Runnable onComplete) {
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
||||||
@ -544,7 +610,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void doesColloContainsAnyRow(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void doesColloContainsAnyRow(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
HashMap<String, Object> params = new HashMap<>();
|
||||||
@ -558,12 +623,12 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
String query = "SELECT COUNT(*) as value FROM mtb_colr " +
|
String query = "SELECT COUNT(*) as value FROM mtb_colr " +
|
||||||
"WHERE " + whereCond;
|
"WHERE " + whereCond;
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<SingleValueDTO<Integer>>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<SingleValueDTO<Integer>>>() {
|
||||||
|
}.getType();
|
||||||
SystemRESTConsumer.<ArrayList<SingleValueDTO<Integer>>>processSql(query, typeOfObjectsList, data -> {
|
SystemRESTConsumer.<ArrayList<SingleValueDTO<Integer>>>processSql(query, typeOfObjectsList, data -> {
|
||||||
onComplete.run(data.get(0).getValue() > 0);
|
onComplete.run(data.get(0).getValue() > 0);
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,31 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class MesRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
public static void getOrdiniLavorazioneMateriale(String codJfas, String idMateriale, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed){
|
||||||
|
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
||||||
|
mesRESTConsumerService.getOrdiniLavorazioneMateriale(codJfas,idMateriale).enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
||||||
|
analyzeAnswer(response, "getAvailablePosizioni", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface MesRESTConsumerService {
|
||||||
|
|
||||||
|
|
||||||
|
@GET("mes/getOrdiniLavorazioneMateriale")
|
||||||
|
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazioneMateriale(@Query("codJfas") String codJfas, @Query("idMateriale") String idMateriale);
|
||||||
|
|
||||||
|
}
|
||||||
@ -27,6 +27,7 @@ public class DBSettingsModel {
|
|||||||
private boolean flagCanAddExtraQuantitySpedizione;
|
private boolean flagCanAddExtraQuantitySpedizione;
|
||||||
private boolean flagEnableCheckDepositoSpedizione;
|
private boolean flagEnableCheckDepositoSpedizione;
|
||||||
private boolean flagUseNewPickingListSpedizione;
|
private boolean flagUseNewPickingListSpedizione;
|
||||||
|
private boolean flagVersamentoDirettoProduzione;
|
||||||
private boolean flagAskPesoColloSpedizione;
|
private boolean flagAskPesoColloSpedizione;
|
||||||
private boolean flagForceAllToColli;
|
private boolean flagForceAllToColli;
|
||||||
|
|
||||||
@ -180,4 +181,13 @@ public class DBSettingsModel {
|
|||||||
this.flagUseNewPickingListSpedizione = flagUseNewPickingListSpedizione;
|
this.flagUseNewPickingListSpedizione = flagUseNewPickingListSpedizione;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagVersamentoDirettoProduzione() {
|
||||||
|
return flagVersamentoDirettoProduzione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagVersamentoDirettoProduzione(boolean flagVersamentoDirettoProduzione) {
|
||||||
|
this.flagVersamentoDirettoProduzione = flagVersamentoDirettoProduzione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -230,6 +230,10 @@ public class SettingsManager {
|
|||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_USE_NEW_PICKING_LIST"));
|
.setKeySection("FLAG_USE_NEW_PICKING_LIST"));
|
||||||
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("PRODUZIONE")
|
||||||
|
.setKeySection("FLAG_VERSAMENTO_DIRETTO"));
|
||||||
|
|
||||||
|
|
||||||
GestSetupRESTConsumer.getValues(stbGestSetupList, list -> {
|
GestSetupRESTConsumer.getValues(stbGestSetupList, list -> {
|
||||||
@ -246,6 +250,7 @@ public class SettingsManager {
|
|||||||
dbSettingsModelIstance.setFlagForceAllToColli(getValueFromList(list, "FLAG_FORCE_ALL_TO_COLLI", Boolean.class));
|
dbSettingsModelIstance.setFlagForceAllToColli(getValueFromList(list, "FLAG_FORCE_ALL_TO_COLLI", Boolean.class));
|
||||||
dbSettingsModelIstance.setFlagAskPesoColloSpedizione(getValueFromList(list, "FLAG_ASK_PESO_COLLO", Boolean.class));
|
dbSettingsModelIstance.setFlagAskPesoColloSpedizione(getValueFromList(list, "FLAG_ASK_PESO_COLLO", Boolean.class));
|
||||||
dbSettingsModelIstance.setFlagUseNewPickingListSpedizione(getValueFromList(list, "FLAG_USE_NEW_PICKING_LIST", Boolean.class));
|
dbSettingsModelIstance.setFlagUseNewPickingListSpedizione(getValueFromList(list, "FLAG_USE_NEW_PICKING_LIST", Boolean.class));
|
||||||
|
dbSettingsModelIstance.setFlagVersamentoDirettoProduzione(getValueFromList(list, "FLAG_VERSAMENTO_DIRETTO", Boolean.class));
|
||||||
|
|
||||||
if(onComplete != null) onComplete.run();
|
if(onComplete != null) onComplete.run();
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.utility;
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
|
import android.text.Html;
|
||||||
|
import android.text.Spanned;
|
||||||
|
|
||||||
|
import androidx.annotation.IdRes;
|
||||||
|
import androidx.annotation.StringRes;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@ -58,4 +64,12 @@ public class UtilityString {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Spanned formatHtmlString(String format, String... params){
|
||||||
|
return Html.fromHtml(String.format(format,params));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Spanned formatHtmlStringFromResId(@StringRes int stringId, String... params){
|
||||||
|
return Html.fromHtml(String.format(UtilityResources.getString(stringId),params));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -310,8 +310,8 @@ public class PickingResiActivity extends BaseActivity implements IOnColloClosedC
|
|||||||
.setSerDoc(item.getSerDoc())
|
.setSerDoc(item.getSerDoc())
|
||||||
.setNumDoc(item.getNumDoc())
|
.setNumDoc(item.getNumDoc())
|
||||||
.setDataDoc(item.getDataDocS())
|
.setDataDoc(item.getDataDocS())
|
||||||
.setIdRigaDoc(item.getIdRiga())
|
.setIdRigaDoc(item.getIdRiga());
|
||||||
.setCodJcom(item.getCodJcom());
|
// .setCodJcom(item.getCodJcom());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,20 +18,21 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.ProdRecuperoMaterialeListHeaderBinding;
|
import it.integry.integrywmsnative.databinding.ProdRecuperoMaterialeListHeaderBinding;
|
||||||
import it.integry.integrywmsnative.databinding.ProdRecuperoMaterialeListItemBinding;
|
import it.integry.integrywmsnative.databinding.ProdRecuperoMaterialeListItemBinding;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdUL;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||||
import it.integry.integrywmsnative.ui.fastscroll.SectionTitleProvider;
|
import it.integry.integrywmsnative.ui.fastscroll.SectionTitleProvider;
|
||||||
|
|
||||||
public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryULsListAdapter.SubheaderHolder, HistoryULsListAdapter.SingleItemViewHolder> implements SectionTitleProvider {
|
public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryULsListAdapter.SubheaderHolder,HistoryULsListAdapter.SingleItemViewHolder> implements SectionTitleProvider {
|
||||||
|
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
private List<HistoryVersamentoProdUL> mOriginalDataset;
|
private List<HistoryVersamentoProdULDTO> mOriginalDataset;
|
||||||
private List<HistoryVersamentoProdUL> mDataset;
|
private List<HistoryVersamentoProdULDTO> mDataset;
|
||||||
private View mEmptyView;
|
private View mEmptyView;
|
||||||
|
|
||||||
|
|
||||||
private RunnableArgs<HistoryVersamentoProdUL> mOnItemClicked;
|
private RunnableArgs<HistoryVersamentoProdULDTO> mOnItemClicked;
|
||||||
|
|
||||||
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
@ -56,18 +57,18 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public HistoryULsListAdapter(Context context, List<HistoryVersamentoProdUL> myDataset, View emptyView) {
|
public HistoryULsListAdapter(Context context, List<HistoryVersamentoProdULDTO> myDataset, View emptyView) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mOriginalDataset = myDataset;
|
mOriginalDataset = myDataset;
|
||||||
mEmptyView = emptyView;
|
mEmptyView = emptyView;
|
||||||
mDataset = orderItems(myDataset);
|
mDataset = orderItems(myDataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOnItemClicked(RunnableArgs<HistoryVersamentoProdUL> onItemClicked) {
|
public void setOnItemClicked(RunnableArgs<HistoryVersamentoProdULDTO> onItemClicked) {
|
||||||
this.mOnItemClicked = onItemClicked;
|
this.mOnItemClicked = onItemClicked;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateItems(List<HistoryVersamentoProdUL> updatedDataset) {
|
public void updateItems(List<HistoryVersamentoProdULDTO> updatedDataset) {
|
||||||
mDataset.clear();
|
mDataset.clear();
|
||||||
mDataset.addAll(orderItems(updatedDataset));
|
mDataset.addAll(orderItems(updatedDataset));
|
||||||
notifyDataChanged();
|
notifyDataChanged();
|
||||||
@ -76,9 +77,9 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<HistoryVersamentoProdUL> orderItems(List<HistoryVersamentoProdUL> dataset) {
|
private List<HistoryVersamentoProdULDTO> orderItems(List<HistoryVersamentoProdULDTO> dataset) {
|
||||||
return Stream.of(dataset)
|
return Stream.of(dataset)
|
||||||
.sortBy(HistoryVersamentoProdUL::getCodJfas)
|
.sortBy(HistoryVersamentoProdULDTO::getCodJfas)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -109,7 +110,7 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindItemViewHolder(SingleItemViewHolder h, int itemPosition) {
|
public void onBindItemViewHolder(SingleItemViewHolder h, int itemPosition) {
|
||||||
final HistoryVersamentoProdUL ul = mDataset.get(itemPosition);
|
final HistoryVersamentoProdULDTO ul = mDataset.get(itemPosition);
|
||||||
final SingleItemViewHolder holder = h;
|
final SingleItemViewHolder holder = h;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,9 @@ import com.annimon.stream.Stream;
|
|||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
@ -14,7 +16,8 @@ import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.rest.consumers.ISimpleOperationCallback;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdUL;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||||
|
|
||||||
public class ProdRecuperoMaterialeHelper {
|
public class ProdRecuperoMaterialeHelper {
|
||||||
|
|
||||||
@ -26,73 +29,163 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdUL>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String sql = "SELECT jtb_fasi.cod_jfas, " +
|
String sql = "SELECT jtb_fasi.cod_jfas, " +
|
||||||
"jtb_fasi.descrizione AS descrizione_fase, " +
|
" jtb_fasi.descrizione AS descrizione_fase, " +
|
||||||
"mtb_colr.gestione, " +
|
" mtb_colr.gestione, " +
|
||||||
"mtb_colr.data_collo, " +
|
" mtb_colr.data_collo, " +
|
||||||
"mtb_colr.num_collo, " +
|
" mtb_colr.num_collo, " +
|
||||||
"mtb_colr.ser_collo, " +
|
" mtb_colr.ser_collo, " +
|
||||||
"mtb_colr.cod_mart, " +
|
" mtb_colr.cod_mart, " +
|
||||||
"mtb_colr.cod_col, " +
|
" mtb_colr.cod_col, " +
|
||||||
"mtb_colr.cod_tagl, " +
|
" mtb_colr.cod_tagl, " +
|
||||||
"SUM(mtb_colr.qta_col) AS qta_col, " +
|
" SUM(mtb_colr.qta_col) AS qta_col, " +
|
||||||
"SUM(mtb_colr.num_cnf) AS num_cnf, " +
|
" SUM(mtb_colr.num_cnf) AS num_cnf, " +
|
||||||
"mtb_colr.ser_collo, " +
|
" mtb_colr.ser_collo, " +
|
||||||
"mtb_colr.partita_mag, " +
|
" mtb_colr.partita_mag, " +
|
||||||
"mtb_colr.cod_jcom, " +
|
" mtb_colr.cod_jcom, " +
|
||||||
"mtb_colr.num_collo_rif, " +
|
" mtb_colr.num_collo_rif, " +
|
||||||
"mtb_colr.data_collo_rif, " +
|
" mtb_colr.data_collo_rif, " +
|
||||||
"mtb_colr.ser_collo_rif, " +
|
" mtb_colr.ser_collo_rif, " +
|
||||||
"mtb_colr.gestione_rif, " +
|
" mtb_colr.gestione_rif, " +
|
||||||
"mtb_colt.segno, " +
|
" mtb_colt.segno, " +
|
||||||
"ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " +
|
" ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " +
|
||||||
"mtb_aart.unt_mis, " +
|
" mtb_aart.unt_mis, " +
|
||||||
"MAX(datetime_row) AS datetime_row " +
|
" MAX(datetime_row) AS datetime_row, " +
|
||||||
|
" dtb_ord_steps.num_ord, " +
|
||||||
|
" dtb_ord_steps.data_ord, " +
|
||||||
|
" dtb_ord_steps.gestione as gestione_ord, " +
|
||||||
|
" dtb_ord_steps.hr_num as hr, " +
|
||||||
|
" mtb_colr.riga_ord, " +
|
||||||
|
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, 0)) as percentage_hr " +
|
||||||
"FROM mtb_colr " +
|
"FROM mtb_colr " +
|
||||||
"INNER JOIN mtb_colt " +
|
"INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
||||||
"ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
|
||||||
"AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
"AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
||||||
"AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
"AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
||||||
"AND mtb_colr.gestione = mtb_colt.gestione " +
|
"AND mtb_colr.gestione = mtb_colt.gestione " +
|
||||||
"INNER JOIN mtb_aart " +
|
" " +
|
||||||
"ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
"INNER JOIN dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
||||||
|
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
||||||
|
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
||||||
|
" AND dtb_ord_steps.data_iniz is not null " +
|
||||||
|
" AND dtb_ord_steps.data_fine is null " +
|
||||||
|
"INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
||||||
"LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
"LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
||||||
"WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
"WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
||||||
"AND segno = -1 " +
|
" AND segno = -1 " +
|
||||||
"AND mtb_colr.data_collo > DATEADD(DAY, -1, GETDATE()) " +
|
" AND mtb_colr.data_collo > DATEADD(DAY, -1, GETDATE()) " +
|
||||||
"GROUP BY jtb_fasi.cod_jfas, " +
|
"GROUP BY jtb_fasi.cod_jfas, " +
|
||||||
"jtb_fasi.descrizione, " +
|
" jtb_fasi.descrizione, " +
|
||||||
"mtb_colr.gestione, " +
|
" mtb_colr.gestione, " +
|
||||||
"mtb_colr.data_collo, " +
|
" mtb_colr.data_collo, " +
|
||||||
"mtb_colr.num_collo, " +
|
" mtb_colr.num_collo, " +
|
||||||
"mtb_colr.ser_collo, " +
|
" mtb_colr.ser_collo, " +
|
||||||
"mtb_colr.cod_mart, " +
|
" mtb_colr.cod_mart, " +
|
||||||
"mtb_colr.cod_col, " +
|
" mtb_colr.cod_col, " +
|
||||||
"mtb_colr.cod_tagl, " +
|
" mtb_colr.cod_tagl, " +
|
||||||
"mtb_colr.ser_collo, " +
|
" mtb_colr.ser_collo, " +
|
||||||
"mtb_colr.partita_mag, " +
|
" mtb_colr.partita_mag, " +
|
||||||
"mtb_colr.cod_jcom, " +
|
" mtb_colr.cod_jcom, " +
|
||||||
"mtb_aart.descrizione_estesa, " +
|
" mtb_aart.descrizione_estesa, " +
|
||||||
"mtb_aart.descrizione, " +
|
" mtb_aart.descrizione, " +
|
||||||
"mtb_aart.unt_mis, " +
|
" mtb_aart.unt_mis, " +
|
||||||
"mtb_colr.num_collo_rif, " +
|
" mtb_colr.num_collo_rif, " +
|
||||||
"mtb_colr.data_collo_rif, " +
|
" mtb_colr.data_collo_rif, " +
|
||||||
"mtb_colr.ser_collo_rif, " +
|
" mtb_colr.ser_collo_rif, " +
|
||||||
"mtb_colr.gestione_rif, " +
|
" mtb_colr.gestione_rif, " +
|
||||||
"mtb_colt.segno " +
|
" mtb_colt.segno, " +
|
||||||
|
" dtb_ord_steps.num_ord, " +
|
||||||
|
" dtb_ord_steps.data_ord, " +
|
||||||
|
" dtb_ord_steps.gestione, " +
|
||||||
|
" mtb_colr.riga_ord, " +
|
||||||
|
" dtb_ord_steps.hr_num " +
|
||||||
"HAVING SUM(mtb_colr.qta_col) > 0 " +
|
"HAVING SUM(mtb_colr.qta_col) > 0 " +
|
||||||
"ORDER BY data_collo DESC";
|
"ORDER BY data_collo DESC";
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdUL>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {}.getType();
|
||||||
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<List<HistoryVersamentoProdUL>>() {
|
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<List<HistoryVersamentoProdULRestDTO>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<HistoryVersamentoProdUL> ulList) {
|
public void onSuccess(List<HistoryVersamentoProdULRestDTO> ulList) {
|
||||||
|
|
||||||
if(ulList != null && ulList.size() > 0){
|
if(ulList == null) {
|
||||||
List<String> codMarts = Stream.of(ulList)
|
onComplete.run(null);
|
||||||
.map(HistoryVersamentoProdUL::getCodMart)
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<HistoryVersamentoProdULDTO> newUlList = new ArrayList<>();
|
||||||
|
|
||||||
|
Stream.of(ulList)
|
||||||
|
.distinctBy(x -> {
|
||||||
|
HashMap<String, Object> hashMap = new HashMap<>();
|
||||||
|
hashMap.put("gestione", x.getGestione());
|
||||||
|
hashMap.put("data_collo", x.getDataCollo());
|
||||||
|
hashMap.put("ser_collo", x.getSerCollo());
|
||||||
|
hashMap.put("num_collo", x.getNumCollo());
|
||||||
|
hashMap.put("cod_mart", x.getCodMart());
|
||||||
|
hashMap.put("gestione_rif", x.getGestioneRif());
|
||||||
|
hashMap.put("data_collo_rif", x.getDataColloRif());
|
||||||
|
hashMap.put("ser_collo_rif", x.getSerColloRif());
|
||||||
|
hashMap.put("num_collo_rif", x.getNumColloRif());
|
||||||
|
|
||||||
|
return hashMap;
|
||||||
|
})
|
||||||
|
.forEach(restDTO -> {
|
||||||
|
|
||||||
|
List<HistoryVersamentoProdULDTO.OrdineDto> ordineList = Stream.of(ulList)
|
||||||
|
.filter(x -> x.getNumCollo().equals(restDTO.getNumCollo()) &&
|
||||||
|
x.getDataCollo().equals(restDTO.getDataCollo()) &&
|
||||||
|
x.getSerCollo().equals(restDTO.getSerCollo()) &&
|
||||||
|
x.getGestione().equals(restDTO.getGestione()))
|
||||||
|
.map(x -> new HistoryVersamentoProdULDTO.OrdineDto()
|
||||||
|
.setData(x.getDataOrdD())
|
||||||
|
.setNumero(x.getNumOrd())
|
||||||
|
.setGestione(x.getGestioneOrd())
|
||||||
|
.setRigaOrd(x.getRigaOrd())
|
||||||
|
.setQtaCol(x.getQtaCol())
|
||||||
|
.setNumCnf(x.getNumCnf())
|
||||||
|
.setPercentageHr(x.getPercentageHr()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
BigDecimal qtaColTot = BigDecimal.ZERO;
|
||||||
|
BigDecimal numCnfColTot = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
for (HistoryVersamentoProdULDTO.OrdineDto ordine :
|
||||||
|
ordineList) {
|
||||||
|
qtaColTot = qtaColTot.add(ordine.getQtaCol());
|
||||||
|
numCnfColTot = numCnfColTot.add(ordine.getNumCnf());
|
||||||
|
}
|
||||||
|
|
||||||
|
newUlList.add(new HistoryVersamentoProdULDTO()
|
||||||
|
.setGestione(restDTO.getGestione())
|
||||||
|
.setDataCollo(restDTO.getDataCollo())
|
||||||
|
.setSerCollo(restDTO.getSerCollo())
|
||||||
|
.setNumCollo(restDTO.getNumCollo())
|
||||||
|
.setSegno(restDTO.getSegno())
|
||||||
|
.setCodMart(restDTO.getCodMart())
|
||||||
|
.setCodCol(restDTO.getCodCol())
|
||||||
|
.setCodTagl(restDTO.getCodTagl())
|
||||||
|
.setCodJfas(restDTO.getCodJfas())
|
||||||
|
.setDescrizioneFase(restDTO.getDescrizioneFase())
|
||||||
|
.setQtaCol(qtaColTot)
|
||||||
|
.setNumCnf(numCnfColTot)
|
||||||
|
.setPartitaMag(restDTO.getPartitaMag())
|
||||||
|
.setCodJcom(restDTO.getCodJcom())
|
||||||
|
.setDatetimeRow(restDTO.getDatetimeRow())
|
||||||
|
.setUntMis(restDTO.getUntMis())
|
||||||
|
.setGestioneRif(restDTO.getGestioneRif())
|
||||||
|
.setDataColloRif(restDTO.getDataColloRif())
|
||||||
|
.setSerColloRif(restDTO.getSerColloRif())
|
||||||
|
.setNumColloRif(restDTO.getNumColloRif())
|
||||||
|
.setOrdini(ordineList));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(newUlList.size() > 0){
|
||||||
|
List<String> codMarts = Stream.of(newUlList)
|
||||||
|
.map(HistoryVersamentoProdULDTO::getCodMart)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
.distinct()
|
.distinct()
|
||||||
.toList();
|
.toList();
|
||||||
@ -100,7 +193,7 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
ArticoloRESTConsumer.getByCodMart(codMarts, arts -> {
|
ArticoloRESTConsumer.getByCodMart(codMarts, arts -> {
|
||||||
|
|
||||||
if(arts != null && arts.size() > 0) {
|
if(arts != null && arts.size() > 0) {
|
||||||
for (HistoryVersamentoProdUL value : ulList) {
|
for (HistoryVersamentoProdULDTO value : newUlList) {
|
||||||
|
|
||||||
MtbAart foundMtbAart = null;
|
MtbAart foundMtbAart = null;
|
||||||
|
|
||||||
@ -113,15 +206,14 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
|
|
||||||
value.setMtbAart(foundMtbAart);
|
value.setMtbAart(foundMtbAart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onComplete.run(ulList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onComplete.run(newUlList);
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
onComplete.run(ulList);
|
onComplete.run(newUlList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,325 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
|
public class HistoryVersamentoProdULDTO {
|
||||||
|
|
||||||
|
private String gestione;
|
||||||
|
private String dataCollo;
|
||||||
|
private String serCollo;
|
||||||
|
private Integer numCollo;
|
||||||
|
private String segno;
|
||||||
|
private String codMart;
|
||||||
|
private String codCol;
|
||||||
|
private String codTagl;
|
||||||
|
private String codJfas;
|
||||||
|
private String descrizioneFase;
|
||||||
|
private BigDecimal qtaCol;
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private String partitaMag;
|
||||||
|
private String codJcom;
|
||||||
|
private String datetimeRow;
|
||||||
|
private String descrizioneArt;
|
||||||
|
private String untMis;
|
||||||
|
private String gestioneRif;
|
||||||
|
private String dataColloRif;
|
||||||
|
private String serColloRif;
|
||||||
|
private Integer numColloRif;
|
||||||
|
|
||||||
|
private List<HistoryVersamentoProdULDTO.OrdineDto> ordini;
|
||||||
|
|
||||||
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCol.divide(numCnf, 3, RoundingMode.HALF_EVEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataCollo() {
|
||||||
|
return dataCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setDataCollo(String dataCollo) {
|
||||||
|
this.dataCollo = dataCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerCollo() {
|
||||||
|
return serCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setSerCollo(String serCollo) {
|
||||||
|
this.serCollo = serCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumCollo() {
|
||||||
|
return numCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setNumCollo(Integer numCollo) {
|
||||||
|
this.numCollo = numCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSegno() {
|
||||||
|
return segno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setSegno(String segno) {
|
||||||
|
this.segno = segno;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodCol() {
|
||||||
|
return codCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setCodCol(String codCol) {
|
||||||
|
this.codCol = codCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTagl() {
|
||||||
|
return codTagl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setCodTagl(String codTagl) {
|
||||||
|
this.codTagl = codTagl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneFase() {
|
||||||
|
return descrizioneFase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setDescrizioneFase(String descrizioneFase) {
|
||||||
|
this.descrizioneFase = descrizioneFase;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCol() {
|
||||||
|
return qtaCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setQtaCol(BigDecimal qtaCol) {
|
||||||
|
this.qtaCol = qtaCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDatetimeRow() {
|
||||||
|
return datetimeRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setDatetimeRow(String datetimeRow) {
|
||||||
|
this.datetimeRow = datetimeRow;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneArt() {
|
||||||
|
return descrizioneArt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setDescrizioneArt(String descrizioneArt) {
|
||||||
|
this.descrizioneArt = descrizioneArt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntMis() {
|
||||||
|
return untMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setUntMis(String untMis) {
|
||||||
|
this.untMis = untMis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestioneRif() {
|
||||||
|
return gestioneRif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setGestioneRif(String gestioneRif) {
|
||||||
|
this.gestioneRif = gestioneRif;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataColloRif() {
|
||||||
|
return dataColloRif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setDataColloRif(String dataColloRif) {
|
||||||
|
this.dataColloRif = dataColloRif;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerColloRif() {
|
||||||
|
return serColloRif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setSerColloRif(String serColloRif) {
|
||||||
|
this.serColloRif = serColloRif;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumColloRif() {
|
||||||
|
return numColloRif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setNumColloRif(Integer numColloRif) {
|
||||||
|
this.numColloRif = numColloRif;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrdineDto> getOrdini() {
|
||||||
|
return ordini;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setOrdini(List<OrdineDto> ordini) {
|
||||||
|
this.ordini = ordini;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbAart getMtbAart() {
|
||||||
|
return mtbAart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO setMtbAart(MtbAart mtbAart) {
|
||||||
|
this.mtbAart = mtbAart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class OrdineDto {
|
||||||
|
private Integer numero;
|
||||||
|
private Date data;
|
||||||
|
private String gestione;
|
||||||
|
private Integer rigaOrd;
|
||||||
|
private BigDecimal qtaCol;
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private Integer percentageHr;
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCol.divide(numCnf, 3, RoundingMode.HALF_EVEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumero() {
|
||||||
|
return numero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO.OrdineDto setNumero(Integer numero) {
|
||||||
|
this.numero = numero;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO.OrdineDto setData(Date data) {
|
||||||
|
this.data = data;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO.OrdineDto setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRigaOrd() {
|
||||||
|
return rigaOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdineDto setRigaOrd(Integer rigaOrd) {
|
||||||
|
this.rigaOrd = rigaOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCol() {
|
||||||
|
return qtaCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO.OrdineDto setQtaCol(BigDecimal qtaCol) {
|
||||||
|
this.qtaCol = qtaCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULDTO.OrdineDto setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPercentageHr() {
|
||||||
|
return percentageHr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdineDto setPercentageHr(Integer percentageHr) {
|
||||||
|
this.percentageHr = percentageHr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,10 +1,12 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
public class HistoryVersamentoProdUL {
|
public class HistoryVersamentoProdULRestDTO {
|
||||||
|
|
||||||
|
|
||||||
private String gestione;
|
private String gestione;
|
||||||
@ -29,13 +31,26 @@ public class HistoryVersamentoProdUL {
|
|||||||
private String serColloRif;
|
private String serColloRif;
|
||||||
private Integer numColloRif;
|
private Integer numColloRif;
|
||||||
|
|
||||||
private MtbAart mtbAart;
|
private Integer numOrd;
|
||||||
|
private String dataOrd;
|
||||||
|
private String gestioneOrd;
|
||||||
|
private Integer rigaOrd;
|
||||||
|
private Integer percentageHr;
|
||||||
|
|
||||||
|
public Integer getPercentageHr() {
|
||||||
|
return percentageHr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULRestDTO setPercentageHr(Integer percentageHr) {
|
||||||
|
this.percentageHr = percentageHr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGestione() {
|
public String getGestione() {
|
||||||
return gestione;
|
return gestione;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setGestione(String gestione) {
|
public HistoryVersamentoProdULRestDTO setGestione(String gestione) {
|
||||||
this.gestione = gestione;
|
this.gestione = gestione;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -44,7 +59,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return dataCollo;
|
return dataCollo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setDataCollo(String dataCollo) {
|
public HistoryVersamentoProdULRestDTO setDataCollo(String dataCollo) {
|
||||||
this.dataCollo = dataCollo;
|
this.dataCollo = dataCollo;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -53,7 +68,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return serCollo;
|
return serCollo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setSerCollo(String serCollo) {
|
public HistoryVersamentoProdULRestDTO setSerCollo(String serCollo) {
|
||||||
this.serCollo = serCollo;
|
this.serCollo = serCollo;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -62,7 +77,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return numCollo;
|
return numCollo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setNumCollo(Integer numCollo) {
|
public HistoryVersamentoProdULRestDTO setNumCollo(Integer numCollo) {
|
||||||
this.numCollo = numCollo;
|
this.numCollo = numCollo;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -71,7 +86,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return segno;
|
return segno;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setSegno(String segno) {
|
public HistoryVersamentoProdULRestDTO setSegno(String segno) {
|
||||||
this.segno = segno;
|
this.segno = segno;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -80,7 +95,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return codMart;
|
return codMart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setCodMart(String codMart) {
|
public HistoryVersamentoProdULRestDTO setCodMart(String codMart) {
|
||||||
this.codMart = codMart;
|
this.codMart = codMart;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -89,7 +104,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return codCol;
|
return codCol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setCodCol(String codCol) {
|
public HistoryVersamentoProdULRestDTO setCodCol(String codCol) {
|
||||||
this.codCol = codCol;
|
this.codCol = codCol;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -98,7 +113,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return codTagl;
|
return codTagl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setCodTagl(String codTagl) {
|
public HistoryVersamentoProdULRestDTO setCodTagl(String codTagl) {
|
||||||
this.codTagl = codTagl;
|
this.codTagl = codTagl;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -107,7 +122,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return codJfas;
|
return codJfas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setCodJfas(String codJfas) {
|
public HistoryVersamentoProdULRestDTO setCodJfas(String codJfas) {
|
||||||
this.codJfas = codJfas;
|
this.codJfas = codJfas;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -116,7 +131,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return descrizioneFase;
|
return descrizioneFase;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setDescrizioneFase(String descrizioneFase) {
|
public HistoryVersamentoProdULRestDTO setDescrizioneFase(String descrizioneFase) {
|
||||||
this.descrizioneFase = descrizioneFase;
|
this.descrizioneFase = descrizioneFase;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -125,7 +140,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return qtaCol;
|
return qtaCol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setQtaCol(BigDecimal qtaCol) {
|
public HistoryVersamentoProdULRestDTO setQtaCol(BigDecimal qtaCol) {
|
||||||
this.qtaCol = qtaCol;
|
this.qtaCol = qtaCol;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -134,7 +149,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return numCnf;
|
return numCnf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setNumCnf(BigDecimal numCnf) {
|
public HistoryVersamentoProdULRestDTO setNumCnf(BigDecimal numCnf) {
|
||||||
this.numCnf = numCnf;
|
this.numCnf = numCnf;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -143,7 +158,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return partitaMag;
|
return partitaMag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setPartitaMag(String partitaMag) {
|
public HistoryVersamentoProdULRestDTO setPartitaMag(String partitaMag) {
|
||||||
this.partitaMag = partitaMag;
|
this.partitaMag = partitaMag;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -152,7 +167,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return codJcom;
|
return codJcom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setCodJcom(String codJcom) {
|
public HistoryVersamentoProdULRestDTO setCodJcom(String codJcom) {
|
||||||
this.codJcom = codJcom;
|
this.codJcom = codJcom;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -161,7 +176,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return datetimeRow;
|
return datetimeRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setDatetimeRow(String datetimeRow) {
|
public HistoryVersamentoProdULRestDTO setDatetimeRow(String datetimeRow) {
|
||||||
this.datetimeRow = datetimeRow;
|
this.datetimeRow = datetimeRow;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -170,7 +185,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return descrizioneArt;
|
return descrizioneArt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setDescrizioneArt(String descrizioneArt) {
|
public HistoryVersamentoProdULRestDTO setDescrizioneArt(String descrizioneArt) {
|
||||||
this.descrizioneArt = descrizioneArt;
|
this.descrizioneArt = descrizioneArt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -179,7 +194,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return untMis;
|
return untMis;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setUntMis(String untMis) {
|
public HistoryVersamentoProdULRestDTO setUntMis(String untMis) {
|
||||||
this.untMis = untMis;
|
this.untMis = untMis;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -188,7 +203,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return gestioneRif;
|
return gestioneRif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setGestioneRif(String gestioneRif) {
|
public HistoryVersamentoProdULRestDTO setGestioneRif(String gestioneRif) {
|
||||||
this.gestioneRif = gestioneRif;
|
this.gestioneRif = gestioneRif;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -197,7 +212,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return dataColloRif;
|
return dataColloRif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setDataColloRif(String dataColloRif) {
|
public HistoryVersamentoProdULRestDTO setDataColloRif(String dataColloRif) {
|
||||||
this.dataColloRif = dataColloRif;
|
this.dataColloRif = dataColloRif;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -206,7 +221,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
return serColloRif;
|
return serColloRif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setSerColloRif(String serColloRif) {
|
public HistoryVersamentoProdULRestDTO setSerColloRif(String serColloRif) {
|
||||||
this.serColloRif = serColloRif;
|
this.serColloRif = serColloRif;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -215,17 +230,48 @@ public class HistoryVersamentoProdUL {
|
|||||||
return numColloRif;
|
return numColloRif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setNumColloRif(Integer numColloRif) {
|
public HistoryVersamentoProdULRestDTO setNumColloRif(Integer numColloRif) {
|
||||||
this.numColloRif = numColloRif;
|
this.numColloRif = numColloRif;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbAart getMtbAart() {
|
public Integer getNumOrd() {
|
||||||
return mtbAart;
|
return numOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryVersamentoProdUL setMtbAart(MtbAart mtbAart) {
|
public HistoryVersamentoProdULRestDTO setNumOrd(Integer numOrd) {
|
||||||
this.mtbAart = mtbAart;
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataOrdD() {
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrdS());
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataOrdS() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULRestDTO setDataOrd(String dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRigaOrd() {
|
||||||
|
return rigaOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULRestDTO setRigaOrd(Integer rigaOrd) {
|
||||||
|
this.rigaOrd = rigaOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestioneOrd() {
|
||||||
|
return gestioneOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdULRestDTO setGestioneOrd(String gestioneOrd) {
|
||||||
|
this.gestioneOrd = gestioneOrd;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13,6 +13,7 @@ import com.annimon.stream.Stream;
|
|||||||
import com.tfb.fbtoast.FBToast;
|
import com.tfb.fbtoast.FBToast;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -36,7 +37,8 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
import it.integry.integrywmsnative.databinding.FragmentProdRecuperoMaterialeBinding;
|
import it.integry.integrywmsnative.databinding.FragmentProdRecuperoMaterialeBinding;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.core.HistoryULsListAdapter;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.core.HistoryULsListAdapter;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.core.ProdRecuperoMaterialeHelper;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.core.ProdRecuperoMaterialeHelper;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdUL;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||||
@ -53,7 +55,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private HistoryULsListAdapter mAdapter;
|
private HistoryULsListAdapter mAdapter;
|
||||||
private List<HistoryVersamentoProdUL> mDataset;
|
private List<HistoryVersamentoProdULDTO> mDataset;
|
||||||
|
|
||||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||||
|
|
||||||
@ -112,9 +114,9 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
if(mtbColt != null) {
|
if(mtbColt != null) {
|
||||||
|
|
||||||
HistoryVersamentoProdUL historyVersamentoProdUL = this.getHistoryElementFromMtbColt(mtbColt);
|
HistoryVersamentoProdULDTO historyVersamentoProdULRestDTO = this.getHistoryElementFromMtbColt(mtbColt);
|
||||||
if(historyVersamentoProdUL != null) {
|
if(historyVersamentoProdULRestDTO != null) {
|
||||||
this.dispatchItem(historyVersamentoProdUL, mtbColt, progressDialog);
|
this.dispatchItem(historyVersamentoProdULRestDTO, mtbColt, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
DialogCommon.showNoULFound(mContext, () -> {
|
DialogCommon.showNoULFound(mContext, () -> {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
@ -136,8 +138,8 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private HistoryVersamentoProdUL getHistoryElementFromMtbColt(MtbColt mtbColt) {
|
private HistoryVersamentoProdULDTO getHistoryElementFromMtbColt(MtbColt mtbColt) {
|
||||||
List<HistoryVersamentoProdUL> filteredItems = Stream.of(mDataset)
|
List<HistoryVersamentoProdULDTO> filteredItems = Stream.of(mDataset)
|
||||||
.filter(x -> Objects.equals(x.getNumColloRif(), mtbColt.getNumCollo()) &&
|
.filter(x -> Objects.equals(x.getNumColloRif(), mtbColt.getNumCollo()) &&
|
||||||
x.getDataColloRif().equals(mtbColt.getDataColloS()) &&
|
x.getDataColloRif().equals(mtbColt.getDataColloS()) &&
|
||||||
x.getSerColloRif().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
x.getSerColloRif().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
||||||
@ -152,7 +154,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void dispatchItem(HistoryVersamentoProdUL item, MtbColt sourceMtbColt, Dialog dialogProgress) {
|
private void dispatchItem(HistoryVersamentoProdULDTO item, MtbColt sourceMtbColt, Dialog dialogProgress) {
|
||||||
BigDecimal qtaDaEvadere = BigDecimal.ZERO;
|
BigDecimal qtaDaEvadere = BigDecimal.ZERO;
|
||||||
|
|
||||||
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
||||||
@ -164,7 +166,9 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
.setQtaOrd(null)
|
.setQtaOrd(null)
|
||||||
.setMtbAart(item.getMtbAart())
|
.setMtbAart(item.getMtbAart())
|
||||||
.setCanPartitaMagBeChanged(false)
|
.setCanPartitaMagBeChanged(false)
|
||||||
.setQtaTot(BigDecimal.ONE)
|
.setNumCnf(1)
|
||||||
|
.setQtaCnf(item.getQtaCnf())
|
||||||
|
.setQtaTot(item.getQtaCnf())
|
||||||
.setMaxQta(qtaDaEvadere)
|
.setMaxQta(qtaDaEvadere)
|
||||||
.setQtaDisponibile(qtaDaEvadere);
|
.setQtaDisponibile(qtaDaEvadere);
|
||||||
|
|
||||||
@ -179,7 +183,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void onItemDispatched(HistoryVersamentoProdUL item, BigDecimal quantity, MtbColt sourceMtbColt, Dialog progress) {
|
private void onItemDispatched(HistoryVersamentoProdULDTO item, BigDecimal quantity, MtbColt sourceMtbColt, Dialog progress) {
|
||||||
|
|
||||||
if(progress == null) {
|
if(progress == null) {
|
||||||
progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
@ -193,20 +197,31 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
.setGestione(item.getGestione())
|
.setGestione(item.getGestione())
|
||||||
.setMtbColr(new ObservableArrayList<>());
|
.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
final MtbColr mtbColrScarico = new MtbColr()
|
for(HistoryVersamentoProdULDTO.OrdineDto ordine : item.getOrdini()) {
|
||||||
.setCodMart(item.getCodMart())
|
BigDecimal qtaCol = quantity.multiply(new BigDecimal(-1).multiply(new BigDecimal(ordine.getPercentageHr()))).divide(new BigDecimal(100), 3, RoundingMode.HALF_EVEN);
|
||||||
.setPartitaMag(UtilityString.empty2null(item.getPartitaMag()))
|
|
||||||
.setQtaCol(quantity.multiply(new BigDecimal(-1)))
|
final MtbColr mtbColrScarico = new MtbColr()
|
||||||
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
.setCodMart(item.getCodMart())
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
.setPartitaMag(UtilityString.empty2null(item.getPartitaMag()))
|
||||||
.setNumColloRif(item.getNumColloRif())
|
.setQtaCol(qtaCol)
|
||||||
.setDataColloRif(item.getDataColloRif())
|
.setQtaCnf(ordine.getQtaCnf())
|
||||||
.setGestioneRif(item.getGestioneRif())
|
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
||||||
.setSerColloRif(item.getSerColloRif());
|
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||||
|
.setNumColloRif(item.getNumColloRif())
|
||||||
|
.setDataColloRif(item.getDataColloRif())
|
||||||
|
.setGestioneRif(item.getGestioneRif())
|
||||||
|
.setSerColloRif(item.getSerColloRif())
|
||||||
|
.setDataOrd(ordine.getData())
|
||||||
|
.setNumOrd(ordine.getNumero())
|
||||||
|
.setRigaOrd(ordine.getRigaOrd());
|
||||||
|
|
||||||
|
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||||
|
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
|
||||||
mtbColtScarico.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
mtbColtScarico.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
|
||||||
|
|
||||||
|
|
||||||
RunnableArgs<MtbColt> saveRunnable = mtbColt -> {
|
RunnableArgs<MtbColt> saveRunnable = mtbColt -> {
|
||||||
|
|||||||
@ -0,0 +1,194 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_versamento_materiale.core;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.Observable;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.annimon.stream.Optional;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.model.CheckableOrdineLavoro;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentChooseOrdsLavFromListItemModelBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
|
||||||
|
public class ChooseOrdsLavFromListAdapter extends RecyclerView.Adapter<ChooseOrdsLavFromListAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
protected Context mContext;
|
||||||
|
|
||||||
|
private MtbColt mMtbColt;
|
||||||
|
private MtbColr mMtbColr;
|
||||||
|
private List<CheckableOrdineLavoro> mDataset;
|
||||||
|
private HashMap<CheckableOrdineLavoro, Integer> mDatasetPositions = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
public ChooseOrdsLavFromListAdapter(Context context, List<ChooseOrdsLavFromListItemModel> myDataset, MtbColt mtbColt) throws ParseException, TimeNotRecognizedException, DateNotRecognizedException {
|
||||||
|
mContext = context;
|
||||||
|
mMtbColt = mtbColt;
|
||||||
|
mMtbColr = mtbColt.getMtbColr().get(0);
|
||||||
|
if (myDataset != null) {
|
||||||
|
mDataset = Stream.of(myDataset)
|
||||||
|
.withoutNulls()
|
||||||
|
.map(CheckableOrdineLavoro::new).toList();
|
||||||
|
|
||||||
|
for (int i = 0; i < mDataset.size(); i++) {
|
||||||
|
final CheckableOrdineLavoro itemModel = mDataset.get(i);
|
||||||
|
OrdineLavorazioneDTO ordine = itemModel.getItem().getOrdineLav();
|
||||||
|
itemModel.setTestata(UtilityString.formatHtmlStringFromResId(R.string.ord_testata, String.valueOf(ordine.getNumOrd()), UtilityDate.formatDate(ordine.getDateOrd(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)).toString());
|
||||||
|
mDatasetPositions.put(itemModel, i);
|
||||||
|
|
||||||
|
itemModel.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
onItemHidden(itemModel);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
itemModel.getChecked().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
onItemChecked(itemModel);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onItemHidden(CheckableOrdineLavoro itemModel) {
|
||||||
|
if (itemModel.isHidden()) {
|
||||||
|
mDataset.remove(itemModel);
|
||||||
|
} else {
|
||||||
|
mDataset.add(mDatasetPositions.get(itemModel), itemModel);
|
||||||
|
}
|
||||||
|
calculateMtbColtShare();
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onItemChecked(CheckableOrdineLavoro itemModel) {
|
||||||
|
if (!itemModel.isChecked()) {
|
||||||
|
itemModel.setQtaCol(0);
|
||||||
|
itemModel.setNumCnf(0);
|
||||||
|
}
|
||||||
|
calculateMtbColtShare();
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void calculateMtbColtShare() {
|
||||||
|
MtbColr mtbColr = mMtbColt.getMtbColr().get(0);
|
||||||
|
BigDecimal residuoCol = mtbColr.getQtaCol();
|
||||||
|
BigDecimal residuoCnf = mtbColr.getNumCnf();
|
||||||
|
BigDecimal offset = BigDecimal.ZERO.add(residuoCol);
|
||||||
|
mtbColr.setQtaCnf(mtbColr.getQtaCol().divide(mtbColr.getNumCnf(),5,BigDecimal.ROUND_HALF_UP));
|
||||||
|
|
||||||
|
List<CheckableOrdineLavoro> ordiniSelezionati = getSelectedData();
|
||||||
|
int totalHr = Stream.of(ordiniSelezionati).mapToInt(x -> x.getItem().getOrdineLav().getHrNum()).sum();
|
||||||
|
for (CheckableOrdineLavoro c : ordiniSelezionati) {
|
||||||
|
BigDecimal usedCol, usedCnf;
|
||||||
|
float perc = (c.getItem().getOrdineLav().getHrNum() * 100) / totalHr;
|
||||||
|
if (SettingsManager.iDB().isFlagForceAllToColli() || (mtbColr.getMtbAart() != null && !mtbColr.getMtbAart().isFlagQtaCnfFissa())) {
|
||||||
|
usedCnf = residuoCnf.multiply(BigDecimal.valueOf(perc)).divide(BigDecimal.valueOf(100)).setScale(0, BigDecimal.ROUND_CEILING);
|
||||||
|
usedCol = usedCnf.multiply(mtbColr.getQtaCnf()).setScale(0,BigDecimal.ROUND_FLOOR);
|
||||||
|
} else {
|
||||||
|
usedCol = residuoCol.multiply(BigDecimal.valueOf(perc)).divide(BigDecimal.valueOf(100)).setScale(0, BigDecimal.ROUND_FLOOR);
|
||||||
|
usedCnf = usedCol.divide(mtbColr.getQtaCnf()).setScale(0, BigDecimal.ROUND_CEILING);
|
||||||
|
}
|
||||||
|
offset = offset.subtract(usedCol);
|
||||||
|
c.setQtaCol(usedCol.floatValue());
|
||||||
|
c.setNumCnf(usedCnf.floatValue());
|
||||||
|
}
|
||||||
|
if (ordiniSelezionati.size() > 0 && offset.floatValue() != 0) {
|
||||||
|
CheckableOrdineLavoro majorOrder = Stream.of(ordiniSelezionati).max((o1, o2) -> Integer.compare(o1.getItem().getOrdineLav().getHrNum(), o2.getItem().getOrdineLav().getHrNum())).get();
|
||||||
|
if (majorOrder == null) {
|
||||||
|
majorOrder = ordiniSelezionati.get(0);
|
||||||
|
}
|
||||||
|
majorOrder.setQtaCol(majorOrder.getQtaCol().get() + offset.floatValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
protected FragmentChooseOrdsLavFromListItemModelBinding mViewDataBinding;
|
||||||
|
|
||||||
|
|
||||||
|
public ViewHolder(FragmentChooseOrdsLavFromListItemModelBinding v) {
|
||||||
|
super(v.getRoot());
|
||||||
|
mViewDataBinding = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bind(CheckableOrdineLavoro checkableOrdineLavoro, MtbColr mtbColr) {
|
||||||
|
mViewDataBinding.setCheckableOrdineLav(checkableOrdineLavoro);
|
||||||
|
mViewDataBinding.setMtbColr(mtbColr);
|
||||||
|
mViewDataBinding.executePendingBindings();
|
||||||
|
|
||||||
|
if (!SettingsManager.iDB().isFlagForceAllToColli() && (mtbColr.getMtbAart() == null || mtbColr.getMtbAart().isFlagQtaCnfFissa())) {
|
||||||
|
String text = UtilityNumber.decimalToString(checkableOrdineLavoro.getQtaCol().get());
|
||||||
|
|
||||||
|
if (mtbColr.getMtbAart() != null) {
|
||||||
|
text += !UtilityString.isNullOrEmpty(mtbColr.getMtbAart().getUntMis()) ? "\n" + mtbColr.getMtbAart().getUntMis() : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewDataBinding.qtaTextview.setText(text);
|
||||||
|
} else {
|
||||||
|
mViewDataBinding.qtaTextview.setText(UtilityNumber.decimalToString(checkableOrdineLavoro.getNumCnf().get()) + "\n" + UtilityResources.getString(R.string.unt_mis_col));
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewDataBinding.setMtbColr(mtbColr);
|
||||||
|
mViewDataBinding.executePendingBindings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChooseOrdsLavFromListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
// create a new view
|
||||||
|
FragmentChooseOrdsLavFromListItemModelBinding viewDataBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.fragment_choose_ords_lav_from_list__item_model, parent, false);
|
||||||
|
|
||||||
|
return new ViewHolder(viewDataBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(ChooseOrdsLavFromListAdapter.ViewHolder holder, int position) {
|
||||||
|
CheckableOrdineLavoro item = mDataset.get(position);
|
||||||
|
holder.bind(item, mMtbColr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewRecycled(ChooseOrdsLavFromListAdapter.ViewHolder holder) {
|
||||||
|
super.onViewRecycled(holder);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return mDataset.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrdineLavorazioneDTO> getSelectedItems() {
|
||||||
|
return Stream.of(mDataset)
|
||||||
|
.filter(y -> y.getChecked().get())
|
||||||
|
.map(x -> x.getItem().getOrdineLav()).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CheckableOrdineLavoro> getSelectedData() {
|
||||||
|
return Stream.of(mDataset)
|
||||||
|
.filter(y -> y.getChecked().get())
|
||||||
|
.map(x -> x).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_versamento_materiale.core;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
|
||||||
|
public class ChooseOrdsLavFromListItemModel {
|
||||||
|
|
||||||
|
private OrdineLavorazioneDTO ordineLav;
|
||||||
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
|
|
||||||
|
public OrdineLavorazioneDTO getOrdineLav() {
|
||||||
|
return ordineLav;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChooseOrdsLavFromListItemModel setOrdineLav(OrdineLavorazioneDTO ordineLav) {
|
||||||
|
this.ordineLav= ordineLav;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHidden() {
|
||||||
|
return hidden.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChooseOrdsLavFromListItemModel setHidden(boolean hidden) {
|
||||||
|
this.hidden.set(hidden);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,466 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_versamento_materiale.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableFloat;
|
||||||
|
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
|
public class OrdineLavorazioneDTO {
|
||||||
|
|
||||||
|
private String dataOrdProd;
|
||||||
|
|
||||||
|
private Integer numOrdProd;
|
||||||
|
|
||||||
|
private Integer rigaOrdProd;
|
||||||
|
|
||||||
|
private String flagAvviabile;
|
||||||
|
|
||||||
|
private String untOrd;
|
||||||
|
|
||||||
|
private BigDecimal rapConv;
|
||||||
|
|
||||||
|
private Integer posRiga;
|
||||||
|
|
||||||
|
private BigDecimal numPezzi;
|
||||||
|
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
|
||||||
|
private Integer ggScadPartita;
|
||||||
|
|
||||||
|
private BigDecimal colliPedana;
|
||||||
|
|
||||||
|
private BigDecimal numPedane;
|
||||||
|
|
||||||
|
private String dataOrd;
|
||||||
|
|
||||||
|
private String flagEvasoProd;
|
||||||
|
|
||||||
|
private String gestione;
|
||||||
|
|
||||||
|
private Integer numOrd;
|
||||||
|
|
||||||
|
private String descrizioneProd;
|
||||||
|
|
||||||
|
private String codJfas;
|
||||||
|
|
||||||
|
private String partitaMag;
|
||||||
|
|
||||||
|
private String dataScad;
|
||||||
|
|
||||||
|
private String partitaMagSuggested;
|
||||||
|
|
||||||
|
private String dataScadSuggested;
|
||||||
|
|
||||||
|
private String codProd;
|
||||||
|
|
||||||
|
private Integer maxStep;
|
||||||
|
|
||||||
|
private String dataInizProd;
|
||||||
|
|
||||||
|
private String dataIniz;
|
||||||
|
|
||||||
|
private String dataFine;
|
||||||
|
|
||||||
|
private BigDecimal qtaProd;
|
||||||
|
|
||||||
|
private BigDecimal qtaTrasferite;
|
||||||
|
|
||||||
|
private String stato;
|
||||||
|
|
||||||
|
private String codTcolUl;
|
||||||
|
|
||||||
|
private String codAnag;
|
||||||
|
|
||||||
|
private String rifOrd;
|
||||||
|
|
||||||
|
private String codVdes;
|
||||||
|
|
||||||
|
private String codMdep;
|
||||||
|
|
||||||
|
private String codJcom;
|
||||||
|
|
||||||
|
private String noteLav;
|
||||||
|
|
||||||
|
private BigDecimal tempoTrascorso;
|
||||||
|
|
||||||
|
private String descCommessa;
|
||||||
|
|
||||||
|
private BigDecimal prodStd;
|
||||||
|
|
||||||
|
private Object mtbColtToEdit;
|
||||||
|
|
||||||
|
private int hrNum;
|
||||||
|
|
||||||
|
|
||||||
|
private BindableFloat qtaColVersamento = new BindableFloat();
|
||||||
|
private BindableFloat numCnfVersamento = new BindableFloat();
|
||||||
|
|
||||||
|
public String getDataOrdProd() {
|
||||||
|
return dataOrdProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataOrdProd(String dataOrdProd) {
|
||||||
|
this.dataOrdProd = dataOrdProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrdProd() {
|
||||||
|
return numOrdProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumOrdProd(Integer numOrdProd) {
|
||||||
|
this.numOrdProd = numOrdProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRigaOrdProd() {
|
||||||
|
return rigaOrdProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRigaOrdProd(Integer rigaOrdProd) {
|
||||||
|
this.rigaOrdProd = rigaOrdProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPosRiga() {
|
||||||
|
return posRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosRiga(Integer posRiga) {
|
||||||
|
this.posRiga = posRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
public Date getDateOrd() throws ParseException, TimeNotRecognizedException, DateNotRecognizedException {
|
||||||
|
return UtilityDate.recognizeDate(dataOrd);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataOrd(String dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagEvasoProd() {
|
||||||
|
return flagEvasoProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlagEvasoProd(String flagEvasoProd) {
|
||||||
|
this.flagEvasoProd = flagEvasoProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumOrd(Integer numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneProd() {
|
||||||
|
return descrizioneProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescrizioneProd(String descrizioneProd) {
|
||||||
|
this.descrizioneProd = descrizioneProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMaxStep() {
|
||||||
|
return maxStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxStep(Integer maxStep) {
|
||||||
|
this.maxStep = maxStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataIniz() {
|
||||||
|
return dataIniz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataIniz(String dataIniz) {
|
||||||
|
this.dataIniz = dataIniz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataFine() {
|
||||||
|
return dataFine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataFine(String dataFine) {
|
||||||
|
this.dataFine = dataFine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaProd() {
|
||||||
|
return qtaProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtaProd(BigDecimal qtaProd) {
|
||||||
|
this.qtaProd = qtaProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTrasferite() {
|
||||||
|
return qtaTrasferite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtaTrasferite(BigDecimal qtaTrasferite) {
|
||||||
|
this.qtaTrasferite = qtaTrasferite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStato() {
|
||||||
|
return stato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStato(String stato) {
|
||||||
|
this.stato = stato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntOrd() {
|
||||||
|
return untOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUntOrd(String untOrd) {
|
||||||
|
this.untOrd = untOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRapConv() {
|
||||||
|
return rapConv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRapConv(BigDecimal rapConv) {
|
||||||
|
this.rapConv = rapConv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataScad() {
|
||||||
|
return dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataScad(String dataScad) {
|
||||||
|
this.dataScad = dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMagSuggested() {
|
||||||
|
return partitaMagSuggested;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPartitaMagSuggested(String partitaMagSuggested) {
|
||||||
|
this.partitaMagSuggested = partitaMagSuggested;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataScadSuggested() {
|
||||||
|
return dataScadSuggested;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataScadSuggested(String dataScadSuggested) {
|
||||||
|
this.dataScadSuggested = dataScadSuggested;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodProd() {
|
||||||
|
return codProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodProd(String codProd) {
|
||||||
|
this.codProd = codProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataInizProd() {
|
||||||
|
return dataInizProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataInizProd(String dataInizProd) {
|
||||||
|
this.dataInizProd = dataInizProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTcolUl() {
|
||||||
|
return codTcolUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodTcolUl(String codTcolUl) {
|
||||||
|
this.codTcolUl = codTcolUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRifOrd() {
|
||||||
|
return rifOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRifOrd(String rifOrd) {
|
||||||
|
this.rifOrd = rifOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodVdes() {
|
||||||
|
return codVdes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodVdes(String codVdes) {
|
||||||
|
this.codVdes = codVdes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getColliPedana() {
|
||||||
|
return colliPedana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColliPedana(BigDecimal colliPedana) {
|
||||||
|
this.colliPedana = colliPedana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTempoTrascorso() {
|
||||||
|
return tempoTrascorso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTempoTrascorso(BigDecimal tempoTrascorso) {
|
||||||
|
this.tempoTrascorso = tempoTrascorso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescCommessa() {
|
||||||
|
return descCommessa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescCommessa(String descCommessa) {
|
||||||
|
this.descCommessa = descCommessa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getProdStd() {
|
||||||
|
return prodStd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProdStd(BigDecimal prodStd) {
|
||||||
|
this.prodStd = prodStd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagAvviabile() {
|
||||||
|
return flagAvviabile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlagAvviabile(String flagAvviabile) {
|
||||||
|
this.flagAvviabile = flagAvviabile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumPezzi() {
|
||||||
|
return numPezzi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumPezzi(BigDecimal numPezzi) {
|
||||||
|
this.numPezzi = numPezzi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumPedane() {
|
||||||
|
return numPedane;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumPedane(BigDecimal numPedane) {
|
||||||
|
this.numPedane = numPedane;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getMtbColtToEdit() {
|
||||||
|
return mtbColtToEdit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMtbColtToEdit(Object mtbColtToEdit) {
|
||||||
|
this.mtbColtToEdit = mtbColtToEdit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getGgScadPartita() {
|
||||||
|
return ggScadPartita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGgScadPartita(Integer ggScadPartita) {
|
||||||
|
this.ggScadPartita = ggScadPartita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoteLav() {
|
||||||
|
return noteLav;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoteLav(String noteLav) {
|
||||||
|
this.noteLav = noteLav;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHrNum() {
|
||||||
|
return hrNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHrNum(int hrNum) {
|
||||||
|
this.hrNum = hrNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableFloat getQtaColVersamento() {
|
||||||
|
return qtaColVersamento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtaColVersamento(float qtaColVersamento) {
|
||||||
|
this.qtaColVersamento.set(qtaColVersamento);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableFloat getNumCnfVersamento() {
|
||||||
|
return numCnfVersamento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumCnfVersamento(float numCnfVersamento) {
|
||||||
|
this.numCnfVersamento.set(numCnfVersamento);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,24 +2,42 @@ package it.integry.integrywmsnative.gest.prod_versamento_materiale.viewmodel;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentProdVersamentoMaterialeBinding;
|
import it.integry.integrywmsnative.databinding.FragmentProdVersamentoMaterialeBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ChooseOrdsLavFromListAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ChooseOrdsLavFromListItemModel;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ProdVersamentoMaterialHelper;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ProdVersamentoMaterialHelper;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
||||||
@ -35,7 +53,8 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
private FragmentProdVersamentoMaterialeBinding mBinding;
|
private FragmentProdVersamentoMaterialeBinding mBinding;
|
||||||
private ProdVersamentoMaterialHelper mHelper;
|
private ProdVersamentoMaterialHelper mHelper;
|
||||||
private Runnable mOnVersamentoCompleted;
|
private Runnable mOnVersamentoCompleted;
|
||||||
|
private List<ChooseOrdsLavFromListItemModel> mDataset = new ArrayList<>();
|
||||||
|
private ChooseOrdsLavFromListAdapter currentAdapter;
|
||||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||||
|
|
||||||
|
|
||||||
@ -48,14 +67,31 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setMtbColr(MtbColr mtbColr) {
|
||||||
|
mBinding.descrArt.setText(mtbColr.getDescrizione());
|
||||||
|
mBinding.codArt.setText(mtbColr.getCodMart());
|
||||||
|
mBinding.batch.setText(mtbColr.getPartitaMag() + ((mtbColr.getRifPartitaMag() != null) ? " - "+ mtbColr.getRifPartitaMag().getDescrizione() : ""));
|
||||||
|
if (!SettingsManager.iDB().isFlagForceAllToColli() && (mtbColr.getMtbAart() == null || mtbColr.getMtbAart().isFlagQtaCnfFissa())) {
|
||||||
|
String text = UtilityNumber.decimalToString(mtbColr.getQtaCol());
|
||||||
|
|
||||||
|
if (mtbColr.getMtbAart() != null) {
|
||||||
|
text += !UtilityString.isNullOrEmpty(mtbColr.getMtbAart().getUntMis()) ? " " + mtbColr.getMtbAart().getUntMis() : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.qtaCol.setText(text);
|
||||||
|
} else {
|
||||||
|
mBinding.qtaCol.setText(UtilityNumber.decimalToString(mtbColr.getNumCnf()) + " " + UtilityResources.getString(R.string.unt_mis_col));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void openLU() {
|
public void openLU() {
|
||||||
DialogScanOrCreateLU.make(mContext, true, true, false, mtbColt -> {
|
DialogScanOrCreateLU.make(mContext, true, true, false, mtbColt -> {
|
||||||
if(mtbColt == null) {
|
if (mtbColt == null) {
|
||||||
((IPoppableActivity)mContext).pop();
|
((IPoppableActivity) mContext).pop();
|
||||||
} else if((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)){
|
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)) {
|
||||||
|
|
||||||
if(mtbColt.getMtbColr() == null || mtbColt.getMtbColr().size() == 0) {
|
if (mtbColt.getMtbColr() == null || mtbColt.getMtbColr().size() == 0) {
|
||||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
new SpannableString(Html.fromHtml("E' stata scansionata una UL già vuota")),
|
new SpannableString(Html.fromHtml("E' stata scansionata una UL già vuota")),
|
||||||
null, this::openLU).show();
|
null, this::openLU).show();
|
||||||
@ -75,12 +111,28 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
private void choosePosition() {
|
private void choosePosition() {
|
||||||
DialogAskPositionOfLU.makeBase(mContext, null, true, (status, mtbDepoPosizione) -> {
|
DialogAskPositionOfLU.makeBase(mContext, null, true, (status, mtbDepoPosizione) -> {
|
||||||
|
|
||||||
if(status == DialogConsts.Results.ABORT) {
|
if (status == DialogConsts.Results.ABORT) {
|
||||||
((IPoppableActivity)mContext).pop();
|
((IPoppableActivity) mContext).pop();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (mtbDepoPosizione != null && mtbDepoPosizione.isFlagLineaProduzione() && mtbColt.get() != null) {
|
if (mtbDepoPosizione != null && mtbDepoPosizione.isFlagLineaProduzione() && mtbColt.get() != null) {
|
||||||
createColloScarico(mtbDepoPosizione);
|
if (!SettingsManager.iDB().isFlagVersamentoDirettoProduzione()) {
|
||||||
|
createColloScarico(mtbDepoPosizione);
|
||||||
|
} else {
|
||||||
|
if (mtbColt == null || mtbColt.get() == null || mtbColt.get().getMtbColr() == null || mtbColt.get().getMtbColr().size() <= 0) {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(Html.fromHtml("Il collo selezionato non presenta articoli versabili sulla linea.")),
|
||||||
|
null, this::openLU).show();
|
||||||
|
return;
|
||||||
|
} else if (mtbColt.get().getMtbColr().size() > 1) {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(Html.fromHtml("Il collo selezionato contiene più articoli, per versarli in produzione vanno separati in colli differenti.")),
|
||||||
|
null, this::openLU).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MesRESTConsumer.getOrdiniLavorazioneMateriale(mtbDepoPosizione.getPosizione(), getIdMaterialeFromCollo(mtbColt.get()), ordini -> richiediOrdiniPerVersamento(ordini, mtbDepoPosizione), e -> DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(Html.fromHtml(e.getMessage())),
|
||||||
|
null, this::openLU).show());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
new SpannableString(Html.fromHtml("Si è verificato un errore. Riprovare")),
|
new SpannableString(Html.fromHtml("Si è verificato un errore. Riprovare")),
|
||||||
@ -94,25 +146,26 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
}).show();
|
}).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getIdMaterialeFromCollo(MtbColt mtbColt) {
|
||||||
|
MtbAart articolo = mtbColt.getMtbColr().get(0).getMtbAart();
|
||||||
|
return UtilityString.isNullOrEmpty(articolo.getIdArtEqui()) ? articolo.getCodMart() : articolo.getIdArtEqui();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void createColloScarico(MtbDepoPosizione mtbDepoPosizione) {
|
private void createColloScarico(MtbDepoPosizione mtbDepoPosizione) {
|
||||||
|
|
||||||
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt.get(), mtbDepoPosizione, generatedMtbColt -> {
|
ColliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt.get(), mtbDepoPosizione, generatedMtbColt -> DialogCommon.showDataSaved(mContext, () -> {
|
||||||
DialogCommon.showDataSaved(mContext, () -> {
|
progressDialog.dismiss();
|
||||||
progressDialog.dismiss();
|
mOnVersamentoCompleted.run();
|
||||||
mOnVersamentoCompleted.run();
|
}), ex -> UtilityExceptions.defaultException(mContext, ex));
|
||||||
});
|
|
||||||
}, ex -> {
|
|
||||||
UtilityExceptions.defaultException(mContext, ex);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setMtbColt(MtbColt mtbColt) {
|
public void setMtbColt(MtbColt mtbColt) {
|
||||||
this.mtbColt.set(mtbColt);
|
this.mtbColt.set(mtbColt);
|
||||||
|
this.setMtbColr(mtbColt.getMtbColr().get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetMtbColt() {
|
public void resetMtbColt() {
|
||||||
@ -120,5 +173,51 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
openLU();
|
openLU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void richiediOrdiniPerVersamento(List<OrdineLavorazioneDTO> ordini, MtbDepoPosizione mtbDepoPosizione) {
|
||||||
|
|
||||||
|
if (ordini == null || ordini.size() <= 0) {
|
||||||
|
mBinding.positiveFab.setVisibility(View.GONE);
|
||||||
|
mBinding.positiveFab.setOnClickListener(null);
|
||||||
|
mBinding.emptyView.setVisibility(View.VISIBLE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mBinding.positiveFab.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
mBinding.positiveFab.setOnClickListener(c -> onPositiveClick(mtbDepoPosizione));
|
||||||
|
for (OrdineLavorazioneDTO ordineLav : ordini) {
|
||||||
|
mDataset.add(new ChooseOrdsLavFromListItemModel().setOrdineLav(ordineLav));
|
||||||
|
}
|
||||||
|
mBinding.emptyView.setVisibility(mDataset != null && mDataset.size() > 0 ? View.GONE : View.VISIBLE);
|
||||||
|
try {
|
||||||
|
initRecyclerView();
|
||||||
|
} catch (Exception e) {
|
||||||
|
UtilityExceptions.defaultException(mContext, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onPositiveClick(MtbDepoPosizione mtbDepoPosizione) {
|
||||||
|
List<OrdineLavorazioneDTO> ordLavs = currentAdapter.getSelectedItems();
|
||||||
|
if (ordLavs.size() > 0) {
|
||||||
|
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
ColliMagazzinoRESTConsumer.createColliScaricoDaOrdineLavorazione(mtbColt.get(), mtbDepoPosizione, ordLavs, generatedMtbColt -> DialogCommon.showDataSaved(mContext, () -> {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
mOnVersamentoCompleted.run();
|
||||||
|
}), ex -> UtilityExceptions.defaultException(mContext, ex));
|
||||||
|
} else {
|
||||||
|
Toast.makeText(mContext, "Nessun ordine selezionato!", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRecyclerView() throws ParseException, TimeNotRecognizedException, DateNotRecognizedException {
|
||||||
|
mBinding.dialogChooseArtsFromListaArtMainList.setNestedScrollingEnabled(false);
|
||||||
|
|
||||||
|
mBinding.dialogChooseArtsFromListaArtMainList.setHasFixedSize(true);
|
||||||
|
|
||||||
|
mBinding.dialogChooseArtsFromListaArtMainList.setLayoutManager(new LinearLayoutManager(mContext));
|
||||||
|
|
||||||
|
currentAdapter = new ChooseOrdsLavFromListAdapter(mContext, mDataset, mtbColt.get());
|
||||||
|
mBinding.dialogChooseArtsFromListaArtMainList.setAdapter(currentAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.tfb.fbtoast.FBToast;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.MathContext;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -1077,23 +1078,6 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
float qtaEvasaTotale = qtaEvasaTotaleInMtbColr;
|
float qtaEvasaTotale = qtaEvasaTotaleInMtbColr;
|
||||||
|
|
||||||
|
|
||||||
filteredMtbColrs = Stream.of(currentMtbColrs).filter(
|
|
||||||
x ->
|
|
||||||
x.getGestioneRif() != null && x.getGestioneRif().equalsIgnoreCase(item.getGestione()) &&
|
|
||||||
Objects.equals(x.getNumColloRif(), item.getNumCollo()) &&
|
|
||||||
x.getSerColloRif() != null && x.getSerColloRif().equalsIgnoreCase(item.getSerCollo()) &&
|
|
||||||
x.getDataColloRifD() != null && x.getDataColloRifD().equals(item.getDataColloD()) &&
|
|
||||||
x.getCodMart() != null && x.getCodMart().equalsIgnoreCase(item.getCodMart()) &&
|
|
||||||
(!SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() || (SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() && ((x.getPartitaMag() == null && item.getPartitaMag() == null) || (x.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(item.getPartitaMag())))))
|
|
||||||
).toList();
|
|
||||||
|
|
||||||
float qtaEvasaCurrentULInMtbColr = 0;
|
|
||||||
for (MtbColr mtbColr : filteredMtbColrs) {
|
|
||||||
qtaEvasaCurrentULInMtbColr += mtbColr.getQtaCol().floatValue();
|
|
||||||
}
|
|
||||||
float qtaEvasaCurrentUL = qtaEvasaCurrentULInMtbColr;
|
|
||||||
|
|
||||||
|
|
||||||
BigDecimal qtaDaEvadere = item.getQtaOrd().subtract(new BigDecimal(qtaEvasaTotale));
|
BigDecimal qtaDaEvadere = item.getQtaOrd().subtract(new BigDecimal(qtaEvasaTotale));
|
||||||
if(qtaDaEvadere.floatValue() < 0) qtaDaEvadere = BigDecimal.ZERO;
|
if(qtaDaEvadere.floatValue() < 0) qtaDaEvadere = BigDecimal.ZERO;
|
||||||
|
|
||||||
@ -1192,20 +1176,14 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
if(dto.getNumCnf() == 0) dto.setNumCnf(1);
|
if(dto.getNumCnf() == 0) dto.setNumCnf(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if(dto.getQtaTot() != null && dto.getQtaTot().floatValue() > 0 && dto.getQtaCnf() != null && dto.getQtaCnf().floatValue() > 0) {
|
|
||||||
// dto.setNumCnf(dto.getQtaTot().divide(dto.getQtaCnf()).intValue());
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
dto.setCanPartitaMagBeChanged(false);
|
dto.setCanPartitaMagBeChanged(false);
|
||||||
dto.setCanDataScadBeChanged(false);
|
dto.setCanDataScadBeChanged(false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dto.setNumCnf(item.getNumCnfCollo() != null ? item.getNumCnfCollo().intValue() : item.getNumCnfOrd().intValue());
|
dto.setNumCnf(qtaDaEvadere.divide(item.getQtaCnfCollo(), 3, RoundingMode.HALF_EVEN).setScale(0, RoundingMode.UP).intValue());
|
||||||
|
dto.setQtaCnf(item.getQtaCnfCollo());
|
||||||
if(dto.getNumCnf() != null && dto.getQtaTot() != null && dto.getNumCnf() > 0 && dto.getQtaTot().compareTo(BigDecimal.ZERO) > 0) {
|
|
||||||
dto.setQtaCnf(dto.getQtaTot().divide(new BigDecimal(dto.getNumCnf()), 3, RoundingMode.HALF_EVEN));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean canOverflowQuantity = SettingsManager.iDB().isFlagCanAddExtraQuantitySpedizione();
|
boolean canOverflowQuantity = SettingsManager.iDB().isFlagCanAddExtraQuantitySpedizione();
|
||||||
|
|||||||
@ -500,7 +500,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:text="Modifica"/>
|
android:text="@string/edit"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -528,7 +528,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:text="Cancella"/>
|
android:text="@string/delete"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,155 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.settings.SettingsManager" />
|
||||||
|
<import type="android.view.View" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityResources" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
<variable
|
||||||
|
name="checkableOrdineLav"
|
||||||
|
type="it.integry.integrywmsnative.core.model.CheckableOrdineLavoro"/>
|
||||||
|
<variable
|
||||||
|
name="mtbColr"
|
||||||
|
type="it.integry.integrywmsnative.core.model.MtbColr"/>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_checked_layout"
|
||||||
|
app:backgroundTintResID="@{checkableOrdineLav.checked.get() ? R.color.bg_checked_layout : android.R.color.transparent}"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:onClick="@{() -> checkableOrdineLav.toggleCheck()}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/checkbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
app:checked="@{checkableOrdineLav.checked}"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_toEndOf="@id/checkbox"
|
||||||
|
android:layout_toStartOf="@id/qta_box">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{checkableOrdineLav.getTestata()}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="N° X del dd/mm/yyyy" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(checkableOrdineLav.qtaCol.get()) +' '+ mtbColr.mtbAart.untMis}"
|
||||||
|
android:visibility="@{SettingsManager.iDB().isFlagForceAllToColli() || (mtbColr.mtbAart != null && !mtbColr.mtbAart.isFlagQtaCnfFissa()) ? View.VISIBLE : View.GONE}"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:background="@drawable/badge2_round_corner"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
tools:text="PESO KG" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:text="@{checkableOrdineLav.item.ordineLav.codProd +' '+ checkableOrdineLav.item.ordineLav.descrizioneProd}"
|
||||||
|
android:textColor="@android:color/secondary_text_light"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="150303-010 CAVOLO VERZA 6 PZ PL NERA 604018" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:text="@{UtilityString.formatHtmlStringFromResId(R.string.batch_lot_text, checkableOrdineLav.item.ordineLav.partitaMag)}"
|
||||||
|
tools:text="Lotto: 35119F0038" />
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:visibility="@{!UtilityString.isNullOrEmpty(checkableOrdineLav.item.ordineLav.noteLav) ? View.VISIBLE : View.GONE}"
|
||||||
|
android:maxLines="2"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:text="@{UtilityString.formatHtmlStringFromResId(R.string.notes_text, checkableOrdineLav.item.ordineLav.noteLav)}"
|
||||||
|
tools:text="note: prova" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/qta_box"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/qta_textview"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/badge1_round_corner"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
tools:text="280.45\nCONF" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</layout>
|
||||||
@ -24,6 +24,7 @@
|
|||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -46,29 +47,29 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:background="@drawable/badge1_round_corner"
|
android:background="@drawable/badge1_round_corner"
|
||||||
android:text="@{viewmodel.mtbColt.get().numCollo.toString()}"
|
android:text="@{viewmodel.mtbColt.get().numCollo.toString()}"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
tools:text="2156"/>
|
tools:text="2156"/>
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:visibility="@{!UtilityString.isNullOrEmpty(viewmodel.mtbColt.get().posizione) ? View.VISIBLE : View.GONE}"
|
android:visibility="@{!UtilityString.isNullOrEmpty(viewmodel.mtbColt.get().posizione) ? View.VISIBLE : View.GONE}"
|
||||||
android:text="@{viewmodel.mtbColt.get().posizione}"
|
android:text="@{viewmodel.mtbColt.get().posizione}"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
tools:text="ME1FS032"/>
|
tools:text="ME1FS032"/>
|
||||||
|
|
||||||
|
|
||||||
@ -114,6 +115,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore">
|
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore">
|
||||||
|
|
||||||
@ -132,6 +134,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/guide_line_fornitore"
|
app:layout_constraintStart_toEndOf="@id/guide_line_fornitore"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
@ -180,6 +183,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
@ -256,8 +260,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="18sp"
|
android:text="@string/no_item_text"
|
||||||
android:text="@string/no_item_text"/>
|
style="@style/AppTheme.NewMaterial.Text.Medium"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -266,7 +270,10 @@
|
|||||||
android:id="@+id/rettifica_giacenze_main_list"
|
android:id="@+id/rettifica_giacenze_main_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="32dp"/>
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="80dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:scrollbarStyle="outsideOverlay"/>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/rettifica_giacenze_main_fab"
|
android:id="@+id/rettifica_giacenze_main_fab"
|
||||||
@ -294,6 +301,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/bottom_sheet_actions"
|
android:id="@+id/bottom_sheet_actions"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -317,6 +326,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/bottom_sheet_actions_quantity"
|
app:layout_constraintEnd_toStartOf="@id/bottom_sheet_actions_quantity"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
@ -326,30 +336,31 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="Descrizione articolo"
|
tools:text="Descrizione articolo"
|
||||||
android:textColor="#444"
|
android:textColor="#444"
|
||||||
android:textSize="18dp"
|
android:maxLines="2"
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:paddingRight="8dp"
|
android:paddingStart="0dp"
|
||||||
android:textStyle="bold" />
|
android:paddingEnd="8dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/bottom_sheet_actions_subtitle"
|
android:id="@+id/bottom_sheet_actions_subtitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="ABF52IL"
|
tools:text="ABF52IL"
|
||||||
android:textSize="14dp"
|
style="@style/AppTheme.NewMaterial.Text.Small" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/bottom_sheet_actions_quantity"
|
android:id="@+id/bottom_sheet_actions_quantity"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:gravity="right"
|
android:gravity="end"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="15dp"
|
|
||||||
tools:text="250 PZ"
|
tools:text="250 PZ"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"/>
|
app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@ -370,6 +381,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guideline_action"
|
app:layout_constraintEnd_toStartOf="@id/guideline_action"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
@ -388,7 +400,8 @@
|
|||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Modifica"/>
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:text="@string/edit"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -396,6 +409,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/guideline_action"
|
app:layout_constraintStart_toStartOf="@id/guideline_action"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
@ -414,7 +428,8 @@
|
|||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Cancella"/>
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:text="@string/delete"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -423,6 +438,9 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@ -230,7 +230,7 @@
|
|||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Cancella"/>
|
android:text="@string/delete"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,183 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
|
||||||
<data>
|
<data>
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_height="match_parent"
|
android:id="@+id/base_root"
|
||||||
tools:context=".gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment">
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
|
||||||
</FrameLayout>
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
|
android:text="@string/distribute_ul"
|
||||||
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/gray_detail_background_round8"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/descr_art"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="CAVOLO VERZA"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/article"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cod_art"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="150303-010"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/batch_lot"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/batch"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="35119F0038"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="italic" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/quantity"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qta_col"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="385 CONF"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="italic" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/empty_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/no_available_order_on_line"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/empty_view_gray"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/dialog_choose_arts_from_lista_art__main_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="80dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:scrollbarStyle="outsideOverlay"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/positive_fab"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
android:tint="@android:color/white"
|
||||||
|
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
|
app:srcCompat="@drawable/ic_check_black_24dp" />
|
||||||
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -42,6 +42,7 @@
|
|||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
tools:text="COD MART" />
|
tools:text="COD MART" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
@ -55,6 +56,7 @@
|
|||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_toEndOf="@id/cod_mart"
|
android:layout_toEndOf="@id/cod_mart"
|
||||||
android:visibility="@{(mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod)) ? View.VISIBLE : View.GONE}"
|
android:visibility="@{(mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod)) ? View.VISIBLE : View.GONE}"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
tools:text="(12345)" />
|
tools:text="(12345)" />
|
||||||
|
|
||||||
|
|
||||||
@ -80,13 +82,12 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_toLeftOf="@id/posizione_collo"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text="@{mtbColr.getDescrizione()}"
|
android:text="@{mtbColr.getDescrizione()}"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
tools:text="Descrizione lunga articolo" />
|
tools:text="Descrizione lunga articolo" />
|
||||||
|
|
||||||
|
|
||||||
@ -96,6 +97,7 @@
|
|||||||
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.GONE : View.VISIBLE}"
|
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.GONE : View.VISIBLE}"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
tools:text="Lotto: ABCDE" />
|
tools:text="Lotto: ABCDE" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -125,6 +127,7 @@
|
|||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
tools:text="280.45\nCONF" />
|
tools:text="280.45\nCONF" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@ -10,8 +10,9 @@
|
|||||||
<string name="completed">Completato</string>
|
<string name="completed">Completato</string>
|
||||||
<string name="ord_acq_testata"><![CDATA[N° <b>%s</b> del <b>%s</b>]]></string>
|
<string name="ord_acq_testata"><![CDATA[N° <b>%s</b> del <b>%s</b>]]></string>
|
||||||
<string name="ord_ven_testata"><![CDATA[N° <b>%s</b> del <b>%s</b>]]></string>
|
<string name="ord_ven_testata"><![CDATA[N° <b>%s</b> del <b>%s</b>]]></string>
|
||||||
|
<string name="ord_testata"><![CDATA[N° <b>%s</b> del <b>%s</b>]]></string>
|
||||||
<string name="ord_ven_testata_data_cons"><![CDATA[Cons <b>%s</b>]]></string>
|
<string name="ord_ven_testata_data_cons"><![CDATA[Cons <b>%s</b>]]></string>
|
||||||
<string name="search">Cerca...</string>
|
<string name="search">Cerca…</string>
|
||||||
<string name="login">Login</string>
|
<string name="login">Login</string>
|
||||||
<string name="accettazione_title_fragment">Accettazione</string>
|
<string name="accettazione_title_fragment">Accettazione</string>
|
||||||
<string name="accettazione_ordine_inevaso_title_empty">Ordine di accettazione</string>
|
<string name="accettazione_ordine_inevaso_title_empty">Ordine di accettazione</string>
|
||||||
@ -131,6 +132,7 @@
|
|||||||
|
|
||||||
<string name="batch_lot">Lotto</string>
|
<string name="batch_lot">Lotto</string>
|
||||||
<string name="batch_lot_text"><![CDATA[Lotto: <b>%s</b>]]></string>
|
<string name="batch_lot_text"><![CDATA[Lotto: <b>%s</b>]]></string>
|
||||||
|
<string name="notes_text"><![CDATA[Note: <b>%s</b>]]></string>
|
||||||
<string name="expire_date">Data scad</string>
|
<string name="expire_date">Data scad</string>
|
||||||
<string name="num_pcks">Num cnf</string>
|
<string name="num_pcks">Num cnf</string>
|
||||||
<string name="qty_x_pck"><![CDATA[Qtà x cnf]]></string>
|
<string name="qty_x_pck"><![CDATA[Qtà x cnf]]></string>
|
||||||
@ -164,6 +166,7 @@
|
|||||||
<string name="no_item_to_pick_text">Nessun articolo da prelevare</string>
|
<string name="no_item_to_pick_text">Nessun articolo da prelevare</string>
|
||||||
<string name="no_docs_to_show_text">Nessun documento da mostrare</string>
|
<string name="no_docs_to_show_text">Nessun documento da mostrare</string>
|
||||||
<string name="no_orders_to_pick_text">Nessun ordine da evadere</string>
|
<string name="no_orders_to_pick_text">Nessun ordine da evadere</string>
|
||||||
|
<string name="no_available_order_on_line">Nessun ordine compatibile</string>
|
||||||
<string name="no_item_text">Nessun articolo</string>
|
<string name="no_item_text">Nessun articolo</string>
|
||||||
<string name="no_item_in_recupera_materiale">Nessuna UL versata in produzione</string>
|
<string name="no_item_in_recupera_materiale">Nessuna UL versata in produzione</string>
|
||||||
|
|
||||||
@ -296,4 +299,7 @@
|
|||||||
<string name="choose_action">Seleziona una azione</string>
|
<string name="choose_action">Seleziona una azione</string>
|
||||||
<string name="delete">Elimina</string>
|
<string name="delete">Elimina</string>
|
||||||
<string name="edit">Modifica</string>
|
<string name="edit">Modifica</string>
|
||||||
|
<string name="distribute_ul">Distribuisci quantità</string>
|
||||||
|
<string name="article">Articolo</string>
|
||||||
|
<string name="title_dynamic_saporiveri">Personalizzazione SaporiVeri</string>
|
||||||
</resources>
|
</resources>
|
||||||
@ -49,6 +49,7 @@
|
|||||||
<string name="permission_request_message">Permissions are required for app to work properly</string>
|
<string name="permission_request_message">Permissions are required for app to work properly</string>
|
||||||
<string name="ord_acq_testata"><![CDATA[#<b>%s</b> of <b>%s</b>]]></string>
|
<string name="ord_acq_testata"><![CDATA[#<b>%s</b> of <b>%s</b>]]></string>
|
||||||
<string name="ord_ven_testata"><![CDATA[#<b>%s</b> of <b>%s</b>]]></string>
|
<string name="ord_ven_testata"><![CDATA[#<b>%s</b> of <b>%s</b>]]></string>
|
||||||
|
<string name="ord_testata"><![CDATA[#<b>%s</b> of <b>%s</b>]]></string>
|
||||||
<string name="ord_ven_testata_data_cons"><![CDATA[Ship <b>%s</b>]]></string>
|
<string name="ord_ven_testata_data_cons"><![CDATA[Ship <b>%s</b>]]></string>
|
||||||
<string name="accettazione_title_fragment">Check in</string>
|
<string name="accettazione_title_fragment">Check in</string>
|
||||||
<string name="accettazione_ordine_inevaso_title_empty">Check in order</string>
|
<string name="accettazione_ordine_inevaso_title_empty">Check in order</string>
|
||||||
@ -130,6 +131,7 @@
|
|||||||
<string name="level">Level</string>
|
<string name="level">Level</string>
|
||||||
<string name="not_valid">Not valid</string>
|
<string name="not_valid">Not valid</string>
|
||||||
<string name="batch_lot_text"><![CDATA[Batch lot: <b>%s</b>]]></string>
|
<string name="batch_lot_text"><![CDATA[Batch lot: <b>%s</b>]]></string>
|
||||||
|
<string name="notes_text"><![CDATA[Notes: <b>%s</b>]]></string>
|
||||||
<string name="expire_date">Expire date</string>
|
<string name="expire_date">Expire date</string>
|
||||||
<string name="num_pcks">Pcks num</string>
|
<string name="num_pcks">Pcks num</string>
|
||||||
<string name="qty_x_pck">Qty x pck</string>
|
<string name="qty_x_pck">Qty x pck</string>
|
||||||
@ -165,6 +167,7 @@
|
|||||||
<string name="no_item_to_pick_text">No items to pick</string>
|
<string name="no_item_to_pick_text">No items to pick</string>
|
||||||
<string name="no_docs_to_show_text">No documents to show</string>
|
<string name="no_docs_to_show_text">No documents to show</string>
|
||||||
<string name="no_orders_to_pick_text">No orders to dispatch</string>
|
<string name="no_orders_to_pick_text">No orders to dispatch</string>
|
||||||
|
.<string name="no_available_order_on_line">no compatible orders found</string>
|
||||||
<string name="no_item_text">No items</string>
|
<string name="no_item_text">No items</string>
|
||||||
<string name="no_item_in_recupera_materiale">No LU poured into production</string>
|
<string name="no_item_in_recupera_materiale">No LU poured into production</string>
|
||||||
|
|
||||||
@ -302,4 +305,6 @@
|
|||||||
<string name="delete">Delete</string>
|
<string name="delete">Delete</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="title_dynamic_saporiveri">SaporVeri Customization</string>
|
<string name="title_dynamic_saporiveri">SaporVeri Customization</string>
|
||||||
|
<string name="distribute_ul">Distribute quantity</string>
|
||||||
|
<string name="article">Article</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user