diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 0c0c3383..3d6e3c4b 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -1,10 +1,17 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 86dfa2ba..24feed7e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android {
- def appVersionCode = 388
- def appVersionName = '1.34.04'
+ def appVersionCode = 390
+ def appVersionName = '1.34.06'
signingConfigs {
release {
diff --git a/app/src/main/java/it/integry/integrywmsnative/MainApplicationModule.java b/app/src/main/java/it/integry/integrywmsnative/MainApplicationModule.java
index 7e65efd1..41b86161 100644
--- a/app/src/main/java/it/integry/integrywmsnative/MainApplicationModule.java
+++ b/app/src/main/java/it/integry/integrywmsnative/MainApplicationModule.java
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.menu.MenuService;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
+import it.integry.integrywmsnative.core.rest.consumers.ColliAccettazioneRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
@@ -256,6 +257,12 @@ public class MainApplicationModule {
return new DocumentRESTConsumer();
}
+ @Provides
+ @Singleton
+ ColliAccettazioneRESTConsumer provideColliAccettazioneRESTConsumer() {
+ return new ColliAccettazioneRESTConsumer();
+ }
+
@Provides
@Singleton
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/model/MtbColt.java b/app/src/main/java/it/integry/integrywmsnative/core/model/MtbColt.java
index 7c06d798..d7865aed 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/model/MtbColt.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/model/MtbColt.java
@@ -97,30 +97,22 @@ public class MtbColt extends EntityBase {
String codAnagToUse = null;
switch (gestioneEnum) {
- case ACQUISTO:
- case LAVORAZIONE:
- case PRODUZIONE:
+ case ACQUISTO, LAVORAZIONE, PRODUZIONE -> {
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
-
Optional optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
.filter(InternalCodAnagsDTO::isFornitore)
.findFirst();
-
if (optCodAnagForn.isEmpty()) break;
-
codAnagToUse = optCodAnagForn.get().getCodAnag();
- break;
- case VENDITA:
+ }
+ case VENDITA -> {
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
-
Optional optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
.filter(InternalCodAnagsDTO::isCliente)
.findFirst();
-
if (optCodAnagClie.isEmpty()) break;
-
codAnagToUse = optCodAnagClie.get().getCodAnag();
- break;
+ }
}
setCodAnag(codAnagToUse);
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliAccettazioneRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliAccettazioneRESTConsumer.java
new file mode 100644
index 00000000..91dcdb01
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliAccettazioneRESTConsumer.java
@@ -0,0 +1,117 @@
+package it.integry.integrywmsnative.core.rest.consumers;
+
+import javax.inject.Singleton;
+
+import it.integry.integrywmsnative.core.expansion.RunnableArgs;
+import it.integry.integrywmsnative.core.model.MtbColr;
+import it.integry.integrywmsnative.core.model.MtbColt;
+import it.integry.integrywmsnative.core.rest.RESTBuilder;
+import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
+import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
+import retrofit2.Call;
+import retrofit2.Callback;
+import retrofit2.Response;
+
+@Singleton
+public class ColliAccettazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface {
+
+ public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
+
+ colliAccettazioneRESTConsumerService.createUDC(createUDCRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "accettazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+
+ }
+
+ @Override
+ public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
+
+ colliAccettazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "accettazione/closeUDC", onComplete, onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+ @Override
+ public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
+
+ colliAccettazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "accettazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+ @Override
+ public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
+
+ colliAccettazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "accettazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+ @Override
+ public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
+ ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
+
+ colliAccettazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "accettazione/deleteUDCRow", data -> onComplete.run(), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliAccettazioneRESTConsumerService.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliAccettazioneRESTConsumerService.java
new file mode 100644
index 00000000..42a65b48
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliAccettazioneRESTConsumerService.java
@@ -0,0 +1,34 @@
+package it.integry.integrywmsnative.core.rest.consumers;
+
+import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
+import retrofit2.Call;
+import retrofit2.http.Body;
+import retrofit2.http.POST;
+
+public interface ColliAccettazioneRESTConsumerService {
+
+ @POST("wms/accettazione/createUDC")
+ Call> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
+
+ @POST("wms/accettazione/closeUDC")
+ Call> closeUDC(@Body CloseUDCRequestDTO closeUDCRequestDTO);
+
+ @POST("wms/accettazione/insertUDCRow")
+ Call> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
+
+ @POST("wms/accettazione/editUDCRow")
+ Call> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
+
+ @POST("wms/accettazione/deleteUDCRow")
+ Call> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
+
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumer.java
index 422be652..da6c745f 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumer.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumer.java
@@ -6,28 +6,107 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbColr;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
+import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
-import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
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.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.InsertUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
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;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@Singleton
-public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliScaricoRESTConsumerInterface {
+public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface, ColliScaricoRESTConsumerInterface {
+ @Override
+ public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
+
+ colliLavorazioneRESTConsumerService.createUDC(createUDCRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "lavorazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+ @Override
+ public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
+
+ colliLavorazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "lavorazione/closeUDC", onComplete, onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+ @Override
+ public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
+
+ colliLavorazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "lavorazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
+ @Override
+ public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
+ ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
+
+ colliLavorazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "lavorazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
+
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
@@ -64,63 +143,6 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
});
}
- @Override
- public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
- ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
-
- colliLavorazioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
- .enqueue(new Callback<>() {
- @Override
- public void onResponse(Call> call, Response> response) {
- analyzeAnswer(response, "lavorazione/canUDSBeDeleted", onComplete, onFailed);
- }
-
- @Override
- public void onFailure(Call> call, Throwable t) {
- onFailed.run(new Exception(t));
- }
- });
-
- }
-
- @Override
- public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
- ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
-
- colliLavorazioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
- .enqueue(new Callback<>() {
- @Override
- public void onResponse(Call> call, Response> response) {
- analyzeAnswer(response, "lavorazione/deleteUDS", Void -> onComplete.run(), onFailed);
- }
-
- @Override
- public void onFailure(Call> call, Throwable t) {
- onFailed.run(new Exception(t));
- }
- });
-
- }
-
- @Override
- public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
- ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
-
- colliLavorazioneRESTConsumerService.printUDS(printUDSRequestDTO)
- .enqueue(new Callback<>() {
- @Override
- public void onResponse(Call> call, Response> response) {
- analyzeAnswer(response, "lavorazione/printUDS", Void -> onComplete.run(), onFailed);
- }
-
- @Override
- public void onFailure(Call> call, Throwable t) {
- onFailed.run(new Exception(t));
- }
- });
-
- }
-
@Override
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
@@ -174,4 +196,21 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
});
}
+ @Override
+ public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
+ ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
+
+ colliLavorazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "lavorazione/deleteUDCRow", data -> onComplete.run(), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+ }
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumerService.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumerService.java
index 19bb2db4..7cfbeac0 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumerService.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliLavorazioneRESTConsumerService.java
@@ -1,46 +1,58 @@
package it.integry.integrywmsnative.core.rest.consumers;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
-import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
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.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.InsertUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
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;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
public interface ColliLavorazioneRESTConsumerService {
+ @POST("wms/lavorazione/createUDC")
+ Call> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
+
@POST("wms/lavorazione/createUDS")
Call> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
+ @POST("wms/lavorazione/closeUDC")
+ Call> closeUDC(@Body CloseUDCRequestDTO createUDCRequestDTO);
+
@POST("wms/lavorazione/closeUDS")
Call> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
- @POST("wms/lavorazione/canUDSBeDeleted")
- Call> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
-
- @POST("wms/lavorazione/deleteUDS")
- Call> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
-
- @POST("wms/lavorazione/printUDS")
- Call> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
+ @POST("wms/lavorazione/insertUDCRow")
+ Call> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
@POST("wms/lavorazione/insertUDSRow")
Call> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
+ @POST("wms/lavorazione/editUDCRow")
+ Call> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
+
@POST("wms/lavorazione/editUDSRow")
Call> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
@POST("wms/lavorazione/deleteUDSRow")
Call> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
+ @POST("wms/lavorazione/deleteUDCRow")
+ Call> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
+
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java
index de65aede..d56dfe5d 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java
@@ -31,6 +31,9 @@ import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityDate;
@@ -271,14 +274,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
saveCollo(mtbColtToCreate, onComplete, onFailed);
}
- public void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs onFailed) {
-
- mtbColtToDelete.setOperation(CommonModelConsts.OPERATION.DELETE);
-
- saveCollo(mtbColtToDelete, value -> {
- if (onComplete != null) onComplete.run();
- }, onFailed);
- }
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs onComplete, RunnableArgs onFailed) {
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
@@ -451,52 +446,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
- public void canLUBeDeleted(MtbColt mtbColt, RunnableArgs onComplete, RunnableArgs onFailed) {
-
- HashMap params = new HashMap<>();
- params.put("mtb_colt.gestione", mtbColt.getGestione());
- params.put("mtb_colt.ser_collo", mtbColt.getSerCollo());
- params.put("mtb_colt.num_collo", mtbColt.getNumCollo());
- params.put("mtb_colt.data_collo", mtbColt.getDataColloD());
-
- String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
-
-
- String query = "SELECT mtb_colt.* " +
- "FROM mtb_colt " +
- "LEFT OUTER JOIN " +
- " (SELECT gestione, " +
- " data_collo, " +
- " num_collo, " +
- " ser_collo, " +
- " cod_mart, " +
- " cod_col, " +
- " cod_tagl, " +
- " partita_mag, " +
- " SUM(qta_col) sum_qta_col " +
- " FROM mtb_colr " +
- " GROUP BY gestione, " +
- " data_collo, " +
- " num_collo, " +
- " ser_collo, " +
- " cod_mart, " +
- " cod_col, " +
- " cod_tagl, " +
- " partita_mag) sum_mtb_colr ON mtb_colt.gestione = sum_mtb_colr.gestione " +
- "AND mtb_colt.num_collo = sum_mtb_colr.num_collo " +
- "AND mtb_colt.data_collo = sum_mtb_colr.data_collo " +
- "AND mtb_colt.ser_collo = sum_mtb_colr.ser_collo " +
- "AND sum_mtb_colr.sum_qta_col > 0 " +
- "WHERE sum_mtb_colr.num_collo IS NULL " +
- " AND " + whereCond;
-
-
- Type typeOfObjectsList = new TypeToken>() {
- }.getType();
- this.mSystemRESTConsumer.>processSql(query, typeOfObjectsList, data -> {
- onComplete.run(data != null && data.size() > 0);
- }, onFailed);
- }
public static void retrieveBasketColli(RunnableArgs> onComplete, RunnableArgs onFailed) {
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
@@ -700,4 +649,66 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
onComplete.run(data.get(0));
}, onFailed);
}
+
+
+
+ public void canULBeDeleted(MtbColt mtbColt, RunnableArgs onComplete, RunnableArgs onFailed) {
+ CanULBeDeletedRequestDTO canULBeDeletedRequestDTO = new CanULBeDeletedRequestDTO()
+ .setMtbColt(mtbColt);
+
+ ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
+
+ colliMagazzinoRESTConsumerService.canULBeDeleted(canULBeDeletedRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "generic/canULBeDeleted", onComplete, onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+
+ }
+
+ public void deleteUL(DeleteULRequestDTO deleteULRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
+ ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
+
+ colliMagazzinoRESTConsumerService.deleteUL(deleteULRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "generic/deleteUL", Void -> onComplete.run(), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+
+ }
+
+ public void printUL(PrintULRequestDTO printULRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
+ ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
+
+ colliMagazzinoRESTConsumerService.printUL(printULRequestDTO)
+ .enqueue(new Callback<>() {
+ @Override
+ public void onResponse(Call> call, Response> response) {
+ analyzeAnswer(response, "generic/printUL", Void -> onComplete.run(), onFailed);
+ }
+
+ @Override
+ public void onFailure(Call> call, Throwable t) {
+ onFailed.run(new Exception(t));
+ }
+ });
+
+ }
+
+
+
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumerService.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumerService.java
index ba96d4fc..1e13a7d0 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumerService.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumerService.java
@@ -8,6 +8,9 @@ import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
@@ -43,4 +46,14 @@ public interface ColliMagazzinoRESTConsumerService {
@POST("wms/confirmGiacenzaUL")
Call> confirmGiacenzaUL(@Body MtbColt mtbColt);
+
+ @POST("wms/generic/canULBeDeleted")
+ Call> canULBeDeleted(@Body CanULBeDeletedRequestDTO canULBeDeletedRequestDTO);
+
+ @POST("wms/generic/deleteUL")
+ Call> deleteUL(@Body DeleteULRequestDTO deleteULRequestDTO);
+
+ @POST("wms/generic/printUL")
+ Call> printUL(@Body PrintULRequestDTO printULRequestDTO);
+
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumer.java
index 79cbfffc..962e077b 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumer.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumer.java
@@ -8,18 +8,15 @@ import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
-import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
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.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;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@@ -64,60 +61,6 @@ public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements Co
}
- public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
- ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
-
- colliSpedizioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
- .enqueue(new Callback<>() {
- @Override
- public void onResponse(Call> call, Response> response) {
- analyzeAnswer(response, "spedizione/canUDSBeDeleted", onComplete, onFailed);
- }
-
- @Override
- public void onFailure(Call> call, Throwable t) {
- onFailed.run(new Exception(t));
- }
- });
-
- }
-
- public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
- ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
-
- colliSpedizioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
- .enqueue(new Callback<>() {
- @Override
- public void onResponse(Call> call, Response> response) {
- analyzeAnswer(response, "spedizione/deleteUDS", Void -> onComplete.run(), onFailed);
- }
-
- @Override
- public void onFailure(Call> call, Throwable t) {
- onFailed.run(new Exception(t));
- }
- });
-
- }
-
- public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs onFailed) {
- ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
-
- colliSpedizioneRESTConsumerService.printUDS(printUDSRequestDTO)
- .enqueue(new Callback<>() {
- @Override
- public void onResponse(Call> call, Response> response) {
- analyzeAnswer(response, "spedizione/printUDS", Void -> onComplete.run(), onFailed);
- }
-
- @Override
- public void onFailure(Call> call, Throwable t) {
- onFailed.run(new Exception(t));
- }
- });
-
- }
-
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed) {
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumerService.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumerService.java
index 900ec757..32f0b1fc 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumerService.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliSpedizioneRESTConsumerService.java
@@ -1,18 +1,16 @@
package it.integry.integrywmsnative.core.rest.consumers;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
-import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
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.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;
+import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
@@ -25,14 +23,8 @@ public interface ColliSpedizioneRESTConsumerService {
@POST("wms/spedizione/closeUDS")
Call> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
- @POST("wms/spedizione/canUDSBeDeleted")
- Call> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
-
- @POST("wms/spedizione/deleteUDS")
- Call> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
-
@POST("wms/spedizione/printUDS")
- Call> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
+ Call> printUDS(@Body PrintULRequestDTO printULRequestDTO);
@POST("wms/spedizione/insertUDSRow")
Call> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliCaricoRESTConsumerInterface.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliCaricoRESTConsumerInterface.java
new file mode 100644
index 00000000..30d87651
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliCaricoRESTConsumerInterface.java
@@ -0,0 +1,24 @@
+package it.integry.integrywmsnative.core.rest.consumers.interfaces;
+
+import it.integry.integrywmsnative.core.expansion.RunnableArgs;
+import it.integry.integrywmsnative.core.model.MtbColr;
+import it.integry.integrywmsnative.core.model.MtbColt;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
+
+public interface ColliCaricoRESTConsumerInterface {
+
+ void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
+
+ void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
+
+ void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
+
+ void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
+
+ void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRequestDTO, Runnable onComplete, RunnableArgs onFailed);
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliScaricoRESTConsumerInterface.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliScaricoRESTConsumerInterface.java
index ae355658..103887aa 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliScaricoRESTConsumerInterface.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/interfaces/ColliScaricoRESTConsumerInterface.java
@@ -3,15 +3,12 @@ package it.integry.integrywmsnative.core.rest.consumers.interfaces;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbColr;
import it.integry.integrywmsnative.core.model.MtbColt;
-import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
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;
public interface ColliScaricoRESTConsumerInterface {
@@ -19,12 +16,6 @@ public interface ColliScaricoRESTConsumerInterface {
void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
- void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
-
- void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs onFailed);
-
- void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs onFailed);
-
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs onComplete, RunnableArgs onFailed);
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CloseUDCRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CloseUDCRequestDTO.java
new file mode 100644
index 00000000..36c9c0c1
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CloseUDCRequestDTO.java
@@ -0,0 +1,18 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import it.integry.integrywmsnative.core.model.MtbColt;
+
+public class CloseUDCRequestDTO {
+
+ private MtbColt mtbColt;
+
+
+ public MtbColt getMtbColt() {
+ return mtbColt;
+ }
+
+ public CloseUDCRequestDTO setMtbColt(MtbColt mtbColt) {
+ this.mtbColt = mtbColt;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CloseUDCResponseDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CloseUDCResponseDTO.java
new file mode 100644
index 00000000..ffba0ef4
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CloseUDCResponseDTO.java
@@ -0,0 +1,25 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+public class CloseUDCResponseDTO {
+
+ private boolean saved;
+ private boolean deleted;
+
+ public boolean isSaved() {
+ return saved;
+ }
+
+ public CloseUDCResponseDTO setSaved(boolean saved) {
+ this.saved = saved;
+ return this;
+ }
+
+ public boolean isDeleted() {
+ return deleted;
+ }
+
+ public CloseUDCResponseDTO setDeleted(boolean deleted) {
+ this.deleted = deleted;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCRequestDTO.java
new file mode 100644
index 00000000..21b491cc
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCRequestDTO.java
@@ -0,0 +1,70 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import java.util.List;
+
+public class CreateUDCRequestDTO {
+
+ private String codMdep;
+ private Integer numCollo;
+ private String serCollo;
+ private String codTcol;
+
+ private String annotazioni;
+
+ private List orders;
+
+
+ public String getCodMdep() {
+ return codMdep;
+ }
+
+ public CreateUDCRequestDTO setCodMdep(String codMdep) {
+ this.codMdep = codMdep;
+ return this;
+ }
+
+ public Integer getNumCollo() {
+ return numCollo;
+ }
+
+ public CreateUDCRequestDTO setNumCollo(Integer numCollo) {
+ this.numCollo = numCollo;
+ return this;
+ }
+
+ public String getSerCollo() {
+ return serCollo;
+ }
+
+ public CreateUDCRequestDTO setSerCollo(String serCollo) {
+ this.serCollo = serCollo;
+ return this;
+ }
+
+ public String getCodTcol() {
+ return codTcol;
+ }
+
+ public CreateUDCRequestDTO setCodTcol(String codTcol) {
+ this.codTcol = codTcol;
+ return this;
+ }
+
+ public String getAnnotazioni() {
+ return annotazioni;
+ }
+
+ public CreateUDCRequestDTO setAnnotazioni(String annotazioni) {
+ this.annotazioni = annotazioni;
+ return this;
+ }
+
+ public List getOrders() {
+ return orders;
+ }
+
+ public CreateUDCRequestDTO setOrders(List orders) {
+ this.orders = orders;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCRequestOrderDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCRequestOrderDTO.java
new file mode 100644
index 00000000..84b085e7
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCRequestOrderDTO.java
@@ -0,0 +1,49 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import java.time.LocalDate;
+
+public class CreateUDCRequestOrderDTO {
+
+
+ private String gestione;
+ private LocalDate dataOrd;
+ private LocalDate dataCons;
+ private int numOrd;
+
+
+ public String getGestione() {
+ return gestione;
+ }
+
+ public CreateUDCRequestOrderDTO setGestione(String gestione) {
+ this.gestione = gestione;
+ return this;
+ }
+
+ public LocalDate getDataOrd() {
+ return dataOrd;
+ }
+
+ public CreateUDCRequestOrderDTO setDataOrd(LocalDate dataOrd) {
+ this.dataOrd = dataOrd;
+ return this;
+ }
+
+ public LocalDate getDataCons() {
+ return dataCons;
+ }
+
+ public CreateUDCRequestOrderDTO setDataCons(LocalDate dataCons) {
+ this.dataCons = dataCons;
+ return this;
+ }
+
+ public int getNumOrd() {
+ return numOrd;
+ }
+
+ public CreateUDCRequestOrderDTO setNumOrd(int numOrd) {
+ this.numOrd = numOrd;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCResponseDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCResponseDTO.java
new file mode 100644
index 00000000..41a92d6c
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/CreateUDCResponseDTO.java
@@ -0,0 +1,17 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import it.integry.integrywmsnative.core.model.MtbColt;
+
+public class CreateUDCResponseDTO {
+
+ private MtbColt mtbColt;
+
+ public MtbColt getMtbColt() {
+ return mtbColt;
+ }
+
+ public CreateUDCResponseDTO setMtbColt(MtbColt mtbColt) {
+ this.mtbColt = mtbColt;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/DeleteUDCRowRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/DeleteUDCRowRequestDTO.java
new file mode 100644
index 00000000..90303ca5
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/DeleteUDCRowRequestDTO.java
@@ -0,0 +1,17 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import it.integry.integrywmsnative.core.model.MtbColr;
+
+public class DeleteUDCRowRequestDTO {
+
+ private MtbColr mtbColrToDelete;
+
+ public MtbColr getMtbColrToDelete() {
+ return mtbColrToDelete;
+ }
+
+ public DeleteUDCRowRequestDTO setMtbColrToDelete(MtbColr mtbColrToDelete) {
+ this.mtbColrToDelete = mtbColrToDelete;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/EditUDCRowRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/EditUDCRowRequestDTO.java
new file mode 100644
index 00000000..1b7e8d71
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/EditUDCRowRequestDTO.java
@@ -0,0 +1,70 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+import it.integry.integrywmsnative.core.model.MtbColr;
+
+public class EditUDCRowRequestDTO {
+ private MtbColr sourceMtbColr;
+
+ private BigDecimal newQtaTot;
+ private BigDecimal newQtaCnf;
+ private BigDecimal newNumCnf;
+ private String newPartitaMag;
+ private LocalDate newDataScad;
+
+ public MtbColr getSourceMtbColr() {
+ return sourceMtbColr;
+ }
+
+ public EditUDCRowRequestDTO setSourceMtbColr(MtbColr sourceMtbColr) {
+ this.sourceMtbColr = sourceMtbColr;
+ return this;
+ }
+
+ public BigDecimal getNewQtaTot() {
+ return newQtaTot;
+ }
+
+ public EditUDCRowRequestDTO setNewQtaTot(BigDecimal newQtaTot) {
+ this.newQtaTot = newQtaTot;
+ return this;
+ }
+
+ public BigDecimal getNewQtaCnf() {
+ return newQtaCnf;
+ }
+
+ public EditUDCRowRequestDTO setNewQtaCnf(BigDecimal newQtaCnf) {
+ this.newQtaCnf = newQtaCnf;
+ return this;
+ }
+
+ public BigDecimal getNewNumCnf() {
+ return newNumCnf;
+ }
+
+ public EditUDCRowRequestDTO setNewNumCnf(BigDecimal newNumCnf) {
+ this.newNumCnf = newNumCnf;
+ return this;
+ }
+
+ public String getNewPartitaMag() {
+ return newPartitaMag;
+ }
+
+ public EditUDCRowRequestDTO setNewPartitaMag(String newPartitaMag) {
+ this.newPartitaMag = newPartitaMag;
+ return this;
+ }
+
+ public LocalDate getNewDataScad() {
+ return newDataScad;
+ }
+
+ public EditUDCRowRequestDTO setNewDataScad(LocalDate newDataScad) {
+ this.newDataScad = newDataScad;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/EditUDCRowResponseDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/EditUDCRowResponseDTO.java
new file mode 100644
index 00000000..ba16ed3c
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/udc/EditUDCRowResponseDTO.java
@@ -0,0 +1,17 @@
+package it.integry.integrywmsnative.core.rest.model.udc;
+
+import it.integry.integrywmsnative.core.model.MtbColr;
+
+public class EditUDCRowResponseDTO {
+ private MtbColr savedMtbColr;
+
+ public MtbColr getSavedMtbColr() {
+ return savedMtbColr;
+ }
+
+ public EditUDCRowResponseDTO setSavedMtbColr(MtbColr savedMtbColr) {
+ this.savedMtbColr = savedMtbColr;
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/CanUDSBeDeletedRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/CanULBeDeletedRequestDTO.java
similarity index 71%
rename from app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/CanUDSBeDeletedRequestDTO.java
rename to app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/CanULBeDeletedRequestDTO.java
index 46df1d51..b4692876 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/CanUDSBeDeletedRequestDTO.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/CanULBeDeletedRequestDTO.java
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
import it.integry.integrywmsnative.core.model.MtbColt;
-public class CanUDSBeDeletedRequestDTO {
+public class CanULBeDeletedRequestDTO {
private MtbColt mtbColt;
@@ -11,7 +11,7 @@ public class CanUDSBeDeletedRequestDTO {
return mtbColt;
}
- public CanUDSBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
+ public CanULBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
this.mtbColt = mtbColt;
return this;
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/DeleteUDSRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/DeleteULRequestDTO.java
similarity index 73%
rename from app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/DeleteUDSRequestDTO.java
rename to app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/DeleteULRequestDTO.java
index b82ddbe3..2621138a 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/DeleteUDSRequestDTO.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/DeleteULRequestDTO.java
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
import it.integry.integrywmsnative.core.model.MtbColt;
-public class DeleteUDSRequestDTO {
+public class DeleteULRequestDTO {
private MtbColt mtbColt;
@@ -10,7 +10,7 @@ public class DeleteUDSRequestDTO {
return mtbColt;
}
- public DeleteUDSRequestDTO setMtbColt(MtbColt mtbColt) {
+ public DeleteULRequestDTO setMtbColt(MtbColt mtbColt) {
this.mtbColt = mtbColt;
return this;
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/InsertUDCRowRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/InsertUDCRowRequestDTO.java
new file mode 100644
index 00000000..96bb9537
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/InsertUDCRowRequestDTO.java
@@ -0,0 +1,132 @@
+package it.integry.integrywmsnative.core.rest.model.uds;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+import it.integry.integrywmsnative.core.model.MtbColt;
+
+public class InsertUDCRowRequestDTO {
+ private MtbColt targetMtbColt;
+
+ private String codMart;
+ private BigDecimal qtaTot;
+ private BigDecimal qtaCnf;
+ private BigDecimal numCnf;
+ private String partitaMag;
+ private LocalDate dataScad;
+ private String codJcom;
+ private String gestioneRif;
+
+ private LocalDate dataOrd;
+ private Integer numOrd;
+ private Integer rigaOrd;
+
+
+ public MtbColt getTargetMtbColt() {
+ return targetMtbColt;
+ }
+
+ public InsertUDCRowRequestDTO setTargetMtbColt(MtbColt targetMtbColt) {
+ this.targetMtbColt = targetMtbColt;
+ return this;
+ }
+
+ public String getCodMart() {
+ return codMart;
+ }
+
+ public InsertUDCRowRequestDTO setCodMart(String codMart) {
+ this.codMart = codMart;
+ return this;
+ }
+
+ public BigDecimal getQtaTot() {
+ return qtaTot;
+ }
+
+ public InsertUDCRowRequestDTO setQtaTot(BigDecimal qtaTot) {
+ this.qtaTot = qtaTot;
+ return this;
+ }
+
+ public BigDecimal getQtaCnf() {
+ return qtaCnf;
+ }
+
+ public InsertUDCRowRequestDTO setQtaCnf(BigDecimal qtaCnf) {
+ this.qtaCnf = qtaCnf;
+ return this;
+ }
+
+ public BigDecimal getNumCnf() {
+ return numCnf;
+ }
+
+ public InsertUDCRowRequestDTO setNumCnf(BigDecimal numCnf) {
+ this.numCnf = numCnf;
+ return this;
+ }
+
+ public String getPartitaMag() {
+ return partitaMag;
+ }
+
+ public InsertUDCRowRequestDTO setPartitaMag(String partitaMag) {
+ this.partitaMag = partitaMag;
+ return this;
+ }
+
+ public LocalDate getDataScad() {
+ return dataScad;
+ }
+
+ public InsertUDCRowRequestDTO setDataScad(LocalDate dataScad) {
+ this.dataScad = dataScad;
+ return this;
+ }
+
+ public String getCodJcom() {
+ return codJcom;
+ }
+
+ public InsertUDCRowRequestDTO setCodJcom(String codJcom) {
+ this.codJcom = codJcom;
+ return this;
+ }
+
+ public String getGestioneRif() {
+ return gestioneRif;
+ }
+
+ public InsertUDCRowRequestDTO setGestioneRif(String gestioneRif) {
+ this.gestioneRif = gestioneRif;
+ return this;
+ }
+
+ public LocalDate getDataOrd() {
+ return dataOrd;
+ }
+
+ public InsertUDCRowRequestDTO setDataOrd(LocalDate dataOrd) {
+ this.dataOrd = dataOrd;
+ return this;
+ }
+
+ public Integer getNumOrd() {
+ return numOrd;
+ }
+
+ public InsertUDCRowRequestDTO setNumOrd(Integer numOrd) {
+ this.numOrd = numOrd;
+ return this;
+ }
+
+ public Integer getRigaOrd() {
+ return rigaOrd;
+ }
+
+ public InsertUDCRowRequestDTO setRigaOrd(Integer rigaOrd) {
+ this.rigaOrd = rigaOrd;
+ return this;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/InsertUDCRowResponseDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/InsertUDCRowResponseDTO.java
new file mode 100644
index 00000000..e06abfbb
--- /dev/null
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/InsertUDCRowResponseDTO.java
@@ -0,0 +1,12 @@
+package it.integry.integrywmsnative.core.rest.model.uds;
+
+import it.integry.integrywmsnative.core.model.MtbColr;
+
+public class InsertUDCRowResponseDTO {
+
+ private MtbColr savedMtbColr;
+
+ public MtbColr getSavedMtbColr() {
+ return savedMtbColr;
+ }
+}
diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/PrintUDSRequestDTO.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/PrintULRequestDTO.java
similarity index 51%
rename from app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/PrintUDSRequestDTO.java
rename to app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/PrintULRequestDTO.java
index c541259c..5e60a113 100644
--- a/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/PrintUDSRequestDTO.java
+++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/model/uds/PrintULRequestDTO.java
@@ -1,10 +1,11 @@
package it.integry.integrywmsnative.core.rest.model.uds;
+import java.util.ArrayList;
import java.util.List;
import it.integry.integrywmsnative.core.model.MtbColt;
-public class PrintUDSRequestDTO {
+public class PrintULRequestDTO {
private List mtbColts;
@@ -12,8 +13,14 @@ public class PrintUDSRequestDTO {
return mtbColts;
}
- public PrintUDSRequestDTO setMtbColts(List mtbColts) {
+ public PrintULRequestDTO setMtbColts(List mtbColts) {
this.mtbColts = mtbColts;
return this;
}
+
+ public PrintULRequestDTO setMtbColt(MtbColt mtbColt) {
+ this.mtbColts = new ArrayList<>(1);
+ this.mtbColts.add(mtbColt);
+ return this;
+ }
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/accettazione/dto/SitArtOrdDTO.java b/app/src/main/java/it/integry/integrywmsnative/gest/accettazione/dto/SitArtOrdDTO.java
index 96c9a3aa..a1c5ac8a 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/accettazione/dto/SitArtOrdDTO.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/accettazione/dto/SitArtOrdDTO.java
@@ -1,6 +1,7 @@
package it.integry.integrywmsnative.gest.accettazione.dto;
import java.math.BigDecimal;
+import java.time.LocalDate;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
@@ -20,7 +21,7 @@ public class SitArtOrdDTO {
private BigDecimal qtaRiservata;
private String untOrd;
private String codMdep;
- private String dataOrd;
+ private LocalDate dataOrd;
private int numOrd;
private String gestione;
private int rigaOrd;
@@ -168,11 +169,11 @@ public class SitArtOrdDTO {
return this;
}
- public String getDataOrd() {
+ public LocalDate getDataOrd() {
return dataOrd;
}
- public SitArtOrdDTO setDataOrd(String dataOrd) {
+ public SitArtOrdDTO setDataOrd(LocalDate dataOrd) {
this.dataOrd = dataOrd;
return this;
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingModule.java b/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingModule.java
index 9e960f4a..d5472238 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingModule.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingModule.java
@@ -4,8 +4,9 @@ import dagger.Module;
import dagger.Provides;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
+import it.integry.integrywmsnative.core.rest.consumers.ColliAccettazioneRESTConsumer;
+import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
-import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
import it.integry.integrywmsnative.gest.accettazione_picking.rest.AccettazionePickingRESTConsumer;
@@ -25,8 +26,21 @@ public class AccettazionePickingModule {
}
@Provides
- AccettazionePickingViewModel providesAccettazioneViewModel(ArticoloRESTConsumer articoloRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, AccettazionePickingRESTConsumer accettazionePickingRESTConsumer, GestSetupRESTConsumer gestSetupRESTConsumer) {
- return new AccettazionePickingViewModel(articoloRESTConsumer, barcodeRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, accettazionePickingRESTConsumer, gestSetupRESTConsumer);
+ AccettazionePickingViewModel providesAccettazioneViewModel(
+ ArticoloRESTConsumer articoloRESTConsumer,
+ BarcodeRESTConsumer barcodeRESTConsumer,
+ ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
+ PrinterRESTConsumer printerRESTConsumer,
+ AccettazionePickingRESTConsumer accettazionePickingRESTConsumer,
+ ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer,
+ ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
+ return new AccettazionePickingViewModel(articoloRESTConsumer,
+ barcodeRESTConsumer,
+ colliMagazzinoRESTConsumer,
+ printerRESTConsumer,
+ accettazionePickingRESTConsumer,
+ colliAccettazioneRESTConsumer,
+ colliLavorazioneRESTConsumer);
}
}
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingViewModel.java
index 91ea1dc1..e919d55c 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingViewModel.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/accettazione_picking/AccettazionePickingViewModel.java
@@ -29,7 +29,6 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUBaseOperationsListener;
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUPrintListener;
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
-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.MtbColt;
@@ -38,17 +37,26 @@ import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
+import it.integry.integrywmsnative.core.rest.consumers.ColliAccettazioneRESTConsumer;
+import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
-import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
+import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestOrderDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityString;
-import it.integry.integrywmsnative.core.utility.UtilityThread;
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
import it.integry.integrywmsnative.gest.accettazione_picking.dto.HistoryMtbAartDTO;
@@ -66,18 +74,19 @@ public class AccettazionePickingViewModel {
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
private final PrinterRESTConsumer mPrinterRESTConsumer;
private final AccettazionePickingRESTConsumer mAccettazionePickingRESTConsumer;
- private final GestSetupRESTConsumer mGestSetupRESTConsumer;
+ private final ColliAccettazioneRESTConsumer mColliAccettazioneRESTConsumer;
+ private final ColliLavorazioneRESTConsumer mColliLavorazioneRESTConsumer;
+
+ private ColliCaricoRESTConsumerInterface mColliCaricoRESTConsumer;
private AccettazionePickingViewModel.Listener mListener;
private List mOrders;
- private List mSitArts;
private boolean mUseQtaOrd;
private final MutableLiveData> mPickingList = new MutableLiveData<>();
private MtbColt mCurrentMtbColt = null;
private GestioneEnum defaultGestioneOfUL = null;
- private String mDefaultCodMdep = null;
private final List mHistoryUsedAarts = new ArrayList<>();
@@ -87,28 +96,29 @@ public class AccettazionePickingViewModel {
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
PrinterRESTConsumer printerRESTConsumer,
AccettazionePickingRESTConsumer accettazionePickingRESTConsumer,
- GestSetupRESTConsumer gestSetupRESTConsumer) {
+ ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer,
+ ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
this.mArticoloRESTConsumer = articoloRESTConsumer;
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
this.mPrinterRESTConsumer = printerRESTConsumer;
this.mAccettazionePickingRESTConsumer = accettazionePickingRESTConsumer;
- this.mGestSetupRESTConsumer = gestSetupRESTConsumer;
+ this.mColliAccettazioneRESTConsumer = colliAccettazioneRESTConsumer;
+ this.mColliLavorazioneRESTConsumer = colliLavorazioneRESTConsumer;
}
public void init(List orders, List sitArts, String codMdep, boolean useQtaOrd) {
this.mOrders = orders;
- this.mDefaultCodMdep = codMdep;
this.mUseQtaOrd = useQtaOrd;
- this.mSitArts = Stream.of(sitArts)
- .filter(x -> UtilityBigDecimal.greaterThan(x.getNumCnfDaEvadere(), BigDecimal.ZERO) && UtilityBigDecimal.greaterThan(x.getQtaDaEvadere(), BigDecimal.ZERO))
+ List mSitArts = Stream.of(sitArts)
+ .filter(x ->
+ UtilityBigDecimal.greaterThan(x.getNumCnfDaEvadere(), BigDecimal.ZERO) &&
+ UtilityBigDecimal.greaterThan(x.getQtaDaEvadere(), BigDecimal.ZERO))
.toList();
- getEmptyPickingList(this.mSitArts, pickingObjectList -> {
- this.mPickingList.postValue(pickingObjectList);
- });
+ getEmptyPickingList(mSitArts, this.mPickingList::postValue);
//Definizione della gestione collo di default
Boolean isOrdTrasf = Stream.of(mOrders)
@@ -133,6 +143,11 @@ public class AccettazionePickingViewModel {
} else {
this.sendError(new InvalidLUMultiGestioneException());
}
+
+ switch (defaultGestioneOfUL) {
+ case ACQUISTO -> this.mColliCaricoRESTConsumer = mColliAccettazioneRESTConsumer;
+ case LAVORAZIONE -> this.mColliCaricoRESTConsumer = mColliLavorazioneRESTConsumer;
+ }
}
private void getEmptyPickingList(List sitArtOrdList, RunnableArgs> onComplete) {
@@ -357,76 +372,102 @@ public class AccettazionePickingViewModel {
public void createNewLU(Integer customNumCollo, String customSerCollo, boolean disablePrint, Runnable onComplete) {
this.sendOnInfoAggiuntiveRequest((additionalNotes, tCol) -> {
- this.mGestSetupRESTConsumer.getValue("PICKING", "SETUP", "DEFAULT_POSIZIONE_COLLI_ACCETTAZIONE", defaultPosAccettazioneDTO -> {
+// this.mGestSetupRESTConsumer.getValue("PICKING", "SETUP", "DEFAULT_POSIZIONE_COLLI_ACCETTAZIONE", defaultPosAccettazioneDTO -> {
+//
+// String defaultPosAccettazione = null;
+// if (defaultPosAccettazioneDTO != null && !UtilityString.isNullOrEmpty(defaultPosAccettazioneDTO.value))
+// defaultPosAccettazione = defaultPosAccettazioneDTO.value;
+//
+// MtbColt mtbColt = new MtbColt();
+// mtbColt
+// .initDefaultFields(defaultGestioneOfUL)
+// .setAnnotazioni(additionalNotes)
+// .setPosizione(defaultPosAccettazione)
+// .setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
+//
+// if (tCol != null) {
+// mtbColt.setCodTcol(tCol.getCodTcol());
+// mtbColt.setMtbTCol(tCol);
+// }
+//
+// if (customNumCollo != null) {
+// mtbColt.setNumCollo(customNumCollo);
+// }
+//
+// if (!UtilityString.isNullOrEmpty(customSerCollo)) {
+// mtbColt.setSerCollo(customSerCollo);
+// }
+//
+// List codAnags =
+// Stream.of(mOrders)
+// .map(OrdineAccettazioneInevasoDTO::getCodAnagOrd)
+// .distinct()
+// .toList();
+//
+// if (codAnags.size() == 1) {
+// mtbColt.setCodAnag(codAnags.get(0));
+// }
+//
+// List rifOrds =
+// Stream.of(mOrders)
+// .map(OrdineAccettazioneInevasoDTO::getRifOrd)
+// .distinct()
+// .toList();
+//
+// if (rifOrds.size() == 1) {
+// mtbColt.setRifOrd(rifOrds.get(0));
+// }
+//
+// List numDataOrds =
+// Stream.of(mOrders)
+// .map(value -> value.getNumero() + value.getData())
+// .distinct()
+// .toList();
+//
+// if (numDataOrds.size() == 1) {
+// mtbColt.setNumOrd(mOrders.get(0).getNumero());
+// mtbColt.setDataOrd(mOrders.get(0).getData());
+// }
+//
+// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, savedMtbColt -> {
+// mtbColt
+// .setNumCollo(savedMtbColt.getNumCollo())
+// .setDataCollo(savedMtbColt.getDataColloS())
+// .setMtbColr(new ObservableArrayList<>())
+// .setDisablePrint(disablePrint);
+//
+// this.mCurrentMtbColt = mtbColt;
+//
+// if (onComplete != null) onComplete.run();
+// this.sendLUOpened(mtbColt);
+// }, this::sendError);
+//
+// }, this::sendError);
- String defaultPosAccettazione = null;
- if (defaultPosAccettazioneDTO != null && !UtilityString.isNullOrEmpty(defaultPosAccettazioneDTO.value))
- defaultPosAccettazione = defaultPosAccettazioneDTO.value;
+ final List orders = Stream.of(this.mOrders)
+ .map(x -> new CreateUDCRequestOrderDTO()
+ .setDataCons(x.getDataConsD() != null ? UtilityDate.toLocalDate(x.getDataConsD()) : null)
+ .setDataOrd(UtilityDate.toLocalDate(x.getDataD()))
+ .setGestione(x.getGestione())
+ .setNumOrd(x.getNumero()))
+ .toList();
- MtbColt mtbColt = new MtbColt();
- mtbColt
- .initDefaultFields(defaultGestioneOfUL)
- .setAnnotazioni(additionalNotes)
- .setPosizione(defaultPosAccettazione)
- .setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
+ final CreateUDCRequestDTO createUDCRequestDTO = new CreateUDCRequestDTO()
+ .setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep())
+ .setAnnotazioni(additionalNotes)
+ .setCodTcol(tCol != null ? tCol.getCodTcol() : null)
+ .setNumCollo(customNumCollo)
+ .setSerCollo(customSerCollo)
+ .setOrders(orders);
- if (tCol != null) {
- mtbColt.setCodTcol(tCol.getCodTcol());
- mtbColt.setMtbTCol(tCol);
- }
+ this.mColliCaricoRESTConsumer.createUDC(createUDCRequestDTO, createdUDS -> {
+ this.mCurrentMtbColt = createdUDS;
- if (customNumCollo != null) {
- mtbColt.setNumCollo(customNumCollo);
- }
-
- if (!UtilityString.isNullOrEmpty(customSerCollo)) {
- mtbColt.setSerCollo(customSerCollo);
- }
-
- List codAnags =
- Stream.of(mOrders)
- .map(OrdineAccettazioneInevasoDTO::getCodAnagOrd)
- .distinct()
- .toList();
-
- if (codAnags.size() == 1) {
- mtbColt.setCodAnag(codAnags.get(0));
- }
-
- List rifOrds =
- Stream.of(mOrders)
- .map(OrdineAccettazioneInevasoDTO::getRifOrd)
- .distinct()
- .toList();
-
- if (rifOrds.size() == 1) {
- mtbColt.setRifOrd(rifOrds.get(0));
- }
-
- List numDataOrds =
- Stream.of(mOrders)
- .map(value -> value.getNumero() + value.getData())
- .distinct()
- .toList();
-
- if (numDataOrds.size() == 1) {
- mtbColt.setNumOrd(mOrders.get(0).getNumero());
- mtbColt.setDataOrd(mOrders.get(0).getData());
- }
-
- this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, savedMtbColt -> {
- mtbColt
- .setNumCollo(savedMtbColt.getNumCollo())
- .setDataCollo(savedMtbColt.getDataColloS())
- .setMtbColr(new ObservableArrayList<>())
- .setDisablePrint(disablePrint);
-
- this.mCurrentMtbColt = mtbColt;
-
- if (onComplete != null) onComplete.run();
- this.sendLUOpened(mtbColt);
- }, this::sendError);
+ this.mCurrentMtbColt.setMtbColr(new ObservableArrayList<>())
+ .setDisablePrint(disablePrint);
+ if (onComplete != null) onComplete.run();
+ this.sendLUOpened(createdUDS);
}, this::sendError);
});
@@ -577,69 +618,57 @@ public class AccettazionePickingViewModel {
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
+ if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
+ resetMatchedRows();
+
+ if (shouldCloseLU) closeLU();
+ return;
+ }
+
this.sendOnLoadingStarted();
- UtilityThread.executeParallel(() -> {
+ String gestioneRif = pickingObjectDTO.getSitArtOrdDTO().getGestioneEnum() == GestioneEnum.PRODUZIONE ? "L" : pickingObjectDTO.getSitArtOrdDTO().getGestione();
- String gestioneRif = pickingObjectDTO.getSitArtOrdDTO().getGestioneEnum() == GestioneEnum.PRODUZIONE ? "L" : pickingObjectDTO.getSitArtOrdDTO().getGestione();
+ var clonedTargetMtbColt = (MtbColt) mCurrentMtbColt.clone();
+ clonedTargetMtbColt.setMtbColr(null);
- final MtbColr mtbColr = new MtbColr()
- .setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
- .setPartitaMag(partitaMag)
- .setDataScadPartita(dataScad)
- .setQtaCol(qtaTot)
- .setQtaCnf(qtaCnf)
- .setNumCnf(numCnf)
- .setGestioneRif(gestioneRif)
- .setCodJcom(pickingObjectDTO.getSitArtOrdDTO().getCodJcom())
- .setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
- .setDatetimeRow(UtilityDate.getDateInstance())
- .setDataOrd(pickingObjectDTO.getSitArtOrdDTO().getDataOrd())
- .setNumOrd(pickingObjectDTO.getSitArtOrdDTO().getNumOrd())
- .setRigaOrd(pickingObjectDTO.getSitArtOrdDTO().getRigaOrd());
+ var insertUDCRowRequestDto = new InsertUDCRowRequestDTO()
+ .setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
+ .setQtaTot(qtaTot)
+ .setQtaCnf(qtaCnf)
+ .setNumCnf(numCnf)
+ .setPartitaMag(partitaMag)
+ .setCodJcom(pickingObjectDTO.getSitArtOrdDTO().getCodJcom())
+ .setGestioneRif(gestioneRif)
+ .setDataOrd(pickingObjectDTO.getSitArtOrdDTO().getDataOrd())
+ .setNumOrd(pickingObjectDTO.getSitArtOrdDTO().getNumOrd())
+ .setRigaOrd(pickingObjectDTO.getSitArtOrdDTO().getRigaOrd())
+ .setTargetMtbColt(clonedTargetMtbColt);
+ if (dataScad != null)
+ insertUDCRowRequestDto
+ .setDataScad(UtilityDate.toLocalDate(dataScad));
- this.addHistoryItem(mtbColr);
+ mColliCaricoRESTConsumer.insertUDCRow(insertUDCRowRequestDto, insertedMtbColr -> {
+ this.addHistoryItem(insertedMtbColr);
- mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
+ insertedMtbColr
+ .setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
+ .setMtbAart(pickingObjectDTO.getMtbAart());
- MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
- cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
+ pickingObjectDTO.getWithdrawMtbColrs().add(insertedMtbColr);
+ mCurrentMtbColt.getMtbColr().add(insertedMtbColr);
- cloneMtbColt.setMtbColr(new ObservableArrayList<>());
- cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
+ //Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
+ resetMatchedRows();
- if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
- resetMatchedRows();
- this.sendOnLoadingEnded();
+ this.sendOnRowSaved();
+ this.sendOnLoadingEnded();
- if (shouldCloseLU) closeLU();
- return;
- }
+ if (shouldCloseLU) closeLU();
- mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
+ }, this::sendError);
- 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());
-
- 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) closeLU();
- }, this::sendError);
- }, false);
}
@@ -676,46 +705,41 @@ public class AccettazionePickingViewModel {
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.UPDATE);
- mtbColr
- .setNumCnf(numCnf)
- .setQtaCnf(qtaCnf)
- .setQtaCol(qtaTot)
- .setPartitaMag(partitaMag)
- .setDataScadPartita(dataScad)
- .setUtente(SettingsManager.i().getUser().getFullname())
- .setDatetimeRow(UtilityDate.getDateInstance());
+ var editUDCRowRequest = new EditUDCRowRequestDTO()
+ .setSourceMtbColr(mtbColrClone)
+ .setNewNumCnf(numCnf)
+ .setNewQtaCnf(qtaCnf)
+ .setNewQtaTot(qtaTot)
+ .setNewPartitaMag(partitaMag);
- mtbColt.getMtbColr().add(mtbColr);
+ if (dataScad != null)
+ editUDCRowRequest
+ .setNewDataScad(UtilityDate.toLocalDate(dataScad));
- this.addHistoryItem(mtbColr);
- this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
+ this.mColliCaricoRESTConsumer.editUDCRow(editUDCRowRequest, (editedMtbColr) -> {
- mtbColr.setNumCnf(numCnf)
- .setQtaCnf(qtaCnf)
- .setQtaCol(qtaTot);
+ this.addHistoryItem(editedMtbColr);
Optional pickingObjectDTO = Stream.of(this.mPickingList.getValue())
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate))
.findSingle();
+ editedMtbColr
+ .setUntMis(mtbColrToUpdate.getUntMis())
+ .setMtbAart(mtbColrToUpdate.getMtbAart());
+
if (pickingObjectDTO.isPresent()) {
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
- pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
+ pickingObjectDTO.get().getWithdrawMtbColrs().add(editedMtbColr);
}
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
- this.mCurrentMtbColt.getMtbColr().add(mtbColr);
+ this.mCurrentMtbColt.getMtbColr().add(editedMtbColr);
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
resetMatchedRows();
@@ -730,42 +754,31 @@ public class AccettazionePickingViewModel {
public void deleteRow(MtbColr mtbColrToDelete) {
this.sendMtbColrDeleteRequest(shouldDelete -> {
- if (shouldDelete) {
- this.sendOnLoadingStarted();
- MtbColt mtbColt = new MtbColt()
- .setNumCollo(mtbColrToDelete.getNumCollo())
- .setDataCollo(mtbColrToDelete.getDataColloS())
- .setSerCollo(mtbColrToDelete.getSerCollo())
- .setGestione(mtbColrToDelete.getGestione())
- .setMtbColr(new ObservableArrayList<>());
- mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
+ if (!shouldDelete)
+ return;
- MtbColr mtbColr = (MtbColr) mtbColrToDelete.clone();
- mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
- mtbColr.setQtaCol(mtbColr.getQtaCol().multiply(new BigDecimal(-1)))
- .setNumCnf(mtbColr.getNumCnf().multiply(new BigDecimal(-1)))
- .setRiga(null);
+ this.sendOnLoadingStarted();
- mtbColt.getMtbColr().add(mtbColr);
+ var deleteUDCRowRequest = new DeleteUDCRowRequestDTO()
+ .setMtbColrToDelete(mtbColrToDelete);
- this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
+ this.mColliCaricoRESTConsumer.deleteUDCRow(deleteUDCRowRequest,
+ () -> {
+ Optional pickingObjectDTO = Stream.of(this.mPickingList.getValue())
+ .filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete))
+ .findSingle();
- Optional pickingObjectDTO = Stream.of(this.mPickingList.getValue())
- .filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete))
- .findSingle();
+ if (pickingObjectDTO.isPresent()) {
+ pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToDelete);
+ }
- if (pickingObjectDTO.isPresent()) {
- pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToDelete);
- }
+ this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
- this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
+ this.resetMatchedRows();
+ this.sendOnRowSaved();
+ this.sendOnLoadingEnded();
+ }, this::sendError);
- this.resetMatchedRows();
- this.sendOnRowSaved();
- this.sendOnLoadingEnded();
-
- }, this::sendError);
- }
});
}
@@ -774,14 +787,16 @@ public class AccettazionePickingViewModel {
this.sendOnLoadingStarted();
- mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
+ mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
if (canBeDeleted) {
deleteLU(() -> {
this.sendLUClosed();
this.sendOnLoadingEnded();
});
} else {
- mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
+ CloseUDCRequestDTO closeUDCRequestDTO = new CloseUDCRequestDTO()
+ .setMtbColt(mCurrentMtbColt);
+ mColliCaricoRESTConsumer.closeUDC(closeUDCRequestDTO, closeUDCResponse -> {
Runnable onVersamentoCompleted = () -> {
if (!mCurrentMtbColt.getDisablePrint()) {
@@ -818,16 +833,15 @@ public class AccettazionePickingViewModel {
private void printCollo(Runnable onComplete) {
+
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
- this.mPrinterRESTConsumer.printCollo(
- cloneMtbColt,
- () -> {
- this.sendLUSuccessfullyPrinted();
- onComplete.run();
- }, ex -> this.sendLUPrintError(ex, onComplete));
+ var printUDSRequestDto = new PrintULRequestDTO()
+ .setMtbColt(cloneMtbColt);
+ this.mColliMagazzinoRESTConsumer.printUL(printUDSRequestDto, onComplete,
+ ex -> this.sendLUPrintError(ex, onComplete));
}
private void postCloseOperations() {
@@ -837,7 +851,10 @@ public class AccettazionePickingViewModel {
}
private void deleteLU(Runnable onComplete) {
- mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
+ DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
+ .setMtbColt(this.mCurrentMtbColt);
+
+ mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
this.mCurrentMtbColt = null;
if (onComplete != null) onComplete.run();
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/ordini_uscita_elenco/filters/VenditaFiltroOrdiniViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/ordini_uscita_elenco/filters/VenditaFiltroOrdiniViewModel.java
index 96b16257..25576357 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/ordini_uscita_elenco/filters/VenditaFiltroOrdiniViewModel.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/ordini_uscita_elenco/filters/VenditaFiltroOrdiniViewModel.java
@@ -107,7 +107,7 @@ public class VenditaFiltroOrdiniViewModel {
if (dataConsegna == null) currentDataConsPredicate.set(null);
else {
- currentDataConsPredicate.set(o -> DateUtils.isSameDay(o.getDataConsD(), dataConsegna));
+ currentDataConsPredicate.set(o -> o.getDataConsD() != null && DateUtils.isSameDay(o.getDataConsD(), dataConsegna));
}
}
@@ -137,8 +137,7 @@ public class VenditaFiltroOrdiniViewModel {
if (mtbGrupList == null || mtbGrupList.isEmpty()) {
currentGruppoMercPredicate.set(null);
this.selectedMtbGrup = new ArrayList<>();
- }
- else {
+ } else {
this.selectedMtbGrup = mtbGrupList;
var mtbGrups = Stream.of(mtbGrupList).map(MtbGrup::getCodMgrp).toList();
currentGruppoMercPredicate.set(o -> Stream.of(o.getAvailableClassMerc())
@@ -693,6 +692,7 @@ public class VenditaFiltroOrdiniViewModel {
.sortBy(JtbComt::getCodJcom)
.toList();
}
+
public List getAvailableCommesse(List commesseFullList) {
if (currentIdViaggioPredicate.get() == null &&
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/picking_libero/PickingLiberoViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/picking_libero/PickingLiberoViewModel.java
index d4b5a67c..22ef7672 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/picking_libero/PickingLiberoViewModel.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/picking_libero/PickingLiberoViewModel.java
@@ -40,6 +40,7 @@ import it.integry.integrywmsnative.core.rest.model.Ean128Model;
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemRequestDTO;
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemsRequestDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
@@ -804,7 +805,7 @@ public class PickingLiberoViewModel {
this.sendOnLoadingStarted();
- mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
+ mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
if (canBeDeleted) {
deleteLU(() -> {
this.sendLUClosed();
@@ -829,7 +830,9 @@ public class PickingLiberoViewModel {
}
private void deleteLU(Runnable onComplete) {
- mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
+ DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
+ .setMtbColt(mCurrentMtbColt);
+ mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
this.mCurrentMtbColt = null;
if (onComplete != null) onComplete.run();
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/picking_resi/PickingResiViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/picking_resi/PickingResiViewModel.java
index 4a4afdca..f65c95a2 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/picking_resi/PickingResiViewModel.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/picking_resi/PickingResiViewModel.java
@@ -37,6 +37,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.model.DocumentoResoDTO;
+import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
import it.integry.integrywmsnative.core.utility.UtilityDate;
@@ -154,7 +155,7 @@ public class PickingResiViewModel {
this.sendOnLoadingStarted();
- mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
+ mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
if (canBeDeleted) {
deleteLU(() -> {
@@ -197,7 +198,10 @@ public class PickingResiViewModel {
}
private void deleteLU(Runnable onComplete) {
- mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
+ DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
+ .setMtbColt(mCurrentMtbColt);
+
+ mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
this.mCurrentMtbColt = null;
if (onComplete != null) onComplete.run();
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/rettifica_giacenze/RettificaGiacenzeViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/rettifica_giacenze/RettificaGiacenzeViewModel.java
index 9f6c688b..c484d3d1 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/rettifica_giacenze/RettificaGiacenzeViewModel.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/rettifica_giacenze/RettificaGiacenzeViewModel.java
@@ -30,6 +30,7 @@ import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
+import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
import it.integry.integrywmsnative.core.utility.UtilityDate;
@@ -404,7 +405,7 @@ public class RettificaGiacenzeViewModel {
this.sendOnLoadingStarted();
- this.mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
+ this.mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
if (canBeDeleted) {
deleteLU(() -> {
@@ -494,7 +495,10 @@ public class RettificaGiacenzeViewModel {
}
private void deleteLU(Runnable onComplete) {
- mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
+ DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
+ .setMtbColt(mCurrentMtbColt);
+
+ mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
this.mCurrentMtbColt = null;
if (onComplete != null) onComplete.run();
diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java
index 1832702d..b6ed1901 100644
--- a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java
+++ b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione/SpedizioneViewModel.java
@@ -63,15 +63,14 @@ import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemRequestDTO;
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemsRequestDTO;
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickOrderRequestDTO;
-import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
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.DeleteULRequestDTO;
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.rest.model.uds.PrintULRequestDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
@@ -1472,11 +1471,8 @@ public class SpedizioneViewModel {
}
private void checkIfShouldBeDeleted(Runnable onDeleted, Runnable onContinue) {
- var requestDto =
- new CanUDSBeDeletedRequestDTO()
- .setMtbColt(this.mCurrentMtbColt);
- this.mColliSpedizioneRESTConsumer.canUDSBeDeleted(requestDto,
+ this.mColliMagazzinoRESTConsumer.canULBeDeleted(this.mCurrentMtbColt,
canBeDeleted -> {
if (canBeDeleted == null || !canBeDeleted)
onContinue.run();
@@ -1488,8 +1484,8 @@ public class SpedizioneViewModel {
private void deleteLU(Runnable onComplete) {
- this.mColliSpedizioneRESTConsumer.deleteUDS(
- new DeleteUDSRequestDTO()
+ this.mColliMagazzinoRESTConsumer.deleteUL(
+ new DeleteULRequestDTO()
.setMtbColt(this.mCurrentMtbColt),
onComplete, this::sendError);
}
@@ -1608,10 +1604,10 @@ public class SpedizioneViewModel {
return;
}
- var printUDSRequestDto = new PrintUDSRequestDTO()
+ var printUDSRequestDto = new PrintULRequestDTO()
.setMtbColts(mtbColtsToPrint);
- this.mColliSpedizioneRESTConsumer.printUDS(printUDSRequestDto, onComplete,
+ this.mColliMagazzinoRESTConsumer.printUL(printUDSRequestDto, onComplete,
ex -> this.sendLUPrintError(ex, onComplete));
});