Completata gestione verifica giacenze
This commit is contained in:
parent
be1b993239
commit
80dac639da
2
.idea/deploymentTargetSelector.xml
generated
2
.idea/deploymentTargetSelector.xml
generated
@ -4,7 +4,7 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-01-27T15:42:06.256113400Z">
|
||||
<DropdownSelection timestamp="2025-03-06T12:39:02.626545300Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
||||
|
||||
@ -192,7 +192,8 @@ dependencies {
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
|
||||
//Barcode generator
|
||||
implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
||||
// implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
||||
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -89,6 +89,8 @@ import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.selectArt
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaComponent;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaModule;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.dialogs.DialogScanGrigliaAcquistoComponent;
|
||||
import it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeComponent;
|
||||
import it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeModule;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeComponent;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeModule;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsComponent;
|
||||
@ -114,6 +116,8 @@ import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetM
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_commessa.DialogAskCommessaComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_livello_posizione.DialogAskLivelloPosizioneComponent;
|
||||
@ -136,6 +140,8 @@ import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBat
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.extra_info.DialogExtraInfoComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.extra_info.DialogExtraInfoModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
||||
@ -239,7 +245,10 @@ import it.integry.integrywmsnative.view.dialogs.update_available.DialogUpdateAva
|
||||
DialogSwitchUserDepoModule.class,
|
||||
DialogUpdateAvailableModule.class,
|
||||
DialogAskPositionOfLUModule.class,
|
||||
DialogAskLivelloPosizioneModule.class
|
||||
DialogAskLivelloPosizioneModule.class,
|
||||
VerificaGiacenzeModule.class,
|
||||
DialogExtraInfoModule.class,
|
||||
DialogAskDepositoModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@ -402,6 +411,11 @@ public interface MainApplicationComponent {
|
||||
|
||||
DialogAskLivelloPosizioneComponent.Factory dialogAskLivelloPosizioneComponent();
|
||||
|
||||
VerificaGiacenzeComponent.Factory verificaGiacenzeComponent();
|
||||
|
||||
DialogExtraInfoComponent.Factory dialogExtraInfoComponent();
|
||||
|
||||
DialogAskDepositoComponent.Factory dialogAskDepositoComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||
@ -162,8 +163,8 @@ public class MainApplicationModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ArticoloRESTConsumer provideArticoloRESTConsumer(RESTBuilder restBuilder, SystemRESTConsumer systemRESTConsumer) {
|
||||
return new ArticoloRESTConsumer(restBuilder, systemRESTConsumer);
|
||||
ArticoloRESTConsumer provideArticoloRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService, SystemRESTConsumer systemRESTConsumer) {
|
||||
return new ArticoloRESTConsumer(restBuilder, executorService, systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@ -238,8 +239,8 @@ public class MainApplicationModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
SystemRESTConsumer provideSystemRESTConsumer(ExecutorService executorService, RESTBuilder restBuilder) {
|
||||
return new SystemRESTConsumer(executorService, restBuilder);
|
||||
SystemRESTConsumer provideSystemRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService) {
|
||||
return new SystemRESTConsumer(restBuilder, executorService);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@ -268,8 +269,14 @@ public class MainApplicationModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
GiacenzaRESTConsumer provideGiacenzaRESTConsumer(RESTBuilder restBuilder, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new GiacenzaRESTConsumer(restBuilder, articoloRESTConsumer);
|
||||
GiacenzaRESTConsumer provideGiacenzaRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new GiacenzaRESTConsumer(restBuilder, executorService, articoloRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
GiacenzaPvRESTConsumer provideGiacenzaPvRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService) {
|
||||
return new GiacenzaPvRESTConsumer(restBuilder, executorService);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@ -19,6 +19,7 @@ import it.integry.integrywmsnative.gest.prod_riposizionamento_da_prod.ProdRiposi
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferFragment;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
||||
import it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeFragment;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloView;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
||||
@ -242,6 +243,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_purchase_orders_pv)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_purchase_orders_pv)
|
||||
.setFragmentFactory(PVOrdiniAcquistoGrigliaFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setCodMenu("MG058")
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_pv_doc_interni)
|
||||
@ -250,6 +252,14 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setDrawerIcon(R.drawable.ic_documents_outline)
|
||||
.setFragmentFactory(DocInterniFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setCodMenu("MG075")
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_pv_verifica_giacenze)
|
||||
.setTitleText(R.string.verifica_giacenze_menu)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_verifica_giacenze)
|
||||
.setDrawerIcon(R.drawable.ic_drawer_verifica_giacenze)
|
||||
.setFragmentFactory(VerificaGiacenzeFragment::newInstance))
|
||||
|
||||
// .addItem(new MenuItem()
|
||||
// .setID(it.integry.integrywmsnative.R.id.nav_pv_ordini_acquisto_trasmessi)
|
||||
// .setTitleText(it.integry.integrywmsnative.R.string.transmitted_orders)
|
||||
|
||||
@ -22,14 +22,18 @@ 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.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
||||
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.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
|
||||
@Database(entities = {
|
||||
ArticoloGriglia.class,
|
||||
@ -38,10 +42,12 @@ import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
ArticoloOrdine.class,
|
||||
SqlMtbColt.class,
|
||||
SqlMtbColr.class,
|
||||
InventarioRoomDTO.class,
|
||||
InventarioRowRoomDTO.class
|
||||
InventarioEntity.class,
|
||||
InventarioRowRoomDTO.class,
|
||||
VerificaGiacenzeEntity.class,
|
||||
VerificaGiacenzeRowEntity.class
|
||||
},
|
||||
version = 17)
|
||||
version = 18)
|
||||
@TypeConverters({
|
||||
DateConverter.class,
|
||||
BigDecimalConverter.class,
|
||||
@ -70,7 +76,8 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
.addMigrations(MIGRATION_13_14)
|
||||
.addMigrations(MIGRATION_14_15)
|
||||
.addMigrations(MIGRATION_15_16)
|
||||
.addMigrations(MIGRATION_16_17);
|
||||
.addMigrations(MIGRATION_16_17)
|
||||
.addMigrations(MIGRATION_17_18);
|
||||
|
||||
sInstance = builder.build();
|
||||
}
|
||||
@ -95,6 +102,10 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
public abstract InventarioRowDao inventarioRowDao();
|
||||
|
||||
public abstract VerificaGiacenzeDao verificaGiacenzeDao();
|
||||
|
||||
public abstract VerificaGiacenzeRowDao verificaGiacenzeRowDao();
|
||||
|
||||
|
||||
|
||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||
@ -182,4 +193,27 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
database.execSQL("DROP TABLE _inventario_rows_old;");
|
||||
}
|
||||
};
|
||||
static final Migration MIGRATION_17_18 = new Migration(17, 18) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
database.execSQL("CREATE TABLE IF NOT EXISTS verifica_giacenze (_id INTEGER PRIMARY KEY AUTOINCREMENT, cod_mdep TEXT NOT NULL, data INTEGER, remote_sync_date INTEGER);");
|
||||
database.execSQL("CREATE INDEX IF NOT EXISTS index_verifica_giacenze__id ON verifica_giacenze (_id);");
|
||||
|
||||
database.execSQL("CREATE TABLE IF NOT EXISTS verifica_giacenze_rows (" +
|
||||
"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
|
||||
"parent_id INTEGER, " +
|
||||
"created_at INTEGER DEFAULT CURRENT_TIMESTAMP, " +
|
||||
"cod_mart TEXT, " +
|
||||
"partita_mag TEXT, " +
|
||||
"descrizione TEXT, " +
|
||||
"qta REAL NOT NULL DEFAULT 0, " +
|
||||
"num_cnf REAL NOT NULL DEFAULT 0, " +
|
||||
"qta_cnf REAL NOT NULL DEFAULT 0, " +
|
||||
"scan_cod_barre TEXT, " +
|
||||
"remote_sync_date INTEGER, " +
|
||||
"FOREIGN KEY(parent_id) REFERENCES verifica_giacenze(_id) ON UPDATE NO ACTION ON DELETE CASCADE );");
|
||||
database.execSQL("CREATE INDEX IF NOT EXISTS index_verifica_giacenze_rows__id ON verifica_giacenze_rows (_id)");
|
||||
database.execSQL("CREATE INDEX IF NOT EXISTS index_verifica_giacenze_rows_parent_id ON verifica_giacenze_rows (parent_id)");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -18,6 +18,8 @@ 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.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
||||
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.GrigliaRepository;
|
||||
@ -32,10 +34,17 @@ import it.integry.integrywmsnative.core.data_store.db.repository.datasource.SqlM
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.datasource.SqlMtbColtDataSource;
|
||||
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.VerificaGiacenzeRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGiacenzeRowRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.InventarioLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.InventarioRowLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.VerificaGiacenzeLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.VerificaGiacenzeRowLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
||||
import it.integry.integrywmsnative.core.mapper.InventarioRowMapper;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeRowMapper;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
||||
|
||||
@Module
|
||||
@ -108,6 +117,11 @@ public class RoomModule {
|
||||
return appDatabase.inventarioRowDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioMapper providesInventarioMapper(InventarioRowMapper inventarioRowMapper) {
|
||||
return new InventarioMapper(inventarioRowMapper);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
@ -117,8 +131,26 @@ public class RoomModule {
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioMapper providesInventarioMapper(InventarioRowMapper inventarioRowMapper) {
|
||||
return new InventarioMapper(inventarioRowMapper);
|
||||
VerificaGiacenzeDao providesVerificaGiacenzeDao(AppDatabase appDatabase) {
|
||||
return appDatabase.verificaGiacenzeDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
VerificaGiacenzeRowDao providesVerificaGiacenzeRowDao(AppDatabase appDatabase) {
|
||||
return appDatabase.verificaGiacenzeRowDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
VerificaGiacenzeMapper providesVerificaGiacenzeMapper(VerificaGiacenzeRowMapper verificaGiacenzeRowMapper) {
|
||||
return new VerificaGiacenzeMapper(verificaGiacenzeRowMapper);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
VerificaGiacenzeRowMapper providesVerificaGiacenzeRowMapper() {
|
||||
return new VerificaGiacenzeRowMapper();
|
||||
}
|
||||
|
||||
|
||||
@ -182,4 +214,20 @@ public class RoomModule {
|
||||
return new InventarioRowRepository(inventarioRowLocalDataSource, inventarioRESTConsumer, inventarioRowMapper, handler);
|
||||
}
|
||||
|
||||
@Provides
|
||||
VerificaGiacenzeRepository providesVerificaGiacenzeRepository(ExecutorService executorService, Handler handler,
|
||||
VerificaGiacenzeLocalDataSource verificaGiacenzeLocalDataSource,
|
||||
GiacenzaPvRESTConsumer giacenzaPvRESTConsumer,
|
||||
VerificaGiacenzeMapper verificaGiacenzeMapper) {
|
||||
return new VerificaGiacenzeRepository(verificaGiacenzeLocalDataSource, giacenzaPvRESTConsumer, verificaGiacenzeMapper, handler, executorService);
|
||||
}
|
||||
|
||||
@Provides
|
||||
VerificaGiacenzeRowRepository providesVerificaGiacenzeRowRepository(ExecutorService executorService, Handler handler,
|
||||
VerificaGiacenzeRowLocalDataSource verificaGiacenzeRowLocalDataSource,
|
||||
GiacenzaPvRESTConsumer giacenzaPvRESTConsumer,
|
||||
VerificaGiacenzeRowMapper verificaGiacenzeRowMapper) {
|
||||
return new VerificaGiacenzeRowRepository(verificaGiacenzeRowLocalDataSource, giacenzaPvRESTConsumer, verificaGiacenzeRowMapper, handler, executorService);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,21 +7,21 @@ import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityDaoInterface;
|
||||
|
||||
@Dao
|
||||
public interface InventarioDao extends EntityDaoInterface<InventarioRoomDTO> {
|
||||
public interface InventarioDao extends EntityDaoInterface<InventarioEntity> {
|
||||
|
||||
|
||||
@Query("SELECT * FROM " + InventarioRoomDTO.TABLE_NAME +
|
||||
@Query("SELECT * FROM " + InventarioEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))")
|
||||
List<InventarioRoomDTO> selectAll(boolean toBeSync);
|
||||
List<InventarioEntity> selectAll(boolean toBeSync);
|
||||
|
||||
|
||||
@Query("SELECT * FROM " + InventarioRoomDTO.TABLE_NAME +
|
||||
@Query("SELECT * FROM " + InventarioEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||
" ORDER BY " + InventarioRoomDTO.Columns.DATA_INVENTARIO + " DESC")
|
||||
Flowable<List<InventarioRoomDTO>> selectAllFlowable(boolean toBeSync);
|
||||
" ORDER BY " + InventarioEntity.Columns.DATA_INVENTARIO + " DESC")
|
||||
Flowable<List<InventarioEntity>> selectAllFlowable(boolean toBeSync);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Transaction;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityDaoInterface;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.VerificaGiacenzeWithRowsWrapper;
|
||||
|
||||
@Dao
|
||||
public interface VerificaGiacenzeDao extends EntityDaoInterface<VerificaGiacenzeEntity> {
|
||||
|
||||
|
||||
@Transaction
|
||||
@Query("SELECT * FROM " + VerificaGiacenzeEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))")
|
||||
List<VerificaGiacenzeWithRowsWrapper> selectAll(boolean toBeSync);
|
||||
|
||||
@Transaction
|
||||
@Query("SELECT * FROM " + VerificaGiacenzeEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||
" ORDER BY " + VerificaGiacenzeEntity.Columns.DATA + " DESC")
|
||||
Flowable<List<VerificaGiacenzeWithRowsWrapper>> selectAllFlowable(boolean toBeSync);
|
||||
|
||||
@Transaction
|
||||
@Query("SELECT * FROM " + VerificaGiacenzeEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||
" ORDER BY " + VerificaGiacenzeEntity.Columns.DATA + " DESC" +
|
||||
" LIMIT 1")
|
||||
VerificaGiacenzeWithRowsWrapper selectLast(boolean toBeSync);
|
||||
|
||||
@Query("SELECT COALESCE(strftime('%s', 'now') - MAX(" + VerificaGiacenzeRowEntity.Columns.CREATED_AT + ") < :maxMinutes * 60, 0) as any_verifica_to_be_recovered" +
|
||||
" FROM " + VerificaGiacenzeRowEntity.TABLE_NAME +
|
||||
" WHERE (" + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL)")
|
||||
boolean isAnotherVerificaGiacenzeInProgress(int maxMinutes);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityDaoInterface;
|
||||
|
||||
@Dao
|
||||
public interface VerificaGiacenzeRowDao extends EntityDaoInterface<VerificaGiacenzeRowEntity> {
|
||||
|
||||
|
||||
@Query("SELECT * FROM " + VerificaGiacenzeRowEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))")
|
||||
List<VerificaGiacenzeRowEntity> selectAll(boolean toBeSync);
|
||||
|
||||
@Query("SELECT * FROM " + VerificaGiacenzeRowEntity.TABLE_NAME +
|
||||
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))")
|
||||
Flowable<List<VerificaGiacenzeRowEntity>> selectAllFlowable(boolean toBeSync);
|
||||
|
||||
}
|
||||
@ -12,8 +12,8 @@ import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInterface;
|
||||
|
||||
@Entity(tableName = InventarioRoomDTO.TABLE_NAME)
|
||||
public class InventarioRoomDTO extends BaseSyncDTO implements EntityModelInterface {
|
||||
@Entity(tableName = InventarioEntity.TABLE_NAME)
|
||||
public class InventarioEntity extends BaseSyncDTO implements EntityModelInterface {
|
||||
|
||||
public static final String TABLE_NAME = "inventari";
|
||||
|
||||
@ -4,7 +4,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
@ -12,10 +11,11 @@ import java.time.LocalDateTime;
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInterface;
|
||||
|
||||
@Entity(
|
||||
inheritSuperIndices = true,
|
||||
tableName = InventarioRowRoomDTO.TABLE_NAME,
|
||||
foreignKeys = {
|
||||
@ForeignKey(
|
||||
entity = InventarioRoomDTO.class,
|
||||
entity = InventarioEntity.class,
|
||||
parentColumns = {BaseSyncDTO.Columns.ID},
|
||||
childColumns = {InventarioRowRoomDTO.Columns.PARENT_ID},
|
||||
onDelete = ForeignKey.CASCADE
|
||||
@ -40,13 +40,6 @@ public class InventarioRowRoomDTO extends BaseSyncDTO implements EntityModelInte
|
||||
public static final String ZONA = "zona";
|
||||
}
|
||||
|
||||
/**
|
||||
* The unique ID
|
||||
*/
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(index = true, name = BaseSyncDTO.Columns.ID)
|
||||
private Long id;
|
||||
|
||||
@ColumnInfo(index = true, name = Columns.PARENT_ID)
|
||||
private Long parentId;
|
||||
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.Ignore;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInterface;
|
||||
|
||||
@Entity(
|
||||
inheritSuperIndices = true,
|
||||
tableName = VerificaGiacenzeEntity.TABLE_NAME
|
||||
)
|
||||
public class VerificaGiacenzeEntity extends BaseSyncDTO implements EntityModelInterface {
|
||||
|
||||
public static final String TABLE_NAME = "verifica_giacenze";
|
||||
|
||||
public static class Columns {
|
||||
public static final String COD_MDEP = "cod_mdep";
|
||||
public static final String DATA = "data";
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@ColumnInfo(name = VerificaGiacenzeEntity.Columns.COD_MDEP)
|
||||
private String codMdep;
|
||||
|
||||
@ColumnInfo(name = VerificaGiacenzeEntity.Columns.DATA)
|
||||
private LocalDateTime data;
|
||||
|
||||
@Ignore
|
||||
private List<VerificaGiacenzeRowEntity> verificaGiacenzeRowList;
|
||||
|
||||
@NonNull
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public void setCodMdep(@NonNull String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
}
|
||||
|
||||
public LocalDateTime getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(LocalDateTime data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public List<VerificaGiacenzeRowEntity> getVerificaGiacenzeRowList() {
|
||||
return verificaGiacenzeRowList;
|
||||
}
|
||||
|
||||
public void setVerificaGiacenzeRowList(List<VerificaGiacenzeRowEntity> verificaGiacenzeRowList) {
|
||||
this.verificaGiacenzeRowList = verificaGiacenzeRowList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
VerificaGiacenzeEntity that = (VerificaGiacenzeEntity) o;
|
||||
return getId().equals(that.getId()) && getCodMdep().equals(that.getCodMdep()) && Objects.equals(getData(), that.getData()) && Objects.equals(getVerificaGiacenzeRowList(), that.getVerificaGiacenzeRowList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = getId().hashCode();
|
||||
result = 31 * result + getCodMdep().hashCode();
|
||||
result = 31 * result + Objects.hashCode(getData());
|
||||
result = 31 * result + Objects.hashCode(getVerificaGiacenzeRowList());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,197 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInterface;
|
||||
|
||||
@Entity(
|
||||
inheritSuperIndices = true,
|
||||
tableName = VerificaGiacenzeRowEntity.TABLE_NAME,
|
||||
foreignKeys = {
|
||||
@ForeignKey(
|
||||
entity = VerificaGiacenzeEntity.class,
|
||||
parentColumns = {BaseSyncDTO.Columns.ID},
|
||||
childColumns = {VerificaGiacenzeRowEntity.Columns.PARENT_ID},
|
||||
onDelete = ForeignKey.CASCADE
|
||||
)
|
||||
}
|
||||
)
|
||||
public class VerificaGiacenzeRowEntity extends BaseSyncDTO implements EntityModelInterface, Cloneable {
|
||||
public static final String TABLE_NAME = "verifica_giacenze_rows";
|
||||
|
||||
public static class Columns {
|
||||
public static final String PARENT_ID = "parent_id";
|
||||
public static final String CREATED_AT = "created_at";
|
||||
public static final String COD_MART = "cod_mart";
|
||||
public static final String PARTITA_MAG = "partita_mag";
|
||||
public static final String DESCRIZIONE = "descrizione";
|
||||
public static final String QTA = "qta";
|
||||
public static final String NUM_CNF = "num_cnf";
|
||||
public static final String QTA_CNF = "qta_cnf";
|
||||
public static final String SCAN_COD_BARRE = "scan_cod_barre";
|
||||
}
|
||||
|
||||
@ColumnInfo(index = true, name = Columns.PARENT_ID)
|
||||
private Long parentId;
|
||||
|
||||
@ColumnInfo(name = Columns.CREATED_AT, defaultValue = "CURRENT_TIMESTAMP")
|
||||
private LocalDateTime createdAt = LocalDateTime.now();
|
||||
|
||||
@ColumnInfo(name = Columns.COD_MART)
|
||||
private String codMart;
|
||||
|
||||
@ColumnInfo(name = Columns.PARTITA_MAG)
|
||||
private String partitaMag;
|
||||
|
||||
@ColumnInfo(name = Columns.DESCRIZIONE)
|
||||
private String descrizione;
|
||||
|
||||
@NonNull
|
||||
@ColumnInfo(name = Columns.QTA, defaultValue = "0")
|
||||
private BigDecimal qta;
|
||||
|
||||
@NonNull
|
||||
@ColumnInfo(name = Columns.NUM_CNF, defaultValue = "0")
|
||||
private BigDecimal numConf;
|
||||
|
||||
@NonNull
|
||||
@ColumnInfo(name = Columns.QTA_CNF, defaultValue = "0")
|
||||
private BigDecimal qtaConf;
|
||||
|
||||
@ColumnInfo(name = Columns.SCAN_COD_BARRE)
|
||||
private String scanCodBarre;
|
||||
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(LocalDateTime createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public void setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public void setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public BigDecimal getQta() {
|
||||
return qta;
|
||||
}
|
||||
|
||||
public void setQta(@NonNull BigDecimal qta) {
|
||||
this.qta = qta;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public BigDecimal getNumConf() {
|
||||
return numConf;
|
||||
}
|
||||
|
||||
public void setNumConf(@NonNull BigDecimal numConf) {
|
||||
this.numConf = numConf;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public BigDecimal getQtaConf() {
|
||||
return qtaConf;
|
||||
}
|
||||
|
||||
public void setQtaConf(@NonNull BigDecimal qtaConf) {
|
||||
this.qtaConf = qtaConf;
|
||||
}
|
||||
|
||||
public String getScanCodBarre() {
|
||||
return scanCodBarre;
|
||||
}
|
||||
|
||||
public void setScanCodBarre(String scanCodBarre) {
|
||||
this.scanCodBarre = scanCodBarre;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
VerificaGiacenzeRowEntity that = (VerificaGiacenzeRowEntity) o;
|
||||
return getId().equals(that.getId()) && getParentId().equals(that.getParentId()) && getCodMart().equals(that.getCodMart()) && Objects.equals(getPartitaMag(), that.getPartitaMag()) && getQta().equals(that.getQta()) && getNumConf().equals(that.getNumConf()) && getQtaConf().equals(that.getQtaConf()) && Objects.equals(getScanCodBarre(), that.getScanCodBarre());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = getId().hashCode();
|
||||
result = 31 * result + getParentId().hashCode();
|
||||
result = 31 * result + getCodMart().hashCode();
|
||||
result = 31 * result + Objects.hashCode(getPartitaMag());
|
||||
result = 31 * result + getQta().hashCode();
|
||||
result = 31 * result + getNumConf().hashCode();
|
||||
result = 31 * result + getQtaConf().hashCode();
|
||||
result = 31 * result + Objects.hashCode(getScanCodBarre());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public VerificaGiacenzeRowEntity clone() throws CloneNotSupportedException {
|
||||
try {
|
||||
VerificaGiacenzeRowEntity clone = (VerificaGiacenzeRowEntity) super.clone();
|
||||
|
||||
// Clona ID
|
||||
clone.setId(getId() != null ? new Long(getId()) : null);
|
||||
clone.setParentId(getParentId() != null ? new Long(getParentId()) : null);
|
||||
|
||||
// Clona le stringhe
|
||||
clone.setCodMart(getCodMart() != null ? new String(getCodMart()) : null);
|
||||
clone.setPartitaMag(getPartitaMag() != null ? new String(getPartitaMag()) : null);
|
||||
clone.setDescrizione(getDescrizione() != null ? new String(getDescrizione()) : null);
|
||||
clone.setScanCodBarre(getScanCodBarre() != null ? new String(getScanCodBarre()) : null);
|
||||
|
||||
// Clona i BigDecimal
|
||||
clone.setQta(getQta() != null ? new BigDecimal(getQta().toString()) : null);
|
||||
clone.setNumConf(getNumConf() != null ? new BigDecimal(getNumConf().toString()) : null);
|
||||
clone.setQtaConf(getQtaConf() != null ? new BigDecimal(getQtaConf().toString()) : null);
|
||||
|
||||
return clone;
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new AssertionError(); // Can't happen
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -15,7 +15,7 @@ import java.util.concurrent.ExecutorService;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.InventarioLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
||||
@ -24,13 +24,13 @@ import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
||||
|
||||
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
||||
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioEntity, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
||||
|
||||
private final ExecutorService executorService;
|
||||
|
||||
private final Handler handler;
|
||||
|
||||
private final MutableLiveData<List<InventarioRoomDTO>> internalLiveData = new MutableLiveData<>();
|
||||
private final MutableLiveData<List<InventarioEntity>> internalLiveData = new MutableLiveData<>();
|
||||
|
||||
@Inject
|
||||
public InventarioRepository(InventarioLocalDataSource localDataSource,
|
||||
@ -44,7 +44,7 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
||||
}
|
||||
|
||||
|
||||
public LiveData<List<InventarioRoomDTO>> retrieve(Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
public LiveData<List<InventarioEntity>> retrieve(Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
localDataSource.makeSynchronousRetrieveAllLive(false)
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribe(internalLiveData::postValue);
|
||||
@ -84,13 +84,13 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
||||
});
|
||||
}
|
||||
|
||||
public void insert(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
public void insert(InventarioEntity inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
localDataSource.makeInsertRequest(inventarioDTO, localResult -> {
|
||||
if (onComplete != null) handler.post(onComplete);
|
||||
}, onError);
|
||||
}
|
||||
|
||||
public void export(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
public void export(InventarioEntity inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
remoteDataSource.makeInsertRequest(dataMapper.mapRoomToRest(inventarioDTO), () -> {
|
||||
inventarioDTO.setRemoteSyncDate(new Date());
|
||||
|
||||
@ -100,7 +100,7 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
||||
}, onError);
|
||||
}
|
||||
|
||||
public void delete(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
public void delete(InventarioEntity inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||
localDataSource.makeDeleteRequest(inventarioDTO, onComplete, onError);
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.respository_new;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.VerificaGiacenzeLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.VerificaGiacenzeDTO;
|
||||
|
||||
public class VerificaGiacenzeRepository extends _BaseRepository<VerificaGiacenzeDTO, VerificaGiacenzeEntity, VerificaGiacenzeMapper, VerificaGiacenzeLocalDataSource, GiacenzaPvRESTConsumer> {
|
||||
|
||||
private final ExecutorService executorService;
|
||||
private final Handler handler;
|
||||
|
||||
|
||||
public VerificaGiacenzeRepository(VerificaGiacenzeLocalDataSource localDataSource,
|
||||
GiacenzaPvRESTConsumer remoteDataSource,
|
||||
VerificaGiacenzeMapper dataMapper,
|
||||
Handler handler,
|
||||
ExecutorService executorService) {
|
||||
super(dataMapper, localDataSource, remoteDataSource);
|
||||
this.handler = handler;
|
||||
this.executorService = executorService;
|
||||
}
|
||||
|
||||
|
||||
public List<VerificaGiacenzeEntity> retrieve() {
|
||||
return localDataSource.makeSynchronousRetrieveAllRequest(false);
|
||||
}
|
||||
|
||||
public VerificaGiacenzeEntity retrieveLast() {
|
||||
return localDataSource.makeSynchronousRetrieveLastRequest(false);
|
||||
}
|
||||
|
||||
|
||||
public boolean isAnotherVerificaGiacenzeInProgress(int maxMinutes) {
|
||||
return localDataSource.isAnotherVerificaGiacenzeInProgress(maxMinutes);
|
||||
}
|
||||
|
||||
public void clearPreviousSessions() {
|
||||
var entities = retrieve();
|
||||
for (var entity : entities) {
|
||||
localDataSource.makeSynchronousDeleteRequest(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void insert(VerificaGiacenzeEntity entity) {
|
||||
localDataSource.makeSynchronousInsertRequest(entity);
|
||||
}
|
||||
|
||||
public void delete(VerificaGiacenzeEntity entity) {
|
||||
localDataSource.makeSynchronousDeleteRequest(entity);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.respository_new;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.VerificaGiacenzeRowLocalDataSource;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeRowMapper;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.VerificaGiacenzeRowDTO;
|
||||
|
||||
public class VerificaGiacenzeRowRepository extends _BaseRepository<VerificaGiacenzeRowDTO, VerificaGiacenzeRowEntity, VerificaGiacenzeRowMapper, VerificaGiacenzeRowLocalDataSource, GiacenzaPvRESTConsumer> {
|
||||
|
||||
private final ExecutorService executorService;
|
||||
private final Handler handler;
|
||||
|
||||
|
||||
public VerificaGiacenzeRowRepository(VerificaGiacenzeRowLocalDataSource localDataSource,
|
||||
GiacenzaPvRESTConsumer remoteDataSource,
|
||||
VerificaGiacenzeRowMapper dataMapper,
|
||||
Handler handler,
|
||||
ExecutorService executorService) {
|
||||
super(dataMapper, localDataSource, remoteDataSource);
|
||||
this.handler = handler;
|
||||
this.executorService = executorService;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void insertSynchronized(VerificaGiacenzeRowEntity entity) {
|
||||
localDataSource.makeSynchronousInsertRequest(entity);
|
||||
}
|
||||
|
||||
public void insert(VerificaGiacenzeRowEntity entity, RunnableArgs<VerificaGiacenzeRowEntity> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
localDataSource.makeInsertRequest(entity, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void updateSynchronized(VerificaGiacenzeRowEntity entity) {
|
||||
localDataSource.makeSynchronousUpdateRequest(entity);
|
||||
}
|
||||
|
||||
public void update(VerificaGiacenzeRowEntity entity, RunnableArgs<VerificaGiacenzeRowEntity> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
localDataSource.makeUpdateRequest(entity, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void deleteSynchronized(VerificaGiacenzeRowEntity entity) {
|
||||
localDataSource.makeSynchronousDeleteRequest(entity);
|
||||
}
|
||||
|
||||
public void delete(VerificaGiacenzeRowEntity entity, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
localDataSource.makeDeleteRequest(entity, onComplete, onFailed);
|
||||
}
|
||||
}
|
||||
@ -8,24 +8,24 @@ import javax.inject.Singleton;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.InventarioDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
|
||||
@Singleton
|
||||
public class InventarioLocalDataSource extends _BaseRoomDataSource<InventarioRoomDTO, InventarioDao> {
|
||||
public class InventarioLocalDataSource extends _BaseRoomDataSource<InventarioEntity, InventarioDao> {
|
||||
|
||||
@Inject
|
||||
public InventarioLocalDataSource(ExecutorService executorService, InventarioDao entityDao) {
|
||||
super(executorService, entityDao, InventarioRoomDTO.TABLE_NAME);
|
||||
super(executorService, entityDao, InventarioEntity.TABLE_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InventarioRoomDTO> makeSynchronousRetrieveAllRequest(boolean onlyToBeSync) {
|
||||
public List<InventarioEntity> makeSynchronousRetrieveAllRequest(boolean onlyToBeSync) {
|
||||
return entityDao
|
||||
.selectAll(onlyToBeSync);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flowable<List<InventarioRoomDTO>> makeSynchronousRetrieveAllLive(boolean onlyToBeSync) {
|
||||
public Flowable<List<InventarioEntity>> makeSynchronousRetrieveAllLive(boolean onlyToBeSync) {
|
||||
return entityDao
|
||||
.selectAllFlowable(onlyToBeSync);
|
||||
}
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.respository_new.data_source;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.VerificaGiacenzeWithRowsWrapper;
|
||||
|
||||
@Singleton
|
||||
public class VerificaGiacenzeLocalDataSource extends _BaseRoomDataSource<VerificaGiacenzeEntity, VerificaGiacenzeDao> {
|
||||
|
||||
@Inject
|
||||
public VerificaGiacenzeLocalDataSource(ExecutorService executorService, VerificaGiacenzeDao entityDao) {
|
||||
super(executorService, entityDao, VerificaGiacenzeEntity.TABLE_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VerificaGiacenzeEntity> makeSynchronousRetrieveAllRequest(boolean onlyToBeSync) {
|
||||
var data = entityDao
|
||||
.selectAll(onlyToBeSync);
|
||||
|
||||
return data.stream()
|
||||
.map(x -> {
|
||||
x.verificaGiacenze.setVerificaGiacenzeRowList(x.verificaGiacenzeRowList);
|
||||
return x.verificaGiacenze;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flowable<List<VerificaGiacenzeEntity>> makeSynchronousRetrieveAllLive(boolean onlyToBeSync) {
|
||||
Flowable<List<VerificaGiacenzeWithRowsWrapper>> listFlowable = entityDao
|
||||
.selectAllFlowable(onlyToBeSync);
|
||||
|
||||
return listFlowable.map(x ->
|
||||
x.stream()
|
||||
.map(y -> {
|
||||
y.verificaGiacenze.setVerificaGiacenzeRowList(y.verificaGiacenzeRowList);
|
||||
return y.verificaGiacenze;
|
||||
})
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
|
||||
public VerificaGiacenzeEntity makeSynchronousRetrieveLastRequest(boolean onlyToBeSync) {
|
||||
var lastEntity = entityDao
|
||||
.selectLast(onlyToBeSync);
|
||||
|
||||
lastEntity.verificaGiacenze.setVerificaGiacenzeRowList(lastEntity.verificaGiacenzeRowList);
|
||||
|
||||
return lastEntity.verificaGiacenze;
|
||||
}
|
||||
|
||||
public boolean isAnotherVerificaGiacenzeInProgress(int maxMinutes) {
|
||||
return entityDao.isAnotherVerificaGiacenzeInProgress(maxMinutes);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.respository_new.data_source;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
|
||||
@Singleton
|
||||
public class VerificaGiacenzeRowLocalDataSource extends _BaseRoomDataSource<VerificaGiacenzeRowEntity, VerificaGiacenzeRowDao> {
|
||||
|
||||
@Inject
|
||||
public VerificaGiacenzeRowLocalDataSource(ExecutorService executorService, VerificaGiacenzeRowDao entityDao) {
|
||||
super(executorService, entityDao, VerificaGiacenzeRowEntity.TABLE_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VerificaGiacenzeRowEntity> makeSynchronousRetrieveAllRequest(boolean onlyToBeSync) {
|
||||
var data = entityDao
|
||||
.selectAll(onlyToBeSync);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flowable<List<VerificaGiacenzeRowEntity>> makeSynchronousRetrieveAllLive(boolean onlyToBeSync) {
|
||||
return entityDao
|
||||
.selectAllFlowable(onlyToBeSync);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.wrappers;
|
||||
|
||||
import androidx.room.DatabaseView;
|
||||
import androidx.room.Embedded;
|
||||
import androidx.room.Relation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
|
||||
@DatabaseView
|
||||
public class VerificaGiacenzeWithRowsWrapper {
|
||||
|
||||
@Embedded
|
||||
public VerificaGiacenzeEntity verificaGiacenze;
|
||||
|
||||
@Relation(
|
||||
parentColumn = BaseSyncDTO.Columns.ID,
|
||||
entityColumn = VerificaGiacenzeRowEntity.Columns.PARENT_ID
|
||||
)
|
||||
public List<VerificaGiacenzeRowEntity> verificaGiacenzeRowList;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public class InvalidCodMdepBarcodeException extends RuntimeException {
|
||||
|
||||
public InvalidCodMdepBarcodeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class InvalidCodMdepException extends Exception {
|
||||
public InvalidCodMdepException() {
|
||||
super(UtilityResources.getString(R.string.invalid_codmdep));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class InvalidCodMdepLUException extends Exception {
|
||||
|
||||
public InvalidCodMdepLUException() {
|
||||
super(UtilityResources.getString(R.string.invalid_codmdep_error_message));
|
||||
}
|
||||
|
||||
public InvalidCodMdepLUException(String codMdep) {
|
||||
super(UtilityResources.getString(R.string.invalid_codmdep_error_message) + "(" + codMdep + ")");
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -30,6 +31,9 @@ public abstract class BaseFragment extends Fragment {
|
||||
@Inject
|
||||
public ExecutorService executorService;
|
||||
|
||||
@Inject
|
||||
public Handler handler;
|
||||
|
||||
protected ElevatedToolbar mToolbar;
|
||||
|
||||
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
@ -79,7 +83,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex);
|
||||
BarcodeManager.enable();
|
||||
@ -102,7 +106,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
protected void popMe() {
|
||||
if (requireActivity() instanceof IPoppableActivity) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
((IPoppableActivity) requireActivity()).pop();
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -2,11 +2,11 @@ package it.integry.integrywmsnative.core.mapper;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.model.MtbInvent;
|
||||
|
||||
@Singleton
|
||||
public class InventarioMapper extends BaseMapper<MtbInvent, InventarioRoomDTO> {
|
||||
public class InventarioMapper extends BaseMapper<MtbInvent, InventarioEntity> {
|
||||
|
||||
private final InventarioRowMapper inventarioRowMapper;
|
||||
|
||||
@ -15,10 +15,10 @@ public class InventarioMapper extends BaseMapper<MtbInvent, InventarioRoomDTO> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventarioRoomDTO mapRestToRoom(MtbInvent inputData) {
|
||||
public InventarioEntity mapRestToRoom(MtbInvent inputData) {
|
||||
if(inputData == null) return null;
|
||||
|
||||
var data = new InventarioRoomDTO();
|
||||
var data = new InventarioEntity();
|
||||
data.setIdInventario(inputData.getIdInventario());
|
||||
data.setCodMdep(inputData.getCodMdep());
|
||||
data.setDataInventario(inputData.getDataInventario());
|
||||
@ -42,7 +42,7 @@ public class InventarioMapper extends BaseMapper<MtbInvent, InventarioRoomDTO> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MtbInvent mapRoomToRest(InventarioRoomDTO inputData) {
|
||||
public MtbInvent mapRoomToRest(InventarioEntity inputData) {
|
||||
if(inputData == null) return null;
|
||||
|
||||
var data = new MtbInvent();
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package it.integry.integrywmsnative.core.mapper;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.VerificaGiacenzeDTO;
|
||||
|
||||
@Singleton
|
||||
public class VerificaGiacenzeMapper extends BaseMapper<VerificaGiacenzeDTO, VerificaGiacenzeEntity> {
|
||||
|
||||
private final VerificaGiacenzeRowMapper verificaGiacenzeRowMapper;
|
||||
|
||||
public VerificaGiacenzeMapper(VerificaGiacenzeRowMapper verificaGiacenzeRowMapper) {
|
||||
this.verificaGiacenzeRowMapper = verificaGiacenzeRowMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VerificaGiacenzeEntity mapRestToRoom(VerificaGiacenzeDTO inputData) {
|
||||
if(inputData == null) return null;
|
||||
|
||||
var data = new VerificaGiacenzeEntity();
|
||||
data.setCodMdep(inputData.getCodMdep());
|
||||
data.setData(inputData.getDataVerifica());
|
||||
|
||||
data.setVerificaGiacenzeRowList(verificaGiacenzeRowMapper.mapRestsToRooms(inputData.getRows()));
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VerificaGiacenzeDTO mapRoomToRest(VerificaGiacenzeEntity inputData) {
|
||||
if(inputData == null) return null;
|
||||
|
||||
var data = new VerificaGiacenzeDTO();
|
||||
data.setCodMdep(inputData.getCodMdep());
|
||||
data.setDataVerifica(inputData.getData());
|
||||
|
||||
data.setRows(verificaGiacenzeRowMapper.mapRoomsToRests(inputData.getVerificaGiacenzeRowList()));
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package it.integry.integrywmsnative.core.mapper;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.VerificaGiacenzeRowDTO;
|
||||
|
||||
@Singleton
|
||||
public class VerificaGiacenzeRowMapper extends BaseMapper<VerificaGiacenzeRowDTO, VerificaGiacenzeRowEntity> {
|
||||
|
||||
@Override
|
||||
public VerificaGiacenzeRowEntity mapRestToRoom(VerificaGiacenzeRowDTO inputData) {
|
||||
if(inputData == null) return null;
|
||||
|
||||
var data = new VerificaGiacenzeRowEntity();
|
||||
data.setCodMart(inputData.getCodMart());
|
||||
data.setPartitaMag(inputData.getPartitaMag());
|
||||
data.setQta(inputData.getQta());
|
||||
data.setNumConf(inputData.getNumCnf());
|
||||
data.setQtaConf(inputData.getQtaCnf());
|
||||
data.setScanCodBarre(inputData.getBarcode());
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VerificaGiacenzeRowDTO mapRoomToRest(VerificaGiacenzeRowEntity inputData) {
|
||||
if(inputData == null) return null;
|
||||
|
||||
var data = new VerificaGiacenzeRowDTO();
|
||||
data.setCodMart(inputData.getCodMart());
|
||||
data.setPartitaMag(inputData.getPartitaMag());
|
||||
data.setQta(inputData.getQta());
|
||||
data.setNumCnf(inputData.getNumConf());
|
||||
data.setQtaCnf(inputData.getQtaConf());
|
||||
data.setBarcode(inputData.getScanCodBarre());
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@ import android.os.Parcelable;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class MtbDepo extends EntityBase implements Parcelable {
|
||||
public class MtbDepo extends EntityBase {
|
||||
|
||||
|
||||
private String codMdep;
|
||||
@ -41,79 +41,6 @@ public class MtbDepo extends EntityBase implements Parcelable {
|
||||
type = "mtb_depo";
|
||||
}
|
||||
|
||||
protected MtbDepo(Parcel in) {
|
||||
codMdep = in.readString();
|
||||
descrizione = in.readString();
|
||||
flagVal = in.readString();
|
||||
codAnag = in.readString();
|
||||
indirizzo = in.readString();
|
||||
cap = in.readString();
|
||||
citta = in.readString();
|
||||
prov = in.readString();
|
||||
tel = in.readString();
|
||||
nazione = in.readString();
|
||||
fax = in.readString();
|
||||
eMail = in.readString();
|
||||
sitoWeb = in.readString();
|
||||
codVdes = in.readString();
|
||||
serie = in.readString();
|
||||
flagMovimentabile = in.readString();
|
||||
codJfas = in.readString();
|
||||
codVlis = in.readString();
|
||||
codCcau = in.readString();
|
||||
codCcon = in.readString();
|
||||
codDtip = in.readString();
|
||||
codDtipFat = in.readString();
|
||||
flagContoVendita = in.readString();
|
||||
flagTipoNegozio = in.readString();
|
||||
codMdepReso = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(codMdep);
|
||||
dest.writeString(descrizione);
|
||||
dest.writeString(flagVal);
|
||||
dest.writeString(codAnag);
|
||||
dest.writeString(indirizzo);
|
||||
dest.writeString(cap);
|
||||
dest.writeString(citta);
|
||||
dest.writeString(prov);
|
||||
dest.writeString(tel);
|
||||
dest.writeString(nazione);
|
||||
dest.writeString(fax);
|
||||
dest.writeString(eMail);
|
||||
dest.writeString(sitoWeb);
|
||||
dest.writeString(codVdes);
|
||||
dest.writeString(serie);
|
||||
dest.writeString(flagMovimentabile);
|
||||
dest.writeString(codJfas);
|
||||
dest.writeString(codVlis);
|
||||
dest.writeString(codCcau);
|
||||
dest.writeString(codCcon);
|
||||
dest.writeString(codDtip);
|
||||
dest.writeString(codDtipFat);
|
||||
dest.writeString(flagContoVendita);
|
||||
dest.writeString(flagTipoNegozio);
|
||||
dest.writeString(codMdepReso);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<MtbDepo> CREATOR = new Creator<>() {
|
||||
@Override
|
||||
public MtbDepo createFromParcel(Parcel in) {
|
||||
return new MtbDepo(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MtbDepo[] newArray(int size) {
|
||||
return new MtbDepo[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
|
||||
@ -52,9 +52,12 @@ public class RESTBuilder {
|
||||
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) {
|
||||
OkHttpClient.Builder clientBuilder = getDefaultHttpClient();
|
||||
|
||||
timeout = 0;
|
||||
|
||||
clientBuilder.connectTimeout(timeout, TimeUnit.SECONDS);
|
||||
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
||||
clientBuilder.writeTimeout(timeout, TimeUnit.SECONDS);
|
||||
clientBuilder.callTimeout(timeout, TimeUnit.SECONDS);
|
||||
|
||||
clientBuilder.retryOnConnectionFailure(true);
|
||||
|
||||
|
||||
@ -10,6 +10,9 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@ -26,7 +29,6 @@ import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCo
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||
import retrofit2.Call;
|
||||
@ -36,10 +38,12 @@ import retrofit2.Response;
|
||||
public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
private final RESTBuilder restBuilder;
|
||||
private final ExecutorService executorService;
|
||||
private final SystemRESTConsumer systemRESTConsumer;
|
||||
|
||||
public ArticoloRESTConsumer(RESTBuilder restBuilder, SystemRESTConsumer systemRESTConsumer) {
|
||||
public ArticoloRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService, SystemRESTConsumer systemRESTConsumer) {
|
||||
this.restBuilder = restBuilder;
|
||||
this.executorService = executorService;
|
||||
this.systemRESTConsumer = systemRESTConsumer;
|
||||
}
|
||||
|
||||
@ -78,28 +82,30 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public List<MtbAart> searchByBarcodeSynchronized(String barcodeProd) throws Exception {
|
||||
ArticoloRESTConsumerService articoloRESTConsumerService = restBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
|
||||
var request = new SearchArticoloByBarcodeRequestDTO()
|
||||
.setBarcode(barcodeProd)
|
||||
.setOnlyActive(true);
|
||||
|
||||
articoloRESTConsumerService
|
||||
var response = articoloRESTConsumerService
|
||||
.searchByBarcode(request)
|
||||
.enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Response<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> response) {
|
||||
analyzeAnswer(response, "searchByBarcode", (m) -> {
|
||||
onComplete.run(response.body().getDto().getArts());
|
||||
}, onFailed);
|
||||
}
|
||||
.execute();
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, @NonNull final Exception e) {
|
||||
onFailed.run(e);
|
||||
}
|
||||
});
|
||||
analyzeAnswer(response, "searchByBarcode");
|
||||
return response.body().getDto().getArts();
|
||||
}
|
||||
|
||||
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var mtbAarts = searchByBarcodeSynchronized(barcodeProd);
|
||||
if (onComplete != null) onComplete.run(mtbAarts);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findIfIsKit(MtbAart mtbAart, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed){
|
||||
@ -122,45 +128,48 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void getByCodMarts(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
var codMarts = Stream.of(codMartToFind)
|
||||
.withoutNulls()
|
||||
.distinct().toList();
|
||||
|
||||
public List<MtbAart> getByCodMartsSynchronized(List<String> codMartToFind) throws Exception {
|
||||
var codMarts = codMartToFind.parallelStream()
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = restBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumer
|
||||
var response = articoloRESTConsumer
|
||||
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
||||
.setCodMarts(codMarts))
|
||||
.enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<MtbAart>>> call, Response<ServiceRESTResponse<List<MtbAart>>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", onComplete, onFailed);
|
||||
}
|
||||
.execute();
|
||||
return analyzeAnswer(response, "getByCodMart");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<MtbAart>>> call, @NonNull final Exception e) {
|
||||
onFailed.run(e);
|
||||
}
|
||||
});
|
||||
public void getByCodMarts(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var mtbAarts = getByCodMartsSynchronized(codMartToFind);
|
||||
if (onComplete != null) onComplete.run(mtbAarts);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<StatoArticoloDTO> getStatoPartitaSynchronized(String codMart, String partitaMag) throws Exception {
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = restBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
var response = articoloRESTConsumer.getStatoPartita(codMart, partitaMag).execute();
|
||||
|
||||
var data = analyzeAnswer(response, "getStatoPartita");
|
||||
return data;
|
||||
}
|
||||
|
||||
public void getStatoPartita(String codMart, String partitaMag, RunnableArgs<List<StatoArticoloDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = restBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumer.getStatoPartita(codMart, partitaMag).enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<StatoArticoloDTO>>> call, Response<ServiceRESTResponse<List<StatoArticoloDTO>>> response) {
|
||||
analyzeAnswer(response, "getStatoPartita", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<StatoArticoloDTO>>> call, @NonNull final Exception e) {
|
||||
onFailed.run(e);
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var response = getStatoPartitaSynchronized(codMart, partitaMag);
|
||||
if (onComplete != null) onComplete.run(response);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -172,7 +181,7 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
public void getArtsGroups(List<String> groupsToFind, RunnableArgs<List<MtbGrup>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public List<MtbGrup> getArtsGroupsSynchronized(List<String> groupsToFind) throws Exception {
|
||||
var whereCondMap = Stream.of(groupsToFind)
|
||||
.map(x -> {
|
||||
HashMap<String, Object> vars = new HashMap<>();
|
||||
@ -186,7 +195,18 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {
|
||||
}.getType();
|
||||
|
||||
this.systemRESTConsumer.processSql("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
||||
return this.systemRESTConsumer.processSqlSynchronized("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList);
|
||||
}
|
||||
|
||||
public void getArtsGroups(List<String> groupsToFind, RunnableArgs<List<MtbGrup>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var data = getArtsGroupsSynchronized(groupsToFind);
|
||||
if (onComplete != null) onComplete.run(data);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -16,6 +16,10 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
|
||||
this.ean128Service = ean128Service;
|
||||
}
|
||||
|
||||
public Ean128Model decodeEan128Synchronized(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
||||
return this.ean128Service.decode(barcodeScanDTO);
|
||||
}
|
||||
|
||||
public void decodeEan128(BarcodeScanDTO barcodeObj, RunnableArgs<Ean128Model> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
try {
|
||||
onComplete.run(this.ean128Service.decode(barcodeObj));
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.GiacenzaPvDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.SaveNewVerificaRequestDTO;
|
||||
|
||||
public class GiacenzaPvRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
private final RESTBuilder restBuilder;
|
||||
private final ExecutorService executorService;
|
||||
|
||||
public GiacenzaPvRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService) {
|
||||
this.restBuilder = restBuilder;
|
||||
this.executorService = executorService;
|
||||
}
|
||||
|
||||
|
||||
public List<GiacenzaPvDTO> retrieveGiacenzeSynchronized(String codMdep) throws Exception {
|
||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 120);
|
||||
var response = giacenzaPvRESTConsumerService.retrieve(codMdep)
|
||||
.execute();
|
||||
|
||||
var giacenzeList = analyzeAnswer(response, "retrieve-giacenze-pv");
|
||||
|
||||
return giacenzeList != null ? giacenzeList : new ArrayList<>();
|
||||
}
|
||||
|
||||
public void saveNewVerificaSynchronized(SaveNewVerificaRequestDTO saveNewVerificaRequest) throws Exception {
|
||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 0);
|
||||
var response = giacenzaPvRESTConsumerService.saveNewVerifica(saveNewVerificaRequest)
|
||||
.execute();
|
||||
|
||||
analyzeAnswer(response, "save-verifica-pv");
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.GiacenzaPvDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.SaveNewVerificaRequestDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GiacenzaPvRESTConsumerService {
|
||||
|
||||
@GET("giacenza/retrieve")
|
||||
Call<ServiceRESTResponse<List<GiacenzaPvDTO>>> retrieve(@Query("codMdep") String codMdep);
|
||||
|
||||
|
||||
@POST("wms/pv/verifica_giacenze/save_new_verifica")
|
||||
Call<ServiceRESTResponse<Void>> saveNewVerifica(@Body SaveNewVerificaRequestDTO saveNewVerificaRequest);
|
||||
}
|
||||
@ -7,6 +7,8 @@ import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@ -28,52 +30,55 @@ import retrofit2.Response;
|
||||
public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
private final RESTBuilder restBuilder;
|
||||
private final ExecutorService executorService;
|
||||
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||
|
||||
public GiacenzaRESTConsumer(RESTBuilder restBuilder, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
public GiacenzaRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
this.restBuilder = restBuilder;
|
||||
this.executorService = executorService;
|
||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||
|
||||
}
|
||||
|
||||
public void getGiacenzeInPosizione(MtbDepoPosizione posizione, RunnableArgs<List<MvwSitArtUdcDetInventario>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public List<MvwSitArtUdcDetInventario> getGiacenzeInPosizioneSynchronized(MtbDepoPosizione posizione) throws Exception {
|
||||
GiacenzaRESTConsumerService giacenzaRESTConsumerService = restBuilder.getService(GiacenzaRESTConsumerService.class);
|
||||
giacenzaRESTConsumerService.retrieveAvailableItems(posizione.getPosizione()).enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> call, Response<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> response) {
|
||||
analyzeAnswer(response, "getGiacenzeInPosizione", inventarioList -> {
|
||||
var response = giacenzaRESTConsumerService.retrieveAvailableItems(posizione.getPosizione())
|
||||
.execute();
|
||||
|
||||
if(inventarioList != null && !inventarioList.isEmpty()){
|
||||
List<String> codMarts = Stream.of(inventarioList)
|
||||
.map(x -> x.getCodMart().trim())
|
||||
.toList();
|
||||
var inventarioList = analyzeAnswer(response, "getGiacenzeInPosizione");
|
||||
|
||||
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
||||
for (var row : inventarioList) {
|
||||
if (inventarioList != null && !inventarioList.isEmpty()) {
|
||||
List<String> codMarts = inventarioList.stream()
|
||||
.map(x -> x.getCodMart().trim())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
MtbAart foundMtbAart = null;
|
||||
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(row.getCodMart()))
|
||||
.findFirst();
|
||||
var mtbAarts = mArticoloRESTConsumer.getByCodMartsSynchronized(codMarts);
|
||||
for (var row : inventarioList) {
|
||||
MtbAart foundMtbAart = null;
|
||||
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(row.getCodMart()))
|
||||
.findFirst();
|
||||
|
||||
if (mtbAartOpt.isPresent()) {
|
||||
foundMtbAart = mtbAartOpt.get();
|
||||
}
|
||||
if (mtbAartOpt.isPresent()) {
|
||||
foundMtbAart = mtbAartOpt.get();
|
||||
}
|
||||
|
||||
row.setMtbAart(foundMtbAart);
|
||||
}
|
||||
|
||||
onComplete.run(inventarioList);
|
||||
}, onFailed);
|
||||
}else{
|
||||
onComplete.run(new ArrayList<>());
|
||||
}
|
||||
}, onFailed);
|
||||
row.setMtbAart(foundMtbAart);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> call, @NonNull final Exception e) {
|
||||
onFailed.run(e);
|
||||
return inventarioList;
|
||||
}
|
||||
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public void getGiacenzeInPosizione(MtbDepoPosizione posizione, RunnableArgs<List<MvwSitArtUdcDetInventario>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var result = getGiacenzeInPosizioneSynchronized(posizione);
|
||||
if (onComplete != null) onComplete.run(result);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -92,8 +97,8 @@ public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
||||
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
||||
for (var articoli : inventarioList) {
|
||||
List<MvwSitArtUdcDetInventario> mvwSitArtUdcDetInventario = articoli.getMvwSitArtUdcDetInventarioDTO();
|
||||
if (mvwSitArtUdcDetInventario != null && !mvwSitArtUdcDetInventario.isEmpty()){
|
||||
for (var row : mvwSitArtUdcDetInventario){
|
||||
if (mvwSitArtUdcDetInventario != null && !mvwSitArtUdcDetInventario.isEmpty()) {
|
||||
for (var row : mvwSitArtUdcDetInventario) {
|
||||
MtbAart foundMtbAart = null;
|
||||
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(row.getCodMart()))
|
||||
|
||||
@ -40,9 +40,9 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||
private final ExecutorService executorService;
|
||||
private final RESTBuilder restBuilder;
|
||||
|
||||
public SystemRESTConsumer(ExecutorService executorService, RESTBuilder restBuilder) {
|
||||
this.executorService = executorService;
|
||||
public SystemRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService) {
|
||||
this.restBuilder = restBuilder;
|
||||
this.executorService = executorService;
|
||||
}
|
||||
|
||||
public LatestAppVersionInfoDTO retrieveUpdatesInfoSynchronized(boolean betaVersion) throws Exception {
|
||||
@ -78,35 +78,37 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
}
|
||||
|
||||
public <T> void processSql(String nativeSql, final Type clazz, final RunnableArgs<T> onComplete, final RunnableArgs<Exception> onFailed) {
|
||||
public <T> T processSqlSynchronized(String nativeSql, final Type clazz) throws Exception {
|
||||
NativeSqlRequestDTO nativeSqlDTO = new NativeSqlRequestDTO()
|
||||
.setNativeSql(nativeSql);
|
||||
|
||||
SystemRESTConsumerService service = restBuilder.getService(SystemRESTConsumerService.class);
|
||||
service
|
||||
var response = service
|
||||
.processSql(nativeSqlDTO)
|
||||
.enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "ProcessSql", o -> {
|
||||
Gson gson = UtilityGson.createObject();
|
||||
.execute();
|
||||
|
||||
var data = analyzeAnswer(response, "processSql");
|
||||
|
||||
Gson gson = UtilityGson.createObject();
|
||||
String json = gson.toJson(data);
|
||||
|
||||
InputStream ims = new ByteArrayInputStream(json.getBytes());
|
||||
Reader reader = new InputStreamReader(ims);
|
||||
T gsonObj = gson.fromJson(reader, clazz);
|
||||
|
||||
return gsonObj;
|
||||
}
|
||||
|
||||
|
||||
String json = gson.toJson(o);
|
||||
|
||||
InputStream ims = new ByteArrayInputStream(json.getBytes());
|
||||
Reader reader = new InputStreamReader(ims);
|
||||
T gsonObj = gson.fromJson(reader, clazz);
|
||||
|
||||
onComplete.run(gsonObj);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, @NonNull final Exception e) {
|
||||
onFailed.run(e);
|
||||
}
|
||||
});
|
||||
public <T> void processSql(String nativeSql, final Type clazz, final RunnableArgs<T> onComplete, final RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
T result = processSqlSynchronized(nativeSql, clazz);
|
||||
if (onComplete != null) onComplete.run(result);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -337,7 +337,7 @@ public class Ean128Model {
|
||||
public String Internal3; //Cod-Jfas
|
||||
|
||||
///<summary>Informazioni interne</summary>
|
||||
public String Internal4;
|
||||
public String Internal4; //Cod-Mdep
|
||||
|
||||
///<summary>Informazioni interne</summary>
|
||||
public String Internal5;
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.pv;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class GiacenzaPvDTO {
|
||||
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private BigDecimal qtaInv;
|
||||
private Date dtaInventario;
|
||||
private String codMdep;
|
||||
private BigDecimal incomingStock;
|
||||
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public GiacenzaPvDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public GiacenzaPvDTO setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaInv() {
|
||||
return qtaInv;
|
||||
}
|
||||
|
||||
public GiacenzaPvDTO setQtaInv(BigDecimal qtaInv) {
|
||||
this.qtaInv = qtaInv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDtaInventario() {
|
||||
return dtaInventario;
|
||||
}
|
||||
|
||||
public GiacenzaPvDTO setDtaInventario(Date dtaInventario) {
|
||||
this.dtaInventario = dtaInventario;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public GiacenzaPvDTO setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getIncomingStock() {
|
||||
return incomingStock;
|
||||
}
|
||||
|
||||
public GiacenzaPvDTO setIncomingStock(BigDecimal incomingStock) {
|
||||
this.incomingStock = incomingStock;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.pv;
|
||||
|
||||
public class SaveNewVerificaRequestDTO {
|
||||
|
||||
private VerificaGiacenzeDTO data;
|
||||
|
||||
public VerificaGiacenzeDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public SaveNewVerificaRequestDTO setData(VerificaGiacenzeDTO data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.pv;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.BaseRestDTO;
|
||||
|
||||
public class VerificaGiacenzeDTO extends BaseRestDTO {
|
||||
|
||||
private String codMdep;
|
||||
private LocalDateTime dataVerifica;
|
||||
|
||||
private List<VerificaGiacenzeRowDTO> rows;
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeDTO setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDateTime getDataVerifica() {
|
||||
return dataVerifica;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeDTO setDataVerifica(LocalDateTime dataVerifica) {
|
||||
this.dataVerifica = dataVerifica;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<VerificaGiacenzeRowDTO> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeDTO setRows(List<VerificaGiacenzeRowDTO> rows) {
|
||||
this.rows = rows;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.pv;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.BaseRestDTO;
|
||||
|
||||
public class VerificaGiacenzeRowDTO extends BaseRestDTO {
|
||||
|
||||
private String codMart;
|
||||
private String partitaMag;
|
||||
private BigDecimal qta;
|
||||
private BigDecimal qtaCnf;
|
||||
private BigDecimal numCnf;
|
||||
private String barcode;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeRowDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeRowDTO setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQta() {
|
||||
return qta;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeRowDTO setQta(BigDecimal qta) {
|
||||
this.qta = qta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeRowDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeRowDTO setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarcode() {
|
||||
return barcode;
|
||||
}
|
||||
|
||||
public VerificaGiacenzeRowDTO setBarcode(String barcode) {
|
||||
this.barcode = barcode;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,17 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.MultiFormatWriter;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.journeyapps.barcodescanner.BarcodeEncoder;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeType;
|
||||
@ -17,6 +20,7 @@ import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
|
||||
public class UtilityBarcode {
|
||||
|
||||
public static final char FNC1 = 0x00f1;
|
||||
|
||||
public static boolean isBarcodeOrdineV(BarcodeScanDTO barcodeScanDTO) {
|
||||
return (isEan13(barcodeScanDTO) || isEtichetta128(barcodeScanDTO)) && barcodeScanDTO.getStringValue().startsWith("3");
|
||||
@ -161,15 +165,15 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
public static Bitmap generateBarcodeImage(String barcode, int width, int height) throws Exception {
|
||||
if(barcode == null) return null;
|
||||
if (barcode == null) return null;
|
||||
|
||||
BarcodeType barcodeType;
|
||||
|
||||
if(barcode.length() == 8)
|
||||
if (barcode.length() == 8)
|
||||
barcodeType = BarcodeType.EAN8;
|
||||
else if(barcode.length() == 13)
|
||||
else if (barcode.length() == 13)
|
||||
barcodeType = BarcodeType.EAN13;
|
||||
else if(barcode.length() == 14)
|
||||
else if (barcode.length() == 14)
|
||||
barcodeType = BarcodeType.INTERLEAVED_2OF5;
|
||||
else throw new Exception("Barcode " + barcode + " non valido");
|
||||
|
||||
@ -177,25 +181,49 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
public static Bitmap generateBarcodeImage(String barcode, BarcodeType type, int width, int height) throws Exception {
|
||||
// Genera la matrice del codice a barre
|
||||
MultiFormatWriter writer = new MultiFormatWriter();
|
||||
|
||||
BarcodeFormat barcodeFormat = switch (type) {
|
||||
case EAN8 -> BarcodeFormat.EAN_8;
|
||||
case EAN13 -> BarcodeFormat.EAN_13;
|
||||
case INTERLEAVED_2OF5 -> BarcodeFormat.ITF;
|
||||
case CODE128 -> BarcodeFormat.CODE_128;
|
||||
default -> throw new Exception("Barcode " + barcode + " non valido (tipo: " + type + ")");
|
||||
};
|
||||
if (barcode == null) return null;
|
||||
|
||||
BitMatrix bitMatrix = writer.encode(barcode, barcodeFormat, width, height);
|
||||
Bitmap bitmap = null;
|
||||
|
||||
// Crea un bitmap a partire dalla matrice
|
||||
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
bitmap.setPixel(x, y, bitMatrix.get(x, y) ? Color.BLACK : Color.WHITE);
|
||||
if (type == BarcodeType.EAN128) {
|
||||
if(barcode.charAt(0) != FNC1) {
|
||||
barcode = FNC1 + barcode;
|
||||
}
|
||||
|
||||
Map<EncodeHintType, Object> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "ISO-8859-1");
|
||||
hints.put(EncodeHintType.MARGIN, 10); // Quiet zone
|
||||
|
||||
// Crea il codice a barre
|
||||
MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
|
||||
BitMatrix bitMatrix = multiFormatWriter.encode(
|
||||
barcode,
|
||||
BarcodeFormat.CODE_128,
|
||||
width, // Larghezza
|
||||
height, // Altezza
|
||||
hints
|
||||
);
|
||||
|
||||
// Converti in bitmap
|
||||
BarcodeEncoder barcodeEncoder = new BarcodeEncoder();
|
||||
bitmap = barcodeEncoder.createBitmap(bitMatrix);
|
||||
} else {
|
||||
BarcodeFormat barcodeFormat = switch (type) {
|
||||
case EAN8 -> BarcodeFormat.EAN_8;
|
||||
case EAN13 -> BarcodeFormat.EAN_13;
|
||||
case INTERLEAVED_2OF5 -> BarcodeFormat.ITF;
|
||||
case CODE128 -> BarcodeFormat.CODE_128;
|
||||
default ->
|
||||
throw new Exception("Barcode " + barcode + " non valido (tipo: " + type + ")");
|
||||
};
|
||||
|
||||
MultiFormatWriter writer = new MultiFormatWriter();
|
||||
BitMatrix bitMatrix = writer.encode(barcode, barcodeFormat, width, height);
|
||||
|
||||
|
||||
BarcodeEncoder barcodeEncoder = new BarcodeEncoder();
|
||||
bitmap = barcodeEncoder.createBitmap(bitMatrix);
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
|
||||
@ -20,7 +20,7 @@ import javax.inject.Inject;
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||
@ -94,7 +94,7 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
mBinding.emptyView.setVisibility(data == null || data.isEmpty() ? View.VISIBLE : View.GONE);
|
||||
});
|
||||
|
||||
var itemType = new Type<InventarioRoomDTO, FragmentElencoInventarioListSingleItemBinding>(R.layout.fragment_elenco_inventario_list_single_item, BR.item);
|
||||
var itemType = new Type<InventarioEntity, FragmentElencoInventarioListSingleItemBinding>(R.layout.fragment_elenco_inventario_list_single_item, BR.item);
|
||||
itemType.onClick(x -> {
|
||||
|
||||
var item = x.getBinding().getItem();
|
||||
@ -123,7 +123,7 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
});
|
||||
|
||||
new LiveAdapter(mViewModel.getInventarioList(), this)
|
||||
.map(InventarioRoomDTO.class, itemType)
|
||||
.map(InventarioEntity.class, itemType)
|
||||
.into(this.mBinding.inventarioList);
|
||||
|
||||
|
||||
@ -152,8 +152,8 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInventarioLoaded(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> listaArts) {
|
||||
startPicking(inventarioRoomDTO, listaArts);
|
||||
public void onInventarioLoaded(InventarioEntity inventarioEntity, List<InventarioArtDTO> listaArts) {
|
||||
startPicking(inventarioEntity, listaArts);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -173,8 +173,8 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
}
|
||||
|
||||
|
||||
private void startPicking(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> listArts) {
|
||||
PickingInventarioActivity.startActivity(requireContext(), inventarioRoomDTO, listArts);
|
||||
private void startPicking(InventarioEntity inventarioEntity, List<InventarioArtDTO> listArts) {
|
||||
PickingInventarioActivity.startActivity(requireContext(), inventarioEntity, listArts);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -196,13 +196,13 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
public void deleteInventarioRequest(InventarioRoomDTO inventarioRoomDTO) {
|
||||
public void deleteInventarioRequest(InventarioEntity inventarioEntity) {
|
||||
DialogYesNoView
|
||||
.newInstance(null, "Vuoi cancellare l'inventario?",
|
||||
dialogResponse -> {
|
||||
switch (dialogResponse) {
|
||||
case YES:
|
||||
this.mViewModel.deleteInventario(inventarioRoomDTO);
|
||||
this.mViewModel.deleteInventario(inventarioEntity);
|
||||
break;
|
||||
|
||||
case NO:
|
||||
|
||||
@ -7,7 +7,7 @@ import com.annimon.stream.Stream;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
@ -25,7 +25,7 @@ public class ElencoInventariViewModel {
|
||||
private final SettingsManager settingsManager;
|
||||
private Listener listener;
|
||||
|
||||
private LiveData<List<InventarioRoomDTO>> inventarioList;
|
||||
private LiveData<List<InventarioEntity>> inventarioList;
|
||||
|
||||
private final String codMdep;
|
||||
|
||||
@ -52,7 +52,7 @@ public class ElencoInventariViewModel {
|
||||
inventarioList = null;
|
||||
}
|
||||
|
||||
public LiveData<List<InventarioRoomDTO>> getInventarioList() {
|
||||
public LiveData<List<InventarioEntity>> getInventarioList() {
|
||||
return inventarioList;
|
||||
}
|
||||
|
||||
@ -101,12 +101,12 @@ public class ElencoInventariViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void createNewInventario(long inventoryId, String zone, RunnableArgss<InventarioRoomDTO, List<InventarioArtDTO>> onComplete) {
|
||||
public void createNewInventario(long inventoryId, String zone, RunnableArgss<InventarioEntity, List<InventarioArtDTO>> onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
var codMdep = settingsManager.getSettings().getUserSession().getDepo().getCodMdep();
|
||||
|
||||
var createdInventario = new InventarioRoomDTO();
|
||||
var createdInventario = new InventarioEntity();
|
||||
createdInventario.setIdInventario(inventoryId);
|
||||
createdInventario.setZona(zone);
|
||||
createdInventario.setCodMdep(codMdep);
|
||||
@ -121,8 +121,8 @@ public class ElencoInventariViewModel {
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteInventario(InventarioRoomDTO inventarioRoomDTO) {
|
||||
inventarioRepository.delete(inventarioRoomDTO, null, this::sendOnError);
|
||||
public void deleteInventario(InventarioEntity inventarioEntity) {
|
||||
inventarioRepository.delete(inventarioEntity, null, this::sendOnError);
|
||||
}
|
||||
|
||||
|
||||
@ -134,8 +134,8 @@ public class ElencoInventariViewModel {
|
||||
if (listener != null) listener.onInventarioInfoRequest(onComplete);
|
||||
}
|
||||
|
||||
private void sendOnInventarioLoaded(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> listaArts) {
|
||||
if (listener != null) listener.onInventarioLoaded(inventarioRoomDTO, listaArts);
|
||||
private void sendOnInventarioLoaded(InventarioEntity inventarioEntity, List<InventarioArtDTO> listaArts) {
|
||||
if (listener != null) listener.onInventarioLoaded(inventarioEntity, listaArts);
|
||||
}
|
||||
|
||||
private void sendCreateInventarioRequest(long inventoryId, String zone) {
|
||||
@ -170,7 +170,7 @@ public class ElencoInventariViewModel {
|
||||
|
||||
void onInventarioInfoRequest(RunnableArgss<Long, String> onComplete);
|
||||
|
||||
void onInventarioLoaded(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> listaArts);
|
||||
void onInventarioLoaded(InventarioEntity inventarioEntity, List<InventarioArtDTO> listaArts);
|
||||
|
||||
void onInventoriesLoadingStarted();
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetInventarioActionsViewBinding;
|
||||
|
||||
public class BottomSheetInventarioActionsView extends BottomSheetDialogFragment {
|
||||
@ -28,9 +28,9 @@ public class BottomSheetInventarioActionsView extends BottomSheetDialogFragment
|
||||
private BottomSheetInventarioActionsViewBinding mBinding;
|
||||
private Listener mListener;
|
||||
|
||||
private final InventarioRoomDTO inputItem;
|
||||
private final InventarioEntity inputItem;
|
||||
|
||||
public BottomSheetInventarioActionsView(InventarioRoomDTO inputItem) {
|
||||
public BottomSheetInventarioActionsView(InventarioEntity inputItem) {
|
||||
this.inputItem = inputItem;
|
||||
}
|
||||
|
||||
|
||||
@ -2,17 +2,17 @@ package it.integry.integrywmsnative.gest.inventario.bottom_sheet__inventario_act
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
|
||||
public class BottomSheetInventarioActionsViewModel {
|
||||
|
||||
private final MutableLiveData<InventarioRoomDTO> mCurrentItem = new MutableLiveData<>();
|
||||
private final MutableLiveData<InventarioEntity> mCurrentItem = new MutableLiveData<>();
|
||||
|
||||
public void init(InventarioRoomDTO item) {
|
||||
public void init(InventarioEntity item) {
|
||||
this.mCurrentItem.postValue(item);
|
||||
}
|
||||
|
||||
public MutableLiveData<InventarioRoomDTO> getCurrentItem() {
|
||||
public MutableLiveData<InventarioEntity> getCurrentItem() {
|
||||
return mCurrentItem;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
@ -64,10 +64,10 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
private int barcodeScannerIstanceID;
|
||||
|
||||
//Pass here all external parameters
|
||||
public static void startActivity(Context context, InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> inventarioArts) {
|
||||
public static void startActivity(Context context, InventarioEntity inventarioEntity, List<InventarioArtDTO> inventarioArts) {
|
||||
Intent myIntent = new Intent(context, PickingInventarioActivity.class);
|
||||
|
||||
String keyExtraItem = DataCache.addItem(inventarioRoomDTO);
|
||||
String keyExtraItem = DataCache.addItem(inventarioEntity);
|
||||
myIntent.putExtra(KEY_INVENTARIO, keyExtraItem);
|
||||
|
||||
String keyExtraArtsItem = DataCache.addItem(inventarioArts);
|
||||
|
||||
@ -12,7 +12,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRowRepository;
|
||||
@ -41,7 +41,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
private final BarcodeRESTConsumer barcodeRESTConsumer;
|
||||
private final InventarioRepository inventarioRepository;
|
||||
private final InventarioRowRepository inventarioRowRepository;
|
||||
public MutableLiveData<InventarioRoomDTO> currentInventario = new MutableLiveData<>();
|
||||
public MutableLiveData<InventarioEntity> currentInventario = new MutableLiveData<>();
|
||||
public LiveData<List<InventarioRowRoomDTO>> currentInventarioRows = new MutableLiveData<>();
|
||||
private boolean canAddUnknownItems;
|
||||
private boolean flagShouldAskToCreateOrUpdateRowInventario;
|
||||
@ -56,14 +56,14 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
this.barcodeRESTConsumer = barcodeRESTConsumer;
|
||||
}
|
||||
|
||||
public void init(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> inventarioArts, boolean canAddUnknownItems, boolean flagShouldAskToCreateOrUpdateRowInventario) {
|
||||
public void init(InventarioEntity inventarioEntity, List<InventarioArtDTO> inventarioArts, boolean canAddUnknownItems, boolean flagShouldAskToCreateOrUpdateRowInventario) {
|
||||
this.canAddUnknownItems = canAddUnknownItems;
|
||||
this.flagShouldAskToCreateOrUpdateRowInventario = flagShouldAskToCreateOrUpdateRowInventario;
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.currentInventario.postValue(inventarioRoomDTO);
|
||||
this.currentInventarioRows = inventarioRowRepository.retrieve(inventarioRoomDTO.getId());
|
||||
this.currentInventario.postValue(inventarioEntity);
|
||||
this.currentInventarioRows = inventarioRowRepository.retrieve(inventarioEntity.getId());
|
||||
this.availableInventarioArts = inventarioArts == null ? new ArrayList<>() : inventarioArts;
|
||||
|
||||
UtilityLiveData.observeOnce(this.currentInventarioRows, data -> {
|
||||
@ -73,7 +73,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
this.sendOnLoadingEnded();
|
||||
}
|
||||
|
||||
public LiveData<InventarioRoomDTO> getCurrentInventario() {
|
||||
public LiveData<InventarioEntity> getCurrentInventario() {
|
||||
return currentInventario;
|
||||
}
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ import it.integry.integrywmsnative.databinding.ActivityMainBinding;
|
||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.extra_info.DialogExtraInfoView;
|
||||
|
||||
public class MainActivity extends BaseActivity
|
||||
implements NavigationView.OnNavigationItemSelectedListener, IPoppableActivity {
|
||||
@ -185,6 +186,10 @@ public class MainActivity extends BaseActivity
|
||||
} else {
|
||||
if (id == R.id.nav_home) {
|
||||
this.pop();
|
||||
} else if (id == R.id.nav_extra_info) {
|
||||
|
||||
this.showExtraInfoDialog();
|
||||
|
||||
} else if (id == R.id.nav_settings) {
|
||||
fragment = new MainSettingsFragment();
|
||||
this.adaptViewToFragment(fragment);
|
||||
@ -203,6 +208,11 @@ public class MainActivity extends BaseActivity
|
||||
return true;
|
||||
}
|
||||
|
||||
private void showExtraInfoDialog() {
|
||||
DialogExtraInfoView.newInstance()
|
||||
.show(getSupportFragmentManager(), "extra-info");
|
||||
}
|
||||
|
||||
|
||||
private void initGestMenu() {
|
||||
Menu menu = mBinding.navView.getMenu();
|
||||
@ -236,6 +246,8 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
|
||||
SubMenu subMenu = menu.addSubMenu(R.string.other);
|
||||
subMenu.add(R.id.nav_extra_info, R.id.nav_extra_info, 0, R.string.informations)
|
||||
.setIcon(R.drawable.ic_information_outline_24dp);
|
||||
subMenu.add(R.id.nav_home, R.id.nav_settings, 0, R.string.general_settings)
|
||||
.setIcon(R.drawable.ic_settings_24dp);
|
||||
subMenu.add(R.id.nav_logout, R.id.nav_logout, 0, R.string.logout)
|
||||
|
||||
@ -17,7 +17,7 @@ import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepLUException;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
@ -252,7 +252,7 @@ public class PickingLiberoViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
pickMerceULtoUL(mtbColt, articolo, onComplete);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
}, this::sendError);
|
||||
} else {
|
||||
@ -283,7 +283,7 @@ public class PickingLiberoViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
pickMerceULtoUL(mtbColtScanned, onComplete);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
|
||||
@ -14,7 +14,7 @@ import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepLUException;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.TooManyLUFoundInMonoLUPositionException;
|
||||
@ -116,7 +116,7 @@ public class ProdVersamentoMaterialeViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
this.onLUOpened(mtbColt);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
}, this::sendError);
|
||||
} else {
|
||||
@ -135,7 +135,7 @@ public class ProdVersamentoMaterialeViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
this.onLUOpened(mtbColt);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.gest.pv_verifica_giacenze;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface VerificaGiacenzeComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
VerificaGiacenzeComponent create();
|
||||
}
|
||||
|
||||
void inject(VerificaGiacenzeFragment VerificaGiacenzeFragment);
|
||||
}
|
||||
@ -0,0 +1,342 @@
|
||||
package it.integry.integrywmsnative.gest.pv_verifica_giacenze;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
import com.ravikoradiya.liveadapter.Type;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeRowMapper;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.FragmentVerificaGiacenzeBinding;
|
||||
import it.integry.integrywmsnative.databinding.ListaVerificaGiacenzePickedItemListModelBinding;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__item_edit.BottomSheetItemDTO;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__item_edit.BottomSheetItemEditView;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoView;
|
||||
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.yes_no.DialogYesNoView;
|
||||
|
||||
public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFragment, VerificaGiacenzeViewModel.Listener, BottomSheetItemEditView.Listener<VerificaGiacenzeRowEntity> {
|
||||
|
||||
@Inject
|
||||
VerificaGiacenzeViewModel mViewModel;
|
||||
|
||||
@Inject
|
||||
DialogInputQuantityV2View dialogInputQuantityV2View;
|
||||
|
||||
@Inject
|
||||
VerificaGiacenzeRowMapper verificaGiacenzeRowMapper;
|
||||
|
||||
private FragmentVerificaGiacenzeBinding mBindings;
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
|
||||
public VerificaGiacenzeFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
public static VerificaGiacenzeFragment newInstance() {
|
||||
return new VerificaGiacenzeFragment();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
setRetainInstance(true);
|
||||
|
||||
mBindings = FragmentVerificaGiacenzeBinding.inflate(inflater, container, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
MainApplication.appComponent
|
||||
.verificaGiacenzeComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
mBindings.setView(this);
|
||||
mBindings.setViewModel(mViewModel);
|
||||
|
||||
mViewModel.setListener(this);
|
||||
|
||||
this.init();
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
executorService.execute(() -> {
|
||||
|
||||
boolean recoveredSession = false;
|
||||
String codMdep = null;
|
||||
|
||||
try {
|
||||
|
||||
if (mViewModel.isAnotherVerificaGiacenzeInProgress()) {
|
||||
boolean recover = askToRecoverPrevious();
|
||||
|
||||
if (recover) {
|
||||
// Recover data
|
||||
var latestVerifica = mViewModel.recoverLast();
|
||||
codMdep = latestVerifica.getCodMdep();
|
||||
recoveredSession = true;
|
||||
} else {
|
||||
// Start new
|
||||
mViewModel.clearPreviousSessions();
|
||||
codMdep = this.askDeposito();
|
||||
}
|
||||
} else {
|
||||
//Clear to be sure everything is clean
|
||||
mViewModel.clearPreviousSessions();
|
||||
codMdep = this.askDeposito();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
}
|
||||
|
||||
if (codMdep == null) {
|
||||
popMe();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
this.onLoadingStarted();
|
||||
mViewModel.loadDeposito(codMdep);
|
||||
|
||||
if (!recoveredSession) mViewModel.createNew(codMdep);
|
||||
|
||||
this.onLoadingEnded();
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
popMe();
|
||||
}
|
||||
|
||||
this.initRecyclerView();
|
||||
this.initBarcodeReader();
|
||||
});
|
||||
}
|
||||
|
||||
private boolean askToRecoverPrevious() throws InterruptedException {
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
AtomicReference<Boolean> response = new AtomicReference<>();
|
||||
|
||||
DialogYesNoView.newInstance("Recupero verifica", "Vuoi recuperare la verifica precedente?", result -> {
|
||||
response.set(result == DialogConsts.Results.YES);
|
||||
countDownLatch.countDown();
|
||||
})
|
||||
.show(getChildFragmentManager(), "ask-recover");
|
||||
|
||||
countDownLatch.await();
|
||||
return response.get();
|
||||
}
|
||||
|
||||
private String askDeposito() throws InterruptedException {
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
AtomicReference<String> codMdepAtomic = new AtomicReference<>();
|
||||
|
||||
|
||||
DialogAskDepositoView.newInstance(codMdep -> {
|
||||
codMdepAtomic.set(codMdep);
|
||||
countDownLatch.countDown();
|
||||
})
|
||||
.show(getChildFragmentManager(), "ask-deposito");
|
||||
|
||||
countDownLatch.await();
|
||||
return codMdepAtomic.get();
|
||||
}
|
||||
|
||||
|
||||
private void initRecyclerView() {
|
||||
var itemType = new Type<VerificaGiacenzeRowEntity, ListaVerificaGiacenzePickedItemListModelBinding>(R.layout.lista_verifica_giacenze_picked_item_list_model, BR.item);
|
||||
|
||||
itemType.areItemSame((item1, item2) -> item1.getId().equals(item2.getId()));
|
||||
itemType.areContentsTheSame(VerificaGiacenzeRowEntity::equals);
|
||||
itemType.onClick(x -> {
|
||||
openItemAction(x.getBinding().getItem());
|
||||
return null;
|
||||
});
|
||||
|
||||
handler.post(() -> {
|
||||
new LiveAdapter(mViewModel.getCurrentVerificaRows(), this)
|
||||
.map(VerificaGiacenzeRowEntity.class, itemType)
|
||||
.onNoData(isNoData -> {
|
||||
this.mBindings.verificaGiacenzeList.setVisibility(isNoData ? View.GONE : View.VISIBLE);
|
||||
this.mBindings.emptyView.setVisibility(isNoData ? View.VISIBLE : View.GONE);
|
||||
|
||||
return null;
|
||||
})
|
||||
.into(this.mBindings.verificaGiacenzeList);
|
||||
});
|
||||
}
|
||||
|
||||
private void initBarcodeReader() {
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(requireContext(), ex, false)));
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
this.mViewModel.processBarcodeDTO(data);
|
||||
this.onLoadingEnded();
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
private void openItemAction(VerificaGiacenzeRowEntity item) {
|
||||
var anagrafica = mViewModel.searchAnagraficaByCodMart(item.getCodMart());
|
||||
|
||||
var inputData = new BottomSheetItemDTO<VerificaGiacenzeRowEntity>()
|
||||
.setOriginalItem(item)
|
||||
.setCodMart(item.getCodMart())
|
||||
.setPartitaMag(item.getPartitaMag())
|
||||
.setDescrizione(item.getDescrizione())
|
||||
.setQta(item.getQta())
|
||||
.setNumCnf(item.getNumConf())
|
||||
.setUntMis(anagrafica.getUntMis());
|
||||
|
||||
new BottomSheetItemEditView(inputData)
|
||||
.setListener(this)
|
||||
.show(getParentFragmentManager(), "bottom-item-actions");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemEditRequest(VerificaGiacenzeRowEntity item) {
|
||||
var anagrafica = mViewModel.searchAnagraficaByCodMart(item.getCodMart());
|
||||
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
mViewModel.loadArticolo(anagrafica);
|
||||
} catch (Exception ex) {
|
||||
onError(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemDeleteRequest(VerificaGiacenzeRowEntity data) {
|
||||
mViewModel.deleteRow(data);
|
||||
}
|
||||
|
||||
|
||||
public PickedQuantityDTO onItemDispatched(MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal inWarehouseNumCnf,
|
||||
BigDecimal inWarehouseQtaTot,
|
||||
BigDecimal incomingNumCnf,
|
||||
BigDecimal incomingQtaTot,
|
||||
String partitaMag,
|
||||
LocalDate dataScad) {
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
AtomicReference<PickedQuantityDTO> result = new AtomicReference<>();
|
||||
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setInitialNumCnf(initialNumCnf)
|
||||
.setInitialQtaCnf(initialQtaCnf)
|
||||
.setInitialQtaTot(initialQtaTot)
|
||||
.setTotalNumCnfInWarehouse(inWarehouseNumCnf)
|
||||
.setTotalQtaInWarehouse(inWarehouseQtaTot)
|
||||
.setTotalQtaOrd(incomingQtaTot)
|
||||
.setTotalNumCnfOrd(incomingNumCnf)
|
||||
.setPartitaMag(partitaMag)
|
||||
.setDataScad(dataScad)
|
||||
.setCanLUBeClosed(false);
|
||||
|
||||
if (!dialogInputQuantityV2View.isVisible())
|
||||
handler.post(() -> {
|
||||
dialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
result.set(pickedQuantityDTO);
|
||||
countDownLatch.countDown();
|
||||
|
||||
})
|
||||
.setOnAbort(() -> {
|
||||
result.set(null);
|
||||
countDownLatch.countDown();
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
|
||||
try {
|
||||
countDownLatch.await();
|
||||
} catch (InterruptedException e) {
|
||||
this.onError(e);
|
||||
}
|
||||
return result.get();
|
||||
}
|
||||
|
||||
public void saveAndClose() {
|
||||
this.onLoadingStarted();
|
||||
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
mViewModel.save();
|
||||
this.onLoadingEnded();
|
||||
|
||||
popMe();
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||
titleText.setText(R.string.verifica_giacenze_menu);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package it.integry.integrywmsnative.gest.pv_verifica_giacenze;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGiacenzeRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGiacenzeRowRepository;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
|
||||
@Module(subcomponents = VerificaGiacenzeComponent.class)
|
||||
public class VerificaGiacenzeModule {
|
||||
|
||||
@Provides
|
||||
VerificaGiacenzeViewModel providesVerificaGiacenzeViewModel(ExecutorService executorService, Handler handler, VerificaGiacenzeMapper verificaGiacenzeMapper, VerificaGiacenzeRepository verificaGiacenzeRepository, VerificaGiacenzeRowRepository verificaGiacenzeRowRepository, GiacenzaPvRESTConsumer giacenzaPvRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new VerificaGiacenzeViewModel(executorService, handler, verificaGiacenzeMapper, giacenzaPvRESTConsumer, verificaGiacenzeRepository, verificaGiacenzeRowRepository, articoloRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,337 @@
|
||||
package it.integry.integrywmsnative.gest.pv_verifica_giacenze;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGiacenzeRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGiacenzeRowRepository;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.GiacenzaPvDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.pv.SaveNewVerificaRequestDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
|
||||
public class VerificaGiacenzeViewModel {
|
||||
|
||||
private final ExecutorService executorService;
|
||||
private final Handler handler;
|
||||
private final VerificaGiacenzeMapper verificaGiacenzeMapper;
|
||||
private final GiacenzaPvRESTConsumer giacenzaPvRESTConsumer;
|
||||
private final VerificaGiacenzeRepository verificaGiacenzeRepository;
|
||||
private final VerificaGiacenzeRowRepository verificaGiacenzeRowRepository;
|
||||
private final ArticoloRESTConsumer articoloRESTConsumer;
|
||||
|
||||
private Listener listener;
|
||||
|
||||
private MutableLiveData<VerificaGiacenzeEntity> currentVerifica = new MutableLiveData<>();
|
||||
private final MutableLiveData<List<VerificaGiacenzeRowEntity>> currentVerificaRows = new MutableLiveData<>(new ArrayList<>());
|
||||
|
||||
private List<GiacenzaPvDTO> currentLoadedGiacenza = null;
|
||||
private List<MtbAart> currentLoadedAnagrafiche = null;
|
||||
|
||||
@Inject
|
||||
public VerificaGiacenzeViewModel(ExecutorService executorService,
|
||||
Handler handler,
|
||||
VerificaGiacenzeMapper verificaGiacenzeMapper,
|
||||
GiacenzaPvRESTConsumer giacenzaPvRESTConsumer,
|
||||
VerificaGiacenzeRepository verificaGiacenzeRepository,
|
||||
VerificaGiacenzeRowRepository verificaGiacenzeRowRepository,
|
||||
ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
this.executorService = executorService;
|
||||
this.handler = handler;
|
||||
this.verificaGiacenzeMapper = verificaGiacenzeMapper;
|
||||
this.giacenzaPvRESTConsumer = giacenzaPvRESTConsumer;
|
||||
this.verificaGiacenzeRepository = verificaGiacenzeRepository;
|
||||
this.verificaGiacenzeRowRepository = verificaGiacenzeRowRepository;
|
||||
this.articoloRESTConsumer = articoloRESTConsumer;
|
||||
}
|
||||
|
||||
public boolean isAnotherVerificaGiacenzeInProgress() {
|
||||
return verificaGiacenzeRepository.isAnotherVerificaGiacenzeInProgress(5);
|
||||
}
|
||||
|
||||
public void clearPreviousSessions() {
|
||||
verificaGiacenzeRepository.clearPreviousSessions();
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
verificaGiacenzeRepository.delete(currentVerifica.getValue());
|
||||
|
||||
currentVerifica.postValue(null);
|
||||
currentVerificaRows.postValue(new ArrayList<>());
|
||||
|
||||
currentLoadedGiacenza = null;
|
||||
currentLoadedAnagrafiche = null;
|
||||
}
|
||||
|
||||
public LiveData<VerificaGiacenzeEntity> getCurrentVerifica() {
|
||||
return currentVerifica;
|
||||
}
|
||||
|
||||
public LiveData<List<VerificaGiacenzeRowEntity>> getCurrentVerificaRows() {
|
||||
return currentVerificaRows;
|
||||
}
|
||||
|
||||
public void loadDeposito(String codMdep) throws Exception {
|
||||
currentLoadedGiacenza = this.giacenzaPvRESTConsumer.retrieveGiacenzeSynchronized(codMdep);
|
||||
|
||||
if (currentLoadedGiacenza == null) {
|
||||
throw new Exception("Errore nel recupero delle giacenze");
|
||||
}
|
||||
|
||||
var codMartsToRetrieve = currentLoadedGiacenza.parallelStream()
|
||||
.map(GiacenzaPvDTO::getCodMart)
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
currentLoadedAnagrafiche = this.articoloRESTConsumer.getByCodMartsSynchronized(codMartsToRetrieve);
|
||||
|
||||
if (currentLoadedAnagrafiche == null) {
|
||||
throw new Exception("Errore nel recupero delle anagrafiche");
|
||||
}
|
||||
|
||||
currentLoadedAnagrafiche.forEach(x -> x.setFlagTracciabilita("N"));
|
||||
}
|
||||
|
||||
public void createNew(String codMdep) {
|
||||
var verificaGiacenzeEntity = new VerificaGiacenzeEntity();
|
||||
verificaGiacenzeEntity.setCodMdep(codMdep);
|
||||
verificaGiacenzeEntity.setData(LocalDateTime.now());
|
||||
verificaGiacenzeEntity.setVerificaGiacenzeRowList(new ArrayList<>());
|
||||
|
||||
verificaGiacenzeRepository.insert(verificaGiacenzeEntity);
|
||||
currentVerifica.postValue(verificaGiacenzeEntity);
|
||||
}
|
||||
|
||||
public VerificaGiacenzeEntity recoverLast() {
|
||||
var entity = verificaGiacenzeRepository.retrieveLast();
|
||||
currentVerifica.postValue(entity);
|
||||
currentVerificaRows.postValue(entity.getVerificaGiacenzeRowList());
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
public void save() throws Exception {
|
||||
currentVerifica.getValue().setVerificaGiacenzeRowList(currentVerificaRows.getValue());
|
||||
|
||||
SaveNewVerificaRequestDTO saveRequest = new SaveNewVerificaRequestDTO()
|
||||
.setData(verificaGiacenzeMapper.mapRoomToRest(currentVerifica.getValue()));
|
||||
|
||||
giacenzaPvRESTConsumer.saveNewVerificaSynchronized(saveRequest);
|
||||
|
||||
delete();
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
||||
|
||||
if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||
var ean13 = Ean13PesoModel.fromBarcode(barcodeScanDTO.getStringValue());
|
||||
this.loadArticolo(ean13.getPrecode());
|
||||
|
||||
} else {
|
||||
this.loadArticolo(barcodeScanDTO.getStringValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void loadArticolo(String barcodeProd) throws NoArtsFoundException, CloneNotSupportedException {
|
||||
var foundMtbAart = searchAnagraficaByBarcode(barcodeProd);
|
||||
|
||||
if (foundMtbAart == null)
|
||||
throw new NoArtsFoundException();
|
||||
|
||||
loadArticolo(foundMtbAart);
|
||||
}
|
||||
|
||||
public void loadArticolo(MtbAart mtbAart) throws NoArtsFoundException, CloneNotSupportedException {
|
||||
var foundGiacenza = currentLoadedGiacenza.parallelStream()
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbAart.getCodMart()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
var numCnfGiacenza = foundGiacenza != null ? UtilityBigDecimal.divide(foundGiacenza.getQtaInv(), mtbAart.getQtaCnf()) : BigDecimal.ZERO;
|
||||
var qtaCnfGiacenza = mtbAart.getQtaCnf();
|
||||
var qtaGiacenza = foundGiacenza != null ? foundGiacenza.getQtaInv() : BigDecimal.ZERO;
|
||||
|
||||
|
||||
var incomingNumCnf = foundGiacenza != null && foundGiacenza.getIncomingStock() != null ? UtilityBigDecimal.divide(foundGiacenza.getIncomingStock(), mtbAart.getQtaCnf()) : null;
|
||||
var incomingQta = foundGiacenza != null && foundGiacenza.getIncomingStock() != null ? foundGiacenza.getIncomingStock() : null;
|
||||
|
||||
var initialNumCnf = BigDecimal.ZERO;
|
||||
var initialQtaTot = BigDecimal.ZERO;
|
||||
|
||||
boolean isNewRow = false;
|
||||
|
||||
var rowToSave = currentVerificaRows.getValue().parallelStream()
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbAart.getCodMart()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
if (rowToSave == null) {
|
||||
isNewRow = true;
|
||||
|
||||
rowToSave = new VerificaGiacenzeRowEntity();
|
||||
rowToSave.setParentId(currentVerifica.getValue().getId());
|
||||
rowToSave.setCodMart(mtbAart.getCodMart());
|
||||
rowToSave.setPartitaMag(null);
|
||||
rowToSave.setDescrizione(mtbAart.getDescrizione());
|
||||
rowToSave.setScanCodBarre(mtbAart.getBarCode());
|
||||
} else {
|
||||
rowToSave = rowToSave.clone();
|
||||
initialNumCnf = rowToSave.getNumConf();
|
||||
initialQtaTot = rowToSave.getQta();
|
||||
}
|
||||
|
||||
var pickedQuantity = this.sendOnItemDispatched(mtbAart,
|
||||
initialNumCnf,
|
||||
qtaCnfGiacenza,
|
||||
initialQtaTot,
|
||||
numCnfGiacenza,
|
||||
qtaGiacenza,
|
||||
incomingNumCnf,
|
||||
incomingQta,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
||||
if (pickedQuantity == null)
|
||||
return;
|
||||
|
||||
|
||||
rowToSave.setNumConf(pickedQuantity.getNumCnf());
|
||||
rowToSave.setQtaConf(pickedQuantity.getQtaCnf());
|
||||
rowToSave.setQta(pickedQuantity.getQtaTot());
|
||||
|
||||
if (isNewRow) {
|
||||
insertRow(rowToSave);
|
||||
} else {
|
||||
updateRow(rowToSave);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public MtbAart searchAnagraficaByCodMart(String codMart) {
|
||||
return currentLoadedAnagrafiche.parallelStream()
|
||||
.filter(mtbAart -> codMart.equalsIgnoreCase(mtbAart.getCodMart()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public MtbAart searchAnagraficaByBarcode(String barcode) {
|
||||
return currentLoadedAnagrafiche.parallelStream()
|
||||
.filter(mtbAart -> barcode.equals(mtbAart.getBarCode()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public void insertRow(VerificaGiacenzeRowEntity rowEntity) {
|
||||
verificaGiacenzeRowRepository.insert(rowEntity, insertedData -> {
|
||||
handler.post(() -> {
|
||||
currentVerificaRows.getValue().add(insertedData);
|
||||
notifyRowChanged();
|
||||
});
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void updateRow(VerificaGiacenzeRowEntity rowEntity) {
|
||||
var indexInList = -1;
|
||||
|
||||
List<VerificaGiacenzeRowEntity> value = currentVerificaRows.getValue();
|
||||
for (int i = 0; i < value.size(); i++) {
|
||||
VerificaGiacenzeRowEntity entity = value.get(i);
|
||||
|
||||
if (Objects.equals(entity.getId(), rowEntity.getId())) {
|
||||
indexInList = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int finalIndexInList = indexInList;
|
||||
verificaGiacenzeRowRepository.update(rowEntity, updatedData -> {
|
||||
handler.post(() -> {
|
||||
currentVerificaRows.getValue().set(finalIndexInList, updatedData);
|
||||
notifyRowChanged();
|
||||
});
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void deleteRow(VerificaGiacenzeRowEntity rowEntity) {
|
||||
verificaGiacenzeRowRepository.delete(rowEntity, () -> {
|
||||
|
||||
handler.post(() -> {
|
||||
currentVerificaRows.getValue().remove(rowEntity);
|
||||
notifyRowChanged();
|
||||
});
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void notifyRowChanged() {
|
||||
currentVerificaRows.postValue(currentVerificaRows.getValue());
|
||||
}
|
||||
|
||||
private PickedQuantityDTO sendOnItemDispatched(MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal inWarehouseNumCnf,
|
||||
BigDecimal inWarehouseQtaTot,
|
||||
BigDecimal incomingNumCnf,
|
||||
BigDecimal incomingQtaTot,
|
||||
String partitaMag,
|
||||
LocalDate dataScad) {
|
||||
if (listener != null)
|
||||
return this.listener.onItemDispatched(mtbAart,
|
||||
initialNumCnf, initialQtaCnf, initialQtaTot,
|
||||
inWarehouseNumCnf, inWarehouseQtaTot,
|
||||
incomingNumCnf, incomingQtaTot,
|
||||
partitaMag, dataScad);
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setListener(Listener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
if (listener != null)
|
||||
this.listener.onError(ex);
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
PickedQuantityDTO onItemDispatched(MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal inWarehouseNumCnf,
|
||||
BigDecimal inWarehouseQtaTot,
|
||||
BigDecimal incomingNumCnf,
|
||||
BigDecimal incomingQtaTot,
|
||||
String partitaMag,
|
||||
LocalDate dataScad);
|
||||
|
||||
void onError(Exception ex);
|
||||
}
|
||||
}
|
||||
@ -22,7 +22,7 @@ import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.exception.EmptyLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUException;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
@ -576,7 +576,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
this.createNewLU(null, null, () -> searchArtFromUL(mtbColt, onComplete));
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
}
|
||||
|
||||
@ -621,7 +621,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
this.searchArtFromUL(mtbColt, onComplete);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
} else {
|
||||
this.sendError(new EmptyLUException());
|
||||
@ -644,7 +644,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
searchArtFromUL(mtbColt, onComplete);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
} else {
|
||||
this.sendError(new InvalidLUException());
|
||||
|
||||
@ -14,7 +14,7 @@ import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUGestioneException;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsInLUException;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
@ -141,7 +141,7 @@ public class VersamentoMerceViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
pickMerceULtoUL(mtbColt, onComplete);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
|
||||
}, this::sendError);
|
||||
} else {
|
||||
@ -198,7 +198,7 @@ public class VersamentoMerceViewModel {
|
||||
|
||||
if (codMdepIsValid) {
|
||||
pickMerceULtoUL(mtbColt, onComplete);
|
||||
} else this.sendError(new InvalidCodMdepException());
|
||||
} else this.sendError(new InvalidCodMdepLUException());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__item_edit;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BottomSheetItemDTO<T> {
|
||||
|
||||
private T originalItem;
|
||||
|
||||
private String codMart;
|
||||
private String partitaMag;
|
||||
private String descrizione;
|
||||
|
||||
private BigDecimal qta;
|
||||
private BigDecimal numCnf;
|
||||
private String untMis;
|
||||
|
||||
public T getOriginalItem() {
|
||||
return originalItem;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO<T> setOriginalItem(T originalItem) {
|
||||
this.originalItem = originalItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO<T> setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQta() {
|
||||
return qta;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO setQta(BigDecimal qta) {
|
||||
this.qta = qta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public BottomSheetItemDTO setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__item_edit;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BottomSheetItemEditDTO {
|
||||
|
||||
private String codMart;
|
||||
private String descrizioneArticolo;
|
||||
|
||||
private BigDecimal qta;
|
||||
private BigDecimal numCnf;
|
||||
private String untMis;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public BottomSheetItemEditDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizioneArticolo() {
|
||||
return descrizioneArticolo;
|
||||
}
|
||||
|
||||
public BottomSheetItemEditDTO setDescrizioneArticolo(String descrizioneArticolo) {
|
||||
this.descrizioneArticolo = descrizioneArticolo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQta() {
|
||||
return qta;
|
||||
}
|
||||
|
||||
public BottomSheetItemEditDTO setQta(BigDecimal qta) {
|
||||
this.qta = qta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public BottomSheetItemEditDTO setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public BottomSheetItemEditDTO setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -1,18 +1,22 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__item_edit;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetItemEditViewBinding;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__base.BottomSheetFragmentBaseView;
|
||||
|
||||
public class BottomSheetItemEditView extends BottomSheetFragmentBaseView {
|
||||
public class BottomSheetItemEditView extends BottomSheetDialogFragment {
|
||||
|
||||
|
||||
@Inject
|
||||
@ -21,33 +25,41 @@ public class BottomSheetItemEditView extends BottomSheetFragmentBaseView {
|
||||
public ObservableField<Boolean> enabledEditButton = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledDeleteButton = new ObservableField<>(true);
|
||||
|
||||
private final BottomSheetItemEditViewBinding mBinding;
|
||||
private BottomSheetItemEditViewBinding mBinding;
|
||||
private Listener mListener;
|
||||
|
||||
public BottomSheetItemEditView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mBinding = BottomSheetItemEditViewBinding.inflate(LayoutInflater.from(context), this, true);
|
||||
private final BottomSheetItemDTO<?> itemData;
|
||||
|
||||
public BottomSheetItemEditView(BottomSheetItemDTO<?> itemData) {
|
||||
this.itemData = itemData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
MainApplication.appComponent
|
||||
.bottomSheetItemEditComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
|
||||
|
||||
mBinding.setViewModel(mViewModel);
|
||||
mBinding.setView(this);
|
||||
mViewModel.init(this.itemData);
|
||||
}
|
||||
|
||||
public BottomSheetItemEditView setItem(BottomSheetItemEditDTO item) {
|
||||
this.mBinding.invalidateAll();
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mBinding = BottomSheetItemEditViewBinding.inflate(inflater, container, true);
|
||||
|
||||
this.mViewModel.init(item);
|
||||
mBinding.setLifecycleOwner(this);
|
||||
mBinding.setView(this);
|
||||
mBinding.setViewModel(mViewModel);
|
||||
|
||||
this.mBinding.executePendingBindings();
|
||||
this.parentView.requestLayout();
|
||||
mBinding.executePendingBindings();
|
||||
|
||||
return this;
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
public BottomSheetItemEditView enableEditButton() {
|
||||
@ -73,36 +85,24 @@ public class BottomSheetItemEditView extends BottomSheetFragmentBaseView {
|
||||
|
||||
|
||||
public void editItem() {
|
||||
if(this.mListener != null) this.mListener.onItemEdit();
|
||||
this.collapse();
|
||||
if(this.mListener != null) this.mListener.onItemEditRequest(itemData.getOriginalItem());
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
public void deleteItem() {
|
||||
if(this.mListener != null) this.mListener.onItemDelete();
|
||||
this.collapse();
|
||||
if(this.mListener != null) this.mListener.onItemDeleteRequest(itemData.getOriginalItem());
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStateChangedCallback(State newState) {
|
||||
if(newState == State.COLLAPSED) this.mViewModel.init(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSlideCallback(float slideOffset) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetItemEditView setListener(Listener listener) {
|
||||
public BottomSheetItemEditView setListener(Listener<?> listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onItemEdit();
|
||||
public interface Listener<U> {
|
||||
void onItemEditRequest(U data);
|
||||
|
||||
void onItemDelete();
|
||||
void onItemDeleteRequest(U data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,13 +4,13 @@ import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
public class BottomSheetItemEditViewModel {
|
||||
|
||||
private final MutableLiveData<BottomSheetItemEditDTO> mCurrentItem = new MutableLiveData<>();
|
||||
private final MutableLiveData<BottomSheetItemDTO<?>> mCurrentItem = new MutableLiveData<>();
|
||||
|
||||
public void init(BottomSheetItemEditDTO item) {
|
||||
public void init(BottomSheetItemDTO<?> item) {
|
||||
this.mCurrentItem.postValue(item);
|
||||
}
|
||||
|
||||
public MutableLiveData<BottomSheetItemEditDTO> getCurrentItem() {
|
||||
public MutableLiveData<BottomSheetItemDTO<?>> getCurrentItem() {
|
||||
return mCurrentItem;
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,8 @@ public class BottomSheetMtbColrEditModalView extends BottomSheetDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@ -103,4 +105,78 @@ public class BottomSheetMtbColrEditModalView extends BottomSheetDialogFragment {
|
||||
void onMtbColrDelete(MtbColr mtbColr);
|
||||
|
||||
}
|
||||
|
||||
// public static class Data<T> {
|
||||
// private T originalItem;
|
||||
// private String codMart;
|
||||
// private String partitaMag;
|
||||
// private String descrizione;
|
||||
// private String untMis;
|
||||
//
|
||||
// private BigDecimal qta;
|
||||
// private BigDecimal numCnf;
|
||||
//
|
||||
// public T getOriginalItem() {
|
||||
// return originalItem;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setOriginalItem(T originalItem) {
|
||||
// this.originalItem = originalItem;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public String getCodMart() {
|
||||
// return codMart;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setCodMart(String codMart) {
|
||||
// this.codMart = codMart;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public String getPartitaMag() {
|
||||
// return partitaMag;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setPartitaMag(String partitaMag) {
|
||||
// this.partitaMag = partitaMag;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public String getDescrizione() {
|
||||
// return descrizione;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setDescrizione(String descrizione) {
|
||||
// this.descrizione = descrizione;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public String getUntMis() {
|
||||
// return untMis;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setUntMis(String untMis) {
|
||||
// this.untMis = untMis;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public BigDecimal getQta() {
|
||||
// return qta;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setQta(BigDecimal qta) {
|
||||
// this.qta = qta;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public BigDecimal getNumCnf() {
|
||||
// return numCnf;
|
||||
// }
|
||||
//
|
||||
// public Data<T> setNumCnf(BigDecimal numCnf) {
|
||||
// this.numCnf = numCnf;
|
||||
// return this;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_deposito;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogAskDepositoComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogAskDepositoComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogAskDepositoView dialogAskDepositoView);
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_deposito;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
|
||||
@Module(subcomponents = DialogAskDepositoComponent.class)
|
||||
public class DialogAskDepositoModule {
|
||||
|
||||
@Provides
|
||||
DialogAskDepositoViewModel providesDialogAskDepositoViewModel(Handler handler, BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
return new DialogAskDepositoViewModel(handler, barcodeRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_deposito;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskDepositoBinding;
|
||||
|
||||
public class DialogAskDepositoView extends BaseDialogFragment implements DialogAskDepositoViewModel.Listener {
|
||||
|
||||
|
||||
@Inject
|
||||
DialogAskDepositoViewModel mViewModel;
|
||||
|
||||
@Inject
|
||||
ExecutorService executorService;
|
||||
|
||||
private DialogAskDepositoBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
private int mBarcodeScannerIstanceID;
|
||||
|
||||
private final RunnableArgs<String> onComplete;
|
||||
|
||||
//Pass here all external parameters
|
||||
public static DialogAskDepositoView newInstance(RunnableArgs<String> onComplete) {
|
||||
return new DialogAskDepositoView(onComplete);
|
||||
}
|
||||
|
||||
private DialogAskDepositoView(RunnableArgs<String> onComplete) {
|
||||
super();
|
||||
this.onComplete = onComplete;
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogAskDepositoComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.mContext = requireContext();
|
||||
|
||||
mBindings = DialogAskDepositoBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
setCancelable(true);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(isCancelable())
|
||||
.setNeutralButton(R.string.abort, null)
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||
alertDialog.setOnShowListener(this);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
this.initBarcode();
|
||||
mViewModel.setListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
|
||||
if (onComplete != null) onComplete.run(mViewModel.getCodMdep().getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
if (getDialog() != null) getDialog().dismiss();
|
||||
}
|
||||
|
||||
|
||||
private void initBarcode() {
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
.setOnScanFailed(this::onError));
|
||||
}
|
||||
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
this.mViewModel.processBarcodeDTO(data);
|
||||
this.onLoadingEnded();
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onDepositoLoaded() {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_deposito;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class DialogAskDepositoViewModel {
|
||||
|
||||
Handler handler;
|
||||
BarcodeRESTConsumer barcodeRESTConsumer;
|
||||
|
||||
private MutableLiveData<String> codMdep = new MutableLiveData<>();
|
||||
private Listener listener;
|
||||
|
||||
public DialogAskDepositoViewModel(Handler handler, BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
this.handler = handler;
|
||||
this.barcodeRESTConsumer = barcodeRESTConsumer;
|
||||
}
|
||||
|
||||
public LiveData<String> getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
||||
if (UtilityBarcode.isEan128(barcodeScanDTO)) {
|
||||
this.executeEtichettaEan128(barcodeScanDTO);
|
||||
} else
|
||||
throw new NoResultFromBarcodeException(barcodeScanDTO.getStringValue());
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
||||
var ean128Model = barcodeRESTConsumer.decodeEan128Synchronized(barcodeScanDTO);
|
||||
|
||||
if (UtilityString.isNullOrEmpty(ean128Model.Internal4)) {
|
||||
throw new InvalidCodMdepBarcodeException(barcodeScanDTO.getStringValue());
|
||||
}
|
||||
|
||||
// AvailableCodMdepsDTO availableCodMdepsDTO = SettingsManager.iDB().getAvailableCodMdep().stream()
|
||||
// .filter(x -> x.getCodMdep().equalsIgnoreCase(ean128Model.Internal4))
|
||||
// .findFirst()
|
||||
// .orElse(null);
|
||||
//
|
||||
// if (availableCodMdepsDTO == null) {
|
||||
// throw new InvalidCodMdepBarcodeException(barcodeScanDTO.getStringValue());
|
||||
// }
|
||||
|
||||
handler.post(() -> {
|
||||
this.codMdep.setValue(ean128Model.Internal4);
|
||||
this.sendOnDepositoLoaded();
|
||||
});
|
||||
}
|
||||
|
||||
private void sendOnDepositoLoaded() {
|
||||
if (listener != null) {
|
||||
listener.onDepositoLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
public void setListener(Listener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
|
||||
void onDepositoLoaded();
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.extra_info;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogExtraInfoComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogExtraInfoComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogExtraInfoView dialogExtraInfoView);
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.extra_info;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
@Module(subcomponents = DialogExtraInfoComponent.class)
|
||||
public class DialogExtraInfoModule {
|
||||
|
||||
@Provides
|
||||
DialogExtraInfoViewModel providesDialogExtraInfoViewModel() {
|
||||
return new DialogExtraInfoViewModel();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.extra_info;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeType;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.databinding.DialogExtraInfoBinding;
|
||||
|
||||
public class DialogExtraInfoView extends BaseDialogFragment {
|
||||
|
||||
@Inject
|
||||
DialogExtraInfoViewModel mViewModel;
|
||||
|
||||
private DialogExtraInfoBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
|
||||
private static final char FNC1 = 0x00f1;
|
||||
|
||||
//Pass here all external parameters
|
||||
public static DialogExtraInfoView newInstance() {
|
||||
return new DialogExtraInfoView();
|
||||
}
|
||||
|
||||
private DialogExtraInfoView() {
|
||||
super();
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogExtraInfoComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.mContext = requireContext();
|
||||
|
||||
mBindings = DialogExtraInfoBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
setCancelable(true);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(isCancelable())
|
||||
.setNeutralButton(R.string.action_close, null)
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||
alertDialog.setOnShowListener(this);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
if (getDialog() != null) getDialog().dismiss();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
try {
|
||||
this.initDepositBarcodeBitmap();
|
||||
} catch (Exception e) {
|
||||
this.onError(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void initDepositBarcodeBitmap() throws Exception {
|
||||
String currentCodMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
String barcode = "94" + currentCodMdep;
|
||||
|
||||
Bitmap barcodeBitmap = UtilityBarcode.generateBarcodeImage(barcode, BarcodeType.EAN128, 500, 170);
|
||||
mBindings.barcodeCurrentDeposit.setImageBitmap(barcodeBitmap);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.extra_info;
|
||||
|
||||
public class DialogExtraInfoViewModel {
|
||||
|
||||
}
|
||||
@ -9,11 +9,12 @@ import android.view.LayoutInflater;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
@ -126,9 +127,9 @@ public class DialogScanArtView extends BaseDialogFragment implements DialogScanA
|
||||
var filteredMtbColrList = mtbColrList;
|
||||
|
||||
if (mtbAart != null && filteredMtbColrList != null) {
|
||||
filteredMtbColrList = Stream.of(filteredMtbColrList)
|
||||
filteredMtbColrList = filteredMtbColrList.stream()
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbAart.getCodMart()))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (filteredMtbColrList != null && filteredMtbColrList.size() > 1) {
|
||||
|
||||
109
app/src/main/res/drawable/ic_dashboard_verifica_giacenze.xml
Normal file
109
app/src/main/res/drawable/ic_dashboard_verifica_giacenze.xml
Normal file
@ -0,0 +1,109 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="512dp" android:viewportHeight="425.2" android:viewportWidth="425.2" android:width="512dp">
|
||||
|
||||
<path android:fillColor="#ededed" android:pathData="M98.2,388.1h235c15.7,0 33,-26.7 33,-26.7 52.1,-68.7 50.6,-45.3 0.1,-114.5 0,0 -17.4,-25.7 -33.1,-25.7H97.2c-15.7,0 -28.3,12.7 -28.3,28.3 0,0 0,109.3 0,109.3 0,16.2 13.1,29.3 29.3,29.3Z"/>
|
||||
|
||||
<group>
|
||||
|
||||
<clip-path android:pathData="M98.2,388.1h235c15.7,0 33,-26.7 33,-26.7 52.1,-68.7 50.6,-45.3 0.1,-114.5 0,0 -17.4,-25.7 -33.1,-25.7H97.2c-15.7,0 -28.3,12.7 -28.3,28.3 0,0 0,109.3 0,109.3 0,16.2 13.1,29.3 29.3,29.3Z"/>
|
||||
|
||||
<path android:fillColor="#fff" android:pathData="M374.8,304.6c0,-16 -24.4,-16 -24.5,0 0,16 24.4,16 24.5,0Z"/>
|
||||
|
||||
</group>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M317.1,251L317.2,251A5.7,5.7 0,0 1,322.9 256.7L322.9,343.5A5.7,5.7 0,0 1,317.2 349.2L317.1,349.2A5.7,5.7 0,0 1,311.4 343.5L311.4,256.7A5.7,5.7 0,0 1,317.1 251z"/>
|
||||
|
||||
<path android:fillColor="#dddfdf" android:pathData="M70.4,367.9c3.8,11.7 14.9,20.2 27.9,20.2h235c10.6,0 22,-12.3 28.2,-20.2H70.4Z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M298.7,251L298.8,251A5.7,5.7 0,0 1,304.5 256.7L304.5,323.2A5.7,5.7 0,0 1,298.8 328.9L298.7,328.9A5.7,5.7 0,0 1,293 323.2L293,256.7A5.7,5.7 0,0 1,298.7 251z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M281.8,251L281.9,251A5.7,5.7 0,0 1,287.6 256.7L287.6,323.2A5.7,5.7 0,0 1,281.9 328.9L281.8,328.9A5.7,5.7 0,0 1,276.1 323.2L276.1,256.7A5.7,5.7 0,0 1,281.8 251z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M267.2,251.1L267.3,251.1A5.7,5.7 0,0 1,273 256.8L273,323.3A5.7,5.7 0,0 1,267.3 329L267.2,329A5.7,5.7 0,0 1,261.5 323.3L261.5,256.8A5.7,5.7 0,0 1,267.2 251.1z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M237.4,251L237.5,251A5.7,5.7 0,0 1,243.2 256.7L243.2,323.2A5.7,5.7 0,0 1,237.5 328.9L237.4,328.9A5.7,5.7 0,0 1,231.7 323.2L231.7,256.7A5.7,5.7 0,0 1,237.4 251z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M222.2,251.1L222.3,251.1A5.7,5.7 0,0 1,228 256.8L228,323.3A5.7,5.7 0,0 1,222.3 329L222.2,329A5.7,5.7 0,0 1,216.5 323.3L216.5,256.8A5.7,5.7 0,0 1,222.2 251.1z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M197.5,251L197.6,251A5.7,5.7 0,0 1,203.3 256.7L203.3,323.2A5.7,5.7 0,0 1,197.6 328.9L197.5,328.9A5.7,5.7 0,0 1,191.8 323.2L191.8,256.7A5.7,5.7 0,0 1,197.5 251z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M281.3,343.2a8.7,6.1 0,1 0,17.4 0a8.7,6.1 0,1 0,-17.4 0z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M255.8,343.8a8.7,6.1 0,1 0,17.4 0a8.7,6.1 0,1 0,-17.4 0z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M230.4,343.8a8.7,6.1 0,1 0,17.4 0a8.7,6.1 0,1 0,-17.4 0z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M205.4,343.8a8.7,6.1 0,1 0,17.4 0a8.7,6.1 0,1 0,-17.4 0z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M179.3,343.8a8.7,6.1 0,1 0,17.4 0a8.7,6.1 0,1 0,-17.4 0z"/>
|
||||
|
||||
<path android:fillColor="#dddfdf" android:pathData="M69.2,340.4l67.1,38.9c14,8.1 31.9,3.3 40,-10.7l117.8,-203.4c7.8,-13.5 -6.6,-41.9 -6.6,-41.9 -33.2,-79.5 -13.7,-66.5 -98.9,-57.4 0,0 -16.8,1.2 -28.8,7.2 -4.3,2.2 -89,243.8 -91.1,247.4l0.3,19.8Z"/>
|
||||
|
||||
<group>
|
||||
|
||||
<clip-path android:pathData="M69.2,340.4l67.1,38.9c14,8.1 31.9,3.3 40,-10.7l117.8,-203.4c7.8,-13.5 -6.6,-41.9 -6.6,-41.9 -33.2,-79.5 -13.7,-66.5 -98.9,-57.4 0,0 -16.8,1.2 -28.8,7.2 -4.3,2.2 -89,243.8 -91.1,247.4l0.3,19.8Z"/>
|
||||
|
||||
<path android:fillColor="#dddfdf" android:pathData="M242.9,87.5c-13.9,-8 -26.1,13.1 -12.3,21.2 13.9,8 26.1,-13.1 12.3,-21.2Z"/>
|
||||
|
||||
</group>
|
||||
|
||||
<path android:fillColor="#ededed" android:pathData="M168.1,348.5l117.8,-203.4c7.8,-13.5 -6.6,-41.9 -6.6,-41.9 -33.3,-79.5 -13.8,-66.5 -99,-57.5 0,0 -31,2.2 -38.8,15.7 0,0 -118.3,204.2 -118.3,204.2 -7.8,13.5 -3.2,30.9 10.3,38.7 0,0 94.5,54.8 94.5,54.8 14,8.1 31.9,3.3 40,-10.7Z"/>
|
||||
|
||||
<group>
|
||||
|
||||
<clip-path android:pathData="M168.1,348.5l117.8,-203.4c7.8,-13.5 -6.6,-41.9 -6.6,-41.9 -33.3,-79.5 -13.8,-66.5 -99,-57.5 0,0 -31,2.2 -38.8,15.7 0,0 -118.3,204.2 -118.3,204.2 -7.8,13.5 -3.2,30.9 10.3,38.7 0,0 94.5,54.8 94.5,54.8 14,8.1 31.9,3.3 40,-10.7Z"/>
|
||||
|
||||
<path android:fillColor="#fff" android:pathData="M234.6,67.3c-13.9,-8 -26.1,13.1 -12.3,21.2 13.9,8 26.1,-13.1 12.3,-21.2Z"/>
|
||||
|
||||
</group>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M159.27,90.45L159.32,90.36A5.7,5.7 75.1,0 1,167.11 88.29L242.2,131.82A5.7,5.7 75.1,0 1,244.28 139.61L244.23,139.7A5.7,5.7 75.1,0 1,236.44 141.77L161.34,98.24A5.7,5.7 75.1,0 1,159.27 90.45z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M150.02,106.3L150.07,106.22A5.7,5.7 75.1,0 1,157.86 104.14L215.4,137.49A5.7,5.7 75.1,0 1,217.47 145.28L217.42,145.37A5.7,5.7 75.1,0 1,209.63 147.44L152.1,114.09A5.7,5.7 75.1,0 1,150.02 106.3z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M141.49,120.88L141.54,120.79A5.7,5.7 75.1,0 1,149.33 118.72L206.86,152.07A5.7,5.7 75.1,0 1,208.94 159.86L208.89,159.95A5.7,5.7 75.1,0 1,201.1 162.02L143.56,128.67A5.7,5.7 75.1,0 1,141.49 120.88z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M134.37,133.58L134.42,133.49A5.7,5.7 75.1,0 1,142.21 131.42L199.74,164.77A5.7,5.7 75.1,0 1,201.81 172.56L201.76,172.64A5.7,5.7 75.1,0 1,193.97 174.72L136.44,141.37A5.7,5.7 75.1,0 1,134.37 133.58z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M119.38,159.24L119.43,159.16A5.7,5.7 75.1,0 1,127.22 157.08L184.75,190.43A5.7,5.7 75.1,0 1,186.82 198.22L186.77,198.31A5.7,5.7 75.1,0 1,178.98 200.38L121.45,167.03A5.7,5.7 75.1,0 1,119.38 159.24z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M111.69,172.44L111.74,172.35A5.7,5.7 75.1,0 1,119.53 170.28L177.06,203.63A5.7,5.7 75.1,0 1,179.13 211.42L179.08,211.51A5.7,5.7 75.1,0 1,171.29 213.58L113.76,180.23A5.7,5.7 75.1,0 1,111.69 172.44z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M99.3,193.75L99.35,193.66A5.7,5.7 75.1,0 1,107.14 191.59L164.67,224.94A5.7,5.7 75.1,0 1,166.74 232.73L166.69,232.82A5.7,5.7 75.1,0 1,158.9 234.89L101.37,201.54A5.7,5.7 75.1,0 1,99.3 193.75z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M221.1,167.56a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M208.86,189.95a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M196.13,211.97a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M183.59,233.51a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M170.53,256.09a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M86.66,215.77L86.71,215.68A5.7,5.7 75.1,0 1,94.5 213.61L152.03,246.96A5.7,5.7 75.1,0 1,154.11 254.75L154.06,254.84A5.7,5.7 75.1,0 1,146.27 256.91L88.73,223.56A5.7,5.7 75.1,0 1,86.66 215.77z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M77.25,232.08L77.3,231.99A5.7,5.7 75.1,0 1,85.09 229.92L142.62,263.27A5.7,5.7 75.1,0 1,144.69 271.06L144.64,271.14A5.7,5.7 75.1,0 1,136.85 273.22L79.32,239.87A5.7,5.7 75.1,0 1,77.25 232.08z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M68.88,246.23L68.93,246.14A5.7,5.7 75.1,0 1,76.72 244.07L134.26,277.42A5.7,5.7 75.1,0 1,136.33 285.21L136.28,285.3A5.7,5.7 75.1,0 1,128.49 287.37L70.96,254.02A5.7,5.7 75.1,0 1,68.88 246.23z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M56.12,267.75L56.17,267.67A5.7,5.7 75.1,0 1,63.96 265.59L139.49,309.38A5.7,5.7 75.1,0 1,141.56 317.17L141.51,317.25A5.7,5.7 75.1,0 1,133.72 319.33L58.19,275.54A5.7,5.7 75.1,0 1,56.12 267.75z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M159.35,278.86a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#505262" android:pathData="M147.17,301.6a8.7,6.1 120.1,1 0,8.73 -15.05a8.7,6.1 120.1,1 0,-8.73 15.05z"/>
|
||||
|
||||
<path android:fillColor="#676768" android:pathData="M304.5,281.2c-4.1,4.6 -10.2,9.5 -15.4,13.2s-0.7,1.3 -0.7,1.4c-42,27.7 -100.5,9.4 -120.1,-36.5 -4,-9.4 -5.7,-19.4 -6.8,-29.6 0.7,-5 0.3,-10.6 1.1,-15.6 8.3,-53.2 66.7,-83.4 115.4,-60.6 48.3,22.7 62.1,87.2 26.6,127.6ZM242,159c-49.2,0.3 -81.4,52.8 -60.5,97.3 21.4,45.4 83.1,52.7 114.7,13.6 36.5,-45.1 3.5,-111.3 -54.2,-111Z"/>
|
||||
|
||||
<path android:fillColor="#f7991c" android:pathData="M369.3,389.5l-6.4,-0.4c-1.3,-1.1 -3.1,-1.4 -4.6,-2.2 -4.9,-2.7 -7.8,-7.7 -11.4,-11.7l28.8,-25.6c3.3,3.9 7.7,7.5 9.8,12.3 5.6,12.6 -3.2,25.9 -16.2,27.7Z"/>
|
||||
|
||||
<path android:fillColor="#f7991c" android:pathData="M364.6,336.8l-29.3,25.1c-14.1,-16 -28.2,-32 -42.2,-48.1 -1.5,-3 2.2,-5.4 4.2,-7.3 5.2,-4.8 11.3,-10.5 16.6,-15 0.1,0 0.8,0 1.2,-0.4 2.1,-1.7 4.6,-5.3 7.3,-2.9 14.2,16.1 28.2,32.3 42.2,48.6Z"/>
|
||||
|
||||
<path android:fillColor="#676768" android:pathData="M375.7,349.5l-28.8,25.6c-3.9,-4.4 -7.7,-8.8 -11.5,-13.2l29.3,-25.1c3.7,4.3 7.4,8.4 11.1,12.7Z"/>
|
||||
|
||||
<path android:fillColor="#545454" android:pathData="M304.5,281.2l9.4,10.3c-5.3,4.5 -11.4,10.1 -16.6,15l-8.9,-10.7c0,0 0.2,-1 0.7,-1.4 5.2,-3.7 11.3,-8.6 15.4,-13.2Z"/>
|
||||
|
||||
<path android:fillAlpha="0.8" android:fillColor="#70d0fd" android:pathData="M242,159c57.7,-0.3 90.7,65.8 54.2,111 -31.6,39 -93.3,31.8 -114.7,-13.6 -20.9,-44.5 11.3,-97.1 60.5,-97.3ZM214.3,188.8c-3.3,0.2 -7.7,5.5 -9.7,8.1 -11.7,14.7 -13.4,34.3 -5.9,51.4 2.1,4.8 9.2,17.9 15.5,11.4 4.7,-4.8 -2.3,-10.3 -4.7,-14.8 -7.6,-14.8 -5.3,-31.4 5.7,-43.7 1.5,-1.7 4.2,-2.8 4.7,-5.5s-2,-7.2 -5.6,-6.9Z" android:strokeAlpha="0.8"/>
|
||||
|
||||
<path android:fillColor="#e2e9f7" android:pathData="M214.3,188.8c3.6,-0.2 6.3,3.4 5.6,6.9s-3.2,3.7 -4.7,5.5c-11,12.3 -13.3,28.9 -5.7,43.7 2.4,4.6 9.4,10 4.7,14.8 -6.3,6.5 -13.5,-6.6 -15.5,-11.4 -7.5,-17.1 -5.8,-36.7 5.9,-51.4s6.4,-7.9 9.7,-8.1Z"/>
|
||||
|
||||
</vector>
|
||||
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="48dp" android:viewportHeight="512" android:viewportWidth="512" android:width="48dp">
|
||||
|
||||
<path android:fillColor="#010101" android:pathData="M28.9,99.2c-10.7,0 -19.3,8.6 -19.3,19.3v270.2c0,10.7 8.6,19.3 19.3,19.3s19.3,-8.6 19.3,-19.3V118.5c0,-10.7 -8.6,-19.3 -19.3,-19.3ZM86.8,99.2c-10.7,0 -19.3,8.6 -19.3,19.3v270.2c0,10.7 8.6,19.3 19.3,19.3h38.6c10.7,0 19.3,-8.6 19.3,-19.3V118.5c0,-10.7 -8.6,-19.3 -19.3,-19.3h-38.6ZM183.3,99.2c-10.7,0 -19.3,8.6 -19.3,19.3v270.2c0,10.7 8.6,19.3 19.3,19.3s19.3,-8.6 19.3,-19.3V118.5c0,-10.7 -8.6,-19.3 -19.3,-19.3ZM241.2,99.2c-10.7,0 -19.3,8.6 -19.3,19.3v270.2c0,10.7 8.6,19.3 19.3,19.3h19.3c10.7,0 19.3,-8.6 19.3,-19.3V118.5c0,-10.7 -8.6,-19.3 -19.3,-19.3h-19.3ZM318.4,99.2c-10.7,0 -19.3,8.6 -19.3,19.3v270.2c0,10.7 8.6,19.3 19.3,19.3s19.3,-8.6 19.3,-19.3V118.5c0,-10.7 -8.6,-19.3 -19.3,-19.3ZM376.3,99.2c-10.7,0 -19.3,8.6 -19.3,19.3v270.2c0,10.7 8.6,19.3 19.3,19.3s19.3,-8.6 19.3,-19.3V118.5c0,-10.7 -8.6,-19.3 -19.3,-19.3Z"/>
|
||||
|
||||
<path android:fillColor="#010101" android:pathData="M500.7,393l-59.2,-59.2c34.7,-42.5 25.7,-103.8 -16.8,-138.6 -42.5,-34.7 -105,-28.4 -139.8,14 -34.7,42.5 -28.4,105 14,139.8 36.6,29.9 87.9,32.7 124.5,2.8l59.2,59.2c3.9,3.8 11.5,0.9 15.3,-3 3.7,-3.8 6.5,-11.1 2.8,-15ZM361.9,345.6c-40.6,0 -73.6,-32.9 -73.6,-73.6s32.9,-73.6 73.6,-73.6 73.6,32.9 73.6,73.6c0,40.6 -33,73.5 -73.6,73.6Z" android:strokeColor="#fff" android:strokeWidth="4"/>
|
||||
|
||||
<path android:fillColor="#fff" android:pathData="M362.7,271.4m-72.8,0a72.8,72.8 0,1 1,145.6 0a72.8,72.8 0,1 1,-145.6 0"/>
|
||||
|
||||
</vector>
|
||||
@ -51,7 +51,7 @@
|
||||
android:maxLines="2"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@{viewModel.currentItem.descrizioneArticolo}"
|
||||
android:text="@{viewModel.currentItem.descrizione}"
|
||||
android:textColor="#444"
|
||||
android:textStyle="bold"
|
||||
tools:text="Descrizione articolo" />
|
||||
|
||||
69
app/src/main/res/layout/dialog_ask_deposito.xml
Normal file
69
app/src/main/res/layout/dialog_ask_deposito.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/deposit" />
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
style="?attr/circularProgressIndicatorStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:trackCornerRadius="4dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/scan_deposit"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
54
app/src/main/res/layout/dialog_extra_info.xml
Normal file
54
app/src/main/res/layout/dialog_extra_info.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/informations" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Barcode deposito" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/barcode_current_deposit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"/>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="it.integry.integrywmsnative.core.data_store.db.entity.InventarioRoomDTO" />
|
||||
type="it.integry.integrywmsnative.core.data_store.db.entity.InventarioEntity" />
|
||||
|
||||
</data>
|
||||
|
||||
|
||||
94
app/src/main/res/layout/fragment_verifica_giacenze.xml
Normal file
94
app/src/main/res/layout/fragment_verifica_giacenze.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeFragment" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.15"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.2" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.15" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.85" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_black_barcode_scanner" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/scan_item" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/verifica_giacenze_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="72dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="?attr/floatingActionButtonPrimaryStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:singleClick="@{() -> view.saveAndClose()}"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibilityWhenNotNull="@{viewModel.currentVerifica}" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
<import type="it.integry.integrywmsnative.core.settings.SettingsManager" />
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/cod_mart"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.codMart}"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/qta_box"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="COD MART" />
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!-- android:id="@+id/peso"-->
|
||||
<!-- style="@style/AppTheme.NewMaterial.Text.Small"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:background="@drawable/badge_round_corner"-->
|
||||
<!-- android:backgroundTint="@color/orange_600"-->
|
||||
<!-- android:paddingStart="6dp"-->
|
||||
<!-- android:paddingEnd="6dp"-->
|
||||
<!-- android:text="@{UtilityNumber.decimalToString(item.qta) }"-->
|
||||
<!-- android:textColor="@android:color/white"-->
|
||||
<!-- android:textSize="14sp"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/qta_box"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:text="PESO KG" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/descrizione"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:text="@{item.getDescrizione()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/qta_box"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cod_mart"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{`Lotto: ` + item.getPartitaMag()}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/descrizione"
|
||||
app:visibilityWhenNotNull="@{item.partitaMag}"
|
||||
tools:text="Lotto: ABCDE" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_box"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="@{UtilityNumber.decimalToString(item.qta)}"
|
||||
tools:text="280.45\nCONF" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</layout>
|
||||
@ -47,6 +47,7 @@
|
||||
|
||||
<string name="permission_request_message">Questi permessi sono necessari al funzionamento dell\'app</string>
|
||||
<string name="picking_not_available">Picking non disponibile</string>
|
||||
<string name="scan_deposit">Scansiona il codice a barre di un <b>deposito</b></string>
|
||||
<string name="scan_item">Scansiona il codice a barre di un <b>articolo</b></string>
|
||||
<string name="please_open_lu">Prima di procedere apri una <b>nuova UL</b></string>
|
||||
<string name="scan_lu_to_deposit">Scansiona il codice a barre di una <b>UL</b> per versarla</string>
|
||||
@ -92,6 +93,7 @@
|
||||
|
||||
<!-- SETTINGS -->
|
||||
<string name="general_settings">Impostazioni</string>
|
||||
<string name="informations">Informazioni</string>
|
||||
|
||||
<plurals name="references">
|
||||
<item quantity="one">referenza</item>
|
||||
@ -152,7 +154,8 @@
|
||||
<string name="server_cod_azienda_not_valid"><![CDATA[Il codice azienda <b>%s</b> non è valido. Controllalo e riprova]]></string>
|
||||
<string name="server_not_reachable"><![CDATA[L\'host <b>%s</b> sulla porta <b>%d</b> non è al momento raggiungibile. Riprova più tardi]]></string>
|
||||
<string name="no_codmdep_available">Nessun deposito trovato per l\'utente corrente</string>
|
||||
<string name="invalid_codmdep">Impossibile utilizzare unità logistiche di altri depositi</string>
|
||||
<string name="invalid_codmdep_error_message">Codice deposito non valido</string>
|
||||
<string name="invalid_codmdep_lu_error_message">Impossibile utilizzare unità logistiche di altri depositi</string>
|
||||
<string name="action_choose_profile_db">Seleziona un database</string>
|
||||
|
||||
<string name="empty_rows_in_mtbcolt">Nessuna riga presente nell\'Unità Logistica</string>
|
||||
@ -410,6 +413,7 @@
|
||||
<string name="title_dynamic_agricoper">Personalizzazioni Agricoper</string>
|
||||
<string name="title_dynamicfeature">Titolo Modulo</string>
|
||||
<string name="doc_interni">Documenti interni</string>
|
||||
<string name="verifica_giacenze_menu">Verifica giacenze</string>
|
||||
<string name="doc_interni_num_arts_doc"><![CDATA[#<b>%d</b> articoli]]></string>
|
||||
<string name="doc_interni_doc_header"><![CDATA[DL #<b>%d_%s</b>]]></string>
|
||||
<string name="dialog_doc_interni_choose_dtip_mgrp_pair_title">Seleziona estremi documento</string>
|
||||
|
||||
@ -39,8 +39,10 @@
|
||||
<item name="nav_pv_ordini_acquisto_trasmessi" type="id" />
|
||||
<item name="nav_prod_rientro_merce" type="id" />
|
||||
<item name="nav_prod_linee" type="id" />
|
||||
<item name="nav_extra_info" type="id" />
|
||||
<item name="nav_settings" type="id" />
|
||||
<item name="nav_logout" type="id" />
|
||||
<item name="nav_pv_doc_interni" type="id" />
|
||||
<item name="nav_pv_verifica_giacenze" type="id" />
|
||||
|
||||
</resources>
|
||||
@ -125,6 +125,7 @@
|
||||
<string name="dialog_message_additional_notes">Enter any additional notes in your logistics unit</string>
|
||||
<string name="logistic_unit">LU</string>
|
||||
<string name="general_settings">General settings</string>
|
||||
<string name="informations">Info</string>
|
||||
<string name="action_close_ul">Close LU</string>
|
||||
<string name="already_read_articles">Submitted items</string>
|
||||
<string name="orders">Orders</string>
|
||||
@ -136,6 +137,7 @@
|
||||
<string name="prepared_by_text">Prepared by</string>
|
||||
<string name="customer_text">Customer</string>
|
||||
<string name="picking_not_available">Picking not available</string>
|
||||
<string name="scan_deposit">Please scan a <b>deposit</b> barcode</string>
|
||||
<string name="scan_item">Please scan an <b>item</b> barcode</string>
|
||||
<string name="extra_item">Extra item</string>
|
||||
<string name="piece">Piece</string>
|
||||
@ -149,7 +151,8 @@
|
||||
<string name="server_cod_azienda_not_valid"><![CDATA[Code <b>%s</b> is not valid. Check and retry later]]></string>
|
||||
<string name="server_not_reachable"><![CDATA[The host <b>%s</b> on port <b>%d</b> is not reachable. Retry later]]></string>
|
||||
<string name="no_codmdep_available">No deposit available with current user</string>
|
||||
<string name="invalid_codmdep">Unable to use logistics units from other depots</string>
|
||||
<string name="invalid_codmdep_error_message">Not valid depo code</string>
|
||||
<string name="invalid_codmdep_lu_error_message">Unable to use logistics units from other depots</string>
|
||||
<string name="action_choose_profile_db">Choose a database</string>
|
||||
|
||||
<string name="empty_rows_in_mtbcolt">No rows found in LU</string>
|
||||
@ -415,6 +418,7 @@
|
||||
<string name="title_dynamic_agricoper">Agricoper customizations</string>
|
||||
<string name="title_dynamicfeature">Module Title</string>
|
||||
<string name="doc_interni">Internal Docs</string>
|
||||
<string name="verifica_giacenze_menu">Check stocks</string>
|
||||
<string name="doc_interni_num_arts_doc"><![CDATA[#<b>%d</b> items]]></string>
|
||||
<string name="doc_interni_doc_header"><![CDATA[DL #<b>%d_%s</b>]]></string>
|
||||
<string name="dialog_doc_interni_choose_dtip_mgrp_pair_title">Choose Document details</string>
|
||||
|
||||
127
ext_sources/ICONS/ic_dashboard_verifica_giacenze.svg
Normal file
127
ext_sources/ICONS/ic_dashboard_verifica_giacenze.svg
Normal file
@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Livello_1" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 425.2 425.2">
|
||||
<!-- Generator: Adobe Illustrator 29.0.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 192) -->
|
||||
<defs>
|
||||
<style>
|
||||
.st0 {
|
||||
fill: #676768;
|
||||
}
|
||||
|
||||
.st1 {
|
||||
fill: #505262;
|
||||
}
|
||||
|
||||
.st2 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.st3 {
|
||||
fill: #f7991c;
|
||||
}
|
||||
|
||||
.st4 {
|
||||
fill: #dddfdf;
|
||||
}
|
||||
|
||||
.st5 {
|
||||
fill: #70d0fd;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.st6 {
|
||||
clip-path: url(#clippath-1);
|
||||
}
|
||||
|
||||
.st7 {
|
||||
fill: #545454;
|
||||
}
|
||||
|
||||
.st8 {
|
||||
clip-path: url(#clippath-2);
|
||||
}
|
||||
|
||||
.st9 {
|
||||
fill: #ededed;
|
||||
}
|
||||
|
||||
.st10 {
|
||||
clip-path: url(#clippath);
|
||||
}
|
||||
|
||||
.st11 {
|
||||
fill: #e2e9f7;
|
||||
}
|
||||
</style>
|
||||
<clipPath id="clippath">
|
||||
<path class="st9" d="M98.2,388.1h235c15.7,0,33-26.7,33-26.7,52.1-68.7,50.6-45.3.1-114.5,0,0-17.4-25.7-33.1-25.7H97.2c-15.7,0-28.3,12.7-28.3,28.3,0,0,0,109.3,0,109.3,0,16.2,13.1,29.3,29.3,29.3Z"/>
|
||||
</clipPath>
|
||||
<clipPath id="clippath-1">
|
||||
<path class="st4" d="M69.2,340.4l67.1,38.9c14,8.1,31.9,3.3,40-10.7l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.2-79.5-13.7-66.5-98.9-57.4,0,0-16.8,1.2-28.8,7.2-4.3,2.2-89,243.8-91.1,247.4l.3,19.8Z"/>
|
||||
</clipPath>
|
||||
<clipPath id="clippath-2">
|
||||
<path class="st9" d="M168.1,348.5l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.3-79.5-13.8-66.5-99-57.5,0,0-31,2.2-38.8,15.7,0,0-118.3,204.2-118.3,204.2-7.8,13.5-3.2,30.9,10.3,38.7,0,0,94.5,54.8,94.5,54.8,14,8.1,31.9,3.3,40-10.7Z"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st9" d="M98.2,388.1h235c15.7,0,33-26.7,33-26.7,52.1-68.7,50.6-45.3.1-114.5,0,0-17.4-25.7-33.1-25.7H97.2c-15.7,0-28.3,12.7-28.3,28.3,0,0,0,109.3,0,109.3,0,16.2,13.1,29.3,29.3,29.3Z"/>
|
||||
<g class="st10">
|
||||
<path class="st2" d="M374.8,304.6c0-16-24.4-16-24.5,0,0,16,24.4,16,24.5,0Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<rect class="st1" x="311.4" y="251" width="11.5" height="98.2" rx="5.7" ry="5.7"/>
|
||||
<path class="st4" d="M70.4,367.9c3.8,11.7,14.9,20.2,27.9,20.2h235c10.6,0,22-12.3,28.2-20.2H70.4Z"/>
|
||||
<rect class="st1" x="293" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st1" x="276.1" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st1" x="261.5" y="251.1" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st1" x="231.7" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st1" x="216.5" y="251.1" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st1" x="191.8" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<ellipse class="st1" cx="290" cy="343.2" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st1" cx="264.5" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st1" cx="239.1" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st1" cx="214.1" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st1" cx="188" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st4" d="M69.2,340.4l67.1,38.9c14,8.1,31.9,3.3,40-10.7l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.2-79.5-13.7-66.5-98.9-57.4,0,0-16.8,1.2-28.8,7.2-4.3,2.2-89,243.8-91.1,247.4l.3,19.8Z"/>
|
||||
<g class="st6">
|
||||
<path class="st4" d="M242.9,87.5c-13.9-8-26.1,13.1-12.3,21.2,13.9,8,26.1-13.1,12.3-21.2Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st9" d="M168.1,348.5l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.3-79.5-13.8-66.5-99-57.5,0,0-31,2.2-38.8,15.7,0,0-118.3,204.2-118.3,204.2-7.8,13.5-3.2,30.9,10.3,38.7,0,0,94.5,54.8,94.5,54.8,14,8.1,31.9,3.3,40-10.7Z"/>
|
||||
<g class="st8">
|
||||
<path class="st2" d="M234.6,67.3c-13.9-8-26.1,13.1-12.3,21.2,13.9,8,26.1-13.1,12.3-21.2Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<rect class="st1" x="196" y="65.9" width="11.5" height="98.2" rx="5.7" ry="5.7" transform="translate(1.1 231.9) rotate(-59.9)"/>
|
||||
<rect class="st1" x="178" y="86.8" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-17.2 221.7) rotate(-59.9)"/>
|
||||
<rect class="st1" x="169.5" y="101.4" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-34.1 221.6) rotate(-59.9)"/>
|
||||
<rect class="st1" x="162.3" y="114.1" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-48.6 221.7) rotate(-59.9)"/>
|
||||
<rect class="st1" x="147.3" y="139.8" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-78.3 221.5) rotate(-59.9)"/>
|
||||
<rect class="st1" x="139.7" y="153" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-93.6 221.5) rotate(-59.9)"/>
|
||||
<rect class="st1" x="127.3" y="174.3" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-118.2 221.4) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="225.4" cy="160" rx="8.7" ry="6.1" transform="translate(-26 274.8) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="213.2" cy="182.4" rx="8.7" ry="6.1" transform="translate(-51.5 275.4) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="200.5" cy="204.4" rx="8.7" ry="6.1" transform="translate(-76.9 275.4) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="187.9" cy="226" rx="8.7" ry="6.1" transform="translate(-101.8 275.2) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="174.9" cy="248.6" rx="8.7" ry="6.1" transform="translate(-127.9 275.2) rotate(-59.9)"/>
|
||||
<rect class="st1" x="114.6" y="196.3" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-143.5 221.4) rotate(-59.9)"/>
|
||||
<rect class="st1" x="105.2" y="212.6" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-162.3 221.4) rotate(-59.9)"/>
|
||||
<rect class="st1" x="96.9" y="226.7" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-178.7 221.3) rotate(-59.9)"/>
|
||||
<rect class="st1" x="93.2" y="243.1" width="11.5" height="98.7" rx="5.7" ry="5.7" transform="translate(-203.8 231.4) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="163.7" cy="271.3" rx="8.7" ry="6.1" transform="translate(-153.1 276.9) rotate(-59.9)"/>
|
||||
<ellipse class="st1" cx="151.5" cy="294" rx="8.7" ry="6.1" transform="translate(-178.8 277.7) rotate(-59.9)"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M304.5,281.2c-4.1,4.6-10.2,9.5-15.4,13.2s-.7,1.3-.7,1.4c-42,27.7-100.5,9.4-120.1-36.5-4-9.4-5.7-19.4-6.8-29.6.7-5,.3-10.6,1.1-15.6,8.3-53.2,66.7-83.4,115.4-60.6,48.3,22.7,62.1,87.2,26.6,127.6ZM242,159c-49.2.3-81.4,52.8-60.5,97.3,21.4,45.4,83.1,52.7,114.7,13.6,36.5-45.1,3.5-111.3-54.2-111Z"/>
|
||||
<path class="st3" d="M369.3,389.5l-6.4-.4c-1.3-1.1-3.1-1.4-4.6-2.2-4.9-2.7-7.8-7.7-11.4-11.7l28.8-25.6c3.3,3.9,7.7,7.5,9.8,12.3,5.6,12.6-3.2,25.9-16.2,27.7Z"/>
|
||||
<path class="st3" d="M364.6,336.8l-29.3,25.1c-14.1-16-28.2-32-42.2-48.1-1.5-3,2.2-5.4,4.2-7.3,5.2-4.8,11.3-10.5,16.6-15,.1,0,.8,0,1.2-.4,2.1-1.7,4.6-5.3,7.3-2.9,14.2,16.1,28.2,32.3,42.2,48.6Z"/>
|
||||
<path class="st0" d="M375.7,349.5l-28.8,25.6c-3.9-4.4-7.7-8.8-11.5-13.2l29.3-25.1c3.7,4.3,7.4,8.4,11.1,12.7Z"/>
|
||||
<path class="st7" d="M304.5,281.2l9.4,10.3c-5.3,4.5-11.4,10.1-16.6,15l-8.9-10.7c0,0,.2-1,.7-1.4,5.2-3.7,11.3-8.6,15.4-13.2Z"/>
|
||||
<path class="st5" d="M242,159c57.7-.3,90.7,65.8,54.2,111-31.6,39-93.3,31.8-114.7-13.6-20.9-44.5,11.3-97.1,60.5-97.3ZM214.3,188.8c-3.3.2-7.7,5.5-9.7,8.1-11.7,14.7-13.4,34.3-5.9,51.4,2.1,4.8,9.2,17.9,15.5,11.4,4.7-4.8-2.3-10.3-4.7-14.8-7.6-14.8-5.3-31.4,5.7-43.7,1.5-1.7,4.2-2.8,4.7-5.5s-2-7.2-5.6-6.9Z"/>
|
||||
<path class="st11" d="M214.3,188.8c3.6-.2,6.3,3.4,5.6,6.9s-3.2,3.7-4.7,5.5c-11,12.3-13.3,28.9-5.7,43.7,2.4,4.6,9.4,10,4.7,14.8-6.3,6.5-13.5-6.6-15.5-11.4-7.5-17.1-5.8-36.7,5.9-51.4s6.4-7.9,9.7-8.1Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
7
ext_sources/ICONS/ic_drawer_verifica_giacenze.svg
Normal file
7
ext_sources/ICONS/ic_drawer_verifica_giacenze.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Livello_1" xmlns="http://www.w3.org/2000/svg" baseProfile="tiny" version="1.2" viewBox="0 0 512 512">
|
||||
<!-- Generator: Adobe Illustrator 29.0.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 192) -->
|
||||
<path d="M28.9,99.2c-10.7,0-19.3,8.6-19.3,19.3v270.2c0,10.7,8.6,19.3,19.3,19.3s19.3-8.6,19.3-19.3V118.5c0-10.7-8.6-19.3-19.3-19.3ZM86.8,99.2c-10.7,0-19.3,8.6-19.3,19.3v270.2c0,10.7,8.6,19.3,19.3,19.3h38.6c10.7,0,19.3-8.6,19.3-19.3V118.5c0-10.7-8.6-19.3-19.3-19.3h-38.6ZM183.3,99.2c-10.7,0-19.3,8.6-19.3,19.3v270.2c0,10.7,8.6,19.3,19.3,19.3s19.3-8.6,19.3-19.3V118.5c0-10.7-8.6-19.3-19.3-19.3ZM241.2,99.2c-10.7,0-19.3,8.6-19.3,19.3v270.2c0,10.7,8.6,19.3,19.3,19.3h19.3c10.7,0,19.3-8.6,19.3-19.3V118.5c0-10.7-8.6-19.3-19.3-19.3h-19.3ZM318.4,99.2c-10.7,0-19.3,8.6-19.3,19.3v270.2c0,10.7,8.6,19.3,19.3,19.3s19.3-8.6,19.3-19.3V118.5c0-10.7-8.6-19.3-19.3-19.3ZM376.3,99.2c-10.7,0-19.3,8.6-19.3,19.3v270.2c0,10.7,8.6,19.3,19.3,19.3s19.3-8.6,19.3-19.3V118.5c0-10.7-8.6-19.3-19.3-19.3Z" fill="#010101"/>
|
||||
<path d="M500.7,393l-59.2-59.2c34.7-42.5,25.7-103.8-16.8-138.6-42.5-34.7-105-28.4-139.8,14-34.7,42.5-28.4,105,14,139.8,36.6,29.9,87.9,32.7,124.5,2.8l59.2,59.2c3.9,3.8,11.5.9,15.3-3,3.7-3.8,6.5-11.1,2.8-15ZM361.9,345.6c-40.6,0-73.6-32.9-73.6-73.6s32.9-73.6,73.6-73.6,73.6,32.9,73.6,73.6c0,40.6-33,73.5-73.6,73.6Z" fill="#010101" stroke="#fff" stroke-miterlimit="10" stroke-width="4"/>
|
||||
<circle cx="362.7" cy="271.4" r="72.8" fill="#fff"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
34
ext_sources/ICONS/magnifyng_glass.svg
Normal file
34
ext_sources/ICONS/magnifyng_glass.svg
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Livello_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 418.4 418.4">
|
||||
<!-- Generator: Adobe Illustrator 29.0.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 192) -->
|
||||
<defs>
|
||||
<style>
|
||||
.st0 {
|
||||
fill: #676768;
|
||||
}
|
||||
|
||||
.st1 {
|
||||
fill: #f7991c;
|
||||
}
|
||||
|
||||
.st2 {
|
||||
fill: #545454;
|
||||
}
|
||||
|
||||
.st3 {
|
||||
fill: #70d0fd;
|
||||
}
|
||||
|
||||
.st4 {
|
||||
fill: #e2e9f7;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path class="st0" d="M256.4,237.2c-6.1,8-15.6,16.6-23.6,23.2-.8.7-1,2.2-1.1,2.3-65.3,49.8-162.6,26.4-199.6-46.1s-11.4-31-14.3-47.4c.5-8.2-.7-17.3,0-25.5C25.4,56.1,117.2.5,199,32.3s110.8,135.1,57.4,204.9ZM141,45.1C60.9,51,14.2,140.1,53.3,210.3s141.2,76.6,188.3,9.5c54.5-77.5-6.6-181.6-100.6-174.7Z"/>
|
||||
<path class="st1" d="M373.8,406.4h-10.5c-2.3-1.6-5.2-1.9-7.7-3.1-8.2-3.9-13.6-11.6-19.9-17.9l44.1-44.9c5.8,6,13.3,11.3,17.3,19,10.4,19.8-2.3,42.5-23.3,46.9Z"/>
|
||||
<path class="st1" d="M360.4,321.1l-44.9,44.2c-24.7-24.5-49.5-49-74.1-73.7-2.8-4.7,2.9-9.1,6-12.4,8-8.5,17.2-18.3,25.4-26.2s1.3-.2,1.9-.7c3.2-3,6.9-9.1,11.6-5.6,24.9,24.6,49.5,49.6,74.1,74.4Z"/>
|
||||
<path class="st0" d="M379.8,340.5l-44.1,44.9c-6.8-6.7-13.4-13.5-20.2-20.2l44.9-44.2c6.5,6.5,13,12.9,19.5,19.5Z"/>
|
||||
<path class="st2" d="M256.4,237.2l16.5,15.7c-8.2,7.9-17.4,17.7-25.4,26.2l-15.7-16.5c0,0,.2-1.6,1.1-2.3,8-6.6,17.5-15.2,23.6-23.2Z"/>
|
||||
<path class="st3" d="M141,45.1c94-6.9,155.1,97.2,100.6,174.7-47.1,67.1-148.5,62.2-188.3-9.5s7.7-159.3,87.8-165.2ZM99.1,96.6c-5.4.7-11.9,9.9-15,14.3-17.5,25.2-18,57.4-4,84.4,3.9,7.5,17,28.1,26.6,16.8,7.1-8.4-4.9-16.4-9.3-23.6-14-23.2-12.2-50.6,4.4-71.8,2.3-3,6.5-5.1,7.1-9.4s-4-11.4-9.9-10.6Z"/>
|
||||
<path class="st4" d="M99.1,96.6c5.8-.8,10.6,4.9,9.9,10.6s-4.8,6.4-7.1,9.4c-16.6,21.3-18.5,48.6-4.4,71.8s16.4,15.3,9.3,23.6c-9.6,11.3-22.7-9.3-26.6-16.8-14-27-13.5-59.2,4-84.4,3.1-4.4,9.6-13.5,15-14.3Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
2
ext_sources/ICONS/search.svg
Normal file
2
ext_sources/ICONS/search.svg
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="512" height="512"><path d="M23.707,22.293l-5.969-5.969a10.016,10.016,0,1,0-1.414,1.414l5.969,5.969a1,1,0,0,0,1.414-1.414ZM10,18a8,8,0,1,1,8-8A8.009,8.009,0,0,1,10,18Z"/></svg>
|
||||
|
After Width: | Height: | Size: 295 B |
97
ext_sources/ICONS/tags.svg
Normal file
97
ext_sources/ICONS/tags.svg
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Livello_1" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 425.2 425.2">
|
||||
<!-- Generator: Adobe Illustrator 29.0.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 192) -->
|
||||
<defs>
|
||||
<style>
|
||||
.st0 {
|
||||
fill: #505262;
|
||||
}
|
||||
|
||||
.st1 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.st2 {
|
||||
fill: #dddfdf;
|
||||
}
|
||||
|
||||
.st3 {
|
||||
clip-path: url(#clippath-1);
|
||||
}
|
||||
|
||||
.st4 {
|
||||
clip-path: url(#clippath-2);
|
||||
}
|
||||
|
||||
.st5 {
|
||||
fill: #ededed;
|
||||
}
|
||||
|
||||
.st6 {
|
||||
clip-path: url(#clippath);
|
||||
}
|
||||
</style>
|
||||
<clipPath id="clippath">
|
||||
<path class="st5" d="M98.2,388.1h235c15.7,0,33-26.7,33-26.7,52.1-68.7,50.6-45.3.1-114.5,0,0-17.4-25.7-33.1-25.7H97.2c-15.7,0-28.3,12.7-28.3,28.3,0,0,0,109.3,0,109.3,0,16.2,13.1,29.3,29.3,29.3Z"/>
|
||||
</clipPath>
|
||||
<clipPath id="clippath-1">
|
||||
<path class="st2" d="M69.2,340.4l67.1,38.9c14,8.1,31.9,3.3,40-10.7l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.2-79.5-13.7-66.5-98.9-57.4,0,0-16.8,1.2-28.8,7.2-4.3,2.2-89,243.8-91.1,247.4l.3,19.8Z"/>
|
||||
</clipPath>
|
||||
<clipPath id="clippath-2">
|
||||
<path class="st5" d="M168.1,348.5l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.3-79.5-13.8-66.5-99-57.5,0,0-31,2.2-38.8,15.7,0,0-118.3,204.2-118.3,204.2-7.8,13.5-3.2,30.9,10.3,38.7,0,0,94.5,54.8,94.5,54.8,14,8.1,31.9,3.3,40-10.7Z"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st5" d="M98.2,388.1h235c15.7,0,33-26.7,33-26.7,52.1-68.7,50.6-45.3.1-114.5,0,0-17.4-25.7-33.1-25.7H97.2c-15.7,0-28.3,12.7-28.3,28.3,0,0,0,109.3,0,109.3,0,16.2,13.1,29.3,29.3,29.3Z"/>
|
||||
<g class="st6">
|
||||
<path class="st1" d="M374.8,304.6c0-16-24.4-16-24.5,0,0,16,24.4,16,24.5,0Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<rect class="st0" x="311.4" y="251" width="11.5" height="98.2" rx="5.7" ry="5.7"/>
|
||||
<path class="st2" d="M70.4,367.9c3.8,11.7,14.9,20.2,27.9,20.2h235c10.6,0,22-12.3,28.2-20.2H70.4Z"/>
|
||||
<rect class="st0" x="293" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st0" x="276.1" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st0" x="261.5" y="251.1" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st0" x="231.7" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st0" x="216.5" y="251.1" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<rect class="st0" x="191.8" y="251" width="11.5" height="77.9" rx="5.7" ry="5.7"/>
|
||||
<ellipse class="st0" cx="290" cy="343.2" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st0" cx="264.5" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st0" cx="239.1" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st0" cx="214.1" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
<ellipse class="st0" cx="188" cy="343.8" rx="8.7" ry="6.1"/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st2" d="M69.2,340.4l67.1,38.9c14,8.1,31.9,3.3,40-10.7l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.2-79.5-13.7-66.5-98.9-57.4,0,0-16.8,1.2-28.8,7.2-4.3,2.2-89,243.8-91.1,247.4l.3,19.8Z"/>
|
||||
<g class="st3">
|
||||
<path class="st2" d="M242.9,87.5c-13.9-8-26.1,13.1-12.3,21.2,13.9,8,26.1-13.1,12.3-21.2Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st5" d="M168.1,348.5l117.8-203.4c7.8-13.5-6.6-41.9-6.6-41.9-33.3-79.5-13.8-66.5-99-57.5,0,0-31,2.2-38.8,15.7,0,0-118.3,204.2-118.3,204.2-7.8,13.5-3.2,30.9,10.3,38.7,0,0,94.5,54.8,94.5,54.8,14,8.1,31.9,3.3,40-10.7Z"/>
|
||||
<g class="st4">
|
||||
<path class="st1" d="M234.6,67.3c-13.9-8-26.1,13.1-12.3,21.2,13.9,8,26.1-13.1,12.3-21.2Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<rect class="st0" x="196" y="65.9" width="11.5" height="98.2" rx="5.7" ry="5.7" transform="translate(1.1 231.9) rotate(-59.9)"/>
|
||||
<rect class="st0" x="178" y="86.8" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-17.2 221.7) rotate(-59.9)"/>
|
||||
<rect class="st0" x="169.5" y="101.4" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-34.1 221.6) rotate(-59.9)"/>
|
||||
<rect class="st0" x="162.3" y="114.1" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-48.6 221.7) rotate(-59.9)"/>
|
||||
<rect class="st0" x="147.3" y="139.8" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-78.3 221.5) rotate(-59.9)"/>
|
||||
<rect class="st0" x="139.7" y="153" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-93.6 221.5) rotate(-59.9)"/>
|
||||
<rect class="st0" x="127.3" y="174.3" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-118.2 221.4) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="225.4" cy="160" rx="8.7" ry="6.1" transform="translate(-26 274.8) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="213.2" cy="182.4" rx="8.7" ry="6.1" transform="translate(-51.5 275.4) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="200.5" cy="204.4" rx="8.7" ry="6.1" transform="translate(-76.9 275.4) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="187.9" cy="226" rx="8.7" ry="6.1" transform="translate(-101.8 275.2) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="174.9" cy="248.6" rx="8.7" ry="6.1" transform="translate(-127.9 275.2) rotate(-59.9)"/>
|
||||
<rect class="st0" x="114.6" y="196.3" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-143.5 221.4) rotate(-59.9)"/>
|
||||
<rect class="st0" x="105.2" y="212.6" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-162.3 221.4) rotate(-59.9)"/>
|
||||
<rect class="st0" x="96.9" y="226.7" width="11.5" height="77.9" rx="5.7" ry="5.7" transform="translate(-178.7 221.3) rotate(-59.9)"/>
|
||||
<rect class="st0" x="93.2" y="243.1" width="11.5" height="98.7" rx="5.7" ry="5.7" transform="translate(-203.8 231.4) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="163.7" cy="271.3" rx="8.7" ry="6.1" transform="translate(-153.1 276.9) rotate(-59.9)"/>
|
||||
<ellipse class="st0" cx="151.5" cy="294" rx="8.7" ry="6.1" transform="translate(-178.8 277.7) rotate(-59.9)"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
Loading…
x
Reference in New Issue
Block a user