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 String codJcom;
|
||||
|
||||
private List<MtbCols> mtbCols;
|
||||
private MtbTCol mtbTCol;
|
||||
|
||||
private Boolean disablePrint;
|
||||
@ -526,16 +525,6 @@ public class MtbColt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public List<MtbCols> getMtbCols() {
|
||||
return mtbCols;
|
||||
}
|
||||
|
||||
public MtbColt setMtbCols(List<MtbCols> mtbCols) {
|
||||
this.mtbCols = mtbCols;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getDisablePrint() {
|
||||
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) {
|
||||
|
||||
for (MtbColt mtbColt : mtbColtsToSave) {
|
||||
mtbColt.setMtbCols(null);
|
||||
|
||||
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
||||
mtbColt.getMtbColr().get(i)
|
||||
.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) {
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
|
||||
@ -46,4 +46,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
||||
@POST("wms/versamentoAutomaticoUL")
|
||||
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 it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
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) {
|
||||
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// onComplete.run();
|
||||
// return;
|
||||
// }
|
||||
if (BuildConfig.DEBUG) {
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
|
||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
||||
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) {
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// onComplete.run();
|
||||
// return;
|
||||
// }
|
||||
if (BuildConfig.DEBUG) {
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
|
||||
JasperDTO jasperDTO = new JasperDTO();
|
||||
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.MtbAart;
|
||||
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.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
@ -127,7 +126,8 @@ public class RettificaGiacenzeViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(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)) {
|
||||
@ -455,18 +455,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
|
||||
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
||||
final MtbCols mtbCols = new MtbCols()
|
||||
.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);
|
||||
this.mColliMagazzinoRESTConsumer.confirmGiacenzaUL(mCurrentMtbColt, onComplete, this::sendError);
|
||||
}
|
||||
|
||||
private void savePosizione(MtbDepoPosizione mtbDepoPosizione, Runnable onComplete) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user