Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
134dff5aba
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxProjectSettings">
|
||||||
|
<option name="commitMessageIssueKeyValidationOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
<option name="commitMessageValidationEnabledOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 325
|
def appVersionCode = 326
|
||||||
def appVersionName = '1.30.07'
|
def appVersionName = '1.30.08'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@ -31,12 +31,12 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
versionCode appVersionCode
|
versionCode appVersionCode
|
||||||
versionName appVersionName
|
versionName appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
@ -66,7 +66,7 @@ android {
|
|||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
coreLibraryDesugaringEnabled true
|
//coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
@ -115,9 +115,9 @@ dependencies {
|
|||||||
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
||||||
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.6.1'
|
implementation 'com.google.android.material:material:1.8.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||||
@ -156,12 +156,12 @@ dependencies {
|
|||||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||||
|
|
||||||
//SQLite ROOM
|
//SQLite ROOM
|
||||||
def room_version = "2.4.3"
|
def room_version = "2.5.0"
|
||||||
|
|
||||||
implementation "androidx.room:room-runtime:$room_version"
|
implementation "androidx.room:room-runtime:$room_version"
|
||||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||||
implementation "androidx.room:room-rxjava3:$room_version"
|
implementation "androidx.room:room-rxjava3:$room_version"
|
||||||
androidTestImplementation "androidx.room:room-testing:2.4.3"
|
androidTestImplementation "androidx.room:room-testing:2.5.0"
|
||||||
|
|
||||||
//AppUpdate
|
//AppUpdate
|
||||||
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||||
@ -189,8 +189,6 @@ dependencies {
|
|||||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.0'
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@ -92,8 +92,10 @@ import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetM
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsComponent;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
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.choose_batch_lot.DialogChooseBatchLotModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
||||||
@ -148,7 +150,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
ProdOrdineProduzioneElencoModule.class,
|
ProdOrdineProduzioneElencoModule.class,
|
||||||
ProdRecuperoMaterialeModule.class,
|
ProdRecuperoMaterialeModule.class,
|
||||||
ProdVersamentoMaterialeModule.class,
|
ProdVersamentoMaterialeModule.class,
|
||||||
DialogChooseArtsFromListaArtsModule.class,
|
DialogChooseArtsFromMtbColrListModule.class,
|
||||||
DocInterniModule.class,
|
DocInterniModule.class,
|
||||||
DialogSelectDocInfoModule.class,
|
DialogSelectDocInfoModule.class,
|
||||||
DocInterniEditFormModule.class,
|
DocInterniEditFormModule.class,
|
||||||
@ -166,6 +168,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
BottomSheetInventarioActionsModule.class,
|
BottomSheetInventarioActionsModule.class,
|
||||||
BottomSheetInventarioRowActionsModule.class,
|
BottomSheetInventarioRowActionsModule.class,
|
||||||
BottomSheetMtbColrEditModalModule.class,
|
BottomSheetMtbColrEditModalModule.class,
|
||||||
|
DialogChooseArtsFromMtbAartListModule.class,
|
||||||
|
|
||||||
})
|
})
|
||||||
public interface MainApplicationComponent {
|
public interface MainApplicationComponent {
|
||||||
|
|
||||||
@ -243,7 +247,7 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
|
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
|
||||||
|
|
||||||
DialogChooseArtsFromListaArtsComponent.Factory dialogChooseArtsFromListaArtsComponent();
|
DialogChooseArtsFromMtbColrListComponent.Factory dialogChooseArtsFromListaArtsComponent();
|
||||||
|
|
||||||
DocInterniComponent.Factory docInterniComponent();
|
DocInterniComponent.Factory docInterniComponent();
|
||||||
|
|
||||||
@ -279,6 +283,8 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
BottomSheetMtbColrEditModalComponent.Factory bottomSheetMtbColrEditModalComponent();
|
BottomSheetMtbColrEditModalComponent.Factory bottomSheetMtbColrEditModalComponent();
|
||||||
|
|
||||||
|
DialogChooseArtsFromMtbAartListComponent.Factory dialogDialogDialogChooseArtsFromMtbAartListViewComponent();
|
||||||
|
|
||||||
void inject(MainApplication mainApplication);
|
void inject(MainApplication mainApplication);
|
||||||
|
|
||||||
void inject(AppContext mainApplication);
|
void inject(AppContext mainApplication);
|
||||||
|
|||||||
@ -22,13 +22,16 @@ import it.integry.integrywmsnative.core.menu.MenuService;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||||
@ -254,4 +257,22 @@ public class MainApplicationModule {
|
|||||||
return new DocumentiRESTConsumer();
|
return new DocumentiRESTConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
|
||||||
|
return new ColliSpedizioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliLavorazioneRESTConsumer provideColliLavorazioneRESTConsumer() {
|
||||||
|
return new ColliLavorazioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
MagazzinoAutomaticoRESTConsumer provideMagazzinoAutomaticoRESTConsumer() {
|
||||||
|
return new MagazzinoAutomaticoRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,8 +6,11 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||||
|
|
||||||
public interface IOrdiniVendita {
|
public interface OrdiniVenditaInterface {
|
||||||
|
|
||||||
|
boolean isTrasfOrder(List<OrdineUscitaInevasoDTO> testateOrdini);
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -18,7 +18,6 @@ public class BindableBoolean implements Observable {
|
|||||||
this.mValue = startValue;
|
this.mValue = startValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
|
public void addOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
|||||||
@ -37,14 +37,12 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public void onLoadingEnded() {
|
public void onLoadingEnded() {
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
this.runOnUiThread(() -> {
|
this.runOnUiThread(() -> {
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
UtilityExceptions.defaultException(this, ex);
|
UtilityExceptions.defaultException(this, ex);
|
||||||
BarcodeManager.enable();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,16 +2,16 @@ package it.integry.integrywmsnative.core.model;
|
|||||||
|
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsItemModel;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListItemModel;
|
||||||
|
|
||||||
public class CheckableMtbColr {
|
public class CheckableMtbColr {
|
||||||
|
|
||||||
|
|
||||||
private DialogChooseArtsFromListaArtsItemModel item;
|
private DialogChooseArtsFromMtbColrListItemModel item;
|
||||||
private BindableBoolean checked = new BindableBoolean(false);
|
private BindableBoolean checked = new BindableBoolean(false);
|
||||||
private BindableBoolean hidden = new BindableBoolean(false);
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
|
|
||||||
public CheckableMtbColr(DialogChooseArtsFromListaArtsItemModel item) {
|
public CheckableMtbColr(DialogChooseArtsFromMtbColrListItemModel item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
|
|
||||||
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
@ -22,11 +22,11 @@ public class CheckableMtbColr {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogChooseArtsFromListaArtsItemModel getItem() {
|
public DialogChooseArtsFromMtbColrListItemModel getItem() {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheckableMtbColr setItem(DialogChooseArtsFromListaArtsItemModel item) {
|
public CheckableMtbColr setItem(DialogChooseArtsFromMtbColrListItemModel item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
|
|
||||||
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
|||||||
@ -600,33 +600,6 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (filtroOrdineDtos != null && filtroOrdineDtos.size() > 0) {
|
|
||||||
|
|
||||||
for (int i = 0; i < filtroOrdineDtos.size(); i++) {
|
|
||||||
FiltroOrdineDTO x = filtroOrdineDtos.get(i);
|
|
||||||
|
|
||||||
try {
|
|
||||||
whereCond.append("(");
|
|
||||||
whereCond.append(String.format("d.g = %s AND d.d = %s and d.n = %s",
|
|
||||||
UtilityDB.valueToString(x.getGestioneOrd()),
|
|
||||||
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH)),
|
|
||||||
UtilityDB.valueToString(x.getNumOrd())));
|
|
||||||
|
|
||||||
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) {
|
|
||||||
whereCond.append(" OR ");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}*/
|
|
||||||
whereCond = TextUtils.join(" OR ", conditions);
|
whereCond = TextUtils.join(" OR ", conditions);
|
||||||
|
|
||||||
this.filtroOrdini = xmlPrefix + whereCond + xmlSuffix;
|
this.filtroOrdini = xmlPrefix + whereCond + xmlSuffix;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
public class MtbDepoPosizione {
|
public class MtbDepoPosizione {
|
||||||
|
|
||||||
@ -11,6 +12,8 @@ public class MtbDepoPosizione {
|
|||||||
private String flagLineaProduzione;
|
private String flagLineaProduzione;
|
||||||
private Integer priorita;
|
private Integer priorita;
|
||||||
|
|
||||||
|
private String tipoMagazAutomatico;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MtbDepoPosizione clone() {
|
public MtbDepoPosizione clone() {
|
||||||
@ -85,4 +88,17 @@ public class MtbDepoPosizione {
|
|||||||
this.priorita = priorita;
|
this.priorita = priorita;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTipoMagazAutomatico() {
|
||||||
|
return tipoMagazAutomatico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbDepoPosizione setTipoMagazAutomatico(String tipoMagazAutomatico) {
|
||||||
|
this.tipoMagazAutomatico = tipoMagazAutomatico;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMagazzinoAutomatico() {
|
||||||
|
return !UtilityString.isNullOrEmpty(getTipoMagazAutomatico());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,158 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
|
||||||
|
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDS(createUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Response<ServiceRESTResponse<CreateUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDS", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.closeUDS(closeUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Response<ServiceRESTResponse<CloseUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/closeUDS", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/canUDSBeDeleted", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/deleteUDS", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.printUDS(printUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/printUDS", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.insertUDSRow(insertUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDSRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/insertUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.deleteUDSRow(deleteUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/deleteUDSRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ColliLavorazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDS")
|
||||||
|
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/closeUDS")
|
||||||
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/canUDSBeDeleted")
|
||||||
|
Call<ServiceRESTResponse<Boolean>> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/deleteUDS")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/printUDS")
|
||||||
|
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/insertUDSRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/deleteUDSRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -292,7 +292,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.distribuisciCollo(distribuzioneColloDTO)
|
colliMagazzinoRESTConsumerService.distribuisciCollo(distribuzioneColloDTO)
|
||||||
.enqueue(new Callback<ServiceRESTResponse<JsonObject>>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
|
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
|
||||||
analyzeAnswerList(response, "DistribuzioneCollo", obj -> {
|
analyzeAnswerList(response, "DistribuzioneCollo", obj -> {
|
||||||
|
|||||||
@ -0,0 +1,154 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
|
||||||
|
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.createUDS(createUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Response<ServiceRESTResponse<CreateUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/createUDS", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.closeUDS(closeUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Response<ServiceRESTResponse<CloseUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/closeUDS", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/canUDSBeDeleted", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/deleteUDS", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.printUDS(printUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/printUDS", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.insertUDSRow(insertUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDSRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/insertUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.deleteUDSRow(deleteUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/deleteUDSRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ColliSpedizioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/spedizione/createUDS")
|
||||||
|
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/closeUDS")
|
||||||
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/canUDSBeDeleted")
|
||||||
|
Call<ServiceRESTResponse<Boolean>> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/deleteUDS")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/printUDS")
|
||||||
|
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/insertUDSRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/deleteUDSRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemsRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class MagazzinoAutomaticoRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
|
public void pickItems(MagazzinoAutomaticoPickItemsRequestDTO magazzinoAutomaticoPickItemsRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MagazzinoAutomaticoRESTConsumerService magazzinoAutomaticoRESTConsumerService = RESTBuilder.getService(MagazzinoAutomaticoRESTConsumerService.class);
|
||||||
|
|
||||||
|
magazzinoAutomaticoRESTConsumerService.pickItems(magazzinoAutomaticoPickItemsRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "magazzino-automatico/pickItems", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemsRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface MagazzinoAutomaticoRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/magazzino-automatico/pickItems")
|
||||||
|
Call<ServiceRESTResponse<Void>> pickItems(@Body MagazzinoAutomaticoPickItemsRequestDTO magazzinoAutomaticoPickItemsRequestDTO);
|
||||||
|
}
|
||||||
@ -46,9 +46,7 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getSuggestedPickingList(String codMdep, List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getSuggestedPickingList(String codMdep, List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
OrdiniRESTConsumerService service = RESTBuilder.getService(OrdiniRESTConsumerService.class, 90);
|
OrdiniRESTConsumerService service = RESTBuilder.getService(OrdiniRESTConsumerService.class, 90);
|
||||||
|
|
||||||
service
|
service
|
||||||
.getSuggestedPickingList(codMdep, sitArtOrdList)
|
.getSuggestedPickingList(codMdep, sitArtOrdList)
|
||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
@ -109,7 +107,6 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
||||||
UtilityLogger.error(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -66,10 +66,9 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
||||||
Call<ServiceRESTResponse<Object>> callable = null;
|
printerService
|
||||||
callable = printerService.printCollo(testataColloToPrint);
|
.printCollo(testataColloToPrint)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
callable.enqueue(new Callback<>() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||||
analyzeAnswer(response, "printCollo", data -> {
|
analyzeAnswer(response, "printCollo", data -> {
|
||||||
|
|||||||
@ -30,8 +30,9 @@ public abstract class _BaseRESTConsumer {
|
|||||||
onComplete.run(dataObj);
|
onComplete.run(dataObj);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e(logTitle, response.body().getErrorMessage());
|
String errorMessage = UtilityString.isNull(response.body().getErrorMessage(), "Empty message");
|
||||||
onFailed.run(CommonRESTException.tryRecognizeException(response.body().getErrorMessage()));
|
Log.e(logTitle, errorMessage);
|
||||||
|
onFailed.run(CommonRESTException.tryRecognizeException(errorMessage));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e(logTitle, response.message());
|
Log.e(logTitle, response.message());
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers.interfaces;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
|
|
||||||
|
public interface ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.magazzino_automatico;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class MagazzinoAutomaticoPickItemRequestDTO {
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
private String partitaMag;
|
||||||
|
private String untMis;
|
||||||
|
private BigDecimal qtaTot;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntMis() {
|
||||||
|
return untMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO setUntMis(String untMis) {
|
||||||
|
this.untMis = untMis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTot() {
|
||||||
|
return qtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO setQtaTot(BigDecimal qtaTot) {
|
||||||
|
this.qtaTot = qtaTot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemRequestDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.magazzino_automatico;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class MagazzinoAutomaticoPickItemsRequestDTO {
|
||||||
|
|
||||||
|
private boolean shouldCreateUDS;
|
||||||
|
private String defaultGestioneOfNewUDS;
|
||||||
|
private List<MagazzinoAutomaticoPickOrderRequestDTO> ordersOfNewUDS;
|
||||||
|
private MtbColt inputMtbColt;
|
||||||
|
private List<MagazzinoAutomaticoPickItemRequestDTO> itemsToPick;
|
||||||
|
|
||||||
|
public boolean isShouldCreateUDS() {
|
||||||
|
return shouldCreateUDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemsRequestDTO setShouldCreateUDS(boolean shouldCreateUDS) {
|
||||||
|
this.shouldCreateUDS = shouldCreateUDS;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefaultGestioneOfNewUDS() {
|
||||||
|
return defaultGestioneOfNewUDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemsRequestDTO setDefaultGestioneOfNewUDS(String defaultGestioneOfNewUDS) {
|
||||||
|
this.defaultGestioneOfNewUDS = defaultGestioneOfNewUDS;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MagazzinoAutomaticoPickOrderRequestDTO> getOrdersOfNewUDS() {
|
||||||
|
return ordersOfNewUDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemsRequestDTO setOrdersOfNewUDS(List<MagazzinoAutomaticoPickOrderRequestDTO> ordersOfNewUDS) {
|
||||||
|
this.ordersOfNewUDS = ordersOfNewUDS;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColt getInputMtbColt() {
|
||||||
|
return inputMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemsRequestDTO setInputMtbColt(MtbColt inputMtbColt) {
|
||||||
|
this.inputMtbColt = inputMtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MagazzinoAutomaticoPickItemRequestDTO> getItemsToPick() {
|
||||||
|
return itemsToPick;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickItemsRequestDTO setItemsToPick(List<MagazzinoAutomaticoPickItemRequestDTO> itemsToPick) {
|
||||||
|
this.itemsToPick = itemsToPick;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.magazzino_automatico;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class MagazzinoAutomaticoPickOrderRequestDTO {
|
||||||
|
|
||||||
|
private final String type = "dtb_ordr";
|
||||||
|
private LocalDate dataCons;
|
||||||
|
private LocalDate dataOrd;
|
||||||
|
private String gestione;
|
||||||
|
private int numOrd;
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickOrderRequestDTO(LocalDate dataOrd, String gestione, int numOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
this.gestione = gestione;
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataCons() {
|
||||||
|
return dataCons;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoAutomaticoPickOrderRequestDTO setDataCons(LocalDate dataCons) {
|
||||||
|
this.dataCons = dataCons;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class CanUDSBeDeletedRequestDTO {
|
||||||
|
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CanUDSBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class CloseUDSRequestDTO {
|
||||||
|
|
||||||
|
private boolean printSSCC;
|
||||||
|
private boolean enableTransferLogic;
|
||||||
|
private String orderCodMdep;
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
public boolean isPrintSSCC() {
|
||||||
|
return printSSCC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDSRequestDTO setPrintSSCC(boolean printSSCC) {
|
||||||
|
this.printSSCC = printSSCC;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEnableTransferLogic() {
|
||||||
|
return enableTransferLogic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDSRequestDTO setEnableTransferLogic(boolean enableTransferLogic) {
|
||||||
|
this.enableTransferLogic = enableTransferLogic;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderCodMdep() {
|
||||||
|
return orderCodMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDSRequestDTO setOrderCodMdep(String orderCodMdep) {
|
||||||
|
this.orderCodMdep = orderCodMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDSRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class CloseUDSResponseDTO {
|
||||||
|
private boolean saved;
|
||||||
|
private boolean deleted;
|
||||||
|
|
||||||
|
private List<MtbColt> generatedMtbColts;
|
||||||
|
|
||||||
|
public boolean isSaved() {
|
||||||
|
return saved;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDeleted() {
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MtbColt> getGeneratedMtbColts() {
|
||||||
|
return generatedMtbColts;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class CreateUDSRequestDTO {
|
||||||
|
|
||||||
|
private String codMdep;
|
||||||
|
private int segno;
|
||||||
|
private String ragSoc;
|
||||||
|
private Integer numCollo;
|
||||||
|
private String serCollo;
|
||||||
|
private int causaleCollo;
|
||||||
|
|
||||||
|
private List<CreateUDSRequestOrderDTO> orders;
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSegno() {
|
||||||
|
return segno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setSegno(int segno) {
|
||||||
|
this.segno = segno;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRagSoc() {
|
||||||
|
return ragSoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setRagSoc(String ragSoc) {
|
||||||
|
this.ragSoc = ragSoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumCollo() {
|
||||||
|
return numCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setNumCollo(Integer numCollo) {
|
||||||
|
this.numCollo = numCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerCollo() {
|
||||||
|
return serCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setSerCollo(String serCollo) {
|
||||||
|
this.serCollo = serCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCausaleCollo() {
|
||||||
|
return causaleCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setCausaleCollo(int causaleCollo) {
|
||||||
|
this.causaleCollo = causaleCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CreateUDSRequestOrderDTO> getOrders() {
|
||||||
|
return orders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setOrders(List<CreateUDSRequestOrderDTO> orders) {
|
||||||
|
this.orders = orders;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static class Causale {
|
||||||
|
public static final int SCARICO = 0;
|
||||||
|
public static final int POSIZIONAMENTO = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class CreateUDSRequestOrderDTO {
|
||||||
|
|
||||||
|
|
||||||
|
private String gestione;
|
||||||
|
private LocalDate dataOrd;
|
||||||
|
private LocalDate dataCons;
|
||||||
|
private int numOrd;
|
||||||
|
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestOrderDTO setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestOrderDTO setDataOrd(LocalDate dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataCons() {
|
||||||
|
return dataCons;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestOrderDTO setDataCons(LocalDate dataCons) {
|
||||||
|
this.dataCons = dataCons;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestOrderDTO setNumOrd(int numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class CreateUDSResponseDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class DeleteUDSRequestDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteUDSRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class DeleteUDSRowRequestDTO {
|
||||||
|
|
||||||
|
private MtbColr mtbColrToDelete;
|
||||||
|
|
||||||
|
public MtbColr getMtbColrToDelete() {
|
||||||
|
return mtbColrToDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteUDSRowRequestDTO setMtbColrToDelete(MtbColr mtbColrToDelete) {
|
||||||
|
this.mtbColrToDelete = mtbColrToDelete;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class InsertUDSRowRequestDTO {
|
||||||
|
|
||||||
|
private MtbColr sourceMtbColr;
|
||||||
|
private MtbColt targetMtbColt;
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
private BigDecimal qtaTot;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private String partitaMag;
|
||||||
|
private LocalDate dataScad;
|
||||||
|
|
||||||
|
public MtbColr getSourceMtbColr() {
|
||||||
|
return sourceMtbColr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setSourceMtbColr(MtbColr sourceMtbColr) {
|
||||||
|
this.sourceMtbColr = sourceMtbColr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColt getTargetMtbColt() {
|
||||||
|
return targetMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setTargetMtbColt(MtbColt targetMtbColt) {
|
||||||
|
this.targetMtbColt = targetMtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTot() {
|
||||||
|
return qtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setQtaTot(BigDecimal qtaTot) {
|
||||||
|
this.qtaTot = qtaTot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataScad() {
|
||||||
|
return dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDSRowRequestDTO setDataScad(LocalDate dataScad) {
|
||||||
|
this.dataScad = dataScad;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class InsertUDSRowResponseDTO {
|
||||||
|
|
||||||
|
private MtbColr savedMtbColr;
|
||||||
|
|
||||||
|
public MtbColr getSavedMtbColr() {
|
||||||
|
return savedMtbColr;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class PrintUDSRequestDTO {
|
||||||
|
|
||||||
|
private List<MtbColt> mtbColts;
|
||||||
|
|
||||||
|
public List<MtbColt> getMtbColts() {
|
||||||
|
return mtbColts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PrintUDSRequestDTO setMtbColts(List<MtbColt> mtbColts) {
|
||||||
|
this.mtbColts = mtbColts;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,12 +12,12 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
|
|
||||||
public class ServerStatusChecker {
|
public class ServerStatusChecker {
|
||||||
|
|
||||||
private static ServerStatusChecker instance = new ServerStatusChecker();
|
private static final ServerStatusChecker instance = new ServerStatusChecker();
|
||||||
|
|
||||||
private List<RunnableArgs<Boolean>> mCallback = new ArrayList<>();
|
private final List<RunnableArgs<Boolean>> mCallback = new ArrayList<>();
|
||||||
|
|
||||||
private RunnableArgs<Boolean> mInternalCallback = value -> {
|
private final RunnableArgs<Boolean> mInternalCallback = value -> {
|
||||||
for (RunnableArgs callback : mCallback) {
|
for (RunnableArgs<Boolean> callback : mCallback) {
|
||||||
callback.run(value);
|
callback.run(value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -26,8 +26,8 @@ public class ServerStatusChecker {
|
|||||||
private final long MILLIS_DELAY = 5 * 1000;
|
private final long MILLIS_DELAY = 5 * 1000;
|
||||||
|
|
||||||
|
|
||||||
private Handler handler = new Handler();
|
private final Handler handler = new Handler();
|
||||||
private Runnable runnableCode = new Runnable() {
|
private final Runnable runnableCode = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (shouldExecute && !UtilityString.isNullOrEmpty(SettingsManager.i().getServer().getHost())) {
|
if (shouldExecute && !UtilityString.isNullOrEmpty(SettingsManager.i().getServer().getHost())) {
|
||||||
|
|||||||
@ -43,7 +43,7 @@ public class UtilityServer {
|
|||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(String.format("http://%s:%d/ems-api/retail/status", serverAddress, serverTCPport))
|
.url(String.format("http://%s:%d/ems-api/system/ok", serverAddress, serverTCPport))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import it.integry.integrywmsnative.R;
|
|||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||||
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
||||||
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
import it.integry.integrywmsnative.core.class_router.interfaces.OrdiniVenditaInterface;
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverDTO;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverDTO;
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
@ -196,7 +196,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
if (recoveredMtbColt != null && (recoveredMtbColt.getGestioneEnum() == GestioneEnum.VENDITA || recoveredMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && !UtilityString.isNullOrEmpty(recoveredMtbColt.getFiltroOrdini())) {
|
if (recoveredMtbColt != null && (recoveredMtbColt.getGestioneEnum() == GestioneEnum.VENDITA || recoveredMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && !UtilityString.isNullOrEmpty(recoveredMtbColt.getFiltroOrdini())) {
|
||||||
|
|
||||||
IOrdiniVendita ordiniVendita = ClassRouter.getInstance(ClassRouter.PATH.ORDINI_VENDITA);
|
OrdiniVenditaInterface ordiniVendita = ClassRouter.getInstance(ClassRouter.PATH.ORDINI_VENDITA);
|
||||||
|
|
||||||
this.colliMagazzinoRESTConsumer.updateDataFine(recoveredMtbColt, () -> {
|
this.colliMagazzinoRESTConsumer.updateDataFine(recoveredMtbColt, () -> {
|
||||||
ordiniVendita.distribuisciCollo(recoveredMtbColt, recoveredMtbColtDto.getTestateOrdini(),
|
ordiniVendita.distribuisciCollo(recoveredMtbColt, recoveredMtbColtDto.getTestateOrdini(),
|
||||||
|
|||||||
@ -55,7 +55,7 @@ import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteView;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrList;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
public void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||||
DialogChooseArtsFromListaArts
|
DialogChooseArtsFromMtbColrList
|
||||||
.newInstance(mtbColrsToPick, mtbAart, onComplete, () -> {
|
.newInstance(mtbColrsToPick, mtbAart, onComplete, () -> {
|
||||||
onAbort.run();
|
onAbort.run();
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
|
|||||||
@ -187,12 +187,10 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
|||||||
public void onItemDispatched(ArticoloOrdine articoloOrdine, Runnable onSuccess) {
|
public void onItemDispatched(ArticoloOrdine articoloOrdine, Runnable onSuccess) {
|
||||||
DialogEditArticoloView
|
DialogEditArticoloView
|
||||||
.newInstance(articoloOrdine, articolo -> {
|
.newInstance(articoloOrdine, articolo -> {
|
||||||
runOnUiThread(() -> {
|
|
||||||
if (articolo != null) {
|
if (articolo != null) {
|
||||||
Toast.makeText(this, "Articolo aggiunto all'ordine!", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Articolo aggiunto all'ordine!", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
this.mViewModel.refreshListArticoli(onSuccess);
|
this.mViewModel.refreshListArticoli(onSuccess);
|
||||||
});
|
|
||||||
}, null).show(this.getSupportFragmentManager(), "DialogEditArticoloView");
|
}, null).show(this.getSupportFragmentManager(), "DialogEditArticoloView");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,11 +201,9 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
|||||||
|
|
||||||
public void exportOrdine() {
|
public void exportOrdine() {
|
||||||
this.mViewModel.exportOrdine(() -> {
|
this.mViewModel.exportOrdine(() -> {
|
||||||
runOnUiThread(() -> {
|
|
||||||
Toast.makeText(this, "Ordine salvato con successo", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Ordine salvato con successo", Toast.LENGTH_SHORT).show();
|
||||||
close();
|
close();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@ -123,23 +124,21 @@ public class PVOrdineAcquistoEditViewModel {
|
|||||||
|
|
||||||
public void processBarcode(String barcode) {
|
public void processBarcode(String barcode) {
|
||||||
try {
|
try {
|
||||||
BarcodeManager.disable();
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
ArticoloDTO articoloDTO = getArticoloFromBarcode(barcode);
|
ArticoloDTO articoloDTO = getArticoloFromBarcode(barcode);
|
||||||
if (articoloDTO == null) {
|
if (articoloDTO == null) {
|
||||||
throw new NoResultFromBarcodeException(barcode);
|
throw new NoResultFromBarcodeException(barcode);
|
||||||
}
|
}
|
||||||
this.addArticoloToOrdine(
|
this.addArticoloToOrdine(
|
||||||
articoloDTO,
|
articoloDTO,
|
||||||
BarcodeManager::enable,
|
this::sendOnLoadingEnded,
|
||||||
e -> {
|
this::sendError
|
||||||
this.sendError(e);
|
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.sendError(e);
|
this.sendError(e);
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
|
} finally {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,9 +153,10 @@ public class PVOrdineAcquistoEditViewModel {
|
|||||||
public void addArticoloToOrdine(ArticoloDTO art, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
public void addArticoloToOrdine(ArticoloDTO art, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
mArticoliOrdineRepository.findArticoloByScanAndOrdine(mCurrentOrdine, art.codMart, (articolo) -> {
|
mArticoliOrdineRepository.findArticoloByScanAndOrdine(mCurrentOrdine, art.codMart, foundArt -> {
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
if (articolo != null) {
|
var articolo = foundArt != null ? foundArt : art.convertToArticoloOrdine(mCurrentOrdine);
|
||||||
|
|
||||||
if (isAutoOrderOnScan()) {
|
if (isAutoOrderOnScan()) {
|
||||||
articolo.setQtaOrd(articolo.getQtaOrd() + articolo.getQtaCnf());
|
articolo.setQtaOrd(articolo.getQtaOrd() + articolo.getQtaCnf());
|
||||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, () -> this.refreshListArticoli(onSuccess), onFail);
|
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, () -> this.refreshListArticoli(onSuccess), onFail);
|
||||||
@ -165,15 +165,6 @@ public class PVOrdineAcquistoEditViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
articolo = art.convertToArticoloOrdine(mCurrentOrdine);
|
|
||||||
if (isAutoOrderOnScan()) {
|
|
||||||
articolo.setQtaOrd(articolo.getQtaCnf());
|
|
||||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, () -> this.refreshListArticoli(onSuccess), onFail);
|
|
||||||
} else {
|
|
||||||
this.sendOnItemDispatched(articolo, onSuccess);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, onFail);
|
}, onFail);
|
||||||
|
|
||||||
|
|
||||||
@ -200,7 +191,9 @@ public class PVOrdineAcquistoEditViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<ArticoloDTO> getNewArticoli() {
|
private List<ArticoloDTO> getNewArticoli() {
|
||||||
return Stream.of(mArticoliGriglia).filter(x -> x.getQtaOrd() > 0f).toList();
|
return mArticoliGriglia.stream()
|
||||||
|
.filter(x -> x.getQtaOrd() > 0f)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void orderNewProducts() {
|
public void orderNewProducts() {
|
||||||
|
|||||||
@ -73,6 +73,7 @@ import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShould
|
|||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotView;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLU;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLU;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUView;
|
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUView;
|
||||||
@ -248,7 +249,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
} else if (!noLUPresent.get()) {
|
} else if (!noLUPresent.get()) {
|
||||||
this.mShouldCloseActivity = true;
|
this.mShouldCloseActivity = true;
|
||||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
this.mViewmodel.closeLU(true);
|
this.mViewmodel.requestCloseLU(true);
|
||||||
} else {
|
} else {
|
||||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
@ -409,7 +410,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
y.getRefMtbColr().getGestioneEnum().equals(mtbColrToDispatch.getGestioneEnum()) &&
|
y.getRefMtbColr().getGestioneEnum().equals(mtbColrToDispatch.getGestioneEnum()) &&
|
||||||
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodMart(), mtbColrToDispatch.getCodMart()) &&
|
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodMart(), mtbColrToDispatch.getCodMart()) &&
|
||||||
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodTagl(), mtbColrToDispatch.getCodTagl()) &&
|
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodTagl(), mtbColrToDispatch.getCodTagl()) &&
|
||||||
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodCol(), mtbColrToDispatch.getCodCol())*/ y.getRefMtbColr().equals(mtbColrToDispatch))
|
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodCol(), mtbColrToDispatch.getCodCol())*/
|
||||||
|
y.getRefMtbColr().equals(mtbColrToDispatch))
|
||||||
.map(MtbColr::getNumCnf)
|
.map(MtbColr::getNumCnf)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
@ -925,7 +927,16 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
@Override
|
@Override
|
||||||
public void onCreateDocsRequest() {
|
public void onCreateDocsRequest() {
|
||||||
DialogYesNoView.newInstance("Chiusura ordine", "Vuoi creare i documenti per gli ordini selezionati?", result -> {
|
DialogYesNoView.newInstance("Chiusura ordine", "Vuoi creare i documenti per gli ordini selezionati?", result -> {
|
||||||
this.mViewmodel.onCreateDocsAnswered(result);
|
|
||||||
|
switch (result) {
|
||||||
|
case YES:
|
||||||
|
this.mViewmodel.createDocs();
|
||||||
|
break;
|
||||||
|
case NO:
|
||||||
|
this.onOrderClosed();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}).show(this.getSupportFragmentManager(), "tag");
|
}).show(this.getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -935,6 +946,12 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
.show(getSupportFragmentManager(), "tag");
|
.show(getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChooseArtsRequest(List<MtbAart> artsList, RunnableArgs<List<MtbAart>> onComplete) {
|
||||||
|
DialogChooseArtsFromMtbAartListView.newInstance(artsList, onComplete, this::onLoadingEnded)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onOrderClosed() {
|
public void onOrderClosed() {
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
@ -948,7 +965,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBottomSheetLUClose() {
|
public void onBottomSheetLUClose() {
|
||||||
this.mViewmodel.closeLU(true);
|
this.mViewmodel.requestCloseLU(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -958,7 +975,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMtbColrDelete(MtbColr mtbColr) {
|
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||||
this.mViewmodel.deleteRow(mtbColr);
|
this.mViewmodel.requestDeleteRow(mtbColr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,11 @@ import dagger.Provides;
|
|||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
@ -21,8 +24,28 @@ public class SpedizioneModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
SpedizioneViewModel providesSpedizioneViewModel(ArticoloRESTConsumer articoloRESTConsumer, ColliDataRecoverService colliDataRecoverService, OrdiniRESTConsumer ordiniRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, PosizioniRESTConsumer posizioniRESTConsumer, DocumentiRESTConsumer documentiRESTConsumer) {
|
SpedizioneViewModel providesSpedizioneViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
return new SpedizioneViewModel(articoloRESTConsumer, barcodeRESTConsumer, colliDataRecoverService, ordiniRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, posizioniRESTConsumer, documentiRESTConsumer);
|
ColliDataRecoverService colliDataRecoverService,
|
||||||
|
OrdiniRESTConsumer ordiniRESTConsumer,
|
||||||
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||||
|
PrinterRESTConsumer printerRESTConsumer,
|
||||||
|
BarcodeRESTConsumer barcodeRESTConsumer,
|
||||||
|
PosizioniRESTConsumer posizioniRESTConsumer,
|
||||||
|
DocumentiRESTConsumer documentiRESTConsumer,
|
||||||
|
ColliSpedizioneRESTConsumer colliSpedizioneRESTConsumer,
|
||||||
|
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer,
|
||||||
|
MagazzinoAutomaticoRESTConsumer magazzinoAutomaticoRESTConsumer) {
|
||||||
|
return new SpedizioneViewModel(articoloRESTConsumer,
|
||||||
|
barcodeRESTConsumer,
|
||||||
|
colliDataRecoverService,
|
||||||
|
ordiniRESTConsumer,
|
||||||
|
colliMagazzinoRESTConsumer,
|
||||||
|
printerRESTConsumer,
|
||||||
|
posizioniRESTConsumer,
|
||||||
|
documentiRESTConsumer,
|
||||||
|
colliSpedizioneRESTConsumer,
|
||||||
|
colliLavorazioneRESTConsumer,
|
||||||
|
magazzinoAutomaticoRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.spedizione.exceptions;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
|
||||||
|
public class InvalidMagazzinoAutomaticoMovementException extends Exception {
|
||||||
|
public InvalidMagazzinoAutomaticoMovementException(MtbDepoPosizione mtbDepoPosizione) {
|
||||||
|
super(String.format("Non è possibile movimentare una posizione legata ad un magazzino automatico (%s)", mtbDepoPosizione.getPosizione()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -44,7 +44,7 @@ import it.integry.integrywmsnative.gest.picking_resi.PickingResiActivity;
|
|||||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.ui.UltimiArriviFornitoreListAdapter;
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.ui.UltimiArriviFornitoreListAdapter;
|
||||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.dialog.DialogUltimiArriviFornitoreFiltroAvanzato;
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.dialog.DialogUltimiArriviFornitoreFiltroAvanzato;
|
||||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple {@link BaseFragment} subclass.
|
* A simple {@link BaseFragment} subclass.
|
||||||
@ -255,7 +255,7 @@ public class UltimiArriviFornitoreFragment extends BaseFragment implements ITitl
|
|||||||
@Override
|
@Override
|
||||||
public void onMtbColtScanned(MtbColt scannedMtbColt) {
|
public void onMtbColtScanned(MtbColt scannedMtbColt) {
|
||||||
|
|
||||||
DialogChooseArtsFromListaArts
|
DialogChooseArtsFromMtbColrList
|
||||||
.newInstance(scannedMtbColt.getMtbColr(), items -> {
|
.newInstance(scannedMtbColt.getMtbColr(), items -> {
|
||||||
|
|
||||||
List<MtbAart> mtbAarts = Stream.of(items)
|
List<MtbAart> mtbAarts = Stream.of(items)
|
||||||
|
|||||||
@ -37,7 +37,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
|||||||
import it.integry.integrywmsnative.view.dialogs.DialogAskLivelloPosizione;
|
import it.integry.integrywmsnative.view.dialogs.DialogAskLivelloPosizione;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrList;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||||
@ -170,7 +170,7 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
|||||||
@Override
|
@Override
|
||||||
public void onArtsChooseRequired(List<MtbColr> mtbColrList, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
public void onArtsChooseRequired(List<MtbColr> mtbColrList, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||||
this.requireActivity().runOnUiThread(() -> {
|
this.requireActivity().runOnUiThread(() -> {
|
||||||
DialogChooseArtsFromListaArts
|
DialogChooseArtsFromMtbColrList
|
||||||
.newInstance(mtbColrList, onComplete, onAbort)
|
.newInstance(mtbColrList, onComplete, onAbort)
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
|
||||||
|
|
||||||
import dagger.Subcomponent;
|
|
||||||
|
|
||||||
@Subcomponent
|
|
||||||
public interface DialogChooseArtsFromListaArtsComponent {
|
|
||||||
|
|
||||||
@Subcomponent.Factory
|
|
||||||
interface Factory {
|
|
||||||
DialogChooseArtsFromListaArtsComponent create();
|
|
||||||
}
|
|
||||||
|
|
||||||
void inject(DialogChooseArtsFromListaArts dialogChooseArtsFromListaArts);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
|
||||||
|
|
||||||
import dagger.Module;
|
|
||||||
|
|
||||||
@Module(subcomponents = DialogChooseArtsFromListaArtsComponent.class)
|
|
||||||
public class DialogChooseArtsFromListaArtsModule {
|
|
||||||
}
|
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface DialogChooseArtsFromMtbAartListComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
DialogChooseArtsFromMtbAartListComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(DialogChooseArtsFromMtbAartListView dialogChooseArtsFromMtbAartListView);
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
|
public class DialogChooseArtsFromMtbAartListItemModel {
|
||||||
|
|
||||||
|
private BindableBoolean selected = new BindableBoolean(false);
|
||||||
|
private String codMart;
|
||||||
|
private String diacod;
|
||||||
|
private String descrizione;
|
||||||
|
private BigDecimal peso;
|
||||||
|
private String pesoUntMis;
|
||||||
|
private BigDecimal qta;
|
||||||
|
private String qtaUntMis;
|
||||||
|
|
||||||
|
private MtbAart originalModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public BindableBoolean getSelected() {
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setSelected(BindableBoolean selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiacod() {
|
||||||
|
return diacod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setDiacod(String diacod) {
|
||||||
|
this.diacod = diacod;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPeso() {
|
||||||
|
return peso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setPeso(BigDecimal peso) {
|
||||||
|
this.peso = peso;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPesoUntMis() {
|
||||||
|
return pesoUntMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setPesoUntMis(String pesoUntMis) {
|
||||||
|
this.pesoUntMis = pesoUntMis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQta() {
|
||||||
|
return qta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setQta(BigDecimal qta) {
|
||||||
|
this.qta = qta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQtaUntMis() {
|
||||||
|
return qtaUntMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setQtaUntMis(String qtaUntMis) {
|
||||||
|
this.qtaUntMis = qtaUntMis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbAart getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromMtbAartListItemModel setOriginalModel(MtbAart originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
|
||||||
|
@Module(subcomponents = DialogChooseArtsFromMtbAartListComponent.class)
|
||||||
|
public class DialogChooseArtsFromMtbAartListModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
DialogChooseArtsFromMtbAartListViewModel providesDialogDialogDialogChooseArtsFromMtbAartListViewViewModel() {
|
||||||
|
return new DialogChooseArtsFromMtbAartListViewModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BR;
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromMtbAartListLayoutBinding;
|
||||||
|
|
||||||
|
public class DialogChooseArtsFromMtbAartListView extends BaseDialogFragment implements DialogInterface.OnShowListener {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DialogChooseArtsFromMtbAartListViewModel mViewModel;
|
||||||
|
|
||||||
|
private DialogChooseArtsFromMtbAartListLayoutBinding mBindings;
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private final List<MtbAart> mtbAarts;
|
||||||
|
private List<DialogChooseArtsFromMtbAartListItemModel> artsItemModels = null;
|
||||||
|
private final RunnableArgs<List<MtbAart>> onConfirmed;
|
||||||
|
private final Runnable onAbort;
|
||||||
|
|
||||||
|
//Pass here all external parameters
|
||||||
|
public static DialogChooseArtsFromMtbAartListView newInstance(List<MtbAart> mtbAarts, RunnableArgs<List<MtbAart>> onConfirmed, Runnable onAbort) {
|
||||||
|
return new DialogChooseArtsFromMtbAartListView(mtbAarts, onConfirmed, onAbort);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogChooseArtsFromMtbAartListView(List<MtbAart> mtbAarts, RunnableArgs<List<MtbAart>> onConfirmed, Runnable onAbort) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.mtbAarts = mtbAarts;
|
||||||
|
this.onConfirmed = onConfirmed;
|
||||||
|
this.onAbort = onAbort;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
|
this.mContext = requireContext();
|
||||||
|
|
||||||
|
mBindings = DialogChooseArtsFromMtbAartListLayoutBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.dialogDialogDialogChooseArtsFromMtbAartListViewComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
|
||||||
|
var cancelable = false;
|
||||||
|
|
||||||
|
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||||
|
.setView(mBindings.getRoot())
|
||||||
|
.setCancelable(cancelable)
|
||||||
|
.setPositiveButton(R.string.ok, (dialog, which) -> {
|
||||||
|
var selectedArts = Stream.of(this.artsItemModels)
|
||||||
|
.filter(x -> x.getSelected().get())
|
||||||
|
.map(DialogChooseArtsFromMtbAartListItemModel::getOriginalModel)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
if(selectedArts.isEmpty()) {
|
||||||
|
if (this.onAbort != null) this.onAbort.run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.onConfirmed != null)
|
||||||
|
this.onConfirmed.run(selectedArts);
|
||||||
|
})
|
||||||
|
.setNegativeButton(R.string.abort, (dialog, which) -> {
|
||||||
|
if (this.onAbort != null) this.onAbort.run();
|
||||||
|
})
|
||||||
|
.create();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
alertDialog.setOnShowListener(this);
|
||||||
|
alertDialog.setCanceledOnTouchOutside(cancelable);
|
||||||
|
return alertDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onShow(DialogInterface dialogInterface) {
|
||||||
|
this.initList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initList() {
|
||||||
|
this.artsItemModels = Stream.of(this.mtbAarts)
|
||||||
|
.map(x -> new DialogChooseArtsFromMtbAartListItemModel()
|
||||||
|
.setCodMart(x.getCodMart())
|
||||||
|
.setDescrizione(x.getDescrizioneEstesa())
|
||||||
|
.setDiacod(x.getDiacod())
|
||||||
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
new LiveAdapter(this.artsItemModels, BR.item)
|
||||||
|
.map(DialogChooseArtsFromMtbAartListItemModel.class, R.layout.dialog_choose_arts_from_mtb_aart_list__item_model)
|
||||||
|
.into(this.mBindings.listaArts);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
|
public class DialogChooseArtsFromMtbAartListViewModel {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -38,10 +38,10 @@ import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromListaArtsLayoutBinding;
|
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromMtbColrListLayoutBinding;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
|
|
||||||
public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
public class DialogChooseArtsFromMtbColrList extends BaseDialogFragment {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
BarcodeRESTConsumer barcodeRESTConsumer;
|
BarcodeRESTConsumer barcodeRESTConsumer;
|
||||||
@ -51,23 +51,24 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
|
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
private DialogChooseArtsFromListaArtsLayoutBinding mBindings;
|
private DialogChooseArtsFromMtbColrListLayoutBinding mBindings;
|
||||||
private DialogChooseArtsFromListaArtsAdapter currentAdapter;
|
|
||||||
|
private DialogChooseArtsFromMtbColrListAdapter currentAdapter;
|
||||||
|
|
||||||
private final RunnableArgs<List<MtbColr>> mOnItemsChoosed;
|
private final RunnableArgs<List<MtbColr>> mOnItemsChoosed;
|
||||||
private final Runnable mOnAbort;
|
private final Runnable mOnAbort;
|
||||||
|
|
||||||
private final List<DialogChooseArtsFromListaArtsItemModel> mDataset;
|
private final List<DialogChooseArtsFromMtbColrListItemModel> mDataset;
|
||||||
|
|
||||||
private int mBarcodeScannerIstanceID;
|
private int mBarcodeScannerIstanceID;
|
||||||
private MtbAart selectedArt;
|
private MtbAart selectedArt;
|
||||||
|
|
||||||
public static DialogChooseArtsFromListaArts newInstance(List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
public static DialogChooseArtsFromMtbColrList newInstance(List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||||
return new DialogChooseArtsFromListaArts(listaMtbColr, onItemsChoosed, onAbort);
|
return new DialogChooseArtsFromMtbColrList(listaMtbColr, onItemsChoosed, onAbort);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DialogChooseArtsFromListaArts newInstance(List<MtbColr> listaMtbColr, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
public static DialogChooseArtsFromMtbColrList newInstance(List<MtbColr> listaMtbColr, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||||
DialogChooseArtsFromListaArts dialog = newInstance(listaMtbColr, onItemsChoosed, onAbort);
|
DialogChooseArtsFromMtbColrList dialog = newInstance(listaMtbColr, onItemsChoosed, onAbort);
|
||||||
dialog.setSelectedArt(mtbAart);
|
dialog.setSelectedArt(mtbAart);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
@ -76,7 +77,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
this.selectedArt = mtbAart;
|
this.selectedArt = mtbAart;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DialogChooseArtsFromListaArts(List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
private DialogChooseArtsFromMtbColrList(List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
mOnItemsChoosed = onItemsChoosed;
|
mOnItemsChoosed = onItemsChoosed;
|
||||||
@ -90,7 +91,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
mtbColr.setUntMis(mtbColr.getMtbAart().getUntMis());
|
mtbColr.setUntMis(mtbColr.getMtbAart().getUntMis());
|
||||||
}
|
}
|
||||||
|
|
||||||
mDataset.add(new DialogChooseArtsFromListaArtsItemModel().setMtbColr(mtbColr));
|
mDataset.add(new DialogChooseArtsFromMtbColrListItemModel().setMtbColr(mtbColr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +102,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
super.onCreateView(inflater, container, savedInstanceState);
|
super.onCreateView(inflater, container, savedInstanceState);
|
||||||
|
|
||||||
this.context = getActivity();
|
this.context = getActivity();
|
||||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_arts_from_lista_arts_layout, null, false);
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_arts_from_mtb_colr_list_layout, null, false);
|
||||||
mBindings.setLifecycleOwner(getViewLifecycleOwner());
|
mBindings.setLifecycleOwner(getViewLifecycleOwner());
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
@ -148,7 +149,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
mBindings.listaArts.setHasFixedSize(true);
|
mBindings.listaArts.setHasFixedSize(true);
|
||||||
mBindings.listaArts.setLayoutManager(new LinearLayoutManager(context));
|
mBindings.listaArts.setLayoutManager(new LinearLayoutManager(context));
|
||||||
|
|
||||||
currentAdapter = new DialogChooseArtsFromListaArtsAdapter(context, mDataset);
|
currentAdapter = new DialogChooseArtsFromMtbColrListAdapter(context, mDataset);
|
||||||
mBindings.listaArts.setAdapter(currentAdapter);
|
mBindings.listaArts.setAdapter(currentAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +204,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(newText) && newText.trim().length() > 2) {
|
if (!UtilityString.isNullOrEmpty(newText) && newText.trim().length() > 2) {
|
||||||
String finalNewText = newText;
|
String finalNewText = newText;
|
||||||
List<DialogChooseArtsFromListaArtsItemModel> foundRowsList = Stream.of(mDataset)
|
List<DialogChooseArtsFromMtbColrListItemModel> foundRowsList = Stream.of(mDataset)
|
||||||
.filter(x -> {
|
.filter(x -> {
|
||||||
String codMart = x.getMtbColr().getMtbAart().getCodMart().toLowerCase();
|
String codMart = x.getMtbColr().getMtbAart().getCodMart().toLowerCase();
|
||||||
String descrizioneArt = x.getMtbColr().getMtbAart().getDescrizioneEstesa().toLowerCase();
|
String descrizioneArt = x.getMtbColr().getMtbAart().getDescrizioneEstesa().toLowerCase();
|
||||||
@ -331,7 +332,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
private void searchArtInList(MtbAart mtbAart, Ean128Model ean128Model) {
|
private void searchArtInList(MtbAart mtbAart, Ean128Model ean128Model) {
|
||||||
removeListFilter();
|
removeListFilter();
|
||||||
|
|
||||||
List<DialogChooseArtsFromListaArtsItemModel> foundRowsList = Stream.of(mDataset)
|
List<DialogChooseArtsFromMtbColrListItemModel> foundRowsList = Stream.of(mDataset)
|
||||||
.filter(x -> x.getMtbColr().getMtbAart().getCodMart().equalsIgnoreCase(mtbAart.getCodMart()) &&
|
.filter(x -> x.getMtbColr().getMtbAart().getCodMart().equalsIgnoreCase(mtbAart.getCodMart()) &&
|
||||||
!x.isHidden())
|
!x.isHidden())
|
||||||
.toList();
|
.toList();
|
||||||
@ -348,7 +349,7 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
|
|
||||||
|
|
||||||
private void removeListFilter() {
|
private void removeListFilter() {
|
||||||
for (DialogChooseArtsFromListaArtsItemModel itemModel : mDataset) {
|
for (DialogChooseArtsFromMtbColrListItemModel itemModel : mDataset) {
|
||||||
itemModel.setHidden(false);
|
itemModel.setHidden(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,11 +1,12 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
@ -19,9 +20,9 @@ import it.integry.integrywmsnative.core.settings.SettingsManager;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromListaArtsItemModelBinding;
|
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromMtbColrListItemModelBinding;
|
||||||
|
|
||||||
public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<DialogChooseArtsFromListaArtsAdapter.ViewHolder> {
|
public class DialogChooseArtsFromMtbColrListAdapter extends RecyclerView.Adapter<DialogChooseArtsFromMtbColrListAdapter.ViewHolder> {
|
||||||
|
|
||||||
protected Context mContext;
|
protected Context mContext;
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
|||||||
private HashMap<CheckableMtbColr, Integer> mDatasetPositions = new HashMap<>();
|
private HashMap<CheckableMtbColr, Integer> mDatasetPositions = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
public DialogChooseArtsFromListaArtsAdapter(Context context, List<DialogChooseArtsFromListaArtsItemModel> myDataset) {
|
public DialogChooseArtsFromMtbColrListAdapter(Context context, List<DialogChooseArtsFromMtbColrListItemModel> myDataset) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
|
|
||||||
if(myDataset != null) {
|
if(myDataset != null) {
|
||||||
@ -63,10 +64,10 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
|||||||
|
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
private DialogChooseArtsFromListaArtsItemModelBinding mViewDataBinding;
|
private DialogChooseArtsFromMtbColrListItemModelBinding mViewDataBinding;
|
||||||
|
|
||||||
|
|
||||||
public ViewHolder(DialogChooseArtsFromListaArtsItemModelBinding v) {
|
public ViewHolder(DialogChooseArtsFromMtbColrListItemModelBinding v) {
|
||||||
super(v.getRoot());
|
super(v.getRoot());
|
||||||
mViewDataBinding = v;
|
mViewDataBinding = v;
|
||||||
}
|
}
|
||||||
@ -97,22 +98,22 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DialogChooseArtsFromListaArtsAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public DialogChooseArtsFromMtbColrListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
// create a new view
|
// create a new view
|
||||||
DialogChooseArtsFromListaArtsItemModelBinding viewDataBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.dialog_choose_arts_from_lista_arts__item_model, parent, false);
|
DialogChooseArtsFromMtbColrListItemModelBinding viewDataBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.dialog_choose_arts_from_mtb_colr_list__item_model, parent, false);
|
||||||
|
|
||||||
return new ViewHolder(viewDataBinding);
|
return new ViewHolder(viewDataBinding);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(DialogChooseArtsFromListaArtsAdapter.ViewHolder holder, int position) {
|
public void onBindViewHolder(DialogChooseArtsFromMtbColrListAdapter.ViewHolder holder, int position) {
|
||||||
CheckableMtbColr item = mDataset.get(position);
|
CheckableMtbColr item = mDataset.get(position);
|
||||||
holder.bind(item);
|
holder.bind(item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewRecycled(DialogChooseArtsFromListaArtsAdapter.ViewHolder holder) {
|
public void onViewRecycled(DialogChooseArtsFromMtbColrListAdapter.ViewHolder holder) {
|
||||||
super.onViewRecycled(holder);
|
super.onViewRecycled(holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface DialogChooseArtsFromMtbColrListComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
DialogChooseArtsFromMtbColrListComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(DialogChooseArtsFromMtbColrList dialogChooseArtsFromMtbColrList);
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
public class DialogChooseArtsFromListaArtsItemModel {
|
public class DialogChooseArtsFromMtbColrListItemModel {
|
||||||
|
|
||||||
private MtbColr mtbColr;
|
private MtbColr mtbColr;
|
||||||
private BindableBoolean hidden = new BindableBoolean(false);
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
@ -12,7 +12,7 @@ public class DialogChooseArtsFromListaArtsItemModel {
|
|||||||
return mtbColr;
|
return mtbColr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogChooseArtsFromListaArtsItemModel setMtbColr(MtbColr mtbColr) {
|
public DialogChooseArtsFromMtbColrListItemModel setMtbColr(MtbColr mtbColr) {
|
||||||
this.mtbColr = mtbColr;
|
this.mtbColr = mtbColr;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ public class DialogChooseArtsFromListaArtsItemModel {
|
|||||||
return hidden.get();
|
return hidden.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogChooseArtsFromListaArtsItemModel setHidden(boolean hidden) {
|
public DialogChooseArtsFromMtbColrListItemModel setHidden(boolean hidden) {
|
||||||
this.hidden.set(hidden);
|
this.hidden.set(hidden);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
|
||||||
|
@Module(subcomponents = DialogChooseArtsFromMtbColrListComponent.class)
|
||||||
|
public class DialogChooseArtsFromMtbColrListModule {
|
||||||
|
}
|
||||||
@ -9,8 +9,5 @@
|
|||||||
android:top="4dp" />
|
android:top="4dp" />
|
||||||
|
|
||||||
<corners
|
<corners
|
||||||
android:topLeftRadius="16dp"
|
android:radius="12dp" />
|
||||||
android:bottomLeftRadius="16dp"
|
|
||||||
android:topRightRadius="8dp"
|
|
||||||
android:bottomRightRadius="8dp" />
|
|
||||||
</shape>
|
</shape>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toStartOf="@id/qta_layout"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
<import type="android.view.View" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListItemModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:layout_marginVertical="4dp"
|
||||||
|
android:background="@drawable/bg_checked_layout"
|
||||||
|
android:onClick="@{() -> item.selected.toggle()}"
|
||||||
|
android:padding="8dp"
|
||||||
|
app:backgroundTintResID="@{item.selected.get() ? R.color.bg_checked_layout : android.R.color.transparent}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/checkbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:minWidth="0dp"
|
||||||
|
android:minHeight="0dp"
|
||||||
|
app:checked="@{item.selected}" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toStartOf="@id/qta_box"
|
||||||
|
android:layout_toEndOf="@id/checkbox"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{item.codMart}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="COD MART" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:background="@drawable/badge_round_corner"
|
||||||
|
android:backgroundTint="@color/orange_600"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(item.peso) + item.pesoUntMis}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{item.peso != null ? View.VISIBLE : View.GONE}"
|
||||||
|
tools:text="PESO KG" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{item.diacod}"
|
||||||
|
android:textColor="@color/red_600"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{UtilityString.isNullOrEmpty(item.diacod) ? View.GONE : View.VISIBLE}"
|
||||||
|
tools:text="DIACOD" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:text="@{item.descrizione}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="Descrizione lunga articolo" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/qta_box"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:background="@drawable/badge_round_corner"
|
||||||
|
android:backgroundTint="@color/colorPrimary"
|
||||||
|
android:visibility="@{item.qta != null ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(item.qta, 2)}"
|
||||||
|
tools:text="280.45" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@{item.qtaUntMis}"
|
||||||
|
tools:text="CONF" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</layout>
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingVertical="16dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:text="@string/dialog_choose_arts_from_lista_art" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/description_text"
|
||||||
|
style="@style/TextAppearance.Material3.BodyMedium"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="Description here" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/lista_arts"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/dialog_choose_art_from_lista_art__item_model"/>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</layout>
|
||||||
@ -57,7 +57,8 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/lista_arts"
|
android:id="@+id/lista_arts"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
|
tools:listitem="@layout/dialog_choose_art_from_lista_art__item_model"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -1,12 +1,12 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles 'consumer-rules.pro'
|
consumerProguardFiles 'consumer-rules.pro'
|
||||||
@ -33,9 +33,9 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.7.10'
|
kotlin_version = '1.7.21'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -12,12 +12,12 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.4.0'
|
classpath 'com.android.tools.build:gradle:7.4.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath 'com.google.gms:google-services:4.3.13'
|
classpath 'com.google.gms:google-services:4.3.15'
|
||||||
|
|
||||||
classpath 'com.google.firebase:perf-plugin:1.4.1'
|
classpath 'com.google.firebase:perf-plugin:1.4.2'
|
||||||
|
|
||||||
// Add the Firebase Crashlytics Gradle plugin.
|
// Add the Firebase Crashlytics Gradle plugin.
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|||||||
@ -3,7 +3,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
|
|||||||
@ -2,17 +2,23 @@ package it.integry.wms.dynamic_customization.extensions;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
import it.integry.integrywmsnative.core.class_router.interfaces.OrdiniVenditaInterface;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
|
||||||
public class OrdiniVendita implements IOrdiniVendita {
|
public class OrdiniVendita implements OrdiniVenditaInterface {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isTrasfOrder(List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Deprecated
|
||||||
public void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
// UtilityToast.showToast("Avviato metodo in BaseFeature");
|
// UtilityToast.showToast("Avviato metodo in BaseFeature");
|
||||||
|
|
||||||
|
|||||||
@ -19,5 +19,5 @@ dependencies {
|
|||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation project(':app')
|
implementation project(':app')
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package it.integry.wms.dynamic_customization.extensions;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
import it.integry.integrywmsnative.core.class_router.interfaces.OrdiniVenditaInterface;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
@ -11,15 +11,26 @@ import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
|||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
public class OrdiniVendita implements IOrdiniVendita {
|
public class OrdiniVendita implements OrdiniVenditaInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isTrasfOrder(List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||||
|
// Se il deposito del collo è diverso dal deposito dell'utente allora sto "evadendo"
|
||||||
|
// la merce per una vendita presente su un altro deposito
|
||||||
|
|
||||||
|
String codMdepOrder = testateOrdini.get(0).getCodMdep();
|
||||||
|
return !UtilityString.isNullOrEmpty(codMdepOrder) &&
|
||||||
|
!codMdepOrder.equalsIgnoreCase(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Deprecated
|
||||||
public void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String codMdepOrder = testateOrdini.get(0).getCodMdep();
|
String codMdepOrder = testateOrdini.get(0).getCodMdep();
|
||||||
|
|
||||||
//Se il deposito del collo è diverso dal deposito dell'utente allora sto "evadendo" la merce per una vendita presente
|
//Se il deposito del collo è diverso dal deposito dell'utente allora sto "evadendo" la merce
|
||||||
//su un altro deposito
|
// per una vendita presente su un altro deposito
|
||||||
if(!UtilityString.isNullOrEmpty(codMdepOrder) &&
|
if(!UtilityString.isNullOrEmpty(codMdepOrder) &&
|
||||||
!codMdepOrder.equalsIgnoreCase(SettingsManager.i().getUserSession().getDepo().getCodMdep())) {
|
!codMdepOrder.equalsIgnoreCase(SettingsManager.i().getUserSession().getDepo().getCodMdep())) {
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
@ -33,9 +33,9 @@ dependencies {
|
|||||||
// implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
// implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||||
|
|
||||||
implementation project(":honeywellsdk")
|
implementation project(":honeywellsdk")
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles 'consumer-rules.pro'
|
consumerProguardFiles 'consumer-rules.pro'
|
||||||
@ -32,7 +32,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -30,9 +30,9 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -32,9 +32,9 @@ dependencies {
|
|||||||
|
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user