Compare commits
37 Commits
v1.33.06(3
...
v1.34.01(3
| Author | SHA1 | Date | |
|---|---|---|---|
| 8237466adf | |||
| 3c1471ee8d | |||
| 099d5fa54d | |||
| 8b04f3e696 | |||
| 04ef20c69a | |||
| d08ec43d29 | |||
| 64e5200912 | |||
| 9e79653769 | |||
| 1fee2c901a | |||
| 3713bb5e49 | |||
| fdeb98b82a | |||
| 3e68dd2d36 | |||
| 1a964d7a97 | |||
| 10f7ecd79b | |||
| 43df6fc9f5 | |||
| 9a60b1ff86 | |||
| 386d51ffd7 | |||
| d3804a4601 | |||
| 04720c1d97 | |||
| 0826aa0445 | |||
| 7ceb51a54b | |||
| e8351ca75b | |||
| f8ceb1fb2d | |||
| 4ef49f3523 | |||
| 21ed15a2ea | |||
| aacec1dfde | |||
| ac7e0443a6 | |||
| 4bbb0d5cbb | |||
| 05c28d62d8 | |||
| bf2ac81ab8 | |||
| 17a78ef044 | |||
| 3c78c2787a | |||
| c7358b536e | |||
| 4f9fe14f7e | |||
| 0934765176 | |||
| b7d3cb18b9 | |||
| da3c9eae6e |
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 377
|
||||
def appVersionName = '1.33.06 '
|
||||
def appVersionCode = 385
|
||||
def appVersionName = '1.34.01'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative;
|
||||
|
||||
import android.app.Application;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.core.os.HandlerCompat;
|
||||
|
||||
@@ -72,7 +71,7 @@ public class MainApplicationModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
public Handler providesMainThreadHandler() {
|
||||
return HandlerCompat.createAsync(Looper.getMainLooper());
|
||||
return HandlerCompat.createAsync(mApplication.getApplicationContext().getMainLooper());
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.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.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
@@ -76,6 +77,8 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public abstract RawDao rawDao();
|
||||
|
||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||
|
||||
public abstract GrigliaDao grigliaDao();
|
||||
@@ -93,6 +96,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
public abstract InventarioRowDao inventarioRowDao();
|
||||
|
||||
|
||||
|
||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase database) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.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.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||
@@ -53,7 +54,11 @@ public class RoomModule {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
RawDao providesRawDao(AppDatabase appDatabase) {
|
||||
return appDatabase.rawDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
@@ -104,12 +109,6 @@ public class RoomModule {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioRowMapper providesInventarioRowMapper() {
|
||||
@@ -123,62 +122,50 @@ public class RoomModule {
|
||||
}
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
||||
return new InventarioLocalDataSource(executorService, inventarioDao);
|
||||
}
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
||||
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
||||
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
|
||||
@Provides
|
||||
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
||||
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
|
||||
@Provides
|
||||
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
||||
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
|
||||
@Provides
|
||||
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
||||
return new OrdineDataSource(executorService, handler, ordineDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
||||
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
||||
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
||||
InventarioLocalDataSource inventarioLocalDataSource,
|
||||
@@ -187,7 +174,6 @@ public class RoomModule {
|
||||
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler, executorService);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
||||
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.RawQuery;
|
||||
import androidx.sqlite.db.SupportSQLiteQuery;
|
||||
|
||||
@Dao
|
||||
public interface RawDao {
|
||||
|
||||
@RawQuery
|
||||
int vacuumDb(SupportSQLiteQuery supportSQLiteQuery);
|
||||
|
||||
}
|
||||
@@ -259,7 +259,7 @@ public class ArticoloOrdine {
|
||||
}
|
||||
|
||||
public float getCnfDaRic() {
|
||||
return qtaCnf > 0.f ? merceDaRic * qtaCnf : 0;
|
||||
return qtaCnf > 0.f ? merceDaRic / qtaCnf : 0;
|
||||
}
|
||||
|
||||
public int checkQtaProposta() {
|
||||
|
||||
@@ -62,16 +62,19 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
||||
try {
|
||||
var startRetrieve = new Date();
|
||||
var remoteData = remoteDataSource.makeSynchronousRetrieveRequest();
|
||||
Log.d("Timing [INVENTORIES RETRIEVE]", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
||||
Log.d("Time INVENTORY RETRIEVE", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
||||
|
||||
if (remoteData == null) remoteData = new ArrayList<>();
|
||||
|
||||
resolveFetch(remoteData, internalLiveData.getValue(),
|
||||
List<MtbInvent> finalRemoteData = remoteData;
|
||||
|
||||
resolveFetch(finalRemoteData, internalLiveData.getValue(),
|
||||
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
||||
(remoteItem, localItem) -> {
|
||||
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
||||
remoteItem.setNew(false);
|
||||
}, onComplete, onError);
|
||||
}, () -> handler.post(onComplete), ex -> handler.post(() -> onError.run(ex)));
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class _BaseRepository<
|
||||
.collect(Collectors.toList());
|
||||
|
||||
var dataToDelete = finalLocalData.stream()
|
||||
.filter(x -> finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
||||
.filter(x -> x.isSyncronized() && finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
var dataToInsert = finalRemoteData.stream()
|
||||
|
||||
@@ -49,7 +49,7 @@ public class BaseActivity extends AppCompatActivity {
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||
this.progressOpened = true;
|
||||
runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
||||
|
||||
@@ -70,7 +70,7 @@ public class BaseDialogFragment extends DialogFragment implements DialogInterfac
|
||||
}
|
||||
|
||||
private void openProgress() {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
|
||||
@@ -67,7 +67,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||
this.progressOpened = true;
|
||||
executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
|
||||
@@ -865,4 +865,262 @@ public class MtbAart extends EntityBase {
|
||||
public MtbUntMis getFirstUntMis() {
|
||||
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
MtbAart mtbAart = (MtbAart) o;
|
||||
|
||||
if (!getCodMart().equals(mtbAart.getCodMart())) return false;
|
||||
if (getDescrizione() != null ? !getDescrizione().equals(mtbAart.getDescrizione()) : mtbAart.getDescrizione() != null)
|
||||
return false;
|
||||
if (getUntMis() != null ? !getUntMis().equals(mtbAart.getUntMis()) : mtbAart.getUntMis() != null)
|
||||
return false;
|
||||
if (getBarCode() != null ? !getBarCode().equals(mtbAart.getBarCode()) : mtbAart.getBarCode() != null)
|
||||
return false;
|
||||
if (getPesoKg() != null ? !getPesoKg().equals(mtbAart.getPesoKg()) : mtbAart.getPesoKg() != null)
|
||||
return false;
|
||||
if (getQtaCnf() != null ? !getQtaCnf().equals(mtbAart.getQtaCnf()) : mtbAart.getQtaCnf() != null)
|
||||
return false;
|
||||
if (getCodAliq() != null ? !getCodAliq().equals(mtbAart.getCodAliq()) : mtbAart.getCodAliq() != null)
|
||||
return false;
|
||||
if (getCodScoArt() != null ? !getCodScoArt().equals(mtbAart.getCodScoArt()) : mtbAart.getCodScoArt() != null)
|
||||
return false;
|
||||
if (getCodTcolUi() != null ? !getCodTcolUi().equals(mtbAart.getCodTcolUi()) : mtbAart.getCodTcolUi() != null)
|
||||
return false;
|
||||
if (getCodTcolUl() != null ? !getCodTcolUl().equals(mtbAart.getCodTcolUl()) : mtbAart.getCodTcolUl() != null)
|
||||
return false;
|
||||
if (getArticoloComposto() != null ? !getArticoloComposto().equals(mtbAart.getArticoloComposto()) : mtbAart.getArticoloComposto() != null)
|
||||
return false;
|
||||
if (getEsposizioneComp() != null ? !getEsposizioneComp().equals(mtbAart.getEsposizioneComp()) : mtbAart.getEsposizioneComp() != null)
|
||||
return false;
|
||||
if (getDescrizioneEstesa() != null ? !getDescrizioneEstesa().equals(mtbAart.getDescrizioneEstesa()) : mtbAart.getDescrizioneEstesa() != null)
|
||||
return false;
|
||||
if (getCodUltForn() != null ? !getCodUltForn().equals(mtbAart.getCodUltForn()) : mtbAart.getCodUltForn() != null)
|
||||
return false;
|
||||
if (getDataUltCar() != null ? !getDataUltCar().equals(mtbAart.getDataUltCar()) : mtbAart.getDataUltCar() != null)
|
||||
return false;
|
||||
if (getValUltCar() != null ? !getValUltCar().equals(mtbAart.getValUltCar()) : mtbAart.getValUltCar() != null)
|
||||
return false;
|
||||
if (getCodUltClie() != null ? !getCodUltClie().equals(mtbAart.getCodUltClie()) : mtbAart.getCodUltClie() != null)
|
||||
return false;
|
||||
if (getDataUltScar() != null ? !getDataUltScar().equals(mtbAart.getDataUltScar()) : mtbAart.getDataUltScar() != null)
|
||||
return false;
|
||||
if (getValUltScar() != null ? !getValUltScar().equals(mtbAart.getValUltScar()) : mtbAart.getValUltScar() != null)
|
||||
return false;
|
||||
if (getTipoCodice() != null ? !getTipoCodice().equals(mtbAart.getTipoCodice()) : mtbAart.getTipoCodice() != null)
|
||||
return false;
|
||||
if (getNote() != null ? !getNote().equals(mtbAart.getNote()) : mtbAart.getNote() != null)
|
||||
return false;
|
||||
if (getPosizione() != null ? !getPosizione().equals(mtbAart.getPosizione()) : mtbAart.getPosizione() != null)
|
||||
return false;
|
||||
if (getColliPedana() != null ? !getColliPedana().equals(mtbAart.getColliPedana()) : mtbAart.getColliPedana() != null)
|
||||
return false;
|
||||
if (getUntMis2() != null ? !getUntMis2().equals(mtbAart.getUntMis2()) : mtbAart.getUntMis2() != null)
|
||||
return false;
|
||||
if (getRapConv2() != null ? !getRapConv2().equals(mtbAart.getRapConv2()) : mtbAart.getRapConv2() != null)
|
||||
return false;
|
||||
if (getFlagInclListino() != null ? !getFlagInclListino().equals(mtbAart.getFlagInclListino()) : mtbAart.getFlagInclListino() != null)
|
||||
return false;
|
||||
if (getUntMis3() != null ? !getUntMis3().equals(mtbAart.getUntMis3()) : mtbAart.getUntMis3() != null)
|
||||
return false;
|
||||
if (getRapConv3() != null ? !getRapConv3().equals(mtbAart.getRapConv3()) : mtbAart.getRapConv3() != null)
|
||||
return false;
|
||||
if (getCodMartStat() != null ? !getCodMartStat().equals(mtbAart.getCodMartStat()) : mtbAart.getCodMartStat() != null)
|
||||
return false;
|
||||
if (getCodMcon() != null ? !getCodMcon().equals(mtbAart.getCodMcon()) : mtbAart.getCodMcon() != null)
|
||||
return false;
|
||||
if (getCodMgrp() != null ? !getCodMgrp().equals(mtbAart.getCodMgrp()) : mtbAart.getCodMgrp() != null)
|
||||
return false;
|
||||
if (getCodMsfa() != null ? !getCodMsfa().equals(mtbAart.getCodMsfa()) : mtbAart.getCodMsfa() != null)
|
||||
return false;
|
||||
if (getCodMsgr() != null ? !getCodMsgr().equals(mtbAart.getCodMsgr()) : mtbAart.getCodMsgr() != null)
|
||||
return false;
|
||||
if (getCodMstp() != null ? !getCodMstp().equals(mtbAart.getCodMstp()) : mtbAart.getCodMstp() != null)
|
||||
return false;
|
||||
if (getCodMtip() != null ? !getCodMtip().equals(mtbAart.getCodMtip()) : mtbAart.getCodMtip() != null)
|
||||
return false;
|
||||
if (getDescrizioneStat() != null ? !getDescrizioneStat().equals(mtbAart.getDescrizioneStat()) : mtbAart.getDescrizioneStat() != null)
|
||||
return false;
|
||||
if (getFlagStato() != null ? !getFlagStato().equals(mtbAart.getFlagStato()) : mtbAart.getFlagStato() != null)
|
||||
return false;
|
||||
if (getCambioDiviCar() != null ? !getCambioDiviCar().equals(mtbAart.getCambioDiviCar()) : mtbAart.getCambioDiviCar() != null)
|
||||
return false;
|
||||
if (getCambioDiviScar() != null ? !getCambioDiviScar().equals(mtbAart.getCambioDiviScar()) : mtbAart.getCambioDiviScar() != null)
|
||||
return false;
|
||||
if (getGgScadPartita() != null ? !getGgScadPartita().equals(mtbAart.getGgScadPartita()) : mtbAart.getGgScadPartita() != null)
|
||||
return false;
|
||||
if (getVolumeMc() != null ? !getVolumeMc().equals(mtbAart.getVolumeMc()) : mtbAart.getVolumeMc() != null)
|
||||
return false;
|
||||
if (getFlagEsponiPrz() != null ? !getFlagEsponiPrz().equals(mtbAart.getFlagEsponiPrz()) : mtbAart.getFlagEsponiPrz() != null)
|
||||
return false;
|
||||
if (getDataUltVar() != null ? !getDataUltVar().equals(mtbAart.getDataUltVar()) : mtbAart.getDataUltVar() != null)
|
||||
return false;
|
||||
if (getPercSfrido() != null ? !getPercSfrido().equals(mtbAart.getPercSfrido()) : mtbAart.getPercSfrido() != null)
|
||||
return false;
|
||||
if (getCodBarreImb() != null ? !getCodBarreImb().equals(mtbAart.getCodBarreImb()) : mtbAart.getCodBarreImb() != null)
|
||||
return false;
|
||||
if (getFlagCalcPrz() != null ? !getFlagCalcPrz().equals(mtbAart.getFlagCalcPrz()) : mtbAart.getFlagCalcPrz() != null)
|
||||
return false;
|
||||
if (getEsposizioneCompAcq() != null ? !getEsposizioneCompAcq().equals(mtbAart.getEsposizioneCompAcq()) : mtbAart.getEsposizioneCompAcq() != null)
|
||||
return false;
|
||||
if (getFlagCalcPrzAcq() != null ? !getFlagCalcPrzAcq().equals(mtbAart.getFlagCalcPrzAcq()) : mtbAart.getFlagCalcPrzAcq() != null)
|
||||
return false;
|
||||
if (getDiacod() != null ? !getDiacod().equals(mtbAart.getDiacod()) : mtbAart.getDiacod() != null)
|
||||
return false;
|
||||
if (getPlu() != null ? !getPlu().equals(mtbAart.getPlu()) : mtbAart.getPlu() != null)
|
||||
return false;
|
||||
if (getPartIvaProd() != null ? !getPartIvaProd().equals(mtbAart.getPartIvaProd()) : mtbAart.getPartIvaProd() != null)
|
||||
return false;
|
||||
if (getRagSocProd() != null ? !getRagSocProd().equals(mtbAart.getRagSocProd()) : mtbAart.getRagSocProd() != null)
|
||||
return false;
|
||||
if (getFlagRapConvVariabile() != null ? !getFlagRapConvVariabile().equals(mtbAart.getFlagRapConvVariabile()) : mtbAart.getFlagRapConvVariabile() != null)
|
||||
return false;
|
||||
if (getFlagMovArtMag() != null ? !getFlagMovArtMag().equals(mtbAart.getFlagMovArtMag()) : mtbAart.getFlagMovArtMag() != null)
|
||||
return false;
|
||||
if (getFlagTracciabilita() != null ? !getFlagTracciabilita().equals(mtbAart.getFlagTracciabilita()) : mtbAart.getFlagTracciabilita() != null)
|
||||
return false;
|
||||
if (getTaraKg() != null ? !getTaraKg().equals(mtbAart.getTaraKg()) : mtbAart.getTaraKg() != null)
|
||||
return false;
|
||||
if (getColliStrato() != null ? !getColliStrato().equals(mtbAart.getColliStrato()) : mtbAart.getColliStrato() != null)
|
||||
return false;
|
||||
if (getFlagQtaCnfFissa() != null ? !getFlagQtaCnfFissa().equals(mtbAart.getFlagQtaCnfFissa()) : mtbAart.getFlagQtaCnfFissa() != null)
|
||||
return false;
|
||||
if (getFlagColliPedanaFisso() != null ? !getFlagColliPedanaFisso().equals(mtbAart.getFlagColliPedanaFisso()) : mtbAart.getFlagColliPedanaFisso() != null)
|
||||
return false;
|
||||
if (getCodCconCosti() != null ? !getCodCconCosti().equals(mtbAart.getCodCconCosti()) : mtbAart.getCodCconCosti() != null)
|
||||
return false;
|
||||
if (getCodCconRicavi() != null ? !getCodCconRicavi().equals(mtbAart.getCodCconRicavi()) : mtbAart.getCodCconRicavi() != null)
|
||||
return false;
|
||||
if (getCodDgrpArt() != null ? !getCodDgrpArt().equals(mtbAart.getCodDgrpArt()) : mtbAart.getCodDgrpArt() != null)
|
||||
return false;
|
||||
if (getCodDiviCar() != null ? !getCodDiviCar().equals(mtbAart.getCodDiviCar()) : mtbAart.getCodDiviCar() != null)
|
||||
return false;
|
||||
if (getCodDiviScar() != null ? !getCodDiviScar().equals(mtbAart.getCodDiviScar()) : mtbAart.getCodDiviScar() != null)
|
||||
return false;
|
||||
if (getCodEcrCat() != null ? !getCodEcrCat().equals(mtbAart.getCodEcrCat()) : mtbAart.getCodEcrCat() != null)
|
||||
return false;
|
||||
if (getCodEcrMcat() != null ? !getCodEcrMcat().equals(mtbAart.getCodEcrMcat()) : mtbAart.getCodEcrMcat() != null)
|
||||
return false;
|
||||
if (getCodEcrRep() != null ? !getCodEcrRep().equals(mtbAart.getCodEcrRep()) : mtbAart.getCodEcrRep() != null)
|
||||
return false;
|
||||
if (getCodEcrStipo() != null ? !getCodEcrStipo().equals(mtbAart.getCodEcrStipo()) : mtbAart.getCodEcrStipo() != null)
|
||||
return false;
|
||||
if (getCodEcrTipo() != null ? !getCodEcrTipo().equals(mtbAart.getCodEcrTipo()) : mtbAart.getCodEcrTipo() != null)
|
||||
return false;
|
||||
if (getCodGrpBolla() != null ? !getCodGrpBolla().equals(mtbAart.getCodGrpBolla()) : mtbAart.getCodGrpBolla() != null)
|
||||
return false;
|
||||
if (getIngredienti() != null ? !getIngredienti().equals(mtbAart.getIngredienti()) : mtbAart.getIngredienti() != null)
|
||||
return false;
|
||||
if (getIdArtEqui() != null ? !getIdArtEqui().equals(mtbAart.getIdArtEqui()) : mtbAart.getIdArtEqui() != null)
|
||||
return false;
|
||||
if (getDescrCassa() != null ? !getDescrCassa().equals(mtbAart.getDescrCassa()) : mtbAart.getDescrCassa() != null)
|
||||
return false;
|
||||
if (getCodNcIntracee() != null ? !getCodNcIntracee().equals(mtbAart.getCodNcIntracee()) : mtbAart.getCodNcIntracee() != null)
|
||||
return false;
|
||||
if (getMarchio() != null ? !getMarchio().equals(mtbAart.getMarchio()) : mtbAart.getMarchio() != null)
|
||||
return false;
|
||||
if (getSezione() != null ? !getSezione().equals(mtbAart.getSezione()) : mtbAart.getSezione() != null)
|
||||
return false;
|
||||
if (getUntMisRifPeso() != mtbAart.getUntMisRifPeso()) return false;
|
||||
if (getQtaEsistente() != null ? !getQtaEsistente().equals(mtbAart.getQtaEsistente()) : mtbAart.getQtaEsistente() != null)
|
||||
return false;
|
||||
if (getQtaImpegnata() != null ? !getQtaImpegnata().equals(mtbAart.getQtaImpegnata()) : mtbAart.getQtaImpegnata() != null)
|
||||
return false;
|
||||
if (getNumCnfEsistente() != null ? !getNumCnfEsistente().equals(mtbAart.getNumCnfEsistente()) : mtbAart.getNumCnfEsistente() != null)
|
||||
return false;
|
||||
if (getNumCnfImpegnata() != null ? !getNumCnfImpegnata().equals(mtbAart.getNumCnfImpegnata()) : mtbAart.getNumCnfImpegnata() != null)
|
||||
return false;
|
||||
return getMtbUntMis() != null ? getMtbUntMis().equals(mtbAart.getMtbUntMis()) : mtbAart.getMtbUntMis() == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = getCodMart().hashCode();
|
||||
result = 31 * result + (getDescrizione() != null ? getDescrizione().hashCode() : 0);
|
||||
result = 31 * result + (getUntMis() != null ? getUntMis().hashCode() : 0);
|
||||
result = 31 * result + (getBarCode() != null ? getBarCode().hashCode() : 0);
|
||||
result = 31 * result + (getPesoKg() != null ? getPesoKg().hashCode() : 0);
|
||||
result = 31 * result + (getQtaCnf() != null ? getQtaCnf().hashCode() : 0);
|
||||
result = 31 * result + (getCodAliq() != null ? getCodAliq().hashCode() : 0);
|
||||
result = 31 * result + (getCodScoArt() != null ? getCodScoArt().hashCode() : 0);
|
||||
result = 31 * result + (getCodTcolUi() != null ? getCodTcolUi().hashCode() : 0);
|
||||
result = 31 * result + (getCodTcolUl() != null ? getCodTcolUl().hashCode() : 0);
|
||||
result = 31 * result + (getArticoloComposto() != null ? getArticoloComposto().hashCode() : 0);
|
||||
result = 31 * result + (getEsposizioneComp() != null ? getEsposizioneComp().hashCode() : 0);
|
||||
result = 31 * result + (getDescrizioneEstesa() != null ? getDescrizioneEstesa().hashCode() : 0);
|
||||
result = 31 * result + (getCodUltForn() != null ? getCodUltForn().hashCode() : 0);
|
||||
result = 31 * result + (getDataUltCar() != null ? getDataUltCar().hashCode() : 0);
|
||||
result = 31 * result + (getValUltCar() != null ? getValUltCar().hashCode() : 0);
|
||||
result = 31 * result + (getCodUltClie() != null ? getCodUltClie().hashCode() : 0);
|
||||
result = 31 * result + (getDataUltScar() != null ? getDataUltScar().hashCode() : 0);
|
||||
result = 31 * result + (getValUltScar() != null ? getValUltScar().hashCode() : 0);
|
||||
result = 31 * result + (getTipoCodice() != null ? getTipoCodice().hashCode() : 0);
|
||||
result = 31 * result + (getNote() != null ? getNote().hashCode() : 0);
|
||||
result = 31 * result + (getPosizione() != null ? getPosizione().hashCode() : 0);
|
||||
result = 31 * result + (getColliPedana() != null ? getColliPedana().hashCode() : 0);
|
||||
result = 31 * result + (getUntMis2() != null ? getUntMis2().hashCode() : 0);
|
||||
result = 31 * result + (getRapConv2() != null ? getRapConv2().hashCode() : 0);
|
||||
result = 31 * result + (getFlagInclListino() != null ? getFlagInclListino().hashCode() : 0);
|
||||
result = 31 * result + (getUntMis3() != null ? getUntMis3().hashCode() : 0);
|
||||
result = 31 * result + (getRapConv3() != null ? getRapConv3().hashCode() : 0);
|
||||
result = 31 * result + (getCodMartStat() != null ? getCodMartStat().hashCode() : 0);
|
||||
result = 31 * result + (getCodMcon() != null ? getCodMcon().hashCode() : 0);
|
||||
result = 31 * result + (getCodMgrp() != null ? getCodMgrp().hashCode() : 0);
|
||||
result = 31 * result + (getCodMsfa() != null ? getCodMsfa().hashCode() : 0);
|
||||
result = 31 * result + (getCodMsgr() != null ? getCodMsgr().hashCode() : 0);
|
||||
result = 31 * result + (getCodMstp() != null ? getCodMstp().hashCode() : 0);
|
||||
result = 31 * result + (getCodMtip() != null ? getCodMtip().hashCode() : 0);
|
||||
result = 31 * result + (getDescrizioneStat() != null ? getDescrizioneStat().hashCode() : 0);
|
||||
result = 31 * result + (getFlagStato() != null ? getFlagStato().hashCode() : 0);
|
||||
result = 31 * result + (getCambioDiviCar() != null ? getCambioDiviCar().hashCode() : 0);
|
||||
result = 31 * result + (getCambioDiviScar() != null ? getCambioDiviScar().hashCode() : 0);
|
||||
result = 31 * result + (getGgScadPartita() != null ? getGgScadPartita().hashCode() : 0);
|
||||
result = 31 * result + (getVolumeMc() != null ? getVolumeMc().hashCode() : 0);
|
||||
result = 31 * result + (getFlagEsponiPrz() != null ? getFlagEsponiPrz().hashCode() : 0);
|
||||
result = 31 * result + (getDataUltVar() != null ? getDataUltVar().hashCode() : 0);
|
||||
result = 31 * result + (getPercSfrido() != null ? getPercSfrido().hashCode() : 0);
|
||||
result = 31 * result + (getCodBarreImb() != null ? getCodBarreImb().hashCode() : 0);
|
||||
result = 31 * result + (getFlagCalcPrz() != null ? getFlagCalcPrz().hashCode() : 0);
|
||||
result = 31 * result + (getEsposizioneCompAcq() != null ? getEsposizioneCompAcq().hashCode() : 0);
|
||||
result = 31 * result + (getFlagCalcPrzAcq() != null ? getFlagCalcPrzAcq().hashCode() : 0);
|
||||
result = 31 * result + (getDiacod() != null ? getDiacod().hashCode() : 0);
|
||||
result = 31 * result + (getPlu() != null ? getPlu().hashCode() : 0);
|
||||
result = 31 * result + (getPartIvaProd() != null ? getPartIvaProd().hashCode() : 0);
|
||||
result = 31 * result + (getRagSocProd() != null ? getRagSocProd().hashCode() : 0);
|
||||
result = 31 * result + (getFlagRapConvVariabile() != null ? getFlagRapConvVariabile().hashCode() : 0);
|
||||
result = 31 * result + (getFlagMovArtMag() != null ? getFlagMovArtMag().hashCode() : 0);
|
||||
result = 31 * result + (getFlagTracciabilita() != null ? getFlagTracciabilita().hashCode() : 0);
|
||||
result = 31 * result + (getTaraKg() != null ? getTaraKg().hashCode() : 0);
|
||||
result = 31 * result + (getColliStrato() != null ? getColliStrato().hashCode() : 0);
|
||||
result = 31 * result + (getFlagQtaCnfFissa() != null ? getFlagQtaCnfFissa().hashCode() : 0);
|
||||
result = 31 * result + (getFlagColliPedanaFisso() != null ? getFlagColliPedanaFisso().hashCode() : 0);
|
||||
result = 31 * result + (getCodCconCosti() != null ? getCodCconCosti().hashCode() : 0);
|
||||
result = 31 * result + (getCodCconRicavi() != null ? getCodCconRicavi().hashCode() : 0);
|
||||
result = 31 * result + (getCodDgrpArt() != null ? getCodDgrpArt().hashCode() : 0);
|
||||
result = 31 * result + (getCodDiviCar() != null ? getCodDiviCar().hashCode() : 0);
|
||||
result = 31 * result + (getCodDiviScar() != null ? getCodDiviScar().hashCode() : 0);
|
||||
result = 31 * result + (getCodEcrCat() != null ? getCodEcrCat().hashCode() : 0);
|
||||
result = 31 * result + (getCodEcrMcat() != null ? getCodEcrMcat().hashCode() : 0);
|
||||
result = 31 * result + (getCodEcrRep() != null ? getCodEcrRep().hashCode() : 0);
|
||||
result = 31 * result + (getCodEcrStipo() != null ? getCodEcrStipo().hashCode() : 0);
|
||||
result = 31 * result + (getCodEcrTipo() != null ? getCodEcrTipo().hashCode() : 0);
|
||||
result = 31 * result + (getCodGrpBolla() != null ? getCodGrpBolla().hashCode() : 0);
|
||||
result = 31 * result + (getIngredienti() != null ? getIngredienti().hashCode() : 0);
|
||||
result = 31 * result + (getIdArtEqui() != null ? getIdArtEqui().hashCode() : 0);
|
||||
result = 31 * result + (getDescrCassa() != null ? getDescrCassa().hashCode() : 0);
|
||||
result = 31 * result + (getCodNcIntracee() != null ? getCodNcIntracee().hashCode() : 0);
|
||||
result = 31 * result + (getMarchio() != null ? getMarchio().hashCode() : 0);
|
||||
result = 31 * result + (getSezione() != null ? getSezione().hashCode() : 0);
|
||||
result = 31 * result + (getUntMisRifPeso() != null ? getUntMisRifPeso().hashCode() : 0);
|
||||
result = 31 * result + (getQtaEsistente() != null ? getQtaEsistente().hashCode() : 0);
|
||||
result = 31 * result + (getQtaImpegnata() != null ? getQtaImpegnata().hashCode() : 0);
|
||||
result = 31 * result + (getNumCnfEsistente() != null ? getNumCnfEsistente().hashCode() : 0);
|
||||
result = 31 * result + (getNumCnfImpegnata() != null ? getNumCnfImpegnata().hashCode() : 0);
|
||||
result = 31 * result + (getMtbUntMis() != null ? getMtbUntMis().hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ public class UtilityExceptions {
|
||||
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
||||
|
||||
if (ex.getMessage() != null) {
|
||||
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString());
|
||||
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString(), ex.getStackTrace());
|
||||
} else {
|
||||
Logger.e(ex, "Errore");
|
||||
Logger.e(ex, "Errore", ex.getStackTrace());
|
||||
}
|
||||
|
||||
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
||||
|
||||
@@ -383,7 +383,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
}
|
||||
|
||||
|
||||
new DialogAvailableItemsView(listaMtbAart)
|
||||
new DialogAvailableItemsView(listaMtbAart, null)
|
||||
.show(getSupportFragmentManager(), "DialogAvailableInventarioItemsView");
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.available_items.DialogAvailableItemListModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.available_items.DialogAvailableItemsView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
@@ -135,6 +136,9 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
if (menuItem.getItemId() == R.id.export) {
|
||||
requestExportConfirm();
|
||||
return true;
|
||||
} else if (menuItem.getItemId() == R.id.search_art) {
|
||||
manualSearch();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -179,8 +183,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
});
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
};
|
||||
|
||||
|
||||
@@ -205,6 +208,18 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
public void manualSearch() {
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(this,
|
||||
"Ricerca articolo",
|
||||
null,
|
||||
"Cod articolo / Barcode",
|
||||
barcodeProd ->
|
||||
this.mViewModel.loadArticoloByCodMartOrBarcode(barcodeProd, BarcodeManager::enable),
|
||||
BarcodeManager::enable)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
@@ -260,7 +275,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
.setNew(true));
|
||||
|
||||
DialogSelectDocRowsView.newInstance(dialogSelectDocRowsItemListModels, data -> {
|
||||
if(data.isNew())
|
||||
if (data.isNew())
|
||||
this.mViewModel.dispatchRowInsert(null, matchedArt, null);
|
||||
else
|
||||
this.mViewModel.dispatchRowEdit(matchedArt.toMtbAart(), (InventarioRowRoomDTO) data.getOriginalModel());
|
||||
@@ -284,7 +299,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
}
|
||||
|
||||
|
||||
new DialogAvailableItemsView(listaMtbAart)
|
||||
new DialogAvailableItemsView(listaMtbAart, mtbAartClicked -> this.mViewModel.loadArticoloByMtbAart(mtbAartClicked, null))
|
||||
.show(getSupportFragmentManager(), "DialogAvailableInventarioItemsView");
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,16 @@ import dagger.Module;
|
||||
import dagger.Provides;
|
||||
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.rest.consumers.BarcodeRESTConsumer;
|
||||
|
||||
@Module(subcomponents = PickingInventarioComponent.class)
|
||||
public class PickingInventarioModule {
|
||||
|
||||
@Provides
|
||||
PickingInventarioViewModel providesPickingInventarioViewModel(InventarioRepository inventarioRepository, InventarioRowRepository inventarioRowRepository) {
|
||||
return new PickingInventarioViewModel(inventarioRepository, inventarioRowRepository);
|
||||
PickingInventarioViewModel providesPickingInventarioViewModel(InventarioRepository inventarioRepository,
|
||||
InventarioRowRepository inventarioRowRepository,
|
||||
BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
return new PickingInventarioViewModel(inventarioRepository, inventarioRowRepository, barcodeRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,10 +17,12 @@ import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDT
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.respository_new.InventarioRowRepository;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromCodMartException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.rest.model.inventario.InventarioArtDTO;
|
||||
@@ -28,6 +30,7 @@ import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
@@ -35,23 +38,22 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
public class PickingInventarioViewModel extends ViewModel {
|
||||
|
||||
|
||||
private final BarcodeRESTConsumer barcodeRESTConsumer;
|
||||
private final InventarioRepository inventarioRepository;
|
||||
private final InventarioRowRepository inventarioRowRepository;
|
||||
|
||||
private boolean canAddUnknownItems;
|
||||
private boolean flagShouldAskToCreateOrUpdateRowInventario;
|
||||
|
||||
public MutableLiveData<InventarioRoomDTO> currentInventario = new MutableLiveData<>();
|
||||
public LiveData<List<InventarioRowRoomDTO>> currentInventarioRows = new MutableLiveData<>();
|
||||
|
||||
private boolean canAddUnknownItems;
|
||||
private boolean flagShouldAskToCreateOrUpdateRowInventario;
|
||||
private List<InventarioArtDTO> availableInventarioArts;
|
||||
private Listener mListener;
|
||||
|
||||
public PickingInventarioViewModel(
|
||||
InventarioRepository inventarioRepository,
|
||||
InventarioRowRepository inventarioRowRepository) {
|
||||
public PickingInventarioViewModel(InventarioRepository inventarioRepository,
|
||||
InventarioRowRepository inventarioRowRepository,
|
||||
BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
this.inventarioRepository = inventarioRepository;
|
||||
this.inventarioRowRepository = inventarioRowRepository;
|
||||
this.barcodeRESTConsumer = barcodeRESTConsumer;
|
||||
}
|
||||
|
||||
public void init(InventarioRoomDTO inventarioRoomDTO, List<InventarioArtDTO> inventarioArts, boolean canAddUnknownItems, boolean flagShouldAskToCreateOrUpdateRowInventario) {
|
||||
@@ -84,61 +86,39 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean peso
|
||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||
|
||||
} else {
|
||||
this.loadArticolo(barcodeScanDTO.getStringValue(), null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateRow(InventarioRowRoomDTO itemToUpdate) {
|
||||
var barcodeList = new ArrayList<String>();
|
||||
barcodeList.add(itemToUpdate.getScanCodBarre());
|
||||
|
||||
var matchedArt = availableInventarioArts.stream()
|
||||
.filter(x -> itemToUpdate.getCodMart() != null && x.getCodMart().contains(itemToUpdate.getCodMart()))
|
||||
public void loadArticoloByCodMartOrBarcode(String codMart, Runnable onComplete) {
|
||||
var matchedArt = Stream.of(this.availableInventarioArts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(codMart) ||
|
||||
x.getBarcode().contains(codMart))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
MtbAart articolo;
|
||||
|
||||
if (canAddUnknownItems && matchedArt == null) {
|
||||
matchedArt = new InventarioArtDTO()
|
||||
.setBarcode(barcodeList)
|
||||
.setFlagQtaCnfFissa(true)
|
||||
.setPlu(false)
|
||||
.setUntMis(itemToUpdate.getUntMis())
|
||||
.setQtaCnf(itemToUpdate.getQtaConf());
|
||||
}
|
||||
if (matchedArt != null) {
|
||||
articolo = matchedArt.toMtbAart()
|
||||
.setFlagTracciabilita("N");
|
||||
dispatchRowEdit(articolo, itemToUpdate);
|
||||
} else
|
||||
this.sendError(new NoResultFromBarcodeException(itemToUpdate.getScanCodBarre()));
|
||||
}
|
||||
|
||||
public void deleteRow(InventarioRowRoomDTO itemToDelete) {
|
||||
this.inventarioRowRepository.delete(itemToDelete, () -> {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
public void exportAll(Runnable onComplete) {
|
||||
if (this.currentInventarioRows.getValue().isEmpty()) {
|
||||
this.sendError(new Exception("Impossibile esportare un inventario senza righe"));
|
||||
if (matchedArt == null) {
|
||||
this.sendError(new NoResultFromCodMartException(codMart));
|
||||
return;
|
||||
}
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
currentInventario.getValue().setInventarioRowList(this.currentInventarioRows.getValue());
|
||||
|
||||
this.inventarioRepository.export(currentInventario.getValue(), () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
loadArticolo(matchedArt.getBarcode().get(0), null, onComplete);
|
||||
}
|
||||
|
||||
public void loadArticoloByMtbAart(MtbAart mtbAart, Runnable onComplete) {
|
||||
loadArticolo(mtbAart.getBarCode(), null, onComplete);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,12 +131,38 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
barcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||
|
||||
String barcodeProd = null;
|
||||
String codMart = null;
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||
barcodeProd = ean128Model.Content;
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Internal1))
|
||||
codMart = ean128Model.Internal1;
|
||||
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
this.loadArticolo(barcodeProd, ean128Model, onComplete);
|
||||
|
||||
} else if (!UtilityString.isNullOrEmpty(codMart)) {
|
||||
this.loadArticoloByCodMartOrBarcode(codMart, onComplete);
|
||||
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
onComplete.run();
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Runnable onComplete) {
|
||||
var barcodeList = new ArrayList<String>();
|
||||
barcodeList.add(barcodeProd);
|
||||
|
||||
var matchedArt = availableInventarioArts.stream()
|
||||
.filter(x -> x.getBarcode().contains(barcodeProd))
|
||||
var matchedArt = availableInventarioArts.stream().filter(x -> x.getBarcode().contains(barcodeProd))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
@@ -168,7 +174,6 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
.setPlu(false)
|
||||
.setUntMis("PZ")
|
||||
.setQtaCnf(BigDecimal.ONE);
|
||||
|
||||
}
|
||||
|
||||
if (matchedArt != null) {
|
||||
@@ -181,19 +186,16 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
this.sendOnItemAlreadyFound(matchedArt, alreadyScannedItems);
|
||||
|
||||
}
|
||||
onComplete.run();
|
||||
} else
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
if(onComplete != null) onComplete.run();
|
||||
} else this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
private List<InventarioRowRoomDTO> searchArtInAlreadyScannedItems(InventarioArtDTO inventarioArtDTO) {
|
||||
final List<InventarioRowRoomDTO> inventarioRows = this.currentInventarioRows.getValue();
|
||||
|
||||
if (inventarioRows == null) return null;
|
||||
if (inventarioRows == null || inventarioRows.isEmpty()) return null;
|
||||
|
||||
return Stream.of(inventarioRows)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(inventarioArtDTO.getCodMart()))
|
||||
.toList();
|
||||
return Stream.of(inventarioRows).filter(x -> x.getCodMart() != null ? x.getCodMart().equalsIgnoreCase(inventarioArtDTO.getCodMart()) : inventarioArtDTO.getBarcode().contains(x.getScanCodBarre())).toList();
|
||||
}
|
||||
|
||||
|
||||
@@ -201,9 +203,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
var mtbAart = inventarioArtDTO.toMtbAart();
|
||||
mtbAart.setFlagTracciabilita("N");
|
||||
|
||||
PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setTempPickData(PickDataDTO.fromEan128(ean128Model));
|
||||
PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbAart).setTempPickData(PickDataDTO.fromEan128(ean128Model));
|
||||
|
||||
BigDecimal numCnfDaPrelevare = null;
|
||||
BigDecimal qtaColDaPrelevare = null;
|
||||
@@ -277,65 +277,26 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
if (inventarioArtDTO.isPlu()) {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
null,
|
||||
barcode);
|
||||
this.saveNewRow(pickingObjectDTO, initialNumCnf, initialQtaCnf, initialQtaTot, null, barcode);
|
||||
} else {
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
null, //initialNumCnf,
|
||||
initialQtaCnf,
|
||||
null, //initialQtaTot,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag(),
|
||||
barcode);
|
||||
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), null, //initialNumCnf,
|
||||
initialQtaCnf, null, //initialQtaTot,
|
||||
null, null, null, null, null, null, false, true, false, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), barcode);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void dispatchRowEdit(MtbAart mtbAart, InventarioRowRoomDTO inventarioRowRoomDTO) {
|
||||
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(mtbAart);
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbAart);
|
||||
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
inventarioRowRoomDTO.getNumConf(),
|
||||
inventarioRowRoomDTO.getQtaConf(),
|
||||
inventarioRowRoomDTO.getQta(),
|
||||
null, null, null,
|
||||
null, null, null,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), inventarioRowRoomDTO.getNumConf(), inventarioRowRoomDTO.getQtaConf(), inventarioRowRoomDTO.getQta(), null, null, null, null, null, null, false, false, false, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
|
||||
this.saveEditedRow(inventarioRowRoomDTO,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag());
|
||||
});
|
||||
this.saveEditedRow(inventarioRowRoomDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -369,6 +330,47 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void updateRow(InventarioRowRoomDTO itemToUpdate) {
|
||||
var barcodeList = new ArrayList<String>();
|
||||
barcodeList.add(itemToUpdate.getScanCodBarre());
|
||||
|
||||
var matchedArt = availableInventarioArts.stream()
|
||||
.filter(x -> itemToUpdate.getCodMart() != null && x.getCodMart().contains(itemToUpdate.getCodMart()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
MtbAart articolo;
|
||||
|
||||
if (canAddUnknownItems && matchedArt == null) {
|
||||
matchedArt = new InventarioArtDTO().setBarcode(barcodeList).setFlagQtaCnfFissa(true).setPlu(false).setUntMis(itemToUpdate.getUntMis()).setQtaCnf(itemToUpdate.getQtaConf());
|
||||
}
|
||||
if (matchedArt != null) {
|
||||
articolo = matchedArt.toMtbAart().setFlagTracciabilita("N");
|
||||
dispatchRowEdit(articolo, itemToUpdate);
|
||||
} else this.sendError(new NoResultFromBarcodeException(itemToUpdate.getScanCodBarre()));
|
||||
}
|
||||
|
||||
public void deleteRow(InventarioRowRoomDTO itemToDelete) {
|
||||
this.inventarioRowRepository.delete(itemToDelete, () -> {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
public void exportAll(Runnable onComplete) {
|
||||
if (this.currentInventarioRows.getValue().isEmpty()) {
|
||||
this.sendError(new Exception("Impossibile esportare un inventario senza righe"));
|
||||
return;
|
||||
}
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
currentInventario.getValue().setInventarioRowList(this.currentInventarioRows.getValue());
|
||||
|
||||
this.inventarioRepository.export(currentInventario.getValue(), () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
if (this.mListener != null) mListener.onLoadingStarted();
|
||||
@@ -382,40 +384,13 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaAvailable,
|
||||
BigDecimal totalNumCnfAvailable,
|
||||
BigDecimal qtaCnfAvailable,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
boolean canLUBeClosed,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null) mListener.onItemDispatched(pickingObjectDTO,
|
||||
mtbAart,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
totalQtaAvailable,
|
||||
totalNumCnfAvailable,
|
||||
qtaCnfAvailable,
|
||||
totalQtaToBeTaken,
|
||||
totalNumCnfToBeTaken,
|
||||
qtaCnfToBeTaken,
|
||||
canOverflowOrderQuantity,
|
||||
canPartitaMagBeChanged,
|
||||
canLUBeClosed,
|
||||
onComplete);
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onItemDispatched(pickingObjectDTO, mtbAart, initialNumCnf, initialQtaCnf, initialQtaTot, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, totalQtaToBeTaken, totalNumCnfToBeTaken, qtaCnfToBeTaken, canOverflowOrderQuantity, canPartitaMagBeChanged, canLUBeClosed, onComplete);
|
||||
}
|
||||
|
||||
private void sendOnItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems) {
|
||||
if(this.mListener != null)
|
||||
if (this.mListener != null)
|
||||
this.mListener.onItemAlreadyFound(matchedArt, alreadyScannedItems);
|
||||
}
|
||||
|
||||
@@ -428,21 +403,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaAvailable,
|
||||
BigDecimal totalNumCnfAvailable,
|
||||
BigDecimal qtaCnfAvailable,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
boolean canLUBeClosed,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
|
||||
|
||||
void onItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems);
|
||||
|
||||
@@ -28,8 +28,9 @@ public class ProdRientroMerceViewModel {
|
||||
}
|
||||
|
||||
public void refreshOrderList() {
|
||||
new Thread(this::sendOnOrdersLoadingStarted).start();
|
||||
this.sendOnOrdersLoadingStarted();
|
||||
String codAnag = SettingsManager.iDB().getFilterFornitoreProd();
|
||||
|
||||
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, codAnag, ordiniLavorazioneList -> {
|
||||
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
||||
this.sendOnOrdersLoadingEnded();
|
||||
|
||||
@@ -15,16 +15,19 @@ import androidx.preference.EditTextPreference;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.sqlite.db.SimpleSQLiteQuery;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -34,6 +37,7 @@ import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.context.AppContext;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
||||
@@ -48,6 +52,9 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
@Inject
|
||||
public AppContext appContext;
|
||||
|
||||
@Inject
|
||||
public RawDao rawDao;
|
||||
|
||||
@Inject
|
||||
public SystemRESTConsumer systemRESTConsumer;
|
||||
|
||||
@@ -226,29 +233,52 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
executorService.execute(() -> {
|
||||
|
||||
|
||||
File yourFile = appContext.getLogFilePath();
|
||||
var files = yourFile.listFiles();
|
||||
File logFilePath = appContext.getLogFilePath();
|
||||
var files = logFilePath.listFiles();
|
||||
|
||||
var fileToShare = Stream.of(files)
|
||||
.sortBy(x -> -1 * x.lastModified())
|
||||
.findFirstOrElse(null);
|
||||
try {
|
||||
var htmlContent = createAppLogAttachment(fileToShare);
|
||||
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
||||
|
||||
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
||||
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
||||
if(fileToShare != null) {
|
||||
var htmlContent = createAppLogAttachment(fileToShare);
|
||||
|
||||
var attachment = new MailAttachmentDTO()
|
||||
.setFileName("wms_log.html")
|
||||
.setFileb64Content(base64);
|
||||
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
||||
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
||||
|
||||
var logAttachment = new MailAttachmentDTO()
|
||||
.setFileName("wms_log.html")
|
||||
.setFileb64Content(base64);
|
||||
attachmentDTOList.add(logAttachment);
|
||||
}
|
||||
|
||||
|
||||
rawDao.vacuumDb(new SimpleSQLiteQuery("pragma wal_checkpoint(full)"));
|
||||
File[] dbFiles = new File[3];
|
||||
dbFiles[0] = requireContext().getDatabasePath("integry_wms");
|
||||
dbFiles[1] = requireContext().getDatabasePath("integry_wms-shm");
|
||||
dbFiles[2] = requireContext().getDatabasePath("integry_wms-wal");
|
||||
|
||||
for(int i = 0; i < dbFiles.length; i++){
|
||||
byte[] dbFileBytes = new byte[(int) dbFiles[i].length()];
|
||||
FileInputStream inputStream = new FileInputStream(dbFiles[i]);
|
||||
final int read = inputStream.read(dbFileBytes);
|
||||
inputStream.close();
|
||||
|
||||
var dbAttachment = new MailAttachmentDTO()
|
||||
.setFileName(dbFiles[i].getName())
|
||||
.setFileb64Content(Base64.encodeToString(dbFileBytes, Base64.NO_WRAP));
|
||||
attachmentDTOList.add(dbAttachment);
|
||||
}
|
||||
|
||||
var mailRequest = new MailRequestDTO()
|
||||
.setTo("developer@integry.it")
|
||||
.setMsgText("Questo è una mail che contiene il log del WMS")
|
||||
.setSubject("U vuemmeess")
|
||||
.setAttachments(new ArrayList<>());
|
||||
.setAttachments(attachmentDTOList);
|
||||
|
||||
mailRequest.getAttachments().add(attachment);
|
||||
|
||||
systemRESTConsumer.sendMail(mailRequest, this::closeProgress, ex -> {
|
||||
this.closeProgress();
|
||||
@@ -370,7 +400,13 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
htmlContent.append("<hr/>");
|
||||
}
|
||||
|
||||
htmlContent.append("\n" + "<script type=\"text/javascript\">\n" + " document.querySelectorAll(\".message\").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));\n" + "</script>\n" + "</body>\n" + "</html>");
|
||||
htmlContent.append("""
|
||||
|
||||
<script type="text/javascript">
|
||||
document.querySelectorAll(".message").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));
|
||||
</script>
|
||||
</body>
|
||||
</html>""");
|
||||
|
||||
return htmlContent.toString();
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
private String mDefaultRagSocOfUL = null;
|
||||
private GestioneEnum mDefaultGestioneOfUL = null;
|
||||
private int mDefaultSegnoCol = -1;
|
||||
private String mDefaultCodMdep = null;
|
||||
@@ -205,6 +206,12 @@ public class SpedizioneViewModel {
|
||||
private void initDefaultVars() {
|
||||
if (this.mTestateOrdini != null && this.mTestateOrdini.size() > 0) {
|
||||
|
||||
List<String> foundRagSoc = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getRagSocOrd).distinctBy(x -> x).toList();
|
||||
|
||||
if (foundRagSoc != null && foundRagSoc.size() == 1) {
|
||||
mDefaultRagSocOfUL = foundRagSoc.get(0);
|
||||
}
|
||||
|
||||
if (mDefaultGestioneOfUL == null) {
|
||||
//Definizione della gestione collo di default
|
||||
List<GestioneEnum> foundGestioni = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getGestioneEnum).withoutNulls().distinct().toList();
|
||||
@@ -1230,6 +1237,7 @@ public class SpedizioneViewModel {
|
||||
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(createdUDS, mTestateOrdini);
|
||||
|
||||
this.mCurrentMtbColt = createdUDS;
|
||||
this.mCurrentMtbColt.setRagSocCliente(mDefaultRagSocOfUL);
|
||||
this.mIsNewLU = true;
|
||||
|
||||
if (onComplete != null) onComplete.run();
|
||||
|
||||
@@ -9,6 +9,9 @@ public class DialogAvailableItemListModel {
|
||||
|
||||
private boolean aggiunto;
|
||||
|
||||
private boolean clickable;
|
||||
private MtbAart originalModel;
|
||||
|
||||
public boolean isAggiunto() {
|
||||
return aggiunto;
|
||||
}
|
||||
@@ -36,9 +39,43 @@ public class DialogAvailableItemListModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isClickable() {
|
||||
return clickable;
|
||||
}
|
||||
|
||||
public DialogAvailableItemListModel setClickable(boolean clickable) {
|
||||
this.clickable = clickable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbAart getOriginalModel() {
|
||||
return originalModel;
|
||||
}
|
||||
|
||||
public DialogAvailableItemListModel setOriginalModel(MtbAart originalModel) {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static DialogAvailableItemListModel fromMtbAart(MtbAart mtbAart) {
|
||||
return new DialogAvailableItemListModel()
|
||||
.setCodMart(mtbAart.getCodMart())
|
||||
.setDescrizioneEstesa(mtbAart.getDescrizioneEstesa());
|
||||
.setDescrizioneEstesa(mtbAart.getDescrizioneEstesa())
|
||||
.setOriginalModel(mtbAart);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
DialogAvailableItemListModel that = (DialogAvailableItemListModel) o;
|
||||
|
||||
return getOriginalModel().equals(that.getOriginalModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getOriginalModel().hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,27 +6,42 @@ import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
import com.ravikoradiya.liveadapter.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.databinding.DialogAvailableIntventarioItemsItemModelBinding;
|
||||
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
|
||||
public class DialogAvailableItemsView extends BaseDialogFragment {
|
||||
|
||||
private final List<DialogAvailableItemListModel> mListaArts;
|
||||
private final ObservableList<DialogAvailableItemListModel> mFilteredListaArts = new ObservableArrayList<>();
|
||||
|
||||
|
||||
public DialogAvailableItemsView(List<DialogAvailableItemListModel> listaArts) {
|
||||
private final RunnableArgs<MtbAart> mOnItemSelected;
|
||||
|
||||
|
||||
public DialogAvailableItemsView(List<DialogAvailableItemListModel> listaArts, RunnableArgs<MtbAart> onItemSelected) {
|
||||
super();
|
||||
this.mListaArts = listaArts;
|
||||
this.mFilteredListaArts.addAll(mListaArts);
|
||||
|
||||
this.mOnItemSelected = onItemSelected;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +52,12 @@ public class DialogAvailableItemsView extends BaseDialogFragment {
|
||||
|
||||
binding.titleText.setText(R.string.articoli_disponibili);
|
||||
|
||||
initRecyclerView(binding, mListaArts);
|
||||
for (var item : mListaArts) {
|
||||
if (mOnItemSelected != null) item.setClickable(true);
|
||||
}
|
||||
|
||||
initSearchView(binding);
|
||||
initRecyclerView(binding);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(binding.getRoot())
|
||||
@@ -49,17 +69,52 @@ public class DialogAvailableItemsView extends BaseDialogFragment {
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initRecyclerView(DialogChooseArtFromListaArtBinding binding, List<DialogAvailableItemListModel> dataset) {
|
||||
private void initSearchView(DialogChooseArtFromListaArtBinding binding) {
|
||||
binding.searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextChange(String newText) {
|
||||
final List<DialogAvailableItemListModel> matchItems = Stream.of(mListaArts)
|
||||
.filter(x -> x.getCodMart().toLowerCase().contains(newText.toLowerCase())
|
||||
|| x.getDescrizioneEstesa().toLowerCase().contains(newText.toLowerCase()))
|
||||
.toList();
|
||||
|
||||
mFilteredListaArts.clear();
|
||||
mFilteredListaArts.addAll(matchItems);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initRecyclerView(DialogChooseArtFromListaArtBinding binding) {
|
||||
binding.itemsList.setHasFixedSize(true);
|
||||
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireContext(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.divider));
|
||||
binding.itemsList.addItemDecoration(itemDecorator);
|
||||
|
||||
var itemType = new Type<DialogAvailableItemListModel, DialogAvailableIntventarioItemsItemModelBinding>(R.layout.dialog_available_intventario_items__item_model, BR.item);
|
||||
|
||||
new LiveAdapter(dataset, BR.item)
|
||||
.map(DialogAvailableItemListModel.class, R.layout.dialog_available_intventario_items__item_model)
|
||||
itemType.areItemSame((x, y) -> x.getOriginalModel().getCodMart().equals(y.getOriginalModel().getCodMart()));
|
||||
itemType.areContentsTheSame(DialogAvailableItemListModel::equals);
|
||||
|
||||
if (mOnItemSelected != null) {
|
||||
itemType.onClick(x -> {
|
||||
mOnItemSelected.run(x.getBinding().getItem().getOriginalModel());
|
||||
dismiss();
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
new LiveAdapter(mFilteredListaArts)
|
||||
.map(DialogAvailableItemListModel.class, itemType)
|
||||
.into(binding.itemsList);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,33 +26,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<!-- <it.integry.integrywmsnative.ui.ElevatedToolbar-->
|
||||
<!-- android:id="@+id/elevated_toolbar"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content">-->
|
||||
|
||||
<!-- <androidx.appcompat.widget.Toolbar-->
|
||||
<!-- android:id="@+id/toolbar"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="?attr/actionBarSize">-->
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatImageButton-->
|
||||
<!-- android:id="@+id/reset_values"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="50dp"-->
|
||||
<!-- android:layout_gravity="end"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- android:src="@drawable/ic_black_upload"-->
|
||||
<!-- android:backgroundTint="@android:color/transparent"-->
|
||||
<!-- android:onClick="@{() -> view.requestExportConfirm()}"-->
|
||||
<!-- android:tint="?attr/colorControlNormal" />-->
|
||||
|
||||
<!-- </androidx.appcompat.widget.Toolbar>-->
|
||||
|
||||
<!-- </it.integry.integrywmsnative.ui.ElevatedToolbar>-->
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
@@ -30,10 +31,20 @@
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/dialog_choose_art_from_lista_art" />
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.SearchView
|
||||
android:id="@+id/search_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:backgroundTint="@android:color/white"
|
||||
android:hint="@string/search"
|
||||
app:iconifiedByDefault="false"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/items_list"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -20,11 +20,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(view.articolo.merceDaRic)}"
|
||||
android:text="@{UtilityNumber.decimalToString(view.articolo.getCnfDaRic())}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
tools:text="1" />
|
||||
@@ -285,7 +285,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text="@{UtilityNumber.decimalToString(view.articolo.getCnfDaRic())}"
|
||||
android:text="@{UtilityNumber.decimalToString(view.articolo.merceDaRic)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
|
||||
@@ -9,5 +9,12 @@
|
||||
android:contentDescription="@string/action_export"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/search_art"
|
||||
android:title="@string/search"
|
||||
android:icon="@drawable/ic_search_black_24dp"
|
||||
android:contentDescription="@string/search"
|
||||
app:showAsAction="always" />
|
||||
|
||||
|
||||
</menu>
|
||||
@@ -460,4 +460,5 @@
|
||||
<string name="confirm_export_invalid_product"><![CDATA[Uno o più articoli ordinati non sono presenti nella lista selezionata! <br>Sei sicuro di voler continuare?]]></string>
|
||||
<string name="expired_list_session"><![CDATA[La lista di prodotti è stata caricata troppo tempo fa!]]></string>
|
||||
<string name="grid_details">Griglie disponibili</string>
|
||||
<string name="searchbar_hint">Cerca</string>
|
||||
</resources>
|
||||
@@ -469,4 +469,5 @@
|
||||
<string name="confirm_export_invalid_product"><![CDATA[One or more ordered products are not available in the selected list! <br> Do you wish to continue?]]></string>
|
||||
<string name="expired_list_session"><![CDATA[The product list was loaded too much time ago!]]></string>
|
||||
<string name="grid_details">Available grids</string>
|
||||
<string name="searchbar_hint">Search</string>
|
||||
</resources>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.8.0'
|
||||
agp_version = '8.0.1'
|
||||
agp_version = '8.0.2'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -42,6 +42,8 @@ public class ZebraBarcodeReader implements BarcodeReaderInterface {
|
||||
return true;
|
||||
} else if (model.equalsIgnoreCase("TC20")) {
|
||||
return true;
|
||||
} else if (model.equalsIgnoreCase("MBA5")) {
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,12 @@ public class ZebraBarcodeTypeMapper {
|
||||
case "LABEL-TYPE-CODE39":
|
||||
return BarcodeType.CODE39;
|
||||
|
||||
|
||||
case "LABEL-TYPE-IATA2OF5":
|
||||
return BarcodeType.IATA_2OF5;
|
||||
case "LABEL-TYPE-I2OF5":
|
||||
return BarcodeType.INTERLEAVED_2OF5;
|
||||
|
||||
case "LABEL-TYPE-EAN13":
|
||||
return BarcodeType.EAN13;
|
||||
case "LABEL-TYPE-EAN8":
|
||||
|
||||
Reference in New Issue
Block a user