Compare commits
61 Commits
v1.33.06(3
...
v1.34.06(3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d9e33464a | |||
| ab74a9cbad | |||
| d56dcc0ed2 | |||
| 7e73aceeb7 | |||
| d63c80d6b7 | |||
| bc9016cf93 | |||
| ff128a1de2 | |||
| fa6ad5a150 | |||
| a8aaf69c57 | |||
| 9c86598f03 | |||
| 031cbc8d0a | |||
| df63fbe4af | |||
| 1372e831f7 | |||
| c31700d9cb | |||
| e6ecebd49a | |||
| dfec2f2bd3 | |||
| 3d425b6b02 | |||
| 318a8f645e | |||
| 8ec314044f | |||
| 2965b18a5f | |||
| 24f6341ff6 | |||
| 589a179a1b | |||
| afc2aef691 | |||
| 19e4a14c95 | |||
| 8237466adf | |||
| 3c1471ee8d | |||
| 099d5fa54d | |||
| 8b04f3e696 | |||
| 04ef20c69a | |||
| d08ec43d29 | |||
| 64e5200912 | |||
| 9e79653769 | |||
| 1fee2c901a | |||
| 3713bb5e49 | |||
| fdeb98b82a | |||
| 3e68dd2d36 | |||
| 1a964d7a97 | |||
| 43df6fc9f5 | |||
| 10f7ecd79b | |||
| 9a60b1ff86 | |||
| 386d51ffd7 | |||
| d3804a4601 | |||
| 04720c1d97 | |||
| 0826aa0445 | |||
| 7ceb51a54b | |||
| e8351ca75b | |||
| f8ceb1fb2d | |||
| 4ef49f3523 | |||
| 21ed15a2ea | |||
| aacec1dfde | |||
| ac7e0443a6 | |||
| 4bbb0d5cbb | |||
| 05c28d62d8 | |||
| bf2ac81ab8 | |||
| 17a78ef044 | |||
| 3c78c2787a | |||
| c7358b536e | |||
| 4f9fe14f7e | |||
| 0934765176 | |||
| b7d3cb18b9 | |||
| da3c9eae6e |
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<runningDeviceTargetSelectedWithDropDown>
|
||||||
|
<Target>
|
||||||
|
<type value="RUNNING_DEVICE_TARGET" />
|
||||||
|
<deviceKey>
|
||||||
|
<Key>
|
||||||
|
<type value="SERIAL_NUMBER" />
|
||||||
|
<value value="20119B1E55" />
|
||||||
|
</Key>
|
||||||
|
</deviceKey>
|
||||||
|
</Target>
|
||||||
|
</runningDeviceTargetSelectedWithDropDown>
|
||||||
|
<timeTargetWasSelectedWithDropDown value="2023-07-21T16:48:48.955374400Z" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
10
.idea/migrations.xml
generated
Normal file
10
.idea/migrations.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 377
|
def appVersionCode = 390
|
||||||
def appVersionName = '1.33.06 '
|
def appVersionName = '1.34.06'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
|
|
||||||
import androidx.core.os.HandlerCompat;
|
import androidx.core.os.HandlerCompat;
|
||||||
|
|
||||||
@@ -22,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.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
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.ColliLavorazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||||
@@ -72,7 +72,7 @@ public class MainApplicationModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
public Handler providesMainThreadHandler() {
|
public Handler providesMainThreadHandler() {
|
||||||
return HandlerCompat.createAsync(Looper.getMainLooper());
|
return HandlerCompat.createAsync(mApplication.getApplicationContext().getMainLooper());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -257,6 +257,12 @@ public class MainApplicationModule {
|
|||||||
return new DocumentRESTConsumer();
|
return new DocumentRESTConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliAccettazioneRESTConsumer provideColliAccettazioneRESTConsumer() {
|
||||||
|
return new ColliAccettazioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
|
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||||
@@ -76,6 +77,8 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract RawDao rawDao();
|
||||||
|
|
||||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||||
|
|
||||||
public abstract GrigliaDao grigliaDao();
|
public abstract GrigliaDao grigliaDao();
|
||||||
@@ -93,6 +96,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
public abstract InventarioRowDao inventarioRowDao();
|
public abstract InventarioRowDao inventarioRowDao();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(SupportSQLiteDatabase database) {
|
public void migrate(SupportSQLiteDatabase database) {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||||
@@ -53,7 +54,11 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
@Provides
|
||||||
|
RawDao providesRawDao(AppDatabase appDatabase) {
|
||||||
|
return appDatabase.rawDao();
|
||||||
|
}
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
@@ -104,12 +109,6 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowMapper providesInventarioRowMapper() {
|
InventarioRowMapper providesInventarioRowMapper() {
|
||||||
@@ -123,62 +122,50 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
||||||
return new InventarioLocalDataSource(executorService, inventarioDao);
|
return new InventarioLocalDataSource(executorService, inventarioDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
||||||
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
||||||
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
||||||
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
||||||
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
||||||
return new OrdineDataSource(executorService, handler, ordineDao);
|
return new OrdineDataSource(executorService, handler, ordineDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
||||||
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
||||||
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
||||||
InventarioLocalDataSource inventarioLocalDataSource,
|
InventarioLocalDataSource inventarioLocalDataSource,
|
||||||
@@ -187,7 +174,6 @@ public class RoomModule {
|
|||||||
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler, executorService);
|
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler, executorService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
||||||
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||||
|
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.RawQuery;
|
||||||
|
import androidx.sqlite.db.SupportSQLiteQuery;
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface RawDao {
|
||||||
|
|
||||||
|
@RawQuery
|
||||||
|
int vacuumDb(SupportSQLiteQuery supportSQLiteQuery);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -259,7 +259,7 @@ public class ArticoloOrdine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float getCnfDaRic() {
|
public float getCnfDaRic() {
|
||||||
return qtaCnf > 0.f ? merceDaRic * qtaCnf : 0;
|
return qtaCnf > 0.f ? merceDaRic / qtaCnf : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkQtaProposta() {
|
public int checkQtaProposta() {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
||||||
import it.integry.integrywmsnative.core.model.MtbInvent;
|
import it.integry.integrywmsnative.core.model.MtbInvent;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
||||||
|
|
||||||
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
||||||
@@ -62,16 +63,20 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
|||||||
try {
|
try {
|
||||||
var startRetrieve = new Date();
|
var startRetrieve = new Date();
|
||||||
var remoteData = remoteDataSource.makeSynchronousRetrieveRequest();
|
var remoteData = remoteDataSource.makeSynchronousRetrieveRequest();
|
||||||
Log.d("Timing [INVENTORIES RETRIEVE]", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
Log.d("Time INVENTORY RETRIEVE", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
||||||
|
|
||||||
if (remoteData == null) remoteData = new ArrayList<>();
|
if (remoteData == null) remoteData = new ArrayList<>();
|
||||||
|
|
||||||
resolveFetch(remoteData, internalLiveData.getValue(),
|
List<MtbInvent> finalRemoteData = remoteData;
|
||||||
|
|
||||||
|
resolveFetch(finalRemoteData, internalLiveData.getValue(),
|
||||||
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
||||||
(remoteItem, localItem) -> {
|
(remoteItem, localItem) -> {
|
||||||
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
||||||
remoteItem.setNew(false);
|
remoteItem.setNew(false);
|
||||||
}, onComplete, onError);
|
}, () -> handler.post(onComplete), ex -> handler.post(() -> onError.run(ex)),
|
||||||
|
SettingsManager.iDB().isFlagIsInventarioCacheEnabled());
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
onError.run(e);
|
onError.run(e);
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ public abstract class _BaseRepository<
|
|||||||
RunnableArgssWithReturn<B, B, Boolean> keyComparator,
|
RunnableArgssWithReturn<B, B, Boolean> keyComparator,
|
||||||
RunnableArgss<B, B> dataCopy,
|
RunnableArgss<B, B> dataCopy,
|
||||||
Runnable onComplete,
|
Runnable onComplete,
|
||||||
RunnableArgs<Exception> onError) {
|
RunnableArgs<Exception> onError,
|
||||||
|
boolean isCacheEnabled) {
|
||||||
List<B> finalRemoteData = dataMapper.mapRestsToRooms(remoteData);
|
List<B> finalRemoteData = dataMapper.mapRestsToRooms(remoteData);
|
||||||
|
|
||||||
if (localData == null) localData = new ArrayList<>();
|
if (localData == null) localData = new ArrayList<>();
|
||||||
@@ -53,12 +54,14 @@ public abstract class _BaseRepository<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var dataToUpdate = finalRemoteData.stream()
|
var dataToUpdate = finalRemoteData.stream()
|
||||||
.filter(x -> x.getId() != null && finalLocalData.stream().noneMatch(x::equals))
|
.filter(x -> x.getId() != null && finalLocalData.stream().noneMatch(x::equals))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
var dataToDelete = finalLocalData.stream()
|
var dataToDelete = finalLocalData.stream()
|
||||||
.filter(x -> finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
.filter(x -> (!isCacheEnabled || x.isSyncronized()) && finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
var dataToInsert = finalRemoteData.stream()
|
var dataToInsert = finalRemoteData.stream()
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class BaseDialogFragment extends DialogFragment implements DialogInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -865,4 +865,262 @@ public class MtbAart extends EntityBase {
|
|||||||
public MtbUntMis getFirstUntMis() {
|
public MtbUntMis getFirstUntMis() {
|
||||||
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
MtbAart mtbAart = (MtbAart) o;
|
||||||
|
|
||||||
|
if (!getCodMart().equals(mtbAart.getCodMart())) return false;
|
||||||
|
if (getDescrizione() != null ? !getDescrizione().equals(mtbAart.getDescrizione()) : mtbAart.getDescrizione() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis() != null ? !getUntMis().equals(mtbAart.getUntMis()) : mtbAart.getUntMis() != null)
|
||||||
|
return false;
|
||||||
|
if (getBarCode() != null ? !getBarCode().equals(mtbAart.getBarCode()) : mtbAart.getBarCode() != null)
|
||||||
|
return false;
|
||||||
|
if (getPesoKg() != null ? !getPesoKg().equals(mtbAart.getPesoKg()) : mtbAart.getPesoKg() != null)
|
||||||
|
return false;
|
||||||
|
if (getQtaCnf() != null ? !getQtaCnf().equals(mtbAart.getQtaCnf()) : mtbAart.getQtaCnf() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodAliq() != null ? !getCodAliq().equals(mtbAart.getCodAliq()) : mtbAart.getCodAliq() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodScoArt() != null ? !getCodScoArt().equals(mtbAart.getCodScoArt()) : mtbAart.getCodScoArt() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodTcolUi() != null ? !getCodTcolUi().equals(mtbAart.getCodTcolUi()) : mtbAart.getCodTcolUi() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodTcolUl() != null ? !getCodTcolUl().equals(mtbAart.getCodTcolUl()) : mtbAart.getCodTcolUl() != null)
|
||||||
|
return false;
|
||||||
|
if (getArticoloComposto() != null ? !getArticoloComposto().equals(mtbAart.getArticoloComposto()) : mtbAart.getArticoloComposto() != null)
|
||||||
|
return false;
|
||||||
|
if (getEsposizioneComp() != null ? !getEsposizioneComp().equals(mtbAart.getEsposizioneComp()) : mtbAart.getEsposizioneComp() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrizioneEstesa() != null ? !getDescrizioneEstesa().equals(mtbAart.getDescrizioneEstesa()) : mtbAart.getDescrizioneEstesa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodUltForn() != null ? !getCodUltForn().equals(mtbAart.getCodUltForn()) : mtbAart.getCodUltForn() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltCar() != null ? !getDataUltCar().equals(mtbAart.getDataUltCar()) : mtbAart.getDataUltCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getValUltCar() != null ? !getValUltCar().equals(mtbAart.getValUltCar()) : mtbAart.getValUltCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodUltClie() != null ? !getCodUltClie().equals(mtbAart.getCodUltClie()) : mtbAart.getCodUltClie() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltScar() != null ? !getDataUltScar().equals(mtbAart.getDataUltScar()) : mtbAart.getDataUltScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getValUltScar() != null ? !getValUltScar().equals(mtbAart.getValUltScar()) : mtbAart.getValUltScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getTipoCodice() != null ? !getTipoCodice().equals(mtbAart.getTipoCodice()) : mtbAart.getTipoCodice() != null)
|
||||||
|
return false;
|
||||||
|
if (getNote() != null ? !getNote().equals(mtbAart.getNote()) : mtbAart.getNote() != null)
|
||||||
|
return false;
|
||||||
|
if (getPosizione() != null ? !getPosizione().equals(mtbAart.getPosizione()) : mtbAart.getPosizione() != null)
|
||||||
|
return false;
|
||||||
|
if (getColliPedana() != null ? !getColliPedana().equals(mtbAart.getColliPedana()) : mtbAart.getColliPedana() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis2() != null ? !getUntMis2().equals(mtbAart.getUntMis2()) : mtbAart.getUntMis2() != null)
|
||||||
|
return false;
|
||||||
|
if (getRapConv2() != null ? !getRapConv2().equals(mtbAart.getRapConv2()) : mtbAart.getRapConv2() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagInclListino() != null ? !getFlagInclListino().equals(mtbAart.getFlagInclListino()) : mtbAart.getFlagInclListino() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis3() != null ? !getUntMis3().equals(mtbAart.getUntMis3()) : mtbAart.getUntMis3() != null)
|
||||||
|
return false;
|
||||||
|
if (getRapConv3() != null ? !getRapConv3().equals(mtbAart.getRapConv3()) : mtbAart.getRapConv3() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMartStat() != null ? !getCodMartStat().equals(mtbAart.getCodMartStat()) : mtbAart.getCodMartStat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMcon() != null ? !getCodMcon().equals(mtbAart.getCodMcon()) : mtbAart.getCodMcon() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMgrp() != null ? !getCodMgrp().equals(mtbAart.getCodMgrp()) : mtbAart.getCodMgrp() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMsfa() != null ? !getCodMsfa().equals(mtbAart.getCodMsfa()) : mtbAart.getCodMsfa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMsgr() != null ? !getCodMsgr().equals(mtbAart.getCodMsgr()) : mtbAart.getCodMsgr() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMstp() != null ? !getCodMstp().equals(mtbAart.getCodMstp()) : mtbAart.getCodMstp() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMtip() != null ? !getCodMtip().equals(mtbAart.getCodMtip()) : mtbAart.getCodMtip() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrizioneStat() != null ? !getDescrizioneStat().equals(mtbAart.getDescrizioneStat()) : mtbAart.getDescrizioneStat() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagStato() != null ? !getFlagStato().equals(mtbAart.getFlagStato()) : mtbAart.getFlagStato() != null)
|
||||||
|
return false;
|
||||||
|
if (getCambioDiviCar() != null ? !getCambioDiviCar().equals(mtbAart.getCambioDiviCar()) : mtbAart.getCambioDiviCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCambioDiviScar() != null ? !getCambioDiviScar().equals(mtbAart.getCambioDiviScar()) : mtbAart.getCambioDiviScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getGgScadPartita() != null ? !getGgScadPartita().equals(mtbAart.getGgScadPartita()) : mtbAart.getGgScadPartita() != null)
|
||||||
|
return false;
|
||||||
|
if (getVolumeMc() != null ? !getVolumeMc().equals(mtbAart.getVolumeMc()) : mtbAart.getVolumeMc() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagEsponiPrz() != null ? !getFlagEsponiPrz().equals(mtbAart.getFlagEsponiPrz()) : mtbAart.getFlagEsponiPrz() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltVar() != null ? !getDataUltVar().equals(mtbAart.getDataUltVar()) : mtbAart.getDataUltVar() != null)
|
||||||
|
return false;
|
||||||
|
if (getPercSfrido() != null ? !getPercSfrido().equals(mtbAart.getPercSfrido()) : mtbAart.getPercSfrido() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodBarreImb() != null ? !getCodBarreImb().equals(mtbAart.getCodBarreImb()) : mtbAart.getCodBarreImb() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagCalcPrz() != null ? !getFlagCalcPrz().equals(mtbAart.getFlagCalcPrz()) : mtbAart.getFlagCalcPrz() != null)
|
||||||
|
return false;
|
||||||
|
if (getEsposizioneCompAcq() != null ? !getEsposizioneCompAcq().equals(mtbAart.getEsposizioneCompAcq()) : mtbAart.getEsposizioneCompAcq() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagCalcPrzAcq() != null ? !getFlagCalcPrzAcq().equals(mtbAart.getFlagCalcPrzAcq()) : mtbAart.getFlagCalcPrzAcq() != null)
|
||||||
|
return false;
|
||||||
|
if (getDiacod() != null ? !getDiacod().equals(mtbAart.getDiacod()) : mtbAart.getDiacod() != null)
|
||||||
|
return false;
|
||||||
|
if (getPlu() != null ? !getPlu().equals(mtbAart.getPlu()) : mtbAart.getPlu() != null)
|
||||||
|
return false;
|
||||||
|
if (getPartIvaProd() != null ? !getPartIvaProd().equals(mtbAart.getPartIvaProd()) : mtbAart.getPartIvaProd() != null)
|
||||||
|
return false;
|
||||||
|
if (getRagSocProd() != null ? !getRagSocProd().equals(mtbAart.getRagSocProd()) : mtbAart.getRagSocProd() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagRapConvVariabile() != null ? !getFlagRapConvVariabile().equals(mtbAart.getFlagRapConvVariabile()) : mtbAart.getFlagRapConvVariabile() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagMovArtMag() != null ? !getFlagMovArtMag().equals(mtbAart.getFlagMovArtMag()) : mtbAart.getFlagMovArtMag() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagTracciabilita() != null ? !getFlagTracciabilita().equals(mtbAart.getFlagTracciabilita()) : mtbAart.getFlagTracciabilita() != null)
|
||||||
|
return false;
|
||||||
|
if (getTaraKg() != null ? !getTaraKg().equals(mtbAart.getTaraKg()) : mtbAart.getTaraKg() != null)
|
||||||
|
return false;
|
||||||
|
if (getColliStrato() != null ? !getColliStrato().equals(mtbAart.getColliStrato()) : mtbAart.getColliStrato() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagQtaCnfFissa() != null ? !getFlagQtaCnfFissa().equals(mtbAart.getFlagQtaCnfFissa()) : mtbAart.getFlagQtaCnfFissa() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagColliPedanaFisso() != null ? !getFlagColliPedanaFisso().equals(mtbAart.getFlagColliPedanaFisso()) : mtbAart.getFlagColliPedanaFisso() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodCconCosti() != null ? !getCodCconCosti().equals(mtbAart.getCodCconCosti()) : mtbAart.getCodCconCosti() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodCconRicavi() != null ? !getCodCconRicavi().equals(mtbAart.getCodCconRicavi()) : mtbAart.getCodCconRicavi() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDgrpArt() != null ? !getCodDgrpArt().equals(mtbAart.getCodDgrpArt()) : mtbAart.getCodDgrpArt() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDiviCar() != null ? !getCodDiviCar().equals(mtbAart.getCodDiviCar()) : mtbAart.getCodDiviCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDiviScar() != null ? !getCodDiviScar().equals(mtbAart.getCodDiviScar()) : mtbAart.getCodDiviScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrCat() != null ? !getCodEcrCat().equals(mtbAart.getCodEcrCat()) : mtbAart.getCodEcrCat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrMcat() != null ? !getCodEcrMcat().equals(mtbAart.getCodEcrMcat()) : mtbAart.getCodEcrMcat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrRep() != null ? !getCodEcrRep().equals(mtbAart.getCodEcrRep()) : mtbAart.getCodEcrRep() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrStipo() != null ? !getCodEcrStipo().equals(mtbAart.getCodEcrStipo()) : mtbAart.getCodEcrStipo() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrTipo() != null ? !getCodEcrTipo().equals(mtbAart.getCodEcrTipo()) : mtbAart.getCodEcrTipo() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodGrpBolla() != null ? !getCodGrpBolla().equals(mtbAart.getCodGrpBolla()) : mtbAart.getCodGrpBolla() != null)
|
||||||
|
return false;
|
||||||
|
if (getIngredienti() != null ? !getIngredienti().equals(mtbAart.getIngredienti()) : mtbAart.getIngredienti() != null)
|
||||||
|
return false;
|
||||||
|
if (getIdArtEqui() != null ? !getIdArtEqui().equals(mtbAart.getIdArtEqui()) : mtbAart.getIdArtEqui() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrCassa() != null ? !getDescrCassa().equals(mtbAart.getDescrCassa()) : mtbAart.getDescrCassa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodNcIntracee() != null ? !getCodNcIntracee().equals(mtbAart.getCodNcIntracee()) : mtbAart.getCodNcIntracee() != null)
|
||||||
|
return false;
|
||||||
|
if (getMarchio() != null ? !getMarchio().equals(mtbAart.getMarchio()) : mtbAart.getMarchio() != null)
|
||||||
|
return false;
|
||||||
|
if (getSezione() != null ? !getSezione().equals(mtbAart.getSezione()) : mtbAart.getSezione() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMisRifPeso() != mtbAart.getUntMisRifPeso()) return false;
|
||||||
|
if (getQtaEsistente() != null ? !getQtaEsistente().equals(mtbAart.getQtaEsistente()) : mtbAart.getQtaEsistente() != null)
|
||||||
|
return false;
|
||||||
|
if (getQtaImpegnata() != null ? !getQtaImpegnata().equals(mtbAart.getQtaImpegnata()) : mtbAart.getQtaImpegnata() != null)
|
||||||
|
return false;
|
||||||
|
if (getNumCnfEsistente() != null ? !getNumCnfEsistente().equals(mtbAart.getNumCnfEsistente()) : mtbAart.getNumCnfEsistente() != null)
|
||||||
|
return false;
|
||||||
|
if (getNumCnfImpegnata() != null ? !getNumCnfImpegnata().equals(mtbAart.getNumCnfImpegnata()) : mtbAart.getNumCnfImpegnata() != null)
|
||||||
|
return false;
|
||||||
|
return getMtbUntMis() != null ? getMtbUntMis().equals(mtbAart.getMtbUntMis()) : mtbAart.getMtbUntMis() == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = getCodMart().hashCode();
|
||||||
|
result = 31 * result + (getDescrizione() != null ? getDescrizione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis() != null ? getUntMis().hashCode() : 0);
|
||||||
|
result = 31 * result + (getBarCode() != null ? getBarCode().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPesoKg() != null ? getPesoKg().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaCnf() != null ? getQtaCnf().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodAliq() != null ? getCodAliq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodScoArt() != null ? getCodScoArt().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodTcolUi() != null ? getCodTcolUi().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodTcolUl() != null ? getCodTcolUl().hashCode() : 0);
|
||||||
|
result = 31 * result + (getArticoloComposto() != null ? getArticoloComposto().hashCode() : 0);
|
||||||
|
result = 31 * result + (getEsposizioneComp() != null ? getEsposizioneComp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrizioneEstesa() != null ? getDescrizioneEstesa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodUltForn() != null ? getCodUltForn().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltCar() != null ? getDataUltCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getValUltCar() != null ? getValUltCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodUltClie() != null ? getCodUltClie().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltScar() != null ? getDataUltScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getValUltScar() != null ? getValUltScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getTipoCodice() != null ? getTipoCodice().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNote() != null ? getNote().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPosizione() != null ? getPosizione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getColliPedana() != null ? getColliPedana().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis2() != null ? getUntMis2().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRapConv2() != null ? getRapConv2().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagInclListino() != null ? getFlagInclListino().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis3() != null ? getUntMis3().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRapConv3() != null ? getRapConv3().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMartStat() != null ? getCodMartStat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMcon() != null ? getCodMcon().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMgrp() != null ? getCodMgrp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMsfa() != null ? getCodMsfa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMsgr() != null ? getCodMsgr().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMstp() != null ? getCodMstp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMtip() != null ? getCodMtip().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrizioneStat() != null ? getDescrizioneStat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagStato() != null ? getFlagStato().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCambioDiviCar() != null ? getCambioDiviCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCambioDiviScar() != null ? getCambioDiviScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getGgScadPartita() != null ? getGgScadPartita().hashCode() : 0);
|
||||||
|
result = 31 * result + (getVolumeMc() != null ? getVolumeMc().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagEsponiPrz() != null ? getFlagEsponiPrz().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltVar() != null ? getDataUltVar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPercSfrido() != null ? getPercSfrido().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodBarreImb() != null ? getCodBarreImb().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagCalcPrz() != null ? getFlagCalcPrz().hashCode() : 0);
|
||||||
|
result = 31 * result + (getEsposizioneCompAcq() != null ? getEsposizioneCompAcq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagCalcPrzAcq() != null ? getFlagCalcPrzAcq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDiacod() != null ? getDiacod().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPlu() != null ? getPlu().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPartIvaProd() != null ? getPartIvaProd().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRagSocProd() != null ? getRagSocProd().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagRapConvVariabile() != null ? getFlagRapConvVariabile().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagMovArtMag() != null ? getFlagMovArtMag().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagTracciabilita() != null ? getFlagTracciabilita().hashCode() : 0);
|
||||||
|
result = 31 * result + (getTaraKg() != null ? getTaraKg().hashCode() : 0);
|
||||||
|
result = 31 * result + (getColliStrato() != null ? getColliStrato().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagQtaCnfFissa() != null ? getFlagQtaCnfFissa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagColliPedanaFisso() != null ? getFlagColliPedanaFisso().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodCconCosti() != null ? getCodCconCosti().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodCconRicavi() != null ? getCodCconRicavi().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDgrpArt() != null ? getCodDgrpArt().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDiviCar() != null ? getCodDiviCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDiviScar() != null ? getCodDiviScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrCat() != null ? getCodEcrCat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrMcat() != null ? getCodEcrMcat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrRep() != null ? getCodEcrRep().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrStipo() != null ? getCodEcrStipo().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrTipo() != null ? getCodEcrTipo().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodGrpBolla() != null ? getCodGrpBolla().hashCode() : 0);
|
||||||
|
result = 31 * result + (getIngredienti() != null ? getIngredienti().hashCode() : 0);
|
||||||
|
result = 31 * result + (getIdArtEqui() != null ? getIdArtEqui().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrCassa() != null ? getDescrCassa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodNcIntracee() != null ? getCodNcIntracee().hashCode() : 0);
|
||||||
|
result = 31 * result + (getMarchio() != null ? getMarchio().hashCode() : 0);
|
||||||
|
result = 31 * result + (getSezione() != null ? getSezione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMisRifPeso() != null ? getUntMisRifPeso().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaEsistente() != null ? getQtaEsistente().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaImpegnata() != null ? getQtaImpegnata().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNumCnfEsistente() != null ? getNumCnfEsistente().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNumCnfImpegnata() != null ? getNumCnfImpegnata().hashCode() : 0);
|
||||||
|
result = 31 * result + (getMtbUntMis() != null ? getMtbUntMis().hashCode() : 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
public class MtbAartWithFornitore extends MtbAart {
|
|
||||||
|
|
||||||
private String codArtFor;
|
|
||||||
|
|
||||||
public String getCodArtFor() {
|
|
||||||
return codArtFor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbAartWithFornitore setCodArtFor(String codArtFor) {
|
|
||||||
this.codArtFor = codArtFor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -97,30 +97,22 @@ public class MtbColt extends EntityBase {
|
|||||||
|
|
||||||
String codAnagToUse = null;
|
String codAnagToUse = null;
|
||||||
switch (gestioneEnum) {
|
switch (gestioneEnum) {
|
||||||
case ACQUISTO:
|
case ACQUISTO, LAVORAZIONE, PRODUZIONE -> {
|
||||||
case LAVORAZIONE:
|
|
||||||
case PRODUZIONE:
|
|
||||||
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
||||||
|
|
||||||
Optional<InternalCodAnagsDTO> optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
Optional<InternalCodAnagsDTO> optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
||||||
.filter(InternalCodAnagsDTO::isFornitore)
|
.filter(InternalCodAnagsDTO::isFornitore)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (optCodAnagForn.isEmpty()) break;
|
if (optCodAnagForn.isEmpty()) break;
|
||||||
|
|
||||||
codAnagToUse = optCodAnagForn.get().getCodAnag();
|
codAnagToUse = optCodAnagForn.get().getCodAnag();
|
||||||
break;
|
}
|
||||||
case VENDITA:
|
case VENDITA -> {
|
||||||
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
||||||
|
|
||||||
Optional<InternalCodAnagsDTO> optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
Optional<InternalCodAnagsDTO> optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
||||||
.filter(InternalCodAnagsDTO::isCliente)
|
.filter(InternalCodAnagsDTO::isCliente)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (optCodAnagClie.isEmpty()) break;
|
if (optCodAnagClie.isEmpty()) break;
|
||||||
|
|
||||||
codAnagToUse = optCodAnagClie.get().getCodAnag();
|
codAnagToUse = optCodAnagClie.get().getCodAnag();
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setCodAnag(codAnagToUse);
|
setCodAnag(codAnagToUse);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import com.annimon.stream.Collectors;
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
@@ -19,6 +18,7 @@ import it.integry.integrywmsnative.core.model.MtbUntMis;
|
|||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@@ -59,14 +59,16 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public static void getByCodMartsStatic(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void getByCodMartsStatic(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String joinedCods = Stream.of(codMartToFind)
|
var codMarts = Stream.of(codMartToFind)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
.distinct()
|
.distinct().toList();
|
||||||
.collect(Collectors.joining(","));
|
|
||||||
|
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(joinedCods).enqueue(new Callback<>() {
|
articoloRESTConsumer
|
||||||
|
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
||||||
|
.setCodMarts(codMarts))
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||||
@@ -103,7 +105,10 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<>() {
|
articoloRESTConsumer.getByCodMart(
|
||||||
|
new RetrieveArticoloByCodMartRequestDTO()
|
||||||
|
.setCodMarts(Collections.singletonList(codMartToFind)))
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
import retrofit2.http.Query;
|
import retrofit2.http.Query;
|
||||||
@@ -16,8 +18,8 @@ public interface ArticoloRESTConsumerService {
|
|||||||
@POST("SM2getArticoloByBarcode")
|
@POST("SM2getArticoloByBarcode")
|
||||||
Call<ServiceRESTResponse<MtbAart>> getByBarcodeProd(@Query("barcode") String barcodeProd);
|
Call<ServiceRESTResponse<MtbAart>> getByBarcodeProd(@Query("barcode") String barcodeProd);
|
||||||
|
|
||||||
@GET("SM2getArticoloByCodMart")
|
@POST("wms/articolo/retrieveByCodMart")
|
||||||
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Query("codMart") String barcodeProd);
|
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest);
|
||||||
|
|
||||||
@GET("getProductLotStatus")
|
@GET("getProductLotStatus")
|
||||||
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
||||||
|
|||||||
@@ -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<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/closeUDC", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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<ServiceRESTResponse<CreateUDCResponseDTO>> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/closeUDC")
|
||||||
|
Call<ServiceRESTResponse<CloseUDCResponseDTO>> closeUDC(@Body CloseUDCRequestDTO closeUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/insertUDCRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/editUDCRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDCRowResponseDTO>> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/deleteUDCRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,28 +6,107 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
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.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
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.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
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.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
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.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliScaricoRESTConsumerInterface {
|
public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface, ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/closeUDC", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
@@ -64,63 +143,6 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/canUDSBeDeleted", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/deleteUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.printUDS(printUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/printUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
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<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +1,58 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
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.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
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.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
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.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
public interface ColliLavorazioneRESTConsumerService {
|
public interface ColliLavorazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDC")
|
||||||
|
Call<ServiceRESTResponse<CreateUDCResponseDTO>> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/createUDS")
|
@POST("wms/lavorazione/createUDS")
|
||||||
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/closeUDC")
|
||||||
|
Call<ServiceRESTResponse<CloseUDCResponseDTO>> closeUDC(@Body CloseUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/closeUDS")
|
@POST("wms/lavorazione/closeUDS")
|
||||||
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/canUDSBeDeleted")
|
@POST("wms/lavorazione/insertUDCRow")
|
||||||
Call<ServiceRESTResponse<Boolean>> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
|
Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/deleteUDS")
|
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/lavorazione/printUDS")
|
|
||||||
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/lavorazione/insertUDSRow")
|
@POST("wms/lavorazione/insertUDSRow")
|
||||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/editUDCRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDCRowResponseDTO>> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/editUDSRow")
|
@POST("wms/lavorazione/editUDSRow")
|
||||||
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/deleteUDSRow")
|
@POST("wms/lavorazione/deleteUDSRow")
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/deleteUDCRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
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.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -58,7 +61,9 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
||||||
mtbColtToSave.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
mtbColtToSaveClone.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
mtbColtToSaveClone.setOnlyPkMaster(false);
|
||||||
|
|
||||||
|
|
||||||
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
@@ -269,14 +274,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> 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<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
||||||
@@ -449,52 +446,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canLUBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
HashMap<String, Object> 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<ArrayList<MtbColt>>() {
|
|
||||||
}.getType();
|
|
||||||
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
|
|
||||||
onComplete.run(data != null && data.size() > 0);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
@@ -698,4 +649,66 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
onComplete.run(data.get(0));
|
onComplete.run(data.get(0));
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void canULBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
CanULBeDeletedRequestDTO canULBeDeletedRequestDTO = new CanULBeDeletedRequestDTO()
|
||||||
|
.setMtbColt(mtbColt);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.canULBeDeleted(canULBeDeletedRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
analyzeAnswer(response, "generic/canULBeDeleted", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUL(DeleteULRequestDTO deleteULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.deleteUL(deleteULRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "generic/deleteUL", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printUL(PrintULRequestDTO printULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.printUL(printULRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "generic/printUL", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
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.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
@@ -43,4 +46,14 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/confirmGiacenzaUL")
|
@POST("wms/confirmGiacenzaUL")
|
||||||
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
|
||||||
|
@POST("wms/generic/canULBeDeleted")
|
||||||
|
Call<ServiceRESTResponse<Boolean>> canULBeDeleted(@Body CanULBeDeletedRequestDTO canULBeDeletedRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/generic/deleteUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUL(@Body DeleteULRequestDTO deleteULRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/generic/printUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> printUL(@Body PrintULRequestDTO printULRequestDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,18 +8,15 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
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.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
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.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
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.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
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.EditUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
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.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
@@ -64,60 +61,6 @@ public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements Co
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliSpedizioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
|
||||||
analyzeAnswer(response, "spedizione/canUDSBeDeleted", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliSpedizioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "spedizione/deleteUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliSpedizioneRESTConsumerService.printUDS(printUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "spedizione/printUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
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.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
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.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
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.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
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.EditUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
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.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
@@ -25,14 +23,8 @@ public interface ColliSpedizioneRESTConsumerService {
|
|||||||
@POST("wms/spedizione/closeUDS")
|
@POST("wms/spedizione/closeUDS")
|
||||||
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
@POST("wms/spedizione/canUDSBeDeleted")
|
|
||||||
Call<ServiceRESTResponse<Boolean>> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/spedizione/deleteUDS")
|
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/spedizione/printUDS")
|
@POST("wms/spedizione/printUDS")
|
||||||
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
|
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintULRequestDTO printULRequestDTO);
|
||||||
|
|
||||||
@POST("wms/spedizione/insertUDSRow")
|
@POST("wms/spedizione/insertUDSRow")
|
||||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class InventarioRESTConsumer extends _BaseRESTConsumer {
|
|||||||
var request = new InsertInventarioRequestDTO()
|
var request = new InsertInventarioRequestDTO()
|
||||||
.setMtbInvent(inventarioToInsert);
|
.setMtbInvent(inventarioToInsert);
|
||||||
|
|
||||||
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 120);
|
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 300);
|
||||||
inventarioRESTConsumerService
|
inventarioRESTConsumerService
|
||||||
.insert(inventarioToInsert.getIdInventario(), request)
|
.insert(inventarioToInsert.getIdInventario(), request)
|
||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
|
|||||||
@@ -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<MtbColt> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
}
|
||||||
@@ -3,15 +3,12 @@ package it.integry.integrywmsnative.core.rest.consumers.interfaces;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
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.CloseUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
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.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
|
|
||||||
public interface ColliScaricoRESTConsumerInterface {
|
public interface ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
@@ -19,12 +16,6 @@ public interface ColliScaricoRESTConsumerInterface {
|
|||||||
|
|
||||||
void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ public class Ean128Model {
|
|||||||
public String InternalPart;
|
public String InternalPart;
|
||||||
|
|
||||||
///<summary>Informazioni interne</summary>
|
///<summary>Informazioni interne</summary>
|
||||||
public String Internal1;
|
public String Internal1; //USED FOR COD_MART
|
||||||
|
|
||||||
///<summary>Informazioni interne</summary>
|
///<summary>Informazioni interne</summary>
|
||||||
public String Internal2;
|
public String Internal2;
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RetrieveArticoloByCodMartRequestDTO {
|
||||||
|
|
||||||
|
private List<String> codMarts;
|
||||||
|
|
||||||
|
public List<String> getCodMarts() {
|
||||||
|
return codMarts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveArticoloByCodMartRequestDTO setCodMarts(List<String> codMarts) {
|
||||||
|
this.codMarts = codMarts;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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<CreateUDCRequestOrderDTO> 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<CreateUDCRequestOrderDTO> getOrders() {
|
||||||
|
return orders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setOrders(List<CreateUDCRequestOrderDTO> orders) {
|
||||||
|
this.orders = orders;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class CanUDSBeDeletedRequestDTO {
|
public class CanULBeDeletedRequestDTO {
|
||||||
|
|
||||||
|
|
||||||
private MtbColt mtbColt;
|
private MtbColt mtbColt;
|
||||||
@@ -11,7 +11,7 @@ public class CanUDSBeDeletedRequestDTO {
|
|||||||
return mtbColt;
|
return mtbColt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CanUDSBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
|
public CanULBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
this.mtbColt = mtbColt;
|
this.mtbColt = mtbColt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class DeleteUDSRequestDTO {
|
public class DeleteULRequestDTO {
|
||||||
|
|
||||||
private MtbColt mtbColt;
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ public class DeleteUDSRequestDTO {
|
|||||||
return mtbColt;
|
return mtbColt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeleteUDSRequestDTO setMtbColt(MtbColt mtbColt) {
|
public DeleteULRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
this.mtbColt = mtbColt;
|
this.mtbColt = mtbColt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class PrintUDSRequestDTO {
|
public class PrintULRequestDTO {
|
||||||
|
|
||||||
private List<MtbColt> mtbColts;
|
private List<MtbColt> mtbColts;
|
||||||
|
|
||||||
@@ -12,8 +13,14 @@ public class PrintUDSRequestDTO {
|
|||||||
return mtbColts;
|
return mtbColts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrintUDSRequestDTO setMtbColts(List<MtbColt> mtbColts) {
|
public PrintULRequestDTO setMtbColts(List<MtbColt> mtbColts) {
|
||||||
this.mtbColts = mtbColts;
|
this.mtbColts = mtbColts;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PrintULRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColts = new ArrayList<>(1);
|
||||||
|
this.mtbColts.add(mtbColt);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -61,6 +61,7 @@ public class DBSettingsModel {
|
|||||||
private boolean flagShouldAskToCreateOrUpdateRowInventario = false;
|
private boolean flagShouldAskToCreateOrUpdateRowInventario = false;
|
||||||
private String commessaMagazzino;
|
private String commessaMagazzino;
|
||||||
private boolean flagGeneraDocumentoSpedizione = false;
|
private boolean flagGeneraDocumentoSpedizione = false;
|
||||||
|
private boolean flagIsInventarioCacheEnabled = false;
|
||||||
|
|
||||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||||
return flagSpedizioneEnableFakeGiacenza;
|
return flagSpedizioneEnableFakeGiacenza;
|
||||||
@@ -476,4 +477,13 @@ public class DBSettingsModel {
|
|||||||
this.flagGeneraDocumentoSpedizione = flagGeneraDocumentoSpedizione;
|
this.flagGeneraDocumentoSpedizione = flagGeneraDocumentoSpedizione;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagIsInventarioCacheEnabled() {
|
||||||
|
return flagIsInventarioCacheEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagIsInventarioCacheEnabled(boolean flagIsInventarioCacheEnabled) {
|
||||||
|
this.flagIsInventarioCacheEnabled = flagIsInventarioCacheEnabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -376,6 +376,10 @@ public class SettingsManager {
|
|||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("INVENTARIO")
|
.setSection("INVENTARIO")
|
||||||
.setKeySection("FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW"));
|
.setKeySection("FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW"));
|
||||||
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("INVENTARIO")
|
||||||
|
.setKeySection("ENABLE_OFFLINE_CACHE"));
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
@@ -424,6 +428,7 @@ public class SettingsManager {
|
|||||||
dbSettingsModelIstance.setFlagShouldAskToCreateOrUpdateRowInventario(getValueFromList(list, "INVENTARIO", "FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW", Boolean.class, Boolean.FALSE));
|
dbSettingsModelIstance.setFlagShouldAskToCreateOrUpdateRowInventario(getValueFromList(list, "INVENTARIO", "FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW", Boolean.class, Boolean.FALSE));
|
||||||
dbSettingsModelIstance.setCommessaMagazzino(getValueFromList(list, "SETUP", "COMMESSA_MAGAZZINO", String.class, CommonConst.Config.COMMESSA_MAG));
|
dbSettingsModelIstance.setCommessaMagazzino(getValueFromList(list, "SETUP", "COMMESSA_MAGAZZINO", String.class, CommonConst.Config.COMMESSA_MAG));
|
||||||
dbSettingsModelIstance.setFlagGeneraDocumentoSpedizione(getValueFromList(list, "SPEDIZIONE", "GENERA_DOC", Boolean.class, Boolean.FALSE));
|
dbSettingsModelIstance.setFlagGeneraDocumentoSpedizione(getValueFromList(list, "SPEDIZIONE", "GENERA_DOC", Boolean.class, Boolean.FALSE));
|
||||||
|
dbSettingsModelIstance.setFlagIsInventarioCacheEnabled(getValueFromList(list, "INVENTARIO", "ENABLE_OFFLINE_CACHE", Boolean.class, Boolean.FALSE));
|
||||||
|
|
||||||
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
||||||
if (notePerdita != null)
|
if (notePerdita != null)
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public class UtilityExceptions {
|
|||||||
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
||||||
|
|
||||||
if (ex.getMessage() != null) {
|
if (ex.getMessage() != null) {
|
||||||
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString());
|
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString(), ex.getStackTrace());
|
||||||
} else {
|
} else {
|
||||||
Logger.e(ex, "Errore");
|
Logger.e(ex, "Errore", ex.getStackTrace());
|
||||||
}
|
}
|
||||||
|
|
||||||
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.gest.accettazione.dto;
|
package it.integry.integrywmsnative.gest.accettazione.dto;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ public class SitArtOrdDTO {
|
|||||||
private BigDecimal qtaRiservata;
|
private BigDecimal qtaRiservata;
|
||||||
private String untOrd;
|
private String untOrd;
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
private String dataOrd;
|
private LocalDate dataOrd;
|
||||||
private int numOrd;
|
private int numOrd;
|
||||||
private String gestione;
|
private String gestione;
|
||||||
private int rigaOrd;
|
private int rigaOrd;
|
||||||
@@ -168,11 +169,11 @@ public class SitArtOrdDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataOrd() {
|
public LocalDate getDataOrd() {
|
||||||
return dataOrd;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SitArtOrdDTO setDataOrd(String dataOrd) {
|
public SitArtOrdDTO setDataOrd(LocalDate dataOrd) {
|
||||||
this.dataOrd = dataOrd;
|
this.dataOrd = dataOrd;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
v -> initBottomSheetDialogFilter(filterChipDTO));
|
v -> initBottomSheetDialogFilter(filterChipDTO));
|
||||||
|
|
||||||
switch (filterChipDTO.getID()) {
|
switch (filterChipDTO.getID()) {
|
||||||
case AccettazionePickingBindings.COD_ART_FILTER_ID:
|
case AccettazionePickingBindings.COD_ART_FILTER_ID -> {
|
||||||
mAppliedFilterViewModel.getCurrentCodArtPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
mAppliedFilterViewModel.getCurrentCodArtPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -199,8 +199,8 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentCodArtPredicate().set(null));
|
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentCodArtPredicate().set(null));
|
||||||
break;
|
}
|
||||||
case AccettazionePickingBindings.DESCR_FILTER_ID:
|
case AccettazionePickingBindings.DESCR_FILTER_ID -> {
|
||||||
mAppliedFilterViewModel.getCurrentDescrPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
mAppliedFilterViewModel.getCurrentDescrPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -221,8 +221,8 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentDescrPredicate().set(null));
|
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentDescrPredicate().set(null));
|
||||||
break;
|
}
|
||||||
case AccettazionePickingBindings.POS_FILTER_ID:
|
case AccettazionePickingBindings.POS_FILTER_ID -> {
|
||||||
mAppliedFilterViewModel.getCurrentPosPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
mAppliedFilterViewModel.getCurrentPosPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -243,7 +243,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentPosPredicate().set(null));
|
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentPosPredicate().set(null));
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mBindings.filterChipsGroup.addView(filterChipView);
|
this.mBindings.filterChipsGroup.addView(filterChipView);
|
||||||
@@ -262,7 +262,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
.getFilterLayoutView();
|
.getFilterLayoutView();
|
||||||
|
|
||||||
switch (filterChipDTO.getID()) {
|
switch (filterChipDTO.getID()) {
|
||||||
case AccettazionePickingBindings.COD_ART_FILTER_ID:
|
case AccettazionePickingBindings.COD_ART_FILTER_ID ->
|
||||||
((FilterCodArtLayoutView) filterLayoutView)
|
((FilterCodArtLayoutView) filterLayoutView)
|
||||||
.setAll(mAppliedFilterViewModel.getAllCodArts())
|
.setAll(mAppliedFilterViewModel.getAllCodArts())
|
||||||
.setAvailable(mAppliedFilterViewModel.getAvailableCodArts())
|
.setAvailable(mAppliedFilterViewModel.getAvailableCodArts())
|
||||||
@@ -273,8 +273,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
mAppliedFilterViewModel.getCurrentCodArtPredicate().get())
|
mAppliedFilterViewModel.getCurrentCodArtPredicate().get())
|
||||||
.map(x -> x.getSitArtOrdDTO().getCodMart())
|
.map(x -> x.getSitArtOrdDTO().getCodMart())
|
||||||
.toList());
|
.toList());
|
||||||
break;
|
case AccettazionePickingBindings.DESCR_FILTER_ID ->
|
||||||
case AccettazionePickingBindings.DESCR_FILTER_ID:
|
|
||||||
((FilterDescrLayoutView) filterLayoutView)
|
((FilterDescrLayoutView) filterLayoutView)
|
||||||
.setAll(mAppliedFilterViewModel.getAllDescrs())
|
.setAll(mAppliedFilterViewModel.getAllDescrs())
|
||||||
.setAvailable(mAppliedFilterViewModel.getAvailableDescrs())
|
.setAvailable(mAppliedFilterViewModel.getAvailableDescrs())
|
||||||
@@ -285,8 +284,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
mAppliedFilterViewModel.getCurrentDescrPredicate().get())
|
mAppliedFilterViewModel.getCurrentDescrPredicate().get())
|
||||||
.map(x -> x.getSitArtOrdDTO().getDescrizioneEstesaArt())
|
.map(x -> x.getSitArtOrdDTO().getDescrizioneEstesaArt())
|
||||||
.toList());
|
.toList());
|
||||||
break;
|
case AccettazionePickingBindings.POS_FILTER_ID ->
|
||||||
case AccettazionePickingBindings.POS_FILTER_ID:
|
|
||||||
((FilterPosizioneLayoutView) filterLayoutView)
|
((FilterPosizioneLayoutView) filterLayoutView)
|
||||||
.setAll(mAppliedFilterViewModel.getAllPos())
|
.setAll(mAppliedFilterViewModel.getAllPos())
|
||||||
.setAvailable(mAppliedFilterViewModel.getAvailablePos())
|
.setAvailable(mAppliedFilterViewModel.getAvailablePos())
|
||||||
@@ -297,8 +295,6 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
mAppliedFilterViewModel.getCurrentPosPredicate().get())
|
mAppliedFilterViewModel.getCurrentPosPredicate().get())
|
||||||
.map(x -> x.getMtbAart().getPosizione())
|
.map(x -> x.getMtbAart().getPosizione())
|
||||||
.toList());
|
.toList());
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!filterLayoutView.isAdded())
|
if (!filterLayoutView.isAdded())
|
||||||
@@ -373,9 +369,6 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList() {
|
private void refreshList() {
|
||||||
//this.onLoadingStarted();
|
|
||||||
|
|
||||||
//new Thread(() -> {
|
|
||||||
|
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
List<PickingObjectDTO> tmpList;
|
List<PickingObjectDTO> tmpList;
|
||||||
@@ -393,7 +386,6 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
this.mAccettazioneMutableData.addAll(list);
|
this.mAccettazioneMutableData.addAll(list);
|
||||||
this.noItemsToPick.set(!isThereAnyItemToPick(tmpList));
|
this.noItemsToPick.set(!isThereAnyItemToPick(tmpList));
|
||||||
|
|
||||||
//this.onLoadingEnded();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,21 +394,11 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
.filter(x -> !x.isHidden() && UtilityBigDecimal.greaterThan(x.getSitArtOrdDTO().getQtaDaEvadere(), BigDecimal.ZERO))
|
.filter(x -> !x.isHidden() && UtilityBigDecimal.greaterThan(x.getSitArtOrdDTO().getQtaDaEvadere(), BigDecimal.ZERO))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
List<AccettazioneListModel> sortedList = null;
|
return switch (mCurrentOrderBy) {
|
||||||
|
case COD_ART_FOR -> convertDataModelToListModel__CodArtForn(tmpList);
|
||||||
switch (mCurrentOrderBy) {
|
case DESCR_ART -> convertDataModelToListModel__DescrArt(tmpList);
|
||||||
case COD_ART_FOR:
|
case RAG_SOC_COM -> convertDataModelToListModel__RagSocCom(tmpList);
|
||||||
sortedList = convertDataModelToListModel__CodArtForn(tmpList);
|
};
|
||||||
break;
|
|
||||||
case DESCR_ART:
|
|
||||||
sortedList = convertDataModelToListModel__DescrArt(tmpList);
|
|
||||||
break;
|
|
||||||
case RAG_SOC_COM:
|
|
||||||
sortedList = convertDataModelToListModel__RagSocCom(tmpList);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return sortedList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<AccettazioneListModel> convertDataModelToListModel__CodArtForn(List<PickingObjectDTO> dataList) {
|
private List<AccettazioneListModel> convertDataModelToListModel__CodArtForn(List<PickingObjectDTO> dataList) {
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import dagger.Module;
|
|||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
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.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.rest.AccettazionePickingRESTConsumer;
|
import it.integry.integrywmsnative.gest.accettazione_picking.rest.AccettazionePickingRESTConsumer;
|
||||||
@@ -25,8 +26,21 @@ public class AccettazionePickingModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
AccettazionePickingViewModel providesAccettazioneViewModel(ArticoloRESTConsumer articoloRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, AccettazionePickingRESTConsumer accettazionePickingRESTConsumer, GestSetupRESTConsumer gestSetupRESTConsumer) {
|
AccettazionePickingViewModel providesAccettazioneViewModel(
|
||||||
return new AccettazionePickingViewModel(articoloRESTConsumer, barcodeRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, accettazionePickingRESTConsumer, gestSetupRESTConsumer);
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
|
BarcodeRESTConsumer barcodeRESTConsumer,
|
||||||
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||||
|
PrinterRESTConsumer printerRESTConsumer,
|
||||||
|
AccettazionePickingRESTConsumer accettazionePickingRESTConsumer,
|
||||||
|
ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer,
|
||||||
|
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
|
||||||
|
return new AccettazionePickingViewModel(articoloRESTConsumer,
|
||||||
|
barcodeRESTConsumer,
|
||||||
|
colliMagazzinoRESTConsumer,
|
||||||
|
printerRESTConsumer,
|
||||||
|
accettazionePickingRESTConsumer,
|
||||||
|
colliAccettazioneRESTConsumer,
|
||||||
|
colliLavorazioneRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.ILUBaseOperationsListener;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUPrintListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUPrintListener;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
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.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
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.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
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.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
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.Ean13PesoModel;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
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.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
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.OrdineAccettazioneInevasoDTO;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.HistoryMtbAartDTO;
|
import it.integry.integrywmsnative.gest.accettazione_picking.dto.HistoryMtbAartDTO;
|
||||||
@@ -66,18 +74,19 @@ public class AccettazionePickingViewModel {
|
|||||||
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
|
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
|
||||||
private final PrinterRESTConsumer mPrinterRESTConsumer;
|
private final PrinterRESTConsumer mPrinterRESTConsumer;
|
||||||
private final AccettazionePickingRESTConsumer mAccettazionePickingRESTConsumer;
|
private final AccettazionePickingRESTConsumer mAccettazionePickingRESTConsumer;
|
||||||
private final GestSetupRESTConsumer mGestSetupRESTConsumer;
|
private final ColliAccettazioneRESTConsumer mColliAccettazioneRESTConsumer;
|
||||||
|
private final ColliLavorazioneRESTConsumer mColliLavorazioneRESTConsumer;
|
||||||
|
|
||||||
|
private ColliCaricoRESTConsumerInterface mColliCaricoRESTConsumer;
|
||||||
|
|
||||||
private AccettazionePickingViewModel.Listener mListener;
|
private AccettazionePickingViewModel.Listener mListener;
|
||||||
|
|
||||||
private List<OrdineAccettazioneInevasoDTO> mOrders;
|
private List<OrdineAccettazioneInevasoDTO> mOrders;
|
||||||
private List<SitArtOrdDTO> mSitArts;
|
|
||||||
private boolean mUseQtaOrd;
|
private boolean mUseQtaOrd;
|
||||||
private final MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
private final MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
||||||
|
|
||||||
private MtbColt mCurrentMtbColt = null;
|
private MtbColt mCurrentMtbColt = null;
|
||||||
private GestioneEnum defaultGestioneOfUL = null;
|
private GestioneEnum defaultGestioneOfUL = null;
|
||||||
private String mDefaultCodMdep = null;
|
|
||||||
|
|
||||||
private final List<HistoryMtbAartDTO> mHistoryUsedAarts = new ArrayList<>();
|
private final List<HistoryMtbAartDTO> mHistoryUsedAarts = new ArrayList<>();
|
||||||
|
|
||||||
@@ -87,28 +96,29 @@ public class AccettazionePickingViewModel {
|
|||||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||||
PrinterRESTConsumer printerRESTConsumer,
|
PrinterRESTConsumer printerRESTConsumer,
|
||||||
AccettazionePickingRESTConsumer accettazionePickingRESTConsumer,
|
AccettazionePickingRESTConsumer accettazionePickingRESTConsumer,
|
||||||
GestSetupRESTConsumer gestSetupRESTConsumer) {
|
ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer,
|
||||||
|
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
|
||||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||||
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||||
this.mPrinterRESTConsumer = printerRESTConsumer;
|
this.mPrinterRESTConsumer = printerRESTConsumer;
|
||||||
this.mAccettazionePickingRESTConsumer = accettazionePickingRESTConsumer;
|
this.mAccettazionePickingRESTConsumer = accettazionePickingRESTConsumer;
|
||||||
this.mGestSetupRESTConsumer = gestSetupRESTConsumer;
|
this.mColliAccettazioneRESTConsumer = colliAccettazioneRESTConsumer;
|
||||||
|
this.mColliLavorazioneRESTConsumer = colliLavorazioneRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void init(List<OrdineAccettazioneInevasoDTO> orders, List<SitArtOrdDTO> sitArts, String codMdep, boolean useQtaOrd) {
|
public void init(List<OrdineAccettazioneInevasoDTO> orders, List<SitArtOrdDTO> sitArts, String codMdep, boolean useQtaOrd) {
|
||||||
this.mOrders = orders;
|
this.mOrders = orders;
|
||||||
this.mDefaultCodMdep = codMdep;
|
|
||||||
this.mUseQtaOrd = useQtaOrd;
|
this.mUseQtaOrd = useQtaOrd;
|
||||||
|
|
||||||
this.mSitArts = Stream.of(sitArts)
|
List<SitArtOrdDTO> mSitArts = Stream.of(sitArts)
|
||||||
.filter(x -> UtilityBigDecimal.greaterThan(x.getNumCnfDaEvadere(), BigDecimal.ZERO) && UtilityBigDecimal.greaterThan(x.getQtaDaEvadere(), BigDecimal.ZERO))
|
.filter(x ->
|
||||||
|
UtilityBigDecimal.greaterThan(x.getNumCnfDaEvadere(), BigDecimal.ZERO) &&
|
||||||
|
UtilityBigDecimal.greaterThan(x.getQtaDaEvadere(), BigDecimal.ZERO))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
getEmptyPickingList(this.mSitArts, pickingObjectList -> {
|
getEmptyPickingList(mSitArts, this.mPickingList::postValue);
|
||||||
this.mPickingList.postValue(pickingObjectList);
|
|
||||||
});
|
|
||||||
|
|
||||||
//Definizione della gestione collo di default
|
//Definizione della gestione collo di default
|
||||||
Boolean isOrdTrasf = Stream.of(mOrders)
|
Boolean isOrdTrasf = Stream.of(mOrders)
|
||||||
@@ -133,6 +143,11 @@ public class AccettazionePickingViewModel {
|
|||||||
} else {
|
} else {
|
||||||
this.sendError(new InvalidLUMultiGestioneException());
|
this.sendError(new InvalidLUMultiGestioneException());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (defaultGestioneOfUL) {
|
||||||
|
case ACQUISTO -> this.mColliCaricoRESTConsumer = mColliAccettazioneRESTConsumer;
|
||||||
|
case LAVORAZIONE -> this.mColliCaricoRESTConsumer = mColliLavorazioneRESTConsumer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getEmptyPickingList(List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete) {
|
private void getEmptyPickingList(List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete) {
|
||||||
@@ -357,76 +372,102 @@ public class AccettazionePickingViewModel {
|
|||||||
public void createNewLU(Integer customNumCollo, String customSerCollo, boolean disablePrint, Runnable onComplete) {
|
public void createNewLU(Integer customNumCollo, String customSerCollo, boolean disablePrint, Runnable onComplete) {
|
||||||
this.sendOnInfoAggiuntiveRequest((additionalNotes, tCol) -> {
|
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<String> codAnags =
|
||||||
|
// Stream.of(mOrders)
|
||||||
|
// .map(OrdineAccettazioneInevasoDTO::getCodAnagOrd)
|
||||||
|
// .distinct()
|
||||||
|
// .toList();
|
||||||
|
//
|
||||||
|
// if (codAnags.size() == 1) {
|
||||||
|
// mtbColt.setCodAnag(codAnags.get(0));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// List<String> rifOrds =
|
||||||
|
// Stream.of(mOrders)
|
||||||
|
// .map(OrdineAccettazioneInevasoDTO::getRifOrd)
|
||||||
|
// .distinct()
|
||||||
|
// .toList();
|
||||||
|
//
|
||||||
|
// if (rifOrds.size() == 1) {
|
||||||
|
// mtbColt.setRifOrd(rifOrds.get(0));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// List<String> 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;
|
final List<CreateUDCRequestOrderDTO> orders = Stream.of(this.mOrders)
|
||||||
if (defaultPosAccettazioneDTO != null && !UtilityString.isNullOrEmpty(defaultPosAccettazioneDTO.value))
|
.map(x -> new CreateUDCRequestOrderDTO()
|
||||||
defaultPosAccettazione = defaultPosAccettazioneDTO.value;
|
.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();
|
final CreateUDCRequestDTO createUDCRequestDTO = new CreateUDCRequestDTO()
|
||||||
mtbColt
|
.setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep())
|
||||||
.initDefaultFields(defaultGestioneOfUL)
|
|
||||||
.setAnnotazioni(additionalNotes)
|
.setAnnotazioni(additionalNotes)
|
||||||
.setPosizione(defaultPosAccettazione)
|
.setCodTcol(tCol != null ? tCol.getCodTcol() : null)
|
||||||
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
.setNumCollo(customNumCollo)
|
||||||
|
.setSerCollo(customSerCollo)
|
||||||
|
.setOrders(orders);
|
||||||
|
|
||||||
if (tCol != null) {
|
this.mColliCaricoRESTConsumer.createUDC(createUDCRequestDTO, createdUDS -> {
|
||||||
mtbColt.setCodTcol(tCol.getCodTcol());
|
this.mCurrentMtbColt = createdUDS;
|
||||||
mtbColt.setMtbTCol(tCol);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (customNumCollo != null) {
|
this.mCurrentMtbColt.setMtbColr(new ObservableArrayList<>())
|
||||||
mtbColt.setNumCollo(customNumCollo);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(customSerCollo)) {
|
|
||||||
mtbColt.setSerCollo(customSerCollo);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> codAnags =
|
|
||||||
Stream.of(mOrders)
|
|
||||||
.map(OrdineAccettazioneInevasoDTO::getCodAnagOrd)
|
|
||||||
.distinct()
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
if (codAnags.size() == 1) {
|
|
||||||
mtbColt.setCodAnag(codAnags.get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> rifOrds =
|
|
||||||
Stream.of(mOrders)
|
|
||||||
.map(OrdineAccettazioneInevasoDTO::getRifOrd)
|
|
||||||
.distinct()
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
if (rifOrds.size() == 1) {
|
|
||||||
mtbColt.setRifOrd(rifOrds.get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> 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);
|
.setDisablePrint(disablePrint);
|
||||||
|
|
||||||
this.mCurrentMtbColt = mtbColt;
|
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
this.sendLUOpened(mtbColt);
|
this.sendLUOpened(createdUDS);
|
||||||
}, this::sendError);
|
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -577,59 +618,46 @@ public class AccettazionePickingViewModel {
|
|||||||
|
|
||||||
|
|
||||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
|
|
||||||
UtilityThread.executeParallel(() -> {
|
|
||||||
|
|
||||||
String gestioneRif = pickingObjectDTO.getSitArtOrdDTO().getGestioneEnum() == GestioneEnum.PRODUZIONE ? "L" : pickingObjectDTO.getSitArtOrdDTO().getGestione();
|
|
||||||
|
|
||||||
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());
|
|
||||||
|
|
||||||
|
|
||||||
this.addHistoryItem(mtbColr);
|
|
||||||
|
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
|
||||||
|
|
||||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
|
||||||
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
|
||||||
|
|
||||||
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
||||||
resetMatchedRows();
|
resetMatchedRows();
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
|
|
||||||
if (shouldCloseLU) closeLU();
|
if (shouldCloseLU) closeLU();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
mtbColr
|
String gestioneRif = pickingObjectDTO.getSitArtOrdDTO().getGestioneEnum() == GestioneEnum.PRODUZIONE ? "L" : pickingObjectDTO.getSitArtOrdDTO().getGestione();
|
||||||
.setDataCollo(value.getDataColloS())
|
|
||||||
.setNumCollo(value.getNumCollo())
|
var clonedTargetMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||||
.setGestione(value.getGestione())
|
clonedTargetMtbColt.setMtbColr(null);
|
||||||
.setSerCollo(value.getSerCollo())
|
|
||||||
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
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));
|
||||||
|
|
||||||
|
mColliCaricoRESTConsumer.insertUDCRow(insertUDCRowRequestDto, insertedMtbColr -> {
|
||||||
|
this.addHistoryItem(insertedMtbColr);
|
||||||
|
|
||||||
|
insertedMtbColr
|
||||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||||
|
|
||||||
pickingObjectDTO.getWithdrawMtbColrs().add(mtbColr);
|
pickingObjectDTO.getWithdrawMtbColrs().add(insertedMtbColr);
|
||||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
mCurrentMtbColt.getMtbColr().add(insertedMtbColr);
|
||||||
|
|
||||||
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||||
resetMatchedRows();
|
resetMatchedRows();
|
||||||
@@ -638,8 +666,9 @@ public class AccettazionePickingViewModel {
|
|||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
if (shouldCloseLU) closeLU();
|
if (shouldCloseLU) closeLU();
|
||||||
|
|
||||||
}, this::sendError);
|
}, 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) {
|
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
MtbColt mtbColt = new MtbColt()
|
MtbColr mtbColrClone = (MtbColr) mtbColrToUpdate.clone();
|
||||||
.setNumCollo(mtbColrToUpdate.getNumCollo())
|
mtbColrClone.setMtbAart(null)
|
||||||
.setDataCollo(mtbColrToUpdate.getDataColloS())
|
.setMtbPartitaMag(null);
|
||||||
.setSerCollo(mtbColrToUpdate.getSerCollo())
|
|
||||||
.setGestione(mtbColrToUpdate.getGestione())
|
|
||||||
.setMtbColr(new ObservableArrayList<>());
|
|
||||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
|
||||||
|
|
||||||
final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
var editUDCRowRequest = new EditUDCRowRequestDTO()
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
.setSourceMtbColr(mtbColrClone)
|
||||||
mtbColr
|
.setNewNumCnf(numCnf)
|
||||||
.setNumCnf(numCnf)
|
.setNewQtaCnf(qtaCnf)
|
||||||
.setQtaCnf(qtaCnf)
|
.setNewQtaTot(qtaTot)
|
||||||
.setQtaCol(qtaTot)
|
.setNewPartitaMag(partitaMag);
|
||||||
.setPartitaMag(partitaMag)
|
|
||||||
.setDataScadPartita(dataScad)
|
|
||||||
.setUtente(SettingsManager.i().getUser().getFullname())
|
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
|
||||||
|
|
||||||
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)
|
this.addHistoryItem(editedMtbColr);
|
||||||
.setQtaCnf(qtaCnf)
|
|
||||||
.setQtaCol(qtaTot);
|
|
||||||
|
|
||||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||||
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate))
|
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate))
|
||||||
.findSingle();
|
.findSingle();
|
||||||
|
|
||||||
|
editedMtbColr
|
||||||
|
.setUntMis(mtbColrToUpdate.getUntMis())
|
||||||
|
.setMtbAart(mtbColrToUpdate.getMtbAart());
|
||||||
|
|
||||||
if (pickingObjectDTO.isPresent()) {
|
if (pickingObjectDTO.isPresent()) {
|
||||||
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||||
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
|
pickingObjectDTO.get().getWithdrawMtbColrs().add(editedMtbColr);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
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
|
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||||
resetMatchedRows();
|
resetMatchedRows();
|
||||||
@@ -730,26 +754,16 @@ public class AccettazionePickingViewModel {
|
|||||||
public void deleteRow(MtbColr mtbColrToDelete) {
|
public void deleteRow(MtbColr mtbColrToDelete) {
|
||||||
this.sendMtbColrDeleteRequest(shouldDelete -> {
|
this.sendMtbColrDeleteRequest(shouldDelete -> {
|
||||||
|
|
||||||
if (shouldDelete) {
|
if (!shouldDelete)
|
||||||
|
return;
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
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);
|
|
||||||
|
|
||||||
MtbColr mtbColr = (MtbColr) mtbColrToDelete.clone();
|
var deleteUDCRowRequest = new DeleteUDCRowRequestDTO()
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
|
.setMtbColrToDelete(mtbColrToDelete);
|
||||||
mtbColr.setQtaCol(mtbColr.getQtaCol().multiply(new BigDecimal(-1)))
|
|
||||||
.setNumCnf(mtbColr.getNumCnf().multiply(new BigDecimal(-1)))
|
|
||||||
.setRiga(null);
|
|
||||||
|
|
||||||
mtbColt.getMtbColr().add(mtbColr);
|
|
||||||
|
|
||||||
this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
|
||||||
|
|
||||||
|
this.mColliCaricoRESTConsumer.deleteUDCRow(deleteUDCRowRequest,
|
||||||
|
() -> {
|
||||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||||
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete))
|
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete))
|
||||||
.findSingle();
|
.findSingle();
|
||||||
@@ -763,9 +777,8 @@ public class AccettazionePickingViewModel {
|
|||||||
this.resetMatchedRows();
|
this.resetMatchedRows();
|
||||||
this.sendOnRowSaved();
|
this.sendOnRowSaved();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -774,14 +787,16 @@ public class AccettazionePickingViewModel {
|
|||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
deleteLU(() -> {
|
deleteLU(() -> {
|
||||||
this.sendLUClosed();
|
this.sendLUClosed();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
CloseUDCRequestDTO closeUDCRequestDTO = new CloseUDCRequestDTO()
|
||||||
|
.setMtbColt(mCurrentMtbColt);
|
||||||
|
mColliCaricoRESTConsumer.closeUDC(closeUDCRequestDTO, closeUDCResponse -> {
|
||||||
|
|
||||||
Runnable onVersamentoCompleted = () -> {
|
Runnable onVersamentoCompleted = () -> {
|
||||||
if (!mCurrentMtbColt.getDisablePrint()) {
|
if (!mCurrentMtbColt.getDisablePrint()) {
|
||||||
@@ -818,16 +833,15 @@ public class AccettazionePickingViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private void printCollo(Runnable onComplete) {
|
private void printCollo(Runnable onComplete) {
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||||
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
|
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
|
||||||
|
|
||||||
this.mPrinterRESTConsumer.printCollo(
|
var printUDSRequestDto = new PrintULRequestDTO()
|
||||||
cloneMtbColt,
|
.setMtbColt(cloneMtbColt);
|
||||||
() -> {
|
|
||||||
this.sendLUSuccessfullyPrinted();
|
|
||||||
onComplete.run();
|
|
||||||
}, ex -> this.sendLUPrintError(ex, onComplete));
|
|
||||||
|
|
||||||
|
this.mColliMagazzinoRESTConsumer.printUL(printUDSRequestDto, onComplete,
|
||||||
|
ex -> this.sendLUPrintError(ex, onComplete));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void postCloseOperations() {
|
private void postCloseOperations() {
|
||||||
@@ -837,7 +851,10 @@ public class AccettazionePickingViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deleteLU(Runnable onComplete) {
|
private void deleteLU(Runnable onComplete) {
|
||||||
mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
|
DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
|
||||||
|
.setMtbColt(this.mCurrentMtbColt);
|
||||||
|
|
||||||
|
mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
|
||||||
this.mCurrentMtbColt = null;
|
this.mCurrentMtbColt = null;
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
new DialogAvailableItemsView(listaMtbAart)
|
new DialogAvailableItemsView(listaMtbAart, null)
|
||||||
.show(getSupportFragmentManager(), "DialogAvailableInventarioItemsView");
|
.show(getSupportFragmentManager(), "DialogAvailableInventarioItemsView");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
|||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.available_items.DialogAvailableItemListModel;
|
import it.integry.integrywmsnative.view.dialogs.available_items.DialogAvailableItemListModel;
|
||||||
import it.integry.integrywmsnative.view.dialogs.available_items.DialogAvailableItemsView;
|
import it.integry.integrywmsnative.view.dialogs.available_items.DialogAvailableItemsView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||||
@@ -135,6 +136,9 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
|||||||
if (menuItem.getItemId() == R.id.export) {
|
if (menuItem.getItemId() == R.id.export) {
|
||||||
requestExportConfirm();
|
requestExportConfirm();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (menuItem.getItemId() == R.id.search_art) {
|
||||||
|
manualSearch();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -179,8 +183,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -205,6 +208,18 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
|||||||
.show(getSupportFragmentManager(), "tag");
|
.show(getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void manualSearch() {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
DialogSimpleInputHelper.makeInputDialog(this,
|
||||||
|
"Ricerca articolo",
|
||||||
|
null,
|
||||||
|
"Cod articolo / Barcode",
|
||||||
|
barcodeProd ->
|
||||||
|
this.mViewModel.loadArticoloByCodMartOrBarcode(barcodeProd, BarcodeManager::enable),
|
||||||
|
BarcodeManager::enable)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
public void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||||
@@ -284,7 +299,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
new DialogAvailableItemsView(listaMtbAart)
|
new DialogAvailableItemsView(listaMtbAart, mtbAartClicked -> this.mViewModel.loadArticoloByMtbAart(mtbAartClicked, null))
|
||||||
.show(getSupportFragmentManager(), "DialogAvailableInventarioItemsView");
|
.show(getSupportFragmentManager(), "DialogAvailableInventarioItemsView");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,13 +4,16 @@ import dagger.Module;
|
|||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRowRepository;
|
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRowRepository;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
|
||||||
@Module(subcomponents = PickingInventarioComponent.class)
|
@Module(subcomponents = PickingInventarioComponent.class)
|
||||||
public class PickingInventarioModule {
|
public class PickingInventarioModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
PickingInventarioViewModel providesPickingInventarioViewModel(InventarioRepository inventarioRepository, InventarioRowRepository inventarioRowRepository) {
|
PickingInventarioViewModel providesPickingInventarioViewModel(InventarioRepository inventarioRepository,
|
||||||
return new PickingInventarioViewModel(inventarioRepository, inventarioRowRepository);
|
InventarioRowRepository inventarioRowRepository,
|
||||||
|
BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||||
|
return new PickingInventarioViewModel(inventarioRepository, inventarioRowRepository, barcodeRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -17,10 +17,12 @@ import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDT
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRowRepository;
|
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRowRepository;
|
||||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||||
|
import it.integry.integrywmsnative.core.exception.NoResultFromCodMartException;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||||
import it.integry.integrywmsnative.core.rest.model.inventario.InventarioArtDTO;
|
import it.integry.integrywmsnative.core.rest.model.inventario.InventarioArtDTO;
|
||||||
@@ -28,6 +30,7 @@ import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||||
@@ -35,23 +38,22 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
|||||||
public class PickingInventarioViewModel extends ViewModel {
|
public class PickingInventarioViewModel extends ViewModel {
|
||||||
|
|
||||||
|
|
||||||
|
private final BarcodeRESTConsumer barcodeRESTConsumer;
|
||||||
private final InventarioRepository inventarioRepository;
|
private final InventarioRepository inventarioRepository;
|
||||||
private final InventarioRowRepository inventarioRowRepository;
|
private final InventarioRowRepository inventarioRowRepository;
|
||||||
|
|
||||||
private boolean canAddUnknownItems;
|
|
||||||
private boolean flagShouldAskToCreateOrUpdateRowInventario;
|
|
||||||
|
|
||||||
public MutableLiveData<InventarioRoomDTO> currentInventario = new MutableLiveData<>();
|
public MutableLiveData<InventarioRoomDTO> currentInventario = new MutableLiveData<>();
|
||||||
public LiveData<List<InventarioRowRoomDTO>> currentInventarioRows = new MutableLiveData<>();
|
public LiveData<List<InventarioRowRoomDTO>> currentInventarioRows = new MutableLiveData<>();
|
||||||
|
private boolean canAddUnknownItems;
|
||||||
|
private boolean flagShouldAskToCreateOrUpdateRowInventario;
|
||||||
private List<InventarioArtDTO> availableInventarioArts;
|
private List<InventarioArtDTO> availableInventarioArts;
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
public PickingInventarioViewModel(
|
public PickingInventarioViewModel(InventarioRepository inventarioRepository,
|
||||||
InventarioRepository inventarioRepository,
|
InventarioRowRepository inventarioRowRepository,
|
||||||
InventarioRowRepository inventarioRowRepository) {
|
BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||||
this.inventarioRepository = inventarioRepository;
|
this.inventarioRepository = inventarioRepository;
|
||||||
this.inventarioRowRepository = inventarioRowRepository;
|
this.inventarioRowRepository = inventarioRowRepository;
|
||||||
|
this.barcodeRESTConsumer = barcodeRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> inventarioArts, boolean canAddUnknownItems, boolean flagShouldAskToCreateOrUpdateRowInventario) {
|
public void init(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> inventarioArts, boolean canAddUnknownItems, boolean flagShouldAskToCreateOrUpdateRowInventario) {
|
||||||
@@ -84,61 +86,39 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||||
//Cerco tramite etichetta ean peso
|
//Cerco tramite etichetta ean peso
|
||||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
|
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||||
|
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||||
|
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.loadArticolo(barcodeScanDTO.getStringValue(), null, onComplete);
|
this.loadArticolo(barcodeScanDTO.getStringValue(), null, onComplete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateRow(InventarioRowRoomDTO itemToUpdate) {
|
public void loadArticoloByCodMartOrBarcode(String codMart, Runnable onComplete) {
|
||||||
var barcodeList = new ArrayList<String>();
|
var matchedArt = Stream.of(this.availableInventarioArts)
|
||||||
barcodeList.add(itemToUpdate.getScanCodBarre());
|
.filter(x -> x.getCodMart().equalsIgnoreCase(codMart) ||
|
||||||
|
x.getBarcode().contains(codMart))
|
||||||
var matchedArt = availableInventarioArts.stream()
|
|
||||||
.filter(x -> itemToUpdate.getCodMart() != null && x.getCodMart().contains(itemToUpdate.getCodMart()))
|
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
MtbAart articolo;
|
|
||||||
|
|
||||||
if (canAddUnknownItems && matchedArt == null) {
|
if (matchedArt == null) {
|
||||||
matchedArt = new InventarioArtDTO()
|
this.sendError(new NoResultFromCodMartException(codMart));
|
||||||
.setBarcode(barcodeList)
|
|
||||||
.setFlagQtaCnfFissa(true)
|
|
||||||
.setPlu(false)
|
|
||||||
.setUntMis(itemToUpdate.getUntMis())
|
|
||||||
.setQtaCnf(itemToUpdate.getQtaConf());
|
|
||||||
}
|
|
||||||
if (matchedArt != null) {
|
|
||||||
articolo = matchedArt.toMtbAart()
|
|
||||||
.setFlagTracciabilita("N");
|
|
||||||
dispatchRowEdit(articolo, itemToUpdate);
|
|
||||||
} else
|
|
||||||
this.sendError(new NoResultFromBarcodeException(itemToUpdate.getScanCodBarre()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteRow(InventarioRowRoomDTO itemToDelete) {
|
|
||||||
this.inventarioRowRepository.delete(itemToDelete, () -> {
|
|
||||||
}, this::sendError);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void exportAll(Runnable onComplete) {
|
|
||||||
if (this.currentInventarioRows.getValue().isEmpty()) {
|
|
||||||
this.sendError(new Exception("Impossibile esportare un inventario senza righe"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
currentInventario.getValue().setInventarioRowList(this.currentInventarioRows.getValue());
|
|
||||||
|
|
||||||
this.inventarioRepository.export(currentInventario.getValue(), () -> {
|
loadArticolo(matchedArt.getBarcode().get(0), null, onComplete);
|
||||||
this.sendOnLoadingEnded();
|
}
|
||||||
onComplete.run();
|
|
||||||
}, this::sendError);
|
public void loadArticoloByMtbAart(MtbAart mtbAart, Runnable onComplete) {
|
||||||
|
loadArticolo(mtbAart.getBarCode(), null, onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -151,12 +131,38 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
|
barcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||||
|
|
||||||
|
String barcodeProd = null;
|
||||||
|
String codMart = null;
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||||
|
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||||
|
barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(ean128Model.Internal1))
|
||||||
|
codMart = ean128Model.Internal1;
|
||||||
|
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
|
this.loadArticolo(barcodeProd, ean128Model, onComplete);
|
||||||
|
|
||||||
|
} else if (!UtilityString.isNullOrEmpty(codMart)) {
|
||||||
|
this.loadArticoloByCodMartOrBarcode(codMart, onComplete);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||||
|
onComplete.run();
|
||||||
|
}
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Runnable onComplete) {
|
||||||
var barcodeList = new ArrayList<String>();
|
var barcodeList = new ArrayList<String>();
|
||||||
barcodeList.add(barcodeProd);
|
barcodeList.add(barcodeProd);
|
||||||
|
|
||||||
var matchedArt = availableInventarioArts.stream()
|
var matchedArt = availableInventarioArts.stream().filter(x -> x.getBarcode().contains(barcodeProd))
|
||||||
.filter(x -> x.getBarcode().contains(barcodeProd))
|
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
@@ -168,7 +174,6 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
.setPlu(false)
|
.setPlu(false)
|
||||||
.setUntMis("PZ")
|
.setUntMis("PZ")
|
||||||
.setQtaCnf(BigDecimal.ONE);
|
.setQtaCnf(BigDecimal.ONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchedArt != null) {
|
if (matchedArt != null) {
|
||||||
@@ -181,19 +186,16 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
this.sendOnItemAlreadyFound(matchedArt, alreadyScannedItems);
|
this.sendOnItemAlreadyFound(matchedArt, alreadyScannedItems);
|
||||||
|
|
||||||
}
|
}
|
||||||
onComplete.run();
|
if(onComplete != null) onComplete.run();
|
||||||
} else
|
} else this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<InventarioRowRoomDTO> searchArtInAlreadyScannedItems(InventarioArtDTO inventarioArtDTO) {
|
private List<InventarioRowRoomDTO> searchArtInAlreadyScannedItems(InventarioArtDTO inventarioArtDTO) {
|
||||||
final List<InventarioRowRoomDTO> inventarioRows = this.currentInventarioRows.getValue();
|
final List<InventarioRowRoomDTO> inventarioRows = this.currentInventarioRows.getValue();
|
||||||
|
|
||||||
if (inventarioRows == null) return null;
|
if (inventarioRows == null || inventarioRows.isEmpty()) return null;
|
||||||
|
|
||||||
return Stream.of(inventarioRows)
|
return Stream.of(inventarioRows).filter(x -> x.getCodMart() != null ? x.getCodMart().equalsIgnoreCase(inventarioArtDTO.getCodMart()) : inventarioArtDTO.getBarcode().contains(x.getScanCodBarre())).toList();
|
||||||
.filter(x -> x.getCodMart().equalsIgnoreCase(inventarioArtDTO.getCodMart()))
|
|
||||||
.toList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -201,9 +203,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
var mtbAart = inventarioArtDTO.toMtbAart();
|
var mtbAart = inventarioArtDTO.toMtbAart();
|
||||||
mtbAart.setFlagTracciabilita("N");
|
mtbAart.setFlagTracciabilita("N");
|
||||||
|
|
||||||
PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbAart).setTempPickData(PickDataDTO.fromEan128(ean128Model));
|
||||||
.setMtbAart(mtbAart)
|
|
||||||
.setTempPickData(PickDataDTO.fromEan128(ean128Model));
|
|
||||||
|
|
||||||
BigDecimal numCnfDaPrelevare = null;
|
BigDecimal numCnfDaPrelevare = null;
|
||||||
BigDecimal qtaColDaPrelevare = null;
|
BigDecimal qtaColDaPrelevare = null;
|
||||||
@@ -277,64 +277,25 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (inventarioArtDTO.isPlu()) {
|
if (inventarioArtDTO.isPlu()) {
|
||||||
this.saveNewRow(pickingObjectDTO,
|
this.saveNewRow(pickingObjectDTO, initialNumCnf, initialQtaCnf, initialQtaTot, null, barcode);
|
||||||
initialNumCnf,
|
|
||||||
initialQtaCnf,
|
|
||||||
initialQtaTot,
|
|
||||||
null,
|
|
||||||
barcode);
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.sendOnItemDispatched(
|
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), null, //initialNumCnf,
|
||||||
pickingObjectDTO,
|
initialQtaCnf, null, //initialQtaTot,
|
||||||
pickingObjectDTO.getMtbAart(),
|
null, null, null, null, null, null, false, true, false, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||||
null, //initialNumCnf,
|
this.saveNewRow(pickingObjectDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), barcode);
|
||||||
initialQtaCnf,
|
|
||||||
null, //initialQtaTot,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
false,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
|
||||||
this.saveNewRow(pickingObjectDTO,
|
|
||||||
pickedQuantityDTO.getNumCnf(),
|
|
||||||
pickedQuantityDTO.getQtaCnf(),
|
|
||||||
pickedQuantityDTO.getQtaTot(),
|
|
||||||
pickedQuantityDTO.getPartitaMag(),
|
|
||||||
barcode);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispatchRowEdit(MtbAart mtbAart, InventarioRowRoomDTO inventarioRowRoomDTO) {
|
public void dispatchRowEdit(MtbAart mtbAart, InventarioRowRoomDTO inventarioRowRoomDTO) {
|
||||||
|
|
||||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbAart);
|
||||||
.setMtbAart(mtbAart);
|
|
||||||
|
|
||||||
|
|
||||||
this.sendOnItemDispatched(
|
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), inventarioRowRoomDTO.getNumConf(), inventarioRowRoomDTO.getQtaConf(), inventarioRowRoomDTO.getQta(), null, null, null, null, null, null, false, false, false, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||||
pickingObjectDTO,
|
|
||||||
pickingObjectDTO.getMtbAart(),
|
|
||||||
inventarioRowRoomDTO.getNumConf(),
|
|
||||||
inventarioRowRoomDTO.getQtaConf(),
|
|
||||||
inventarioRowRoomDTO.getQta(),
|
|
||||||
null, null, null,
|
|
||||||
null, null, null,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
|
||||||
|
|
||||||
this.saveEditedRow(inventarioRowRoomDTO,
|
this.saveEditedRow(inventarioRowRoomDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag());
|
||||||
pickedQuantityDTO.getNumCnf(),
|
|
||||||
pickedQuantityDTO.getQtaCnf(),
|
|
||||||
pickedQuantityDTO.getQtaTot(),
|
|
||||||
pickedQuantityDTO.getPartitaMag());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -369,6 +330,47 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateRow(InventarioRowRoomDTO itemToUpdate) {
|
||||||
|
var barcodeList = new ArrayList<String>();
|
||||||
|
barcodeList.add(itemToUpdate.getScanCodBarre());
|
||||||
|
|
||||||
|
var matchedArt = availableInventarioArts.stream()
|
||||||
|
.filter(x -> itemToUpdate.getCodMart() != null && x.getCodMart().contains(itemToUpdate.getCodMart()))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
|
MtbAart articolo;
|
||||||
|
|
||||||
|
if (canAddUnknownItems && matchedArt == null) {
|
||||||
|
matchedArt = new InventarioArtDTO().setBarcode(barcodeList).setFlagQtaCnfFissa(true).setPlu(false).setUntMis(itemToUpdate.getUntMis()).setQtaCnf(itemToUpdate.getQtaConf());
|
||||||
|
}
|
||||||
|
if (matchedArt != null) {
|
||||||
|
articolo = matchedArt.toMtbAart().setFlagTracciabilita("N");
|
||||||
|
dispatchRowEdit(articolo, itemToUpdate);
|
||||||
|
} else this.sendError(new NoResultFromBarcodeException(itemToUpdate.getScanCodBarre()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteRow(InventarioRowRoomDTO itemToDelete) {
|
||||||
|
this.inventarioRowRepository.delete(itemToDelete, () -> {
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void exportAll(Runnable onComplete) {
|
||||||
|
if (this.currentInventarioRows.getValue().isEmpty()) {
|
||||||
|
this.sendError(new Exception("Impossibile esportare un inventario senza righe"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
currentInventario.getValue().setInventarioRowList(this.currentInventarioRows.getValue());
|
||||||
|
|
||||||
|
this.inventarioRepository.export(currentInventario.getValue(), () -> {
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
onComplete.run();
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void sendOnLoadingStarted() {
|
private void sendOnLoadingStarted() {
|
||||||
if (this.mListener != null) mListener.onLoadingStarted();
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
@@ -382,36 +384,9 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
if (this.mListener != null) mListener.onError(ex);
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO,
|
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||||
MtbAart mtbAart,
|
if (this.mListener != null)
|
||||||
BigDecimal initialNumCnf,
|
mListener.onItemDispatched(pickingObjectDTO, mtbAart, initialNumCnf, initialQtaCnf, initialQtaTot, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, totalQtaToBeTaken, totalNumCnfToBeTaken, qtaCnfToBeTaken, canOverflowOrderQuantity, canPartitaMagBeChanged, canLUBeClosed, onComplete);
|
||||||
BigDecimal initialQtaCnf,
|
|
||||||
BigDecimal initialQtaTot,
|
|
||||||
BigDecimal totalQtaAvailable,
|
|
||||||
BigDecimal totalNumCnfAvailable,
|
|
||||||
BigDecimal qtaCnfAvailable,
|
|
||||||
BigDecimal totalQtaToBeTaken,
|
|
||||||
BigDecimal totalNumCnfToBeTaken,
|
|
||||||
BigDecimal qtaCnfToBeTaken,
|
|
||||||
boolean canOverflowOrderQuantity,
|
|
||||||
boolean canPartitaMagBeChanged,
|
|
||||||
boolean canLUBeClosed,
|
|
||||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
|
||||||
if (this.mListener != null) mListener.onItemDispatched(pickingObjectDTO,
|
|
||||||
mtbAart,
|
|
||||||
initialNumCnf,
|
|
||||||
initialQtaCnf,
|
|
||||||
initialQtaTot,
|
|
||||||
totalQtaAvailable,
|
|
||||||
totalNumCnfAvailable,
|
|
||||||
qtaCnfAvailable,
|
|
||||||
totalQtaToBeTaken,
|
|
||||||
totalNumCnfToBeTaken,
|
|
||||||
qtaCnfToBeTaken,
|
|
||||||
canOverflowOrderQuantity,
|
|
||||||
canPartitaMagBeChanged,
|
|
||||||
canLUBeClosed,
|
|
||||||
onComplete);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendOnItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems) {
|
private void sendOnItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems) {
|
||||||
@@ -428,21 +403,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
|||||||
|
|
||||||
void onError(Exception ex);
|
void onError(Exception ex);
|
||||||
|
|
||||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO,
|
void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||||
MtbAart mtbAart,
|
|
||||||
BigDecimal initialNumCnf,
|
|
||||||
BigDecimal initialQtaCnf,
|
|
||||||
BigDecimal initialQtaTot,
|
|
||||||
BigDecimal totalQtaAvailable,
|
|
||||||
BigDecimal totalNumCnfAvailable,
|
|
||||||
BigDecimal qtaCnfAvailable,
|
|
||||||
BigDecimal totalQtaToBeTaken,
|
|
||||||
BigDecimal totalNumCnfToBeTaken,
|
|
||||||
BigDecimal qtaCnfToBeTaken,
|
|
||||||
boolean canOverflowOrderQuantity,
|
|
||||||
boolean canPartitaMagBeChanged,
|
|
||||||
boolean canLUBeClosed,
|
|
||||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
|
||||||
|
|
||||||
|
|
||||||
void onItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems);
|
void onItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems);
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class VenditaFiltroOrdiniViewModel {
|
|||||||
|
|
||||||
if (dataConsegna == null) currentDataConsPredicate.set(null);
|
if (dataConsegna == null) currentDataConsPredicate.set(null);
|
||||||
else {
|
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()) {
|
if (mtbGrupList == null || mtbGrupList.isEmpty()) {
|
||||||
currentGruppoMercPredicate.set(null);
|
currentGruppoMercPredicate.set(null);
|
||||||
this.selectedMtbGrup = new ArrayList<>();
|
this.selectedMtbGrup = new ArrayList<>();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.selectedMtbGrup = mtbGrupList;
|
this.selectedMtbGrup = mtbGrupList;
|
||||||
var mtbGrups = Stream.of(mtbGrupList).map(MtbGrup::getCodMgrp).toList();
|
var mtbGrups = Stream.of(mtbGrupList).map(MtbGrup::getCodMgrp).toList();
|
||||||
currentGruppoMercPredicate.set(o -> Stream.of(o.getAvailableClassMerc())
|
currentGruppoMercPredicate.set(o -> Stream.of(o.getAvailableClassMerc())
|
||||||
@@ -693,6 +692,7 @@ public class VenditaFiltroOrdiniViewModel {
|
|||||||
.sortBy(JtbComt::getCodJcom)
|
.sortBy(JtbComt::getCodJcom)
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JtbComt> getAvailableCommesse(List<JtbComt> commesseFullList) {
|
public List<JtbComt> getAvailableCommesse(List<JtbComt> commesseFullList) {
|
||||||
|
|
||||||
if (currentIdViaggioPredicate.get() == null &&
|
if (currentIdViaggioPredicate.get() == null &&
|
||||||
|
|||||||
@@ -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.Ean13PesoModel;
|
||||||
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemRequestDTO;
|
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.MagazzinoAutomaticoPickItemsRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
@@ -804,7 +805,7 @@ public class PickingLiberoViewModel {
|
|||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
deleteLU(() -> {
|
deleteLU(() -> {
|
||||||
this.sendLUClosed();
|
this.sendLUClosed();
|
||||||
@@ -829,7 +830,9 @@ public class PickingLiberoViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deleteLU(Runnable onComplete) {
|
private void deleteLU(Runnable onComplete) {
|
||||||
mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
|
DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
|
||||||
|
.setMtbColt(mCurrentMtbColt);
|
||||||
|
mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
|
||||||
this.mCurrentMtbColt = null;
|
this.mCurrentMtbColt = null;
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|||||||
@@ -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.OrdiniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.DocumentoResoDTO;
|
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.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -154,7 +155,7 @@ public class PickingResiViewModel {
|
|||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
||||||
|
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
deleteLU(() -> {
|
deleteLU(() -> {
|
||||||
@@ -197,7 +198,10 @@ public class PickingResiViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deleteLU(Runnable onComplete) {
|
private void deleteLU(Runnable onComplete) {
|
||||||
mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
|
DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
|
||||||
|
.setMtbColt(mCurrentMtbColt);
|
||||||
|
|
||||||
|
mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
|
||||||
|
|
||||||
this.mCurrentMtbColt = null;
|
this.mCurrentMtbColt = null;
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|||||||
@@ -172,14 +172,20 @@ public class ProdDettaglioLineaViewModel {
|
|||||||
|
|
||||||
public void checkBarcodeAndStartOrdine(BarcodeScanDTO dto) {
|
public void checkBarcodeAndStartOrdine(BarcodeScanDTO dto) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||||
mBarcodeRESTConsumer.decodeEan128(dto, (ean128) -> {
|
mBarcodeRESTConsumer.decodeEan128(dto, (ean128) -> {
|
||||||
String codMart = ean128.Content;
|
String codMart = ean128.Internal1;
|
||||||
String partitaMag = ean128.BatchLot;
|
String partitaMag = ean128.BatchLot;
|
||||||
if (!prodLine.isStarted()) {
|
if(prodLine == null) {
|
||||||
|
this.sendError(new Exception("Impossibile leggere lo stato della linea"));
|
||||||
|
|
||||||
|
} else if (!prodLine.isStarted()) {
|
||||||
this.sendError(new Exception("Impossibile avviare una produzione su una linea ferma!"));
|
this.sendError(new Exception("Impossibile avviare una produzione su una linea ferma!"));
|
||||||
|
|
||||||
} else if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
} else if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
||||||
this.startProduction(codMart, partitaMag);
|
this.startProduction(codMart, partitaMag);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.mListener.confirmOrderClose(() -> {
|
this.mListener.confirmOrderClose(() -> {
|
||||||
this.startProduction(codMart, partitaMag);
|
this.startProduction(codMart, partitaMag);
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.gest.prod_rientro_merce;
|
|||||||
|
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -11,6 +13,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.IOrdersLo
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneStatoEnum;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadException;
|
import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadException;
|
||||||
|
|
||||||
public class ProdRientroMerceViewModel {
|
public class ProdRientroMerceViewModel {
|
||||||
@@ -28,10 +31,18 @@ public class ProdRientroMerceViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void refreshOrderList() {
|
public void refreshOrderList() {
|
||||||
new Thread(this::sendOnOrdersLoadingStarted).start();
|
this.sendOnOrdersLoadingStarted();
|
||||||
String codAnag = SettingsManager.iDB().getFilterFornitoreProd();
|
String codAnag = SettingsManager.iDB().getFilterFornitoreProd();
|
||||||
|
|
||||||
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, codAnag, ordiniLavorazioneList -> {
|
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, codAnag, ordiniLavorazioneList -> {
|
||||||
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
List<OrdineLavorazioneDTO> filteredList = null;
|
||||||
|
|
||||||
|
if(ordiniLavorazioneList != null)
|
||||||
|
filteredList = Stream.of(ordiniLavorazioneList)
|
||||||
|
.filter(x -> x.getStatoEnum() != OrdineLavorazioneStatoEnum.PROGRAMMATO)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
this.mOrdiniLavorazioneAperti.postValue(filteredList);
|
||||||
this.sendOnOrdersLoadingEnded();
|
this.sendOnOrdersLoadingEnded();
|
||||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
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.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -183,7 +184,13 @@ public class RettificaGiacenzeViewModel {
|
|||||||
mRettificaGiacenzeRESTConsumer.searchArtForn(codAlis, queryText, listaArts -> {
|
mRettificaGiacenzeRESTConsumer.searchArtForn(codAlis, queryText, listaArts -> {
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
List<MtbAart> mtbAarts = Stream.of(listaArts).map(x -> (MtbAart) x).toList();
|
List<MtbAart> mtbAarts = null;
|
||||||
|
|
||||||
|
if (listaArts != null)
|
||||||
|
mtbAarts = Stream.of(listaArts)
|
||||||
|
.map(x -> (MtbAart) x.getMtbAart())
|
||||||
|
.toList();
|
||||||
|
|
||||||
dispatchArts(mtbAarts);
|
dispatchArts(mtbAarts);
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
@@ -398,7 +405,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
this.mColliMagazzinoRESTConsumer.canLUBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
this.mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
||||||
|
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
deleteLU(() -> {
|
deleteLU(() -> {
|
||||||
@@ -488,7 +495,10 @@ public class RettificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deleteLU(Runnable onComplete) {
|
private void deleteLU(Runnable onComplete) {
|
||||||
mColliMagazzinoRESTConsumer.deleteCollo(mCurrentMtbColt, () -> {
|
DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
|
||||||
|
.setMtbColt(mCurrentMtbColt);
|
||||||
|
|
||||||
|
mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
|
||||||
this.mCurrentMtbColt = null;
|
this.mCurrentMtbColt = null;
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.dto;
|
||||||
|
|
||||||
|
public class SearchArticoloByBarcodeOrCodMartRequestDTO {
|
||||||
|
|
||||||
|
private String codMartOrBarcode;
|
||||||
|
|
||||||
|
public String getCodMartOrBarcode() {
|
||||||
|
return codMartOrBarcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeOrCodMartRequestDTO setCodMartOrBarcode(String codMartOrBarcode) {
|
||||||
|
this.codMartOrBarcode = codMartOrBarcode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
|
public class SearchArticoloByBarcodeOrCodMartResponseDTO {
|
||||||
|
|
||||||
|
private MtbAart mtbAart;
|
||||||
|
private BigDecimal qtaEsistente;
|
||||||
|
private BigDecimal qtaImpegnata;
|
||||||
|
private BigDecimal numCnfEsistente;
|
||||||
|
private BigDecimal numCnfImpegnata;
|
||||||
|
|
||||||
|
|
||||||
|
public MtbAart getMtbAart() {
|
||||||
|
return mtbAart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeOrCodMartResponseDTO setMtbAart(MtbAart mtbAart) {
|
||||||
|
this.mtbAart = mtbAart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaEsistente() {
|
||||||
|
return qtaEsistente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeOrCodMartResponseDTO setQtaEsistente(BigDecimal qtaEsistente) {
|
||||||
|
this.qtaEsistente = qtaEsistente;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaImpegnata() {
|
||||||
|
return qtaImpegnata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeOrCodMartResponseDTO setQtaImpegnata(BigDecimal qtaImpegnata) {
|
||||||
|
this.qtaImpegnata = qtaImpegnata;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnfEsistente() {
|
||||||
|
return numCnfEsistente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeOrCodMartResponseDTO setNumCnfEsistente(BigDecimal numCnfEsistente) {
|
||||||
|
this.numCnfEsistente = numCnfEsistente;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnfImpegnata() {
|
||||||
|
return numCnfImpegnata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeOrCodMartResponseDTO setNumCnfImpegnata(BigDecimal numCnfImpegnata) {
|
||||||
|
this.numCnfImpegnata = numCnfImpegnata;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.dto;
|
||||||
|
|
||||||
|
public class SearchArticoloByCodArtFornOrDescrizioneRequestDTO {
|
||||||
|
|
||||||
|
private String codAlis;
|
||||||
|
|
||||||
|
private String codArtFornOrDescrizione;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCodAlis() {
|
||||||
|
return codAlis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByCodArtFornOrDescrizioneRequestDTO setCodAlis(String codAlis) {
|
||||||
|
this.codAlis = codAlis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodArtFornOrDescrizione() {
|
||||||
|
return codArtFornOrDescrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByCodArtFornOrDescrizioneRequestDTO setCodArtFornOrDescrizione(String codArtFornOrDescrizione) {
|
||||||
|
this.codArtFornOrDescrizione = codArtFornOrDescrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.dto;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
|
public class SearchArticoloByCodArtFornOrDescrizioneResponseDTO {
|
||||||
|
|
||||||
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
private String codArtFor;
|
||||||
|
|
||||||
|
public MtbAart getMtbAart() {
|
||||||
|
return mtbAart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByCodArtFornOrDescrizioneResponseDTO setMtbAart(MtbAart mtbAart) {
|
||||||
|
this.mtbAart = mtbAart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodArtFor() {
|
||||||
|
return codArtFor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByCodArtFornOrDescrizioneResponseDTO setCodArtFor(String codArtFor) {
|
||||||
|
this.codArtFor = codArtFor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,25 +1,28 @@
|
|||||||
package it.integry.integrywmsnative.gest.rettifica_giacenze.rest;
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.rest;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAartWithFornitore;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SaveDocFromPickingRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SaveDocFromPickingRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByBarcodeOrCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByBarcodeOrCodMartResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByCodArtFornOrDescrizioneRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByCodArtFornOrDescrizioneResponseDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
@@ -45,49 +48,56 @@ public class RettificaGiacenzeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void searchArtForn(String codAlis, String codArtForOrDescr, RunnableArgs<ArrayList<MtbAartWithFornitore>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void searchArtForn(String codAlis, String codArtForOrDescr, RunnableArgs<List<SearchArticoloByCodArtFornOrDescrizioneResponseDTO>> onComplete, RunnableArgs<Exception> onError) {
|
||||||
String sql = "SELECT mtb_aart.*, mtb_lisa.cod_art_for from mtb_lisa, mtb_aart, mtb_part " +
|
final RettificaGiacenzeRESTConsumerService service = RESTBuilder.getService(RettificaGiacenzeRESTConsumerService.class);
|
||||||
" WHERE mtb_lisa.cod_alis = " + UtilityDB.valueToString(codAlis) +
|
service.searchByCodArtFornOrDescrizione(new SearchArticoloByCodArtFornOrDescrizioneRequestDTO()
|
||||||
" AND mtb_lisa.cod_mart = mtb_aart.cod_mart " +
|
.setCodAlis(codAlis)
|
||||||
" AND mtb_lisa.cod_mart = mtb_part.cod_mart " +
|
.setCodArtFornOrDescrizione(codArtForOrDescr))
|
||||||
" AND mtb_part.cod_mdep = '" + SettingsManager.i().getUserSession().getDepo().getCodMdep() + "' " +
|
.enqueue(new Callback<>() {
|
||||||
" AND (mtb_aart.descrizione_estesa LIKE '%" + codArtForOrDescr + "%' OR cod_art_for LIKE '%" + codArtForOrDescr + "%') " +
|
@Override
|
||||||
" ORDER BY ABS(mtb_part.qta_esistente) DESC, mtb_aart.descrizione_estesa";
|
public void onResponse(Call<ServiceRESTResponse<List<SearchArticoloByCodArtFornOrDescrizioneResponseDTO>>> call,
|
||||||
|
Response<ServiceRESTResponse<List<SearchArticoloByCodArtFornOrDescrizioneResponseDTO>>> response) {
|
||||||
|
analyzeAnswer(response, "searchByCodArtFornOrDescrizione", onComplete, onError);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<SearchArticoloByCodArtFornOrDescrizioneResponseDTO>>> call, Throwable t) {
|
||||||
|
onError.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbAartWithFornitore>>() {
|
|
||||||
}.getType();
|
|
||||||
mSystemRestConsumer.<ArrayList<MtbAartWithFornitore>>processSql(sql, typeOfObjectsList, value -> {
|
|
||||||
if (onComplete != null) onComplete.run(value);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void searchArtInt(String codMartOrBarcodeOrDescr, RunnableArgs<ArrayList<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void searchArtInt(String codMartOrBarcodeOrDescr, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onError) {
|
||||||
String sql = "SELECT DISTINCT mtb_aart.*," +
|
final RettificaGiacenzeRESTConsumerService service = RESTBuilder.getService(RettificaGiacenzeRESTConsumerService.class);
|
||||||
" qta_esistente, " +
|
service.searchByCodMartOrBarcode(new SearchArticoloByBarcodeOrCodMartRequestDTO()
|
||||||
" qta_imp_cli + qta_imp_lav AS qta_impegnata, " +
|
.setCodMartOrBarcode(codMartOrBarcodeOrDescr))
|
||||||
" num_esistente AS num_cnf_esistente, " +
|
.enqueue(new Callback<>() {
|
||||||
" num_imp_cli + num_imp_lav AS num_cnf_impegnata " +
|
@Override
|
||||||
" FROM mtb_aart " +
|
public void onResponse(Call<ServiceRESTResponse<List<SearchArticoloByBarcodeOrCodMartResponseDTO>>> call,
|
||||||
" LEFT OUTER JOIN mvw_barcode on mtb_aart.cod_mart = mvw_barcode.cod_mart " +
|
Response<ServiceRESTResponse<List<SearchArticoloByBarcodeOrCodMartResponseDTO>>> response) {
|
||||||
" LEFT OUTER JOIN mtb_part mp on mtb_aart.cod_mart = mp.cod_mart " +
|
analyzeAnswer(response, "searchByCodMartOrBarcode", data -> {
|
||||||
" AND mp.cod_mdep = '" + SettingsManager.i().getUserSession().getDepo().getCodMdep() + "'" +
|
|
||||||
" WHERE CASE" +
|
|
||||||
" WHEN LEN(mvw_barcode.cod_barre) > 13 THEN mvw_barcode.cod_barre " +
|
|
||||||
" ELSE Replicate('0', 13 - len(mvw_barcode.cod_barre))+ mvw_barcode.cod_barre " +
|
|
||||||
" END LIKE '%' + CASE " +
|
|
||||||
" WHEN LEN('" + codMartOrBarcodeOrDescr + "') > 13 THEN '" + codMartOrBarcodeOrDescr + "' " +
|
|
||||||
" ELSE Replicate('0', 13 - len('" + codMartOrBarcodeOrDescr + "')) + '" + codMartOrBarcodeOrDescr + "'" +
|
|
||||||
" END " +
|
|
||||||
"OR mtb_aart.cod_mart = '" + codMartOrBarcodeOrDescr + "' " +
|
|
||||||
"OR mtb_aart.descrizione_estesa LIKE '%" + codMartOrBarcodeOrDescr + "%'";
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbAart>>() {
|
var listToReturn = Stream.of(data)
|
||||||
}.getType();
|
.map(x -> x.getMtbAart()
|
||||||
mSystemRestConsumer.<ArrayList<MtbAart>>processSql(sql, typeOfObjectsList, value -> {
|
.setQtaEsistente(x.getQtaEsistente())
|
||||||
if (onComplete != null) onComplete.run(value);
|
.setQtaImpegnata(x.getQtaImpegnata())
|
||||||
}, onFailed);
|
.setNumCnfEsistente(x.getNumCnfEsistente())
|
||||||
|
.setNumCnfImpegnata(x.getNumCnfImpegnata()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
onComplete.run(listToReturn);
|
||||||
|
}, onError);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<SearchArticoloByBarcodeOrCodMartResponseDTO>>> call, Throwable t) {
|
||||||
|
onError.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
package it.integry.integrywmsnative.gest.rettifica_giacenze.rest;
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.rest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.SaveDocFromPickingRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SaveDocFromPickingRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByBarcodeOrCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByBarcodeOrCodMartResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByCodArtFornOrDescrizioneRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.SearchArticoloByCodArtFornOrDescrizioneResponseDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
@@ -9,6 +15,14 @@ import retrofit2.http.POST;
|
|||||||
public interface RettificaGiacenzeRESTConsumerService {
|
public interface RettificaGiacenzeRESTConsumerService {
|
||||||
|
|
||||||
|
|
||||||
|
@POST("wms/articolo/searchByCodArtFornOrDescrizione")
|
||||||
|
Call<ServiceRESTResponse<List<SearchArticoloByCodArtFornOrDescrizioneResponseDTO>>> searchByCodArtFornOrDescrizione(
|
||||||
|
@Body SearchArticoloByCodArtFornOrDescrizioneRequestDTO searchArticoloByCodArtFornOrDescrizioneRequest);
|
||||||
|
|
||||||
|
@POST("wms/articolo/searchByCodMartOrBarcode")
|
||||||
|
Call<ServiceRESTResponse<List<SearchArticoloByBarcodeOrCodMartResponseDTO>>> searchByCodMartOrBarcode(
|
||||||
|
@Body SearchArticoloByBarcodeOrCodMartRequestDTO searchArticoloByBarcodeOrCodMartRequest);
|
||||||
|
|
||||||
@POST("saveDocFromPickingPvm")
|
@POST("saveDocFromPickingPvm")
|
||||||
Call<ServiceRESTResponse<Void>> saveDocFromPickingPvm(@Body SaveDocFromPickingRequestDTO saveDocFromPickingRequestDTO);
|
Call<ServiceRESTResponse<Void>> saveDocFromPickingPvm(@Body SaveDocFromPickingRequestDTO saveDocFromPickingRequestDTO);
|
||||||
|
|
||||||
|
|||||||
@@ -15,16 +15,19 @@ import androidx.preference.EditTextPreference;
|
|||||||
import androidx.preference.ListPreference;
|
import androidx.preference.ListPreference;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceFragmentCompat;
|
import androidx.preference.PreferenceFragmentCompat;
|
||||||
|
import androidx.sqlite.db.SimpleSQLiteQuery;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -34,6 +37,7 @@ import it.integry.integrywmsnative.MainApplication;
|
|||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.context.AppContext;
|
import it.integry.integrywmsnative.core.context.AppContext;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
||||||
@@ -48,6 +52,9 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
@Inject
|
@Inject
|
||||||
public AppContext appContext;
|
public AppContext appContext;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public RawDao rawDao;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public SystemRESTConsumer systemRESTConsumer;
|
public SystemRESTConsumer systemRESTConsumer;
|
||||||
|
|
||||||
@@ -226,29 +233,52 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
|
|
||||||
|
|
||||||
File yourFile = appContext.getLogFilePath();
|
File logFilePath = appContext.getLogFilePath();
|
||||||
var files = yourFile.listFiles();
|
var files = logFilePath.listFiles();
|
||||||
|
|
||||||
var fileToShare = Stream.of(files)
|
var fileToShare = Stream.of(files)
|
||||||
.sortBy(x -> -1 * x.lastModified())
|
.sortBy(x -> -1 * x.lastModified())
|
||||||
.findFirstOrElse(null);
|
.findFirstOrElse(null);
|
||||||
try {
|
try {
|
||||||
|
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
if(fileToShare != null) {
|
||||||
var htmlContent = createAppLogAttachment(fileToShare);
|
var htmlContent = createAppLogAttachment(fileToShare);
|
||||||
|
|
||||||
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
||||||
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
||||||
|
|
||||||
var attachment = new MailAttachmentDTO()
|
var logAttachment = new MailAttachmentDTO()
|
||||||
.setFileName("wms_log.html")
|
.setFileName("wms_log.html")
|
||||||
.setFileb64Content(base64);
|
.setFileb64Content(base64);
|
||||||
|
attachmentDTOList.add(logAttachment);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rawDao.vacuumDb(new SimpleSQLiteQuery("pragma wal_checkpoint(full)"));
|
||||||
|
File[] dbFiles = new File[3];
|
||||||
|
dbFiles[0] = requireContext().getDatabasePath("integry_wms");
|
||||||
|
dbFiles[1] = requireContext().getDatabasePath("integry_wms-shm");
|
||||||
|
dbFiles[2] = requireContext().getDatabasePath("integry_wms-wal");
|
||||||
|
|
||||||
|
for(int i = 0; i < dbFiles.length; i++){
|
||||||
|
byte[] dbFileBytes = new byte[(int) dbFiles[i].length()];
|
||||||
|
FileInputStream inputStream = new FileInputStream(dbFiles[i]);
|
||||||
|
final int read = inputStream.read(dbFileBytes);
|
||||||
|
inputStream.close();
|
||||||
|
|
||||||
|
var dbAttachment = new MailAttachmentDTO()
|
||||||
|
.setFileName(dbFiles[i].getName())
|
||||||
|
.setFileb64Content(Base64.encodeToString(dbFileBytes, Base64.NO_WRAP));
|
||||||
|
attachmentDTOList.add(dbAttachment);
|
||||||
|
}
|
||||||
|
|
||||||
var mailRequest = new MailRequestDTO()
|
var mailRequest = new MailRequestDTO()
|
||||||
.setTo("developer@integry.it")
|
.setTo("developer@integry.it")
|
||||||
.setMsgText("Questo è una mail che contiene il log del WMS")
|
.setMsgText("Questo è una mail che contiene il log del WMS")
|
||||||
.setSubject("U vuemmeess")
|
.setSubject("U vuemmeess")
|
||||||
.setAttachments(new ArrayList<>());
|
.setAttachments(attachmentDTOList);
|
||||||
|
|
||||||
mailRequest.getAttachments().add(attachment);
|
|
||||||
|
|
||||||
systemRESTConsumer.sendMail(mailRequest, this::closeProgress, ex -> {
|
systemRESTConsumer.sendMail(mailRequest, this::closeProgress, ex -> {
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
@@ -370,7 +400,13 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
htmlContent.append("<hr/>");
|
htmlContent.append("<hr/>");
|
||||||
}
|
}
|
||||||
|
|
||||||
htmlContent.append("\n" + "<script type=\"text/javascript\">\n" + " document.querySelectorAll(\".message\").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));\n" + "</script>\n" + "</body>\n" + "</html>");
|
htmlContent.append("""
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.querySelectorAll(".message").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>""");
|
||||||
|
|
||||||
return htmlContent.toString();
|
return htmlContent.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.MagazzinoAutomaticoPickItemRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemsRequestDTO;
|
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.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.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
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.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.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.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
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.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
@@ -95,6 +94,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
|
private String mDefaultRagSocOfUL = null;
|
||||||
private GestioneEnum mDefaultGestioneOfUL = null;
|
private GestioneEnum mDefaultGestioneOfUL = null;
|
||||||
private int mDefaultSegnoCol = -1;
|
private int mDefaultSegnoCol = -1;
|
||||||
private String mDefaultCodMdep = null;
|
private String mDefaultCodMdep = null;
|
||||||
@@ -205,6 +205,12 @@ public class SpedizioneViewModel {
|
|||||||
private void initDefaultVars() {
|
private void initDefaultVars() {
|
||||||
if (this.mTestateOrdini != null && this.mTestateOrdini.size() > 0) {
|
if (this.mTestateOrdini != null && this.mTestateOrdini.size() > 0) {
|
||||||
|
|
||||||
|
List<String> foundRagSoc = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getRagSocOrd).distinctBy(x -> x).toList();
|
||||||
|
|
||||||
|
if (foundRagSoc != null && foundRagSoc.size() == 1) {
|
||||||
|
mDefaultRagSocOfUL = foundRagSoc.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (mDefaultGestioneOfUL == null) {
|
if (mDefaultGestioneOfUL == null) {
|
||||||
//Definizione della gestione collo di default
|
//Definizione della gestione collo di default
|
||||||
List<GestioneEnum> foundGestioni = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getGestioneEnum).withoutNulls().distinct().toList();
|
List<GestioneEnum> foundGestioni = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getGestioneEnum).withoutNulls().distinct().toList();
|
||||||
@@ -1230,6 +1236,7 @@ public class SpedizioneViewModel {
|
|||||||
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(createdUDS, mTestateOrdini);
|
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(createdUDS, mTestateOrdini);
|
||||||
|
|
||||||
this.mCurrentMtbColt = createdUDS;
|
this.mCurrentMtbColt = createdUDS;
|
||||||
|
this.mCurrentMtbColt.setRagSocCliente(mDefaultRagSocOfUL);
|
||||||
this.mIsNewLU = true;
|
this.mIsNewLU = true;
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
@@ -1464,11 +1471,8 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void checkIfShouldBeDeleted(Runnable onDeleted, Runnable onContinue) {
|
private void checkIfShouldBeDeleted(Runnable onDeleted, Runnable onContinue) {
|
||||||
var requestDto =
|
|
||||||
new CanUDSBeDeletedRequestDTO()
|
|
||||||
.setMtbColt(this.mCurrentMtbColt);
|
|
||||||
|
|
||||||
this.mColliSpedizioneRESTConsumer.canUDSBeDeleted(requestDto,
|
this.mColliMagazzinoRESTConsumer.canULBeDeleted(this.mCurrentMtbColt,
|
||||||
canBeDeleted -> {
|
canBeDeleted -> {
|
||||||
if (canBeDeleted == null || !canBeDeleted)
|
if (canBeDeleted == null || !canBeDeleted)
|
||||||
onContinue.run();
|
onContinue.run();
|
||||||
@@ -1480,8 +1484,8 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private void deleteLU(Runnable onComplete) {
|
private void deleteLU(Runnable onComplete) {
|
||||||
this.mColliSpedizioneRESTConsumer.deleteUDS(
|
this.mColliMagazzinoRESTConsumer.deleteUL(
|
||||||
new DeleteUDSRequestDTO()
|
new DeleteULRequestDTO()
|
||||||
.setMtbColt(this.mCurrentMtbColt),
|
.setMtbColt(this.mCurrentMtbColt),
|
||||||
onComplete, this::sendError);
|
onComplete, this::sendError);
|
||||||
}
|
}
|
||||||
@@ -1600,10 +1604,10 @@ public class SpedizioneViewModel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var printUDSRequestDto = new PrintUDSRequestDTO()
|
var printUDSRequestDto = new PrintULRequestDTO()
|
||||||
.setMtbColts(mtbColtsToPrint);
|
.setMtbColts(mtbColtsToPrint);
|
||||||
|
|
||||||
this.mColliSpedizioneRESTConsumer.printUDS(printUDSRequestDto, onComplete,
|
this.mColliMagazzinoRESTConsumer.printUL(printUDSRequestDto, onComplete,
|
||||||
ex -> this.sendLUPrintError(ex, onComplete));
|
ex -> this.sendLUPrintError(ex, onComplete));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ public class DialogAvailableItemListModel {
|
|||||||
|
|
||||||
private boolean aggiunto;
|
private boolean aggiunto;
|
||||||
|
|
||||||
|
private boolean clickable;
|
||||||
|
private MtbAart originalModel;
|
||||||
|
|
||||||
public boolean isAggiunto() {
|
public boolean isAggiunto() {
|
||||||
return aggiunto;
|
return aggiunto;
|
||||||
}
|
}
|
||||||
@@ -36,9 +39,43 @@ public class DialogAvailableItemListModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isClickable() {
|
||||||
|
return clickable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogAvailableItemListModel setClickable(boolean clickable) {
|
||||||
|
this.clickable = clickable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbAart getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogAvailableItemListModel setOriginalModel(MtbAart originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public static DialogAvailableItemListModel fromMtbAart(MtbAart mtbAart) {
|
public static DialogAvailableItemListModel fromMtbAart(MtbAart mtbAart) {
|
||||||
return new DialogAvailableItemListModel()
|
return new DialogAvailableItemListModel()
|
||||||
.setCodMart(mtbAart.getCodMart())
|
.setCodMart(mtbAart.getCodMart())
|
||||||
.setDescrizioneEstesa(mtbAart.getDescrizioneEstesa());
|
.setDescrizioneEstesa(mtbAart.getDescrizioneEstesa())
|
||||||
|
.setOriginalModel(mtbAart);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
DialogAvailableItemListModel that = (DialogAvailableItemListModel) o;
|
||||||
|
|
||||||
|
return getOriginalModel().equals(that.getOriginalModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return getOriginalModel().hashCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,27 +6,42 @@ import android.view.LayoutInflater;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.SearchView;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.databinding.ObservableList;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||||
|
import com.ravikoradiya.liveadapter.Type;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.BR;
|
import it.integry.integrywmsnative.BR;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogAvailableIntventarioItemsItemModelBinding;
|
||||||
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
||||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||||
|
|
||||||
public class DialogAvailableItemsView extends BaseDialogFragment {
|
public class DialogAvailableItemsView extends BaseDialogFragment {
|
||||||
|
|
||||||
private final List<DialogAvailableItemListModel> mListaArts;
|
private final List<DialogAvailableItemListModel> mListaArts;
|
||||||
|
private final ObservableList<DialogAvailableItemListModel> mFilteredListaArts = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
public DialogAvailableItemsView(List<DialogAvailableItemListModel> listaArts) {
|
private final RunnableArgs<MtbAart> mOnItemSelected;
|
||||||
|
|
||||||
|
|
||||||
|
public DialogAvailableItemsView(List<DialogAvailableItemListModel> listaArts, RunnableArgs<MtbAart> onItemSelected) {
|
||||||
super();
|
super();
|
||||||
this.mListaArts = listaArts;
|
this.mListaArts = listaArts;
|
||||||
|
this.mFilteredListaArts.addAll(mListaArts);
|
||||||
|
|
||||||
|
this.mOnItemSelected = onItemSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -37,7 +52,12 @@ public class DialogAvailableItemsView extends BaseDialogFragment {
|
|||||||
|
|
||||||
binding.titleText.setText(R.string.articoli_disponibili);
|
binding.titleText.setText(R.string.articoli_disponibili);
|
||||||
|
|
||||||
initRecyclerView(binding, mListaArts);
|
for (var item : mListaArts) {
|
||||||
|
if (mOnItemSelected != null) item.setClickable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
initSearchView(binding);
|
||||||
|
initRecyclerView(binding);
|
||||||
|
|
||||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
.setView(binding.getRoot())
|
.setView(binding.getRoot())
|
||||||
@@ -49,17 +69,52 @@ public class DialogAvailableItemsView extends BaseDialogFragment {
|
|||||||
return alertDialog;
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initRecyclerView(DialogChooseArtFromListaArtBinding binding, List<DialogAvailableItemListModel> dataset) {
|
private void initSearchView(DialogChooseArtFromListaArtBinding binding) {
|
||||||
|
binding.searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onQueryTextSubmit(String query) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onQueryTextChange(String newText) {
|
||||||
|
final List<DialogAvailableItemListModel> matchItems = Stream.of(mListaArts)
|
||||||
|
.filter(x -> x.getCodMart().toLowerCase().contains(newText.toLowerCase())
|
||||||
|
|| x.getDescrizioneEstesa().toLowerCase().contains(newText.toLowerCase()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
mFilteredListaArts.clear();
|
||||||
|
mFilteredListaArts.addAll(matchItems);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRecyclerView(DialogChooseArtFromListaArtBinding binding) {
|
||||||
binding.itemsList.setHasFixedSize(true);
|
binding.itemsList.setHasFixedSize(true);
|
||||||
|
|
||||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireContext(), SimpleDividerItemDecoration.VERTICAL);
|
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireContext(), SimpleDividerItemDecoration.VERTICAL);
|
||||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.divider));
|
itemDecorator.setDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.divider));
|
||||||
binding.itemsList.addItemDecoration(itemDecorator);
|
binding.itemsList.addItemDecoration(itemDecorator);
|
||||||
|
|
||||||
|
var itemType = new Type<DialogAvailableItemListModel, DialogAvailableIntventarioItemsItemModelBinding>(R.layout.dialog_available_intventario_items__item_model, BR.item);
|
||||||
|
|
||||||
new LiveAdapter(dataset, BR.item)
|
itemType.areItemSame((x, y) -> x.getOriginalModel().getCodMart().equals(y.getOriginalModel().getCodMart()));
|
||||||
.map(DialogAvailableItemListModel.class, R.layout.dialog_available_intventario_items__item_model)
|
itemType.areContentsTheSame(DialogAvailableItemListModel::equals);
|
||||||
|
|
||||||
|
if (mOnItemSelected != null) {
|
||||||
|
itemType.onClick(x -> {
|
||||||
|
mOnItemSelected.run(x.getBinding().getItem().getOriginalModel());
|
||||||
|
dismiss();
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
new LiveAdapter(mFilteredListaArts)
|
||||||
|
.map(DialogAvailableItemListModel.class, itemType)
|
||||||
.into(binding.itemsList);
|
.into(binding.itemsList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,33 +26,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<!-- <it.integry.integrywmsnative.ui.ElevatedToolbar-->
|
|
||||||
<!-- android:id="@+id/elevated_toolbar"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="wrap_content">-->
|
|
||||||
|
|
||||||
<!-- <androidx.appcompat.widget.Toolbar-->
|
|
||||||
<!-- android:id="@+id/toolbar"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="?attr/actionBarSize">-->
|
|
||||||
|
|
||||||
<!-- <androidx.appcompat.widget.AppCompatImageButton-->
|
|
||||||
<!-- android:id="@+id/reset_values"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="50dp"-->
|
|
||||||
<!-- android:layout_gravity="end"-->
|
|
||||||
<!-- android:adjustViewBounds="true"-->
|
|
||||||
<!-- android:scaleType="fitCenter"-->
|
|
||||||
<!-- android:src="@drawable/ic_black_upload"-->
|
|
||||||
<!-- android:backgroundTint="@android:color/transparent"-->
|
|
||||||
<!-- android:onClick="@{() -> view.requestExportConfirm()}"-->
|
|
||||||
<!-- android:tint="?attr/colorControlNormal" />-->
|
|
||||||
|
|
||||||
<!-- </androidx.appcompat.widget.Toolbar>-->
|
|
||||||
|
|
||||||
<!-- </it.integry.integrywmsnative.ui.ElevatedToolbar>-->
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="8dp"
|
android:padding="8dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp">
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||||
@@ -30,10 +31,20 @@
|
|||||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:text="@string/dialog_choose_art_from_lista_art" />
|
android:text="@string/dialog_choose_art_from_lista_art" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SearchView
|
||||||
|
android:id="@+id/search_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:hint="@string/search"
|
||||||
|
app:iconifiedByDefault="false"/>
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/items_list"
|
android:id="@+id/items_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -20,11 +20,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp"
|
android:padding="8dp"
|
||||||
android:paddingBottom="8dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:background="?android:attr/selectableItemBackground">
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -254,7 +254,7 @@
|
|||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{UtilityNumber.decimalToString(view.articolo.merceDaRic)}"
|
android:text="@{UtilityNumber.decimalToString(view.articolo.getCnfDaRic())}"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="1" />
|
tools:text="1" />
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
android:text="@{UtilityNumber.decimalToString(view.articolo.getCnfDaRic())}"
|
android:text="@{UtilityNumber.decimalToString(view.articolo.merceDaRic)}"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}"
|
android:onClick="@{() -> item.selected.toggle()}"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}"
|
android:onClick="@{() -> item.selected.toggle()}"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="@{item.enabled}"
|
android:clickable="@{item.enabled}"
|
||||||
android:onClick="@{() -> item.selected.toggle()}">
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,12 @@
|
|||||||
android:contentDescription="@string/action_export"
|
android:contentDescription="@string/action_export"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/search_art"
|
||||||
|
android:title="@string/search"
|
||||||
|
android:icon="@drawable/ic_search_black_24dp"
|
||||||
|
android:contentDescription="@string/search"
|
||||||
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
@@ -460,4 +460,5 @@
|
|||||||
<string name="confirm_export_invalid_product"><![CDATA[Uno o più articoli ordinati non sono presenti nella lista selezionata! <br>Sei sicuro di voler continuare?]]></string>
|
<string name="confirm_export_invalid_product"><![CDATA[Uno o più articoli ordinati non sono presenti nella lista selezionata! <br>Sei sicuro di voler continuare?]]></string>
|
||||||
<string name="expired_list_session"><![CDATA[La lista di prodotti è stata caricata troppo tempo fa!]]></string>
|
<string name="expired_list_session"><![CDATA[La lista di prodotti è stata caricata troppo tempo fa!]]></string>
|
||||||
<string name="grid_details">Griglie disponibili</string>
|
<string name="grid_details">Griglie disponibili</string>
|
||||||
|
<string name="searchbar_hint">Cerca</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -469,4 +469,5 @@
|
|||||||
<string name="confirm_export_invalid_product"><![CDATA[One or more ordered products are not available in the selected list! <br> Do you wish to continue?]]></string>
|
<string name="confirm_export_invalid_product"><![CDATA[One or more ordered products are not available in the selected list! <br> Do you wish to continue?]]></string>
|
||||||
<string name="expired_list_session"><![CDATA[The product list was loaded too much time ago!]]></string>
|
<string name="expired_list_session"><![CDATA[The product list was loaded too much time ago!]]></string>
|
||||||
<string name="grid_details">Available grids</string>
|
<string name="grid_details">Available grids</string>
|
||||||
|
<string name="searchbar_hint">Search</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.8.0'
|
kotlin_version = '1.8.0'
|
||||||
agp_version = '8.0.1'
|
agp_version = '8.0.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ public class ZebraBarcodeReader implements BarcodeReaderInterface {
|
|||||||
return true;
|
return true;
|
||||||
} else if (model.equalsIgnoreCase("TC20")) {
|
} else if (model.equalsIgnoreCase("TC20")) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if (model.equalsIgnoreCase("MBA5")) {
|
||||||
|
return true;
|
||||||
} else return false;
|
} else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ public class ZebraBarcodeTypeMapper {
|
|||||||
case "LABEL-TYPE-CODE39":
|
case "LABEL-TYPE-CODE39":
|
||||||
return BarcodeType.CODE39;
|
return BarcodeType.CODE39;
|
||||||
|
|
||||||
|
|
||||||
|
case "LABEL-TYPE-IATA2OF5":
|
||||||
|
return BarcodeType.IATA_2OF5;
|
||||||
|
case "LABEL-TYPE-I2OF5":
|
||||||
|
return BarcodeType.INTERLEAVED_2OF5;
|
||||||
|
|
||||||
case "LABEL-TYPE-EAN13":
|
case "LABEL-TYPE-EAN13":
|
||||||
return BarcodeType.EAN13;
|
return BarcodeType.EAN13;
|
||||||
case "LABEL-TYPE-EAN8":
|
case "LABEL-TYPE-EAN8":
|
||||||
|
|||||||
Reference in New Issue
Block a user