Rimossa gestione MtbCols
This commit is contained in:
parent
0dcb8c6af4
commit
600258228b
@ -1,122 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
|
|
||||||
public class MtbCols extends EntityBase {
|
|
||||||
|
|
||||||
private String dataCollo;
|
|
||||||
private String gestione;
|
|
||||||
private Integer idRiga;
|
|
||||||
private Integer numCollo;
|
|
||||||
private String serCollo;
|
|
||||||
private String codMdep;
|
|
||||||
private String dataMove;
|
|
||||||
private String modificatoDa;
|
|
||||||
private String posizione;
|
|
||||||
private String causale;
|
|
||||||
|
|
||||||
public MtbCols() {
|
|
||||||
type = "mtb_cols";
|
|
||||||
setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
|
||||||
setModificatoDa(SettingsManager.i().getUser().getFullname());
|
|
||||||
//setDataMove(UtilityDate.getDateInstance());
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataCollo() {
|
|
||||||
return dataCollo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setDataCollo(String dataCollo) {
|
|
||||||
this.dataCollo = dataCollo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGestione() {
|
|
||||||
return gestione;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setGestione(String gestione) {
|
|
||||||
this.gestione = gestione;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIdRiga() {
|
|
||||||
return idRiga;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setIdRiga(Integer idRiga) {
|
|
||||||
this.idRiga = idRiga;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumCollo() {
|
|
||||||
return numCollo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setNumCollo(Integer numCollo) {
|
|
||||||
this.numCollo = numCollo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSerCollo() {
|
|
||||||
return serCollo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setSerCollo(String serCollo) {
|
|
||||||
this.serCollo = serCollo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodMdep() {
|
|
||||||
return codMdep;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setCodMdep(String codMdep) {
|
|
||||||
this.codMdep = codMdep;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataMove() {
|
|
||||||
return dataMove;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setDataMove(String dataMove) {
|
|
||||||
this.dataMove = dataMove;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setDataMove(Date dataMove) {
|
|
||||||
this.dataMove = UtilityDate.formatDate(dataMove, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModificatoDa() {
|
|
||||||
return modificatoDa;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setModificatoDa(String modificatoDa) {
|
|
||||||
this.modificatoDa = modificatoDa;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPosizione() {
|
|
||||||
return posizione;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setPosizione(String posizione) {
|
|
||||||
this.posizione = posizione;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCausale() {
|
|
||||||
return causale;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setCausale(String causale) {
|
|
||||||
this.causale = causale;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -63,7 +63,6 @@ public class MtbColt extends EntityBase {
|
|||||||
private BigDecimal altezzaCm;
|
private BigDecimal altezzaCm;
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
private List<MtbCols> mtbCols;
|
|
||||||
private MtbTCol mtbTCol;
|
private MtbTCol mtbTCol;
|
||||||
|
|
||||||
private Boolean disablePrint;
|
private Boolean disablePrint;
|
||||||
@ -526,16 +525,6 @@ public class MtbColt extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<MtbCols> getMtbCols() {
|
|
||||||
return mtbCols;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColt setMtbCols(List<MtbCols> mtbCols) {
|
|
||||||
this.mtbCols = mtbCols;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getDisablePrint() {
|
public Boolean getDisablePrint() {
|
||||||
return disablePrint == null ? false : disablePrint;
|
return disablePrint == null ? false : disablePrint;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,8 +89,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
for (MtbColt mtbColt : mtbColtsToSave) {
|
for (MtbColt mtbColt : mtbColtsToSave) {
|
||||||
mtbColt.setMtbCols(null);
|
|
||||||
|
|
||||||
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
||||||
mtbColt.getMtbColr().get(i)
|
mtbColt.getMtbColr().get(i)
|
||||||
.setMtbAart(null)
|
.setMtbAart(null)
|
||||||
@ -700,6 +698,27 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void confirmGiacenzaUL(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||||
|
sourceMtbColtClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
colliMagazzinoRESTConsumerService.confirmGiacenzaUL(sourceMtbColtClone).enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||||
|
analyzeAnswer(response, "confirmGiacenzaUL", data -> {
|
||||||
|
onComplete.run();
|
||||||
|
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||||
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
HashMap<String, Object> params = new HashMap<>();
|
||||||
|
|||||||
@ -46,4 +46,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/versamentoAutomaticoUL")
|
@POST("wms/versamentoAutomaticoUL")
|
||||||
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
@POST("wms/confirmGiacenzaUL")
|
||||||
|
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BuildConfig;
|
||||||
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
@ -59,10 +60,10 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void printCollo(MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void printCollo(MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
// if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// onComplete.run();
|
onComplete.run();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
||||||
Call<ServiceRESTResponse<Object>> callable = null;
|
Call<ServiceRESTResponse<Object>> callable = null;
|
||||||
@ -87,10 +88,10 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
|
|
||||||
public void printReport(String printerName, String reportName, HashMap<String, Object> params, int quantity, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void printReport(String printerName, String reportName, HashMap<String, Object> params, int quantity, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
// if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// onComplete.run();
|
onComplete.run();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
JasperDTO jasperDTO = new JasperDTO();
|
JasperDTO jasperDTO = new JasperDTO();
|
||||||
jasperDTO.setReportName(reportName);
|
jasperDTO.setReportName(reportName);
|
||||||
|
|||||||
@ -21,7 +21,6 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUPrintL
|
|||||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbCols;
|
|
||||||
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.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
@ -127,7 +126,8 @@ public class RettificaGiacenzeViewModel {
|
|||||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||||
barcodeProd = ean128Model.Content;
|
barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Internal1)) codMart = ean128Model.Internal1;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Internal1))
|
||||||
|
codMart = ean128Model.Internal1;
|
||||||
|
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
@ -137,7 +137,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
||||||
} else if(!UtilityString.isNullOrEmpty(codMart)) {
|
} else if (!UtilityString.isNullOrEmpty(codMart)) {
|
||||||
this.searchArtInt(codMart, onComplete);
|
this.searchArtInt(codMart, onComplete);
|
||||||
} else {
|
} else {
|
||||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||||
@ -455,18 +455,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
||||||
final MtbCols mtbCols = new MtbCols()
|
this.mColliMagazzinoRESTConsumer.confirmGiacenzaUL(mCurrentMtbColt, onComplete, this::sendError);
|
||||||
.setCausale(this.mDefaultCausale);
|
|
||||||
mtbCols.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
|
||||||
cloneMtbColt.setMtbColr(null);
|
|
||||||
|
|
||||||
cloneMtbColt.setMtbCols(new ArrayList<>());
|
|
||||||
cloneMtbColt.getMtbCols().add(mtbCols);
|
|
||||||
|
|
||||||
this.mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, mtbColt -> onComplete.run(), this::sendError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void savePosizione(MtbDepoPosizione mtbDepoPosizione, Runnable onComplete) {
|
private void savePosizione(MtbDepoPosizione mtbDepoPosizione, Runnable onComplete) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user