Compare commits
32 Commits
v1.22.0(25
...
v1.23.4(25
| Author | SHA1 | Date | |
|---|---|---|---|
| ae6d37e80d | |||
| a616cb6022 | |||
| 837781389c | |||
| f23ff88878 | |||
| ddc038add4 | |||
| f037617dd9 | |||
| 84cff70567 | |||
| 8a1b3a1b00 | |||
| f11a81ef05 | |||
| eb8595e247 | |||
| 85520b937f | |||
| ec5bee558c | |||
| 857295d92b | |||
| 4da2c43251 | |||
| fc1681d111 | |||
| 692a350128 | |||
| 47f29899a2 | |||
| a0dfd20110 | |||
| 92aadad5cb | |||
| 52092e7e9c | |||
| ecfb8faf01 | |||
| e5dd4b15f4 | |||
| 6e070285e3 | |||
| d13cdf63c2 | |||
| c3884774e1 | |||
| 983b70821a | |||
| 8e60aa0249 | |||
| 69962781aa | |||
| a921b83c1f | |||
| ea8be0559a | |||
| 66f117186c | |||
| 4ff39009d2 |
1
.idea/.gitignore
generated
vendored
Normal file
1
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/saveactions_settings.xml
|
||||
@@ -1,13 +1,17 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
|
||||
if (!project.hasProperty("disable-performance-plugin")) {
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 254
|
||||
def appVersionName = '1.22.0'
|
||||
def appVersionCode = 259
|
||||
def appVersionName = '1.23.4'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -27,12 +31,12 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
applicationId "it.integry.integrywmsnative"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
versionCode appVersionCode
|
||||
versionName appVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -94,37 +98,37 @@ dependencies {
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:26.3.0')
|
||||
implementation platform('com.google.firebase:firebase-bom:29.1.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-core'
|
||||
implementation 'com.google.firebase:firebase-crash'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
implementation 'com.google.android.gms:play-services-basement:17.6.0'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.0.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.1'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
def dagger2_version = '2.35.1'
|
||||
def dagger2_version = '2.40'
|
||||
api "com.google.dagger:dagger:$dagger2_version"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android-support:$dagger2_version" // if you use the support libraries
|
||||
api "com.google.dagger:dagger-android-support:$dagger2_version"
|
||||
// if you use the support libraries
|
||||
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger2_version"
|
||||
|
||||
//FAB
|
||||
@@ -139,7 +143,7 @@ dependencies {
|
||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||
|
||||
//SQLite ROOM
|
||||
def room_version = "2.3.0"
|
||||
def room_version = "2.4.1"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||
@@ -158,7 +162,6 @@ dependencies {
|
||||
|
||||
|
||||
implementation 'com.github.RaviKoradiya:LiveAdapter:1.3.4'
|
||||
implementation 'org.reflections:reflections:0.10.2'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
<activity
|
||||
android:name=".gest.main.MainActivity"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing">
|
||||
android:windowSoftInputMode="adjustNothing"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY" />
|
||||
|
||||
@@ -73,7 +74,8 @@
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/SplashTheme">
|
||||
android:theme="@style/SplashTheme"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.Dial
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
||||
@@ -114,42 +115,79 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
SplashActivityComponent.Factory splashActivityComponent();
|
||||
|
||||
LoginComponent.Factory loginActivityComponent();
|
||||
|
||||
MainActivityComponent.Factory mainActivityComponent();
|
||||
|
||||
MainFragmentComponent.Factory mainFragmentComponent();
|
||||
|
||||
MainAccettazioneComponent.Factory mainAccettazioneComponent();
|
||||
|
||||
ListaBancaliComponent.Factory listaBancaliComponent();
|
||||
|
||||
ContenutoBancaleComponent.Factory contenutoBancaleComponent();
|
||||
|
||||
PVOrdiniAcquistoGrigliaComponent.Factory pvOrdineAcquistoGrigliaComponent();
|
||||
|
||||
PVOrdineAcquistoEditComponent.Factory pvOrdineAcquistoEditComponent();
|
||||
|
||||
PickingLiberoComponent.Factory pickingLiberoComponent();
|
||||
|
||||
RettificaGiacenzeComponent.Factory rettificaGiacenzeComponent();
|
||||
|
||||
SpedizioneComponent.Factory spedizioneComponent();
|
||||
|
||||
AccettazionePickingComponent.Factory accettazionePickingComponent();
|
||||
|
||||
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
|
||||
|
||||
UltimiArriviFornitoreComponent.Factory ultimiArriviFornitoreComponent();
|
||||
|
||||
PickingResiComponent.Factory pickingResiComponent();
|
||||
|
||||
OrdiniUscitaElencoComponent.Factory prodOrdineLavorazioneElencoComponent();
|
||||
|
||||
DialogInputQuantityV2Component.Factory dialogInputQuantityV2Component();
|
||||
|
||||
DialogInputLUProdComponent.Factory dialogInputLUProdComponent();
|
||||
|
||||
DialogScanArtComponent.Factory dialogScanArtComponent();
|
||||
|
||||
DialogScanOrCreateLUComponent.Factory dialogScanOrCreateLUComponent();
|
||||
|
||||
ProdFabbisognoLineeProdComponent.Factory prodFabbisognoLineeProdComponent();
|
||||
|
||||
VersamentoMerceComponent.Factory versamentoMerceComponent();
|
||||
|
||||
DialogAskMagazzinoProssimitaComponent.Factory dialogAskMagazzinoProssimitaComponent();
|
||||
|
||||
DialogChooseBatchLotComponent.Factory dialogChooseBatchLotComponent();
|
||||
|
||||
DialogRowInfoProdFabbisognoLineeProdComponent.Factory dialogRowInfoProdFabbisognoLineeProdComponent();
|
||||
|
||||
ProdRientroMerceComponent.Factory prodRientroMerceComponent();
|
||||
|
||||
ProdRientroMerceOrderDetailComponent.Factory prodRientroMerceOrderDetailComponent();
|
||||
|
||||
ProdOrdineProduzioneElencoComponent.Factory prodOrdineProduzioneElencoComponent();
|
||||
|
||||
ProdRecuperoMaterialeComponent.Factory prodRecuperoMaterialeComponent();
|
||||
|
||||
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
|
||||
|
||||
DialogChooseArtsFromListaArtsComponent.Factory dialogChooseArtsFromListaArtsComponent();
|
||||
|
||||
DocInterniComponent.Factory docInterniComponent();
|
||||
|
||||
DialogSelectDocInfoComponent.Factory dialogSelectMgrpDtipPairComponent();
|
||||
|
||||
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
||||
|
||||
InfoAggiuntiveLUDialogComponent.Factory infoAggiuntiveLUDialogComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
}
|
||||
|
||||
@@ -19,12 +19,14 @@ import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.services.inventario.InventarioService;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.rest.ProdFabbisognoLineeProdRESTConsumer;
|
||||
|
||||
@@ -165,5 +167,16 @@ public class MainApplicationModule {
|
||||
return new DocInterniRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
GiacenzaRESTConsumer provideGiacenzaRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new GiacenzaRESTConsumer(systemRESTConsumer, articoloRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
InventarioService provideInventarioService(GiacenzaRESTConsumer giacenzaRESTConsumer) {
|
||||
return new InventarioService(giacenzaRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class CommonConst {
|
||||
|
||||
public static String DEFAULT_ANONYMOUS_UL_SERIE = "UL";
|
||||
|
||||
public static int NUMBER_OF_DECIMAL_DIGITS = 3;
|
||||
public static int NUMBER_OF_DECIMAL_DIGITS = 5;
|
||||
}
|
||||
|
||||
public static class Files {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class MtbColr extends EntityBase {
|
||||
public MtbColr() {
|
||||
type = "mtb_colr";
|
||||
|
||||
if(SettingsManager.i().isUserLoggedIn()) {
|
||||
if (SettingsManager.i().isUserLoggedIn()) {
|
||||
setUtente(SettingsManager.i().getUser().getFullname());
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,6 @@ public class MtbColr extends EntityBase {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public MtbColr setGestione(GestioneEnum gestione) {
|
||||
this.gestione = gestione.getText();
|
||||
return this;
|
||||
@@ -124,6 +123,11 @@ public class MtbColr extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColr setDataCollo(Date dataCollo) {
|
||||
setDataCollo(UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Integer getRiga() {
|
||||
return riga;
|
||||
@@ -301,8 +305,6 @@ public class MtbColr extends EntityBase {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getDatetimeRowS() {
|
||||
return datetimeRow;
|
||||
}
|
||||
@@ -322,11 +324,6 @@ public class MtbColr extends EntityBase {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getCodJcom() {
|
||||
return codJcom;
|
||||
}
|
||||
@@ -364,11 +361,6 @@ public class MtbColr extends EntityBase {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getDataScadPartitaS() {
|
||||
return dataScadPartita;
|
||||
}
|
||||
@@ -398,7 +390,6 @@ public class MtbColr extends EntityBase {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public class MtbColt extends EntityBase {
|
||||
private String codJcom;
|
||||
|
||||
private List<MtbCols> mtbCols;
|
||||
private MtbTCol mtbTCol;
|
||||
|
||||
private Boolean disablePrint;
|
||||
private String ragSocCliente;
|
||||
@@ -83,7 +84,6 @@ public class MtbColt extends EntityBase {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private ObservableArrayList<MtbColr> mtbColr = new ObservableArrayList<>();
|
||||
|
||||
public ObservableArrayList<MtbColr> getMtbColr() {
|
||||
@@ -95,12 +95,12 @@ public class MtbColt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt(){
|
||||
public MtbColt() {
|
||||
type = "mtb_colt";
|
||||
setDataCollo(UtilityDate.getDateInstance());
|
||||
setSerCollo("/");
|
||||
|
||||
if(SettingsManager.i().isUserLoggedIn()) {
|
||||
if (SettingsManager.i().isUserLoggedIn()) {
|
||||
setPreparatoDa(SettingsManager.i().getUser().getFullname());
|
||||
}
|
||||
}
|
||||
@@ -137,11 +137,11 @@ public class MtbColt extends EntityBase {
|
||||
Date dataColloD = null;
|
||||
try {
|
||||
dataColloD = getDataColloD();
|
||||
} catch (Exception ex){
|
||||
} catch (Exception ex) {
|
||||
UtilityLogger.errorMe(ex);
|
||||
}
|
||||
|
||||
if(dataColloD != null){
|
||||
if (dataColloD != null) {
|
||||
return UtilityDate.formatDate(dataColloD, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN_LONG);
|
||||
} else return null;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ public class MtbColt extends EntityBase {
|
||||
public String getTimeVers() {
|
||||
Date dataColloD = getDataVersD();
|
||||
|
||||
if(dataColloD != null){
|
||||
if (dataColloD != null) {
|
||||
return UtilityDate.formatDate(dataColloD, UtilityDate.COMMONS_DATE_FORMATS.TIME);
|
||||
} else return null;
|
||||
}
|
||||
@@ -526,6 +526,15 @@ public class MtbColt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbTCol getMtbTCol() {
|
||||
return mtbTCol;
|
||||
}
|
||||
|
||||
public MtbColt setMtbTCol(MtbTCol mtbTCol) {
|
||||
this.mtbTCol = mtbTCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void generaFiltroOrdineFromDTO(List<FiltroOrdineDTO> filtroOrdineDtos) {
|
||||
|
||||
String xmlPrefix = "{\"whereCond\": \"";
|
||||
@@ -533,9 +542,9 @@ public class MtbColt extends EntityBase {
|
||||
|
||||
StringBuilder whereCond = new StringBuilder();
|
||||
|
||||
if(filtroOrdineDtos != null && filtroOrdineDtos.size() > 0) {
|
||||
if (filtroOrdineDtos != null && filtroOrdineDtos.size() > 0) {
|
||||
|
||||
for(int i = 0; i < filtroOrdineDtos.size(); i++){
|
||||
for (int i = 0; i < filtroOrdineDtos.size(); i++) {
|
||||
FiltroOrdineDTO x = filtroOrdineDtos.get(i);
|
||||
|
||||
try {
|
||||
@@ -545,13 +554,13 @@ public class MtbColt extends EntityBase {
|
||||
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH)),
|
||||
UtilityDB.valueToString(x.getNumOrd())));
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(x.getDataConsS())) {
|
||||
if (!UtilityString.isNullOrEmpty(x.getDataConsS())) {
|
||||
whereCond.append(String.format(" AND dr.dc = %s",
|
||||
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH))));
|
||||
}
|
||||
|
||||
whereCond.append(")");
|
||||
if(i < filtroOrdineDtos.size()-1) {
|
||||
if (i < filtroOrdineDtos.size() - 1) {
|
||||
whereCond.append(" OR ");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by ValerioC on 06/03/2018.
|
||||
*/
|
||||
|
||||
public class MvwSitArtUdcDetInventario {
|
||||
|
||||
private String gestione;
|
||||
private Date dataCollo;
|
||||
private String serCollo;
|
||||
private Integer numCollo;
|
||||
private Integer segno;
|
||||
private String codMdep;
|
||||
private String posizione;
|
||||
private Integer priorita;
|
||||
private String codGruppo;
|
||||
private String gruppo;
|
||||
private String codSgruppo;
|
||||
private String sottogruppo;
|
||||
private String codMart;
|
||||
private String diacod;
|
||||
private String descrizioneEstesa;
|
||||
private String partitaMag;
|
||||
private String codJcom;
|
||||
private String commessa;
|
||||
private String untMis;
|
||||
private BigDecimal qtaCol;
|
||||
private BigDecimal numCnf;
|
||||
private BigDecimal qtaCnf;
|
||||
private BigDecimal pesoNettoKg;
|
||||
private BigDecimal pesoLordoKg;
|
||||
private String codJfas;
|
||||
private MtbAart mtbAart;
|
||||
|
||||
|
||||
public String getGestione() {
|
||||
return gestione;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setGestione(String gestione) {
|
||||
this.gestione = gestione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setDataCollo(Date dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setSerCollo(String serCollo) {
|
||||
this.serCollo = serCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setNumCollo(Integer numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSegno() {
|
||||
return segno;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setSegno(Integer segno) {
|
||||
this.segno = segno;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setPosizione(String posizione) {
|
||||
this.posizione = posizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPriorita() {
|
||||
return priorita;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setPriorita(Integer priorita) {
|
||||
this.priorita = priorita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodGruppo() {
|
||||
return codGruppo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCodGruppo(String codGruppo) {
|
||||
this.codGruppo = codGruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGruppo() {
|
||||
return gruppo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setGruppo(String gruppo) {
|
||||
this.gruppo = gruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodSgruppo() {
|
||||
return codSgruppo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCodSgruppo(String codSgruppo) {
|
||||
this.codSgruppo = codSgruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSottogruppo() {
|
||||
return sottogruppo;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setSottogruppo(String sottogruppo) {
|
||||
this.sottogruppo = sottogruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiacod() {
|
||||
return diacod;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setDiacod(String diacod) {
|
||||
this.diacod = diacod;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizioneEstesa() {
|
||||
return descrizioneEstesa;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setDescrizioneEstesa(String descrizioneEstesa) {
|
||||
this.descrizioneEstesa = descrizioneEstesa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJcom() {
|
||||
return codJcom;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCodJcom(String codJcom) {
|
||||
this.codJcom = codJcom;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCommessa() {
|
||||
return commessa;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCommessa(String commessa) {
|
||||
this.commessa = commessa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCol() {
|
||||
return qtaCol;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setQtaCol(BigDecimal qtaCol) {
|
||||
this.qtaCol = qtaCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPesoNettoKg() {
|
||||
return pesoNettoKg;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setPesoNettoKg(BigDecimal pesoNettoKg) {
|
||||
this.pesoNettoKg = pesoNettoKg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getPesoLordoKg() {
|
||||
return pesoLordoKg;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setPesoLordoKg(BigDecimal pesoLordoKg) {
|
||||
this.pesoLordoKg = pesoLordoKg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJfas() {
|
||||
return codJfas;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setCodJfas(String codJfas) {
|
||||
this.codJfas = codJfas;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbAart getMtbAart() {
|
||||
return mtbAart;
|
||||
}
|
||||
|
||||
public MvwSitArtUdcDetInventario setMtbAart(MtbAart mtbAart) {
|
||||
this.mtbAart = mtbAart;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||
if(response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
|
||||
if (response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
|
||||
onComplete.run(response.body().getEntityList().get(0));
|
||||
} else onComplete.run(null);
|
||||
|
||||
@@ -107,9 +107,10 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
})
|
||||
.toList();
|
||||
|
||||
var whereCond = " WHERE " + UtilityQuery.concatFieldListInWhereCond(whereCondMap);
|
||||
var whereCond = whereCondMap.isEmpty() ? "" : " WHERE " + UtilityQuery.concatFieldListInWhereCond(whereCondMap);
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {}.getType();
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {
|
||||
}.getType();
|
||||
this.systemRESTConsumer.processSql("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
||||
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
mtbColrClone
|
||||
.setNumCollo(null)
|
||||
.setDataCollo(null)
|
||||
.setDataCollo((String) null)
|
||||
.setRiga(null)
|
||||
.setGestione(GestioneEnum.LAVORAZIONE)
|
||||
|
||||
@@ -209,7 +209,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
MtbColr mtbColrClone = new MtbColr();
|
||||
mtbColrClone
|
||||
.setNumCollo(null)
|
||||
.setDataCollo(null)
|
||||
.setDataCollo((String) null)
|
||||
.setRiga(null)
|
||||
.setGestione(GestioneEnum.LAVORAZIONE)
|
||||
.setDataColloRif(sourceMtbColt.getDataColloD())
|
||||
@@ -239,7 +239,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
saveCollo(newMtbColt, onComplete, onFailed);
|
||||
}
|
||||
|
||||
|
||||
public void createColloFromEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
createColloFromEtichettaAnonima(barcodeScanDTO.getStringValue(), gestione, onComplete, onFailed);
|
||||
}
|
||||
@@ -399,7 +398,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
private void cyclicGetMultipleByTestate(@NotNull Iterator<MtbColt> sourceMtbColts, boolean onlyResiduo, ArrayList<MtbColt> resultMtbColt, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
if (sourceMtbColts.hasNext()) {
|
||||
getByTestata(sourceMtbColts.next(), onlyResiduo, false, mtbColt -> {
|
||||
@@ -449,7 +447,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void changePosizione(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
String codMdep = posizione.getCodMdep();
|
||||
@@ -545,7 +542,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService.getColliInBasket(SettingsManager.i().getUserSession().getDepo().getCodMdep()).enqueue(new Callback<ServiceRESTResponse<List<MtbColt>>>() {
|
||||
@@ -622,7 +618,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void assegnaLottoSuColloScarico(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||
|
||||
@@ -648,7 +643,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void versamentoAutomaticoUL(MtbColt sourceMtbColt, RunnableArgs<VersamentoAutomaticoULResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||
|
||||
@@ -682,7 +676,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart()))
|
||||
.findFirst();
|
||||
|
||||
if(mtbAartOpt.isPresent()){
|
||||
if (mtbAartOpt.isPresent()) {
|
||||
foundMtbAart = mtbAartOpt.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||
|
||||
@Singleton
|
||||
public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
private final SystemRESTConsumer mSystemRESTConsumer;
|
||||
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||
|
||||
public GiacenzaRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
this.mSystemRESTConsumer = systemRESTConsumer;
|
||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||
|
||||
}
|
||||
|
||||
public void getGiacenzeInPosizione(MtbDepoPosizione posizione, RunnableArgs<List<MvwSitArtUdcDetInventario>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("posizione", posizione.getPosizione());
|
||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
||||
String query = "SELECT * from mvw_sitart_udc_det_inventario" +
|
||||
" WHERE " + whereCond;
|
||||
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MvwSitArtUdcDetInventario>>() {
|
||||
}.getType();
|
||||
this.mSystemRESTConsumer.<ArrayList<MvwSitArtUdcDetInventario>>processSql(query, typeOfObjectsList, inventarioList -> {
|
||||
List<String> codMarts = Stream.of(inventarioList)
|
||||
.map(x -> x.getCodMart().trim())
|
||||
.toList();
|
||||
|
||||
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
||||
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();
|
||||
}
|
||||
|
||||
row.setMtbAart(foundMtbAart);
|
||||
}
|
||||
|
||||
onComplete.run(inventarioList);
|
||||
}, onFailed);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
public interface GiacenzaRESTConsumerService {
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
@@ -13,20 +16,22 @@ import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.Azienda;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.Azienda;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import retrofit2.Call;
|
||||
@@ -46,7 +51,17 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "ProcessSql", o -> {
|
||||
Gson gson = new Gson();
|
||||
Gson gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Date.class, (JsonDeserializer) (json, typeOfT, context) -> {
|
||||
try {
|
||||
return UtilityDate.recognizeDate(json.getAsString());
|
||||
} catch (Exception e) {
|
||||
throw new JsonParseException(e);
|
||||
}
|
||||
})
|
||||
.create();
|
||||
|
||||
|
||||
String json = gson.toJson(o);
|
||||
|
||||
InputStream ims = new ByteArrayInputStream(json.getBytes());
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package it.integry.integrywmsnative.core.services.inventario;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||
|
||||
@Singleton
|
||||
public class InventarioService {
|
||||
|
||||
private final GiacenzaRESTConsumer mGiacenzaRESTConsumer;
|
||||
|
||||
public InventarioService(GiacenzaRESTConsumer giacenzaRESTConsumer) {
|
||||
this.mGiacenzaRESTConsumer = giacenzaRESTConsumer;
|
||||
}
|
||||
|
||||
public void getInventarioDaPosizione(MtbDepoPosizione posizione, RunnableArgs<List<MvwSitArtUdcDetInventario>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
mGiacenzaRESTConsumer.getGiacenzeInPosizione(posizione, onSuccess, onError);
|
||||
}
|
||||
|
||||
public void getInventarioDaPosizionePerArticolo(MtbDepoPosizione posizione, MtbAart articolo, RunnableArgs<List<MvwSitArtUdcDetInventario>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
getInventarioDaPosizione(posizione, (inventario) -> {
|
||||
List<MvwSitArtUdcDetInventario> inventarioArticolo = Stream.of(inventario).filter(
|
||||
x -> articolo.getCodMart().equalsIgnoreCase(x.getCodMart())
|
||||
).toList();
|
||||
onSuccess.run(inventarioArticolo);
|
||||
}, onError);
|
||||
}
|
||||
|
||||
public MtbColt mapInventarioToMtbColt(MvwSitArtUdcDetInventario inventario) {
|
||||
return mapInventarioToMtbColt(inventario, true);
|
||||
}
|
||||
|
||||
public MtbColt mapInventarioToMtbColt(MvwSitArtUdcDetInventario inventario, boolean includeRows) {
|
||||
MtbColt mtbColt = new MtbColt();
|
||||
|
||||
mtbColt.setGestione(inventario.getGestione());
|
||||
mtbColt.setDataCollo(inventario.getDataCollo());
|
||||
mtbColt.setSerCollo(inventario.getSerCollo());
|
||||
mtbColt.setNumCollo(inventario.getNumCollo());
|
||||
mtbColt.setSegno(inventario.getSegno());
|
||||
mtbColt.setCodMdep(inventario.getCodMdep());
|
||||
mtbColt.setPosizione(inventario.getPosizione());
|
||||
mtbColt.setCodJcom(inventario.getCodJcom());
|
||||
mtbColt.setPesoNettoKg(inventario.getPesoNettoKg());
|
||||
mtbColt.setPesoKg(inventario.getPesoLordoKg());
|
||||
mtbColt.setCodJfas(inventario.getCodJfas());
|
||||
|
||||
if (includeRows) {
|
||||
ObservableArrayList<MtbColr> rows = new ObservableArrayList<>();
|
||||
rows.add(mapInventarioToMtbColr(inventario));
|
||||
mtbColt.setMtbColr(rows);
|
||||
}
|
||||
return mtbColt;
|
||||
}
|
||||
|
||||
public MtbColr mapInventarioToMtbColr(MvwSitArtUdcDetInventario inventario) {
|
||||
MtbColr mtbColr = new MtbColr();
|
||||
|
||||
mtbColr.setGestione(inventario.getGestione());
|
||||
mtbColr.setDataCollo(inventario.getDataCollo());
|
||||
mtbColr.setSerCollo(inventario.getSerCollo());
|
||||
mtbColr.setNumCollo(inventario.getNumCollo());
|
||||
mtbColr.setCodMart(inventario.getCodMart());
|
||||
mtbColr.setDescrizione(inventario.getDescrizioneEstesa());
|
||||
mtbColr.setPartitaMag(inventario.getPartitaMag());
|
||||
mtbColr.setCodJcom(inventario.getCodJcom());
|
||||
mtbColr.setUntMis(inventario.getUntMis());
|
||||
mtbColr.setQtaCol(inventario.getQtaCol());
|
||||
mtbColr.setNumCnf(inventario.getNumCnf());
|
||||
mtbColr.setQtaCnf(inventario.getQtaCnf());
|
||||
mtbColr.setPesoNettoKg(inventario.getPesoNettoKg());
|
||||
mtbColr.setPesoLordoKg(inventario.getPesoLordoKg());
|
||||
mtbColr.setMtbAart(inventario.getMtbAart());
|
||||
|
||||
|
||||
return mtbColr;
|
||||
}
|
||||
|
||||
public List<MtbColt> mapInventarioToMtbColtList(List<MvwSitArtUdcDetInventario> inventario) {
|
||||
return new ArrayList<>(Stream.of(inventario).groupBy(x -> x.getNumCollo() + "-" + x.getDataCollo() + "-" + x.getSerCollo() + x.getGestione()).map(inv -> {
|
||||
List<MvwSitArtUdcDetInventario> rows = inv.getValue();
|
||||
MtbColt mtbColt = mapInventarioToMtbColt(rows.get(0), false);
|
||||
ObservableArrayList<MtbColr> mtbColrs = new ObservableArrayList<>();
|
||||
mtbColrs.addAll(Stream.of(rows).map(this::mapInventarioToMtbColr).toList());
|
||||
mtbColt.setMtbColr(mtbColrs);
|
||||
return mtbColt;
|
||||
}).toList());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import com.google.android.gms.common.internal.service.Common;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
|
||||
@@ -41,6 +41,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
@@ -72,9 +73,9 @@ import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFrag
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialog;
|
||||
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.note_aggiuntive_lu.NoteAggiuntiveLUDialog;
|
||||
import it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView;
|
||||
|
||||
public class AccettazionePickingActivity extends BaseActivity implements AccettazionePickingViewModel.Listener, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
||||
@@ -791,9 +792,9 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNoteAggiuntiveRequest(RunnableArgs<String> onComplete) {
|
||||
public void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
runOnUiThread(() -> {
|
||||
NoteAggiuntiveLUDialog.make(this, onComplete).show();
|
||||
InfoAggiuntiveLUDialog.newInstance(onComplete).show(getSupportFragmentManager(), "InfoAggiuntiveLUDialog");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
@@ -359,7 +360,7 @@ public class AccettazionePickingViewModel {
|
||||
}
|
||||
|
||||
public void createNewLU(Integer customNumCollo, String customSerCollo, boolean disablePrint, Runnable onComplete) {
|
||||
this.sendOnNoteAggiuntiveRequest(additionalNotes -> {
|
||||
this.sendOnInfoAggiuntiveRequest((additionalNotes, tCol) -> {
|
||||
|
||||
this.mGestSetupRESTConsumer.getValue("PICKING", "SETUP", "DEFAULT_POSIZIONE_COLLI_ACCETTAZIONE", defaultPosAccettazioneDTO -> {
|
||||
|
||||
@@ -375,6 +376,11 @@ public class AccettazionePickingViewModel {
|
||||
.setPosizione(defaultPosAccettazione)
|
||||
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
|
||||
if (tCol != null) {
|
||||
mtbColt.setCodTcol(tCol.getCodTcol());
|
||||
mtbColt.setMtbTCol(tCol);
|
||||
}
|
||||
|
||||
if (customNumCollo != null) {
|
||||
mtbColt.setNumCollo(customNumCollo);
|
||||
}
|
||||
@@ -896,8 +902,8 @@ public class AccettazionePickingViewModel {
|
||||
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
|
||||
}
|
||||
|
||||
private void sendOnNoteAggiuntiveRequest(RunnableArgs<String> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onNoteAggiuntiveRequest(onComplete);
|
||||
private void sendOnInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onInfoAggiuntiveRequest(onComplete);
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
@@ -990,7 +996,7 @@ public class AccettazionePickingViewModel {
|
||||
|
||||
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
|
||||
|
||||
void onNoteAggiuntiveRequest(RunnableArgs<String> onComplete);
|
||||
void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
|
||||
@@ -6,14 +6,11 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniViewModel;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppiArticoloDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppiArticoloDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
||||
|
||||
|
||||
@@ -94,11 +91,11 @@ public class DialogSelectDocInfoViewModel {
|
||||
}
|
||||
|
||||
public List<String> getAvailableCodDtips() {
|
||||
return Stream.of(mDocInterniSetupDTO.getTipiDoc()).map(TipiDocDTO::getLabel).toList();
|
||||
return mDocInterniSetupDTO.getTipiDoc() != null ? Stream.of(mDocInterniSetupDTO.getTipiDoc()).map(TipiDocDTO::getLabel).toList() : new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<String> getAvailableCodMgrps() {
|
||||
return Stream.of(mDocInterniSetupDTO.getGruppiArt()).map(GruppiArticoloDTO::getLabel).toList();
|
||||
return mDocInterniSetupDTO.getGruppiArt() != null ? Stream.of(mDocInterniSetupDTO.getGruppiArt()).map(GruppiArticoloDTO::getLabel).toList() : new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<String> getAvailableFornitori() {
|
||||
|
||||
@@ -13,6 +13,10 @@ public class ColloDTO {
|
||||
private String segno;
|
||||
private String idDisp;
|
||||
private String codDtip;
|
||||
private String codAnag;
|
||||
private String codVdes;
|
||||
private Integer numDoc;
|
||||
private Date dataDoc;
|
||||
private List<ArtDTO> artRows = new ArrayList<>();
|
||||
private RifOrd rifOrd;
|
||||
|
||||
@@ -88,6 +92,42 @@ public class ColloDTO {
|
||||
return rifOrd;
|
||||
}
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public ColloDTO setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumDoc() {
|
||||
return numDoc;
|
||||
}
|
||||
|
||||
public ColloDTO setNumDoc(Integer numDoc) {
|
||||
this.numDoc = numDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataDoc() {
|
||||
return dataDoc;
|
||||
}
|
||||
|
||||
public ColloDTO setDataDoc(Date dataDoc) {
|
||||
this.dataDoc = dataDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodVdes() {
|
||||
return codVdes;
|
||||
}
|
||||
|
||||
public ColloDTO setCodVdes(String codVdes) {
|
||||
this.codVdes = codVdes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRifOrd(RifOrd rifOrd) {
|
||||
this.rifOrd = rifOrd;
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQua
|
||||
|
||||
public class DocInterniEditFormActivity extends BaseActivity implements DocInterniEditFormViewModel.Listener, BottomSheetMtbColrEditView.Listener {
|
||||
|
||||
private static String DATA_KEY_DOCUMENT = "document";
|
||||
private static String DATA_KEY_PRODUCTS_LIST = "productsList";
|
||||
private static final String DATA_KEY_DOCUMENT = "document";
|
||||
private static final String DATA_KEY_PRODUCTS_LIST = "productsList";
|
||||
|
||||
@Inject
|
||||
MtbColrRepository documentRowsRepository;
|
||||
@@ -101,22 +101,22 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
SqlMtbColt document = this.viewModel.getDocument();
|
||||
this.codDtip.set(document.getCodDtipProvv());
|
||||
this.note.set(document.getAnnotazioni());
|
||||
if(document.getCodMgrp() != null){
|
||||
if (document.getCodMgrp() != null) {
|
||||
this.codMgrp.set(document.getCodMgrp());
|
||||
}else{
|
||||
} else {
|
||||
binding.mtbGrupContainer.setVisibility(View.GONE);
|
||||
}
|
||||
if (document.getCodAnag() != null){
|
||||
this.codAnag.set(document.getCodAnag() + (document.getCodVdes()!=null?" - "+document.getCodVdes():""));
|
||||
}else{
|
||||
if (document.getCodAnag() != null) {
|
||||
this.codAnag.set(document.getCodAnag() + (document.getCodVdes() != null ? " - " + document.getCodVdes() : ""));
|
||||
} else {
|
||||
this.binding.supplierLayout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
this.documentHeader.set(String.format(this.getString(R.string.doc_interni_doc_header), document.getId(), document.getCodDtipProvv()));
|
||||
|
||||
if (document.getNumDoc() != null && document.getDataDoc() != null){
|
||||
if (document.getNumDoc() != null && document.getDataDoc() != null) {
|
||||
this.documentRifHeader.set(String.format(this.getString(R.string.doc_testata), document.getNumDoc().toString(), document.getDataDoc()));
|
||||
}else{
|
||||
} else {
|
||||
this.binding.docRifLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -138,6 +138,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
this.viewModel.setProductsList(productList);
|
||||
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
this.viewModel.docRows.observe(this, this::refreshList);
|
||||
DocumentRowsListAdapter listAdapter = new DocumentRowsListAdapter(this, documentRowsObservableList);
|
||||
@@ -156,14 +157,13 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void closeEdit() {
|
||||
this.onBackPressed();
|
||||
}
|
||||
|
||||
public void manualSearch() {
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il codice a barre/codice articolo da cercare", null, this.viewModel::onSearch, BarcodeManager::enable).show();
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Ricerca articolo", null, "Cod articolo / Barcode", this.viewModel::onSearch, BarcodeManager::enable).show();
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
}
|
||||
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(this.viewModel::onScanSuccessful)
|
||||
.setOnScanSuccessfull(this.viewModel::processBarcode)
|
||||
.setOnScanFailed(this::onError));
|
||||
this.viewModel.fetchDocumentRows();
|
||||
}
|
||||
@@ -217,7 +217,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
mtbAart.setQtaCnf(BigDecimal.valueOf(row.getQtaCnf()));
|
||||
mtbAart.setDescrizione(row.getDescrizione());
|
||||
mtbAart.setDescrizioneEstesa(row.getDescrizione());
|
||||
mtbAart.setFlagTracciabilita(flagTracciabilita? "S" : "N");
|
||||
mtbAart.setFlagTracciabilita(flagTracciabilita ? "S" : "N");
|
||||
mtbAart.setUntMis(row.getUntMis());
|
||||
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
@@ -226,6 +226,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
.setInitialQtaCnf(BigDecimal.valueOf(row.getQtaCnf()))
|
||||
.setInitialQtaTot(BigDecimal.valueOf(row.getQtaCol()))
|
||||
.setNote(row.getNote())
|
||||
.setSaveOnImeDone(true)
|
||||
.setPartitaMag(row.getPartitaMag())
|
||||
.setDataScad(row.getDataScad())
|
||||
.setCanOverflowOrderQuantity(false)
|
||||
@@ -236,7 +237,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
.setSuggestPartitaMag(data -> {
|
||||
Date dataScad = data.getDataScad();
|
||||
String partitaMag = null;
|
||||
if (dataScad != null){
|
||||
if (dataScad != null) {
|
||||
partitaMag = new SimpleDateFormat("yyyymmdd").format(dataScad);
|
||||
}
|
||||
return partitaMag;
|
||||
@@ -271,7 +272,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
@Override
|
||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||
GrigliaAcquistiChildDTO articolo = viewModel.getArticoloByCodMart(mtbColr.getCodMart());
|
||||
this.viewModel.editRow(entityToSql(mtbColr),articolo.getFlagTracciabilita().equalsIgnoreCase("S"));
|
||||
this.viewModel.editRow(entityToSql(mtbColr), articolo.getFlagTracciabilita().equalsIgnoreCase("S"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,8 @@ import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -68,8 +70,8 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
}
|
||||
|
||||
public void editRow(SqlMtbColr row,boolean flagTracciabilita) {
|
||||
this.listener.onEditRowRequest(row,flagTracciabilita);
|
||||
public void editRow(SqlMtbColr row, boolean flagTracciabilita) {
|
||||
this.listener.onEditRowRequest(row, flagTracciabilita);
|
||||
}
|
||||
|
||||
private Integer getNextIdRiga() {
|
||||
@@ -91,7 +93,8 @@ public class DocInterniEditFormViewModel {
|
||||
}, this::sendError);
|
||||
}, this::sendError);
|
||||
}
|
||||
public void deleteDocument() {
|
||||
|
||||
public void deleteDocument() {
|
||||
this.sendOnLoadingStarted();
|
||||
docInterniRESTConsumer.saveDoc(this.getSaveDto(), obj -> {
|
||||
SqlMtbColt document = this.getDocument();
|
||||
@@ -116,7 +119,8 @@ public void deleteDocument() {
|
||||
return;
|
||||
}
|
||||
SqlMtbColr row = this.getRowForArticolo(articolo);
|
||||
this.editRow(row,articolo.getFlagTracciabilita().equalsIgnoreCase("S"));
|
||||
this.sendOnLoadingEnded();
|
||||
this.editRow(row, articolo.getFlagTracciabilita().equalsIgnoreCase("S"));
|
||||
|
||||
}
|
||||
|
||||
@@ -147,7 +151,12 @@ public void deleteDocument() {
|
||||
}
|
||||
|
||||
private GrigliaAcquistiChildDTO searchArticolo(String filter) {
|
||||
return Stream.of(this.productsList).filter(dto -> dto.getCodMart().equalsIgnoreCase(filter) || dto.getBarcode().equalsIgnoreCase(filter)).findFirstOrElse(null);
|
||||
return Stream.of(this.productsList).filter(dto ->
|
||||
filter.equalsIgnoreCase(dto.getCodMart())
|
||||
|| filter.equalsIgnoreCase(dto.getBarcode())
|
||||
|| StringUtils.leftPad(filter, 13, '0').equalsIgnoreCase(dto.getCodMart())
|
||||
|| StringUtils.leftPad(filter, 13, '0').equalsIgnoreCase(dto.getBarcode())
|
||||
).findFirstOrElse(null);
|
||||
}
|
||||
|
||||
private SaveDTO getSaveDto() {
|
||||
@@ -168,6 +177,10 @@ public void deleteDocument() {
|
||||
collo.setCreatedDate(UtilityDate.formatDate(document.getDataCollo(), UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH));
|
||||
collo.setAnnotazioni(document.getAnnotazioni());
|
||||
collo.setSegno(saveDTO.getSegno());
|
||||
collo.setDataDoc(document.getDataDoc());
|
||||
collo.setNumDoc(document.getNumDoc());
|
||||
collo.setCodAnag(document.getCodAnag());
|
||||
collo.setCodVdes(document.getCodVdes());
|
||||
|
||||
for (SqlMtbColr row : this.getDocumentRows()) {
|
||||
ArtDTO artDto = new ArtDTO();
|
||||
@@ -209,7 +222,7 @@ public void deleteDocument() {
|
||||
this.productsList = productsList;
|
||||
}
|
||||
|
||||
public void onScanSuccessful(BarcodeScanDTO dto) {
|
||||
public void processBarcode(BarcodeScanDTO dto) {
|
||||
String code = dto.getStringValue();
|
||||
this.onSearch(code);
|
||||
}
|
||||
@@ -246,7 +259,7 @@ public void deleteDocument() {
|
||||
}
|
||||
|
||||
public GrigliaAcquistiChildDTO getArticoloByCodMart(String codMart) {
|
||||
return Stream.of(productsList).filter(prod->prod.codMart.equalsIgnoreCase(codMart)).findFirstOrElse(null);
|
||||
return Stream.of(productsList).filter(prod -> prod.codMart.equalsIgnoreCase(codMart)).findFirstOrElse(null);
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
@@ -255,7 +268,7 @@ public void deleteDocument() {
|
||||
|
||||
void onRowsChanged(List<SqlMtbColr> rows);
|
||||
|
||||
void onEditRowRequest(SqlMtbColr row,boolean flagTracciabilita);
|
||||
void onEditRowRequest(SqlMtbColr row, boolean flagTracciabilita);
|
||||
|
||||
void onDocumentHoldRequest();
|
||||
|
||||
|
||||
@@ -289,9 +289,9 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
public void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
DialogChooseArtsFromListaArts
|
||||
.newInstance(mtbColrsToPick, onComplete, () -> {
|
||||
.newInstance(mtbColrsToPick, mtbAart, onComplete, () -> {
|
||||
onAbort.run();
|
||||
BarcodeManager.enable();
|
||||
})
|
||||
|
||||
@@ -7,6 +7,7 @@ import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
|
||||
@Module(subcomponents = {PickingLiberoComponent.class})
|
||||
public class PickingLiberoModule {
|
||||
@@ -15,7 +16,9 @@ public class PickingLiberoModule {
|
||||
@Singleton
|
||||
PickingLiberoViewModel providesPickingLiberoViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
return new PickingLiberoViewModel(articoloRESTConsumer, colliMagazzinoRESTConsumer, barcodeRESTConsumer);
|
||||
BarcodeRESTConsumer barcodeRESTConsumer,
|
||||
PosizioniRESTConsumer posizioniRESTConsumer
|
||||
) {
|
||||
return new PickingLiberoViewModel(articoloRESTConsumer, colliMagazzinoRESTConsumer, barcodeRESTConsumer, posizioniRESTConsumer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import javax.inject.Inject;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.TooManyLUFoundInMonoLUPositionException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUBaseOperationsListener;
|
||||
@@ -23,18 +24,21 @@ import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
@@ -48,6 +52,7 @@ public class PickingLiberoViewModel {
|
||||
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
|
||||
private final BarcodeRESTConsumer mBarcodeRESTConsumer;
|
||||
private final PosizioniRESTConsumer mPosizioniRESTConsumer;
|
||||
|
||||
|
||||
private boolean mFlagAskCliente;
|
||||
@@ -60,10 +65,13 @@ public class PickingLiberoViewModel {
|
||||
@Inject
|
||||
public PickingLiberoViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
BarcodeRESTConsumer barcodeRESTConsumer,
|
||||
PosizioniRESTConsumer posizioniRESTConsumer
|
||||
) {
|
||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
this.mPosizioniRESTConsumer = posizioniRESTConsumer;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +96,10 @@ public class PickingLiberoViewModel {
|
||||
//Cerco gli articoli presenti nell'ul dell'etichetta anonima
|
||||
this.executeEtichettaLU(barcodeScanDTO.getStringValue(), onComplete);
|
||||
|
||||
} else if (UtilityBarcode.isEtichettaPosizione(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta un collo in posizione mono ul
|
||||
this.executeEtichettaPosizione(barcodeScanDTO, onComplete);
|
||||
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi una UL)
|
||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||
@@ -97,11 +109,41 @@ public class PickingLiberoViewModel {
|
||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
|
||||
} else {
|
||||
//Cerco tramite ean13 un collo in posizione mono ul definita in anagrafica articolo, altrimenti se abilitato procedo con picking manuale
|
||||
this.loadArticolo(barcodeScanDTO.getStringValue(), null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaPosizione(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
|
||||
MtbDepoPosizione foundPosizione = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||
.filter(x -> x.getPosizione().equalsIgnoreCase(barcodeScanDTO.getStringValue()))
|
||||
.single();
|
||||
this.executePosizione(foundPosizione, null, onComplete);
|
||||
|
||||
}
|
||||
|
||||
private void executePosizione(MtbDepoPosizione posizione, MtbAart articolo, Runnable onComplete) {
|
||||
this.mPosizioniRESTConsumer.getBancaliInPosizione(posizione, mtbColtList -> {
|
||||
|
||||
if (mtbColtList == null || mtbColtList.size() == 0) {
|
||||
if (articolo != null) {
|
||||
this.dispatchArt(articolo, null);
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
}
|
||||
} else if (mtbColtList.size() == 1) {
|
||||
this.mColliMagazzinoRESTConsumer.getByTestata(mtbColtList.get(0), true, false, mtbColt -> {
|
||||
pickMerceULtoUL(mtbColt, articolo, onComplete);
|
||||
}, this::sendError);
|
||||
} else {
|
||||
this.sendError(new TooManyLUFoundInMonoLUPositionException());
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void executeEtichettaEanPeso(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
try {
|
||||
Ean13PesoModel ean13PesoModel = Ean13PesoModel.fromBarcode(barcodeScanDTO.getStringValue());
|
||||
@@ -164,10 +206,18 @@ public class PickingLiberoViewModel {
|
||||
}
|
||||
|
||||
mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
this.dispatchArt(mtbAartList.get(0), ean128Model);
|
||||
onComplete.run();
|
||||
MtbAart articolo = mtbAartList.get(0);
|
||||
MtbDepoPosizione posizione = UtilityPosizione.getFromCache(articolo.getPosizione());
|
||||
|
||||
if (posizione != null && posizione.isFlagMonoCollo()) {
|
||||
this.executePosizione(posizione, articolo, onComplete);
|
||||
} else if(mDefaultGestione == GestioneEnum.VENDITA){
|
||||
this.dispatchArt(articolo, ean128Model);
|
||||
onComplete.run();
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException());
|
||||
}
|
||||
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException());
|
||||
@@ -336,13 +386,16 @@ public class PickingLiberoViewModel {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void pickMerceULtoUL(MtbColt sourceMtbColt, Runnable onComplete) {
|
||||
pickMerceULtoUL(sourceMtbColt, null, onComplete);
|
||||
}
|
||||
|
||||
private void pickMerceULtoUL(MtbColt sourceMtbColt, MtbAart mtbAart, Runnable onComplete) {
|
||||
List<MtbColr> mtbColrsToPick = Stream.of(sourceMtbColt.getMtbColr())
|
||||
.filter(x -> UtilityBigDecimal.greaterThan(x.getQtaCol(), BigDecimal.ZERO))
|
||||
.toList();
|
||||
|
||||
this.sendArtSelectionRequest(mtbColrsToPick, pickedAarts -> {
|
||||
this.sendArtSelectionRequest(mtbColrsToPick, mtbAart, pickedAarts -> {
|
||||
List<MtbColr> destNewMtbColr = new ArrayList<>();
|
||||
|
||||
if (pickedAarts.size() > 0) {
|
||||
@@ -369,7 +422,7 @@ public class PickingLiberoViewModel {
|
||||
.setNumCollo(null)
|
||||
|
||||
.setDataColloRif(cloneMtbColr.getDataColloS())
|
||||
.setDataCollo(null)
|
||||
.setDataCollo((String) null)
|
||||
|
||||
.setPesoLordoKg(null)
|
||||
.setPesoNettoKg(null);
|
||||
@@ -480,46 +533,46 @@ public class PickingLiberoViewModel {
|
||||
new Thread(this::sendOnLoadingStarted).start();
|
||||
|
||||
|
||||
final MtbColr mtbColr = new MtbColr()
|
||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
.setPartitaMag(partitaMag)
|
||||
.setDataScadPartita(dataScad)
|
||||
.setQtaCol(qtaTot)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf)
|
||||
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
||||
final MtbColr mtbColr = new MtbColr()
|
||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
.setPartitaMag(partitaMag)
|
||||
.setDataScadPartita(dataScad)
|
||||
.setQtaCol(qtaTot)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf)
|
||||
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
||||
|
||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
|
||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||
|
||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
||||
|
||||
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
||||
this.sendOnLoadingEnded();
|
||||
return;
|
||||
}
|
||||
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
||||
this.sendOnLoadingEnded();
|
||||
return;
|
||||
}
|
||||
|
||||
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||
mtbColr
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setGestione(value.getGestione())
|
||||
.setSerCollo(value.getSerCollo())
|
||||
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||
mtbColr
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setGestione(value.getGestione())
|
||||
.setSerCollo(value.getSerCollo())
|
||||
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
if (shouldCloseLU) closeLU(null);
|
||||
}, this::sendError);
|
||||
if (shouldCloseLU) closeLU(null);
|
||||
}, this::sendError);
|
||||
|
||||
}
|
||||
|
||||
@@ -763,9 +816,9 @@ public class PickingLiberoViewModel {
|
||||
if (this.mListener != null) mListener.onLUClienteRequired(onComplete, onAbort);
|
||||
}
|
||||
|
||||
private void sendArtSelectionRequest(List<MtbColr> mtbColrsToPick, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
private void sendArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
if (this.mListener != null)
|
||||
mListener.onArtSelectionRequest(mtbColrsToPick, onComplete, onAbort);
|
||||
mListener.onArtSelectionRequest(mtbColrsToPick, mtbAart, onComplete, onAbort);
|
||||
}
|
||||
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
@@ -819,7 +872,7 @@ public class PickingLiberoViewModel {
|
||||
|
||||
void onLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort);
|
||||
|
||||
void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort);
|
||||
void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort);
|
||||
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
|
||||
@@ -33,6 +33,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.model.DocumentoResoDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
@@ -42,18 +43,18 @@ import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||
import it.integry.integrywmsnative.databinding.ActivityPickingResiBinding;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.rest.WithdrawableDtbDocr;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.ui.PickingResiListAdapter;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.ui.PickingResiListModel;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.rest.WithdrawableDtbDocr;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialog;
|
||||
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.note_aggiuntive_lu.NoteAggiuntiveLUDialog;
|
||||
|
||||
public class PickingResiActivity extends BaseActivity implements BottomSheetFragmentLUContentView.Listener, BottomSheetFragmentLUContentViewModel.Listener, PickingResiViewModel.Listener {
|
||||
|
||||
@@ -276,15 +277,15 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNoteAggiuntiveRequired(RunnableArgs<String> onComplete) {
|
||||
NoteAggiuntiveLUDialog.make(this, onComplete).show();
|
||||
public void onInfoAggiuntiveRequired(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
InfoAggiuntiveLUDialog.newInstance(onComplete).show(getSupportFragmentManager(), "InfoAggiuntiveLUDialog");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
this.closeProgress();
|
||||
|
||||
if(ex instanceof InvalidPesoKGException) {
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
@@ -401,7 +402,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,6 +28,7 @@ import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
@@ -161,11 +162,16 @@ public class PickingResiViewModel {
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
} else {
|
||||
this.sendOnNoteAggiuntiveRequired(noteAggiuntive -> {
|
||||
this.sendOnInfoAggiuntiveRequired((noteAggiuntive, tCol) -> {
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(noteAggiuntive)) {
|
||||
this.mCurrentMtbColt.setAnnotazioni(noteAggiuntive);
|
||||
}
|
||||
if (tCol != null) {
|
||||
this.mCurrentMtbColt.setCodTcol(tCol.getCodTcol());
|
||||
this.mCurrentMtbColt.setMtbTCol(tCol);
|
||||
|
||||
}
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
||||
|
||||
@@ -717,8 +723,8 @@ public class PickingResiViewModel {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
private void sendOnNoteAggiuntiveRequired(RunnableArgs<String> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onNoteAggiuntiveRequired(onComplete);
|
||||
private void sendOnInfoAggiuntiveRequired(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onInfoAggiuntiveRequired(onComplete);
|
||||
}
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
@@ -795,7 +801,7 @@ public class PickingResiViewModel {
|
||||
|
||||
public interface Listener extends ILUPrintListener, ILoadingListener, ILUBaseOperationsListener {
|
||||
|
||||
void onNoteAggiuntiveRequired(RunnableArgs<String> onComplete);
|
||||
void onInfoAggiuntiveRequired(RunnableArgss<String, MtbTCol> onComplete);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
||||
}.getType();
|
||||
systemRESTConsumer.<List<MtbColt>>processSql(mtbColtSql, mtbColtTypeOfObjectsList, mtbColtList -> {
|
||||
|
||||
if(mtbColtList == null) mtbColtList = new ArrayList<>();
|
||||
if (mtbColtList == null) mtbColtList = new ArrayList<>();
|
||||
|
||||
for (MtbColt mtbColt : mtbColtList) {
|
||||
|
||||
@@ -108,23 +108,21 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void importColloDaProduzione(ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
ProdRientroMerceOrderDetailRESTConsumerService service = RESTBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
||||
service.importColloDaProduzione(importColliDaProduzioneRequestDTO).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
|
||||
service.importColloDaProduzione(importColliDaProduzioneRequestDTO).enqueue(new Callback<ServiceRESTResponse<List<MtbColt>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||
public void onResponse(Call<ServiceRESTResponse<List<MtbColt>>> call, Response<ServiceRESTResponse<List<MtbColt>>> response) {
|
||||
analyzeAnswer(response, "importColliDaProduzione", mtbColt -> {
|
||||
onComplete.run(mtbColt);
|
||||
onComplete.run(mtbColt.get(0));
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
|
||||
public void onFailure(Call<ServiceRESTResponse<List<MtbColt>>> call, Throwable t) {
|
||||
Logger.e(t, "importColliDaProduzione");
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
@@ -140,7 +138,7 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
||||
analyzeAnswer(response, "deleteColloDaProduzione", mtbColt -> {
|
||||
onComplete.run();
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ public interface ProdRientroMerceOrderDetailRESTConsumerService {
|
||||
|
||||
|
||||
@POST("importColliDaProduzioneJson")
|
||||
Call<ServiceRESTResponse<MtbColt>> importColliDaProduzione(@Body List<ImportColliDaProduzioneRequestDTO> importColliDaProduzioneRequestDTO);
|
||||
Call<ServiceRESTResponse<List<MtbColt>>> importColliDaProduzione(@Body List<ImportColliDaProduzioneRequestDTO> importColliDaProduzioneRequestDTO);
|
||||
|
||||
@POST("importColloDaProduzioneJson")
|
||||
Call<ServiceRESTResponse<MtbColt>> importColloDaProduzione(@Body ImportColliDaProduzioneRequestDTO importColloDaProduzioneRequestDTO);
|
||||
Call<ServiceRESTResponse<List<MtbColt>>> importColloDaProduzione(@Body ImportColliDaProduzioneRequestDTO importColloDaProduzioneRequestDTO);
|
||||
|
||||
@POST("cancellaColloDaProduzione")
|
||||
Call<ServiceRESTResponse<Object>> deleteColloDaProduzione(@Body MtbColt mtbColtToDelete);
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.rettifica_giacenze;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
@@ -95,15 +96,21 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_rettifica_giacenze, container, false);
|
||||
|
||||
MainApplication.appComponent
|
||||
.rettificaGiacenzeComponent()
|
||||
.create()
|
||||
@@ -126,7 +133,6 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
|
||||
private void initVars() {
|
||||
thereIsAnOpenedUL.addOnPropertyChangedCallback(() -> {
|
||||
thereIsntAnOpenedUL.set(!thereIsAnOpenedUL.get());
|
||||
|
||||
@@ -776,34 +776,34 @@ public class SpedizioneViewModel {
|
||||
|
||||
List<MtbPartitaMag> availableBatchLots = Stream.of(scannedMtbColrs)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) && (
|
||||
x.getPartitaMag() == null ||
|
||||
x.getPartitaMag() == null ||
|
||||
UtilityString.isNullOrEmpty(x.getMtbPartitaMag().getDataScadS()) ||
|
||||
UtilityDate.getDateInstance().before(x.getMtbPartitaMag().getDataScadD())
|
||||
))
|
||||
))
|
||||
.distinctBy(MtbColr::getPartitaMag)
|
||||
.map(x -> x.getPartitaMag() == null ? new MtbPartitaMag().setCodMart(x.getMtbAart().getCodMart()) : x.getMtbPartitaMag())
|
||||
.toList();
|
||||
|
||||
//Controllo se una delle partite combacia con quella che voglio evadere
|
||||
if(refMtbColr != null && refMtbColr.getMtbPartitaMag() != null) {
|
||||
if (refMtbColr != null && refMtbColr.getMtbPartitaMag() != null) {
|
||||
MtbPartitaMag refMtbPartitaMag = refMtbColr.getMtbPartitaMag();
|
||||
|
||||
Optional<MtbPartitaMag> matchPartitaMag = Stream.of(availableBatchLots)
|
||||
.filter(availableBatchLot -> refMtbPartitaMag.getPartitaMag().equalsIgnoreCase(availableBatchLot.getPartitaMag()))
|
||||
.findFirst();
|
||||
|
||||
if(matchPartitaMag.isPresent()) {
|
||||
if (matchPartitaMag.isPresent()) {
|
||||
availableBatchLots.clear();
|
||||
availableBatchLots.add(refMtbPartitaMag);
|
||||
}
|
||||
}
|
||||
|
||||
if(availableBatchLots.size() > 1) {
|
||||
if (availableBatchLots.size() > 1) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
List<MtbPartitaMag> tmp = new ArrayList<>();
|
||||
|
||||
if(Stream.of(availableBatchLots).anyMatch(x -> !UtilityString.isNullOrEmpty(x.getDataScadS()))) {
|
||||
if (Stream.of(availableBatchLots).anyMatch(x -> !UtilityString.isNullOrEmpty(x.getDataScadS()))) {
|
||||
tmp.addAll(
|
||||
Stream.of(availableBatchLots)
|
||||
.filter(x -> !UtilityString.isNullOrEmpty(x.getDataScadS()) && UtilityDate.getDateInstance().before(x.getDataScadD()))
|
||||
@@ -811,7 +811,7 @@ public class SpedizioneViewModel {
|
||||
.toList());
|
||||
}
|
||||
|
||||
if(Stream.of(availableBatchLots).anyMatch(x -> UtilityString.isNullOrEmpty(x.getDataScadS()))) {
|
||||
if (Stream.of(availableBatchLots).anyMatch(x -> UtilityString.isNullOrEmpty(x.getDataScadS()))) {
|
||||
tmp.addAll(
|
||||
Stream.of(availableBatchLots)
|
||||
.filter(x -> UtilityString.isNullOrEmpty(x.getDataScadS()))
|
||||
@@ -822,7 +822,7 @@ public class SpedizioneViewModel {
|
||||
this.sendBatchLotSelectionRequest(tmp, selected -> {
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
if(selected != null) {
|
||||
if (selected != null) {
|
||||
MtbColr scannedMtbColr = Stream.of(pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr())
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) &&
|
||||
((x.getPartitaMag() != null && selected.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(selected.getPartitaMag())) ||
|
||||
@@ -897,7 +897,7 @@ public class SpedizioneViewModel {
|
||||
// }
|
||||
|
||||
|
||||
if(refMtbColr != null) {
|
||||
if (refMtbColr != null) {
|
||||
if (pickingObjectDTO.getMtbAart().isFlagQtaCnfFissaBoolean()) {
|
||||
if (UtilityBigDecimal.equalsOrLowerThan(refMtbColr.getQtaCol(), qtaDaEvadere)) {
|
||||
numCnfDaPrelevare = refMtbColr.getNumCnf();
|
||||
@@ -1456,7 +1456,7 @@ public class SpedizioneViewModel {
|
||||
refMtbColt.getMtbColr().size() > 0 ?
|
||||
refMtbColt.getMtbColr().get(0) : null;
|
||||
|
||||
if(originalRefMtbColr != null) {
|
||||
if (originalRefMtbColr != null) {
|
||||
refMtbColr.setId(originalRefMtbColr.getId());
|
||||
}
|
||||
|
||||
@@ -1695,7 +1695,7 @@ public class SpedizioneViewModel {
|
||||
.setRiga(null)
|
||||
.setNumCollo(null)
|
||||
.setGestione((String) null)
|
||||
.setDataCollo(null)
|
||||
.setDataCollo((String) null)
|
||||
.setSerCollo(null)
|
||||
.setCausale(MtbColr.Causale.VERSAMENTO);
|
||||
|
||||
@@ -1721,7 +1721,7 @@ public class SpedizioneViewModel {
|
||||
if (!shouldPrint) {
|
||||
onComplete.run();
|
||||
} else {
|
||||
cyclicPrint(PrinterRESTConsumer.Type.PRIMARIA, mtbColtsToPrint.iterator(), onComplete, ex -> this.sendLUPrintError(ex, onComplete));
|
||||
cyclicPrint(PrinterRESTConsumer.Type.PRIMARIA, mtbColtsToPrint.iterator(), onComplete, ex -> this.sendLUPrintError(ex, onComplete));
|
||||
|
||||
}
|
||||
|
||||
@@ -1762,10 +1762,12 @@ public class SpedizioneViewModel {
|
||||
.filter(x -> !this.mColliRegistrati.contains(x))
|
||||
.forEach(x -> this.mColliRegistrati.add(x));
|
||||
|
||||
for (MtbColt mtbColt : mtbColtList) {
|
||||
Stream.of(mTestateOrdini)
|
||||
.filter(x -> x.getNumOrd().equals(mtbColt.getNumOrd()) && x.getDataOrdD().equals(mtbColt.getDataOrdD()) && x.getGestioneEnum() == mtbColt.getGestioneEnum())
|
||||
.forEach(x -> x.setExistColloBoolean(true));
|
||||
if (mTestateOrdini != null) {
|
||||
for (MtbColt mtbColt : mtbColtList) {
|
||||
Stream.of(mTestateOrdini)
|
||||
.filter(x -> x.getNumOrd().equals(mtbColt.getNumOrd()) && x.getDataOrdD().equals(mtbColt.getDataOrdD()) && x.getGestioneEnum() == mtbColt.getGestioneEnum())
|
||||
.forEach(x -> x.setExistColloBoolean(true));
|
||||
}
|
||||
}
|
||||
|
||||
if (mMtbColtSessionID != null)
|
||||
|
||||
@@ -79,7 +79,7 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
var mtbColt = mViewModel.getObservableMtbColt().get();
|
||||
|
||||
if(mtbColt != null) {
|
||||
if (mtbColt != null) {
|
||||
initAdapter();
|
||||
|
||||
onMtbColrItemChanged();
|
||||
@@ -101,6 +101,7 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
||||
List<MtbColr> mtbColrs = mViewModel.getObservableMtbColt().get().getMtbColr();
|
||||
mBinding.textviewArtCounter.setText(String.valueOf(mtbColrs.size()));
|
||||
mBinding.textviewArtDescription.setText(mContext.getResources().getQuantityString(R.plurals.articles, mtbColrs.size()));
|
||||
mViewModel.calcPesi();
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentView setListener(Listener listener) {
|
||||
@@ -131,12 +132,12 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
||||
|
||||
@Override
|
||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||
if(mListener != null) this.mListener.onMtbColrEdit(mtbColr);
|
||||
if (mListener != null) this.mListener.onMtbColrEdit(mtbColr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||
if(mListener != null) this.mListener.onMtbColrDelete(mtbColr);
|
||||
if (mListener != null) this.mListener.onMtbColrDelete(mtbColr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,16 +2,24 @@ package it.integry.integrywmsnative.view.bottom_sheet__lu_content;
|
||||
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
|
||||
public class BottomSheetFragmentLUContentViewModel {
|
||||
|
||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||
public ObservableField<String> pesoKg = new ObservableField<>();
|
||||
public ObservableField<String> pesoNettoKg = new ObservableField<>();
|
||||
private Listener mListener;
|
||||
private MtbColrListener mMtbColrListener;
|
||||
|
||||
public void closeCurrentLU() {
|
||||
if(this.mListener != null) this.mListener.onBottomSheetLUClose();
|
||||
if (this.mListener != null) this.mListener.onBottomSheetLUClose();
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentViewModel setMtbColt(MtbColt mtbColt) {
|
||||
@@ -33,6 +41,26 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void calcPesi() {
|
||||
MtbColt collo = this.mtbColt.get();
|
||||
if (collo != null) {
|
||||
MtbTCol tipoPedana = collo.getMtbTCol();
|
||||
BigDecimal taraPedana = tipoPedana != null ? tipoPedana.getTaraKg() : BigDecimal.ZERO;
|
||||
BigDecimal pesoNetto = BigDecimal.ZERO;
|
||||
for (MtbColr mtbColr : collo.getMtbColr()) {
|
||||
MtbAart articolo = mtbColr.getMtbAart();
|
||||
if (articolo != null) {
|
||||
BigDecimal pesoRiga = articolo.isFlagQtaCnfFissaBoolean() ? mtbColr.getNumCnf().multiply(articolo.getPesoKg()) : mtbColr.getQtaCol();
|
||||
BigDecimal pesoTara = articolo.getTaraKg().multiply(mtbColr.getNumCnf());
|
||||
pesoRiga = pesoRiga.add(pesoTara);
|
||||
pesoNetto = pesoNetto.add(pesoRiga);
|
||||
}
|
||||
}
|
||||
this.pesoNettoKg.set(pesoNetto.setScale(2, RoundingMode.CEILING).toString());
|
||||
this.pesoKg.set(pesoNetto.add(taraPedana).setScale(2, RoundingMode.CEILING).toString());
|
||||
}
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onBottomSheetLUClose();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative.view.dialogs.base;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -12,6 +11,7 @@ import androidx.databinding.DataBindingUtil;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputGeneralBinding;
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ import it.integry.integrywmsnative.databinding.DialogInputGeneralBinding;
|
||||
public class DialogSimpleInputHelper {
|
||||
|
||||
|
||||
private static Dialog makeBase(Context mContext, String titleText, String valueText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick){
|
||||
private static Dialog makeBase(Context mContext, String titleText, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick){
|
||||
Dialog dialog = new Dialog(mContext);
|
||||
DialogSimpleInputViewModel viewModel = new DialogSimpleInputViewModel(dialog);
|
||||
|
||||
@@ -39,10 +39,14 @@ public class DialogSimpleInputHelper {
|
||||
|
||||
//Title VIEW
|
||||
mBinding.titleText.setText(titleText);
|
||||
if (valueText != null){
|
||||
mBinding.generalInput.setText(valueText);
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(hintText)){
|
||||
mBinding.generalInput.setHint(hintText);
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(defaultTextValue)){
|
||||
mBinding.generalInput.setText(defaultTextValue);
|
||||
}
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(Color.WHITE);
|
||||
|
||||
//Content View
|
||||
dialog.setCancelable(true);
|
||||
@@ -60,17 +64,19 @@ public class DialogSimpleInputHelper {
|
||||
return makeBase(mContext,
|
||||
title,
|
||||
null,
|
||||
null,
|
||||
onPositiveClick,
|
||||
onNegativeClick);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static Dialog makeInputDialog(Context mContext, String title,String value, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick){
|
||||
public static Dialog makeInputDialog(Context mContext, String title, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick){
|
||||
|
||||
return makeBase(mContext,
|
||||
title,
|
||||
value,
|
||||
defaultTextValue,
|
||||
hintText,
|
||||
onPositiveClick,
|
||||
onNegativeClick);
|
||||
|
||||
|
||||
@@ -62,11 +62,23 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
private final List<DialogChooseArtsFromListaArtsItemModel> mDataset;
|
||||
|
||||
private int mBarcodeScannerIstanceID;
|
||||
private Dialog mCurrentProgress;
|
||||
private MtbAart selectedArt;
|
||||
|
||||
public static DialogChooseArtsFromListaArts newInstance(List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||
return new DialogChooseArtsFromListaArts(listaMtbColr, onItemsChoosed, onAbort);
|
||||
}
|
||||
|
||||
public static DialogChooseArtsFromListaArts newInstance(List<MtbColr> listaMtbColr, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||
DialogChooseArtsFromListaArts dialog = newInstance(listaMtbColr, onItemsChoosed, onAbort);
|
||||
dialog.setSelectedArt(mtbAart);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public void setSelectedArt(MtbAart mtbAart) {
|
||||
this.selectedArt = mtbAart;
|
||||
}
|
||||
|
||||
private DialogChooseArtsFromListaArts(List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||
super();
|
||||
|
||||
@@ -125,6 +137,14 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
if (selectedArt != null) {
|
||||
this.loadArticolo(selectedArt.getBarCode(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
mBindings.listaArts.setNestedScrollingEnabled(false);
|
||||
@@ -229,8 +249,6 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
@@ -242,14 +260,15 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(context);
|
||||
openProgress();
|
||||
|
||||
|
||||
if (UtilityBarcode.isEan13(data)) {
|
||||
this.loadArticolo(data.getStringValue(), null, progressDialog);
|
||||
this.loadArticolo(data.getStringValue(), null);
|
||||
} else if (UtilityBarcode.isEtichetta128(data)) {
|
||||
this.executeEtichettaEan128(data, progressDialog);
|
||||
this.executeEtichettaEan128(data);
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
@@ -257,7 +276,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
};
|
||||
|
||||
|
||||
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, Dialog progressDialog) {
|
||||
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO) {
|
||||
this.barcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||
|
||||
String barcodeProd = null;
|
||||
@@ -271,11 +290,11 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin) || !UtilityString.isNullOrEmpty(ean128Model.Content)) {
|
||||
this.loadArticolo(barcodeProd, ean128Model, progressDialog);
|
||||
this.loadArticolo(barcodeProd, ean128Model);
|
||||
} else {
|
||||
DialogCommon.showNoArtFoundDialog(context, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
closeProgress();
|
||||
});
|
||||
|
||||
}
|
||||
@@ -285,18 +304,19 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
DialogCommon.showNoArtFoundDialog(context, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
closeProgress();
|
||||
});
|
||||
|
||||
}
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(context, ex, progressDialog);
|
||||
closeProgress();
|
||||
UtilityExceptions.defaultException(context, ex);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Dialog progressDialog) {
|
||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
@@ -310,19 +330,20 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
this.searchArtInList(mtbAartList.get(0), ean128Model);
|
||||
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
closeProgress();
|
||||
|
||||
} else {
|
||||
|
||||
DialogCommon.showNoArtFoundDialog(context, () -> {
|
||||
BarcodeManager.enable();
|
||||
progressDialog.dismiss();
|
||||
closeProgress();
|
||||
});
|
||||
}
|
||||
|
||||
}, ex -> {
|
||||
closeProgress();
|
||||
BarcodeManager.enable();
|
||||
UtilityExceptions.defaultException(context, ex, progressDialog);
|
||||
UtilityExceptions.defaultException(context, ex);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -364,5 +385,20 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
protected void openProgress() {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
if (this.mCurrentProgress == null) {
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void closeProgress() {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
if (mCurrentProgress != null) {
|
||||
mCurrentProgress.dismiss();
|
||||
mCurrentProgress = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.AdapterView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||
import it.integry.integrywmsnative.databinding.DialogNoteAggiuntiveNuovaUlBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLUProdTipoColloAdapter;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLUProdTipoColloListModel;
|
||||
|
||||
public class InfoAggiuntiveLUDialog extends BaseDialogFragment implements InfoAggiuntiveLUDialogViewModel.Listener {
|
||||
|
||||
@Inject
|
||||
InfoAggiuntiveLUDialogViewModel mViewModel;
|
||||
|
||||
private DialogNoteAggiuntiveNuovaUlBinding mBindings;
|
||||
private final RunnableArgss<String, MtbTCol> mOnComplete;
|
||||
|
||||
private DialogInputLUProdTipoColloAdapter codTcolArrayAdapter = null;
|
||||
public ObservableField<String> additionalNotes = new ObservableField<>();
|
||||
public ObservableField<String> selectedMtbTcol = new ObservableField<>();
|
||||
public ObservableField<DialogInputLUProdTipoColloListModel> currentMtbTCol = new ObservableField<>();
|
||||
|
||||
public static InfoAggiuntiveLUDialog newInstance(@NotNull RunnableArgss<String, MtbTCol> onComplete) {
|
||||
return new InfoAggiuntiveLUDialog(onComplete);
|
||||
}
|
||||
|
||||
private InfoAggiuntiveLUDialog(@NotNull RunnableArgss<String, MtbTCol> onComplete) {
|
||||
super();
|
||||
this.mOnComplete = onComplete;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
this.init();
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(requireActivity(), this);
|
||||
this.mViewModel.setListener(this);
|
||||
this.mViewModel.init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_note_aggiuntive_nuova_ul, container, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
MainApplication.appComponent
|
||||
.infoAggiuntiveLUDialogComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
mBindings.setView(this);
|
||||
mBindings.setViewModel(this.mViewModel);
|
||||
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
getDialog().setCancelable(false);
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
if (mOnComplete != null)
|
||||
mOnComplete.run(additionalNotes.get(), mViewModel.getInternalTipoPed());
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.selectedMtbTcol, (value) -> {
|
||||
if (this.codTcolArrayAdapter != null && this.codTcolArrayAdapter.getDataset() != null) {
|
||||
Optional<DialogInputLUProdTipoColloListModel> selectedItem = Stream.of(this.codTcolArrayAdapter.getDataset())
|
||||
.filter(x -> x.toString().equals(value))
|
||||
.findFirst();
|
||||
|
||||
if (selectedItem.isPresent()) {
|
||||
currentMtbTCol.set(selectedItem.get());
|
||||
this.mViewModel.setInternalTipoPed(selectedItem.get().getOriginalModel());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.mViewModel.getTipiCollo().observe(getViewLifecycleOwner(), tipiCollo -> {
|
||||
|
||||
codTcolArrayAdapter = new DialogInputLUProdTipoColloAdapter(getActivity(), R.layout.array_adapter_single_item, tipiCollo);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
});
|
||||
|
||||
this.mBindings.filledExposedDropdownCodTcol.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
currentMtbTCol.set(codTcolArrayAdapter.getItem(i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
currentMtbTCol.set(null);
|
||||
}
|
||||
});
|
||||
|
||||
mBindings.buttonConfirm.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface InfoAggiuntiveLUDialogComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
InfoAggiuntiveLUDialogComponent create();
|
||||
}
|
||||
|
||||
void inject(InfoAggiuntiveLUDialog infoAggiuntiveLUDialog);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
|
||||
@Module(subcomponents = InfoAggiuntiveLUDialogComponent.class)
|
||||
public class InfoAggiuntiveLUDialogModule {
|
||||
|
||||
@Provides
|
||||
InfoAggiuntiveLUDialogViewModel providesInfoAggiuntiveLUDialogViewModel(MagazzinoRESTConsumer magazzinoRESTConsumer) {
|
||||
return new InfoAggiuntiveLUDialogViewModel(magazzinoRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
|
||||
public class InfoAggiuntiveLUDialogViewModel {
|
||||
|
||||
public final MutableLiveData<List<MtbTCol>> tipiCollo = new MutableLiveData<>();
|
||||
|
||||
private MtbTCol internalTipoPed;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
private final MagazzinoRESTConsumer mMagazzinoRESTConsumer;
|
||||
|
||||
@Inject
|
||||
public InfoAggiuntiveLUDialogViewModel(MagazzinoRESTConsumer magazzinoRESTConsumer) {
|
||||
this.mMagazzinoRESTConsumer = magazzinoRESTConsumer;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
new Thread(this::sendOnLoadingStarted).start();
|
||||
|
||||
mMagazzinoRESTConsumer.getTipiCollo(tipiCollo -> {
|
||||
this.tipiCollo.postValue(tipiCollo);
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public MutableLiveData<List<MtbTCol>> getTipiCollo() {
|
||||
return this.tipiCollo;
|
||||
}
|
||||
|
||||
|
||||
public void setInternalTipoPed(MtbTCol internalTipoPed) {
|
||||
this.internalTipoPed = internalTipoPed;
|
||||
}
|
||||
|
||||
|
||||
public MtbTCol getInternalTipoPed() {
|
||||
return internalTipoPed;
|
||||
}
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
if (this.mListener != null) mListener.onLoadingStarted();
|
||||
}
|
||||
|
||||
private void sendOnLoadingEnded() {
|
||||
if (this.mListener != null) mListener.onLoadingEnded();
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
public void setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
|
||||
void onError(Exception ex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -100,7 +100,6 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -154,12 +153,12 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.selectedMtbTcol, (value) -> {
|
||||
if(this.codTcolArrayAdapter != null && this.codTcolArrayAdapter.getDataset() != null) {
|
||||
if (this.codTcolArrayAdapter != null && this.codTcolArrayAdapter.getDataset() != null) {
|
||||
Optional<DialogInputLUProdTipoColloListModel> selectedItem = Stream.of(this.codTcolArrayAdapter.getDataset())
|
||||
.filter(x -> x.toString().equals(value))
|
||||
.findFirst();
|
||||
|
||||
if(selectedItem.isPresent()) {
|
||||
if (selectedItem.isPresent()) {
|
||||
currentMtbTCol.set(selectedItem.get());
|
||||
this.mViewModel.setInternalTipoPed(selectedItem.get().getOriginalModel());
|
||||
}
|
||||
@@ -171,12 +170,12 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.selectedLineaProd, (value) -> {
|
||||
if(this.lineeProdArrayAdapter != null && this.lineeProdArrayAdapter.getDataset() != null) {
|
||||
if (this.lineeProdArrayAdapter != null && this.lineeProdArrayAdapter.getDataset() != null) {
|
||||
Optional<DialogInputLULineeProdListModel> selectedItem = Stream.of(this.lineeProdArrayAdapter.getDataset())
|
||||
.filter(x -> x.toString().equals(value))
|
||||
.findFirst();
|
||||
|
||||
if(selectedItem.isPresent()) {
|
||||
if (selectedItem.isPresent()) {
|
||||
currentLineaProd.set(selectedItem.get());
|
||||
this.mViewModel.setInternalLineaProd(selectedItem.get().getOriginalModel());
|
||||
}
|
||||
@@ -196,7 +195,7 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentPesoNetto, (value) -> {
|
||||
if(value != null) {
|
||||
if (value != null) {
|
||||
this.currentPesoNetto.set(value.setScale(0, RoundingMode.HALF_UP));
|
||||
}
|
||||
if (this.mEnableDataCallback) {
|
||||
@@ -217,7 +216,7 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentPesoLordo, (value) -> {
|
||||
if(value != null) {
|
||||
if (value != null) {
|
||||
this.currentPesoLordo.set(value.setScale(0, RoundingMode.HALF_UP));
|
||||
}
|
||||
if (this.mEnableDataCallback) {
|
||||
@@ -322,12 +321,12 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
codTcolArrayAdapter = new DialogInputLUProdTipoColloAdapter(getActivity(), R.layout.array_adapter_single_item, tipiCollo);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
if(mDialogInputLUProdDTO.getCodTcol() != null) {
|
||||
if (mDialogInputLUProdDTO.getCodTcol() != null) {
|
||||
Optional<MtbTCol> optTCol = Stream.of(tipiCollo)
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(mDialogInputLUProdDTO.getCodTcol()))
|
||||
.findFirst();
|
||||
|
||||
if(optTCol.isPresent())
|
||||
if (optTCol.isPresent())
|
||||
selectedMtbTcol.set(new DialogInputLUProdTipoColloListModel().setOriginalModel(optTCol.get()).toString());
|
||||
}
|
||||
|
||||
@@ -341,12 +340,12 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
lineeProdArrayAdapter = new DialogInputLULineeProdAdapter(getActivity(), R.layout.array_adapter_single_item, lineeProd);
|
||||
mBindings.filledExposedDropdownCodJfas.setAdapter(lineeProdArrayAdapter);
|
||||
|
||||
if(mDialogInputLUProdDTO.getSuggestedCodJfas() != null) {
|
||||
if (mDialogInputLUProdDTO.getSuggestedCodJfas() != null) {
|
||||
Optional<JtbFasi> optFas = Stream.of(lineeProd)
|
||||
.filter(x -> x.getCodJfas().equalsIgnoreCase(mDialogInputLUProdDTO.getSuggestedCodJfas()))
|
||||
.findFirst();
|
||||
|
||||
if(optFas.isPresent())
|
||||
if (optFas.isPresent())
|
||||
selectedLineaProd.set(new DialogInputLULineeProdListModel().setOriginalModel(optFas.get()).toString());
|
||||
}
|
||||
});
|
||||
@@ -372,9 +371,6 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void resetValues() {
|
||||
this.mViewModel.blockedNumCnf.set(false);
|
||||
this.mViewModel.blockedPesoLordo.set(false);
|
||||
|
||||
@@ -31,6 +31,7 @@ public class DialogInputQuantityV2DTO {
|
||||
private boolean isDataScadMandatory = false;
|
||||
private boolean isNotesAllowed = false;
|
||||
private boolean canLUBeClosed;
|
||||
private boolean saveOnImeDone = false;
|
||||
|
||||
private String partitaMag;
|
||||
private String note;
|
||||
@@ -236,4 +237,13 @@ public class DialogInputQuantityV2DTO {
|
||||
this.suggestPartitaMag = suggestPartitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSaveOnImeDone() {
|
||||
return saveOnImeDone;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setSaveOnImeDone(boolean saveOnImeDone) {
|
||||
this.saveOnImeDone = saveOnImeDone;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@ package it.integry.integrywmsnative.view.dialogs.input_quantity_v2;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.InputType;
|
||||
@@ -12,6 +10,7 @@ import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -27,6 +26,7 @@ import com.pedromassango.doubleclick.DoubleClickListener;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -39,6 +39,7 @@ 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.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
@@ -51,9 +52,12 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
@Inject
|
||||
DialogInputQuantityV2ViewModel mViewModel;
|
||||
|
||||
private DialogInputQuantityV2DTO mDialogInputQuantityV2DTO;
|
||||
private RunnableArgss<DialogInputQuantityV2ResultDTO, Boolean> mOnComplete;
|
||||
private Runnable mOnAbort;
|
||||
private final DialogInputQuantityV2DTO mDialogInputQuantityV2DTO;
|
||||
private final RunnableArgss<DialogInputQuantityV2ResultDTO, Boolean> mOnComplete;
|
||||
private final Runnable mOnAbort;
|
||||
|
||||
public ObservableField<Integer> currentTextNumCnfToTake = new ObservableField<>(0);
|
||||
public ObservableField<Integer> currentTextNumPezziToTake = new ObservableField<>(0);
|
||||
|
||||
public ObservableField<String> currentPartitaMag = new ObservableField<>();
|
||||
public ObservableField<String> currentNotes = new ObservableField<>();
|
||||
@@ -63,9 +67,14 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public ObservableField<BigDecimal> currentQtaCnf = new ObservableField<>();
|
||||
public ObservableField<BigDecimal> currentQtaTot = new ObservableField<>();
|
||||
|
||||
public ObservableField<BigDecimal> currentTaraTot = new ObservableField<>();
|
||||
public ObservableField<BigDecimal> currentTaraArticolo = new ObservableField<>();
|
||||
public ObservableField<BigDecimal> currentPesoLordo = new ObservableField<>();
|
||||
|
||||
public ObservableField<Boolean> enabledNumCnf = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledQtaCnf = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledQtaTot = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledPesoLordo = new ObservableField<>(false);
|
||||
|
||||
public ObservableField<Boolean> enabledChangePartitaMag = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledNotes = new ObservableField<>(false);
|
||||
@@ -94,7 +103,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setStyle(DialogFragment.STYLE_NORMAL, R.style.AppTheme_NewMaterial_Dialog_FullscreenDialog);
|
||||
|
||||
this.initBarcode();
|
||||
}
|
||||
|
||||
@@ -105,7 +113,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_input_quantity_v2, container, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
mBindings.toolbar.setTitle("Inserimento articolo");
|
||||
|
||||
MainApplication.appComponent
|
||||
@@ -141,7 +148,17 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
||||
}
|
||||
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
if (mDialogInputQuantityV2DTO.isSaveOnImeDone()) {
|
||||
|
||||
mBindings.inputNumCnfText.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
save();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@@ -194,21 +211,41 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentPartitaMag, (value) -> {
|
||||
if (this.mEnableDataCallback) {
|
||||
this.mViewModel.setPartitaMag(value);
|
||||
}
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentNotes, (value) -> {
|
||||
UtilityObservable.addPropertyChanged(this.currentDataScad, (value) -> {
|
||||
if (this.mEnableDataCallback) {
|
||||
this.mViewModel.setNote(value);
|
||||
MtbAart mtbAart = this.mViewModel.getMtbAart();
|
||||
if (value != null && mtbAart != null && mtbAart.getGgScadPartita() != null && mtbAart.getGgScadPartita() > 0) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, mtbAart.getGgScadPartita());
|
||||
Date minDataScad = calendar.getTime();
|
||||
if (minDataScad.after(value) && value.after(new Date())) {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString("La data selezionata è precedente alla data di scadenza consigliata per l'articolo scelto ( " + mtbAart.getGgScadPartita() + " giorni) . Continuare?"), null, () -> {
|
||||
this.mViewModel.setDataScad(value);
|
||||
}, () -> {
|
||||
this.currentDataScad.set(null);
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
} else {
|
||||
this.mViewModel.setDataScad(value);
|
||||
}
|
||||
} else {
|
||||
this.mViewModel.setDataScad(value);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentDataScad, (value) -> {
|
||||
UtilityObservable.addPropertyChanged(this.currentNotes, (value) -> {
|
||||
if (this.mEnableDataCallback) {
|
||||
this.mViewModel.setDataScad(value);
|
||||
this.mViewModel.setNote(value);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -339,6 +376,18 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.mViewModel.shouldAskDataScad = this.mDialogInputQuantityV2DTO.isDataScadMandatory();
|
||||
this.enabledNotes.set(this.mDialogInputQuantityV2DTO.isNotesAllowed());
|
||||
this.enabledLUCloseButton.set(this.mDialogInputQuantityV2DTO.isCanLUBeClosed());
|
||||
this.currentTaraArticolo.set(this.mViewModel.getMtbAart().getTaraKg());
|
||||
|
||||
if (this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd() != null && !this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().equals(BigDecimal.ZERO) && !(this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue() == 0)) {
|
||||
this.currentTextNumCnfToTake.set(this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue());
|
||||
int qtaText = this.mDialogInputQuantityV2DTO.getTotalQtaOrd().intValue() % this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue();
|
||||
this.currentTextNumPezziToTake.set(qtaText);
|
||||
} else {
|
||||
this.currentTextNumCnfToTake.set(0);
|
||||
this.currentTextNumPezziToTake.set(0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -364,11 +413,17 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.currentPartitaMag.set(this.mViewModel.getPartitaMag());
|
||||
this.currentNotes.set(this.mViewModel.getNote());
|
||||
this.currentDataScad.set(this.mViewModel.getDataScad());
|
||||
|
||||
this.currentNumCnf.set(this.mViewModel.getNumCnf());
|
||||
this.currentQtaCnf.set(this.mViewModel.getQtaCnf());
|
||||
this.currentQtaTot.set(this.mViewModel.getQtaTot());
|
||||
|
||||
MtbAart articolo = this.mViewModel.getMtbAart();
|
||||
if (articolo != null && !articolo.isFlagQtaCnfFissaBoolean()) {
|
||||
BigDecimal taraTot = this.mViewModel.getNumCnf().multiply(articolo.getTaraKg());
|
||||
this.currentTaraTot.set(taraTot);
|
||||
this.currentPesoLordo.set(this.mViewModel.getQtaTot().add(taraTot));
|
||||
}
|
||||
|
||||
this.mBindings.executePendingBindings();
|
||||
|
||||
this.mEnableDataCallback = true;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
private String internalNote;
|
||||
private Date internalDataScad;
|
||||
|
||||
private RunnableArgsWithReturn<DialogInputQuantityV2ViewModel,String> suggestPartitaMagRunnable;
|
||||
private RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> suggestPartitaMagRunnable;
|
||||
|
||||
private boolean canOverflowOrderQuantity;
|
||||
private boolean canPartitaMagBeChanged;
|
||||
@@ -102,7 +102,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.internalQtaTot = totalQtaOrd;
|
||||
}
|
||||
|
||||
if (this.shouldAskDataScad == null){
|
||||
if (this.shouldAskDataScad == null) {
|
||||
this.shouldAskDataScad = mtbAart.get().isFlagTracciabilitaBoolean() && mtbAart.get().getGgScadPartita() != null && mtbAart.get().getGgScadPartita() > 0;
|
||||
}
|
||||
this.shouldShowDataScad = this.shouldAskDataScad || this.internalDataScad != null;
|
||||
@@ -151,7 +151,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
if(canPartitaMagBeChanged) {
|
||||
if (canPartitaMagBeChanged) {
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||
this.setPartitaMag(ean128Model.BatchLot);
|
||||
@@ -334,10 +334,11 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
|
||||
break;
|
||||
|
||||
case UPDATE_QTA_TOT:if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
|
||||
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
|
||||
else if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null)
|
||||
this.internalQtaCnf = UtilityBigDecimal.divide(internalQtaTot, newValue);
|
||||
case UPDATE_QTA_TOT:
|
||||
if (!this.blockedQtaTot.get() && this.internalQtaCnf != null)
|
||||
this.internalQtaTot = UtilityBigDecimal.multiply(newValue, this.internalQtaCnf);
|
||||
else if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalQtaTot != null)
|
||||
this.internalQtaCnf = UtilityBigDecimal.divide(internalQtaTot, newValue);
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -403,13 +404,13 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return false;
|
||||
|
||||
} else if (mtbAart.get().isFlagTracciabilitaBoolean() && UtilityString.isNullOrEmpty(internalPartitaMag)) {
|
||||
if (suggestPartitaMagRunnable != null){
|
||||
if (suggestPartitaMagRunnable != null) {
|
||||
internalPartitaMag = suggestPartitaMagRunnable.run(this);
|
||||
if (internalPartitaMag == null){
|
||||
if (internalPartitaMag == null) {
|
||||
this.mListener.onError(new InvalidBatchLotException());
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
this.mListener.onError(new InvalidBatchLotException());
|
||||
return false;
|
||||
}
|
||||
@@ -480,11 +481,16 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setSuggestPartitaMagRunnable(RunnableArgsWithReturn<DialogInputQuantityV2ViewModel,String> suggestPartitaMagRunnable) {
|
||||
public DialogInputQuantityV2ViewModel setSuggestPartitaMagRunnable(RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> suggestPartitaMagRunnable) {
|
||||
this.suggestPartitaMagRunnable = suggestPartitaMagRunnable;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public MtbAart getMtbAart() {
|
||||
return this.mtbAart.get();
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onDataChanged();
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.note_aggiuntive_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.databinding.DialogNoteAggiuntiveNuovaUlBinding;
|
||||
|
||||
public class NoteAggiuntiveLUDialog {
|
||||
|
||||
private Dialog mDialog;
|
||||
|
||||
public static Dialog make(Context context, final RunnableArgs<String> onComplete) {
|
||||
return new NoteAggiuntiveLUDialog(context, onComplete).mDialog;
|
||||
}
|
||||
|
||||
private NoteAggiuntiveLUDialog(Context context, final RunnableArgs<String> onComplete){
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
DialogNoteAggiuntiveNuovaUlBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_note_aggiuntive_nuova_ul, null, false);
|
||||
|
||||
|
||||
mDialog = new Dialog(context);
|
||||
mDialog.setContentView(bindings.getRoot());
|
||||
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.setCancelable(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(context, mDialog);
|
||||
|
||||
|
||||
bindings.buttonConfirm.setOnClickListener(v -> {
|
||||
mDialog.dismiss();
|
||||
if(onComplete != null) onComplete.run(bindings.additionalNotesText.getText().toString());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.TooManyLUFoundInMonoLUPositionException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
@@ -17,6 +18,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class DialogScanOrCreateLUViewModel {
|
||||
@@ -62,6 +64,8 @@ public class DialogScanOrCreateLUViewModel {
|
||||
this.executeEtichettaAnonima(barcodeScanDTO, onComplete);
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
this.executeEAN128(barcodeScanDTO, onComplete);
|
||||
} else if (UtilityBarcode.isEan13(barcodeScanDTO)) {
|
||||
this.executeEAN13(barcodeScanDTO, onComplete);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
@@ -73,8 +77,12 @@ public class DialogScanOrCreateLUViewModel {
|
||||
MtbDepoPosizione foundPosizione = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||
.filter(x -> x.getPosizione().equalsIgnoreCase(barcodeScanDTO.getStringValue()))
|
||||
.single();
|
||||
this.executePosizione(foundPosizione, onComplete);
|
||||
|
||||
this.mPosizioniRESTConsumer.getBancaliInPosizione(foundPosizione, mtbColtList -> {
|
||||
}
|
||||
|
||||
private void executePosizione(MtbDepoPosizione posizione, Runnable onComplete) {
|
||||
this.mPosizioniRESTConsumer.getBancaliInPosizione(posizione, mtbColtList -> {
|
||||
|
||||
if (mtbColtList == null || mtbColtList.size() == 0) {
|
||||
this.sendError(new NoLUFoundException());
|
||||
@@ -88,7 +96,6 @@ public class DialogScanOrCreateLUViewModel {
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +103,7 @@ public class DialogScanOrCreateLUViewModel {
|
||||
this.mColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), mShouldCheckResiduo, false, mtbColt -> {
|
||||
|
||||
if (mtbColt == null) {
|
||||
if(mEnableCreation) {
|
||||
if (mEnableCreation) {
|
||||
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
|
||||
onComplete.run();
|
||||
this.sendOnLUOpened(createdMtbColt, true);
|
||||
@@ -158,6 +165,22 @@ public class DialogScanOrCreateLUViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void executeEAN13(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeScanDTO.getStringValue(), articoli -> {
|
||||
if (articoli.size() == 1) {
|
||||
MtbAart articolo = articoli.get(0);
|
||||
MtbDepoPosizione posizione = UtilityPosizione.getFromCache(articolo.getPosizione());
|
||||
if (posizione != null && posizione.isFlagMonoCollo()) {
|
||||
this.executePosizione(posizione, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
}
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void sendOnLUVenditaConfirmRequired(RunnableArgs<Boolean> onConfirm) {
|
||||
if (this.mListener != null) mListener.onLUVenditaConfirmRequired(onConfirm);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="androidx.core.content.ContextCompat" />
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ViewModel" />
|
||||
@@ -27,10 +31,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@android:color/white"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:background="@android:color/white">
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -179,6 +183,94 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:visibility="@{view.currentTextNumCnfToTake > 0 || view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/qta_ord_text_panel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="4dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_info_78dp"
|
||||
android:tint="@color/gray_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{view.currentTextNumCnfToTake.toString()}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumCnfToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{@plurals/item_package(view.currentTextNumCnfToTake)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumCnfToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="conf" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="e"
|
||||
android:textColor="@color/gray_600"
|
||||
android:visibility="@{view.currentTextNumPezziToTake > 0 && view.currentTextNumCnfToTake > 0 ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{view.currentTextNumPezziToTake.toString()}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="4" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@{@plurals/pieces(view.currentTextNumPezziToTake)}"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="Pezzi" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@@ -409,9 +501,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||
android:enabled="@{view.enabledChangePartitaMag}"
|
||||
android:paddingEnd="4dp"
|
||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
@@ -521,8 +613,8 @@
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/tot_qty"
|
||||
android:digits="0123456789"
|
||||
android:hint="@string/tot_qty"
|
||||
android:inputType="number"
|
||||
app:binding="@{view.currentQtaTot}" />
|
||||
|
||||
@@ -536,7 +628,89 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
android:visibility="@{viewmodel.mtbAart.isFlagQtaCnfFissaBoolean() ? View.GONE : View.VISIBLE}"
|
||||
android:weightSum="3">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_ped_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:paddingEnd="4dp"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_ped_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="@string/tare_art"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraArticolo}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_col_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_col_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="@string/tare_pckg"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraTot}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_peso_lordo_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{view.enabledPesoLordo}"
|
||||
android:focusableInTouchMode="false"
|
||||
android:imeOptions="actionDone"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_peso_lordo_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/LU_weight"
|
||||
android:inputType="number"
|
||||
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}"
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }"
|
||||
app:binding="@{view.currentPesoLordo}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_note_layout"
|
||||
@@ -544,8 +718,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.enabledNotes}"
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }"
|
||||
>
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_note_text"
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="java.math.BigDecimal" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel" />
|
||||
@@ -262,7 +267,8 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.mtbColt.posizione) ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline2"
|
||||
@@ -331,7 +337,10 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.mtbColt.ragSocCliente) ? View.GONE : View.VISIBLE}"
|
||||
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline4"
|
||||
@@ -363,6 +372,76 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.pesoNettoKg) ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/net_weight"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.pesoNettoKg}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline5"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.pesoKg)? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/gross_weight"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline6"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:binding="@{viewModel.pesoKg}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,142 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<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="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="@color/light_blue_300"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_blue_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_margin="4dp"
|
||||
android:background="@drawable/dialog_card_child_bg"
|
||||
android:padding="24dp">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
tools:text="Insert here"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Insert here" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/level_number_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/general_input"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
tools:hint="input here" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_left"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.10"/>
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_right"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.90"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/level_number_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_left"
|
||||
app:layout_constraintEnd_toStartOf="@id/guide_right"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/general_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:hint="input here"
|
||||
style="@style/TextInputEditText.OutlinePrimary"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="bottom|center_horizontal">
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_half_vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_abort"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
app:icon="@drawable/ic_clear_24dp"
|
||||
android:onClick="@{() -> viewmodel.onNegativeClick()}"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/abort"/>
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_buttons_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/level_number_layout" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
app:icon="@drawable/ic_save_24dp"
|
||||
android:onClick="@{() -> viewmodel.onPositiveClick()}"
|
||||
android:text="@string/confirm"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_abort"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:onClick="@{() -> viewmodel.onNegativeClick()}"
|
||||
android:text="@string/abort"
|
||||
app:layout_constraintEnd_toStartOf="@id/guide_half_vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/guide_buttons_top"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_confirm"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:onClick="@{() -> viewmodel.onPositiveClick()}"
|
||||
android:text="@string/confirm"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/guide_half_vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/guide_buttons_top" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@@ -14,6 +14,10 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="androidx.core.content.ContextCompat" />
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ViewModel" />
|
||||
@@ -69,16 +73,17 @@
|
||||
android:text="@{viewmodel.mtbAart.codMart}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
tools:text="COD MART (Partita mag)" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Dialog.DialogTitleText"
|
||||
android:id="@+id/unt_mis"
|
||||
style="@style/AppTheme.NewMaterial.Dialog.DialogTitleText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="@{viewmodel.mtbAart.untMis != null ? View.VISIBLE : View.GONE}"
|
||||
android:ellipsize="end"
|
||||
android:text="@{viewmodel.mtbAart.untMis}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:visibility="@{viewmodel.mtbAart.untMis != null ? View.VISIBLE : View.GONE}"
|
||||
tools:text="UM" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -190,6 +195,95 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:visibility="@{view.currentTextNumCnfToTake > 0 || view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/qta_ord_text_panel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="4dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_info_78dp"
|
||||
android:tint="@color/gray_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{view.currentTextNumCnfToTake.toString()}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumCnfToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{@plurals/item_package(view.currentTextNumCnfToTake)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumCnfToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="conf" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="e"
|
||||
android:textColor="@color/gray_600"
|
||||
android:visibility="@{view.currentTextNumPezziToTake > 0 && view.currentTextNumCnfToTake > 0 ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{view.currentTextNumPezziToTake.toString()}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="4" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@{@plurals/pieces(view.currentTextNumPezziToTake)}"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}"
|
||||
tools:text="Pezzi" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@@ -420,9 +514,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||
android:enabled="@{view.enabledChangePartitaMag}"
|
||||
android:paddingEnd="4dp"
|
||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
@@ -489,6 +583,8 @@
|
||||
android:hint="@string/num_pcks"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:nextFocusForward="@+id/input_qta_cnf_text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.currentNumCnf}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
@@ -512,6 +608,8 @@
|
||||
android:hint="@string/qty_x_pck"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:nextFocusForward="@+id/input_qta_tot_text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.currentQtaCnf}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
@@ -535,6 +633,7 @@
|
||||
android:digits="0123456789"
|
||||
android:hint="@string/tot_qty"
|
||||
android:inputType="number"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.currentQtaTot}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
@@ -547,7 +646,89 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
android:visibility="@{viewmodel.mtbAart.isFlagQtaCnfFissaBoolean() ? View.GONE : View.VISIBLE}"
|
||||
android:weightSum="3">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_ped_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:paddingEnd="4dp"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_ped_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="@string/tare_art"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraArticolo}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_col_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_col_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="@string/tare_pckg"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraTot}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_peso_lordo_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{view.enabledPesoLordo}"
|
||||
android:focusableInTouchMode="false"
|
||||
android:imeOptions="actionDone"
|
||||
tools:enabled="false"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_peso_lordo_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/LU_weight"
|
||||
android:inputType="number"
|
||||
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}"
|
||||
app:binding="@{view.currentPesoLordo}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_note_layout"
|
||||
@@ -555,8 +736,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.enabledNotes}"
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }"
|
||||
>
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_note_text"
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
<variable
|
||||
name="mContext"
|
||||
type="android.content.Context" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialog" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
@@ -52,6 +62,30 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cod_tcol"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text"
|
||||
app:layout_constraintBottom_toTopOf="@id/level_number_layout"
|
||||
android:visibility="@{viewModel.tipiCollo.empty ? View.GONE : View.VISIBLE}"
|
||||
android:hint="@string/lu_type">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown_cod_tcol"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:nextFocusForward="@id/filled_exposed_dropdown_cod_jfas"
|
||||
app:binding="@{view.selectedMtbTcol}"
|
||||
android:singleLine="true" />
|
||||
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/level_number_layout"
|
||||
@@ -59,7 +93,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text">
|
||||
app:layout_constraintTop_toBottomOf="@id/input_cod_tcol">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/additional_notes_text"
|
||||
@@ -67,6 +101,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_additional_notes"
|
||||
app:binding="@{view.additionalNotes}"
|
||||
android:inputType="text" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -63,81 +63,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text" />
|
||||
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- android:id="@+id/view_details_btn"-->
|
||||
<!-- style="@style/Widget.MaterialComponents.Button.TextButton.Icon"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="Vedi dettagli"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:icon="@drawable/ic_baseline_keyboard_arrow_down_24"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/description_text"-->
|
||||
<!-- app:singleClick="@{() -> view.toggleDetailVisibility()}" />-->
|
||||
|
||||
<!-- <it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout-->
|
||||
<!-- android:id="@+id/details_container"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/view_details_btn">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:background="@color/gray_200">-->
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!-- android:id="@+id/not_completed_lbl"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="Non completati"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- android:textAllCaps="true"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- android:visibility="@{view.versamentoAutomaticoULResponseDTO.failed.empty ? View.GONE : View.VISIBLE}"-->
|
||||
<!-- style="@style/TextViewMaterial.Dialog.SupportingText"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"/>-->
|
||||
|
||||
<!-- <com.linearlistview.LinearListView-->
|
||||
<!-- android:id="@+id/details_not_completed_list"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:nestedScrollingEnabled="false"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/not_completed_lbl"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!-- android:id="@+id/completed_lbl"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="Completati"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- android:textAllCaps="true"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- android:visibility="@{view.versamentoAutomaticoULResponseDTO.success.empty ? View.GONE : View.VISIBLE}"-->
|
||||
<!-- style="@style/TextViewMaterial.Dialog.SupportingText"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/details_not_completed_list"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"/>-->
|
||||
|
||||
<!-- <com.linearlistview.LinearListView-->
|
||||
<!-- android:id="@+id/details_completed_list"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/completed_lbl"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
|
||||
<!-- </it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout>-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_confirm"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/gray_detail_background_round8"
|
||||
android:orientation="vertical"
|
||||
android:onClick="@{() -> view.selectDocInfo()}"
|
||||
app:singleClick="@{() -> view.selectDocInfo()}"
|
||||
android:padding="16dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
<item quantity="other">pezzi</item>
|
||||
</plurals>
|
||||
<plurals name="item_package">
|
||||
<item quantity="one">collo</item>
|
||||
<item quantity="other">colli</item>
|
||||
<item quantity="one">confezione</item>
|
||||
<item quantity="other">confezioni</item>
|
||||
</plurals>
|
||||
<string name="unt_mis">Unt mis</string>
|
||||
<string name="unt_mis_col">col</string>
|
||||
@@ -117,7 +117,6 @@
|
||||
<string name="piece">Pezzo</string>
|
||||
|
||||
|
||||
|
||||
<string name="password_error_length">deve essere tra 3 e 30 caratteri</string>
|
||||
<string name="username_error_not_valid">inserire un username valido</string>
|
||||
<string name="server_cod_azienda_error_not_valid">inserire un codice azienda valido</string>
|
||||
@@ -137,6 +136,7 @@
|
||||
<string name="quantity_short">Qtà</string>
|
||||
<string name="net_weight">Peso netto (KG)</string>
|
||||
<string name="gross_weight">Peso lordo (KG)</string>
|
||||
<string name="LU_weight">Peso Collo (KG)</string>
|
||||
<string name="lu_type">Tipo pedana</string>
|
||||
|
||||
<string name="total_ordered">Totale ordinato</string>
|
||||
@@ -158,6 +158,7 @@
|
||||
<string name="tot_kg">Peso totale</string>
|
||||
<string name="tare_lu">Tara pedana</string>
|
||||
<string name="tare_pckg">Tara collo</string>
|
||||
<string name="tare_art">Tara articolo</string>
|
||||
|
||||
<string name="saving">Salvataggio</string>
|
||||
<string name="data_saved">Salvataggio completato</string>
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
|
||||
<color name="blue_100">#BBDEFB</color>
|
||||
<color name="blue_300">#64B5F6</color>
|
||||
<color name="blue_400">#42A5F5</color>
|
||||
<color name="blue_500">#2196F3</color>
|
||||
<color name="blue_600">#1E88E5</color>
|
||||
<color name="blue_700">#1976D2</color>
|
||||
<color name="blue_800">#1565C0</color>
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<string name="quantity_short">Qty</string>
|
||||
<string name="net_weight">Net weight (KG)</string>
|
||||
<string name="gross_weight">Gross weight (KG)</string>
|
||||
<string name="LU_weight">LU weight (KG)</string>
|
||||
<string name="lu_type">LU type</string>
|
||||
|
||||
<string name="total_ordered">Total ordered</string>
|
||||
@@ -156,6 +157,7 @@
|
||||
<string name="kg_x_pck">Qty x pck</string>
|
||||
<string name="tot_kg">Tot qty</string>
|
||||
<string name="tare_lu">Tare LU</string>
|
||||
<string name="tare_art">Tare product</string>
|
||||
<string name="tare_pckg">Tare pckg</string>
|
||||
|
||||
<string name="saving">Saving</string>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
@@ -32,7 +32,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
11
build.gradle
11
build.gradle
@@ -2,7 +2,7 @@
|
||||
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.5.21'
|
||||
kotlin_version = '1.6.10'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -10,13 +10,14 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||
classpath 'com.android.tools.build:gradle:7.1.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.5'
|
||||
classpath 'com.google.firebase:perf-plugin:1.3.5'
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
|
||||
classpath 'com.google.firebase:perf-plugin:1.4.1'
|
||||
|
||||
// Add the Firebase Crashlytics Gradle plugin.
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
@@ -3,7 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
|
||||
@@ -3,7 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
}
|
||||
@@ -18,5 +18,5 @@ dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation project(':app')
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
}
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -32,7 +32,7 @@ dependencies {
|
||||
// implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
|
||||
implementation project(":honeywellsdk")
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
@@ -31,7 +31,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -29,7 +29,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
android:name="it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader$ScanResultReceiver"
|
||||
android:enabled="true"
|
||||
android:permission="it.integry.pointmobilescannerlibrary.permission.SCANNER_RESULT_RECEIVER"
|
||||
android:priority="0" >
|
||||
android:priority="0"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="device.common.USERMSG" />
|
||||
<action android:name="device.scanner.EVENT" />
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -31,7 +31,7 @@ dependencies {
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
Reference in New Issue
Block a user