Compare commits
30 Commits
v1.32.01(3
...
v1.32.08(3
| Author | SHA1 | Date | |
|---|---|---|---|
| af5d19eb55 | |||
| b0a7a93f85 | |||
| 10f888b5d5 | |||
| 95807fbfbc | |||
| 4317e083a6 | |||
| 0c54a32e39 | |||
| 62dc62aa99 | |||
| 2182a970ac | |||
| 9b823fdca8 | |||
| 904c825472 | |||
| a15d225998 | |||
| e3b8373bb9 | |||
| 0cdbbc096c | |||
| 895c21cee4 | |||
| d541761ac6 | |||
| 72773deaf1 | |||
| 165568b7e3 | |||
| 3396e295fa | |||
| 0f3f593abd | |||
| df48ea3b32 | |||
| 5e52d83c40 | |||
| 0a71f54814 | |||
| c18828cdda | |||
| 92073fa8bb | |||
| 4131dd7e97 | |||
| 3c4fdea0ec | |||
| 71c73e8cde | |||
| 1a66d4f541 | |||
| d9c33dc5f5 | |||
| 2566311f96 |
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 341
|
||||
def appVersionName = '1.32.01'
|
||||
def appVersionCode = 348
|
||||
def appVersionName = '1.32.08'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class InventarioRoomDTO extends BaseSyncDTO implements EntityModelInterfa
|
||||
private String zona;
|
||||
|
||||
@ColumnInfo(name = Columns.IS_NEW)
|
||||
private Boolean isNew;
|
||||
private Boolean isNew = Boolean.TRUE;
|
||||
|
||||
@Ignore
|
||||
private List<InventarioRowRoomDTO> inventarioRowList;
|
||||
|
||||
@@ -69,7 +69,8 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
||||
resolveFetch(remoteData, internalLiveData.getValue(),
|
||||
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
||||
(remoteItem, localItem) -> {
|
||||
remoteItem.setNew(true);
|
||||
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
||||
remoteItem.setNew(false);
|
||||
}, onComplete, onError);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -15,6 +15,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@@ -137,6 +139,23 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
||||
});
|
||||
}
|
||||
|
||||
public void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||
|
||||
colliLavorazioneRESTConsumerService.editUDSRow(editUDSRowRequestDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDSRowResponseDTO>> response) {
|
||||
analyzeAnswer(response, "lavorazione/editUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||
|
||||
@@ -8,6 +8,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@@ -35,6 +37,9 @@ public interface ColliLavorazioneRESTConsumerService {
|
||||
@POST("wms/lavorazione/insertUDSRow")
|
||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/lavorazione/editUDSRow")
|
||||
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/lavorazione/deleteUDSRow")
|
||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@@ -133,6 +135,23 @@ public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements Co
|
||||
});
|
||||
}
|
||||
|
||||
public void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||
|
||||
colliSpedizioneRESTConsumerService.editUDSRow(editUDSRowRequestDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDSRowResponseDTO>> response) {
|
||||
analyzeAnswer(response, "spedizione/editUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@@ -35,6 +37,9 @@ public interface ColliSpedizioneRESTConsumerService {
|
||||
@POST("wms/spedizione/insertUDSRow")
|
||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/spedizione/editUDSRow")
|
||||
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/spedizione/deleteUDSRow")
|
||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||
|
||||
|
||||
@@ -10,8 +10,17 @@ import retrofit2.http.Query;
|
||||
|
||||
public interface GiacenzaRESTConsumerService {
|
||||
|
||||
@GET("wms/giacenza/availableItems")
|
||||
@GET("wms/giacenza/availableItemsByPosizione")
|
||||
Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> retrieveAvailableItems(
|
||||
@Query("posizione") String posizione);
|
||||
|
||||
@GET("wms/giacenza/availableItemsByArticolo")
|
||||
Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> retrieveAvailableItemsByArt(
|
||||
@Query("codMart") String codMart);
|
||||
|
||||
@GET("wms/giacenza/availableItemsByArticolo")
|
||||
Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> retrieveAvailableItemsByArt(
|
||||
@Query("codMart") String codMart,
|
||||
@Query("partitaMag") String partitaMag);
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public class InventarioRESTConsumer extends _BaseRESTConsumer {
|
||||
.execute();
|
||||
|
||||
var data = analyzeAnswer(response, "retrieveInventario");
|
||||
if (data == null) return null;
|
||||
return data.getInventories();
|
||||
}
|
||||
|
||||
@@ -71,18 +72,18 @@ public class InventarioRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 120);
|
||||
inventarioRESTConsumerService
|
||||
.insert(inventarioToInsert.getIdInventario(), request)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||
analyzeAnswer(response, "insertInventario", ignored -> onComplete.run(), onFailed);
|
||||
}
|
||||
.insert(inventarioToInsert.getIdInventario(), request)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||
analyzeAnswer(response, "insertInventario", ignored -> onComplete.run(), onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
|
||||
@@ -26,5 +27,7 @@ public interface ColliScaricoRESTConsumerInterface {
|
||||
|
||||
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||
|
||||
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||
|
||||
void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
|
||||
public class DocumentoArtDTO {
|
||||
|
||||
private String codMart;
|
||||
@@ -18,6 +16,7 @@ public class DocumentoArtDTO {
|
||||
private BigDecimal giacenza;
|
||||
private boolean plu;
|
||||
private BigDecimal przVendIva;
|
||||
private boolean untMisDigitale;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
@@ -109,16 +108,12 @@ public class DocumentoArtDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbAart toMtbAart() {
|
||||
return new MtbAart()
|
||||
.setCodMart(getCodMart())
|
||||
.setDescrizione(getDescrizione())
|
||||
.setDescrizioneEstesa(getDescrizione())
|
||||
.setBarCode(!getBarcode().isEmpty() ? getBarcode().get(0) : null)
|
||||
.setUntMis(getUntMis())
|
||||
.setQtaCnf(getQtaCnf())
|
||||
.setPlu(isPlu() ? "S" : "N")
|
||||
.setFlagTracciabilita(isFlagTracciabilita() ? "S" : "N")
|
||||
.setFlagQtaCnfFissa(isFlagQtaCnfFissa() ? "S" : "N");
|
||||
public boolean isUntMisDigitale() {
|
||||
return untMisDigitale;
|
||||
}
|
||||
|
||||
public DocumentoArtDTO setUntMisDigitale(boolean untMisDigitale) {
|
||||
this.untMisDigitale = untMisDigitale;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@ package it.integry.integrywmsnative.core.rest.model.inventario;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
|
||||
public class InventarioArtDTO {
|
||||
|
||||
@@ -18,6 +20,7 @@ public class InventarioArtDTO {
|
||||
private BigDecimal giacenza;
|
||||
private boolean plu;
|
||||
private BigDecimal przVendIva;
|
||||
private boolean untMisDigitale;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
@@ -109,7 +112,21 @@ public class InventarioArtDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isUntMisDigitale() {
|
||||
return untMisDigitale;
|
||||
}
|
||||
|
||||
public InventarioArtDTO setUntMisDigitale(boolean untMisDigitale) {
|
||||
this.untMisDigitale = untMisDigitale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbAart toMtbAart() {
|
||||
MtbUntMis mtbUntMis = new MtbUntMis()
|
||||
.setUntMis(getUntMis())
|
||||
.setFlagDig(isUntMisDigitale() ? "S" : "N");
|
||||
List<MtbUntMis> mtbUntMisList = Collections.singletonList(mtbUntMis);
|
||||
|
||||
return new MtbAart()
|
||||
.setCodMart(getCodMart())
|
||||
.setDescrizione(getDescrizione())
|
||||
@@ -119,6 +136,7 @@ public class InventarioArtDTO {
|
||||
.setQtaCnf(getQtaCnf())
|
||||
.setPlu(isPlu() ? "S" : "N")
|
||||
.setFlagTracciabilita(isFlagTracciabilita() ? "S" : "N")
|
||||
.setFlagQtaCnfFissa(isFlagQtaCnfFissa() ? "S" : "N");
|
||||
.setFlagQtaCnfFissa(isFlagQtaCnfFissa() ? "S" : "N")
|
||||
.setMtbUntMis(mtbUntMisList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class EditUDSRowRequestDTO {
|
||||
|
||||
private MtbColr sourceMtbColr;
|
||||
private BigDecimal newQtaTot;
|
||||
private BigDecimal newQtaCnf;
|
||||
private BigDecimal newNumCnf;
|
||||
|
||||
|
||||
public MtbColr getSourceMtbColr() {
|
||||
return sourceMtbColr;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setSourceMtbColr(MtbColr sourceMtbColr) {
|
||||
this.sourceMtbColr = sourceMtbColr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNewQtaTot() {
|
||||
return newQtaTot;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setNewQtaTot(BigDecimal newQtaTot) {
|
||||
this.newQtaTot = newQtaTot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNewQtaCnf() {
|
||||
return newQtaCnf;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setNewQtaCnf(BigDecimal newQtaCnf) {
|
||||
this.newQtaCnf = newQtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNewNumCnf() {
|
||||
return newNumCnf;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setNewNumCnf(BigDecimal newNumCnf) {
|
||||
this.newNumCnf = newNumCnf;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class EditUDSRowResponseDTO {
|
||||
private MtbColr savedMtbColr;
|
||||
|
||||
public MtbColr getSavedMtbColr() {
|
||||
return savedMtbColr;
|
||||
}
|
||||
|
||||
public EditUDSRowResponseDTO setSavedMtbColr(MtbColr savedMtbColr) {
|
||||
this.savedMtbColr = savedMtbColr;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ public class DBSettingsModel {
|
||||
|
||||
private boolean groupShippingByCommodityGroup = true;
|
||||
private boolean showCodFornSpedizione = true;
|
||||
private boolean flagCanCreateInventario = true;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@@ -396,4 +397,13 @@ public class DBSettingsModel {
|
||||
this.showCodFornSpedizione = showCodFornSpedizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagCanCreateInventario() {
|
||||
return flagCanCreateInventario;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagCanCreateInventario(boolean flagCanCreateInventario) {
|
||||
this.flagCanCreateInventario = flagCanCreateInventario;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,6 +349,10 @@ public class SettingsManager {
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_GROUP_BY_GRP_MERC"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("INVENTARIO")
|
||||
.setKeySection("FLAG_CAN_CREATE_INVENTARIO"));
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
|
||||
mGestSetupRESTConsumer.getValues(codMdep, stbGestSetupList, list -> {
|
||||
@@ -381,6 +385,7 @@ public class SettingsManager {
|
||||
dbSettingsModelIstance.setNotifyLotStatus(getValueFromList(list, "SPEDIZIONE", "FLAG_NOTIFICA_STATO_PARTITA", Boolean.class));
|
||||
dbSettingsModelIstance.setShowCodFornSpedizione(getValueFromList(list, "SPEDIZIONE", "FLAG_SHOW_COD_FORN", Boolean.class, Boolean.TRUE));
|
||||
dbSettingsModelIstance.setGroupShippingByCommodityGroup(getValueFromList(list, "SPEDIZIONE", "FLAG_GROUP_BY_GRP_MERC", Boolean.class, Boolean.FALSE));
|
||||
dbSettingsModelIstance.setFlagCanCreateInventario(getValueFromList(list, "SPEDIZIONE", "FLAG_CAN_CREATE_INVENTARIO", Boolean.class, Boolean.TRUE));
|
||||
|
||||
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
||||
if (notePerdita != null)
|
||||
@@ -408,16 +413,19 @@ public class SettingsManager {
|
||||
|
||||
StbGestSetup value = Stream.of(stbGestSetupList)
|
||||
.filter(x -> x.getSection().equalsIgnoreCase(section) && x.getKeySection().equalsIgnoreCase(keySectionName))
|
||||
.findFirstOrElse(new StbGestSetup());
|
||||
.findFirstOrElse(null);
|
||||
|
||||
if (clazz == String.class) {
|
||||
return clazz.cast(value.getValue());
|
||||
} else if (clazz == Boolean.class) {
|
||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
||||
} else if (clazz == Integer.class && value.getValue() != null) {
|
||||
return clazz.cast(Integer.parseInt(value.getValue()));
|
||||
} else return defaultValue;
|
||||
if(value != null) {
|
||||
if (clazz == String.class) {
|
||||
return clazz.cast(value.getValue());
|
||||
} else if (clazz == Boolean.class) {
|
||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
||||
} else if (clazz == Integer.class && value.getValue() != null) {
|
||||
return clazz.cast(Integer.parseInt(value.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ public class UpdatesManager {
|
||||
this.mContext = activityContext;
|
||||
|
||||
|
||||
String currentVersionUrl = "http://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/currentVersion";
|
||||
String currentDownloadUrl = "http://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/android-release.apk";
|
||||
String currentVersionUrl = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/currentVersion";
|
||||
String currentDownloadUrl = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/android-release.apk";
|
||||
|
||||
|
||||
AppUpdater appUpdater = new AppUpdater(mContext)
|
||||
|
||||
@@ -20,7 +20,6 @@ import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.exception.AlreadyUsedAnonymousLabelException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUMultiGestioneException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidOrderTypeException;
|
||||
import it.integry.integrywmsnative.core.exception.LUScanNotGrantedException;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
@@ -126,18 +125,13 @@ public class AccettazionePickingViewModel {
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundGestioni != null) {
|
||||
|
||||
if (foundGestioni.size() == 1) {
|
||||
if (isOrdTrasf && (foundGestioni.get(0) == GestioneEnum.PRODUZIONE || foundGestioni.get(0) == GestioneEnum.LAVORAZIONE)) {
|
||||
defaultGestioneOfUL = GestioneEnum.ACQUISTO;
|
||||
} else
|
||||
defaultGestioneOfUL = foundGestioni.get(0) == GestioneEnum.PRODUZIONE ? GestioneEnum.LAVORAZIONE : foundGestioni.get(0);
|
||||
} else {
|
||||
this.sendError(new InvalidLUMultiGestioneException());
|
||||
}
|
||||
if (foundGestioni.size() == 1) {
|
||||
if (isOrdTrasf && (foundGestioni.get(0) == GestioneEnum.PRODUZIONE || foundGestioni.get(0) == GestioneEnum.LAVORAZIONE)) {
|
||||
defaultGestioneOfUL = GestioneEnum.ACQUISTO;
|
||||
} else
|
||||
defaultGestioneOfUL = foundGestioni.get(0) == GestioneEnum.PRODUZIONE ? GestioneEnum.LAVORAZIONE : foundGestioni.get(0);
|
||||
} else {
|
||||
this.sendError(new InvalidOrderTypeException());
|
||||
this.sendError(new InvalidLUMultiGestioneException());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -35,6 +36,7 @@ import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.rest.model.documento.DocumentoArtDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.databinding.ActivityContabDocInterniEditBinding;
|
||||
@@ -220,7 +222,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEditRowRequest(SqlMtbColr row, boolean flagTracciabilita) {
|
||||
public void onEditRowRequest(SqlMtbColr row, boolean flagTracciabilita, boolean isUntMisDig) {
|
||||
this.onLoadingStarted();
|
||||
MtbAart mtbAart = new MtbAart();
|
||||
mtbAart.setBarCode(row.getCodBarre());
|
||||
@@ -233,6 +235,11 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
mtbAart.setFlagTracciabilita(flagTracciabilita ? "S" : "N");
|
||||
mtbAart.setUntMis(row.getUntMis());
|
||||
|
||||
MtbUntMis mtbUntMis = new MtbUntMis()
|
||||
.setUntMis(row.getUntMis())
|
||||
.setFlagDig(isUntMisDig ? "S" : "N");
|
||||
mtbAart.setMtbUntMis(Collections.singletonList(mtbUntMis));
|
||||
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setInitialNumCnf(BigDecimal.valueOf(row.getNumCnf()))
|
||||
@@ -273,6 +280,12 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
this.closeEdit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDocDeleted() {
|
||||
this.binding.closeActivityFab.close(true);
|
||||
this.closeEdit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDocExported() {
|
||||
runOnUiThread(() -> {
|
||||
@@ -289,7 +302,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
@Override
|
||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||
DocumentoArtDTO articolo = viewModel.getArticoloByCodMart(mtbColr.getCodMart());
|
||||
this.viewModel.dispatchRowEdit(entityToSql(mtbColr), articolo.isFlagTracciabilita());
|
||||
this.viewModel.dispatchRowEdit(entityToSql(mtbColr), articolo.isFlagTracciabilita(), articolo.isUntMisDigitale());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -302,7 +315,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
DialogSelectDocRowsView.newInstance(rows, (row) -> {
|
||||
this.onLoadingEnded();
|
||||
if (row != null) {
|
||||
this.viewModel.dispatchRowEdit(row, (articolo.isFlagTracciabilita()));
|
||||
this.viewModel.dispatchRowEdit(row, articolo.isFlagTracciabilita(), articolo.isUntMisDigitale());
|
||||
}
|
||||
}
|
||||
).show(this.getSupportFragmentManager(), "dialogSelectDocRows");
|
||||
|
||||
@@ -89,8 +89,8 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
}
|
||||
|
||||
public void dispatchRowEdit(SqlMtbColr row, boolean flagTracciabilita) {
|
||||
this.listener.onEditRowRequest(row, flagTracciabilita && this.isCheckPartitaMag);
|
||||
public void dispatchRowEdit(SqlMtbColr row, boolean flagTracciabilita, boolean isUntMisDig) {
|
||||
this.listener.onEditRowRequest(row, flagTracciabilita && this.isCheckPartitaMag,isUntMisDig);
|
||||
}
|
||||
|
||||
private Integer getNextIdRiga() {
|
||||
@@ -115,14 +115,11 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
public void deleteDocument() {
|
||||
this.sendOnLoadingStarted();
|
||||
docInterniRESTConsumer.saveDoc(this.getSaveDto(), () -> {
|
||||
SqlMtbColt document = this.getDocument();
|
||||
document.setCodDtip(document.getCodDtipProvv());
|
||||
mtbColtRepository.update(document, doc -> {
|
||||
mtbColtRepository.delete(document, () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.listener.onDocExported();
|
||||
this.listener.onDocDeleted();
|
||||
}, this::sendError);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void holdDocument() {
|
||||
@@ -157,7 +154,7 @@ public class DocInterniEditFormViewModel {
|
||||
if (rows.size() > 1) {
|
||||
this.listener.onMultipleRowsFound(rows, matchedArt);
|
||||
} else {
|
||||
this.dispatchRowEdit(rows.get(0), matchedArt.isFlagTracciabilita());
|
||||
this.dispatchRowEdit(rows.get(0), matchedArt.isFlagTracciabilita(), matchedArt.isUntMisDigitale());
|
||||
}
|
||||
|
||||
|
||||
@@ -335,12 +332,14 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
void onRowsChanged(List<SqlMtbColr> rows);
|
||||
|
||||
void onEditRowRequest(SqlMtbColr row, boolean flagTracciabilita);
|
||||
void onEditRowRequest(SqlMtbColr row, boolean flagTracciabilita, boolean isUntMisDig);
|
||||
|
||||
void onMultipleRowsFound(List<SqlMtbColr> rows, DocumentoArtDTO art);
|
||||
|
||||
void onDocumentHoldRequest();
|
||||
|
||||
void onDocDeleted();
|
||||
|
||||
void onDocExported();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
import com.ravikoradiya.liveadapter.Type;
|
||||
@@ -25,6 +26,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.rest.model.inventario.InventarioArtDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.databinding.FragmentElencoInventarioBinding;
|
||||
import it.integry.integrywmsnative.databinding.FragmentElencoInventarioListSingleItemBinding;
|
||||
import it.integry.integrywmsnative.gest.inventario.bottom_sheet__inventario_actions.BottomSheetInventarioActionsView;
|
||||
@@ -39,6 +41,8 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
@Inject
|
||||
ElencoInventariViewModel mViewModel;
|
||||
|
||||
public ObservableField<Boolean> canCreateInventario = new ObservableField<>(false);
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
public ElencoInventariFragment() {
|
||||
@@ -69,8 +73,11 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
mBinding = FragmentElencoInventarioBinding.inflate(inflater, container, false);
|
||||
|
||||
mBinding.setLifecycleOwner(this);
|
||||
mBinding.setView(this);
|
||||
mBinding.setViewmodel(mViewModel);
|
||||
|
||||
canCreateInventario.set(SettingsManager.iDB().isFlagCanCreateInventario());
|
||||
|
||||
mBinding.swiperefresh.setRefreshing(true);
|
||||
mBinding.swiperefresh.setOnRefreshListener(() -> {
|
||||
mViewModel.loadData();
|
||||
|
||||
@@ -75,6 +75,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
getMenuInflater().inflate(R.menu.picking_inventario_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -91,18 +92,19 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
mViewModel.setListener(this);
|
||||
mBindings.setViewmodel(mViewModel);
|
||||
|
||||
mViewModel.init(
|
||||
DataCache.retrieveItem(getIntent().getStringExtra(KEY_INVENTARIO)),
|
||||
DataCache.retrieveItem(getIntent().getStringExtra(KEY_INVENTARIO_ARTS)));
|
||||
|
||||
initToolbar();
|
||||
initBarcodeReader();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
mViewModel.init(
|
||||
DataCache.retrieveItem(getIntent().getStringExtra(KEY_INVENTARIO)),
|
||||
DataCache.retrieveItem(getIntent().getStringExtra(KEY_INVENTARIO_ARTS)));
|
||||
|
||||
initRecyclerView();
|
||||
}
|
||||
|
||||
@@ -112,6 +114,12 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
private void initToolbar() {
|
||||
setSupportActionBar(mBindings.toolbar);
|
||||
|
||||
@@ -183,7 +191,8 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
|
||||
public void requestExportConfirm() {
|
||||
DialogYesNoView.newInstance("Esporta", "Vuoi confermare e chiudere l'inventario?", result -> {
|
||||
mViewModel.exportAll(this::onBackPressed);
|
||||
if (result == DialogConsts.Results.YES)
|
||||
mViewModel.exportAll(this::onBackPressed);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@@ -111,6 +111,11 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
|
||||
|
||||
public void exportAll(Runnable onComplete) {
|
||||
if(this.currentInventarioRows.getValue().isEmpty()) {
|
||||
this.sendError(new Exception("Impossibile esportare un inventario senza righe"));
|
||||
return;
|
||||
}
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
currentInventario.getValue().setInventarioRowList(this.currentInventarioRows.getValue());
|
||||
|
||||
|
||||
@@ -332,28 +332,13 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
public void dispatchOrders() {
|
||||
List<OrdineAccettazioneInevasoDTO> selectedOrders = Stream.of(this.mOrdiniInevasiMutableData)
|
||||
.filter(x -> x.getSelectedObservable().get())
|
||||
.map(MainListProdOrdineProduzioneElencoListModel::getOriginalModel)
|
||||
.flatMap(y -> Stream.of(y.getClientiListModel()).map(MainListProdOrdineProduzioneElencoClienteListModel::getOriginalModel))
|
||||
.toList();
|
||||
|
||||
|
||||
this.mViewModel.loadPicking(selectedOrders);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onFilterClick() {
|
||||
// DialogOrdineProduzioneFiltroAvanzatoView.make(
|
||||
// getActivity(),
|
||||
// this.mViewModel.getOrderList().getValue(),
|
||||
// mAppliedFilterViewModel,
|
||||
//
|
||||
// filter -> {
|
||||
//
|
||||
// mAppliedFilterViewModel = filter;
|
||||
// refreshList(null);
|
||||
//
|
||||
// }).show();
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public void onOrdersDispatched(List<OrdineAccettazioneInevasoDTO> orders, List<SitArtOrdDTO> sitArts) {
|
||||
|
||||
@@ -32,24 +32,19 @@ public class ProdOrdineProduzioneElencoViewModel {
|
||||
this.codMdep = codMdep;
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
new Thread(() -> {
|
||||
|
||||
mProdOrdineProduzioneRESTConsumer.getOrdiniInevasi(codMdep, orderList -> {
|
||||
this.mOrderList.setValue(orderList);
|
||||
mProdOrdineProduzioneRESTConsumer.getOrdiniInevasi(codMdep, orderList -> {
|
||||
this.mOrderList.setValue(orderList);
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
||||
public void loadPicking(List<OrdineAccettazioneInevasoDTO> selectedOrders) {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
new Thread(() -> {
|
||||
|
||||
this.mProdOrdineProduzioneRESTConsumer.retrievePickingListNew(selectedOrders, sitArtOrds -> {
|
||||
|
||||
this.sendOnOrdersDispatched(selectedOrders, sitArtOrds);
|
||||
@@ -57,8 +52,6 @@ public class ProdOrdineProduzioneElencoViewModel {
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
}).start();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -474,9 +474,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
||||
if (shouldChangePosition) {
|
||||
this.savePosizione(mtbDepoPosizione, () -> {
|
||||
onComplete.run();
|
||||
});
|
||||
this.savePosizione(mtbDepoPosizione, onComplete);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
@@ -484,7 +482,7 @@ public class RettificaGiacenzeViewModel {
|
||||
}
|
||||
|
||||
private void createDoc(MtbColt mtbColt, Runnable onComplete) {
|
||||
if (mtbColt.getGestioneEnum() != GestioneEnum.VENDITA && mtbColt.getSegno() != -1) {
|
||||
if (!(mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1)) {
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestOrderDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@@ -1221,18 +1222,6 @@ public class SpedizioneViewModel {
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
|
||||
// final MtbColr mtbColr = new MtbColr()
|
||||
// .setCausale(mDefaultCausaleOfUL)
|
||||
// .setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
// .setPartitaMag(partitaMag)
|
||||
// .setDataScadPartita(dataScad)
|
||||
// .setQtaCol(qtaTot)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setNumCnf(numCnf)
|
||||
// .setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||
// .setDatetimeRow(UtilityDate.getDateInstance());
|
||||
|
||||
//TODO: Al posto di prelevare la prima riga bisognerebbe controllare se c'è ne una che corrisponde con la partita richiesta
|
||||
final MtbColr mtbColrToDispatch = pickingObjectDTO.getTempPickData() != null &&
|
||||
pickingObjectDTO.getTempPickData().getSourceMtbColt() != null &&
|
||||
@@ -1240,40 +1229,6 @@ public class SpedizioneViewModel {
|
||||
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().size() > 0 ?
|
||||
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().get(0) : null;
|
||||
|
||||
|
||||
// if (mtbColrToDispatch != null) {
|
||||
// if (UtilityString.isNullOrEmpty(mCurrentMtbColt.getCodTcol()))
|
||||
// mCurrentMtbColt.setCodTcol(UtilityString.empty2null(pickingObjectDTO.getTempPickData().getSourceMtbColt().getCodTcol()));
|
||||
//
|
||||
// mtbColr.setCodJcom(UtilityString.empty2null(mtbColrToDispatch.getCodJcom()))
|
||||
// .setSerColloRif(UtilityString.empty2null(mtbColrToDispatch.getSerCollo()))
|
||||
// .setNumColloRif(mtbColrToDispatch.getNumCollo())
|
||||
// .setGestioneRif(UtilityString.empty2null(mtbColrToDispatch.getGestione()))
|
||||
// .setDataColloRif(UtilityString.empty2null(mtbColrToDispatch.getDataColloS()));
|
||||
//
|
||||
//
|
||||
// if (mtbColrToDispatch.getPesoNettoKg() != null) {
|
||||
// //Proporzione
|
||||
// BigDecimal pesoNettoKg = UtilityBigDecimal.divide(UtilityBigDecimal.multiply(qtaTot, mtbColrToDispatch.getPesoNettoKg()), mtbColrToDispatch.getQtaCol());
|
||||
// mtbColr.setPesoNettoKg(pesoNettoKg);
|
||||
// }
|
||||
//
|
||||
// if (mtbColrToDispatch.getPesoLordoKg() != null) {
|
||||
// //Proporzione
|
||||
// BigDecimal pesoLordoKg = UtilityBigDecimal.divide(UtilityBigDecimal.multiply(qtaTot, mtbColrToDispatch.getPesoLordoKg()), mtbColrToDispatch.getQtaCol());
|
||||
// mtbColr.setPesoLordoKg(pesoLordoKg);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
//
|
||||
// MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
// cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||
//
|
||||
// cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
// cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
||||
|
||||
|
||||
boolean shouldPrint = !shouldCloseLU || mCurrentMtbColt.getMtbColr().size() != 0;
|
||||
|
||||
//Se è l'unico articolo del collo (controllo se è uguale a 0 perché ancora non è stato aggiunto nella lista delle righe)
|
||||
@@ -1285,15 +1240,21 @@ public class SpedizioneViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
var clonedSourceMtbColr = (MtbColr) mtbColrToDispatch.clone();
|
||||
clonedSourceMtbColr.setMtbPartitaMag(null)
|
||||
.setMtbAart(null);
|
||||
|
||||
var clonedTargetMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
clonedTargetMtbColt.setMtbColr(null);
|
||||
|
||||
var insertUDSRowRequestDto = new InsertUDSRowRequestDTO()
|
||||
.setSourceMtbColr(mtbColrToDispatch)
|
||||
.setSourceMtbColr(clonedSourceMtbColr)
|
||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
.setQtaTot(qtaTot)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf)
|
||||
.setPartitaMag(partitaMag)
|
||||
.setTargetMtbColt(mCurrentMtbColt);
|
||||
.setTargetMtbColt(clonedTargetMtbColt);
|
||||
|
||||
if (dataScad != null)
|
||||
insertUDSRowRequestDto
|
||||
@@ -1341,89 +1302,91 @@ public class SpedizioneViewModel {
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
// boolean finalShouldPrint = shouldPrint;
|
||||
// mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||
//
|
||||
// mtbColr
|
||||
// .setDataCollo(value.getDataColloS())
|
||||
// .setNumCollo(value.getNumCollo())
|
||||
// .setGestione(value.getGestione())
|
||||
// .setSerCollo(value.getSerCollo())
|
||||
// .setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
||||
// .setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
// .setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
//
|
||||
//
|
||||
// if (mEnableGiacenza) {
|
||||
// MtbColr refMtbColr = new MtbColr()
|
||||
// .setCodMart(mtbColr.getCodMart())
|
||||
// .setPartitaMag(mtbColr.getPartitaMag())
|
||||
// .setCodTagl(mtbColr.getCodTagl())
|
||||
// .setCodCol(mtbColr.getCodCol());
|
||||
//
|
||||
// if (refMtbColt != null) {
|
||||
//
|
||||
// MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && refMtbColt.getMtbColr().size() > 0 ? refMtbColt.getMtbColr().get(0) : null;
|
||||
//
|
||||
// if (originalRefMtbColr != null) {
|
||||
// refMtbColr.setId(originalRefMtbColr.getId());
|
||||
// }
|
||||
//
|
||||
// refMtbColr.setNumCollo(refMtbColt.getNumCollo())
|
||||
// .setDataCollo(refMtbColt.getDataColloS())
|
||||
// .setSerCollo(refMtbColt.getSerCollo())
|
||||
// .setGestione(refMtbColt.getGestione());
|
||||
// }
|
||||
// mtbColr.setRefMtbColr(refMtbColr);
|
||||
// }
|
||||
//
|
||||
// pickingObjectDTO.getWithdrawMtbColrs().add(mtbColr);
|
||||
// mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// //Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||
// resetMatchedRows();
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// if (shouldCloseLU) requestCloseLU(finalShouldPrint);
|
||||
// }, this::sendError);
|
||||
|
||||
}
|
||||
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
MtbColt mtbColt = new MtbColt().setNumCollo(mtbColrToUpdate.getNumCollo()).setDataCollo(mtbColrToUpdate.getDataColloS()).setSerCollo(mtbColrToUpdate.getSerCollo()).setGestione(mtbColrToUpdate.getGestione()).setMtbColr(new ObservableArrayList<>());
|
||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
MtbColr mtbColrClone = (MtbColr) mtbColrToUpdate.clone();
|
||||
mtbColrClone.setMtbAart(null)
|
||||
.setMtbPartitaMag(null);
|
||||
|
||||
final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
mtbColr.setRiga(null).setPesoLordoKg(null).setPesoNettoKg(null).setNumCnf(numCnf.subtract(mtbColrToUpdate.getNumCnf())).setQtaCnf(qtaCnf).setQtaCol(qtaTot.subtract(mtbColrToUpdate.getQtaCol())).setPartitaMag(partitaMag).setDataScadPartita(dataScad);
|
||||
var editUDSRowRequest = new EditUDSRowRequestDTO()
|
||||
.setSourceMtbColr(mtbColrClone)
|
||||
.setNewNumCnf(numCnf)
|
||||
.setNewQtaCnf(qtaCnf)
|
||||
.setNewQtaTot(qtaTot);
|
||||
|
||||
mtbColt.getMtbColr().add(mtbColr);
|
||||
this.mColliScaricoRESTConsumer.editUDSRow(editUDSRowRequest, savedMtbColr -> {
|
||||
mtbColrToUpdate.setNumCnf(savedMtbColr.getNumCnf())
|
||||
.setQtaCnf(savedMtbColr.getQtaCnf())
|
||||
.setQtaCol(savedMtbColr.getQtaCol());
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
|
||||
mtbColr.setNumCnf(numCnf).setQtaCnf(qtaCnf).setQtaCol(qtaTot);
|
||||
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue()).filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||
.filter(x -> Stream.of(x.getWithdrawMtbColrs())
|
||||
.anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
|
||||
if (pickingObjectDTO.isPresent()) {
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColrToUpdate);
|
||||
}
|
||||
|
||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColrToUpdate);
|
||||
|
||||
this.resetMatchedRows();
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
|
||||
// MtbColt mtbColt = new MtbColt()
|
||||
// .setNumCollo(mtbColrToUpdate.getNumCollo())
|
||||
// .setDataCollo(mtbColrToUpdate.getDataColloS())
|
||||
// .setSerCollo(mtbColrToUpdate.getSerCollo())
|
||||
// .setGestione(mtbColrToUpdate.getGestione())
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
// mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
// mtbColr.setRiga(null)
|
||||
// .setPesoLordoKg(null)
|
||||
// .setPesoNettoKg(null)
|
||||
// .setNumCnf(numCnf.subtract(mtbColrToUpdate.getNumCnf()))
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot.subtract(mtbColrToUpdate.getQtaCol()))
|
||||
// .setPartitaMag(partitaMag)
|
||||
// .setDataScadPartita(dataScad);
|
||||
//
|
||||
// mtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
//
|
||||
// mtbColr
|
||||
// .setNumCnf(numCnf)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot);
|
||||
//
|
||||
// Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||
// .filter(x -> Stream.of(x.getWithdrawMtbColrs())
|
||||
// .anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
//
|
||||
// if (pickingObjectDTO.isPresent()) {
|
||||
// pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||
// pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
|
||||
// }
|
||||
//
|
||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
// this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.resetMatchedRows();
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// }, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@@ -1511,8 +1474,11 @@ public class SpedizioneViewModel {
|
||||
|
||||
|
||||
private void closeLU(RunnableArgs<List<MtbColt>> onComplete) {
|
||||
var clonedLuToClose = (MtbColt) this.mCurrentMtbColt.clone();
|
||||
clonedLuToClose.setMtbColr(null);
|
||||
|
||||
var closeUDSRequestDto = new CloseUDSRequestDTO()
|
||||
.setMtbColt(this.mCurrentMtbColt)
|
||||
.setMtbColt(clonedLuToClose)
|
||||
//.setPrintSSCC(shouldPrint)
|
||||
.setOrderCodMdep(mTestateOrdini.get(0).getCodMdep());
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.inventario.ElencoInventariFragment" />
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.gest.inventario.ElencoInventariViewModel" />
|
||||
@@ -96,6 +100,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:visibility="@{view.canCreateInventario}"
|
||||
app:singleClick="@{() -> viewmodel.openInventario()}"
|
||||
app:srcCompat="@drawable/ic_add_24dp" />
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.8.0'
|
||||
agp_version = '8.1.0-alpha07'
|
||||
agp_version = '8.1.0-alpha08'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
Reference in New Issue
Block a user