Compare commits
256 Commits
develop
...
83fdb89a9e
| Author | SHA1 | Date | |
|---|---|---|---|
| 83fdb89a9e | |||
| d99fd542c2 | |||
| f245bb5d1e | |||
| 4bf974e7b6 | |||
| 95adc4bdc9 | |||
| 1247ff590b | |||
| adc76fe82c | |||
| 1c029242ac | |||
| b2aea70516 | |||
| cf2134de57 | |||
| caeabdb765 | |||
| ebea9d3a8f | |||
| ee5e80ccf4 | |||
| 9df5ac353c | |||
| 610d42328a | |||
| b01657de87 | |||
| fbef5b5cac | |||
| f2ef8ed241 | |||
| 0363f9c835 | |||
| 1c9604ffde | |||
| bf39eccf72 | |||
| cc14e8a55d | |||
| 892047ffd4 | |||
| 2bae112d80 | |||
| f2bab2f510 | |||
| 971e026488 | |||
| cb9ef169f8 | |||
| 5e27b8eaf0 | |||
| 200424fd34 | |||
| eea738b595 | |||
| ea765b591c | |||
| 07bf4982a1 | |||
| c4124226bd | |||
| 878ac418ed | |||
| a44d6610ef | |||
| 7d0448aa01 | |||
| c7cc197c4c | |||
| 0736278dc0 | |||
| e190e3de3b | |||
| dc7ac45c29 | |||
| cebd3b8a8f | |||
| a2b53f94c6 | |||
| 64407787d8 | |||
| ace4996c20 | |||
| 40e46e6aac | |||
| 5dc94cbd8f | |||
| c06c000e05 | |||
| 48818ec05f | |||
| 21bd503027 | |||
| fe581580b7 | |||
| 1856ad1f4a | |||
| 27ed85eb6c | |||
| c7d9231d27 | |||
| a808144896 | |||
| 601f823944 | |||
| a245497fcf | |||
| 4aeb37e4bc | |||
| dfe22a76cd | |||
| 24bc83b748 | |||
| 23c199d0b8 | |||
| 633f41e17d | |||
| d6f26b3971 | |||
| cfa527e19a | |||
| 572f75fe9e | |||
| aa6877c235 | |||
| 23332e1424 | |||
| fc2ffc6a62 | |||
| e5f79bf7e7 | |||
| 51c5c831ee | |||
| e79d80c2d3 | |||
| ae5c2c1b5a | |||
| bddb6e2bac | |||
| 7cfb0879af | |||
| ed4485a536 | |||
| 1db13de61d | |||
| 12388a6175 | |||
| a5a1febc0e | |||
| 0c77af962f | |||
| 4374dc243c | |||
| 26ee5c5fea | |||
| f4d2e12073 | |||
| 8acb8a04db | |||
| 05a5b3d6a3 | |||
| e889f1e264 | |||
| 40d9370e3a | |||
| 9c3e4f0481 | |||
| b93f5e5fa5 | |||
| 87b45c6c27 | |||
| 20f425354f | |||
| 805e939c43 | |||
| b9bfdb3b44 | |||
| acfe51e83a | |||
| e2a4a1ad67 | |||
| 136aa3bd9a | |||
| 6780f899d3 | |||
| 0e46e5fae3 | |||
| e35284f724 | |||
| b9de3e8b27 | |||
| 825eaaf840 | |||
| f1790c2595 | |||
| dafec91aff | |||
| d818994e3a | |||
| dec9f25c15 | |||
| 0f3cb16ef9 | |||
| fdf719982f | |||
| 5d09453c39 | |||
| f71d4e56e6 | |||
| cf2f9e5ffd | |||
| 1f5a628eb1 | |||
| 01b91adc61 | |||
| db3641668a | |||
| 4d81b24fd4 | |||
| 8f420111fc | |||
| a20470c0f9 | |||
| 31cee18b37 | |||
| ca9c62bc80 | |||
| dd2c19f12a | |||
| 36b6ba7ddd | |||
| 3b3ab8e7c5 | |||
| 404716d269 | |||
| aa1c3b877d | |||
| 65e7d26655 | |||
| 3ade0879f5 | |||
| 4d267acad4 | |||
| 7c90a9b2fd | |||
| babc0d1736 | |||
| 704caa3ab2 | |||
| 63552f6314 | |||
| 60c3dd4eca | |||
| 6776a1e521 | |||
| 7d130ae1eb | |||
| 25e3a5ddc4 | |||
| d44b726a66 | |||
| 3d3113d2bf | |||
| e917b2a413 | |||
| 96f827b692 | |||
| a41c09e980 | |||
| 7961508de3 | |||
| 3dcfe4773c | |||
| cc8b7de428 | |||
| 4bf1b2a1e9 | |||
| 5e7af4ced4 | |||
| b8bb20ce0d | |||
| b0567e4eaa | |||
| b7e74d9bdc | |||
| fd88e5cd64 | |||
| 370c0b47bd | |||
| 04071f3bad | |||
| 4901097f99 | |||
| 6e02aec5e0 | |||
| 548cdd562a | |||
| 70a819ec83 | |||
| afd7ae25f3 | |||
| 74b3613555 | |||
| 1f1011e628 | |||
| 3a8debdbc4 | |||
| 143b8a5bda | |||
| d32c96818e | |||
| 20bc5c6da2 | |||
| cfc19b00f0 | |||
| c2d82d0806 | |||
| ae86a5cde8 | |||
| 0a55c644d7 | |||
| 417172b31c | |||
| bae4d1acac | |||
| d5a86327d8 | |||
| fef03ebfbc | |||
| 448f361cd3 | |||
| 7aa5960f87 | |||
| 205ba184d3 | |||
| f759b20f96 | |||
| c845689ec8 | |||
| 4479779e4a | |||
| a35b3b7fc4 | |||
| 5b31e2c6a9 | |||
| 6365cbfd5b | |||
| 9dbfa812c1 | |||
| 2eb637e4bd | |||
| de91c7a8ec | |||
| c9bfd52586 | |||
| f3113a423c | |||
| 27e368f780 | |||
| e530c0dda9 | |||
| a3fbbb6dcc | |||
| d3931a116a | |||
| 189c11c27f | |||
| 75662bd8ae | |||
| 763c96c7dc | |||
| 178b458030 | |||
| 917a810a59 | |||
| b69a053323 | |||
| 4da012b33c | |||
| c5ae374854 | |||
| d1b9e22673 | |||
| 6edeba3246 | |||
| 7f9ebb3bc9 | |||
| 20783026b8 | |||
| 99fb9f1d6a | |||
| 86632940eb | |||
| 53168632e7 | |||
| 06f59bfaaa | |||
| c83f75c5e4 | |||
| 185246597b | |||
| 141147aee1 | |||
| 525570d918 | |||
| 49b4039bbe | |||
| 7a99df44c9 | |||
| 81ce09e605 | |||
| 67936a3787 | |||
| 9bf0dacda6 | |||
| f4c64e5f04 | |||
| d54939d058 | |||
| a8674cb31e | |||
| d9070ee5fb | |||
| b3afc404f0 | |||
| 168c4e4fb7 | |||
| 1991be79d6 | |||
| c2a2983606 | |||
| 9866d5c4fd | |||
| ee3728436c | |||
| ed5c6c6b2f | |||
| 9c6c17ffa3 | |||
| c823692a72 | |||
| 1fe4437163 | |||
| 4500696bcd | |||
| 17b0454f8b | |||
| b9bbbabc5c | |||
| 4633a54152 | |||
| 5dbb03531d | |||
| 5e00329292 | |||
| 6b24111b39 | |||
| c2fe657bcf | |||
| ad026cbd6b | |||
| 5481e25483 | |||
| c7c151045d | |||
| 61dc5fc9a4 | |||
| 3440ecd4f1 | |||
| f6c7d98efa | |||
| e8821b0caf | |||
| 627a0b402b | |||
| ab9353dee6 | |||
| e956895e8c | |||
| 724a63acc1 | |||
| 3a5312d661 | |||
| 06dbae0ac5 | |||
| 603fd59b05 | |||
| ebbd515a34 | |||
| fd89c6394f | |||
| d72f685e01 | |||
| ea1f39a9db | |||
| 518e6f0853 | |||
| ce902cd2be | |||
| fde266922b | |||
| 0180500e9a | |||
| 40d35bb4df | |||
| 1802ab5a2e |
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2025-10-02T11:26:10.944286600Z">
|
<DropdownSelection timestamp="2025-06-10T08:33:51.753564600Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=7da0808" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|||||||
13
.idea/deviceManager.xml
generated
Normal file
13
.idea/deviceManager.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DeviceTable">
|
||||||
|
<option name="columnSorters">
|
||||||
|
<list>
|
||||||
|
<ColumnSorterState>
|
||||||
|
<option name="column" value="Name" />
|
||||||
|
<option name="order" value="ASCENDING" />
|
||||||
|
</ColumnSorterState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
135
.idea/fileTemplates/Android Dialog.java
generated
135
.idea/fileTemplates/Android Dialog.java
generated
@@ -1,20 +1,21 @@
|
|||||||
#set( $regex = "([a-z])([A-Z]+)")
|
#set( $regex = "([a-z])([A-Z]+)")
|
||||||
#set( $replacement = "$1_$2")
|
#set( $replacement = "$1_$2")
|
||||||
#set( $dashName = $NAME.replaceAll($regex, $replacement).toLowerCase())
|
#set( $dashName = $NAME.replaceAll($regex, $replacement).toLowerCase())
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.content.DialogInterface;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseMaterialAlertDialogBuilder;
|
||||||
|
|
||||||
public class Dialog${NAME}View extends BaseDialogFragment {
|
public class Dialog${NAME}View extends BaseMaterialAlertDialogBuilder implements DialogInterface.OnShowListener, DialogInterface.OnDismissListener {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Create the following layout resource file [dialog_${dashName}.xml]
|
Create the following layout resource file [dialog_${dashName}.xml]
|
||||||
@@ -78,54 +79,112 @@ Create the following layout resource file [dialog_${dashName}.xml]
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
//Pass here all external parameters
|
//Pass here all external parameters
|
||||||
public static Dialog${NAME}View newInstance() {
|
public static Dialog${NAME}View newInstance(@NonNull Context context) {
|
||||||
return new Dialog${NAME}View();
|
return new Dialog${NAME}View(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dialog${NAME}View() {
|
/*
|
||||||
super();
|
- Add following lines into MainApplicationComponent
|
||||||
|
|
||||||
|
[a] into @Component
|
||||||
|
Dialog${NAME}Module.class
|
||||||
|
|
||||||
|
[b] into interface body
|
||||||
|
Dialog${NAME}Component.Factory dialog${NAME}Component();
|
||||||
|
*/
|
||||||
|
|
||||||
|
private Dialog${NAME}View(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
this.mContext = context;
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
.dialog${NAME}Component()
|
.dialog${NAME}Component()
|
||||||
.create()
|
.create()
|
||||||
.inject(this);
|
.inject(this);
|
||||||
|
|
||||||
|
//mBindings = Dialog${NAME}Binding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||||
|
|
||||||
|
if (context instanceof LifecycleOwner) {
|
||||||
|
//mBindings.setLifecycleOwner((LifecycleOwner) context);
|
||||||
|
}
|
||||||
|
|
||||||
|
setCancelable(true);
|
||||||
|
|
||||||
|
setView(mBindings.getRoot());
|
||||||
|
|
||||||
|
/*
|
||||||
|
setPositiveButton(R.string.ok, (dialog, which) -> {
|
||||||
|
onOk();
|
||||||
|
});
|
||||||
|
|
||||||
|
setNegativeButton(R.string.abort, (dialog, which) -> {
|
||||||
|
onKo();
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
//this.setupBarcode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
public AlertDialog create() {
|
||||||
this.mContext = requireContext();
|
AlertDialog alertDialog = super.create();
|
||||||
|
alertDialog.setCanceledOnTouchOutside(false);
|
||||||
//mBindings = Dialog${NAME}Binding.inflate(LayoutInflater.from(this.mContext), null, false);
|
|
||||||
//mBindings.setLifecycleOwner(this);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
- Add following lines into MainApplicationComponent
|
|
||||||
|
|
||||||
[a] into @Component
|
|
||||||
Dialog${NAME}Module.class
|
|
||||||
|
|
||||||
[b] into interface body
|
|
||||||
Dialog${NAME}Component.Factory dialog${NAME}Component();
|
|
||||||
*/
|
|
||||||
|
|
||||||
setCancelable(false);
|
|
||||||
|
|
||||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
|
||||||
.setView(mBindings.getRoot())
|
|
||||||
.setCancelable(isCancelable())
|
|
||||||
.create();
|
|
||||||
|
|
||||||
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
|
||||||
alertDialog.setOnShowListener(this);
|
alertDialog.setOnShowListener(this);
|
||||||
|
alertDialog.setOnDismissListener(this);
|
||||||
return alertDialog;
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dismiss() {
|
public void onShow(DialogInterface dialogInterface) {
|
||||||
if(getDialog() != null) getDialog().dismiss();
|
//Init here all data or lists
|
||||||
|
//this.initList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(DialogInterface dialog) {
|
||||||
|
//BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
private void setupBarcode() {
|
||||||
|
BarcodeManager.enable(mBarcodeScannerInstanceID);
|
||||||
|
|
||||||
|
mBarcodeScannerInstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessful(onScanSuccessfull)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getContext(), ex, false)));
|
||||||
|
|
||||||
|
super.initBarcodeManager(mBarcodeScannerInstanceID);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static class Result {
|
||||||
|
private final Object returnData;
|
||||||
|
private final boolean isAborted;
|
||||||
|
|
||||||
|
private Result(Object returnData, boolean isAborted) {
|
||||||
|
this.returnData = returnData;
|
||||||
|
this.isAborted = isAborted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Result completed(Object returnData) {
|
||||||
|
return new Result(returnData, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Result aborted() {
|
||||||
|
return new Result(null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAborted() {
|
||||||
|
return isAborted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getReturnData() {
|
||||||
|
return returnData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ android {
|
|||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
ext.enableCrashlytics = false
|
ext.enableCrashlytics = false
|
||||||
// minifyEnabled true // Abilita la minimizzazione del codice
|
minifyEnabled true // Abilita la minimizzazione del codice
|
||||||
// shrinkResources true // Rimuove risorse non utilizzate
|
// shrinkResources true // Rimuove risorse non utilizzate
|
||||||
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
@@ -121,9 +121,9 @@ dependencies {
|
|||||||
implementation 'com.google.android.gms:play-services-basement:18.7.1'
|
implementation 'com.google.android.gms:play-services-basement:18.7.1'
|
||||||
|
|
||||||
//JJWT
|
//JJWT
|
||||||
implementation 'io.jsonwebtoken:jjwt-api:0.13.0'
|
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
|
||||||
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'
|
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
|
||||||
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'
|
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.7.1'
|
implementation 'androidx.appcompat:appcompat:1.7.1'
|
||||||
implementation 'com.google.android.material:material:1.12.0'
|
implementation 'com.google.android.material:material:1.12.0'
|
||||||
@@ -141,11 +141,11 @@ dependencies {
|
|||||||
implementation 'com.squareup.retrofit2:retrofit:3.0.0'
|
implementation 'com.squareup.retrofit2:retrofit:3.0.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
|
implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
|
||||||
implementation 'com.annimon:stream:1.2.2'
|
implementation 'com.annimon:stream:1.2.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.9.3'
|
implementation 'androidx.lifecycle:lifecycle-runtime:2.9.1'
|
||||||
implementation 'org.apache.commons:commons-text:1.14.0'
|
implementation 'org.apache.commons:commons-text:1.13.1'
|
||||||
|
|
||||||
//MVVM
|
//MVVM
|
||||||
def dagger2_version = '2.57.1'
|
def dagger2_version = '2.56.2'
|
||||||
implementation "com.google.dagger:dagger:$dagger2_version"
|
implementation "com.google.dagger:dagger:$dagger2_version"
|
||||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||||
implementation "com.google.dagger:dagger-android:$dagger2_version"
|
implementation "com.google.dagger:dagger-android:$dagger2_version"
|
||||||
|
|||||||
32
app/proguard-rules.pro
vendored
32
app/proguard-rules.pro
vendored
@@ -18,13 +18,20 @@
|
|||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
# Uncomment this to preserve the line number information for
|
||||||
# debugging stack traces.
|
# debugging stack traces.
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
||||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||||
|
|
||||||
|
-dontwarn android.os.ServiceManager
|
||||||
|
|
||||||
|
|
||||||
|
-keep class io.jsonwebtoken.** { *; }
|
||||||
|
-dontwarn io.jsonwebtoken.**
|
||||||
|
|
||||||
-keep class * extends com.google.gson.TypeAdapter
|
-keep class * extends com.google.gson.TypeAdapter
|
||||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||||
-keep class * implements com.google.gson.JsonSerializer
|
-keep class * implements com.google.gson.JsonSerializer
|
||||||
@@ -41,8 +48,25 @@
|
|||||||
-keepnames interface io.jsonwebtoken.* { *; }
|
-keepnames interface io.jsonwebtoken.* { *; }
|
||||||
|
|
||||||
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
||||||
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
-keep,allowshrinking class com.google.gson.reflect.TypeToken
|
||||||
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
-keep,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
||||||
|
-keep,allowshrinking class com.google.common.reflect.TypeToken
|
||||||
|
-keep,allowshrinking class * extends com.google.common.reflect.TypeToken
|
||||||
|
|
||||||
-keep class it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
-keep class it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
||||||
-keep class * extends it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
-keep class * extends it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
||||||
|
-keep class * extends it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.BaseDialogRowInfoView { *; }
|
||||||
|
-keep class * implements it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface { *; }
|
||||||
|
|
||||||
|
# Regole ProGuard per Gson e classi modello
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes InnerClasses
|
||||||
|
|
||||||
|
# Se usi ObservableArrayList o altre classi specifiche di AndroidX Data Binding con Gson,
|
||||||
|
# potresti aver bisogno di mantenerle esplicitamente se non sono coperte sopra.
|
||||||
|
-keep class androidx.databinding.ObservableArrayList { *; }
|
||||||
|
-keepclassmembers class androidx.databinding.ObservableArrayList { *; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-keep class * implements it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAskClienteViewModel { *; }
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,9 @@
|
|||||||
<manifest xmlns:tools="http://schemas.android.com/tools"
|
<manifest xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<uses-feature android:name="android.hardware.camera"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
@@ -56,7 +59,6 @@
|
|||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY" />
|
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
@@ -81,6 +83,12 @@
|
|||||||
android:windowSoftInputMode="adjustNothing"
|
android:windowSoftInputMode="adjustNothing"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"/>
|
android:configChanges="orientation|screenSize|keyboardHidden"/>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".gest.trasferimento_pedane.edit.TrasferimentoPedaneEditActivity"
|
||||||
|
android:label="@string/activity_trasferimento_pedane_edit_title"
|
||||||
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="firebase_crashlytics_collection_enabled"
|
android:name="firebase_crashlytics_collection_enabled"
|
||||||
android:value="true" />
|
android:value="true" />
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentComponent;
|
|||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseMaterialAlertDialogBuilderComponent;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoComponent;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoComponent;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoModule;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoModule;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingComponent;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingComponent;
|
||||||
@@ -103,10 +104,20 @@ import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazi
|
|||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloModule;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloModule;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdComponent;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdComponent;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdModule;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdModule;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.TrasferimentoPedaneComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.TrasferimentoPedaneModule;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.dialog.confirm_export.DialogTrasferimentoPedaneConfirmExportComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.dialog.confirm_export.DialogTrasferimentoPedaneConfirmExportModule;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.edit.TrasferimentoPedaneEditComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.edit.TrasferimentoPedaneEditModule;
|
||||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteComponent;
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteComponent;
|
||||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteModule;
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteModule;
|
||||||
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.dialog.DialogUltimeConsegneFiltroAvanzatoComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.dialog.DialogUltimeConsegneFiltroAvanzatoModule;
|
||||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreComponent;
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreComponent;
|
||||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreModule;
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreModule;
|
||||||
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.dialog.DialogUltimiArriviFornitoreFiltroAvanzatoComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.dialog.DialogUltimiArriviFornitoreFiltroAvanzatoModule;
|
||||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceComponent;
|
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceComponent;
|
||||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceModule;
|
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceModule;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__item_edit.BottomSheetItemEditComponent;
|
import it.integry.integrywmsnative.view.bottom_sheet__item_edit.BottomSheetItemEditComponent;
|
||||||
@@ -118,6 +129,8 @@ import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModu
|
|||||||
import it.integry.integrywmsnative.view.dialogs.ask_commessa.DialogAskCommessaComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_commessa.DialogAskCommessaComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoModule;
|
import it.integry.integrywmsnative.view.dialogs.ask_deposito.DialogAskDepositoModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_info_trasferimento.DialogAskInfoTrasferimentoComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_info_trasferimento.DialogAskInfoTrasferimentoModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdModule;
|
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_livello_posizione.DialogAskLivelloPosizioneComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_livello_posizione.DialogAskLivelloPosizioneComponent;
|
||||||
@@ -162,6 +175,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtComponent;
|
|||||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.select_position_of_lu.DialogSelectPositionOfLuComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.select_position_of_lu.DialogSelectPositionOfLuModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoComponent;
|
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoModule;
|
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiComponent;
|
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiComponent;
|
||||||
@@ -254,6 +269,14 @@ import it.integry.integrywmsnative.view.dialogs.update_available.DialogUpdateAva
|
|||||||
DialogExtraInfoModule.class,
|
DialogExtraInfoModule.class,
|
||||||
DialogAskDepositoModule.class,
|
DialogAskDepositoModule.class,
|
||||||
DialogChooseArtFromListaArtsModule.class,
|
DialogChooseArtFromListaArtsModule.class,
|
||||||
|
DialogUltimeConsegneFiltroAvanzatoModule.class,
|
||||||
|
DialogUltimiArriviFornitoreFiltroAvanzatoModule.class,
|
||||||
|
DialogSelectPositionOfLuModule.class,
|
||||||
|
TrasferimentoPedaneModule.class,
|
||||||
|
DialogAskInfoTrasferimentoModule.class,
|
||||||
|
TrasferimentoPedaneEditModule.class,
|
||||||
|
DialogTrasferimentoPedaneConfirmExportModule.class,
|
||||||
|
DialogChooseArtFromListaArtsModule.class,
|
||||||
DialogDeviceEndOfLifeModule.class
|
DialogDeviceEndOfLifeModule.class
|
||||||
})
|
})
|
||||||
public interface MainApplicationComponent {
|
public interface MainApplicationComponent {
|
||||||
@@ -264,6 +287,8 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
BaseDialogFragmentComponent.Factory baseDialogFragmentComponent();
|
BaseDialogFragmentComponent.Factory baseDialogFragmentComponent();
|
||||||
|
|
||||||
|
BaseMaterialAlertDialogBuilderComponent.Factory baseMaterialAlertDialogComponent();
|
||||||
|
|
||||||
SplashActivityComponent.Factory splashActivityComponent();
|
SplashActivityComponent.Factory splashActivityComponent();
|
||||||
|
|
||||||
LoginComponent.Factory loginActivityComponent();
|
LoginComponent.Factory loginActivityComponent();
|
||||||
@@ -425,6 +450,20 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
DialogChooseArtFromListaArtsComponent.Factory dialogChooseArtFromListaArtsComponent();
|
DialogChooseArtFromListaArtsComponent.Factory dialogChooseArtFromListaArtsComponent();
|
||||||
|
|
||||||
|
DialogUltimeConsegneFiltroAvanzatoComponent.Factory dialogUltimeConsegneFiltroAvanzatoComponent();
|
||||||
|
|
||||||
|
DialogUltimiArriviFornitoreFiltroAvanzatoComponent.Factory dialogUltimiArriviFornitoreFiltroAvanzatoComponent();
|
||||||
|
|
||||||
|
DialogSelectPositionOfLuComponent.Factory dialogSelectPositionOfLuComponent();
|
||||||
|
|
||||||
|
TrasferimentoPedaneComponent.Factory trasferimentoPedaneComponent();
|
||||||
|
|
||||||
|
DialogAskInfoTrasferimentoComponent.Factory dialogAskInfoTrasferimentoComponent();
|
||||||
|
|
||||||
|
TrasferimentoPedaneEditComponent.Factory traferimentoPedaneEditComponent();
|
||||||
|
|
||||||
|
DialogTrasferimentoPedaneConfirmExportComponent.Factory dialogTrasferimentoPedaneConfirmExportComponent();
|
||||||
|
|
||||||
DialogDeviceEndOfLifeComponent.Factory dialogDeviceEndOfLifeComponent();
|
DialogDeviceEndOfLifeComponent.Factory dialogDeviceEndOfLifeComponent();
|
||||||
|
|
||||||
void inject(MainApplication mainApplication);
|
void inject(MainApplication mainApplication);
|
||||||
|
|||||||
@@ -200,8 +200,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
MesRESTConsumer provideMesRESTConsumer(RESTBuilder restBuilder, SystemRESTConsumer systemRESTConsumer) {
|
MesRESTConsumer provideMesRESTConsumer(ExecutorService executorService, RESTBuilder restBuilder, SystemRESTConsumer systemRESTConsumer) {
|
||||||
return new MesRESTConsumer(restBuilder, systemRESTConsumer);
|
return new MesRESTConsumer(executorService, restBuilder, systemRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -241,8 +241,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
PrinterRESTConsumer providePrinterRESTConsumer(RESTBuilder restBuilder) {
|
PrinterRESTConsumer providePrinterRESTConsumer(ExecutorService executorService, RESTBuilder restBuilder) {
|
||||||
return new PrinterRESTConsumer(restBuilder);
|
return new PrinterRESTConsumer(executorService, restBuilder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -319,8 +319,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliAccettazioneRESTConsumer provideColliAccettazioneRESTConsumer(RESTBuilder restBuilder) {
|
ColliAccettazioneRESTConsumer provideColliAccettazioneRESTConsumer(ExecutorService executorService, RESTBuilder restBuilder) {
|
||||||
return new ColliAccettazioneRESTConsumer(restBuilder);
|
return new ColliAccettazioneRESTConsumer(executorService, restBuilder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|||||||
@@ -190,11 +190,11 @@ public class SplashActivity extends BaseActivity implements MainContext.Listener
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Spanned message) {
|
public void onError(Spanned message) {
|
||||||
handler.post(() -> {
|
handler.post(() -> {
|
||||||
DialogSimpleMessageView.makeErrorDialog(
|
DialogSimpleMessageView.makeErrorDialog(this,
|
||||||
message, null, this::finish, R.string.logout, () -> {
|
message, null, this::finish, R.string.logout, () -> {
|
||||||
this.mainContext.logout(MainApplication::exit);
|
this.mainContext.logout(MainApplication::exit);
|
||||||
})
|
})
|
||||||
.show(this.getSupportFragmentManager(), "tag");
|
.show();
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.barcode_reader;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
@@ -139,25 +140,34 @@ public class BarcodeManager {
|
|||||||
|
|
||||||
public static void disable(int instanceId) {
|
public static void disable(int instanceId) {
|
||||||
mBarcodeCallbacksStacktrace.stream().filter(x -> x.getID() == instanceId)
|
mBarcodeCallbacksStacktrace.stream().filter(x -> x.getID() == instanceId)
|
||||||
.findFirst().ifPresent(x -> x.setEnabled(false));
|
.findFirst().ifPresent(x -> {
|
||||||
|
x.setEnabled(false);
|
||||||
|
Log.d("BarcodeManager", "Disabled callback " + x.getID() + ": " + x.getOnScanSuccessfull());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void disableLastCallback() {
|
public static void disableLastCallback() {
|
||||||
BarcodeCallbackDTO validCallback = getValidCallback();
|
BarcodeCallbackDTO validCallback = getValidCallback();
|
||||||
if (validCallback != null) {
|
if (validCallback != null) {
|
||||||
validCallback.setEnabled(false);
|
validCallback.setEnabled(false);
|
||||||
|
// Log.d("BarcodeManager", "Last callback disabled: " + validCallback.getOnScanSuccessfull());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void enable(int instanceId) {
|
public static void enable(int instanceId) {
|
||||||
mBarcodeCallbacksStacktrace.stream().filter(x -> x.getID() == instanceId)
|
mBarcodeCallbacksStacktrace.stream().filter(x -> x.getID() == instanceId)
|
||||||
.findFirst().ifPresent(x -> x.setEnabled(true));
|
.findFirst()
|
||||||
|
.ifPresent(x -> {
|
||||||
|
x.setEnabled(true);
|
||||||
|
// Log.d("BarcodeManager", "Enabled callback " + x.getID() + ": " + x.getOnScanSuccessfull());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void enableLastCallback() {
|
public static void enableLastCallback() {
|
||||||
BarcodeCallbackDTO validCallback = getValidCallback();
|
BarcodeCallbackDTO validCallback = getValidCallback();
|
||||||
if (validCallback != null) {
|
if (validCallback != null) {
|
||||||
validCallback.setEnabled(true);
|
validCallback.setEnabled(true);
|
||||||
|
Log.d("BarcodeManager", "Last callback enabled: " + validCallback.getOnScanSuccessfull());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigl
|
|||||||
import it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeFragment;
|
import it.integry.integrywmsnative.gest.pv_verifica_giacenze.VerificaGiacenzeFragment;
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloView;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloView;
|
||||||
|
import it.integry.integrywmsnative.gest.trasferimento_pedane.TrasferimentoPedaneFragment;
|
||||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
||||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
||||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;
|
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;
|
||||||
@@ -230,6 +231,14 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setDrawerIcon(R.drawable.ic_black_empty_box)
|
.setDrawerIcon(R.drawable.ic_black_empty_box)
|
||||||
.setFragmentFactory(ArticoliInGiacenzaFragment::newInstance))
|
.setFragmentFactory(ArticoliInGiacenzaFragment::newInstance))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_trasferimento_pedane)
|
||||||
|
.setCodMenu("MG076")
|
||||||
|
.setTitleText(R.string.trasferimento_pedane_title)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_trasferimento_pedane)
|
||||||
|
.setDrawerIcon(R.drawable.ic_black_empty_box)
|
||||||
|
.setFragmentFactory(TrasferimentoPedaneFragment::newInstance))
|
||||||
|
|
||||||
).addGroup(
|
).addGroup(
|
||||||
new MenuGroup()
|
new MenuGroup()
|
||||||
.setCodMenu("MM012")
|
.setCodMenu("MM012")
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.data_recover;
|
package it.integry.integrywmsnative.core.data_recover;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
@@ -7,13 +9,26 @@ import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
|||||||
|
|
||||||
public class ColliDataRecoverDTO {
|
public class ColliDataRecoverDTO {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|
||||||
|
@SerializedName("numCollo")
|
||||||
private int numCollo;
|
private int numCollo;
|
||||||
|
|
||||||
|
@SerializedName("serCollo")
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
|
|
||||||
|
@SerializedName("dataCollo")
|
||||||
private String dataCollo;
|
private String dataCollo;
|
||||||
|
|
||||||
|
@SerializedName("gestioneCollo")
|
||||||
private String gestioneCollo;
|
private String gestioneCollo;
|
||||||
|
|
||||||
|
@SerializedName("filtro")
|
||||||
private String filtro;
|
private String filtro;
|
||||||
|
|
||||||
|
@SerializedName("testateOrdini")
|
||||||
private List<OrdineUscitaInevasoDTO> testateOrdini;
|
private List<OrdineUscitaInevasoDTO> testateOrdini;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.TrasferimentoPedaneDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.TrasferimentoPedaneRowDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||||
@@ -32,6 +34,8 @@ import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDT
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneRowEntity;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeEntity;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRowEntity;
|
||||||
|
|
||||||
@@ -45,9 +49,11 @@ import it.integry.integrywmsnative.core.data_store.db.entity.VerificaGiacenzeRow
|
|||||||
InventarioEntity.class,
|
InventarioEntity.class,
|
||||||
InventarioRowRoomDTO.class,
|
InventarioRowRoomDTO.class,
|
||||||
VerificaGiacenzeEntity.class,
|
VerificaGiacenzeEntity.class,
|
||||||
VerificaGiacenzeRowEntity.class
|
VerificaGiacenzeRowEntity.class,
|
||||||
|
TrasferimentoPedaneEntity.class,
|
||||||
|
TrasferimentoPedaneRowEntity.class
|
||||||
},
|
},
|
||||||
version = 18)
|
version = 21)
|
||||||
@TypeConverters({
|
@TypeConverters({
|
||||||
DateConverter.class,
|
DateConverter.class,
|
||||||
BigDecimalConverter.class,
|
BigDecimalConverter.class,
|
||||||
@@ -77,7 +83,10 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
.addMigrations(MIGRATION_14_15)
|
.addMigrations(MIGRATION_14_15)
|
||||||
.addMigrations(MIGRATION_15_16)
|
.addMigrations(MIGRATION_15_16)
|
||||||
.addMigrations(MIGRATION_16_17)
|
.addMigrations(MIGRATION_16_17)
|
||||||
.addMigrations(MIGRATION_17_18);
|
.addMigrations(MIGRATION_17_18)
|
||||||
|
.addMigrations(MIGRATION_18_19)
|
||||||
|
.addMigrations(MIGRATION_19_20)
|
||||||
|
.addMigrations(MIGRATION_20_21);
|
||||||
|
|
||||||
sInstance = builder.build();
|
sInstance = builder.build();
|
||||||
}
|
}
|
||||||
@@ -106,6 +115,10 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
|
|
||||||
public abstract VerificaGiacenzeRowDao verificaGiacenzeRowDao();
|
public abstract VerificaGiacenzeRowDao verificaGiacenzeRowDao();
|
||||||
|
|
||||||
|
public abstract TrasferimentoPedaneDao trasferimentoPedaneDao();
|
||||||
|
|
||||||
|
public abstract TrasferimentoPedaneRowDao trasferimentoPedaneRowDao();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||||
@@ -172,11 +185,13 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
database.execSQL("CREATE UNIQUE INDEX IF NOT EXISTS index_articoli_ordine_id_ordine_cod_mart ON articoli_ordine (id_ordine, cod_mart);");
|
database.execSQL("CREATE UNIQUE INDEX IF NOT EXISTS index_articoli_ordine_id_ordine_cod_mart ON articoli_ordine (id_ordine, cod_mart);");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static final Migration MIGRATION_15_16 = new Migration(15, 16) {
|
static final Migration MIGRATION_15_16 = new Migration(15, 16) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static final Migration MIGRATION_16_17 = new Migration(16, 17) {
|
static final Migration MIGRATION_16_17 = new Migration(16, 17) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
@@ -193,6 +208,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
database.execSQL("DROP TABLE _inventario_rows_old;");
|
database.execSQL("DROP TABLE _inventario_rows_old;");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static final Migration MIGRATION_17_18 = new Migration(17, 18) {
|
static final Migration MIGRATION_17_18 = new Migration(17, 18) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
@@ -217,4 +233,68 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
database.execSQL("CREATE INDEX IF NOT EXISTS index_verifica_giacenze_rows_parent_id ON verifica_giacenze_rows (parent_id)");
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_verifica_giacenze_rows_parent_id ON verifica_giacenze_rows (parent_id)");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static final Migration MIGRATION_18_19 = new Migration(18, 19) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
database.execSQL("CREATE TABLE IF NOT EXISTS trasferimento_pedane (" +
|
||||||
|
"cod_mdep_dest TEXT NOT NULL, " +
|
||||||
|
"descrizione_depo_dest TEXT NOT NULL, " +
|
||||||
|
"created_at INTEGER DEFAULT CURRENT_TIMESTAMP, " +
|
||||||
|
"status INTEGER NOT NULL, " +
|
||||||
|
"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
|
||||||
|
"remote_sync_date INTEGER);");
|
||||||
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_trasferimento_pedane__id ON trasferimento_pedane (_id);");
|
||||||
|
|
||||||
|
database.execSQL("CREATE TABLE IF NOT EXISTS trasferimento_pedane_rows (" +
|
||||||
|
"parent_id INTEGER, " +
|
||||||
|
"barcode_ul TEXT NOT NUll, " +
|
||||||
|
"progressivo_ul INTEGER, " +
|
||||||
|
"created_at INTEGER DEFAULT CURRENT_TIMESTAMP, " +
|
||||||
|
"flag_inconsistent INTEGER NOT NULL DEFAULT 0, " +
|
||||||
|
"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
|
||||||
|
"remote_sync_date INTEGER," +
|
||||||
|
"FOREIGN KEY(parent_id) REFERENCES trasferimento_pedane(_id) ON UPDATE NO ACTION ON DELETE CASCADE );");
|
||||||
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_trasferimento_pedane_rows__id ON trasferimento_pedane_rows (_id)");
|
||||||
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_trasferimento_pedane_rows_parent_id ON trasferimento_pedane_rows (parent_id)");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static final Migration MIGRATION_19_20 = new Migration(19, 20) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
database.execSQL("DROP TABLE IF EXISTS trasferimento_pedane_rows;");
|
||||||
|
database.execSQL("CREATE TABLE IF NOT EXISTS trasferimento_pedane_rows (" +
|
||||||
|
"parent_id INTEGER NOT NULL, " +
|
||||||
|
"barcode_ul TEXT NOT NULL, " +
|
||||||
|
"progressivo_ul INTEGER NOT NULL, " +
|
||||||
|
"flag_inconsistent INTEGER NOT NULL DEFAULT 0, " +
|
||||||
|
"created_at INTEGER DEFAULT CURRENT_TIMESTAMP, " +
|
||||||
|
"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
|
||||||
|
"remote_sync_date INTEGER, " +
|
||||||
|
"FOREIGN KEY(parent_id) REFERENCES trasferimento_pedane(_id) ON UPDATE NO ACTION ON DELETE CASCADE );");
|
||||||
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_trasferimento_pedane_rows__id ON trasferimento_pedane_rows (_id)");
|
||||||
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_trasferimento_pedane_rows_parent_id ON trasferimento_pedane_rows (parent_id)");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static final Migration MIGRATION_20_21 = new Migration(20, 21) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
database.execSQL("ALTER TABLE trasferimento_pedane"
|
||||||
|
+ " ADD COLUMN document_cod_anag TEXT;");
|
||||||
|
|
||||||
|
database.execSQL("ALTER TABLE trasferimento_pedane"
|
||||||
|
+ " ADD COLUMN document_cod_dtip TEXT");
|
||||||
|
|
||||||
|
database.execSQL("ALTER TABLE trasferimento_pedane"
|
||||||
|
+ " ADD COLUMN document_num INTEGER");
|
||||||
|
|
||||||
|
database.execSQL("ALTER TABLE trasferimento_pedane"
|
||||||
|
+ " ADD COLUMN document_ser TEXT");
|
||||||
|
|
||||||
|
database.execSQL("ALTER TABLE trasferimento_pedane"
|
||||||
|
+ " ADD COLUMN document_data INTEGER");
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.TrasferimentoPedaneDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.TrasferimentoPedaneRowDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.VerificaGiacenzeRowDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||||
@@ -141,6 +143,18 @@ public class RoomModule {
|
|||||||
return appDatabase.verificaGiacenzeRowDao();
|
return appDatabase.verificaGiacenzeRowDao();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
@Provides
|
||||||
|
TrasferimentoPedaneDao providesTrasferimentoPedaneDao(AppDatabase appDatabase) {
|
||||||
|
return appDatabase.trasferimentoPedaneDao();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
@Provides
|
||||||
|
TrasferimentoPedaneRowDao providesTrasferimentoPedaneRowDao(AppDatabase appDatabase) {
|
||||||
|
return appDatabase.trasferimentoPedaneRowDao();
|
||||||
|
}
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
VerificaGiacenzeMapper providesVerificaGiacenzeMapper(VerificaGiacenzeRowMapper verificaGiacenzeRowMapper) {
|
VerificaGiacenzeMapper providesVerificaGiacenzeMapper(VerificaGiacenzeRowMapper verificaGiacenzeRowMapper) {
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||||
|
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.Query;
|
||||||
|
import androidx.room.Transaction;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Flowable;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityDaoInterface;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.wrappers.TrasferimentoPedaneWithRowsWrapper;
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface TrasferimentoPedaneDao extends EntityDaoInterface<TrasferimentoPedaneEntity> {
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneEntity.TABLE_NAME +
|
||||||
|
" WHERE " + BaseSyncDTO.Columns.ID + " = :id")
|
||||||
|
TrasferimentoPedaneWithRowsWrapper select(long id);
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneEntity.TABLE_NAME +
|
||||||
|
" WHERE " + BaseSyncDTO.Columns.ID + " = :id")
|
||||||
|
Flowable<TrasferimentoPedaneWithRowsWrapper> selectFlowable(long id);
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneEntity.TABLE_NAME +
|
||||||
|
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||||
|
" ORDER BY " + TrasferimentoPedaneEntity.Columns.CREATED_AT + " DESC")
|
||||||
|
List<TrasferimentoPedaneWithRowsWrapper> selectAll(boolean toBeSync);
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneEntity.TABLE_NAME +
|
||||||
|
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||||
|
" ORDER BY " + TrasferimentoPedaneEntity.Columns.CREATED_AT + " DESC")
|
||||||
|
Flowable<List<TrasferimentoPedaneWithRowsWrapper>> selectAllFlowable(boolean toBeSync);
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||||
|
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.Query;
|
||||||
|
import androidx.room.Transaction;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Flowable;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneRowEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityDaoInterface;
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface TrasferimentoPedaneRowDao extends EntityDaoInterface<TrasferimentoPedaneRowEntity> {
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneRowEntity.TABLE_NAME +
|
||||||
|
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||||
|
" ORDER BY " + TrasferimentoPedaneRowEntity.Columns.CREATED_AT + " DESC")
|
||||||
|
List<TrasferimentoPedaneRowEntity> selectAll(boolean toBeSync);
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneRowEntity.TABLE_NAME +
|
||||||
|
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||||
|
" ORDER BY " + TrasferimentoPedaneRowEntity.Columns.CREATED_AT + " DESC")
|
||||||
|
Flowable<List<TrasferimentoPedaneRowEntity>> selectAllFlowable(boolean toBeSync);
|
||||||
|
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneRowEntity.TABLE_NAME +
|
||||||
|
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||||
|
" AND " + TrasferimentoPedaneRowEntity.Columns.PARENT_ID + " = :trasferimentoId " +
|
||||||
|
" ORDER BY " + TrasferimentoPedaneRowEntity.Columns.CREATED_AT + " DESC")
|
||||||
|
List<TrasferimentoPedaneRowEntity> selectAll(long trasferimentoId, boolean toBeSync);
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
@Query("SELECT * FROM " + TrasferimentoPedaneRowEntity.TABLE_NAME +
|
||||||
|
" WHERE ((:toBeSync = 1 AND " + BaseSyncDTO.Columns.COLUMN_REMOTE_SYNC_DATE + " IS NULL) OR (:toBeSync = 0))" +
|
||||||
|
" AND " + TrasferimentoPedaneRowEntity.Columns.PARENT_ID + " = :trasferimentoId " +
|
||||||
|
" ORDER BY " + TrasferimentoPedaneRowEntity.Columns.CREATED_AT + " DESC")
|
||||||
|
Flowable<List<TrasferimentoPedaneRowEntity>> selectAllFlowable(long trasferimentoId, boolean toBeSync);
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import android.provider.BaseColumns;
|
|||||||
import androidx.room.ColumnInfo;
|
import androidx.room.ColumnInfo;
|
||||||
import androidx.room.PrimaryKey;
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
public abstract class BaseSyncDTO extends BaseRoomDTO {
|
public abstract class BaseSyncDTO extends BaseRoomDTO {
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ public abstract class BaseSyncDTO extends BaseRoomDTO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ColumnInfo(name = Columns.COLUMN_REMOTE_SYNC_DATE)
|
@ColumnInfo(name = Columns.COLUMN_REMOTE_SYNC_DATE)
|
||||||
private Date remoteSyncDate;
|
private LocalDateTime remoteSyncDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -31,11 +31,11 @@ public abstract class BaseSyncDTO extends BaseRoomDTO {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getRemoteSyncDate() {
|
public LocalDateTime getRemoteSyncDate() {
|
||||||
return remoteSyncDate;
|
return remoteSyncDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRemoteSyncDate(Date remoteSyncDate) {
|
public void setRemoteSyncDate(LocalDateTime remoteSyncDate) {
|
||||||
this.remoteSyncDate = remoteSyncDate;
|
this.remoteSyncDate = remoteSyncDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.room.ColumnInfo;
|
||||||
|
import androidx.room.Entity;
|
||||||
|
import androidx.room.Ignore;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInterface;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.TrasferimentoPedaneStatusEnum;
|
||||||
|
|
||||||
|
@Entity(
|
||||||
|
inheritSuperIndices = true,
|
||||||
|
tableName = TrasferimentoPedaneEntity.TABLE_NAME
|
||||||
|
)
|
||||||
|
public class TrasferimentoPedaneEntity extends BaseSyncDTO implements EntityModelInterface {
|
||||||
|
|
||||||
|
public static final String TABLE_NAME = "trasferimento_pedane";
|
||||||
|
|
||||||
|
public static class Columns {
|
||||||
|
public static final String COD_MDEP_DEST = "cod_mdep_dest";
|
||||||
|
public static final String DESCRIZIONE_DEPO_DEST = "descrizione_depo_dest";
|
||||||
|
public static final String STATUS = "status";
|
||||||
|
public static final String DOCUMENT_COD_ANAG = "document_cod_anag";
|
||||||
|
public static final String DOCUMENT_COD_DTIP = "document_cod_dtip";
|
||||||
|
public static final String DOCUMENT_NUM = "document_num";
|
||||||
|
public static final String DOCUMENT_SER = "document_ser";
|
||||||
|
public static final String DOCUMENT_DATA = "document_data";
|
||||||
|
|
||||||
|
public static final String CREATED_AT = "created_at";
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = TrasferimentoPedaneEntity.Columns.COD_MDEP_DEST)
|
||||||
|
private String codMdepDest;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = Columns.DESCRIZIONE_DEPO_DEST)
|
||||||
|
private String descrizioneDepoDest;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = Columns.STATUS)
|
||||||
|
private short status = TrasferimentoPedaneStatusEnum.APERTO.getValue();
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.DOCUMENT_COD_ANAG)
|
||||||
|
private String documentCodAnag;
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.DOCUMENT_COD_DTIP)
|
||||||
|
private String documentCodDtip;
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.DOCUMENT_NUM)
|
||||||
|
private Integer documentNum;
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.DOCUMENT_SER)
|
||||||
|
private String documentSer;
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.DOCUMENT_DATA)
|
||||||
|
private LocalDate documentData;
|
||||||
|
|
||||||
|
@ColumnInfo(name = TrasferimentoPedaneEntity.Columns.CREATED_AT, defaultValue = "CURRENT_TIMESTAMP")
|
||||||
|
private LocalDateTime createdAt = LocalDateTime.now();
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
private List<TrasferimentoPedaneRowEntity> trasferimentoPedaneRowList;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public String getCodMdepDest() {
|
||||||
|
return codMdepDest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodMdepDest(@NonNull String codMdepDest) {
|
||||||
|
this.codMdepDest = codMdepDest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public String getDescrizioneDepoDest() {
|
||||||
|
return descrizioneDepoDest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescrizioneDepoDest(@NonNull String descrizioneDepoDest) {
|
||||||
|
this.descrizioneDepoDest = descrizioneDepoDest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public short getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(short status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentCodAnag() {
|
||||||
|
return documentCodAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentCodAnag(String documentCodAnag) {
|
||||||
|
this.documentCodAnag = documentCodAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentCodDtip() {
|
||||||
|
return documentCodDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentCodDtip(String documentCodDtip) {
|
||||||
|
this.documentCodDtip = documentCodDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDocumentNum() {
|
||||||
|
return documentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentNum(Integer documentNum) {
|
||||||
|
this.documentNum = documentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentSer() {
|
||||||
|
return documentSer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentSer(String documentSer) {
|
||||||
|
this.documentSer = documentSer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDocumentData() {
|
||||||
|
return documentData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentData(LocalDate documentData) {
|
||||||
|
this.documentData = documentData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(LocalDateTime createdAt) {
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TrasferimentoPedaneRowEntity> getTrasferimentoPedaneRowList() {
|
||||||
|
return trasferimentoPedaneRowList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrasferimentoPedaneRowList(List<TrasferimentoPedaneRowEntity> trasferimentoPedaneRowList) {
|
||||||
|
this.trasferimentoPedaneRowList = trasferimentoPedaneRowList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
public TrasferimentoPedaneStatusEnum getStatusEnum() {
|
||||||
|
return TrasferimentoPedaneStatusEnum.fromValue(getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.room.ColumnInfo;
|
||||||
|
import androidx.room.Entity;
|
||||||
|
import androidx.room.ForeignKey;
|
||||||
|
import androidx.room.Ignore;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInterface;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
@Entity(
|
||||||
|
inheritSuperIndices = true,
|
||||||
|
tableName = TrasferimentoPedaneRowEntity.TABLE_NAME,
|
||||||
|
foreignKeys = {
|
||||||
|
@ForeignKey(
|
||||||
|
entity = TrasferimentoPedaneEntity.class,
|
||||||
|
parentColumns = {BaseSyncDTO.Columns.ID},
|
||||||
|
childColumns = {TrasferimentoPedaneRowEntity.Columns.PARENT_ID},
|
||||||
|
onDelete = ForeignKey.CASCADE
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public class TrasferimentoPedaneRowEntity extends BaseSyncDTO implements EntityModelInterface, Cloneable {
|
||||||
|
public static final String TABLE_NAME = "trasferimento_pedane_rows";
|
||||||
|
|
||||||
|
public static class Columns {
|
||||||
|
public static final String PARENT_ID = "parent_id";
|
||||||
|
public static final String CREATED_AT = "created_at";
|
||||||
|
public static final String BARCODE_UL = "barcode_ul";
|
||||||
|
public static final String PROGRESSIVO_UL = "progressivo_ul";
|
||||||
|
public static final String FLAG_INCONSISTENT = "flag_inconsistent";
|
||||||
|
// public static final String COD_MART = "cod_mart";
|
||||||
|
// public static final String PARTITA_MAG = "partita_mag";
|
||||||
|
// public static final String DESCRIZIONE = "descrizione";
|
||||||
|
// public static final String QTA_IN_GIACENZA = "qta_in_giacenza";
|
||||||
|
// public static final String QTA = "qta";
|
||||||
|
// public static final String NUM_CNF = "num_cnf";
|
||||||
|
// public static final String QTA_CNF = "qta_cnf";
|
||||||
|
// public static final String SCAN_COD_BARRE = "scan_cod_barre";
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(index = true, name = TrasferimentoPedaneRowEntity.Columns.PARENT_ID)
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = Columns.BARCODE_UL)
|
||||||
|
private String barcodeUl;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = Columns.PROGRESSIVO_UL)
|
||||||
|
private int progressivoUl;
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.FLAG_INCONSISTENT, defaultValue = "0")
|
||||||
|
private boolean flagInconsistent = false;
|
||||||
|
|
||||||
|
|
||||||
|
@ColumnInfo(name = TrasferimentoPedaneRowEntity.Columns.CREATED_AT, defaultValue = "CURRENT_TIMESTAMP")
|
||||||
|
private LocalDateTime createdAt = LocalDateTime.now();
|
||||||
|
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
private MtbColt detailMtbColt;
|
||||||
|
|
||||||
|
|
||||||
|
public Long getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(Long parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcodeUl() {
|
||||||
|
return barcodeUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBarcodeUl(String barcodeUl) {
|
||||||
|
this.barcodeUl = barcodeUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getProgressivoUl() {
|
||||||
|
return progressivoUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProgressivoUl(int progressivoUl) {
|
||||||
|
this.progressivoUl = progressivoUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean isFlagInconsistent() {
|
||||||
|
return flagInconsistent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlagInconsistent(boolean flagInconsistent) {
|
||||||
|
this.flagInconsistent = flagInconsistent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(LocalDateTime createdAt) {
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public MtbColt getDetailMtbColt() {
|
||||||
|
return detailMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetailMtbColt(MtbColt detailMtbColt) {
|
||||||
|
this.detailMtbColt = detailMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
TrasferimentoPedaneRowEntity that = (TrasferimentoPedaneRowEntity) o;
|
||||||
|
return getProgressivoUl() == that.getProgressivoUl() && isFlagInconsistent() == that.isFlagInconsistent() && Objects.equals(getParentId(), that.getParentId()) && Objects.equals(getBarcodeUl(), that.getBarcodeUl()) && Objects.equals(getCreatedAt(), that.getCreatedAt());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(getParentId(), getBarcodeUl(), getProgressivoUl(), isFlagInconsistent(), getCreatedAt());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import android.util.Log;
|
|||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -92,7 +93,7 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioE
|
|||||||
|
|
||||||
public void export(InventarioEntity inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
public void export(InventarioEntity inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||||
remoteDataSource.makeInsertRequest(dataMapper.mapRoomToRest(inventarioDTO), () -> {
|
remoteDataSource.makeInsertRequest(dataMapper.mapRoomToRest(inventarioDTO), () -> {
|
||||||
inventarioDTO.setRemoteSyncDate(new Date());
|
inventarioDTO.setRemoteSyncDate(LocalDateTime.now());
|
||||||
|
|
||||||
localDataSource.makeUpdateRequest(inventarioDTO, (ignored) -> {
|
localDataSource.makeUpdateRequest(inventarioDTO, (ignored) -> {
|
||||||
handler.post(onComplete);
|
handler.post(onComplete);
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.respository_new;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.TrasferimentoPedaneLocalDataSource;
|
||||||
|
import it.integry.integrywmsnative.core.mapper.TrasferimentoPedaneMapper;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.TrasferimentoPedaneRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.trasferimento_pedane.TrasferimentoPedaneDTO;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class TrasferimentoPedaneRepository extends _BaseRepository<TrasferimentoPedaneDTO, TrasferimentoPedaneEntity, TrasferimentoPedaneMapper, TrasferimentoPedaneLocalDataSource, TrasferimentoPedaneRESTConsumer> {
|
||||||
|
|
||||||
|
private final ExecutorService executorService;
|
||||||
|
private final Handler handler;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public TrasferimentoPedaneRepository(TrasferimentoPedaneLocalDataSource localDataSource,
|
||||||
|
TrasferimentoPedaneRESTConsumer remoteDataSource,
|
||||||
|
TrasferimentoPedaneMapper dataMapper,
|
||||||
|
Handler handler,
|
||||||
|
ExecutorService executorService) {
|
||||||
|
super(dataMapper, localDataSource, remoteDataSource);
|
||||||
|
this.handler = handler;
|
||||||
|
this.executorService = executorService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public LiveData<TrasferimentoPedaneEntity> retrieveLive(long id) {
|
||||||
|
MutableLiveData<TrasferimentoPedaneEntity> internalLiveData = new MutableLiveData<>();
|
||||||
|
|
||||||
|
localDataSource.makeRetrieveRequest(id)
|
||||||
|
.observeOn(Schedulers.io())
|
||||||
|
.subscribe(internalLiveData::postValue);
|
||||||
|
|
||||||
|
return internalLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public TrasferimentoPedaneEntity retrieve(long id) {
|
||||||
|
return localDataSource.makeSynchronousRetrieveRequest(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public LiveData<List<TrasferimentoPedaneEntity>> retrieveLive() {
|
||||||
|
MutableLiveData<List<TrasferimentoPedaneEntity>> internalLiveData = new MutableLiveData<>();
|
||||||
|
|
||||||
|
localDataSource.makeSynchronousRetrieveAllLive(false)
|
||||||
|
.observeOn(Schedulers.io())
|
||||||
|
.subscribe(internalLiveData::postValue);
|
||||||
|
|
||||||
|
return internalLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long insert(String codMdepDest, String descrizioneDepoDest) {
|
||||||
|
var trasferimentoPedane = new TrasferimentoPedaneEntity();
|
||||||
|
trasferimentoPedane.setCodMdepDest(codMdepDest);
|
||||||
|
trasferimentoPedane.setDescrizioneDepoDest(descrizioneDepoDest);
|
||||||
|
localDataSource.makeSynchronousInsertRequest(trasferimentoPedane);
|
||||||
|
|
||||||
|
return trasferimentoPedane.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateSynchronized(TrasferimentoPedaneEntity entity) {
|
||||||
|
localDataSource.makeSynchronousUpdateRequest(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteSynchronized(TrasferimentoPedaneEntity entity) {
|
||||||
|
localDataSource.makeSynchronousDeleteRequest(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.respository_new;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneRowEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.respository_new.data_source.TrasferimentoPedaneRowsLocalDataSource;
|
||||||
|
import it.integry.integrywmsnative.core.mapper.TrasferimentoPedaneRowMapper;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.TrasferimentoPedaneRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.trasferimento_pedane.TrasferimentoPedaneRowDTO;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class TrasferimentoPedaneRowRepository extends _BaseRepository<TrasferimentoPedaneRowDTO, TrasferimentoPedaneRowEntity, TrasferimentoPedaneRowMapper, TrasferimentoPedaneRowsLocalDataSource, TrasferimentoPedaneRESTConsumer> {
|
||||||
|
|
||||||
|
private final ExecutorService executorService;
|
||||||
|
private final Handler handler;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public TrasferimentoPedaneRowRepository(TrasferimentoPedaneRowsLocalDataSource localDataSource,
|
||||||
|
TrasferimentoPedaneRESTConsumer remoteDataSource,
|
||||||
|
TrasferimentoPedaneRowMapper dataMapper,
|
||||||
|
Handler handler,
|
||||||
|
ExecutorService executorService) {
|
||||||
|
super(dataMapper, localDataSource, remoteDataSource);
|
||||||
|
this.handler = handler;
|
||||||
|
this.executorService = executorService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public LiveData<List<TrasferimentoPedaneRowEntity>> retrieve(long trasferimentoPedaneId) {
|
||||||
|
MutableLiveData<List<TrasferimentoPedaneRowEntity>> internalLiveData = new MutableLiveData<>();
|
||||||
|
|
||||||
|
localDataSource.makeSynchronousRetrieveAllLive(trasferimentoPedaneId, false)
|
||||||
|
.observeOn(Schedulers.io())
|
||||||
|
.subscribe(internalLiveData::postValue);
|
||||||
|
|
||||||
|
return internalLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public TrasferimentoPedaneRowEntity insertSynchronized(long parentId, String barcodeUl, int progressivoUl) {
|
||||||
|
TrasferimentoPedaneRowEntity entity = new TrasferimentoPedaneRowEntity() {{
|
||||||
|
setParentId(parentId);
|
||||||
|
setBarcodeUl(barcodeUl);
|
||||||
|
setProgressivoUl(progressivoUl);
|
||||||
|
}};
|
||||||
|
localDataSource.makeSynchronousInsertRequest(entity);
|
||||||
|
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateSynchronized(TrasferimentoPedaneRowEntity entity) {
|
||||||
|
localDataSource.makeSynchronousUpdateRequest(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateAllSynchronized(List<TrasferimentoPedaneRowEntity> entities) {
|
||||||
|
localDataSource.makeSynchronousUpdateAllRequest(entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteSynchronized(TrasferimentoPedaneRowEntity entity) {
|
||||||
|
localDataSource.makeSynchronousDeleteRequest(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.respository_new.data_source;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Flowable;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.TrasferimentoPedaneDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.wrappers.TrasferimentoPedaneWithRowsWrapper;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class TrasferimentoPedaneLocalDataSource extends _BaseRoomDataSource<TrasferimentoPedaneEntity, TrasferimentoPedaneDao> {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public TrasferimentoPedaneLocalDataSource(ExecutorService executorService, TrasferimentoPedaneDao entityDao) {
|
||||||
|
super(executorService, entityDao, TrasferimentoPedaneEntity.TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Flowable<TrasferimentoPedaneEntity> makeRetrieveRequest(long id) {
|
||||||
|
var data = entityDao
|
||||||
|
.selectFlowable(id);
|
||||||
|
|
||||||
|
return data.map(x -> x.trasferimentoPedane);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TrasferimentoPedaneEntity makeSynchronousRetrieveRequest(long id) {
|
||||||
|
var data = entityDao
|
||||||
|
.select(id);
|
||||||
|
|
||||||
|
return data.trasferimentoPedane;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TrasferimentoPedaneEntity> makeSynchronousRetrieveAllRequest(boolean onlyToBeSync) {
|
||||||
|
var data = entityDao
|
||||||
|
.selectAll(onlyToBeSync);
|
||||||
|
|
||||||
|
return data.stream()
|
||||||
|
.map(x -> {
|
||||||
|
x.trasferimentoPedane.setTrasferimentoPedaneRowList(x.rowList);
|
||||||
|
return x.trasferimentoPedane;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Flowable<List<TrasferimentoPedaneEntity>> makeSynchronousRetrieveAllLive(boolean onlyToBeSync) {
|
||||||
|
Flowable<List<TrasferimentoPedaneWithRowsWrapper>> listFlowable = entityDao
|
||||||
|
.selectAllFlowable(onlyToBeSync);
|
||||||
|
|
||||||
|
return listFlowable.map(x ->
|
||||||
|
x.stream()
|
||||||
|
.map(y -> {
|
||||||
|
y.trasferimentoPedane.setTrasferimentoPedaneRowList(y.rowList);
|
||||||
|
return y.trasferimentoPedane;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.respository_new.data_source;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Flowable;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.TrasferimentoPedaneRowDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneRowEntity;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class TrasferimentoPedaneRowsLocalDataSource extends _BaseRoomDataSource<TrasferimentoPedaneRowEntity, TrasferimentoPedaneRowDao> {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public TrasferimentoPedaneRowsLocalDataSource(ExecutorService executorService, TrasferimentoPedaneRowDao entityDao) {
|
||||||
|
super(executorService, entityDao, TrasferimentoPedaneRowEntity.TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TrasferimentoPedaneRowEntity> makeSynchronousRetrieveAllRequest(boolean onlyToBeSync) {
|
||||||
|
var data = entityDao
|
||||||
|
.selectAll(onlyToBeSync);
|
||||||
|
|
||||||
|
return data.stream()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Flowable<List<TrasferimentoPedaneRowEntity>> makeSynchronousRetrieveAllLive(boolean onlyToBeSync) {
|
||||||
|
Flowable<List<TrasferimentoPedaneRowEntity>> listFlowable = entityDao
|
||||||
|
.selectAllFlowable(onlyToBeSync);
|
||||||
|
|
||||||
|
return listFlowable.map(x ->
|
||||||
|
x.stream()
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TrasferimentoPedaneRowEntity> makeSynchronousRetrieveAllRequest(long parentId, boolean onlyToBeSync) {
|
||||||
|
var data = entityDao
|
||||||
|
.selectAll(parentId, onlyToBeSync);
|
||||||
|
|
||||||
|
return data.stream()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Flowable<List<TrasferimentoPedaneRowEntity>> makeSynchronousRetrieveAllLive(long parentId, boolean onlyToBeSync) {
|
||||||
|
Flowable<List<TrasferimentoPedaneRowEntity>> listFlowable = entityDao
|
||||||
|
.selectAllFlowable(parentId, onlyToBeSync);
|
||||||
|
|
||||||
|
return listFlowable.map(x ->
|
||||||
|
x.stream()
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.wrappers;
|
||||||
|
|
||||||
|
import androidx.room.DatabaseView;
|
||||||
|
import androidx.room.Embedded;
|
||||||
|
import androidx.room.Relation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.BaseSyncDTO;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneEntity;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneRowEntity;
|
||||||
|
|
||||||
|
@DatabaseView
|
||||||
|
public class TrasferimentoPedaneWithRowsWrapper {
|
||||||
|
|
||||||
|
@Embedded
|
||||||
|
public TrasferimentoPedaneEntity trasferimentoPedane;
|
||||||
|
|
||||||
|
@Relation(
|
||||||
|
parentColumn = BaseSyncDTO.Columns.ID,
|
||||||
|
entityColumn = TrasferimentoPedaneRowEntity.Columns.PARENT_ID
|
||||||
|
)
|
||||||
|
public List<TrasferimentoPedaneRowEntity> rowList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -27,6 +27,7 @@ import androidx.databinding.Observable;
|
|||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.lifecycle.LifecycleOwner;
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
import androidx.lifecycle.Observer;
|
import androidx.lifecycle.Observer;
|
||||||
import androidx.lifecycle.ViewTreeLifecycleOwner;
|
import androidx.lifecycle.ViewTreeLifecycleOwner;
|
||||||
|
|
||||||
@@ -46,9 +47,9 @@ import java.util.Locale;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.utility.LocaleDecimalKeyListener;
|
import it.integry.integrywmsnative.core.utility.LocaleDecimalKeyListener;
|
||||||
|
import it.integry.integrywmsnative.core.helper.ContextHelper;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
@@ -475,8 +476,9 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
|
||||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
@BindingAdapter(value = {"binding", "warningOnOldDates"}, requireAll = false)
|
||||||
|
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, boolean warningOnOldDates) {
|
||||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
if (pair == null || pair.first != observableDate) {
|
if (pair == null || pair.first != observableDate) {
|
||||||
if (pair != null) {
|
if (pair != null) {
|
||||||
@@ -511,15 +513,15 @@ public class Converters {
|
|||||||
var calendar = UtilityDate.getCalendarInstance();
|
var calendar = UtilityDate.getCalendarInstance();
|
||||||
calendar.setTimeInMillis(timeInMillis);
|
calendar.setTimeInMillis(timeInMillis);
|
||||||
|
|
||||||
if (parentFragment != null && warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
if (warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
.makeWarningDialog(view.getContext(), new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(calendar.getTime());
|
observableDate.set(calendar.getTime());
|
||||||
}, () -> {
|
}, () -> {
|
||||||
|
|
||||||
})
|
})
|
||||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
.show();
|
||||||
} else {
|
} else {
|
||||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(calendar.getTime());
|
observableDate.set(calendar.getTime());
|
||||||
@@ -531,7 +533,7 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
datePicker.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
datePicker.show(ContextHelper.getFragmentManagerFromContext(view.getContext()), "tag");
|
||||||
};
|
};
|
||||||
|
|
||||||
//Adding click-listener
|
//Adding click-listener
|
||||||
@@ -545,8 +547,126 @@ public class Converters {
|
|||||||
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
|
||||||
public static void bindEditTextDate(EditText view, final ObservableField<LocalDate> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
@BindingAdapter(value = {"binding", "warningOnOldDates"}, requireAll = false)
|
||||||
|
public static void bindTextInputEditTextDate(TextInputEditText view, final MutableLiveData<Date> liveDataDate, boolean warningOnOldDates) {
|
||||||
|
// Ottieni il LifecycleOwner dalla view
|
||||||
|
LifecycleOwner lifecycleOwner = ViewTreeLifecycleOwner.get(view);
|
||||||
|
if (lifecycleOwner == null) {
|
||||||
|
// Non è possibile osservare LiveData senza un LifecycleOwner
|
||||||
|
// Potresti loggare un errore o gestire questo caso come preferisci
|
||||||
|
Log.e("BindingAdapters", "LifecycleOwner not found for view " + view.getId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rimuovi eventuali TextWatcher o listener precedenti per evitare duplicazioni
|
||||||
|
// Questo è importante se il BindingAdapter viene chiamato più volte per la stessa view
|
||||||
|
Object oldTag = view.getTag(R.id.bound_observable_date_listener);
|
||||||
|
if (oldTag instanceof TextWatcherAdapter) {
|
||||||
|
view.removeTextChangedListener((TextWatcherAdapter) oldTag);
|
||||||
|
}
|
||||||
|
Object oldLiveDataTag = view.getTag(R.id.bound_observable_date_livedata);
|
||||||
|
if (oldLiveDataTag instanceof MutableLiveData) {
|
||||||
|
// Se c'era un observer precedente su un altro LiveData, rimuovilo
|
||||||
|
// Questo scenario è meno comune ma è bene gestirlo
|
||||||
|
Observer<Date> existingObserver = (Observer<Date>) view.getTag(R.id.bound_observable_date_observer);
|
||||||
|
if (existingObserver != null) {
|
||||||
|
((MutableLiveData<Date>) oldLiveDataTag).removeObserver(existingObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Imposta il listener per il click per aprire il DatePicker
|
||||||
|
RunnableArgs<View> onClick = v -> {
|
||||||
|
Calendar c = UtilityDate.getCalendarInstance();
|
||||||
|
if (liveDataDate.getValue() != null) {
|
||||||
|
c.setTime(liveDataDate.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialDatePicker<Long> datePicker =
|
||||||
|
MaterialDatePicker.Builder.datePicker()
|
||||||
|
.setSelection(c.getTimeInMillis())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
datePicker.addOnPositiveButtonClickListener(selection -> {
|
||||||
|
Calendar calendar = UtilityDate.getCalendarInstance();
|
||||||
|
calendar.setTimeInMillis(selection);
|
||||||
|
Date selectedDate = calendar.getTime();
|
||||||
|
|
||||||
|
if (warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
||||||
|
DialogSimpleMessageView
|
||||||
|
.makeWarningDialog(view.getContext(), new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||||
|
liveDataDate.postValue(selectedDate);
|
||||||
|
}, () -> {
|
||||||
|
// Non fare nulla se l'utente annulla
|
||||||
|
})
|
||||||
|
.show();
|
||||||
|
} else {
|
||||||
|
liveDataDate.postValue(selectedDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
datePicker.addOnNegativeButtonClickListener(dialog -> {
|
||||||
|
// Utente ha annullato, potresti voler resettare o non fare nulla
|
||||||
|
});
|
||||||
|
datePicker.addOnCancelListener(dialog -> {
|
||||||
|
// Utente ha cancellato (es. premendo back), potresti voler resettare o non fare nulla
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
datePicker.show(ContextHelper.getFragmentManagerFromContext(view.getContext()), "MaterialDatePicker");
|
||||||
|
};
|
||||||
|
|
||||||
|
view.setOnClickListener(onClick::run);
|
||||||
|
if (view.getParent() != null && view.getParent().getParent() != null && view.getParent().getParent() instanceof TextInputLayout) {
|
||||||
|
((FrameLayout) view.getParent()).setOnClickListener(onClick::run);
|
||||||
|
((TextInputLayout) view.getParent().getParent()).setOnClickListener(onClick::run);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Osserva il LiveData per aggiornare la view quando il valore cambia
|
||||||
|
Observer<Date> dateObserver = date -> {
|
||||||
|
String formattedDate = UtilityDate.formatDate(date, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN);
|
||||||
|
if (!view.getText().toString().equals(formattedDate)) {
|
||||||
|
view.setText(formattedDate);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Rimuovi l'observer precedente se stiamo ri-bindando allo stesso LiveData
|
||||||
|
Observer<Date> existingObserver = (Observer<Date>) view.getTag(R.id.bound_observable_date_observer);
|
||||||
|
if (view.getTag(R.id.bound_observable_date_livedata) == liveDataDate && existingObserver != null) {
|
||||||
|
liveDataDate.removeObserver(existingObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
liveDataDate.observe(lifecycleOwner, dateObserver);
|
||||||
|
|
||||||
|
// Salva il LiveData e l'observer nel tag per poterli rimuovere in futuro se necessario
|
||||||
|
view.setTag(R.id.bound_observable_date_livedata, liveDataDate);
|
||||||
|
view.setTag(R.id.bound_observable_date_observer, dateObserver);
|
||||||
|
|
||||||
|
// Imposta il valore iniziale
|
||||||
|
Date initialDate = liveDataDate.getValue();
|
||||||
|
view.setText(UtilityDate.formatDate(initialDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
|
|
||||||
|
// Aggiungi un TextWatcher fittizio se necessario per coerenza con altri binding,
|
||||||
|
// ma in questo caso il LiveData guida l'aggiornamento.
|
||||||
|
// Se non hai bisogno di reagire ai cambiamenti di testo *dalla view al LiveData*
|
||||||
|
// (perché il DatePicker lo fa già), questo TextWatcher potrebbe non essere strettamente necessario.
|
||||||
|
// Tuttavia, per mantenere la struttura simile agli altri, lo includiamo.
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
// Normalmente qui si aggiornerebbe il LiveData,
|
||||||
|
// ma il DatePicker gestisce l'aggiornamento.
|
||||||
|
// Potresti aggiungere logica qui se l'utente può modificare il testo direttamente
|
||||||
|
// e vuoi che ciò si rifletta nel LiveData (richiederebbe parsing della data).
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable_date_listener, watcher); // Salva il watcher nel tag
|
||||||
|
// view.addTextChangedListener(watcher); // Aggiungi solo se necessario
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@BindingAdapter(value = {"binding", "warningOnOldDates"}, requireAll = false)
|
||||||
|
public static void bindEditTextDate(EditText view, final ObservableField<LocalDate> observableDate, boolean warningOnOldDates) {
|
||||||
Pair<ObservableField<LocalDate>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<ObservableField<LocalDate>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
if (pair == null || pair.first != observableDate) {
|
if (pair == null || pair.first != observableDate) {
|
||||||
if (pair != null) {
|
if (pair != null) {
|
||||||
@@ -577,15 +697,15 @@ public class Converters {
|
|||||||
var nowTime = UtilityDate.millisTimeToLocalDate(selectedTimeInMillis, null);
|
var nowTime = UtilityDate.millisTimeToLocalDate(selectedTimeInMillis, null);
|
||||||
|
|
||||||
|
|
||||||
if (parentFragment != null && warningOnOldDates && nowTime.isBefore(UtilityDate.getNow())) {
|
if (warningOnOldDates && nowTime.isBefore(UtilityDate.getNow())) {
|
||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
.makeWarningDialog(view.getContext(), new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||||
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(nowTime);
|
observableDate.set(nowTime);
|
||||||
}, () -> {
|
}, () -> {
|
||||||
|
|
||||||
})
|
})
|
||||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
.show();
|
||||||
} else {
|
} else {
|
||||||
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(nowTime);
|
observableDate.set(nowTime);
|
||||||
@@ -597,7 +717,7 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
datePicker.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
datePicker.show(ContextHelper.getFragmentManagerFromContext(view.getContext()), "tag");
|
||||||
};
|
};
|
||||||
|
|
||||||
//Adding click-listener
|
//Adding click-listener
|
||||||
@@ -611,6 +731,67 @@ public class Converters {
|
|||||||
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("binding")
|
||||||
|
public static void bindAutoCompleteTextView(AutoCompleteTextView view, final MutableLiveData<String> liveDataString) {
|
||||||
|
LifecycleOwner lifecycleOwner = ViewTreeLifecycleOwner.get(view);
|
||||||
|
if (lifecycleOwner == null) {
|
||||||
|
Log.e("BindingAdapters", "LifecycleOwner not found for view " + view.getId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rimuovi TextWatcher precedente
|
||||||
|
Object oldWatcherTag = view.getTag(R.id.bound_observable_actv_watcher);
|
||||||
|
if (oldWatcherTag instanceof TextWatcherAdapter) {
|
||||||
|
view.removeTextChangedListener((TextWatcherAdapter) oldWatcherTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rimuovi Observer precedente se il LiveData è cambiato
|
||||||
|
Object oldLiveDataTag = view.getTag(R.id.bound_observable_actv_livedata);
|
||||||
|
if (oldLiveDataTag instanceof MutableLiveData && oldLiveDataTag != liveDataString) {
|
||||||
|
Observer<String> existingObserver = (Observer<String>) view.getTag(R.id.bound_observable_actv_observer);
|
||||||
|
if (existingObserver != null) {
|
||||||
|
((MutableLiveData<String>) oldLiveDataTag).removeObserver(existingObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TextWatcher per aggiornare il LiveData quando il testo cambia nella View
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
if (liveDataString.getValue() == null || !liveDataString.getValue().equals(s.toString())) {
|
||||||
|
liveDataString.setValue(s.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
view.setTag(R.id.bound_observable_actv_watcher, watcher);
|
||||||
|
|
||||||
|
// Observer per aggiornare la View quando il LiveData cambia
|
||||||
|
Observer<String> observer = newValue -> {
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue, false); // Il 'false' evita di far scattare il dropdown
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Rimuovi l'observer precedente se stiamo ri-bindando allo stesso LiveData
|
||||||
|
Observer<String> existingObserver = (Observer<String>) view.getTag(R.id.bound_observable_actv_observer);
|
||||||
|
if (view.getTag(R.id.bound_observable_actv_livedata) == liveDataString && existingObserver != null) {
|
||||||
|
liveDataString.removeObserver(existingObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
liveDataString.observe(lifecycleOwner, observer);
|
||||||
|
|
||||||
|
// Salva il LiveData e l'observer nel tag
|
||||||
|
view.setTag(R.id.bound_observable_actv_livedata, liveDataString);
|
||||||
|
view.setTag(R.id.bound_observable_actv_observer, observer);
|
||||||
|
|
||||||
|
// Imposta il valore iniziale
|
||||||
|
String initialValue = liveDataString.getValue();
|
||||||
|
if (initialValue != null && !view.getText().toString().equals(initialValue)) {
|
||||||
|
view.setText(initialValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("binding")
|
@BindingAdapter("binding")
|
||||||
public static void bindAutoCompleteTextView(AutoCompleteTextView view, final BindableString bindableString) {
|
public static void bindAutoCompleteTextView(AutoCompleteTextView view, final BindableString bindableString) {
|
||||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
@@ -822,6 +1003,45 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@BindingAdapter("visibility")
|
||||||
|
public static void bindViewVisibility(View view, final LiveData<Boolean> liveDataBoolean) {
|
||||||
|
if (liveDataBoolean == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LifecycleOwner lifecycleOwner = ViewTreeLifecycleOwner.get(view);
|
||||||
|
if (lifecycleOwner == null) {
|
||||||
|
Log.e("Converters", "Cannot find LifecycleOwner for view " + view);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Observer<Boolean> observer = isVisible -> {
|
||||||
|
if (isVisible != null) {
|
||||||
|
view.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Rimuovi l'observer precedente se il LiveData è cambiato
|
||||||
|
Object oldTag = view.getTag(R.id.bound_observable_visibility);
|
||||||
|
if (oldTag instanceof Pair) {
|
||||||
|
Pair<LiveData<Boolean>, Observer<Boolean>> pair = (Pair<LiveData<Boolean>, Observer<Boolean>>) oldTag;
|
||||||
|
if (pair.first != liveDataBoolean) {
|
||||||
|
pair.first.removeObserver(pair.second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
liveDataBoolean.observe(lifecycleOwner, observer);
|
||||||
|
view.setTag(R.id.bound_observable_visibility, new Pair<>(liveDataBoolean, observer));
|
||||||
|
|
||||||
|
// Imposta il valore iniziale
|
||||||
|
Boolean initialValue = liveDataBoolean.getValue();
|
||||||
|
if (initialValue != null) {
|
||||||
|
view.setVisibility(initialValue ? View.VISIBLE : View.GONE);
|
||||||
|
} else {
|
||||||
|
view.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@BindingAdapter("visibility")
|
@BindingAdapter("visibility")
|
||||||
public static void bindViewVisibility(View view, boolean bool) {
|
public static void bindViewVisibility(View view, boolean bool) {
|
||||||
view.setVisibility(bool ? View.VISIBLE : View.GONE);
|
view.setVisibility(bool ? View.VISIBLE : View.GONE);
|
||||||
|
|||||||
@@ -0,0 +1,119 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di;
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
public class MutableListLiveData<T> extends MutableLiveData<List<T>> {
|
||||||
|
|
||||||
|
public MutableListLiveData() {
|
||||||
|
super(new ArrayList<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MutableListLiveData(List<T> initialValue) {
|
||||||
|
super(initialValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(T item, boolean immediateSet) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
List<T> newList = new ArrayList<>(current);
|
||||||
|
newList.add(item);
|
||||||
|
|
||||||
|
if(immediateSet)
|
||||||
|
setValue(newList);
|
||||||
|
else postValue(newList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(T item) {
|
||||||
|
add(item, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(int index, T item, boolean immediateSet) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
List<T> newList = new ArrayList<>(current);
|
||||||
|
newList.add(index, item);
|
||||||
|
|
||||||
|
if(immediateSet)
|
||||||
|
setValue(newList);
|
||||||
|
else postValue(newList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(int index, T item) {
|
||||||
|
add(index, item, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void remove(T item, boolean immediateSet) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
List<T> newList = new ArrayList<>(current);
|
||||||
|
newList.remove(item);
|
||||||
|
|
||||||
|
if(immediateSet)
|
||||||
|
setValue(newList);
|
||||||
|
else postValue(newList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void remove(T item) {
|
||||||
|
remove(item, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Consumer<List<T>> updater) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
List<T> newList = new ArrayList<>(current);
|
||||||
|
updater.accept(newList);
|
||||||
|
postValue(newList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
List<T> newList = new ArrayList<>();
|
||||||
|
postValue(newList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addAll(List<T> items) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
List<T> newList = new ArrayList<>(current);
|
||||||
|
newList.addAll(items);
|
||||||
|
postValue(newList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MutableListLiveData<T> clone() {
|
||||||
|
MutableListLiveData<T> clone = new MutableListLiveData<>();
|
||||||
|
List<T> current = getValue();
|
||||||
|
if (current != null) {
|
||||||
|
clone.postValue(new ArrayList<>(current));
|
||||||
|
}
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
List<T> current = getValue();
|
||||||
|
return current == null || current.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
public T get(int index) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
if (current != null && index >= 0 && index < current.size()) {
|
||||||
|
return current.get(index);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int size() {
|
||||||
|
List<T> current = getValue();
|
||||||
|
return current != null ? current.size() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public java.util.stream.Stream<T> stream() {
|
||||||
|
List<T> current = getValue();
|
||||||
|
return current != null ? current.stream() : java.util.stream.Stream.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeAll(Collection<T> items) {
|
||||||
|
List<T> current = getValue();
|
||||||
|
List<T> newList = new ArrayList<>(current);
|
||||||
|
newList.removeAll(items);
|
||||||
|
postValue(newList);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
import com.google.gson.JsonSerializationContext;
|
||||||
|
import com.google.gson.JsonSerializer;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Classe che gestisce la serializzazione e deserializzazione di MutableListLiveData con Gson
|
||||||
|
*
|
||||||
|
* @param <T> tipo degli elementi nella lista
|
||||||
|
*/
|
||||||
|
public class MutableListLiveDataTypeAdapter<T> implements JsonSerializer<MutableListLiveData<T>>, JsonDeserializer<MutableListLiveData<T>> {
|
||||||
|
|
||||||
|
private final Handler handler = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializza un oggetto MutableListLiveData in un JsonElement
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonElement serialize(MutableListLiveData<T> src, Type typeOfSrc, JsonSerializationContext context) {
|
||||||
|
// Ottiene la lista interna da MutableListLiveData e la serializza
|
||||||
|
List<T> list = src.getValue();
|
||||||
|
return context.serialize(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializza un JsonElement in un oggetto MutableListLiveData
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MutableListLiveData<T> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
|
// Determina il tipo degli elementi nella lista
|
||||||
|
Type listType = getListType(typeOfT);
|
||||||
|
|
||||||
|
// Deserializza il JsonElement in una lista
|
||||||
|
List<T> list = context.deserialize(json, listType);
|
||||||
|
if (list == null) {
|
||||||
|
list = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Crea una nuova istanza di MutableListLiveData e aggiunge tutti gli elementi
|
||||||
|
MutableListLiveData<T> result = new MutableListLiveData<>(list);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Estrae il tipo della lista da un tipo parametrizzato di MutableListLiveData<T>
|
||||||
|
*/
|
||||||
|
private Type getListType(Type mutableListLiveDataType) {
|
||||||
|
if (mutableListLiveDataType instanceof ParameterizedType) {
|
||||||
|
ParameterizedType parameterizedType = (ParameterizedType) mutableListLiveDataType;
|
||||||
|
Type[] typeArguments = parameterizedType.getActualTypeArguments();
|
||||||
|
if (typeArguments.length > 0) {
|
||||||
|
// Crea un tipo di List<T> usando il parametro di tipo T
|
||||||
|
return TypeToken.getParameterized(List.class, typeArguments[0]).getType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback per List<Object> se non riusciamo a determinare il tipo
|
||||||
|
return TypeToken.getParameterized(List.class, Object.class).getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crea un'istanza del TypeAdapter per MutableListLiveData<T>
|
||||||
|
*
|
||||||
|
* @param elementType il tipo T degli elementi nella lista
|
||||||
|
* @return un'istanza del TypeAdapter
|
||||||
|
*/
|
||||||
|
public static <T> MutableListLiveDataTypeAdapter<T> create(Type elementType) {
|
||||||
|
return new MutableListLiveDataTypeAdapter<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
import com.google.gson.JsonSerializationContext;
|
||||||
|
import com.google.gson.JsonSerializer;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Classe che gestisce la serializzazione e deserializzazione di MutableListLiveData con Gson
|
||||||
|
*
|
||||||
|
* @param <T> tipo degli elementi nella lista
|
||||||
|
*/
|
||||||
|
public class ObservableArrayListDataTypeAdapter<T> implements JsonSerializer<ObservableArrayList<T>>, JsonDeserializer<ObservableArrayList<T>> {
|
||||||
|
|
||||||
|
private final Handler handler = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializza un oggetto MutableListLiveData in un JsonElement
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonElement serialize(ObservableArrayList<T> src, Type typeOfSrc, JsonSerializationContext context) {
|
||||||
|
// Ottiene la lista interna da MutableListLiveData e la serializza
|
||||||
|
ArrayList<T> list = new ArrayList<>(src);
|
||||||
|
return context.serialize(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializza un JsonElement in un oggetto MutableListLiveData
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ObservableArrayList<T> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
|
// Determina il tipo degli elementi nella lista
|
||||||
|
Type listType = getListType(typeOfT);
|
||||||
|
|
||||||
|
// Deserializza il JsonElement in una lista
|
||||||
|
List<T> list = context.deserialize(json, listType);
|
||||||
|
if (list == null) {
|
||||||
|
list = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Crea una nuova istanza di MutableListLiveData e aggiunge tutti gli elementi
|
||||||
|
ObservableArrayList<T> result = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
result.addAll(list);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Estrae il tipo della lista da un tipo parametrizzato di MutableListLiveData<T>
|
||||||
|
*/
|
||||||
|
private Type getListType(Type mutableListLiveDataType) {
|
||||||
|
if (mutableListLiveDataType instanceof ParameterizedType) {
|
||||||
|
ParameterizedType parameterizedType = (ParameterizedType) mutableListLiveDataType;
|
||||||
|
Type[] typeArguments = parameterizedType.getActualTypeArguments();
|
||||||
|
if (typeArguments.length > 0) {
|
||||||
|
// Crea un tipo di List<T> usando il parametro di tipo T
|
||||||
|
return TypeToken.getParameterized(List.class, typeArguments[0]).getType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback per List<Object> se non riusciamo a determinare il tipo
|
||||||
|
return TypeToken.getParameterized(List.class, Object.class).getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crea un'istanza del TypeAdapter per MutableListLiveData<T>
|
||||||
|
*
|
||||||
|
* @param elementType il tipo T degli elementi nella lista
|
||||||
|
* @return un'istanza del TypeAdapter
|
||||||
|
*/
|
||||||
|
public static <T> ObservableArrayListDataTypeAdapter<T> create(Type elementType) {
|
||||||
|
return new ObservableArrayListDataTypeAdapter<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package it.integry.integrywmsnative.core.diff;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.DiffUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class MtbColrDiffCallback extends DiffUtil.Callback {
|
||||||
|
private final List<MtbColr> oldList;
|
||||||
|
private final List<MtbColr> newList;
|
||||||
|
|
||||||
|
public MtbColrDiffCallback(List<MtbColr> oldList, List<MtbColr> newList) {
|
||||||
|
this.oldList = oldList;
|
||||||
|
this.newList = newList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOldListSize() {
|
||||||
|
return oldList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getNewListSize() {
|
||||||
|
return newList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
|
||||||
|
MtbColr oldItem = oldList.get(oldItemPosition);
|
||||||
|
MtbColr newItem = newList.get(newItemPosition);
|
||||||
|
|
||||||
|
return oldItem.getKey().equals(newItem.getKey()); // Placeholder, idealmente confrontare ID univoci
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
|
||||||
|
// Assicurarsi che MtbColr.equals() confronti i contenuti rilevanti per la UI
|
||||||
|
return oldList.get(oldItemPosition).equals(newList.get(newItemPosition));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
public final class InvalidPositionException extends Exception {
|
||||||
|
|
||||||
|
public InvalidPositionException() {
|
||||||
|
super("La posizione scansionata non è valida");
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvalidPositionException(String message) {
|
||||||
|
super("La posizione scansionata non è valida: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.expansion;
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@@ -23,6 +24,11 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
@Inject
|
@Inject
|
||||||
public ExecutorService executorService;
|
public ExecutorService executorService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public Handler handler;
|
||||||
|
|
||||||
|
private Integer barcodeCallbackId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -33,35 +39,40 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
.inject(this);
|
.inject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initBarcodeManager(int barcodeCallbackId) {
|
||||||
|
this.barcodeCallbackId = barcodeCallbackId;
|
||||||
|
}
|
||||||
|
|
||||||
public void onLoadingStarted() {
|
public void onLoadingStarted() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.disable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.disableLastCallback();
|
||||||
this.openProgress();
|
this.openProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLoadingEnded() {
|
public void onLoadingEnded() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.enable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.enableLastCallback();
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
this.runOnUiThread(() -> {
|
handler.post(() -> {
|
||||||
this.closeProgress();
|
this.onLoadingEnded();
|
||||||
UtilityExceptions.defaultException(this, ex);
|
UtilityExceptions.defaultException(this, ex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disableLastCallback();
|
this.mCurrentProgress.show(getSupportFragmentManager());
|
||||||
// executorService.execute(() -> {
|
|
||||||
this.mCurrentProgress.show(getSupportFragmentManager());
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeProgress() {
|
private void closeProgress() {
|
||||||
BarcodeManager.enableLastCallback();
|
mCurrentProgress.dismiss();
|
||||||
// executorService.execute(() -> {
|
|
||||||
mCurrentProgress.dismiss();
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.expansion;
|
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.KeyEvent;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
|
||||||
|
|
||||||
public class BaseDialog extends Dialog {
|
|
||||||
|
|
||||||
private boolean mBarcodeListener = false;
|
|
||||||
|
|
||||||
public BaseDialog(@NonNull Context context) {
|
|
||||||
super(context);
|
|
||||||
if (BarcodeManager.isLastCallbackEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
|
||||||
setOnKeyListener((dialog, keyCode, event) -> {
|
|
||||||
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
|
|
||||||
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isControlKey(KeyEvent keyEvent) {
|
|
||||||
int keyCode = keyEvent.getKeyCode();
|
|
||||||
return (
|
|
||||||
keyCode == KeyEvent.KEYCODE_BACK ||
|
|
||||||
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT ||
|
|
||||||
keyCode == KeyEvent.KEYCODE_DEL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBarcodeListener(boolean listen) {
|
|
||||||
this.mBarcodeListener = listen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.expansion;
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -30,10 +31,15 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
|||||||
@Inject
|
@Inject
|
||||||
public ExecutorService executorService;
|
public ExecutorService executorService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public Handler handler;
|
||||||
|
|
||||||
private boolean mBarcodeListener = false;
|
private boolean mBarcodeListener = false;
|
||||||
|
|
||||||
private boolean cancelable = true;
|
private boolean cancelable = true;
|
||||||
|
|
||||||
|
private Integer barcodeCallbackId;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelable() {
|
public boolean isCancelable() {
|
||||||
@@ -47,6 +53,16 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
|||||||
this.cancelable = cancelable;
|
this.cancelable = cancelable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
|
return super.onCreateDialog(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void initBarcodeManager(int barcodeCallbackId) {
|
||||||
|
this.barcodeCallbackId = barcodeCallbackId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show(FragmentManager manager, String tag) {
|
public void show(FragmentManager manager, String tag) {
|
||||||
try {
|
try {
|
||||||
@@ -58,38 +74,35 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
|
||||||
super.onViewCreated(view, savedInstanceState);
|
|
||||||
this.initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onLoadingStarted() {
|
public void onLoadingStarted() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.disable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.disableLastCallback();
|
||||||
this.openProgress();
|
this.openProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLoadingEnded() {
|
public void onLoadingEnded() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.enable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.enableLastCallback();
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disableLastCallback();
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||||
// executorService.execute(() -> {
|
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeProgress() {
|
private void closeProgress() {
|
||||||
BarcodeManager.enableLastCallback();
|
mCurrentProgress.dismiss();
|
||||||
// executorService.execute(() -> {
|
|
||||||
mCurrentProgress.dismiss();
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
requireActivity().runOnUiThread(() -> {
|
handler.post(() -> {
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
|
|
||||||
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||||
|
|
||||||
|
private Integer barcodeCallbackId;
|
||||||
|
|
||||||
|
|
||||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||||
mToolbar = toolbar;
|
mToolbar = toolbar;
|
||||||
@@ -60,31 +62,39 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initBarcodeManager(int barcodeCallbackId) {
|
||||||
|
this.barcodeCallbackId = barcodeCallbackId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onLoadingStarted() {
|
public void onLoadingStarted() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.disable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.disableLastCallback();
|
||||||
this.openProgress();
|
this.openProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLoadingEnded() {
|
public void onLoadingEnded() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.enable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.enableLastCallback();
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disableLastCallback();
|
|
||||||
// executorService.execute(() -> {
|
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeProgress() {
|
private void closeProgress() {
|
||||||
BarcodeManager.enableLastCallback();
|
|
||||||
// executorService.execute(() -> {
|
|
||||||
mCurrentProgress.dismiss();
|
mCurrentProgress.dismiss();
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
handler.post(() -> {
|
handler.post(() -> {
|
||||||
this.closeProgress();
|
this.onLoadingEnded();
|
||||||
UtilityExceptions.defaultException(getActivity(), ex);
|
UtilityExceptions.defaultException(getActivity(), ex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||||
|
|
||||||
|
public class BaseMaterialAlertDialogBuilder extends MaterialAlertDialogBuilder {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public DialogProgressView mCurrentProgress;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public ExecutorService executorService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public Handler handler;
|
||||||
|
|
||||||
|
private boolean mBarcodeListener = false;
|
||||||
|
|
||||||
|
private Integer barcodeCallbackId;
|
||||||
|
|
||||||
|
private Context context;
|
||||||
|
|
||||||
|
private AlertDialog alertDialog;
|
||||||
|
|
||||||
|
public BaseMaterialAlertDialogBuilder(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
this.context = context;
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.baseMaterialAlertDialogComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
if (BarcodeManager.isLastCallbackEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
||||||
|
setOnKeyListener((dialog, keyCode, event) -> {
|
||||||
|
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
|
||||||
|
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public AlertDialog create() {
|
||||||
|
alertDialog = super.create();
|
||||||
|
return alertDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void dismiss() {
|
||||||
|
alertDialog.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void initBarcodeManager(int barcodeCallbackId) {
|
||||||
|
this.barcodeCallbackId = barcodeCallbackId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onLoadingStarted() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.disable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.disableLastCallback();
|
||||||
|
this.openProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onLoadingEnded() {
|
||||||
|
if (barcodeCallbackId != null)
|
||||||
|
BarcodeManager.enable(barcodeCallbackId);
|
||||||
|
else
|
||||||
|
BarcodeManager.enableLastCallback();
|
||||||
|
this.closeProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void openProgress() {
|
||||||
|
if (context instanceof AppCompatActivity) {
|
||||||
|
FragmentManager fragmentManager = ((AppCompatActivity) context).getSupportFragmentManager();
|
||||||
|
// ora puoi usarlo
|
||||||
|
this.mCurrentProgress.show(fragmentManager);
|
||||||
|
} else {
|
||||||
|
UtilityLogger.warn("Context is not an instance of AppCompatActivity, cannot show progress dialog.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void closeProgress() {
|
||||||
|
mCurrentProgress.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
handler.post(() -> {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
UtilityExceptions.defaultException(getContext(), ex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isControlKey(KeyEvent keyEvent) {
|
||||||
|
int keyCode = keyEvent.getKeyCode();
|
||||||
|
return (
|
||||||
|
keyCode == KeyEvent.KEYCODE_BACK ||
|
||||||
|
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT ||
|
||||||
|
keyCode == KeyEvent.KEYCODE_DEL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBarcodeListener(boolean listen) {
|
||||||
|
this.mBarcodeListener = listen;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface BaseMaterialAlertDialogBuilderComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
BaseMaterialAlertDialogBuilderComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(BaseMaterialAlertDialogBuilder baseMaterialAlertDialogBuilder);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
|
||||||
|
@Module(subcomponents = BaseMaterialAlertDialogBuilderComponent.class)
|
||||||
|
public class BaseMaterialAlertDialogBuilderModule {
|
||||||
|
}
|
||||||
@@ -2,37 +2,108 @@ package it.integry.integrywmsnative.core.expansion.view;
|
|||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.databinding.ObservableList;
|
import androidx.databinding.ObservableList;
|
||||||
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
|
||||||
|
|
||||||
public abstract class ExtendedSectionedRecyclerView<T, SH extends RecyclerView.ViewHolder, VH extends RecyclerView.ViewHolder>
|
public abstract class ExtendedSectionedRecyclerView<T, SH extends RecyclerView.ViewHolder, VH extends RecyclerView.ViewHolder>
|
||||||
extends SectionedRecyclerViewAdapter<SH, VH> {
|
extends SectionedRecyclerViewAdapter<SH, VH> {
|
||||||
|
|
||||||
protected ArrayList<T> mDataset = new ArrayList<>();
|
|
||||||
private View mEmptyView;
|
private View mEmptyView;
|
||||||
|
|
||||||
public ExtendedSectionedRecyclerView(ObservableArrayList<T> myDataset) {
|
protected final List<T> originalItems = new ArrayList<>();
|
||||||
mDataset.addAll(myDataset);
|
private final Object originalItemsLock = new Object();
|
||||||
|
|
||||||
myDataset.addOnListChangedCallback(new OnListGeneralChangedCallback<T>() {
|
public ExtendedSectionedRecyclerView(ObservableArrayList<T> observableList) {
|
||||||
@Override
|
// originalItems.addAll(observableList);
|
||||||
public void onChanged(ObservableList<T> sender) {
|
//
|
||||||
mDataset.clear();
|
// observableList.addOnListChangedCallback(new OnListGeneralChangedCallback<T>() {
|
||||||
mDataset.addAll(sender);
|
// @Override
|
||||||
|
// public void onChanged(ObservableList<T> sender) {
|
||||||
|
// originalItems.clear();
|
||||||
|
// originalItems.addAll(sender);
|
||||||
|
// notifyDataChanged();
|
||||||
|
// notifyDataSetChanged();
|
||||||
|
// checkIfEmpty();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// checkIfEmpty();
|
||||||
|
|
||||||
|
synchronized (originalItemsLock) {
|
||||||
|
this.originalItems.addAll(observableList); // Salva lo stato corrente per il filtraggio
|
||||||
|
}
|
||||||
|
|
||||||
|
observableList.addOnListChangedCallback(new ObservableList.OnListChangedCallback<ObservableList<T>>() {
|
||||||
|
private void updateLists() {
|
||||||
|
// Si assume che observableList sia modificata sul thread UI o che la sincronizzazione sia gestita esternamente.
|
||||||
|
List<T> currentData = new ArrayList<>(observableList); // Crea uno snapshot
|
||||||
|
synchronized (originalItemsLock) {
|
||||||
|
originalItems.clear();
|
||||||
|
originalItems.addAll(currentData); // Aggiorna la lista originale per il filtraggio
|
||||||
|
}
|
||||||
|
// Aggiorna la lista visualizzata dall'adapter
|
||||||
|
// clear();
|
||||||
|
// addAll(currentData); // Usa lo snapshot
|
||||||
|
// notifyDataSetChanged(); // ArrayAdapter.addAll non chiama notifyDataSetChanged, quindi è necessario se non chiamato da clear()
|
||||||
|
// Tuttavia, clear() e addAll() di ArrayAdapter gestiscono la notifica se mNotifyOnChange è true (default).
|
||||||
|
// Per sicurezza e coerenza con il codice originale, lo manteniamo.
|
||||||
notifyDataChanged();
|
notifyDataChanged();
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
checkIfEmpty();
|
checkIfEmpty();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
checkIfEmpty();
|
@Override
|
||||||
|
public void onChanged(ObservableList<T> sender) {
|
||||||
|
updateLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemRangeChanged(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||||
|
updateLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemRangeInserted(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||||
|
updateLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemRangeMoved(ObservableList<T> sender, int fromPosition, int toPosition, int itemCount) {
|
||||||
|
updateLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemRangeRemoved(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||||
|
updateLists();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExtendedSectionedRecyclerView(@NonNull LiveData<List<T>> liveData,
|
||||||
|
@NonNull LifecycleOwner lifecycleOwner) {
|
||||||
|
liveData.observe(lifecycleOwner, newList -> {
|
||||||
|
// L'observer di LiveData viene eseguito sul thread UI
|
||||||
|
List<T> dataToUse = (newList == null) ? new ArrayList<>() : new ArrayList<>(newList);
|
||||||
|
synchronized (originalItemsLock) {
|
||||||
|
originalItems.clear();
|
||||||
|
originalItems.addAll(dataToUse); // Aggiorna la lista originale per il filtraggio
|
||||||
|
}
|
||||||
|
// Aggiorna la lista visualizzata dall'adapter
|
||||||
|
// clear();
|
||||||
|
// addAll(dataToUse); // addAll gestisce correttamente una collezione vuota se newList è null
|
||||||
|
notifyDataChanged();
|
||||||
|
notifyDataSetChanged();
|
||||||
|
checkIfEmpty();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendedSectionedRecyclerView<T, SH, VH> setEmptyView(View emptyView) {
|
public ExtendedSectionedRecyclerView<T, SH, VH> setEmptyView(View emptyView) {
|
||||||
@@ -43,7 +114,7 @@ public abstract class ExtendedSectionedRecyclerView<T, SH extends RecyclerView.V
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemSize() {
|
public int getItemSize() {
|
||||||
return this.mDataset.size();
|
return this.originalItems.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkIfEmpty() {
|
private void checkIfEmpty() {
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package it.integry.integrywmsnative.core.helper;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.ColorInt;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.TrasferimentoPedaneStatusEnum;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public final class TrasferimentoPedaneStatusConverter {
|
||||||
|
|
||||||
|
public static @ColorInt int getLabelBgColor(Context context, TrasferimentoPedaneStatusEnum status) {
|
||||||
|
var attrColor = switch (status) {
|
||||||
|
case APERTO -> com.google.android.material.R.attr.colorPrimaryContainer; // Primary
|
||||||
|
case COMPLETATO -> R.attr.colorSuccessContainer; // Green
|
||||||
|
case SCADUTO -> com.google.android.material.R.attr.colorErrorContainer; // Red
|
||||||
|
};
|
||||||
|
|
||||||
|
return UtilityResources.getColorResourceFromAttr(context, attrColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static @ColorInt int getLabelTextColor(Context context, TrasferimentoPedaneStatusEnum status) {
|
||||||
|
var attrColor = switch (status) {
|
||||||
|
case APERTO -> com.google.android.material.R.attr.colorOnPrimaryContainer; // Primary
|
||||||
|
case COMPLETATO -> R.attr.colorOnSuccessContainer; // Green
|
||||||
|
case SCADUTO -> com.google.android.material.R.attr.colorOnErrorContainer; // Red
|
||||||
|
};
|
||||||
|
|
||||||
|
return UtilityResources.getColorResourceFromAttr(context, attrColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ public interface ILUPrintListener {
|
|||||||
|
|
||||||
void onLUSuccessullyPrinted();
|
void onLUSuccessullyPrinted();
|
||||||
|
|
||||||
void onLUPrintRequest(RunnableArgs<Boolean> onComplete);
|
boolean onLUPrintRequest();
|
||||||
|
|
||||||
void onLUPrintError(Exception ex, Runnable onComplete);
|
void onLUPrintError(Exception ex, Runnable onComplete);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package it.integry.integrywmsnative.core.mapper;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneEntity;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.trasferimento_pedane.TrasferimentoPedaneDTO;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class TrasferimentoPedaneMapper extends BaseMapper<TrasferimentoPedaneDTO, TrasferimentoPedaneEntity> {
|
||||||
|
private final TrasferimentoPedaneRowMapper trasferimentoPedaneRowMapper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public TrasferimentoPedaneMapper(TrasferimentoPedaneRowMapper trasferimentoPedaneRowMapper) {
|
||||||
|
this.trasferimentoPedaneRowMapper = trasferimentoPedaneRowMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TrasferimentoPedaneEntity mapRestToRoom(TrasferimentoPedaneDTO inputData) {
|
||||||
|
if(inputData == null) return null;
|
||||||
|
|
||||||
|
var data = new TrasferimentoPedaneEntity();
|
||||||
|
data.setCodMdepDest(inputData.getCodMdepDest());
|
||||||
|
data.setCreatedAt(inputData.getCreatedAt());
|
||||||
|
|
||||||
|
data.setTrasferimentoPedaneRowList(trasferimentoPedaneRowMapper.mapRestsToRooms(inputData.getRows()));
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TrasferimentoPedaneDTO mapRoomToRest(TrasferimentoPedaneEntity inputData) {
|
||||||
|
if(inputData == null) return null;
|
||||||
|
|
||||||
|
var data = new TrasferimentoPedaneDTO();
|
||||||
|
data.setCodMdepDest(inputData.getCodMdepDest());
|
||||||
|
data.setCreatedAt(inputData.getCreatedAt());
|
||||||
|
|
||||||
|
data.setRows(trasferimentoPedaneRowMapper.mapRoomsToRests(inputData.getTrasferimentoPedaneRowList()));
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package it.integry.integrywmsnative.core.mapper;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.entity.TrasferimentoPedaneRowEntity;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.trasferimento_pedane.TrasferimentoPedaneRowDTO;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class TrasferimentoPedaneRowMapper extends BaseMapper<TrasferimentoPedaneRowDTO, TrasferimentoPedaneRowEntity> {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public TrasferimentoPedaneRowMapper() {
|
||||||
|
// Default constructor for dependency injection
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TrasferimentoPedaneRowEntity mapRestToRoom(TrasferimentoPedaneRowDTO inputData) {
|
||||||
|
if(inputData == null) return null;
|
||||||
|
|
||||||
|
var data = new TrasferimentoPedaneRowEntity();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TrasferimentoPedaneRowDTO mapRoomToRest(TrasferimentoPedaneRowEntity inputData) {
|
||||||
|
if(inputData == null) return null;
|
||||||
|
|
||||||
|
var data = new TrasferimentoPedaneRowDTO();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,76 +4,146 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
public class Azienda {
|
public class Azienda extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("nomeDitta")
|
||||||
private String nomeDitta;
|
private String nomeDitta;
|
||||||
|
@SerializedName("indirizzo")
|
||||||
private String indirizzo;
|
private String indirizzo;
|
||||||
|
@SerializedName("cap")
|
||||||
private String cap;
|
private String cap;
|
||||||
|
@SerializedName("citta")
|
||||||
private String citta;
|
private String citta;
|
||||||
|
@SerializedName("prov")
|
||||||
private String prov;
|
private String prov;
|
||||||
|
@SerializedName("partIva")
|
||||||
private String partIva;
|
private String partIva;
|
||||||
|
@SerializedName("numTel")
|
||||||
private String numTel;
|
private String numTel;
|
||||||
|
@SerializedName("numFax")
|
||||||
private String numFax;
|
private String numFax;
|
||||||
|
@SerializedName("eMail")
|
||||||
private String eMail;
|
private String eMail;
|
||||||
|
@SerializedName("annoContab")
|
||||||
private Integer annoContab;
|
private Integer annoContab;
|
||||||
|
@SerializedName("annoMagaz")
|
||||||
private Integer annoMagaz;
|
private Integer annoMagaz;
|
||||||
|
@SerializedName("annoAttuale")
|
||||||
private Integer annoAttuale;
|
private Integer annoAttuale;
|
||||||
|
@SerializedName("ultDataGio")
|
||||||
private String ultDataGio;
|
private String ultDataGio;
|
||||||
|
@SerializedName("ultNumGio")
|
||||||
private Integer ultNumGio;
|
private Integer ultNumGio;
|
||||||
|
@SerializedName("ribaRSoc1")
|
||||||
private String ribaRSoc1;
|
private String ribaRSoc1;
|
||||||
|
@SerializedName("ribaRSoc2")
|
||||||
private String ribaRSoc2;
|
private String ribaRSoc2;
|
||||||
|
@SerializedName("ribaRSocBreve")
|
||||||
private String ribaRSocBreve;
|
private String ribaRSocBreve;
|
||||||
|
@SerializedName("dataInizMsg")
|
||||||
private String dataInizMsg;
|
private String dataInizMsg;
|
||||||
|
@SerializedName("dataFineMsg")
|
||||||
private String dataFineMsg;
|
private String dataFineMsg;
|
||||||
|
@SerializedName("messaggioDoc")
|
||||||
private String messaggioDoc;
|
private String messaggioDoc;
|
||||||
|
@SerializedName("liquidazioniIva")
|
||||||
private String liquidazioniIva;
|
private String liquidazioniIva;
|
||||||
|
@SerializedName("lastUpgDb")
|
||||||
private String lastUpgDb;
|
private String lastUpgDb;
|
||||||
|
@SerializedName("logoFile")
|
||||||
private String logoFile;
|
private String logoFile;
|
||||||
|
@SerializedName("logoB64")
|
||||||
private String logoB64;
|
private String logoB64;
|
||||||
|
@SerializedName("ultDareAv")
|
||||||
private BigDecimal ultDareAv;
|
private BigDecimal ultDareAv;
|
||||||
|
@SerializedName("sollTop")
|
||||||
private Integer sollTop;
|
private Integer sollTop;
|
||||||
|
@SerializedName("sollLeft")
|
||||||
private Integer sollLeft;
|
private Integer sollLeft;
|
||||||
|
@SerializedName("ggUtili")
|
||||||
private Integer ggUtili;
|
private Integer ggUtili;
|
||||||
|
@SerializedName("codSia")
|
||||||
private String codSia;
|
private String codSia;
|
||||||
|
@SerializedName("flagFattDiff")
|
||||||
private String flagFattDiff;
|
private String flagFattDiff;
|
||||||
|
@SerializedName("sollHeadPersonal")
|
||||||
private String sollHeadPersonal;
|
private String sollHeadPersonal;
|
||||||
|
@SerializedName("lastUpgSp")
|
||||||
private String lastUpgSp;
|
private String lastUpgSp;
|
||||||
|
@SerializedName("sitoWeb")
|
||||||
private String sitoWeb;
|
private String sitoWeb;
|
||||||
|
@SerializedName("capitaleSoc")
|
||||||
private BigDecimal capitaleSoc;
|
private BigDecimal capitaleSoc;
|
||||||
|
@SerializedName("cciaa")
|
||||||
private String cciaa;
|
private String cciaa;
|
||||||
|
@SerializedName("iscRegImp")
|
||||||
private String iscRegImp;
|
private String iscRegImp;
|
||||||
|
@SerializedName("ragSocMod")
|
||||||
private String ragSocMod;
|
private String ragSocMod;
|
||||||
|
@SerializedName("prefissoEan")
|
||||||
private String prefissoEan;
|
private String prefissoEan;
|
||||||
|
@SerializedName("codFiscale")
|
||||||
private String codFiscale;
|
private String codFiscale;
|
||||||
|
@SerializedName("persFisicaCognome")
|
||||||
private String persFisicaCognome;
|
private String persFisicaCognome;
|
||||||
|
@SerializedName("persFisicaNome")
|
||||||
private String persFisicaNome;
|
private String persFisicaNome;
|
||||||
|
@SerializedName("persFisicaSesso")
|
||||||
private String persFisicaSesso;
|
private String persFisicaSesso;
|
||||||
|
@SerializedName("persFisicaDataNascita")
|
||||||
private String persFisicaDataNascita;
|
private String persFisicaDataNascita;
|
||||||
|
@SerializedName("persFisicaComuneNascita")
|
||||||
private String persFisicaComuneNascita;
|
private String persFisicaComuneNascita;
|
||||||
|
@SerializedName("persFisicaProvNascita")
|
||||||
private String persFisicaProvNascita;
|
private String persFisicaProvNascita;
|
||||||
|
@SerializedName("flagPersFisica")
|
||||||
private String flagPersFisica;
|
private String flagPersFisica;
|
||||||
|
@SerializedName("persFisicaCodFisc")
|
||||||
private String persFisicaCodFisc;
|
private String persFisicaCodFisc;
|
||||||
|
@SerializedName("rapprLegale")
|
||||||
private String rapprLegale;
|
private String rapprLegale;
|
||||||
|
@SerializedName("rapprLegaleCodFisc")
|
||||||
private String rapprLegaleCodFisc;
|
private String rapprLegaleCodFisc;
|
||||||
|
@SerializedName("sedeAmm")
|
||||||
private String sedeAmm;
|
private String sedeAmm;
|
||||||
|
@SerializedName("flagSetIvaOmaggi")
|
||||||
private String flagSetIvaOmaggi;
|
private String flagSetIvaOmaggi;
|
||||||
|
@SerializedName("applicationName")
|
||||||
private String applicationName;
|
private String applicationName;
|
||||||
|
@SerializedName("flagTipoFatturazione")
|
||||||
private String flagTipoFatturazione;
|
private String flagTipoFatturazione;
|
||||||
|
@SerializedName("tribunale")
|
||||||
private String tribunale;
|
private String tribunale;
|
||||||
|
@SerializedName("settRitardoAnno")
|
||||||
private Integer settRitardoAnno;
|
private Integer settRitardoAnno;
|
||||||
|
@SerializedName("dbDistributore")
|
||||||
private String dbDistributore;
|
private String dbDistributore;
|
||||||
|
@SerializedName("coStringco")
|
||||||
private String coStringco;
|
private String coStringco;
|
||||||
|
@SerializedName("lastUpgQc")
|
||||||
private String lastUpgQc;
|
private String lastUpgQc;
|
||||||
|
@SerializedName("tipoAzienda")
|
||||||
private String tipoAzienda;
|
private String tipoAzienda;
|
||||||
|
@SerializedName("nazione")
|
||||||
private String nazione;
|
private String nazione;
|
||||||
|
@SerializedName("codDiviContab")
|
||||||
private String codDiviContab;
|
private String codDiviContab;
|
||||||
|
@SerializedName("codIvaOmaggi")
|
||||||
private String codIvaOmaggi;
|
private String codIvaOmaggi;
|
||||||
|
@SerializedName("codCconQuadra")
|
||||||
private String codCconQuadra;
|
private String codCconQuadra;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Azienda() {
|
||||||
|
type = "azienda";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regime Fiscale
|
* Regime Fiscale
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
|
||||||
|
|
||||||
public class CheckableMtbAart {
|
|
||||||
|
|
||||||
private MtbAart mtbAart;
|
|
||||||
private BindableBoolean checked = new BindableBoolean(false);
|
|
||||||
|
|
||||||
public CheckableMtbAart(MtbAart mtbAart) {
|
|
||||||
this.mtbAart = mtbAart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbAart getMtbAart() {
|
|
||||||
return mtbAart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableMtbAart setMtbAart(MtbAart mtbAart) {
|
|
||||||
this.mtbAart = mtbAart;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BindableBoolean getChecked() {
|
|
||||||
return checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableMtbAart setChecked(BindableBoolean checked) {
|
|
||||||
this.checked = checked;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void toggleCheck() {
|
|
||||||
this.checked.set(!this.checked.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
import androidx.databinding.Observable;
|
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListItemModel;
|
|
||||||
|
|
||||||
public class CheckableMtbColr {
|
|
||||||
|
|
||||||
|
|
||||||
private DialogChooseArtsFromMtbColrListItemModel item;
|
|
||||||
private BindableBoolean checked = new BindableBoolean(false);
|
|
||||||
private BindableBoolean hidden = new BindableBoolean(false);
|
|
||||||
|
|
||||||
public CheckableMtbColr(DialogChooseArtsFromMtbColrListItemModel item) {
|
|
||||||
this.item = item;
|
|
||||||
|
|
||||||
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
|
||||||
@Override
|
|
||||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
|
||||||
hidden.set(item.isHidden());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public DialogChooseArtsFromMtbColrListItemModel getItem() {
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableMtbColr setItem(DialogChooseArtsFromMtbColrListItemModel item) {
|
|
||||||
this.item = item;
|
|
||||||
|
|
||||||
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
|
||||||
@Override
|
|
||||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
|
||||||
hidden.set(item.isHidden());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BindableBoolean getChecked() {
|
|
||||||
return checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableMtbColr setChecked(BindableBoolean checked) {
|
|
||||||
this.checked = checked;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BindableBoolean getHidden() {
|
|
||||||
return hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isHidden() {
|
|
||||||
return hidden.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableMtbColr setHidden(BindableBoolean hidden) {
|
|
||||||
this.hidden = hidden;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,149 +1,224 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.model.key.DtbDocrKey;
|
||||||
|
|
||||||
public class DtbDocr {
|
public class DtbDocr extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
|
||||||
|
@SerializedName("codDtip")
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
|
|
||||||
private String dataDoc;
|
@SerializedName("dataDoc")
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
|
||||||
|
@SerializedName("idRiga")
|
||||||
private Integer idRiga;
|
private Integer idRiga;
|
||||||
|
|
||||||
|
@SerializedName("numDoc")
|
||||||
private Integer numDoc;
|
private Integer numDoc;
|
||||||
|
|
||||||
|
@SerializedName("serDoc")
|
||||||
private String serDoc;
|
private String serDoc;
|
||||||
|
|
||||||
|
@SerializedName("codAliq")
|
||||||
private String codAliq;
|
private String codAliq;
|
||||||
|
|
||||||
|
@SerializedName("codAnagComp")
|
||||||
private String codAnagComp;
|
private String codAnagComp;
|
||||||
|
|
||||||
|
@SerializedName("codArtFor")
|
||||||
private String codArtFor;
|
private String codArtFor;
|
||||||
|
|
||||||
|
@SerializedName("codCol")
|
||||||
private String codCol;
|
private String codCol;
|
||||||
|
|
||||||
|
@SerializedName("codDtipComp")
|
||||||
private String codDtipComp;
|
private String codDtipComp;
|
||||||
|
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
|
||||||
|
@SerializedName("codPromo")
|
||||||
private String codPromo;
|
private String codPromo;
|
||||||
|
|
||||||
|
@SerializedName("codTagl")
|
||||||
private String codTagl;
|
private String codTagl;
|
||||||
|
|
||||||
|
@SerializedName("costoUnt")
|
||||||
private BigDecimal costoUnt;
|
private BigDecimal costoUnt;
|
||||||
|
|
||||||
|
@SerializedName("dataDocComp")
|
||||||
private String dataDocComp;
|
private String dataDocComp;
|
||||||
|
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private String dataOrd;
|
private String dataOrd;
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
|
@SerializedName("descrizioneEstesa")
|
||||||
private String descrizioneEstesa;
|
private String descrizioneEstesa;
|
||||||
|
|
||||||
private String flagEvasoForzato;
|
private String flagEvasoForzato;
|
||||||
|
|
||||||
|
@SerializedName("importoRiga")
|
||||||
private BigDecimal importoRiga;
|
private BigDecimal importoRiga;
|
||||||
|
|
||||||
|
@SerializedName("numCnf")
|
||||||
private BigDecimal numCnf;
|
private BigDecimal numCnf;
|
||||||
|
|
||||||
|
@SerializedName("numDocComp")
|
||||||
private Integer numDocComp;
|
private Integer numDocComp;
|
||||||
|
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("percGest")
|
||||||
private BigDecimal percGest;
|
private BigDecimal percGest;
|
||||||
|
|
||||||
|
@SerializedName("percIspe")
|
||||||
private BigDecimal percIspe;
|
private BigDecimal percIspe;
|
||||||
|
|
||||||
|
@SerializedName("percOneri")
|
||||||
private BigDecimal percOneri;
|
private BigDecimal percOneri;
|
||||||
|
|
||||||
|
@SerializedName("percPromo")
|
||||||
private BigDecimal percPromo;
|
private BigDecimal percPromo;
|
||||||
|
|
||||||
|
@SerializedName("percProv")
|
||||||
private BigDecimal percProv;
|
private BigDecimal percProv;
|
||||||
|
|
||||||
|
@SerializedName("percProv2")
|
||||||
private BigDecimal percProv2;
|
private BigDecimal percProv2;
|
||||||
|
|
||||||
|
@SerializedName("pesoLordo")
|
||||||
private BigDecimal pesoLordo;
|
private BigDecimal pesoLordo;
|
||||||
|
|
||||||
private String posizione;
|
private String posizione;
|
||||||
|
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
|
||||||
|
@SerializedName("qtaDoc")
|
||||||
private BigDecimal qtaDoc;
|
private BigDecimal qtaDoc;
|
||||||
|
|
||||||
|
@SerializedName("qtaDoc2")
|
||||||
private BigDecimal qtaDoc2;
|
private BigDecimal qtaDoc2;
|
||||||
|
|
||||||
|
@SerializedName("qtaDoc3")
|
||||||
private BigDecimal qtaDoc3;
|
private BigDecimal qtaDoc3;
|
||||||
|
|
||||||
|
@SerializedName("rapConv")
|
||||||
private BigDecimal rapConv;
|
private BigDecimal rapConv;
|
||||||
|
|
||||||
|
@SerializedName("rigaOrd")
|
||||||
private Integer rigaOrd;
|
private Integer rigaOrd;
|
||||||
|
|
||||||
|
@SerializedName("sconto5")
|
||||||
private BigDecimal sconto5;
|
private BigDecimal sconto5;
|
||||||
|
|
||||||
|
@SerializedName("sconto6")
|
||||||
private BigDecimal sconto6;
|
private BigDecimal sconto6;
|
||||||
|
|
||||||
|
@SerializedName("sconto7")
|
||||||
private BigDecimal sconto7;
|
private BigDecimal sconto7;
|
||||||
|
|
||||||
|
@SerializedName("sconto8")
|
||||||
private BigDecimal sconto8;
|
private BigDecimal sconto8;
|
||||||
|
|
||||||
|
@SerializedName("serDocComp")
|
||||||
private String serDocComp;
|
private String serDocComp;
|
||||||
|
|
||||||
|
@SerializedName("untDoc")
|
||||||
private String untDoc;
|
private String untDoc;
|
||||||
|
|
||||||
|
@SerializedName("untDoc2")
|
||||||
private String untDoc2;
|
private String untDoc2;
|
||||||
|
|
||||||
|
@SerializedName("untDoc3")
|
||||||
private String untDoc3;
|
private String untDoc3;
|
||||||
|
|
||||||
|
@SerializedName("valGest")
|
||||||
private BigDecimal valGest;
|
private BigDecimal valGest;
|
||||||
|
|
||||||
|
@SerializedName("valIspe")
|
||||||
private BigDecimal valIspe;
|
private BigDecimal valIspe;
|
||||||
|
|
||||||
|
@SerializedName("valOneri")
|
||||||
private BigDecimal valOneri;
|
private BigDecimal valOneri;
|
||||||
|
|
||||||
|
@SerializedName("valPromo")
|
||||||
private BigDecimal valPromo;
|
private BigDecimal valPromo;
|
||||||
|
|
||||||
|
@SerializedName("valProv")
|
||||||
private BigDecimal valProv;
|
private BigDecimal valProv;
|
||||||
|
|
||||||
|
@SerializedName("valProv2")
|
||||||
private BigDecimal valProv2;
|
private BigDecimal valProv2;
|
||||||
|
|
||||||
|
@SerializedName("valUnt")
|
||||||
private BigDecimal valUnt;
|
private BigDecimal valUnt;
|
||||||
|
|
||||||
|
@SerializedName("valUntIva")
|
||||||
private BigDecimal valUntIva;
|
private BigDecimal valUntIva;
|
||||||
|
|
||||||
|
@SerializedName("codMtip")
|
||||||
private String codMtip;
|
private String codMtip;
|
||||||
|
|
||||||
|
@SerializedName("matricola")
|
||||||
private String matricola;
|
private String matricola;
|
||||||
|
|
||||||
|
@SerializedName("dataInizComp")
|
||||||
private String dataInizComp;
|
private String dataInizComp;
|
||||||
|
|
||||||
|
@SerializedName("dataFineComp")
|
||||||
private String dataFineComp;
|
private String dataFineComp;
|
||||||
|
|
||||||
|
@SerializedName("codKit")
|
||||||
private String codKit;
|
private String codKit;
|
||||||
|
|
||||||
|
@SerializedName("codAlis")
|
||||||
private String codAlis;
|
private String codAlis;
|
||||||
|
|
||||||
|
@SerializedName("dataInsRow")
|
||||||
private String dataInsRow;
|
private String dataInsRow;
|
||||||
|
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
|
@SerializedName("rigaKit")
|
||||||
private int rigaKit;
|
private int rigaKit;
|
||||||
|
|
||||||
|
@SerializedName("mtbAart")
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
@SerializedName("dataScadPartitaMag")
|
||||||
private LocalDate dataScadPartitaMag;
|
private LocalDate dataScadPartitaMag;
|
||||||
|
|
||||||
|
public DtbDocr() {
|
||||||
|
type = "dtb_docr";
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocrKey getKey() {
|
||||||
|
return new DtbDocrKey(codAnag, codDtip, dataDoc, numDoc, serDoc, idRiga);
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
return codAnag;
|
return codAnag;
|
||||||
}
|
}
|
||||||
@@ -162,17 +237,12 @@ public class DtbDocr {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataDocS() {
|
public LocalDate getDataDoc() {
|
||||||
return dataDoc;
|
return dataDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataDocD() {
|
public void setDataDoc(LocalDate dataDoc) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataDocS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public DtbDocr setDataDoc(String dataDoc) {
|
|
||||||
this.dataDoc = dataDoc;
|
this.dataDoc = dataDoc;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getIdRiga() {
|
public Integer getIdRiga() {
|
||||||
|
|||||||
@@ -1,128 +1,244 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class DtbDoct {
|
public class DtbDoct extends EntityBase{
|
||||||
|
|
||||||
public static final String ENTITY = "dtb_doct";
|
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("codDtip")
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
|
@SerializedName("dataDoc")
|
||||||
private LocalDate dataDoc;
|
private LocalDate dataDoc;
|
||||||
|
@SerializedName("numDoc")
|
||||||
private Integer numDoc;
|
private Integer numDoc;
|
||||||
|
@SerializedName("serDoc")
|
||||||
private String serDoc;
|
private String serDoc;
|
||||||
|
@SerializedName("acconto")
|
||||||
private BigDecimal acconto;
|
private BigDecimal acconto;
|
||||||
|
@SerializedName("activityId")
|
||||||
private String activityId;
|
private String activityId;
|
||||||
|
@SerializedName("annotazioni")
|
||||||
private String annotazioni;
|
private String annotazioni;
|
||||||
|
@SerializedName("aspettoBeni")
|
||||||
private String aspettoBeni;
|
private String aspettoBeni;
|
||||||
|
@SerializedName("cambio")
|
||||||
private BigDecimal cambio;
|
private BigDecimal cambio;
|
||||||
|
@SerializedName("causaleTrasp")
|
||||||
private String causaleTrasp;
|
private String causaleTrasp;
|
||||||
|
@SerializedName("codAbi")
|
||||||
private String codAbi;
|
private String codAbi;
|
||||||
|
@SerializedName("codAuto")
|
||||||
private String codAuto;
|
private String codAuto;
|
||||||
|
@SerializedName("codBanc")
|
||||||
private String codBanc;
|
private String codBanc;
|
||||||
|
@SerializedName("codBancAzi")
|
||||||
private String codBancAzi;
|
private String codBancAzi;
|
||||||
|
@SerializedName("codCab")
|
||||||
private String codCab;
|
private String codCab;
|
||||||
|
@SerializedName("codDivi")
|
||||||
private String codDivi;
|
private String codDivi;
|
||||||
|
@SerializedName("codDtipVal")
|
||||||
private String codDtipVal;
|
private String codDtipVal;
|
||||||
|
@SerializedName("codFornTd")
|
||||||
private String codFornTd;
|
private String codFornTd;
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
@SerializedName("codPaga")
|
||||||
private String codPaga;
|
private String codPaga;
|
||||||
|
@SerializedName("codProd")
|
||||||
private String codProd;
|
private String codProd;
|
||||||
|
@SerializedName("codVage")
|
||||||
private String codVage;
|
private String codVage;
|
||||||
|
@SerializedName("codVage2")
|
||||||
private String codVage2;
|
private String codVage2;
|
||||||
|
@SerializedName("codVdes")
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
|
@SerializedName("codVvet")
|
||||||
private String codVvet;
|
private String codVvet;
|
||||||
|
@SerializedName("codVvet2")
|
||||||
private String codVvet2;
|
private String codVvet2;
|
||||||
|
@SerializedName("codVzon")
|
||||||
private String codVzon;
|
private String codVzon;
|
||||||
|
@SerializedName("compilatoDa")
|
||||||
private String compilatoDa;
|
private String compilatoDa;
|
||||||
|
@SerializedName("userName")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
@SerializedName("controllatoDa")
|
||||||
private String controllatoDa;
|
private String controllatoDa;
|
||||||
|
@SerializedName("dataChkDoc")
|
||||||
private LocalDate dataChkDoc;
|
private LocalDate dataChkDoc;
|
||||||
|
@SerializedName("dataDocVal")
|
||||||
private LocalDate dataDocVal;
|
private LocalDate dataDocVal;
|
||||||
|
@SerializedName("dataInizTrasp")
|
||||||
private LocalDate dataInizTrasp;
|
private LocalDate dataInizTrasp;
|
||||||
|
@SerializedName("dataIns")
|
||||||
private LocalDate dataIns;
|
private LocalDate dataIns;
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private LocalDate dataOrd;
|
private LocalDate dataOrd;
|
||||||
|
@SerializedName("dataReg")
|
||||||
private LocalDate dataReg;
|
private LocalDate dataReg;
|
||||||
|
@SerializedName("dataRifScad")
|
||||||
private LocalDate dataRifScad;
|
private LocalDate dataRifScad;
|
||||||
|
@SerializedName("dataUltMod")
|
||||||
private LocalDate dataUltMod;
|
private LocalDate dataUltMod;
|
||||||
|
@SerializedName("descrizionePaga")
|
||||||
private String descrizionePaga;
|
private String descrizionePaga;
|
||||||
|
@SerializedName("flagPrzScontati")
|
||||||
private String flagPrzScontati;
|
private String flagPrzScontati;
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
@SerializedName("kmPercorsi")
|
||||||
private Integer kmPercorsi;
|
private Integer kmPercorsi;
|
||||||
|
@SerializedName("listino")
|
||||||
private String listino;
|
private String listino;
|
||||||
|
@SerializedName("mezzo")
|
||||||
private String mezzo;
|
private String mezzo;
|
||||||
|
@SerializedName("modificatoDa")
|
||||||
private String modificatoDa;
|
private String modificatoDa;
|
||||||
|
@SerializedName("nettoMerce")
|
||||||
private BigDecimal nettoMerce;
|
private BigDecimal nettoMerce;
|
||||||
|
@SerializedName("numCmov")
|
||||||
private Integer numCmov;
|
private Integer numCmov;
|
||||||
|
@SerializedName("numColli")
|
||||||
private String numColli;
|
private String numColli;
|
||||||
|
@SerializedName("numDocVal")
|
||||||
private Integer numDocVal;
|
private Integer numDocVal;
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
@SerializedName("numVettura")
|
||||||
private String numVettura;
|
private String numVettura;
|
||||||
|
@SerializedName("oraInizTrasp")
|
||||||
private String oraInizTrasp;
|
private String oraInizTrasp;
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
@SerializedName("peso")
|
||||||
private String peso;
|
private String peso;
|
||||||
|
@SerializedName("porto")
|
||||||
private String porto;
|
private String porto;
|
||||||
|
@SerializedName("previstaFat")
|
||||||
private String previstaFat;
|
private String previstaFat;
|
||||||
|
@SerializedName("qtaProd")
|
||||||
private BigDecimal qtaProd;
|
private BigDecimal qtaProd;
|
||||||
|
@SerializedName("rapConvProd")
|
||||||
private BigDecimal rapConvProd;
|
private BigDecimal rapConvProd;
|
||||||
|
@SerializedName("rifOrd")
|
||||||
private String rifOrd;
|
private String rifOrd;
|
||||||
|
@SerializedName("sconto1")
|
||||||
private BigDecimal sconto1;
|
private BigDecimal sconto1;
|
||||||
|
@SerializedName("sconto2")
|
||||||
private BigDecimal sconto2;
|
private BigDecimal sconto2;
|
||||||
|
@SerializedName("sconto3")
|
||||||
private BigDecimal sconto3;
|
private BigDecimal sconto3;
|
||||||
|
@SerializedName("sconto4")
|
||||||
private BigDecimal sconto4;
|
private BigDecimal sconto4;
|
||||||
|
@SerializedName("serDocVal")
|
||||||
private String serDocVal;
|
private String serDocVal;
|
||||||
|
@SerializedName("termCons")
|
||||||
private String termCons;
|
private String termCons;
|
||||||
|
@SerializedName("tipoAnag")
|
||||||
private String tipoAnag;
|
private String tipoAnag;
|
||||||
|
@SerializedName("totImponib")
|
||||||
private BigDecimal totImponib;
|
private BigDecimal totImponib;
|
||||||
|
@SerializedName("totIva")
|
||||||
private BigDecimal totIva;
|
private BigDecimal totIva;
|
||||||
|
@SerializedName("totMerce")
|
||||||
private BigDecimal totMerce;
|
private BigDecimal totMerce;
|
||||||
|
@SerializedName("totOmaggi")
|
||||||
private BigDecimal totOmaggi;
|
private BigDecimal totOmaggi;
|
||||||
|
@SerializedName("totProvvig")
|
||||||
private BigDecimal totProvvig;
|
private BigDecimal totProvvig;
|
||||||
|
@SerializedName("untMisProd")
|
||||||
private String untMisProd;
|
private String untMisProd;
|
||||||
|
@SerializedName("idViaggio")
|
||||||
private String idViaggio;
|
private String idViaggio;
|
||||||
|
@SerializedName("numDocForn")
|
||||||
private String numDocForn;
|
private String numDocForn;
|
||||||
|
@SerializedName("generaMovCont")
|
||||||
private String generaMovCont;
|
private String generaMovCont;
|
||||||
|
@SerializedName("targa")
|
||||||
private String targa;
|
private String targa;
|
||||||
|
@SerializedName("postiPallet")
|
||||||
private Integer postiPallet;
|
private Integer postiPallet;
|
||||||
|
@SerializedName("tempMedia")
|
||||||
private BigDecimal tempMedia;
|
private BigDecimal tempMedia;
|
||||||
|
@SerializedName("dataCons")
|
||||||
private LocalDate dataCons;
|
private LocalDate dataCons;
|
||||||
|
@SerializedName("nolo")
|
||||||
private BigDecimal nolo;
|
private BigDecimal nolo;
|
||||||
|
@SerializedName("nolo2")
|
||||||
private BigDecimal nolo2;
|
private BigDecimal nolo2;
|
||||||
|
@SerializedName("conducente")
|
||||||
private String conducente;
|
private String conducente;
|
||||||
|
@SerializedName("iban")
|
||||||
private String iban;
|
private String iban;
|
||||||
|
@SerializedName("mrn")
|
||||||
private String mrn;
|
private String mrn;
|
||||||
|
@SerializedName("explodeKit")
|
||||||
private String explodeKit;
|
private String explodeKit;
|
||||||
|
@SerializedName("flagPrzIva")
|
||||||
private String flagPrzIva;
|
private String flagPrzIva;
|
||||||
|
@SerializedName("flagCheckPlafond")
|
||||||
private String flagCheckPlafond;
|
private String flagCheckPlafond;
|
||||||
|
@SerializedName("tipoEmissione")
|
||||||
private String tipoEmissione;
|
private String tipoEmissione;
|
||||||
|
@SerializedName("setDataDecorrenza2DataRic")
|
||||||
private String setDataDecorrenza2DataRic;
|
private String setDataDecorrenza2DataRic;
|
||||||
|
@SerializedName("totSpese")
|
||||||
private BigDecimal totSpese;
|
private BigDecimal totSpese;
|
||||||
|
@SerializedName("chkArtListino")
|
||||||
private String chkArtListino;
|
private String chkArtListino;
|
||||||
|
@SerializedName("dataCmov")
|
||||||
private LocalDate dataCmov;
|
private LocalDate dataCmov;
|
||||||
|
@SerializedName("reso")
|
||||||
private String reso;
|
private String reso;
|
||||||
|
@SerializedName("numCmovAutofattura")
|
||||||
private Integer numCmovAutofattura;
|
private Integer numCmovAutofattura;
|
||||||
|
@SerializedName("dtbTipi")
|
||||||
private Object dtbTipi;
|
private Object dtbTipi;
|
||||||
|
@SerializedName("vtbClie")
|
||||||
private Object vtbClie;
|
private Object vtbClie;
|
||||||
|
@SerializedName("jrlSchmacDoc")
|
||||||
private List<Object> jrlSchmacDoc;
|
private List<Object> jrlSchmacDoc;
|
||||||
|
@SerializedName("arlSchaccDoc")
|
||||||
private List<Object> arlSchaccDoc;
|
private List<Object> arlSchaccDoc;
|
||||||
|
@SerializedName("dtbDocr")
|
||||||
private List<DtbDocr> dtbDocr;
|
private List<DtbDocr> dtbDocr;
|
||||||
|
@SerializedName("dtbDocs")
|
||||||
private List<Object> dtbDocs;
|
private List<Object> dtbDocs;
|
||||||
|
@SerializedName("mtbColt")
|
||||||
private List<MtbColt> mtbColt;
|
private List<MtbColt> mtbColt;
|
||||||
|
@SerializedName("drlDocAttached")
|
||||||
private List<Object> drlDocAttached;
|
private List<Object> drlDocAttached;
|
||||||
|
@SerializedName("dtbDocCarat")
|
||||||
private List<Object> dtbDocCarat;
|
private List<Object> dtbDocCarat;
|
||||||
|
@SerializedName("ctbScad")
|
||||||
private List<Object> ctbScad;
|
private List<Object> ctbScad;
|
||||||
|
@SerializedName("ctbMovt")
|
||||||
private Object ctbMovt;
|
private Object ctbMovt;
|
||||||
|
@SerializedName("ctbMovi")
|
||||||
private List<Object> ctbMovi;
|
private List<Object> ctbMovi;
|
||||||
|
@SerializedName("costi")
|
||||||
private List<Object> costi;
|
private List<Object> costi;
|
||||||
|
@SerializedName("ntbDoct")
|
||||||
private List<Object> ntbDoct;
|
private List<Object> ntbDoct;
|
||||||
|
@SerializedName("dtbDoctBolle")
|
||||||
private List<DtbDoct> dtbDoctBolle;
|
private List<DtbDoct> dtbDoctBolle;
|
||||||
private Object dtbInum;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public DtbDoct() {
|
||||||
|
type = "dtb_doct";
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
return codAnag;
|
return codAnag;
|
||||||
}
|
}
|
||||||
@@ -1130,13 +1246,4 @@ public class DtbDoct {
|
|||||||
this.dtbDoctBolle = dtbDoctBolle;
|
this.dtbDoctBolle = dtbDoctBolle;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getDtbInum() {
|
|
||||||
return dtbInum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DtbDoct setDtbInum(Object dtbInum) {
|
|
||||||
this.dtbInum = dtbInum;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,45 +1,120 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class DtbOrdSteps extends EntityBase {
|
public class DtbOrdSteps extends EntityBase {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private String dataOrd;
|
private String dataOrd;
|
||||||
|
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
|
||||||
|
@SerializedName("idRiga")
|
||||||
private Integer idRiga;
|
private Integer idRiga;
|
||||||
|
|
||||||
|
@SerializedName("idStep")
|
||||||
private Integer idStep;
|
private Integer idStep;
|
||||||
|
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
|
||||||
|
@SerializedName("activityId")
|
||||||
private String activityId;
|
private String activityId;
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
|
||||||
|
@SerializedName("codDtip")
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
|
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
|
||||||
|
@SerializedName("codProdPri")
|
||||||
private String codProdPri;
|
private String codProdPri;
|
||||||
|
|
||||||
|
@SerializedName("dataDoc")
|
||||||
private String dataDoc;
|
private String dataDoc;
|
||||||
|
|
||||||
|
@SerializedName("dataFine")
|
||||||
private String dataFine;
|
private String dataFine;
|
||||||
|
|
||||||
|
@SerializedName("dataIniz")
|
||||||
private String dataIniz;
|
private String dataIniz;
|
||||||
|
|
||||||
|
@SerializedName("descrizioneAttivita")
|
||||||
private String descrizioneAttivita;
|
private String descrizioneAttivita;
|
||||||
|
|
||||||
|
@SerializedName("flagTipoTempo")
|
||||||
private String flagTipoTempo;
|
private String flagTipoTempo;
|
||||||
|
|
||||||
|
@SerializedName("hrNum")
|
||||||
private Integer hrNum;
|
private Integer hrNum;
|
||||||
|
|
||||||
|
@SerializedName("hrTime")
|
||||||
private BigDecimal hrTime;
|
private BigDecimal hrTime;
|
||||||
|
|
||||||
|
@SerializedName("idRigaDoc")
|
||||||
private String idRigaDoc;
|
private String idRigaDoc;
|
||||||
|
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
|
@SerializedName("numDoc")
|
||||||
private String numDoc;
|
private String numDoc;
|
||||||
|
|
||||||
|
@SerializedName("numFase")
|
||||||
private Integer numFase;
|
private Integer numFase;
|
||||||
|
|
||||||
|
@SerializedName("qtaAllocata")
|
||||||
private BigDecimal qtaAllocata;
|
private BigDecimal qtaAllocata;
|
||||||
|
|
||||||
|
@SerializedName("qtaDisp")
|
||||||
private BigDecimal qtaDisp;
|
private BigDecimal qtaDisp;
|
||||||
|
|
||||||
|
@SerializedName("qtaDispImmessa")
|
||||||
private BigDecimal qtaDispImmessa;
|
private BigDecimal qtaDispImmessa;
|
||||||
|
|
||||||
|
@SerializedName("qtaImmesse")
|
||||||
private BigDecimal qtaImmesse;
|
private BigDecimal qtaImmesse;
|
||||||
|
|
||||||
|
@SerializedName("qtaInProd")
|
||||||
private BigDecimal qtaInProd;
|
private BigDecimal qtaInProd;
|
||||||
|
|
||||||
|
@SerializedName("qtaLav")
|
||||||
private BigDecimal qtaLav;
|
private BigDecimal qtaLav;
|
||||||
|
|
||||||
|
@SerializedName("qtaProd")
|
||||||
private BigDecimal qtaProd;
|
private BigDecimal qtaProd;
|
||||||
|
|
||||||
|
@SerializedName("qtaScartate")
|
||||||
private BigDecimal qtaScartate;
|
private BigDecimal qtaScartate;
|
||||||
|
|
||||||
|
@SerializedName("qtaTrasferite")
|
||||||
private BigDecimal qtaTrasferite;
|
private BigDecimal qtaTrasferite;
|
||||||
|
|
||||||
|
@SerializedName("rapConvLav")
|
||||||
private BigDecimal rapConvLav;
|
private BigDecimal rapConvLav;
|
||||||
|
|
||||||
|
@SerializedName("serDoc")
|
||||||
private String serDoc;
|
private String serDoc;
|
||||||
|
|
||||||
|
@SerializedName("untMisLav")
|
||||||
private String untMisLav;
|
private String untMisLav;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public DtbOrdSteps() {
|
||||||
|
type = "dtb_ord_steps";
|
||||||
|
}
|
||||||
|
|
||||||
public String getDataOrd() {
|
public String getDataOrd() {
|
||||||
return dataOrd;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,120 +1,325 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
public class DtbOrdt extends EntityBase {
|
public class DtbOrdt extends EntityBase {
|
||||||
|
|
||||||
private String dataOrd;
|
|
||||||
|
@SerializedName("dataOrd")
|
||||||
|
private LocalDate dataOrd;
|
||||||
|
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
|
||||||
|
@SerializedName("acconto")
|
||||||
private BigDecimal acconto;
|
private BigDecimal acconto;
|
||||||
|
|
||||||
|
@SerializedName("activityId")
|
||||||
private String activityId;
|
private String activityId;
|
||||||
|
|
||||||
|
@SerializedName("activityTypeId")
|
||||||
private String activityTypeId;
|
private String activityTypeId;
|
||||||
|
|
||||||
|
@SerializedName("aspettoBeni")
|
||||||
private String aspettoBeni;
|
private String aspettoBeni;
|
||||||
|
|
||||||
|
@SerializedName("causaleTrasp")
|
||||||
private String causaleTrasp;
|
private String causaleTrasp;
|
||||||
|
|
||||||
|
@SerializedName("codAbi")
|
||||||
private String codAbi;
|
private String codAbi;
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
|
||||||
|
@SerializedName("codAuto")
|
||||||
private String codAuto;
|
private String codAuto;
|
||||||
|
|
||||||
|
@SerializedName("codBanc")
|
||||||
private String codBanc;
|
private String codBanc;
|
||||||
|
|
||||||
|
@SerializedName("codBancAzi")
|
||||||
private String codBancAzi;
|
private String codBancAzi;
|
||||||
|
|
||||||
|
@SerializedName("codCab")
|
||||||
private String codCab;
|
private String codCab;
|
||||||
|
|
||||||
|
@SerializedName("codDgrpArt")
|
||||||
private String codDgrpArt;
|
private String codDgrpArt;
|
||||||
|
|
||||||
|
@SerializedName("codDivi")
|
||||||
private String codDivi;
|
private String codDivi;
|
||||||
|
|
||||||
|
@SerializedName("codEtic")
|
||||||
private String codEtic;
|
private String codEtic;
|
||||||
|
|
||||||
|
@SerializedName("codFornTd")
|
||||||
private String codFornTd;
|
private String codFornTd;
|
||||||
|
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
|
||||||
|
@SerializedName("codPaga")
|
||||||
private String codPaga;
|
private String codPaga;
|
||||||
|
|
||||||
|
@SerializedName("codProd")
|
||||||
private String codProd;
|
private String codProd;
|
||||||
|
|
||||||
|
@SerializedName("codTcolUi")
|
||||||
private String codTcolUi;
|
private String codTcolUi;
|
||||||
|
|
||||||
|
@SerializedName("codTcolUl")
|
||||||
private String codTcolUl;
|
private String codTcolUl;
|
||||||
|
|
||||||
|
@SerializedName("codVage")
|
||||||
private String codVage;
|
private String codVage;
|
||||||
|
|
||||||
|
@SerializedName("codVage2")
|
||||||
private String codVage2;
|
private String codVage2;
|
||||||
|
|
||||||
|
@SerializedName("codVdes")
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
|
|
||||||
|
@SerializedName("codVvet")
|
||||||
private String codVvet;
|
private String codVvet;
|
||||||
|
|
||||||
|
@SerializedName("codVvet2")
|
||||||
private String codVvet2;
|
private String codVvet2;
|
||||||
|
|
||||||
|
@SerializedName("codVzon")
|
||||||
private String codVzon;
|
private String codVzon;
|
||||||
|
|
||||||
|
@SerializedName("colliPedana")
|
||||||
private BigDecimal colliPedana;
|
private BigDecimal colliPedana;
|
||||||
|
|
||||||
|
@SerializedName("compilatoDa")
|
||||||
private String compilatoDa;
|
private String compilatoDa;
|
||||||
|
|
||||||
|
@SerializedName("controllatoDa")
|
||||||
private String controllatoDa;
|
private String controllatoDa;
|
||||||
|
|
||||||
|
@SerializedName("dataConsProd")
|
||||||
private String dataConsProd;
|
private String dataConsProd;
|
||||||
|
|
||||||
|
@SerializedName("dataConsProdMax")
|
||||||
private String dataConsProdMax;
|
private String dataConsProdMax;
|
||||||
|
|
||||||
|
@SerializedName("dataEsportazione")
|
||||||
private String dataEsportazione;
|
private String dataEsportazione;
|
||||||
|
|
||||||
|
@SerializedName("dataConferma")
|
||||||
private String dataConferma;
|
private String dataConferma;
|
||||||
|
|
||||||
|
@SerializedName("dataInizProd")
|
||||||
private String dataInizProd;
|
private String dataInizProd;
|
||||||
|
|
||||||
|
@SerializedName("dataInizTrasp")
|
||||||
private String dataInizTrasp;
|
private String dataInizTrasp;
|
||||||
|
|
||||||
|
@SerializedName("dataInsOrd")
|
||||||
private String dataInsOrd;
|
private String dataInsOrd;
|
||||||
|
|
||||||
|
@SerializedName("dataOrdRif")
|
||||||
private String dataOrdRif;
|
private String dataOrdRif;
|
||||||
|
|
||||||
|
@SerializedName("rifDdataOrd")
|
||||||
private String rifDdataOrd;
|
private String rifDdataOrd;
|
||||||
|
|
||||||
|
@SerializedName("dataRicezione")
|
||||||
private String dataRicezione;
|
private String dataRicezione;
|
||||||
|
|
||||||
|
@SerializedName("dataRifScad")
|
||||||
private String dataRifScad;
|
private String dataRifScad;
|
||||||
|
|
||||||
|
@SerializedName("dataUltMod")
|
||||||
private String dataUltMod;
|
private String dataUltMod;
|
||||||
|
|
||||||
|
@SerializedName("descrEstesaProd")
|
||||||
private String descrEstesaProd;
|
private String descrEstesaProd;
|
||||||
|
|
||||||
|
@SerializedName("descrizionePaga")
|
||||||
private String descrizionePaga;
|
private String descrizionePaga;
|
||||||
|
|
||||||
|
@SerializedName("descrizioneProd")
|
||||||
private String descrizioneProd;
|
private String descrizioneProd;
|
||||||
|
|
||||||
|
@SerializedName("eanFidelity")
|
||||||
private String eanFidelity;
|
private String eanFidelity;
|
||||||
|
|
||||||
|
@SerializedName("flagAnnulla")
|
||||||
private String flagAnnulla;
|
private String flagAnnulla;
|
||||||
|
|
||||||
|
@SerializedName("flagEscRoyal")
|
||||||
private String flagEscRoyal;
|
private String flagEscRoyal;
|
||||||
|
|
||||||
|
@SerializedName("flagEvasoForzato")
|
||||||
private String flagEvasoForzato;
|
private String flagEvasoForzato;
|
||||||
|
|
||||||
|
@SerializedName("flagEvasoProd")
|
||||||
private String flagEvasoProd;
|
private String flagEvasoProd;
|
||||||
|
|
||||||
|
@SerializedName("flagPrzScontati")
|
||||||
private String flagPrzScontati;
|
private String flagPrzScontati;
|
||||||
|
|
||||||
|
@SerializedName("flagSospeso")
|
||||||
private String flagSospeso;
|
private String flagSospeso;
|
||||||
|
|
||||||
|
@SerializedName("flagTipologia")
|
||||||
private String flagTipologia;
|
private String flagTipologia;
|
||||||
|
|
||||||
|
@SerializedName("gestioneRif")
|
||||||
private String gestioneRif;
|
private String gestioneRif;
|
||||||
|
|
||||||
|
@SerializedName("itemId")
|
||||||
private String itemId;
|
private String itemId;
|
||||||
|
|
||||||
|
@SerializedName("listino")
|
||||||
private String listino;
|
private String listino;
|
||||||
|
|
||||||
|
@SerializedName("livello")
|
||||||
private Integer livello;
|
private Integer livello;
|
||||||
|
|
||||||
|
@SerializedName("mezzo")
|
||||||
private String mezzo;
|
private String mezzo;
|
||||||
|
|
||||||
|
@SerializedName("modificatoDa")
|
||||||
private String modificatoDa;
|
private String modificatoDa;
|
||||||
|
|
||||||
|
@SerializedName("nettoMerce")
|
||||||
private BigDecimal nettoMerce;
|
private BigDecimal nettoMerce;
|
||||||
|
|
||||||
|
@SerializedName("nolo")
|
||||||
private BigDecimal nolo;
|
private BigDecimal nolo;
|
||||||
|
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
|
@SerializedName("numColli")
|
||||||
private String numColli;
|
private String numColli;
|
||||||
|
|
||||||
|
@SerializedName("numCons")
|
||||||
private String numCons;
|
private String numCons;
|
||||||
|
|
||||||
|
@SerializedName("numFase")
|
||||||
private Integer numFase;
|
private Integer numFase;
|
||||||
|
|
||||||
|
@SerializedName("numOrdProvv")
|
||||||
private Integer numOrdProvv;
|
private Integer numOrdProvv;
|
||||||
|
|
||||||
|
@SerializedName("numOrdRif")
|
||||||
private Integer numOrdRif;
|
private Integer numOrdRif;
|
||||||
|
|
||||||
|
@SerializedName("rifNumOrd")
|
||||||
private Integer rifNumOrd;
|
private Integer rifNumOrd;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("percEsclStat")
|
||||||
private BigDecimal percEsclStat;
|
private BigDecimal percEsclStat;
|
||||||
|
|
||||||
|
@SerializedName("personaRif")
|
||||||
private String personaRif;
|
private String personaRif;
|
||||||
|
|
||||||
|
@SerializedName("peso")
|
||||||
private String peso;
|
private String peso;
|
||||||
|
|
||||||
|
@SerializedName("porto")
|
||||||
private String porto;
|
private String porto;
|
||||||
|
|
||||||
|
@SerializedName("qtaEvasaProd")
|
||||||
private BigDecimal qtaEvasaProd;
|
private BigDecimal qtaEvasaProd;
|
||||||
|
|
||||||
|
@SerializedName("qtaPrenotataRep")
|
||||||
private BigDecimal qtaPrenotataRep;
|
private BigDecimal qtaPrenotataRep;
|
||||||
|
|
||||||
|
@SerializedName("qtaProd")
|
||||||
private BigDecimal qtaProd;
|
private BigDecimal qtaProd;
|
||||||
|
|
||||||
|
@SerializedName("rapConvProd")
|
||||||
private BigDecimal rapConvProd;
|
private BigDecimal rapConvProd;
|
||||||
|
|
||||||
|
@SerializedName("rfid")
|
||||||
private String rfid;
|
private String rfid;
|
||||||
|
|
||||||
|
@SerializedName("rifOrd")
|
||||||
private String rifOrd;
|
private String rifOrd;
|
||||||
|
|
||||||
|
@SerializedName("rigaOrdRif")
|
||||||
private Integer rigaOrdRif;
|
private Integer rigaOrdRif;
|
||||||
|
|
||||||
|
@SerializedName("sconto1")
|
||||||
private BigDecimal sconto1;
|
private BigDecimal sconto1;
|
||||||
|
|
||||||
|
@SerializedName("sconto2")
|
||||||
private BigDecimal sconto2;
|
private BigDecimal sconto2;
|
||||||
|
|
||||||
|
@SerializedName("sconto3")
|
||||||
private BigDecimal sconto3;
|
private BigDecimal sconto3;
|
||||||
|
|
||||||
|
@SerializedName("sconto4")
|
||||||
private BigDecimal sconto4;
|
private BigDecimal sconto4;
|
||||||
|
|
||||||
|
@SerializedName("serie")
|
||||||
private String serie;
|
private String serie;
|
||||||
|
|
||||||
|
@SerializedName("termCons")
|
||||||
private String termCons;
|
private String termCons;
|
||||||
|
|
||||||
|
@SerializedName("tipoAnag")
|
||||||
private String tipoAnag;
|
private String tipoAnag;
|
||||||
|
|
||||||
|
@SerializedName("totFasi")
|
||||||
private Integer totFasi;
|
private Integer totFasi;
|
||||||
|
|
||||||
|
@SerializedName("totImponib")
|
||||||
private BigDecimal totImponib;
|
private BigDecimal totImponib;
|
||||||
|
|
||||||
|
@SerializedName("totIva")
|
||||||
private BigDecimal totIva;
|
private BigDecimal totIva;
|
||||||
|
|
||||||
|
@SerializedName("totMerce")
|
||||||
private BigDecimal totMerce;
|
private BigDecimal totMerce;
|
||||||
|
|
||||||
|
@SerializedName("totOmaggi")
|
||||||
private BigDecimal totOmaggi;
|
private BigDecimal totOmaggi;
|
||||||
|
|
||||||
|
@SerializedName("totProvvig")
|
||||||
private BigDecimal totProvvig;
|
private BigDecimal totProvvig;
|
||||||
|
|
||||||
|
@SerializedName("untMisProd")
|
||||||
private String untMisProd;
|
private String untMisProd;
|
||||||
|
|
||||||
|
@SerializedName("flagPrzIva")
|
||||||
private String flagPrzIva;
|
private String flagPrzIva;
|
||||||
|
|
||||||
|
@SerializedName("noteConferma")
|
||||||
private String noteConferma;
|
private String noteConferma;
|
||||||
|
|
||||||
|
@SerializedName("codJflav")
|
||||||
private String codJflav;
|
private String codJflav;
|
||||||
|
|
||||||
public DtbOrdt() {
|
public DtbOrdt() {
|
||||||
this.type = "dtb_ordt";
|
this.type = "dtb_ordt";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataOrd() {
|
public LocalDate getDataOrd() {
|
||||||
return dataOrd;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DtbOrdt setDataOrd(String dataOrd) {
|
public DtbOrdt setDataOrd(LocalDate dataOrd) {
|
||||||
this.dataOrd = dataOrd;
|
this.dataOrd = dataOrd;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public abstract class EntityBase extends BaseRestDTO implements Cloneable{
|
public abstract class EntityBase extends BaseRestDTO implements Cloneable{
|
||||||
|
|
||||||
|
@SerializedName("operation")
|
||||||
public String operation;
|
public String operation;
|
||||||
|
@SerializedName("type")
|
||||||
public String type;
|
public String type;
|
||||||
|
@SerializedName("onlyPkMaster")
|
||||||
public boolean onlyPkMaster = false;
|
public boolean onlyPkMaster = false;
|
||||||
|
|
||||||
public String getOperation() {
|
public String getOperation() {
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.util.Date;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
public class FiltroOrdineDTO {
|
public class FiltroOrdineDTO {
|
||||||
|
|
||||||
|
@SerializedName("gestioneOrd")
|
||||||
private String gestioneOrd;
|
private String gestioneOrd;
|
||||||
private String dataOrd;
|
@SerializedName("dataOrd")
|
||||||
private String dataCons;
|
private LocalDate dataOrd;
|
||||||
|
@SerializedName("dataCons")
|
||||||
|
private LocalDate dataCons;
|
||||||
|
@SerializedName("numOrd")
|
||||||
private int numOrd;
|
private int numOrd;
|
||||||
|
|
||||||
public String getGestioneOrd() {
|
public String getGestioneOrd() {
|
||||||
@@ -20,44 +24,25 @@ public class FiltroOrdineDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataOrdS() {
|
|
||||||
|
public LocalDate getDataOrd() {
|
||||||
return dataOrd;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataOrdD() {
|
public FiltroOrdineDTO setDataOrd(LocalDate dataOrd) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrdS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public FiltroOrdineDTO setDataOrd(String dataOrd) {
|
|
||||||
this.dataOrd = dataOrd;
|
this.dataOrd = dataOrd;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FiltroOrdineDTO setDataOrd(Date dataOrd) {
|
public LocalDate getDataCons() {
|
||||||
this.dataOrd = UtilityDate.formatDate(dataOrd, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataConsS() {
|
|
||||||
return dataCons;
|
return dataCons;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataConsD() {
|
public FiltroOrdineDTO setDataCons(LocalDate dataCons) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataConsS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public FiltroOrdineDTO setDataCons(String dataCons) {
|
|
||||||
this.dataCons = dataCons;
|
this.dataCons = dataCons;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FiltroOrdineDTO setDataCons(Date dataCons) {
|
|
||||||
if(dataCons != null) {
|
|
||||||
this.dataCons = UtilityDate.formatDate(dataCons, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getNumOrd() {
|
public int getNumOrd() {
|
||||||
return numOrd;
|
return numOrd;
|
||||||
}
|
}
|
||||||
@@ -77,8 +62,8 @@ public class FiltroOrdineDTO {
|
|||||||
if (getNumOrd() != that.getNumOrd()) return false;
|
if (getNumOrd() != that.getNumOrd()) return false;
|
||||||
if (getGestioneOrd() != null ? !getGestioneOrd().equals(that.getGestioneOrd()) : that.getGestioneOrd() != null)
|
if (getGestioneOrd() != null ? !getGestioneOrd().equals(that.getGestioneOrd()) : that.getGestioneOrd() != null)
|
||||||
return false;
|
return false;
|
||||||
if (dataOrd != null ? !dataOrd.equals(that.dataOrd) : that.dataOrd != null) return false;
|
if (dataOrd != null ? !dataOrd.isEqual(that.dataOrd) : that.dataOrd != null) return false;
|
||||||
return dataCons != null ? dataCons.equals(that.dataCons) : that.dataCons == null;
|
return dataCons != null ? dataCons.isEqual(that.dataCons) : that.dataCons == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,48 +1,88 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class GtbAnag extends EntityBase {
|
public class GtbAnag extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("ragSoc")
|
||||||
private String ragSoc;
|
private String ragSoc;
|
||||||
|
@SerializedName("indirizzo")
|
||||||
private String indirizzo;
|
private String indirizzo;
|
||||||
|
@SerializedName("cap")
|
||||||
private String cap;
|
private String cap;
|
||||||
|
@SerializedName("citta")
|
||||||
private String citta;
|
private String citta;
|
||||||
|
@SerializedName("prov")
|
||||||
private String prov;
|
private String prov;
|
||||||
|
@SerializedName("nazione")
|
||||||
private String nazione;
|
private String nazione;
|
||||||
|
@SerializedName("telefono")
|
||||||
private String telefono;
|
private String telefono;
|
||||||
|
@SerializedName("fax")
|
||||||
private String fax;
|
private String fax;
|
||||||
|
@SerializedName("partIva")
|
||||||
private String partIva;
|
private String partIva;
|
||||||
|
@SerializedName("codFisc")
|
||||||
private String codFisc;
|
private String codFisc;
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
@SerializedName("personaRif")
|
||||||
private String personaRif;
|
private String personaRif;
|
||||||
|
@SerializedName("allegato")
|
||||||
private String allegato;
|
private String allegato;
|
||||||
|
@SerializedName("eMail")
|
||||||
private String eMail;
|
private String eMail;
|
||||||
|
@SerializedName("eMailPec")
|
||||||
private String eMailPec;
|
private String eMailPec;
|
||||||
|
@SerializedName("flagPersonaFg")
|
||||||
private String flagPersonaFg;
|
private String flagPersonaFg;
|
||||||
|
@SerializedName("sesso")
|
||||||
private String sesso;
|
private String sesso;
|
||||||
|
@SerializedName("codCentroAzi")
|
||||||
private String codCentroAzi;
|
private String codCentroAzi;
|
||||||
|
@SerializedName("codRuop")
|
||||||
private String codRuop;
|
private String codRuop;
|
||||||
|
@SerializedName("dataNascita")
|
||||||
private Date dataNascita;
|
private Date dataNascita;
|
||||||
|
@SerializedName("luogoNascita")
|
||||||
private String luogoNascita;
|
private String luogoNascita;
|
||||||
|
@SerializedName("provNascita")
|
||||||
private String provNascita;
|
private String provNascita;
|
||||||
|
@SerializedName("nome")
|
||||||
private String nome;
|
private String nome;
|
||||||
|
@SerializedName("ragSoc2")
|
||||||
private String ragSoc2;
|
private String ragSoc2;
|
||||||
|
@SerializedName("classeMerito")
|
||||||
private Integer classeMerito;
|
private Integer classeMerito;
|
||||||
|
@SerializedName("dataIns")
|
||||||
private Date dataIns;
|
private Date dataIns;
|
||||||
|
@SerializedName("numCell")
|
||||||
private String numCell;
|
private String numCell;
|
||||||
|
@SerializedName("cciaa")
|
||||||
private String cciaa;
|
private String cciaa;
|
||||||
|
@SerializedName("tipoAzienda")
|
||||||
private String tipoAzienda;
|
private String tipoAzienda;
|
||||||
|
@SerializedName("cuuPa")
|
||||||
private String cuuPa;
|
private String cuuPa;
|
||||||
|
@SerializedName("cognome")
|
||||||
private String cognome;
|
private String cognome;
|
||||||
|
@SerializedName("diacod")
|
||||||
private String diacod;
|
private String diacod;
|
||||||
|
@SerializedName("lat")
|
||||||
private BigDecimal lat;
|
private BigDecimal lat;
|
||||||
|
@SerializedName("lng")
|
||||||
private BigDecimal lng;
|
private BigDecimal lng;
|
||||||
|
@SerializedName("flagInformativa")
|
||||||
private String flagInformativa;
|
private String flagInformativa;
|
||||||
|
@SerializedName("flagConsenso")
|
||||||
private String flagConsenso;
|
private String flagConsenso;
|
||||||
|
@SerializedName("precode")
|
||||||
private String precode;
|
private String precode;
|
||||||
|
@SerializedName("insDestinatario")
|
||||||
private Boolean insDestinatario;
|
private Boolean insDestinatario;
|
||||||
|
|
||||||
public GtbAnag() {
|
public GtbAnag() {
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class JtbComt extends EntityBase {
|
public class JtbComt extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
@SerializedName("codJflav")
|
||||||
private String codJflav;
|
private String codJflav;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
public JtbComt() {
|
public JtbComt() {
|
||||||
|
|||||||
@@ -2,25 +2,42 @@ package it.integry.integrywmsnative.core.model;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class JtbFasi extends EntityBase {
|
public class JtbFasi extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
@SerializedName("codJfasParent")
|
||||||
private String codJfasParent;
|
private String codJfasParent;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("descrizEstesa")
|
||||||
private String descrizEstesa;
|
private String descrizEstesa;
|
||||||
|
@SerializedName("codMfas")
|
||||||
private String codMfas;
|
private String codMfas;
|
||||||
|
@SerializedName("pathIcona")
|
||||||
private String pathIcona;
|
private String pathIcona;
|
||||||
|
@SerializedName("umAllocazione")
|
||||||
private String umAllocazione;
|
private String umAllocazione;
|
||||||
|
@SerializedName("maxAllocazione")
|
||||||
private BigDecimal maxAllocazione;
|
private BigDecimal maxAllocazione;
|
||||||
|
@SerializedName("codJCal")
|
||||||
private String codJCal;
|
private String codJCal;
|
||||||
|
@SerializedName("idJfas")
|
||||||
private String idJfas;
|
private String idJfas;
|
||||||
|
@SerializedName("flagAttivo")
|
||||||
private String flagAttivo;
|
private String flagAttivo;
|
||||||
|
@SerializedName("flagCheck")
|
||||||
private String flagCheck;
|
private String flagCheck;
|
||||||
|
@SerializedName("umProd")
|
||||||
private String umProd;
|
private String umProd;
|
||||||
|
@SerializedName("prodStd")
|
||||||
private BigDecimal prodStd;
|
private BigDecimal prodStd;
|
||||||
|
@SerializedName("codMdepLav")
|
||||||
private String codMdepLav;
|
private String codMdepLav;
|
||||||
|
@SerializedName("tipoProd")
|
||||||
private String tipoProd;
|
private String tipoProd;
|
||||||
|
|
||||||
public JtbFasi() {
|
public JtbFasi() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -12,91 +13,177 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
|
|
||||||
public class MtbAart extends EntityBase {
|
public class MtbAart extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("untMis")
|
||||||
private String untMis;
|
private String untMis;
|
||||||
|
@SerializedName("barCode")
|
||||||
private String barCode;
|
private String barCode;
|
||||||
|
@SerializedName("pesoKg")
|
||||||
private BigDecimal pesoKg;
|
private BigDecimal pesoKg;
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
@SerializedName("codAliq")
|
||||||
private String codAliq;
|
private String codAliq;
|
||||||
|
@SerializedName("codScoArt")
|
||||||
private String codScoArt;
|
private String codScoArt;
|
||||||
|
@SerializedName("codTcolUi")
|
||||||
private String codTcolUi;
|
private String codTcolUi;
|
||||||
|
@SerializedName("codTcolUl")
|
||||||
private String codTcolUl;
|
private String codTcolUl;
|
||||||
|
@SerializedName("articoloComposto")
|
||||||
private String articoloComposto;
|
private String articoloComposto;
|
||||||
|
@SerializedName("esposizioneComp")
|
||||||
private String esposizioneComp;
|
private String esposizioneComp;
|
||||||
|
@SerializedName("descrizioneEstesa")
|
||||||
private String descrizioneEstesa;
|
private String descrizioneEstesa;
|
||||||
|
@SerializedName("codUltForn")
|
||||||
private String codUltForn;
|
private String codUltForn;
|
||||||
|
@SerializedName("dataUltCar")
|
||||||
private String dataUltCar;
|
private String dataUltCar;
|
||||||
|
@SerializedName("valUltCar")
|
||||||
private BigDecimal valUltCar;
|
private BigDecimal valUltCar;
|
||||||
|
@SerializedName("codUltClie")
|
||||||
private String codUltClie;
|
private String codUltClie;
|
||||||
|
@SerializedName("dataUltScar")
|
||||||
private String dataUltScar;
|
private String dataUltScar;
|
||||||
|
@SerializedName("valUltScar")
|
||||||
private BigDecimal valUltScar;
|
private BigDecimal valUltScar;
|
||||||
|
@SerializedName("tipoCodice")
|
||||||
private String tipoCodice;
|
private String tipoCodice;
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
@SerializedName("posizione")
|
||||||
private String posizione;
|
private String posizione;
|
||||||
|
@SerializedName("colliPedana")
|
||||||
private BigDecimal colliPedana;
|
private BigDecimal colliPedana;
|
||||||
|
@SerializedName("untMis2")
|
||||||
private String untMis2;
|
private String untMis2;
|
||||||
|
@SerializedName("rapConv2")
|
||||||
private BigDecimal rapConv2;
|
private BigDecimal rapConv2;
|
||||||
|
@SerializedName("flagInclListino")
|
||||||
private String flagInclListino;
|
private String flagInclListino;
|
||||||
|
@SerializedName("untMis3")
|
||||||
private String untMis3;
|
private String untMis3;
|
||||||
|
@SerializedName("rapConv3")
|
||||||
private BigDecimal rapConv3;
|
private BigDecimal rapConv3;
|
||||||
|
@SerializedName("codMartStat")
|
||||||
private String codMartStat;
|
private String codMartStat;
|
||||||
|
@SerializedName("codMcon")
|
||||||
private String codMcon;
|
private String codMcon;
|
||||||
|
@SerializedName("codMgrp")
|
||||||
private String codMgrp;
|
private String codMgrp;
|
||||||
|
@SerializedName("codMsfa")
|
||||||
private String codMsfa;
|
private String codMsfa;
|
||||||
|
@SerializedName("codMsgr")
|
||||||
private String codMsgr;
|
private String codMsgr;
|
||||||
|
@SerializedName("codMstp")
|
||||||
private String codMstp;
|
private String codMstp;
|
||||||
|
@SerializedName("codMtip")
|
||||||
private String codMtip;
|
private String codMtip;
|
||||||
|
@SerializedName("descrizioneStat")
|
||||||
private String descrizioneStat;
|
private String descrizioneStat;
|
||||||
|
@SerializedName("flagStato")
|
||||||
private String flagStato;
|
private String flagStato;
|
||||||
|
@SerializedName("cambioDiviCar")
|
||||||
private BigDecimal cambioDiviCar;
|
private BigDecimal cambioDiviCar;
|
||||||
|
@SerializedName("cambioDiviScar")
|
||||||
private BigDecimal cambioDiviScar;
|
private BigDecimal cambioDiviScar;
|
||||||
|
@SerializedName("ggScadPartita")
|
||||||
private Integer ggScadPartita;
|
private Integer ggScadPartita;
|
||||||
|
@SerializedName("volumeMc")
|
||||||
private BigDecimal volumeMc;
|
private BigDecimal volumeMc;
|
||||||
|
@SerializedName("flagEsponiPrz")
|
||||||
private String flagEsponiPrz;
|
private String flagEsponiPrz;
|
||||||
|
@SerializedName("dataUltVar")
|
||||||
private String dataUltVar;
|
private String dataUltVar;
|
||||||
|
@SerializedName("percSfrido")
|
||||||
private BigDecimal percSfrido;
|
private BigDecimal percSfrido;
|
||||||
|
@SerializedName("codBarreImb")
|
||||||
private String codBarreImb;
|
private String codBarreImb;
|
||||||
|
@SerializedName("flagCalcPrz")
|
||||||
private String flagCalcPrz;
|
private String flagCalcPrz;
|
||||||
|
@SerializedName("esposizioneCompAcq")
|
||||||
private String esposizioneCompAcq;
|
private String esposizioneCompAcq;
|
||||||
|
@SerializedName("flagCalcPrzAcq")
|
||||||
private String flagCalcPrzAcq;
|
private String flagCalcPrzAcq;
|
||||||
|
@SerializedName("diacod")
|
||||||
private String diacod;
|
private String diacod;
|
||||||
|
@SerializedName("plu")
|
||||||
private String plu;
|
private String plu;
|
||||||
|
@SerializedName("partIvaProd")
|
||||||
private String partIvaProd;
|
private String partIvaProd;
|
||||||
|
@SerializedName("ragSocProd")
|
||||||
private String ragSocProd;
|
private String ragSocProd;
|
||||||
|
@SerializedName("flagRapConvVariabile")
|
||||||
private String flagRapConvVariabile;
|
private String flagRapConvVariabile;
|
||||||
|
@SerializedName("flagMovArtMag")
|
||||||
private String flagMovArtMag;
|
private String flagMovArtMag;
|
||||||
|
@SerializedName("flagTracciabilita")
|
||||||
private String flagTracciabilita;
|
private String flagTracciabilita;
|
||||||
|
@SerializedName("taraKg")
|
||||||
private BigDecimal taraKg;
|
private BigDecimal taraKg;
|
||||||
|
@SerializedName("colliStrato")
|
||||||
private BigDecimal colliStrato;
|
private BigDecimal colliStrato;
|
||||||
|
@SerializedName("flagQtaCnfFissa")
|
||||||
private String flagQtaCnfFissa;
|
private String flagQtaCnfFissa;
|
||||||
|
@SerializedName("flagColliPedanaFisso")
|
||||||
private String flagColliPedanaFisso;
|
private String flagColliPedanaFisso;
|
||||||
|
@SerializedName("codCconCosti")
|
||||||
private String codCconCosti;
|
private String codCconCosti;
|
||||||
|
@SerializedName("codCconRicavi")
|
||||||
private String codCconRicavi;
|
private String codCconRicavi;
|
||||||
|
@SerializedName("codDgrpArt")
|
||||||
private String codDgrpArt;
|
private String codDgrpArt;
|
||||||
|
@SerializedName("codDiviCar")
|
||||||
private String codDiviCar;
|
private String codDiviCar;
|
||||||
|
@SerializedName("codDiviScar")
|
||||||
private String codDiviScar;
|
private String codDiviScar;
|
||||||
|
@SerializedName("codEcrCat")
|
||||||
private String codEcrCat;
|
private String codEcrCat;
|
||||||
|
@SerializedName("codEcrMcat")
|
||||||
private String codEcrMcat;
|
private String codEcrMcat;
|
||||||
|
@SerializedName("codEcrRep")
|
||||||
private String codEcrRep;
|
private String codEcrRep;
|
||||||
|
@SerializedName("codEcrStipo")
|
||||||
private String codEcrStipo;
|
private String codEcrStipo;
|
||||||
|
@SerializedName("codEcrTipo")
|
||||||
private String codEcrTipo;
|
private String codEcrTipo;
|
||||||
|
@SerializedName("codGrpBolla")
|
||||||
private String codGrpBolla;
|
private String codGrpBolla;
|
||||||
|
@SerializedName("ingredienti")
|
||||||
private String ingredienti;
|
private String ingredienti;
|
||||||
|
@SerializedName("idArtEqui")
|
||||||
private String idArtEqui;
|
private String idArtEqui;
|
||||||
|
@SerializedName("descrCassa")
|
||||||
private String descrCassa;
|
private String descrCassa;
|
||||||
|
@SerializedName("codNcIntracee")
|
||||||
private String codNcIntracee;
|
private String codNcIntracee;
|
||||||
|
@SerializedName("marchio")
|
||||||
private String marchio;
|
private String marchio;
|
||||||
|
@SerializedName("sezione")
|
||||||
private Integer sezione;
|
private Integer sezione;
|
||||||
|
@SerializedName("untMisRifPeso")
|
||||||
private UntMisRifPesoEnum untMisRifPeso;
|
private UntMisRifPesoEnum untMisRifPeso;
|
||||||
|
|
||||||
|
@SerializedName("qtaEsistente")
|
||||||
private BigDecimal qtaEsistente;
|
private BigDecimal qtaEsistente;
|
||||||
|
|
||||||
|
@SerializedName("qtaImpegnata")
|
||||||
private BigDecimal qtaImpegnata;
|
private BigDecimal qtaImpegnata;
|
||||||
|
|
||||||
|
@SerializedName("numCnfEsistente")
|
||||||
private BigDecimal numCnfEsistente;
|
private BigDecimal numCnfEsistente;
|
||||||
|
|
||||||
|
@SerializedName("numCnfImpegnata")
|
||||||
private BigDecimal numCnfImpegnata;
|
private BigDecimal numCnfImpegnata;
|
||||||
|
|
||||||
|
@SerializedName("mtbUntMis")
|
||||||
private List<MtbUntMis> mtbUntMis;
|
private List<MtbUntMis> mtbUntMis;
|
||||||
|
|
||||||
|
@SerializedName("mtbAartBarCode")
|
||||||
private List<MtbAartBarCode> mtbAartBarCode;
|
private List<MtbAartBarCode> mtbAartBarCode;
|
||||||
|
|
||||||
|
|
||||||
@@ -201,7 +288,13 @@ public class MtbAart extends EntityBase {
|
|||||||
if (other.mtbUntMis != null) {
|
if (other.mtbUntMis != null) {
|
||||||
this.mtbUntMis = new ArrayList<>();
|
this.mtbUntMis = new ArrayList<>();
|
||||||
for (MtbUntMis untMis : other.mtbUntMis) {
|
for (MtbUntMis untMis : other.mtbUntMis) {
|
||||||
this.mtbUntMis.add(new MtbUntMis(untMis)); // Assicurati che MtbUntMis abbia un costruttore di copia
|
this.mtbUntMis.add(untMis.clone()); // Assicurati che MtbUntMis abbia un costruttore di copia
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (other.mtbAartBarCode != null) {
|
||||||
|
this.mtbAartBarCode = new ArrayList<>();
|
||||||
|
for (MtbAartBarCode mtbAartBarCode : other.mtbAartBarCode) {
|
||||||
|
this.mtbAartBarCode.add(mtbAartBarCode.clone()); // Assicurati che MtbUntMis abbia un costruttore di copia
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class MtbAartBarCode extends EntityBase {
|
public class MtbAartBarCode extends EntityBase {
|
||||||
|
@SerializedName("codBarre")
|
||||||
private String codBarre;
|
private String codBarre;
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
@SerializedName("flagPrimario")
|
||||||
private String flagPrimario;
|
private String flagPrimario;
|
||||||
|
@SerializedName("tipoCodBarre")
|
||||||
private String tipoCodBarre;
|
private String tipoCodBarre;
|
||||||
|
|
||||||
public MtbAartBarCode() {
|
public MtbAartBarCode() {
|
||||||
this.type = "mtb_aart_bar_code";
|
this.type = "mtb_aart_bar_code";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getCodBarre() {
|
public String getCodBarre() {
|
||||||
return codBarre;
|
return codBarre;
|
||||||
}
|
}
|
||||||
@@ -52,4 +60,19 @@ public class MtbAartBarCode extends EntityBase {
|
|||||||
public void setTipoCodBarre(String tipoCodBarre) {
|
public void setTipoCodBarre(String tipoCodBarre) {
|
||||||
this.tipoCodBarre = tipoCodBarre;
|
this.tipoCodBarre = tipoCodBarre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crea una copia dell'oggetto MtbAartBarCode corrente
|
||||||
|
* @return Una nuova istanza di MtbAartBarCode con gli stessi valori
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MtbAartBarCode clone() {
|
||||||
|
MtbAartBarCode clone = new MtbAartBarCode();
|
||||||
|
clone.setCodBarre(this.codBarre);
|
||||||
|
clone.setCodMart(this.codMart);
|
||||||
|
clone.setQtaCnf(this.qtaCnf != null ? new BigDecimal(this.qtaCnf.toString()) : null);
|
||||||
|
clone.setFlagPrimario(this.flagPrimario);
|
||||||
|
clone.setTipoCodBarre(this.tipoCodBarre);
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
||||||
|
import it.integry.integrywmsnative.core.model.key.DtbDocrKey;
|
||||||
|
import it.integry.integrywmsnative.core.model.key.DtbDoctKey;
|
||||||
|
import it.integry.integrywmsnative.core.model.key.MtbColrKey;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -11,48 +20,102 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
|
|
||||||
public class MtbColr extends EntityBase {
|
public class MtbColr extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
@SerializedName("serCollo")
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
|
@SerializedName("numCollo")
|
||||||
private Integer numCollo;
|
private Integer numCollo;
|
||||||
|
@SerializedName("dataCollo")
|
||||||
private String dataCollo;
|
private String dataCollo;
|
||||||
|
@SerializedName("riga")
|
||||||
private Integer riga;
|
private Integer riga;
|
||||||
|
@SerializedName("rigaOrd")
|
||||||
private Integer rigaOrd;
|
private Integer rigaOrd;
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
@SerializedName("codBarre")
|
||||||
private String codBarre;
|
private String codBarre;
|
||||||
|
@SerializedName("codCol")
|
||||||
private String codCol;
|
private String codCol;
|
||||||
|
@SerializedName("codTagl")
|
||||||
private String codTagl;
|
private String codTagl;
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
@SerializedName("gestioneRif")
|
||||||
private String gestioneRif;
|
private String gestioneRif;
|
||||||
|
@SerializedName("serColloRif")
|
||||||
private String serColloRif;
|
private String serColloRif;
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private LocalDate dataOrd;
|
private LocalDate dataOrd;
|
||||||
|
@SerializedName("dataColloRif")
|
||||||
private String dataColloRif;
|
private String dataColloRif;
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
@SerializedName("qtaCol")
|
||||||
private BigDecimal qtaCol;
|
private BigDecimal qtaCol;
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
@SerializedName("numEtich")
|
||||||
private Integer numEtich;
|
private Integer numEtich;
|
||||||
|
@SerializedName("numColloRif")
|
||||||
private Integer numColloRif;
|
private Integer numColloRif;
|
||||||
private String datetimeRow;
|
@SerializedName("datetimeRow")
|
||||||
|
private LocalDateTime datetimeRow;
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
@SerializedName("numCnf")
|
||||||
private BigDecimal numCnf;
|
private BigDecimal numCnf;
|
||||||
|
@SerializedName("insPartitaMag")
|
||||||
private String insPartitaMag;
|
private String insPartitaMag;
|
||||||
|
@SerializedName("mtbPartitaMag_descrizione")
|
||||||
private String mtbPartitaMag_descrizione;
|
private String mtbPartitaMag_descrizione;
|
||||||
|
@SerializedName("dataScadPartita")
|
||||||
private LocalDate dataScadPartita;
|
private LocalDate dataScadPartita;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("untMis")
|
||||||
private String untMis;
|
private String untMis;
|
||||||
|
@SerializedName("causale")
|
||||||
private Integer causale;
|
private Integer causale;
|
||||||
|
@SerializedName("utente")
|
||||||
private String utente;
|
private String utente;
|
||||||
|
@SerializedName("codAnagDoc")
|
||||||
private String codAnagDoc;
|
private String codAnagDoc;
|
||||||
|
@SerializedName("codDtipDoc")
|
||||||
private String codDtipDoc;
|
private String codDtipDoc;
|
||||||
private String dataDoc;
|
@SerializedName("dataDoc")
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
@SerializedName("serDoc")
|
||||||
private String serDoc;
|
private String serDoc;
|
||||||
|
@SerializedName("numDoc")
|
||||||
private Integer numDoc;
|
private Integer numDoc;
|
||||||
|
@SerializedName("idRigaDoc")
|
||||||
private Integer idRigaDoc;
|
private Integer idRigaDoc;
|
||||||
|
|
||||||
|
@SerializedName("pesoNettoKg")
|
||||||
private BigDecimal pesoNettoKg;
|
private BigDecimal pesoNettoKg;
|
||||||
|
@SerializedName("pesoLordoKg")
|
||||||
private BigDecimal pesoLordoKg;
|
private BigDecimal pesoLordoKg;
|
||||||
|
|
||||||
|
@SerializedName("barcodeUlIn")
|
||||||
|
private String barcodeUlIn;
|
||||||
|
@SerializedName("barcodeUlOut")
|
||||||
|
private String barcodeUlOut;
|
||||||
|
@SerializedName("codMdepIn")
|
||||||
|
private String codMdepIn;
|
||||||
|
@SerializedName("codMdepOut")
|
||||||
|
private String codMdepOut;
|
||||||
|
@SerializedName("posizioneIn")
|
||||||
|
private String posizioneIn;
|
||||||
|
@SerializedName("posizioneOut")
|
||||||
|
private String posizioneOut;
|
||||||
|
|
||||||
|
@SerializedName("mtbAart")
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
@SerializedName("mtbPartitaMag")
|
||||||
private MtbPartitaMag mtbPartitaMag;
|
private MtbPartitaMag mtbPartitaMag;
|
||||||
|
|
||||||
|
|
||||||
@@ -109,6 +172,12 @@ public class MtbColr extends EntityBase {
|
|||||||
this.idRigaDoc = other.idRigaDoc;
|
this.idRigaDoc = other.idRigaDoc;
|
||||||
this.pesoNettoKg = other.pesoNettoKg;
|
this.pesoNettoKg = other.pesoNettoKg;
|
||||||
this.pesoLordoKg = other.pesoLordoKg;
|
this.pesoLordoKg = other.pesoLordoKg;
|
||||||
|
this.barcodeUlIn = other.barcodeUlIn;
|
||||||
|
this.barcodeUlOut = other.barcodeUlOut;
|
||||||
|
this.posizioneIn = other.posizioneIn;
|
||||||
|
this.posizioneOut = other.posizioneOut;
|
||||||
|
this.codMdepIn = other.codMdepIn;
|
||||||
|
this.codMdepOut = other.codMdepOut;
|
||||||
|
|
||||||
// Deep copy degli oggetti complessi
|
// Deep copy degli oggetti complessi
|
||||||
this.mtbAart = other.mtbAart != null ? new MtbAart(other.mtbAart) : null;
|
this.mtbAart = other.mtbAart != null ? new MtbAart(other.mtbAart) : null;
|
||||||
@@ -119,6 +188,39 @@ public class MtbColr extends EntityBase {
|
|||||||
// this.refMtbColr = other.refMtbColr;
|
// this.refMtbColr = other.refMtbColr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MtbColrKey getKey() {
|
||||||
|
if (UtilityString.isNullOrEmpty(gestione) ||
|
||||||
|
UtilityString.isNullOrEmpty(serCollo) ||
|
||||||
|
getDataColloLD() == null ||
|
||||||
|
numCollo == null ||
|
||||||
|
riga == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new MtbColrKey(gestione, serCollo, getDataColloLD(), numCollo, riga);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey getDocumentKey() {
|
||||||
|
if (UtilityString.isNullOrEmpty(codAnagDoc) ||
|
||||||
|
UtilityString.isNullOrEmpty(codDtipDoc) ||
|
||||||
|
UtilityString.isNullOrEmpty(serDoc) ||
|
||||||
|
dataDoc == null ||
|
||||||
|
numDoc == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new DtbDoctKey(codAnagDoc, codDtipDoc, dataDoc, numDoc, serDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocrKey getDocumentRowKey() {
|
||||||
|
if (UtilityString.isNullOrEmpty(codAnagDoc) ||
|
||||||
|
UtilityString.isNullOrEmpty(codDtipDoc) ||
|
||||||
|
UtilityString.isNullOrEmpty(serDoc) ||
|
||||||
|
dataDoc == null ||
|
||||||
|
numDoc == null ||
|
||||||
|
idRigaDoc == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new DtbDocrKey(codAnagDoc, codDtipDoc, dataDoc, numDoc, serDoc, idRigaDoc);
|
||||||
|
}
|
||||||
|
|
||||||
public static class Causale {
|
public static class Causale {
|
||||||
public static final int DEFAULT = 0;
|
public static final int DEFAULT = 0;
|
||||||
@@ -172,13 +274,21 @@ public class MtbColr extends EntityBase {
|
|||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataColloS());
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataColloS());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataColloLD() {
|
||||||
|
try {
|
||||||
|
return UtilityDate.recognizeLocalDate(getDataColloS());
|
||||||
|
} catch (DateNotRecognizedException | TimeNotRecognizedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public MtbColr setDataCollo(String dataCollo) {
|
public MtbColr setDataCollo(String dataCollo) {
|
||||||
this.dataCollo = dataCollo;
|
this.dataCollo = dataCollo;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDataCollo(Date dataCollo) {
|
public MtbColr setDataCollo(Date dataCollo) {
|
||||||
setDataCollo(UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH));
|
setDataCollo(UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,7 +410,7 @@ public class MtbColr extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDataColloRif(Date dataColloRif) {
|
public MtbColr setDataColloRif(Date dataColloRif) {
|
||||||
this.dataColloRif = UtilityDate.formatDate(dataColloRif, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
this.dataColloRif = UtilityDate.formatDate(dataColloRif, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,26 +464,15 @@ public class MtbColr extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getDatetimeRow() {
|
||||||
public String getDatetimeRowS() {
|
|
||||||
return datetimeRow;
|
return datetimeRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDatetimeRowD() {
|
public MtbColr setDatetimeRow(LocalDateTime datetimeRow) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDatetimeRowS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColr setDatetimeRow(String datetimeRow) {
|
|
||||||
this.datetimeRow = datetimeRow;
|
this.datetimeRow = datetimeRow;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDatetimeRow(Date datetimeRow) {
|
|
||||||
this.datetimeRow = UtilityDate.formatDate(datetimeRow, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getCodJcom() {
|
public String getCodJcom() {
|
||||||
return codJcom;
|
return codJcom;
|
||||||
}
|
}
|
||||||
@@ -495,11 +594,11 @@ public class MtbColr extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataDoc() {
|
public LocalDate getDataDoc() {
|
||||||
return dataDoc;
|
return dataDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDataDoc(String dataDoc) {
|
public MtbColr setDataDoc(LocalDate dataDoc) {
|
||||||
this.dataDoc = dataDoc;
|
this.dataDoc = dataDoc;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -566,4 +665,170 @@ public class MtbColr extends EntityBase {
|
|||||||
this.refMtbColr = refMtbColr;
|
this.refMtbColr = refMtbColr;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDataCollo() {
|
||||||
|
return dataCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataColloRif() {
|
||||||
|
return dataColloRif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getBarcodeUlIn() {
|
||||||
|
return barcodeUlIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColr setBarcodeUlIn(String barcodeUlIn) {
|
||||||
|
this.barcodeUlIn = barcodeUlIn;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcodeUlOut() {
|
||||||
|
return barcodeUlOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColr setBarcodeUlOut(String barcodeUlOut) {
|
||||||
|
this.barcodeUlOut = barcodeUlOut;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMdepIn() {
|
||||||
|
return codMdepIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColr setCodMdepIn(String codMdepIn) {
|
||||||
|
this.codMdepIn = codMdepIn;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMdepOut() {
|
||||||
|
return codMdepOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColr setCodMdepOut(String codMdepOut) {
|
||||||
|
this.codMdepOut = codMdepOut;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizioneIn() {
|
||||||
|
return posizioneIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColr setPosizioneIn(String posizioneIn) {
|
||||||
|
this.posizioneIn = posizioneIn;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizioneOut() {
|
||||||
|
return posizioneOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColr setPosizioneOut(String posizioneOut) {
|
||||||
|
this.posizioneOut = posizioneOut;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
MtbColr mtbColr = (MtbColr) o;
|
||||||
|
return Objects.equals(getGestione(), mtbColr.getGestione()) &&
|
||||||
|
Objects.equals(getSerCollo(), mtbColr.getSerCollo()) &&
|
||||||
|
Objects.equals(getNumCollo(), mtbColr.getNumCollo()) &&
|
||||||
|
Objects.equals(getDataCollo(), mtbColr.getDataCollo()) &&
|
||||||
|
Objects.equals(getRiga(), mtbColr.getRiga()) &&
|
||||||
|
Objects.equals(getRigaOrd(), mtbColr.getRigaOrd()) &&
|
||||||
|
Objects.equals(getCodMart(), mtbColr.getCodMart()) &&
|
||||||
|
Objects.equals(getCodBarre(), mtbColr.getCodBarre()) &&
|
||||||
|
Objects.equals(getCodCol(), mtbColr.getCodCol()) &&
|
||||||
|
Objects.equals(getCodTagl(), mtbColr.getCodTagl()) &&
|
||||||
|
Objects.equals(getPartitaMag(), mtbColr.getPartitaMag()) &&
|
||||||
|
Objects.equals(getGestioneRif(), mtbColr.getGestioneRif()) &&
|
||||||
|
Objects.equals(getSerColloRif(), mtbColr.getSerColloRif()) &&
|
||||||
|
Objects.equals(getNote(), mtbColr.getNote()) &&
|
||||||
|
Objects.equals(getDataOrd(), mtbColr.getDataOrd()) &&
|
||||||
|
Objects.equals(getDataColloRif(), mtbColr.getDataColloRif()) &&
|
||||||
|
Objects.equals(getQtaCnf(), mtbColr.getQtaCnf()) &&
|
||||||
|
Objects.equals(getQtaCol(), mtbColr.getQtaCol()) &&
|
||||||
|
Objects.equals(getNumOrd(), mtbColr.getNumOrd()) &&
|
||||||
|
Objects.equals(getNumEtich(), mtbColr.getNumEtich()) &&
|
||||||
|
Objects.equals(getNumColloRif(), mtbColr.getNumColloRif()) &&
|
||||||
|
Objects.equals(getDatetimeRow(), mtbColr.getDatetimeRow()) &&
|
||||||
|
Objects.equals(getCodJcom(), mtbColr.getCodJcom()) &&
|
||||||
|
Objects.equals(getNumCnf(), mtbColr.getNumCnf()) &&
|
||||||
|
Objects.equals(getInsPartitaMag(), mtbColr.getInsPartitaMag()) &&
|
||||||
|
Objects.equals(getMtbPartitaMag_descrizione(), mtbColr.getMtbPartitaMag_descrizione()) &&
|
||||||
|
Objects.equals(getDataScadPartita(), mtbColr.getDataScadPartita()) &&
|
||||||
|
Objects.equals(getDescrizione(), mtbColr.getDescrizione()) &&
|
||||||
|
Objects.equals(getUntMis(), mtbColr.getUntMis()) &&
|
||||||
|
Objects.equals(getCausale(), mtbColr.getCausale()) &&
|
||||||
|
Objects.equals(getUtente(), mtbColr.getUtente()) &&
|
||||||
|
Objects.equals(getCodAnagDoc(), mtbColr.getCodAnagDoc()) &&
|
||||||
|
Objects.equals(getCodDtipDoc(), mtbColr.getCodDtipDoc()) &&
|
||||||
|
Objects.equals(getDataDoc(), mtbColr.getDataDoc()) &&
|
||||||
|
Objects.equals(getSerDoc(), mtbColr.getSerDoc()) &&
|
||||||
|
Objects.equals(getNumDoc(), mtbColr.getNumDoc()) &&
|
||||||
|
Objects.equals(getIdRigaDoc(), mtbColr.getIdRigaDoc()) &&
|
||||||
|
Objects.equals(getPesoNettoKg(), mtbColr.getPesoNettoKg()) &&
|
||||||
|
Objects.equals(getPesoLordoKg(), mtbColr.getPesoLordoKg()) &&
|
||||||
|
Objects.equals(getBarcodeUlIn(), mtbColr.getBarcodeUlIn()) &&
|
||||||
|
Objects.equals(getBarcodeUlOut(), mtbColr.getBarcodeUlOut()) &&
|
||||||
|
Objects.equals(getCodMdepIn(), mtbColr.getCodMdepIn()) &&
|
||||||
|
Objects.equals(getCodMdepOut(), mtbColr.getCodMdepOut()) &&
|
||||||
|
Objects.equals(getPosizioneIn(), mtbColr.getPosizioneIn()) &&
|
||||||
|
Objects.equals(getPosizioneOut(), mtbColr.getPosizioneOut());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = Objects.hashCode(getGestione());
|
||||||
|
result = 31 * result + Objects.hashCode(getSerCollo());
|
||||||
|
result = 31 * result + Objects.hashCode(getNumCollo());
|
||||||
|
result = 31 * result + Objects.hashCode(getDataCollo());
|
||||||
|
result = 31 * result + Objects.hashCode(getRiga());
|
||||||
|
result = 31 * result + Objects.hashCode(getRigaOrd());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodMart());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodBarre());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodCol());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodTagl());
|
||||||
|
result = 31 * result + Objects.hashCode(getPartitaMag());
|
||||||
|
result = 31 * result + Objects.hashCode(getGestioneRif());
|
||||||
|
result = 31 * result + Objects.hashCode(getSerColloRif());
|
||||||
|
result = 31 * result + Objects.hashCode(getNote());
|
||||||
|
result = 31 * result + Objects.hashCode(getDataOrd());
|
||||||
|
result = 31 * result + Objects.hashCode(getDataColloRif());
|
||||||
|
result = 31 * result + Objects.hashCode(getQtaCnf());
|
||||||
|
result = 31 * result + Objects.hashCode(getQtaCol());
|
||||||
|
result = 31 * result + Objects.hashCode(getNumOrd());
|
||||||
|
result = 31 * result + Objects.hashCode(getNumEtich());
|
||||||
|
result = 31 * result + Objects.hashCode(getNumColloRif());
|
||||||
|
result = 31 * result + Objects.hashCode(getDatetimeRow());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodJcom());
|
||||||
|
result = 31 * result + Objects.hashCode(getNumCnf());
|
||||||
|
result = 31 * result + Objects.hashCode(getInsPartitaMag());
|
||||||
|
result = 31 * result + Objects.hashCode(getMtbPartitaMag_descrizione());
|
||||||
|
result = 31 * result + Objects.hashCode(getDataScadPartita());
|
||||||
|
result = 31 * result + Objects.hashCode(getDescrizione());
|
||||||
|
result = 31 * result + Objects.hashCode(getUntMis());
|
||||||
|
result = 31 * result + Objects.hashCode(getCausale());
|
||||||
|
result = 31 * result + Objects.hashCode(getUtente());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodAnagDoc());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodDtipDoc());
|
||||||
|
result = 31 * result + Objects.hashCode(getDataDoc());
|
||||||
|
result = 31 * result + Objects.hashCode(getSerDoc());
|
||||||
|
result = 31 * result + Objects.hashCode(getNumDoc());
|
||||||
|
result = 31 * result + Objects.hashCode(getIdRigaDoc());
|
||||||
|
result = 31 * result + Objects.hashCode(getPesoNettoKg());
|
||||||
|
result = 31 * result + Objects.hashCode(getPesoLordoKg());
|
||||||
|
result = 31 * result + Objects.hashCode(getBarcodeUlIn());
|
||||||
|
result = 31 * result + Objects.hashCode(getBarcodeUlOut());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodMdepIn());
|
||||||
|
result = 31 * result + Objects.hashCode(getCodMdepOut());
|
||||||
|
result = 31 * result + Objects.hashCode(getPosizioneIn());
|
||||||
|
result = 31 * result + Objects.hashCode(getPosizioneOut());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ package it.integry.integrywmsnative.core.model;
|
|||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -17,6 +19,8 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.key.DtbDoctKey;
|
||||||
|
import it.integry.integrywmsnative.core.model.key.MtbColtKey;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
@@ -30,49 +34,91 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class MtbColt extends EntityBase {
|
public class MtbColt extends EntityBase {
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
@SerializedName("dataCollo")
|
||||||
private String dataCollo;
|
private String dataCollo;
|
||||||
|
@SerializedName("serCollo")
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
|
@SerializedName("numCollo")
|
||||||
private Integer numCollo;
|
private Integer numCollo;
|
||||||
|
@SerializedName("rifOrd")
|
||||||
private String rifOrd;
|
private String rifOrd;
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("codVdes")
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
@SerializedName("codVlis")
|
||||||
private String codVlis;
|
private String codVlis;
|
||||||
|
@SerializedName("codDtip")
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
|
@SerializedName("codTcol")
|
||||||
private String codTcol;
|
private String codTcol;
|
||||||
|
@SerializedName("serDoc")
|
||||||
private String serDoc;
|
private String serDoc;
|
||||||
|
@SerializedName("filtroOrdini")
|
||||||
private String filtroOrdini;
|
private String filtroOrdini;
|
||||||
|
@SerializedName("preparatoDa")
|
||||||
private String preparatoDa;
|
private String preparatoDa;
|
||||||
|
@SerializedName("annotazioni")
|
||||||
private String annotazioni;
|
private String annotazioni;
|
||||||
|
@SerializedName("posizione")
|
||||||
private String posizione;
|
private String posizione;
|
||||||
|
@SerializedName("codDtipProvv")
|
||||||
private String codDtipProvv;
|
private String codDtipProvv;
|
||||||
|
@SerializedName("serDocProvv")
|
||||||
private String serDocProvv;
|
private String serDocProvv;
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private String dataOrd;
|
private String dataOrd;
|
||||||
private String dataDoc;
|
@SerializedName("dataDoc")
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
@SerializedName("oraInizPrep")
|
||||||
private String oraInizPrep;
|
private String oraInizPrep;
|
||||||
|
@SerializedName("oraFinePrep")
|
||||||
private String oraFinePrep;
|
private String oraFinePrep;
|
||||||
|
@SerializedName("dataDocProvv")
|
||||||
private String dataDocProvv;
|
private String dataDocProvv;
|
||||||
|
@SerializedName("dataVers")
|
||||||
private String dataVers;
|
private String dataVers;
|
||||||
|
@SerializedName("segno")
|
||||||
private Integer segno;
|
private Integer segno;
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
@SerializedName("numDoc")
|
||||||
private Integer numDoc;
|
private Integer numDoc;
|
||||||
|
@SerializedName("numDocProvv")
|
||||||
private Integer numDocProvv;
|
private Integer numDocProvv;
|
||||||
|
@SerializedName("pesoKg")
|
||||||
private BigDecimal pesoKg;
|
private BigDecimal pesoKg;
|
||||||
|
@SerializedName("pesoNettoKg")
|
||||||
private BigDecimal pesoNettoKg;
|
private BigDecimal pesoNettoKg;
|
||||||
|
@SerializedName("lunghezzaCm")
|
||||||
private BigDecimal lunghezzaCm;
|
private BigDecimal lunghezzaCm;
|
||||||
|
@SerializedName("larghezzaCm")
|
||||||
private BigDecimal larghezzaCm;
|
private BigDecimal larghezzaCm;
|
||||||
|
@SerializedName("altezzaCm")
|
||||||
private BigDecimal altezzaCm;
|
private BigDecimal altezzaCm;
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
|
@SerializedName("barcodeUl")
|
||||||
private String barcodeUl;
|
private String barcodeUl;
|
||||||
|
|
||||||
|
@SerializedName("progressivoUl")
|
||||||
|
private Integer progressivoUl;
|
||||||
|
|
||||||
private final transient MutableLiveData<ObservableMtbTcol> mtbTCol = new MutableLiveData<>();
|
private final transient MutableLiveData<ObservableMtbTcol> mtbTCol = new MutableLiveData<>();
|
||||||
|
|
||||||
|
@SerializedName("disablePrint")
|
||||||
private Boolean disablePrint;
|
private Boolean disablePrint;
|
||||||
|
@SerializedName("ragSocCliente")
|
||||||
private String ragSocCliente;
|
private String ragSocCliente;
|
||||||
|
|
||||||
|
@SerializedName("mtbColr")
|
||||||
private ObservableArrayList<MtbColr> mtbColr = new ObservableArrayList<>();
|
private ObservableArrayList<MtbColr> mtbColr = new ObservableArrayList<>();
|
||||||
|
|
||||||
public ObservableArrayList<MtbColr> getMtbColr() {
|
public ObservableArrayList<MtbColr> getMtbColr() {
|
||||||
@@ -94,6 +140,27 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MtbColtKey getKey() {
|
||||||
|
if (UtilityString.isNullOrEmpty(gestione) ||
|
||||||
|
UtilityString.isNullOrEmpty(serCollo) ||
|
||||||
|
getDataColloLD() == null ||
|
||||||
|
numCollo == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new MtbColtKey(gestione, serCollo, getDataColloLD(), numCollo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey getDocumentKey() {
|
||||||
|
if (UtilityString.isNullOrEmpty(codAnag) ||
|
||||||
|
UtilityString.isNullOrEmpty(codDtip) ||
|
||||||
|
UtilityString.isNullOrEmpty(serDoc) ||
|
||||||
|
dataDoc == null ||
|
||||||
|
numDoc == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new DtbDoctKey(codAnag, codDtip, dataDoc, numDoc, serDoc);
|
||||||
|
}
|
||||||
|
|
||||||
public MtbColt initDefaultFields(GestioneEnum gestioneEnum) {
|
public MtbColt initDefaultFields(GestioneEnum gestioneEnum) {
|
||||||
setGestione(gestioneEnum);
|
setGestione(gestioneEnum);
|
||||||
setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
||||||
@@ -175,7 +242,7 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt setDataCollo(Date dataCollo) {
|
public MtbColt setDataCollo(Date dataCollo) {
|
||||||
this.dataCollo = UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
this.dataCollo = UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,6 +418,10 @@ public class MtbColt extends EntityBase {
|
|||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrd());
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrd());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataOrdLD() {
|
||||||
|
return UtilityDate.recognizeLocalDateWithExceptionHandler(getDataOrd());
|
||||||
|
}
|
||||||
|
|
||||||
public String getDataOrd() {
|
public String getDataOrd() {
|
||||||
return dataOrd;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
@@ -361,15 +432,15 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt setDataOrdD(Date dataOrd) {
|
public MtbColt setDataOrdD(Date dataOrd) {
|
||||||
this.dataOrd = UtilityDate.formatDate(dataOrd, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
this.dataOrd = UtilityDate.formatDate(dataOrd, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataDoc() {
|
public LocalDate getDataDoc() {
|
||||||
return dataDoc;
|
return dataDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt setDataDoc(String dataDoc) {
|
public MtbColt setDataDoc(LocalDate dataDoc) {
|
||||||
this.dataDoc = dataDoc;
|
this.dataDoc = dataDoc;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -384,7 +455,7 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt setOraInizPrep(Date oraInizPrep) {
|
public MtbColt setOraInizPrep(Date oraInizPrep) {
|
||||||
this.oraInizPrep = UtilityDate.formatDate(oraInizPrep, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
this.oraInizPrep = UtilityDate.formatDate(oraInizPrep, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +469,7 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt setOraFinePrep(Date oraFinePrep) {
|
public MtbColt setOraFinePrep(Date oraFinePrep) {
|
||||||
this.oraFinePrep = UtilityDate.formatDate(oraFinePrep, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
this.oraFinePrep = UtilityDate.formatDate(oraFinePrep, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,7 +505,7 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt setDataVers(Date dataVers) {
|
public MtbColt setDataVers(Date dataVers) {
|
||||||
this.dataVers = UtilityDate.formatDate(dataVers, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
this.dataVers = UtilityDate.formatDate(dataVers, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIMES_SLASH);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,6 +626,15 @@ public class MtbColt extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getProgressivoUl() {
|
||||||
|
return progressivoUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbColt setProgressivoUl(Integer progressivoUl) {
|
||||||
|
this.progressivoUl = progressivoUl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ObservableMtbTcol getMtbTCol() {
|
public ObservableMtbTcol getMtbTCol() {
|
||||||
return mtbTCol.getValue();
|
return mtbTCol.getValue();
|
||||||
}
|
}
|
||||||
@@ -590,12 +670,12 @@ public class MtbColt extends EntityBase {
|
|||||||
try {
|
try {
|
||||||
String condition = (String.format("(d.g = %s AND d.d = %s and d.n = %s",
|
String condition = (String.format("(d.g = %s AND d.d = %s and d.n = %s",
|
||||||
UtilityDB.valueToString(filtroOrdineDTO.getGestioneOrd()),
|
UtilityDB.valueToString(filtroOrdineDTO.getGestioneOrd()),
|
||||||
UtilityDB.valueToString(UtilityDate.formatDate(filtroOrdineDTO.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH)),
|
UtilityDB.valueToString(filtroOrdineDTO.getDataOrd()),
|
||||||
UtilityDB.valueToString(filtroOrdineDTO.getNumOrd())));
|
UtilityDB.valueToString(filtroOrdineDTO.getNumOrd())));
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(filtroOrdineDTO.getDataConsS())) {
|
if (filtroOrdineDTO.getDataCons() != null) {
|
||||||
condition += (String.format(" AND dr.dc = %s",
|
condition += (String.format(" AND dr.dc = %s",
|
||||||
UtilityDB.valueToString(UtilityDate.formatDate(filtroOrdineDTO.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH))));
|
UtilityDB.valueToString(filtroOrdineDTO.getDataCons())));
|
||||||
}
|
}
|
||||||
|
|
||||||
condition += ")";
|
condition += ")";
|
||||||
@@ -640,6 +720,7 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public EntityBase clone() {
|
public EntityBase clone() {
|
||||||
return clone(true);
|
return clone(true);
|
||||||
|
|||||||
@@ -1,39 +1,65 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import android.os.Parcelable;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class MtbDepo extends EntityBase {
|
public class MtbDepo extends EntityBase {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("flagVal")
|
||||||
private String flagVal;
|
private String flagVal;
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("percDepo")
|
||||||
private BigDecimal percDepo;
|
private BigDecimal percDepo;
|
||||||
|
@SerializedName("valDepo")
|
||||||
private BigDecimal valDepo;
|
private BigDecimal valDepo;
|
||||||
|
@SerializedName("indirizzo")
|
||||||
private String indirizzo;
|
private String indirizzo;
|
||||||
|
@SerializedName("cap")
|
||||||
private String cap;
|
private String cap;
|
||||||
|
@SerializedName("citta")
|
||||||
private String citta;
|
private String citta;
|
||||||
|
@SerializedName("prov")
|
||||||
private String prov;
|
private String prov;
|
||||||
|
@SerializedName("tel")
|
||||||
private String tel;
|
private String tel;
|
||||||
|
@SerializedName("nazione")
|
||||||
private String nazione;
|
private String nazione;
|
||||||
|
@SerializedName("fax")
|
||||||
private String fax;
|
private String fax;
|
||||||
|
@SerializedName("eMail")
|
||||||
private String eMail;
|
private String eMail;
|
||||||
|
@SerializedName("sitoWeb")
|
||||||
private String sitoWeb;
|
private String sitoWeb;
|
||||||
|
@SerializedName("codVdes")
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
|
@SerializedName("serie")
|
||||||
private String serie;
|
private String serie;
|
||||||
|
@SerializedName("flagMovimentabile")
|
||||||
private String flagMovimentabile;
|
private String flagMovimentabile;
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
@SerializedName("codVlis")
|
||||||
private String codVlis;
|
private String codVlis;
|
||||||
|
@SerializedName("codCcau")
|
||||||
private String codCcau;
|
private String codCcau;
|
||||||
|
@SerializedName("codCcon")
|
||||||
private String codCcon;
|
private String codCcon;
|
||||||
|
@SerializedName("codDtip")
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
|
@SerializedName("codDtipFat")
|
||||||
private String codDtipFat;
|
private String codDtipFat;
|
||||||
|
@SerializedName("flagContoVendita")
|
||||||
private String flagContoVendita;
|
private String flagContoVendita;
|
||||||
|
@SerializedName("flagTipoNegozio")
|
||||||
private String flagTipoNegozio;
|
private String flagTipoNegozio;
|
||||||
|
@SerializedName("codMdepReso")
|
||||||
private String codMdepReso;
|
private String codMdepReso;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,30 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
public class MtbDepoPosizione {
|
public class MtbDepoPosizione {
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
@SerializedName("posizione")
|
||||||
private String posizione;
|
private String posizione;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("flagMonoCollo")
|
||||||
private String flagMonoCollo;
|
private String flagMonoCollo;
|
||||||
|
@SerializedName("flagLineaProduzione")
|
||||||
private String flagLineaProduzione;
|
private String flagLineaProduzione;
|
||||||
|
@SerializedName("priorita")
|
||||||
private Integer priorita;
|
private Integer priorita;
|
||||||
|
@SerializedName("tipoMagazAutomatico")
|
||||||
private String tipoMagazAutomatico;
|
private String tipoMagazAutomatico;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MtbDepoPosizione clone() {
|
public MtbDepoPosizione clone() {
|
||||||
try {
|
try {
|
||||||
return (MtbDepoPosizione) super.clone();
|
return (MtbDepoPosizione) super.clone();
|
||||||
@@ -27,6 +36,18 @@ public class MtbDepoPosizione {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
MtbDepoPosizione that = (MtbDepoPosizione) o;
|
||||||
|
return Objects.equals(getCodMdep(), that.getCodMdep()) && Objects.equals(getPosizione(), that.getPosizione()) && Objects.equals(getDescrizione(), that.getDescrizione()) && Objects.equals(isFlagMonoCollo(), that.isFlagMonoCollo()) && Objects.equals(isFlagLineaProduzione(), that.isFlagLineaProduzione()) && Objects.equals(getPriorita(), that.getPriorita()) && Objects.equals(getTipoMagazAutomatico(), that.getTipoMagazAutomatico());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(getCodMdep(), getPosizione(), getDescrizione(), isFlagMonoCollo(), isFlagLineaProduzione(), getPriorita(), getTipoMagazAutomatico());
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodMdep() {
|
public String getCodMdep() {
|
||||||
return codMdep;
|
return codMdep;
|
||||||
}
|
}
|
||||||
@@ -101,4 +122,5 @@ public class MtbDepoPosizione {
|
|||||||
public boolean isMagazzinoAutomatico() {
|
public boolean isMagazzinoAutomatico() {
|
||||||
return !UtilityString.isNullOrEmpty(getTipoMagazAutomatico());
|
return !UtilityString.isNullOrEmpty(getTipoMagazAutomatico());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,24 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MtbGrup extends EntityBase {
|
public class MtbGrup extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("codMgrp")
|
||||||
private String codMgrp;
|
private String codMgrp;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("flagValMag")
|
||||||
private String flagValMag;
|
private String flagValMag;
|
||||||
|
@SerializedName("logoWeb")
|
||||||
private String logoWeb;
|
private String logoWeb;
|
||||||
|
@SerializedName("criterioVal")
|
||||||
private String criterioVal;
|
private String criterioVal;
|
||||||
|
@SerializedName("tipoMgrp")
|
||||||
private String tipoMgrp;
|
private String tipoMgrp;
|
||||||
|
@SerializedName("mtbSgrp")
|
||||||
private List<MtbSgrp> mtbSgrp = new ArrayList<>();
|
private List<MtbSgrp> mtbSgrp = new ArrayList<>();
|
||||||
|
|
||||||
public MtbGrup() {
|
public MtbGrup() {
|
||||||
|
|||||||
@@ -1,31 +1,53 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class MtbInvenr extends EntityBase {
|
public class MtbInvenr extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("idInventario")
|
||||||
private Long idInventario;
|
private Long idInventario;
|
||||||
|
@SerializedName("idRiga")
|
||||||
private Integer idRiga;
|
private Integer idRiga;
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
@SerializedName("codCol")
|
||||||
private String codCol;
|
private String codCol;
|
||||||
|
@SerializedName("codTagl")
|
||||||
private String codTagl;
|
private String codTagl;
|
||||||
|
@SerializedName("qtaInv")
|
||||||
private BigDecimal qtaInv;
|
private BigDecimal qtaInv;
|
||||||
|
@SerializedName("dataOraInv")
|
||||||
private LocalDateTime dataOraInv;
|
private LocalDateTime dataOraInv;
|
||||||
|
@SerializedName("costoInv")
|
||||||
private BigDecimal costoInv;
|
private BigDecimal costoInv;
|
||||||
|
@SerializedName("giacenzaConf")
|
||||||
private BigDecimal giacenzaConf;
|
private BigDecimal giacenzaConf;
|
||||||
|
@SerializedName("giacenzaDb")
|
||||||
private BigDecimal giacenzaDb;
|
private BigDecimal giacenzaDb;
|
||||||
|
@SerializedName("idDisp")
|
||||||
private String idDisp;
|
private String idDisp;
|
||||||
|
@SerializedName("dataCreate")
|
||||||
private Date dataCreate;
|
private Date dataCreate;
|
||||||
|
@SerializedName("numConf")
|
||||||
private BigDecimal numConf;
|
private BigDecimal numConf;
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
@SerializedName("scanCodBarre")
|
||||||
private String scanCodBarre;
|
private String scanCodBarre;
|
||||||
|
@SerializedName("zona")
|
||||||
private String zona;
|
private String zona;
|
||||||
|
@SerializedName("dataInventario")
|
||||||
private Date dataInventario;
|
private Date dataInventario;
|
||||||
|
@SerializedName("regolaCalcoloCosto")
|
||||||
private String regolaCalcoloCosto;
|
private String regolaCalcoloCosto;
|
||||||
|
@SerializedName("dataScadPartitaMag")
|
||||||
private Date dataScadPartitaMag;
|
private Date dataScadPartitaMag;
|
||||||
|
@SerializedName("mtbPartitaMag")
|
||||||
private MtbPartitaMag mtbPartitaMag;
|
private MtbPartitaMag mtbPartitaMag;
|
||||||
|
|
||||||
public MtbInvenr() {
|
public MtbInvenr() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -7,29 +8,53 @@ import java.util.List;
|
|||||||
|
|
||||||
public class MtbInvent extends EntityBase {
|
public class MtbInvent extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("idInventario")
|
||||||
private Long idInventario;
|
private Long idInventario;
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
@SerializedName("dataInventario")
|
||||||
private LocalDate dataInventario;
|
private LocalDate dataInventario;
|
||||||
|
@SerializedName("dataReg")
|
||||||
private LocalDateTime dataReg;
|
private LocalDateTime dataReg;
|
||||||
|
@SerializedName("dataVer")
|
||||||
private LocalDateTime dataVer;
|
private LocalDateTime dataVer;
|
||||||
|
@SerializedName("filtro")
|
||||||
private String filtro;
|
private String filtro;
|
||||||
|
@SerializedName("flagStato")
|
||||||
private String flagStato;
|
private String flagStato;
|
||||||
|
@SerializedName("flagOperazione")
|
||||||
private String flagOperazione;
|
private String flagOperazione;
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("codDtip")
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
|
@SerializedName("inseritoDa")
|
||||||
private String inseritoDa;
|
private String inseritoDa;
|
||||||
|
@SerializedName("registratoDa")
|
||||||
private String registratoDa;
|
private String registratoDa;
|
||||||
|
@SerializedName("tipoGiacenza")
|
||||||
private String tipoGiacenza;
|
private String tipoGiacenza;
|
||||||
|
@SerializedName("tipoVerifica")
|
||||||
private String tipoVerifica;
|
private String tipoVerifica;
|
||||||
|
@SerializedName("verificatoDa")
|
||||||
private String verificatoDa;
|
private String verificatoDa;
|
||||||
|
@SerializedName("dataIns")
|
||||||
private Date dataIns;
|
private Date dataIns;
|
||||||
|
@SerializedName("dataDoc")
|
||||||
private Date dataDoc;
|
private Date dataDoc;
|
||||||
|
@SerializedName("serDoc")
|
||||||
private String serDoc;
|
private String serDoc;
|
||||||
|
@SerializedName("numDoc")
|
||||||
private Integer numDoc;
|
private Integer numDoc;
|
||||||
|
@SerializedName("regolaCalcoloCosto")
|
||||||
private String regolaCalcoloCosto;
|
private String regolaCalcoloCosto;
|
||||||
|
@SerializedName("dataOraInizio")
|
||||||
private LocalDateTime dataOraInizio;
|
private LocalDateTime dataOraInizio;
|
||||||
|
@SerializedName("dataOraFine")
|
||||||
private LocalDateTime dataOraFine;
|
private LocalDateTime dataOraFine;
|
||||||
|
@SerializedName("causale")
|
||||||
private String causale;
|
private String causale;
|
||||||
|
@SerializedName("mtbInvenr")
|
||||||
private List<MtbInvenr> mtbInvenr;
|
private List<MtbInvenr> mtbInvenr;
|
||||||
|
|
||||||
public MtbInvent() {
|
public MtbInvent() {
|
||||||
|
|||||||
@@ -1,32 +1,76 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class MtbPartitaMag extends EntityBase {
|
public class MtbPartitaMag extends EntityBase {
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
|
@SerializedName("dataIns")
|
||||||
private LocalDateTime dataIns;
|
private LocalDateTime dataIns;
|
||||||
|
|
||||||
|
@SerializedName("dataScad")
|
||||||
private LocalDate dataScad;
|
private LocalDate dataScad;
|
||||||
|
|
||||||
|
@SerializedName("scelta")
|
||||||
private Integer scelta;
|
private Integer scelta;
|
||||||
|
|
||||||
|
@SerializedName("costoUntUmMag")
|
||||||
private BigDecimal costoUntUmMag;
|
private BigDecimal costoUntUmMag;
|
||||||
|
|
||||||
|
@SerializedName("valUntUmMag")
|
||||||
private BigDecimal valUntUmMag;
|
private BigDecimal valUntUmMag;
|
||||||
|
|
||||||
|
@SerializedName("taraCnfKg")
|
||||||
private BigDecimal taraCnfKg;
|
private BigDecimal taraCnfKg;
|
||||||
|
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
|
||||||
|
@SerializedName("flagImballoArendere")
|
||||||
private String flagImballoArendere;
|
private String flagImballoArendere;
|
||||||
|
|
||||||
|
@SerializedName("flagStato")
|
||||||
private String flagStato;
|
private String flagStato;
|
||||||
|
|
||||||
|
@SerializedName("codDiviCont")
|
||||||
private String codDiviCont;
|
private String codDiviCont;
|
||||||
|
|
||||||
|
@SerializedName("cambioDiviCont")
|
||||||
private BigDecimal cambioDiviCont;
|
private BigDecimal cambioDiviCont;
|
||||||
|
|
||||||
|
@SerializedName("barcode")
|
||||||
private String barcode;
|
private String barcode;
|
||||||
|
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
|
@SerializedName("rapConv2")
|
||||||
private BigDecimal rapConv2;
|
private BigDecimal rapConv2;
|
||||||
|
|
||||||
|
@SerializedName("rapConv3")
|
||||||
private BigDecimal rapConv3;
|
private BigDecimal rapConv3;
|
||||||
|
|
||||||
|
@SerializedName("posizione")
|
||||||
private String posizione;
|
private String posizione;
|
||||||
|
|
||||||
|
@SerializedName("dataAggPrz")
|
||||||
private String dataAggPrz;
|
private String dataAggPrz;
|
||||||
|
|
||||||
|
@SerializedName("partitaMagSec")
|
||||||
private String partitaMagSec;
|
private String partitaMagSec;
|
||||||
|
|
||||||
|
@SerializedName("qtaAttesa")
|
||||||
private BigDecimal qtaAttesa;
|
private BigDecimal qtaAttesa;
|
||||||
|
|
||||||
public MtbPartitaMag() {
|
public MtbPartitaMag() {
|
||||||
@@ -257,4 +301,17 @@ public class MtbPartitaMag extends EntityBase {
|
|||||||
this.qtaAttesa = qtaAttesa;
|
this.qtaAttesa = qtaAttesa;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
MtbPartitaMag that = (MtbPartitaMag) o;
|
||||||
|
return Objects.equals(getCodMart(), that.getCodMart()) && Objects.equals(getPartitaMag(), that.getPartitaMag()) && Objects.equals(getDescrizione(), that.getDescrizione()) && Objects.equals(getDataIns(), that.getDataIns()) && Objects.equals(getDataScad(), that.getDataScad()) && Objects.equals(getScelta(), that.getScelta()) && Objects.equals(getCostoUntUmMag(), that.getCostoUntUmMag()) && Objects.equals(getValUntUmMag(), that.getValUntUmMag()) && Objects.equals(getTaraCnfKg(), that.getTaraCnfKg()) && Objects.equals(getQtaCnf(), that.getQtaCnf()) && Objects.equals(getFlagImballoArendere(), that.getFlagImballoArendere()) && Objects.equals(getFlagStato(), that.getFlagStato()) && Objects.equals(getCodDiviCont(), that.getCodDiviCont()) && Objects.equals(getCambioDiviCont(), that.getCambioDiviCont()) && Objects.equals(getBarcode(), that.getBarcode()) && Objects.equals(getNote(), that.getNote()) && Objects.equals(getRapConv2(), that.getRapConv2()) && Objects.equals(getRapConv3(), that.getRapConv3()) && Objects.equals(getPosizione(), that.getPosizione()) && Objects.equals(getDataAggPrz(), that.getDataAggPrz()) && Objects.equals(getPartitaMagSec(), that.getPartitaMagSec()) && Objects.equals(getQtaAttesa(), that.getQtaAttesa());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(getCodMart(), getPartitaMag(), getDescrizione(), getDataIns(), getDataScad(), getScelta(), getCostoUntUmMag(), getValUntUmMag(), getTaraCnfKg(), getQtaCnf(), getFlagImballoArendere(), getFlagStato(), getCodDiviCont(), getCambioDiviCont(), getBarcode(), getNote(), getRapConv2(), getRapConv3(), getPosizione(), getDataAggPrz(), getPartitaMagSec(), getQtaAttesa());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,20 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class MtbSfam extends EntityBase {
|
public class MtbSfam extends EntityBase {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("codMgrp")
|
||||||
private String codMgrp;
|
private String codMgrp;
|
||||||
|
|
||||||
|
@SerializedName("codMsgr")
|
||||||
private String codMsgr;
|
private String codMsgr;
|
||||||
|
|
||||||
|
@SerializedName("codMsfa")
|
||||||
private String codMsfa;
|
private String codMsfa;
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
public MtbSfam() {
|
public MtbSfam() {
|
||||||
|
|||||||
@@ -1,19 +1,40 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MtbSgrp extends EntityBase {
|
public class MtbSgrp extends EntityBase {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("codMgrp")
|
||||||
private String codMgrp;
|
private String codMgrp;
|
||||||
|
|
||||||
|
@SerializedName("codMsgr")
|
||||||
private String codMsgr;
|
private String codMsgr;
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
|
@SerializedName("inclInStat")
|
||||||
private String inclInStat;
|
private String inclInStat;
|
||||||
|
|
||||||
|
@SerializedName("contoRimFin")
|
||||||
private String contoRimFin;
|
private String contoRimFin;
|
||||||
|
|
||||||
|
@SerializedName("ordinamento")
|
||||||
private Integer ordinamento;
|
private Integer ordinamento;
|
||||||
|
|
||||||
|
@SerializedName("chkGiacenzaNeg")
|
||||||
private Boolean chkGiacenzaNeg;
|
private Boolean chkGiacenzaNeg;
|
||||||
|
|
||||||
|
@SerializedName("flagReso")
|
||||||
private Boolean flagReso;
|
private Boolean flagReso;
|
||||||
|
|
||||||
|
@SerializedName("codCconWip")
|
||||||
private String codCconWip;
|
private String codCconWip;
|
||||||
|
|
||||||
|
@SerializedName("mtbSfam")
|
||||||
private List<MtbSfam> mtbSfam = new ArrayList<>();
|
private List<MtbSfam> mtbSfam = new ArrayList<>();
|
||||||
|
|
||||||
public MtbSgrp() {
|
public MtbSgrp() {
|
||||||
|
|||||||
@@ -4,20 +4,42 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class MtbTCol {
|
public class MtbTCol extends EntityBase {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("codTcol")
|
||||||
private String codTcol;
|
private String codTcol;
|
||||||
|
|
||||||
|
@SerializedName("pesoKg")
|
||||||
private BigDecimal pesoKg;
|
private BigDecimal pesoKg;
|
||||||
|
|
||||||
|
@SerializedName("lunghezzaCm")
|
||||||
private BigDecimal lunghezzaCm;
|
private BigDecimal lunghezzaCm;
|
||||||
|
|
||||||
|
@SerializedName("larghezzaCm")
|
||||||
private BigDecimal larghezzaCm;
|
private BigDecimal larghezzaCm;
|
||||||
|
|
||||||
|
@SerializedName("altezzaCm")
|
||||||
private BigDecimal altezzaCm;
|
private BigDecimal altezzaCm;
|
||||||
|
|
||||||
|
@SerializedName("taraKg")
|
||||||
private BigDecimal taraKg;
|
private BigDecimal taraKg;
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("flagUiUl")
|
||||||
private FlagUiUlEnum flagUiUl;
|
private FlagUiUlEnum flagUiUl;
|
||||||
|
|
||||||
|
@SerializedName("circuito")
|
||||||
private String circuito;
|
private String circuito;
|
||||||
|
|
||||||
|
public MtbTCol() {
|
||||||
|
this.type = "mtb_tcol";
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodTcol() {
|
public String getCodTcol() {
|
||||||
return codTcol;
|
return codTcol;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class MtbUntMis extends EntityBase {
|
public class MtbUntMis extends EntityBase {
|
||||||
|
|
||||||
|
@SerializedName("untMis")
|
||||||
private String untMis;
|
private String untMis;
|
||||||
|
|
||||||
|
@SerializedName("flagDig")
|
||||||
private String flagDig;
|
private String flagDig;
|
||||||
|
|
||||||
|
@SerializedName("cifreDec")
|
||||||
private BigDecimal cifreDec;
|
private BigDecimal cifreDec;
|
||||||
|
|
||||||
|
@SerializedName("tipoUm")
|
||||||
private String tipoUm;
|
private String tipoUm;
|
||||||
|
|
||||||
|
@SerializedName("flagUnitaKg")
|
||||||
private String flagUnitaKg;
|
private String flagUnitaKg;
|
||||||
|
|
||||||
|
@SerializedName("flagAttivo")
|
||||||
private String flagAttivo;
|
private String flagAttivo;
|
||||||
|
|
||||||
public MtbUntMis() {
|
public MtbUntMis() {
|
||||||
this.type = "mtb_unt_mis";
|
this.type = "mtb_unt_mis";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Costruttore di copia
|
|
||||||
public MtbUntMis(MtbUntMis other) {
|
|
||||||
this();
|
|
||||||
|
|
||||||
this.untMis = other.untMis;
|
|
||||||
this.flagDig = other.flagDig;
|
|
||||||
this.cifreDec = other.cifreDec; // BigDecimal è immutabile
|
|
||||||
this.tipoUm = other.tipoUm;
|
|
||||||
this.flagUnitaKg = other.flagUnitaKg;
|
|
||||||
this.flagAttivo = other.flagAttivo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUntMis() {
|
public String getUntMis() {
|
||||||
return untMis;
|
return untMis;
|
||||||
}
|
}
|
||||||
@@ -85,4 +85,20 @@ public class MtbUntMis extends EntityBase {
|
|||||||
this.flagAttivo = flagAttivo;
|
this.flagAttivo = flagAttivo;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crea una copia dell'oggetto MtbUntMis corrente
|
||||||
|
* @return Una nuova istanza di MtbUntMis con gli stessi valori
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MtbUntMis clone() {
|
||||||
|
MtbUntMis clone = new MtbUntMis();
|
||||||
|
clone.setUntMis(this.untMis);
|
||||||
|
clone.setFlagDig(this.flagDig);
|
||||||
|
clone.setCifreDec(this.cifreDec);
|
||||||
|
clone.setTipoUm(this.tipoUm);
|
||||||
|
clone.setFlagUnitaKg(this.flagUnitaKg);
|
||||||
|
clone.setFlagAttivo(this.flagAttivo);
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
@@ -14,40 +18,111 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
|
|
||||||
public class MvwSitArtUdcDetInventario {
|
public class MvwSitArtUdcDetInventario {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
|
||||||
|
@SerializedName("dataCollo")
|
||||||
private LocalDate dataCollo;
|
private LocalDate dataCollo;
|
||||||
|
|
||||||
|
@SerializedName("serCollo")
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
|
|
||||||
|
@SerializedName("numCollo")
|
||||||
private Integer numCollo;
|
private Integer numCollo;
|
||||||
|
|
||||||
|
@SerializedName("segno")
|
||||||
private Integer segno;
|
private Integer segno;
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
|
||||||
|
@SerializedName("posizione")
|
||||||
private String posizione;
|
private String posizione;
|
||||||
|
|
||||||
|
@SerializedName("priorita")
|
||||||
private Integer priorita;
|
private Integer priorita;
|
||||||
|
|
||||||
|
@SerializedName("codGruppo")
|
||||||
private String codGruppo;
|
private String codGruppo;
|
||||||
|
|
||||||
|
@SerializedName("gruppo")
|
||||||
private String gruppo;
|
private String gruppo;
|
||||||
|
|
||||||
|
@SerializedName("codSgruppo")
|
||||||
private String codSgruppo;
|
private String codSgruppo;
|
||||||
|
|
||||||
|
@SerializedName("sottogruppo")
|
||||||
private String sottogruppo;
|
private String sottogruppo;
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("diacod")
|
||||||
private String diacod;
|
private String diacod;
|
||||||
|
|
||||||
|
@SerializedName("descrizioneEstesa")
|
||||||
private String descrizioneEstesa;
|
private String descrizioneEstesa;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("dataScad")
|
||||||
private LocalDate dataScad;
|
private LocalDate dataScad;
|
||||||
|
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
|
@SerializedName("commessa")
|
||||||
private String commessa;
|
private String commessa;
|
||||||
|
|
||||||
|
@SerializedName("untMis")
|
||||||
private String untMis;
|
private String untMis;
|
||||||
|
|
||||||
|
@SerializedName("qtaCol")
|
||||||
private BigDecimal qtaCol;
|
private BigDecimal qtaCol;
|
||||||
|
|
||||||
|
@SerializedName("numCnf")
|
||||||
private BigDecimal numCnf;
|
private BigDecimal numCnf;
|
||||||
|
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
|
||||||
|
@SerializedName("pesoNettoKg")
|
||||||
private BigDecimal pesoNettoKg;
|
private BigDecimal pesoNettoKg;
|
||||||
|
|
||||||
|
@SerializedName("pesoLordoKg")
|
||||||
private BigDecimal pesoLordoKg;
|
private BigDecimal pesoLordoKg;
|
||||||
|
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
|
||||||
|
@SerializedName("mtbAart")
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
@SerializedName("numOrd")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
|
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private Date dataOrd;
|
private Date dataOrd;
|
||||||
|
|
||||||
|
@SerializedName("barcodeUl")
|
||||||
|
private String barcodeUl;
|
||||||
|
|
||||||
|
@SerializedName("progressivoUl")
|
||||||
|
private Integer progressivoUl;
|
||||||
|
|
||||||
|
@SerializedName("datetimePosizionamento")
|
||||||
|
private LocalDateTime datetimePosizionamento;
|
||||||
|
|
||||||
public String getGestione() {
|
public String getGestione() {
|
||||||
return gestione;
|
return gestione;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GestioneEnum getGestioneEnum() {
|
||||||
|
return GestioneEnum.fromString(gestione);
|
||||||
|
}
|
||||||
|
|
||||||
public MvwSitArtUdcDetInventario setGestione(String gestione) {
|
public MvwSitArtUdcDetInventario setGestione(String gestione) {
|
||||||
this.gestione = gestione;
|
this.gestione = gestione;
|
||||||
return this;
|
return this;
|
||||||
@@ -302,6 +377,30 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBarcodeUl() {
|
||||||
|
return barcodeUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBarcodeUl(String barcodeUl) {
|
||||||
|
this.barcodeUl = barcodeUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getProgressivoUl() {
|
||||||
|
return progressivoUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProgressivoUl(Integer progressivoUl) {
|
||||||
|
this.progressivoUl = progressivoUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getDatetimePosizionamento() {
|
||||||
|
return datetimePosizionamento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatetimePosizionamento(LocalDateTime datetimePosizionamento) {
|
||||||
|
this.datetimePosizionamento = datetimePosizionamento;
|
||||||
|
}
|
||||||
|
|
||||||
public MtbColr toMtbColr() {
|
public MtbColr toMtbColr() {
|
||||||
return new MtbColr()
|
return new MtbColr()
|
||||||
.setCodJcom(getCodJcom())
|
.setCodJcom(getCodJcom())
|
||||||
|
|||||||
@@ -1,36 +1,43 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.util.Date;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
|
|
||||||
public class OrdineInevasoDTO {
|
public class OrdineInevasoDTO {
|
||||||
|
|
||||||
private String data;
|
@SerializedName("data")
|
||||||
private Integer numero;
|
private LocalDate dataOrd;
|
||||||
|
|
||||||
|
@SerializedName("numero")
|
||||||
|
private Integer numOrd;
|
||||||
|
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
|
||||||
public String getDataOrdS() {
|
public LocalDate getDataOrd() {
|
||||||
return data;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataOrdD() {
|
public OrdineInevasoDTO setDataOrd(LocalDate data) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrdS());
|
this.dataOrd = data;
|
||||||
}
|
|
||||||
|
|
||||||
public OrdineInevasoDTO setData(String data) {
|
|
||||||
this.data = data;
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNumOrd() {
|
public Integer getNumOrd() {
|
||||||
return numero;
|
return numOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrdineInevasoDTO setNumero(Integer numero) {
|
public OrdineInevasoDTO setNumOrd(Integer numOrd) {
|
||||||
this.numero = numero;
|
this.numOrd = numOrd;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,4 +64,34 @@ public class OrdineInevasoDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean equalsKey(OrdineInevasoDTO that) {
|
||||||
|
if (that == null) return false;
|
||||||
|
return this.dataOrd.equals(that.dataOrd) &&
|
||||||
|
this.numOrd.equals(that.numOrd) &&
|
||||||
|
StringUtils.equalsIgnoreCase(this.codMdep, that.codMdep);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
OrdineInevasoDTO that = (OrdineInevasoDTO) o;
|
||||||
|
|
||||||
|
if(!equalsKey(that)) return false;
|
||||||
|
return StringUtils.equalsIgnoreCase(getCodMdep(), that.getCodMdep());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int hashCodeKey() {
|
||||||
|
int result = getDataOrd().hashCode();
|
||||||
|
result = 31 * result + getNumOrd().hashCode();
|
||||||
|
result = 31 * result + getGestione().hashCode();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = hashCodeKey();
|
||||||
|
result = 31 * result + Objects.hashCode(getCodMdep());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,32 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class StbGestSetup extends EntityBase{
|
public class StbGestSetup extends EntityBase{
|
||||||
|
|
||||||
|
@SerializedName("gestName")
|
||||||
private String gestName;
|
private String gestName;
|
||||||
|
@SerializedName("section")
|
||||||
private String section;
|
private String section;
|
||||||
|
@SerializedName("keySection")
|
||||||
private String keySection;
|
private String keySection;
|
||||||
|
@SerializedName("value")
|
||||||
private String value;
|
private String value;
|
||||||
|
@SerializedName("description")
|
||||||
private String description;
|
private String description;
|
||||||
|
@SerializedName("flagSync")
|
||||||
private String flagSync;
|
private String flagSync;
|
||||||
|
@SerializedName("queryDefault")
|
||||||
private String queryDefault;
|
private String queryDefault;
|
||||||
|
@SerializedName("flagUserView")
|
||||||
private String flagUserView;
|
private String flagUserView;
|
||||||
|
@SerializedName("dataModifica")
|
||||||
private String dataModifica;
|
private String dataModifica;
|
||||||
|
@SerializedName("modificatoDa")
|
||||||
private String modificatoDa;
|
private String modificatoDa;
|
||||||
|
@SerializedName("flagSetupDepo")
|
||||||
private String flagSetupDepo;
|
private String flagSetupDepo;
|
||||||
|
@SerializedName("flagSetupUserWeb")
|
||||||
private String flagSetupUserWeb;
|
private String flagSetupUserWeb;
|
||||||
|
|
||||||
public StbGestSetup() {
|
public StbGestSetup() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -9,26 +10,46 @@ public class StbMenu extends EntityBase {
|
|||||||
this.type = "stb_menu";
|
this.type = "stb_menu";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SerializedName("codOpz")
|
||||||
private String codOpz;
|
private String codOpz;
|
||||||
|
@SerializedName("codParent")
|
||||||
private String codParent;
|
private String codParent;
|
||||||
|
@SerializedName("tipoAzienda")
|
||||||
private String tipoAzienda;
|
private String tipoAzienda;
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
@SerializedName("descrizioneEstesa")
|
||||||
private String descrizioneEstesa;
|
private String descrizioneEstesa;
|
||||||
|
@SerializedName("entityName")
|
||||||
private String entityName;
|
private String entityName;
|
||||||
|
@SerializedName("flagAttivo")
|
||||||
private String flagAttivo;
|
private String flagAttivo;
|
||||||
|
@SerializedName("flagPrinterSetup")
|
||||||
private String flagPrinterSetup;
|
private String flagPrinterSetup;
|
||||||
|
@SerializedName("gestName")
|
||||||
private String gestName;
|
private String gestName;
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
@SerializedName("objectType")
|
||||||
private String objectType;
|
private String objectType;
|
||||||
|
@SerializedName("openType")
|
||||||
private String openType;
|
private String openType;
|
||||||
|
@SerializedName("parameter")
|
||||||
private String parameter;
|
private String parameter;
|
||||||
|
@SerializedName("pictureMenu")
|
||||||
private String pictureMenu;
|
private String pictureMenu;
|
||||||
|
@SerializedName("pictureSelect")
|
||||||
private String pictureSelect;
|
private String pictureSelect;
|
||||||
|
@SerializedName("pos")
|
||||||
private Integer pos;
|
private Integer pos;
|
||||||
|
@SerializedName("posCliente")
|
||||||
private Integer posCliente;
|
private Integer posCliente;
|
||||||
|
@SerializedName("posTipoAzienda")
|
||||||
private Integer posTipoAzienda;
|
private Integer posTipoAzienda;
|
||||||
|
@SerializedName("urlDescrizione")
|
||||||
private String urlDescrizione;
|
private String urlDescrizione;
|
||||||
|
|
||||||
|
@SerializedName("stbMenuChildren")
|
||||||
private final List<StbMenu> stbMenuChildren = new ArrayList<>();
|
private final List<StbMenu> stbMenuChildren = new ArrayList<>();
|
||||||
|
|
||||||
public String getCodOpz() {
|
public String getCodOpz() {
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package it.integry.integrywmsnative.core.model;
|
|||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class VtbDest extends EntityBase implements Parcelable {
|
public class VtbDest extends EntityBase implements Parcelable {
|
||||||
|
|
||||||
|
|
||||||
@@ -10,20 +12,28 @@ public class VtbDest extends EntityBase implements Parcelable {
|
|||||||
type = "vtb_dest";
|
type = "vtb_dest";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
|
||||||
|
@SerializedName("codVdes")
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
|
|
||||||
|
@SerializedName("destinatario")
|
||||||
private String destinatario;
|
private String destinatario;
|
||||||
|
|
||||||
|
@SerializedName("indirizzo")
|
||||||
private String indirizzo;
|
private String indirizzo;
|
||||||
|
|
||||||
|
@SerializedName("cap")
|
||||||
private String cap;
|
private String cap;
|
||||||
|
|
||||||
|
@SerializedName("citta")
|
||||||
private String citta;
|
private String citta;
|
||||||
|
|
||||||
|
@SerializedName("prov")
|
||||||
private String prov;
|
private String prov;
|
||||||
|
|
||||||
|
@SerializedName("nazione")
|
||||||
private String nazione;
|
private String nazione;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class VtbVetr extends EntityBase {
|
public class VtbVetr extends EntityBase {
|
||||||
@@ -8,13 +9,21 @@ public class VtbVetr extends EntityBase {
|
|||||||
type = "vtb_vetr";
|
type = "vtb_vetr";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SerializedName("codVvet")
|
||||||
private String codVvet;
|
private String codVvet;
|
||||||
|
@SerializedName("codSpes")
|
||||||
private String codSpes;
|
private String codSpes;
|
||||||
|
@SerializedName("idRiga")
|
||||||
private String idRiga;
|
private String idRiga;
|
||||||
|
@SerializedName("daQta")
|
||||||
private BigDecimal daQta;
|
private BigDecimal daQta;
|
||||||
|
@SerializedName("aQta")
|
||||||
private BigDecimal aQta;
|
private BigDecimal aQta;
|
||||||
|
@SerializedName("impUnt")
|
||||||
private BigDecimal impUnt;
|
private BigDecimal impUnt;
|
||||||
|
@SerializedName("impFisso")
|
||||||
private BigDecimal impFisso;
|
private BigDecimal impFisso;
|
||||||
|
@SerializedName("codDivi")
|
||||||
private String codDivi;
|
private String codDivi;
|
||||||
|
|
||||||
public String getCodVvet() {
|
public String getCodVvet() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -9,24 +10,43 @@ public class VtbVett extends EntityBase {
|
|||||||
type = "vtb_vett";
|
type = "vtb_vett";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SerializedName("codVvet")
|
||||||
private String codVvet;
|
private String codVvet;
|
||||||
|
@SerializedName("codLettVett")
|
||||||
private String codLettVett;
|
private String codLettVett;
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("ragSoc")
|
||||||
private String ragSoc;
|
private String ragSoc;
|
||||||
|
@SerializedName("indirizzo")
|
||||||
private String indirizzo;
|
private String indirizzo;
|
||||||
|
@SerializedName("cap")
|
||||||
private String cap;
|
private String cap;
|
||||||
|
@SerializedName("citta")
|
||||||
private String citta;
|
private String citta;
|
||||||
|
@SerializedName("prov")
|
||||||
private String prov;
|
private String prov;
|
||||||
|
@SerializedName("nazione")
|
||||||
private String nazione;
|
private String nazione;
|
||||||
|
@SerializedName("telefono")
|
||||||
private String telefono;
|
private String telefono;
|
||||||
|
@SerializedName("fax")
|
||||||
private String fax;
|
private String fax;
|
||||||
|
@SerializedName("partIva")
|
||||||
private String partIva;
|
private String partIva;
|
||||||
|
@SerializedName("note")
|
||||||
private String note;
|
private String note;
|
||||||
|
@SerializedName("eMail")
|
||||||
private String eMail;
|
private String eMail;
|
||||||
|
@SerializedName("modStamp")
|
||||||
private String modStamp;
|
private String modStamp;
|
||||||
|
@SerializedName("coefVol")
|
||||||
private BigDecimal coefVol;
|
private BigDecimal coefVol;
|
||||||
|
@SerializedName("flagAttivo")
|
||||||
private String flagAttivo;
|
private String flagAttivo;
|
||||||
|
@SerializedName("numAutoriz")
|
||||||
private String numAutoriz;
|
private String numAutoriz;
|
||||||
|
@SerializedName("vtbVetr")
|
||||||
private List<VtbVetr> vtbVetr;
|
private List<VtbVetr> vtbVetr;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
package it.integry.integrywmsnative.core.model.dto;
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class AlreadyRegisteredUlDTO {
|
public class AlreadyRegisteredUlDTO {
|
||||||
|
|
||||||
|
@SerializedName("mtbColt")
|
||||||
private MtbColt mtbColt;
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
@SerializedName("canBeRecovered")
|
||||||
private boolean canBeRecovered;
|
private boolean canBeRecovered;
|
||||||
|
|
||||||
public MtbColt getMtbColt() {
|
public MtbColt getMtbColt() {
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
package it.integry.integrywmsnative.core.model.dto;
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class InternalCodAnagsDTO {
|
public class InternalCodAnagsDTO {
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
@SerializedName("isCliente")
|
||||||
private boolean isCliente;
|
private boolean isCliente;
|
||||||
|
@SerializedName("isFornitore")
|
||||||
private boolean isFornitore;
|
private boolean isFornitore;
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class PartitaCommessaDTO {
|
||||||
|
|
||||||
|
private String partitaMag;
|
||||||
|
private LocalDate dataScad;
|
||||||
|
private String codJcom;
|
||||||
|
private String descrizione;
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataScad() {
|
||||||
|
return dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataScad(LocalDate dataScad) {
|
||||||
|
this.dataScad = dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model.dto;
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
@@ -10,8 +12,11 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
|||||||
|
|
||||||
public class PickDataDTO {
|
public class PickDataDTO {
|
||||||
|
|
||||||
|
@SerializedName("refMtbColt")
|
||||||
private MtbColt refMtbColt;
|
private MtbColt refMtbColt;
|
||||||
|
@SerializedName("sourceMtbColt")
|
||||||
private MtbColt sourceMtbColt;
|
private MtbColt sourceMtbColt;
|
||||||
|
@SerializedName("manualPickDTO")
|
||||||
private ManualPickDTO manualPickDTO;
|
private ManualPickDTO manualPickDTO;
|
||||||
|
|
||||||
public MtbColt getRefMtbColt() {
|
public MtbColt getRefMtbColt() {
|
||||||
|
|||||||
@@ -1,26 +1,38 @@
|
|||||||
package it.integry.integrywmsnative.core.model.dto;
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.secondary.StatoPartitaMag;
|
import it.integry.integrywmsnative.core.model.secondary.StatoPartitaMag;
|
||||||
|
|
||||||
public class StatoArticoloDTO {
|
public class StatoArticoloDTO {
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("dataScad")
|
||||||
private Date dataScad;
|
private Date dataScad;
|
||||||
|
|
||||||
|
@SerializedName("ggScadPartita")
|
||||||
private Integer ggScadPartita;
|
private Integer ggScadPartita;
|
||||||
|
|
||||||
|
@SerializedName("ggMax")
|
||||||
private Integer ggMax;
|
private Integer ggMax;
|
||||||
|
|
||||||
|
@SerializedName("ggScadEffettivi")
|
||||||
private Integer ggScadEffettivi;
|
private Integer ggScadEffettivi;
|
||||||
|
|
||||||
|
@SerializedName("ggUtili")
|
||||||
private Integer ggUtili;
|
private Integer ggUtili;
|
||||||
|
|
||||||
|
@SerializedName("statoArt")
|
||||||
private StatoPartitaMag statoArt;
|
private StatoPartitaMag statoArt;
|
||||||
|
|
||||||
|
|
||||||
public String getCodMart() {
|
public String getCodMart() {
|
||||||
return codMart;
|
return codMart;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
public class SuggestedULPositionDTO {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("codMdep")
|
||||||
|
private String codMdep;
|
||||||
|
|
||||||
|
@SerializedName("posizione")
|
||||||
|
private String posizione;
|
||||||
|
|
||||||
|
@SerializedName("descrizionePosizione")
|
||||||
|
private String descrizionePosizione;
|
||||||
|
|
||||||
|
@SerializedName("datetime")
|
||||||
|
private LocalDateTime datetime;
|
||||||
|
|
||||||
|
@SerializedName("postiOccupati")
|
||||||
|
private int postiOccupati;
|
||||||
|
|
||||||
|
@SerializedName("postiTotali")
|
||||||
|
private Integer postiTotali;
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SuggestedULPositionDTO setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizione() {
|
||||||
|
return posizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SuggestedULPositionDTO setPosizione(String posizione) {
|
||||||
|
this.posizione = posizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizionePosizione() {
|
||||||
|
return descrizionePosizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SuggestedULPositionDTO setDescrizionePosizione(String descrizionePosizione) {
|
||||||
|
this.descrizionePosizione = descrizionePosizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getDatetime() {
|
||||||
|
return datetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SuggestedULPositionDTO setDatetime(LocalDateTime datetime) {
|
||||||
|
this.datetime = datetime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPostiOccupati() {
|
||||||
|
return postiOccupati;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SuggestedULPositionDTO setPostiOccupati(int postiOccupati) {
|
||||||
|
this.postiOccupati = postiOccupati;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPostiTotali() {
|
||||||
|
return postiTotali;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SuggestedULPositionDTO setPostiTotali(Integer postiTotali) {
|
||||||
|
this.postiTotali = postiTotali;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model.dto;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
|
||||||
|
|
||||||
public class WithdrawableMtbColr extends MtbColr {
|
|
||||||
|
|
||||||
private transient MtbColr withdrawRow;
|
|
||||||
|
|
||||||
public WithdrawableMtbColr() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColr getWithdrawRow() {
|
|
||||||
return withdrawRow;
|
|
||||||
}
|
|
||||||
|
|
||||||
public WithdrawableMtbColr setWithdrawRow(MtbColr withdrawRow) {
|
|
||||||
this.withdrawRow = withdrawRow;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.key;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class DtbDocrKey extends DtbDoctKey {
|
||||||
|
|
||||||
|
@SerializedName("idRiga")
|
||||||
|
private final int idRiga;
|
||||||
|
|
||||||
|
public DtbDocrKey(String codAnag, String codDtip, LocalDate dataDoc, Integer numDoc, String serDoc, int idRiga) {
|
||||||
|
super(codAnag, codDtip, dataDoc, numDoc, serDoc);
|
||||||
|
this.idRiga = idRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIdRiga() {
|
||||||
|
return idRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
if (!super.equals(o)) return false;
|
||||||
|
DtbDocrKey that = (DtbDocrKey) o;
|
||||||
|
return getIdRiga() == that.getIdRiga();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode(), getIdRiga());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.key;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class DtbDoctKey {
|
||||||
|
|
||||||
|
@SerializedName("codAnag")
|
||||||
|
private String codAnag;
|
||||||
|
|
||||||
|
@SerializedName("codDtip")
|
||||||
|
private String codDtip;
|
||||||
|
|
||||||
|
@SerializedName("dataDoc")
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
|
||||||
|
@SerializedName("numDoc")
|
||||||
|
private Integer numDoc;
|
||||||
|
|
||||||
|
@SerializedName("serDoc")
|
||||||
|
private String serDoc;
|
||||||
|
|
||||||
|
public DtbDoctKey() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey(String codAnag, String codDtip, LocalDate dataDoc, Integer numDoc, String serDoc) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
this.codDtip = codDtip;
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
this.serDoc = serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || (getClass() != o.getClass() && !getClass().isAssignableFrom(o.getClass()))) return false;
|
||||||
|
DtbDoctKey that = (DtbDoctKey) o;
|
||||||
|
return Objects.equals(codAnag, that.codAnag) &&
|
||||||
|
Objects.equals(codDtip, that.codDtip) &&
|
||||||
|
Objects.equals(dataDoc, that.dataDoc) &&
|
||||||
|
Objects.equals(numDoc, that.numDoc) &&
|
||||||
|
Objects.equals(serDoc, that.serDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(codAnag, codDtip, dataDoc, numDoc, serDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtip() {
|
||||||
|
return codDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey setCodDtip(String codDtip) {
|
||||||
|
this.codDtip = codDtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataDoc() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey setDataDoc(LocalDate dataDoc) {
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey setNumDoc(Integer numDoc) {
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDoc() {
|
||||||
|
return serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDoctKey setSerDoc(String serDoc) {
|
||||||
|
this.serDoc = serDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.key;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class MtbColrKey extends MtbColtKey {
|
||||||
|
|
||||||
|
private final int riga;
|
||||||
|
|
||||||
|
public MtbColrKey(String gestione, String serCollo, LocalDate dataCollo, int numCollo, int riga) {
|
||||||
|
super(gestione, serCollo, dataCollo, numCollo);
|
||||||
|
this.riga = riga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRiga() {
|
||||||
|
return riga;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
if (!super.equals(o)) return false;
|
||||||
|
|
||||||
|
MtbColrKey that = (MtbColrKey) o;
|
||||||
|
return getRiga().equals(that.getRiga());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = super.hashCode();
|
||||||
|
result = 31 * result + getRiga().hashCode();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.key;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class MtbColtKey {
|
||||||
|
|
||||||
|
private final String gestione;
|
||||||
|
private final String serCollo;
|
||||||
|
private final LocalDate dataCollo;
|
||||||
|
private final int numCollo;
|
||||||
|
|
||||||
|
public MtbColtKey(String gestione, String serCollo, LocalDate dataCollo, int numCollo) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
this.serCollo = serCollo;
|
||||||
|
this.dataCollo = dataCollo;
|
||||||
|
this.numCollo = numCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerCollo() {
|
||||||
|
return serCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataCollo() {
|
||||||
|
return dataCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumCollo() {
|
||||||
|
return numCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
MtbColtKey that = (MtbColtKey) o;
|
||||||
|
return Objects.equals(dataCollo, that.dataCollo) &&
|
||||||
|
Objects.equals(gestione, that.gestione) &&
|
||||||
|
Objects.equals(numCollo, that.numCollo) &&
|
||||||
|
Objects.equals(serCollo, that.serCollo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(dataCollo, gestione, numCollo, serCollo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.secondary;
|
||||||
|
|
||||||
|
public enum TrasferimentoPedaneStatusEnum {
|
||||||
|
APERTO((short) 0, "Aperto"),
|
||||||
|
COMPLETATO((short) 1, "Completato"),
|
||||||
|
SCADUTO((short) 2, "Scaduto");
|
||||||
|
|
||||||
|
private final short value;
|
||||||
|
private final String text;
|
||||||
|
TrasferimentoPedaneStatusEnum(short value, String text) {
|
||||||
|
this.value = value;
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
public String getText() {
|
||||||
|
return this.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public short getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TrasferimentoPedaneStatusEnum fromText(String text) {
|
||||||
|
for (TrasferimentoPedaneStatusEnum b : TrasferimentoPedaneStatusEnum.values()) {
|
||||||
|
if (b.text.equalsIgnoreCase(text)) return b;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TrasferimentoPedaneStatusEnum fromValue(short value) {
|
||||||
|
for (TrasferimentoPedaneStatusEnum b : TrasferimentoPedaneStatusEnum.values()) {
|
||||||
|
if (b.value == value) return b;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.rest;
|
package it.integry.integrywmsnative.core.rest;
|
||||||
|
|
||||||
|
import android.os.NetworkOnMainThreadException;
|
||||||
|
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -32,9 +34,11 @@ public class CommonRESTException {
|
|||||||
public static String tryRecognizeThenGetMessage(Exception ex){
|
public static String tryRecognizeThenGetMessage(Exception ex){
|
||||||
|
|
||||||
if(ex instanceof SocketException){
|
if(ex instanceof SocketException){
|
||||||
return "Errore di comunicazione con il server remoto. Riprova.";
|
return "Errore di comunicazione con il server remoto. Riprova in un secondo momento.";
|
||||||
} else if(ex instanceof SocketTimeoutException){
|
} else if(ex instanceof SocketTimeoutException){
|
||||||
return "Errore di timeout durante la comunicazione con il server remoto. Riprova.";
|
return "Errore di timeout durante la comunicazione con il server remoto. Riprova in un secondo momento.";
|
||||||
|
} else if(ex instanceof NetworkOnMainThreadException){
|
||||||
|
return "Non puoi eseguire operazioni di rete sul thread principale.";
|
||||||
} else {
|
} else {
|
||||||
return ex.getMessage();
|
return ex.getMessage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.rest;
|
package it.integry.integrywmsnative.core.rest;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
@@ -27,32 +29,14 @@ public class RESTBuilder {
|
|||||||
private final boolean ADD_LOGGER_INTERCEPTOR = false;
|
private final boolean ADD_LOGGER_INTERCEPTOR = false;
|
||||||
private final AuthInterceptor authInterceptor;
|
private final AuthInterceptor authInterceptor;
|
||||||
|
|
||||||
|
private final OkHttpClient client;
|
||||||
|
private final Gson gson;
|
||||||
|
|
||||||
public RESTBuilder(AuthInterceptor authInterceptor) {
|
public RESTBuilder(AuthInterceptor authInterceptor) {
|
||||||
this.authInterceptor = authInterceptor;
|
this.authInterceptor = authInterceptor;
|
||||||
}
|
|
||||||
|
|
||||||
public <T> T getService(final Class<T> service) {
|
|
||||||
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> T getService(final Class<T> service, int timeout) {
|
|
||||||
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, timeout);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> T getService(final Class<T> service, String protocol, String host, int port) {
|
|
||||||
return getService(service, protocol, host, port, true, 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi) {
|
|
||||||
return getService(service, protocol, host, port, addEmsApi, 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi, int timeout) {
|
|
||||||
OkHttpClient.Builder clientBuilder = getDefaultHttpClient();
|
OkHttpClient.Builder clientBuilder = getDefaultHttpClient();
|
||||||
|
int timeout = 0;
|
||||||
timeout = 0;
|
|
||||||
|
|
||||||
clientBuilder.connectTimeout(timeout, TimeUnit.SECONDS);
|
clientBuilder.connectTimeout(timeout, TimeUnit.SECONDS);
|
||||||
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
||||||
@@ -64,14 +48,23 @@ public class RESTBuilder {
|
|||||||
clientBuilder.addInterceptor(authInterceptor);
|
clientBuilder.addInterceptor(authInterceptor);
|
||||||
clientBuilder.addInterceptor(new HttpInterceptor());
|
clientBuilder.addInterceptor(new HttpInterceptor());
|
||||||
if (ADD_LOGGER_INTERCEPTOR) clientBuilder.addInterceptor(new HttpLoggerInterceptor());
|
if (ADD_LOGGER_INTERCEPTOR) clientBuilder.addInterceptor(new HttpLoggerInterceptor());
|
||||||
|
client = clientBuilder.build();
|
||||||
|
|
||||||
OkHttpClient client = clientBuilder.build();
|
gson = UtilityGson.createObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T> T getService(final Class<T> service) {
|
||||||
|
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T> T getService(final Class<T> service, String protocol, String host, int port) {
|
||||||
|
return getService(service, protocol, host, port, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi) {
|
||||||
String endpoint = protocol + "://" + host + (port > 0 ? ":" + port : "") + "/" + (addEmsApi ? "ems-api/" : "");
|
String endpoint = protocol + "://" + host + (port > 0 ? ":" + port : "") + "/" + (addEmsApi ? "ems-api/" : "");
|
||||||
|
|
||||||
|
|
||||||
Gson gson = UtilityGson.createObject();
|
|
||||||
|
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
.addConverterFactory(GsonConverterFactory.create(gson))
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.baseUrl(endpoint)
|
.baseUrl(endpoint)
|
||||||
@@ -83,12 +76,15 @@ public class RESTBuilder {
|
|||||||
|
|
||||||
|
|
||||||
public static OkHttpClient.Builder getDefaultHttpClient() {
|
public static OkHttpClient.Builder getDefaultHttpClient() {
|
||||||
|
@SuppressLint("CustomX509TrustManager")
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
|
@SuppressLint("TrustAllX509TrustManager")
|
||||||
@Override
|
@Override
|
||||||
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {
|
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("TrustAllX509TrustManager")
|
||||||
@Override
|
@Override
|
||||||
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {
|
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {
|
||||||
}
|
}
|
||||||
@@ -109,10 +105,8 @@ public class RESTBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OkHttpClient.Builder client = new OkHttpClient.Builder()
|
return new OkHttpClient.Builder()
|
||||||
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
||||||
.hostnameVerifier((hostname, session) -> true);
|
.hostnameVerifier((hostname, session) -> true);
|
||||||
|
|
||||||
return client;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
var codMarts = codMartToFind.parallelStream()
|
var codMarts = codMartToFind.parallelStream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toUnmodifiableList());
|
.collect(Collectors.toUnmodifiableList());
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = restBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = restBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
var response = articoloRESTConsumer
|
var response = articoloRESTConsumer
|
||||||
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
||||||
@@ -180,6 +180,12 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public MtbAart getByCodMartSynchronized(String codMartToFind) throws Exception {
|
||||||
|
var artList = getByCodMartsSynchronized(Collections.singletonList(codMartToFind));
|
||||||
|
return artList != null && !artList.isEmpty() ? artList.get(0) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<MtbGrup> getArtsGroupsSynchronized(List<String> groupsToFind) throws Exception {
|
public List<MtbGrup> getArtsGroupsSynchronized(List<String> groupsToFind) throws Exception {
|
||||||
var whereCondMap = Stream.of(groupsToFind)
|
var whereCondMap = Stream.of(groupsToFind)
|
||||||
.map(x -> {
|
.map(x -> {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
@@ -14,112 +16,133 @@ import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ColliAccettazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface {
|
public class ColliAccettazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
private final ExecutorService executorService;
|
||||||
private final RESTBuilder restBuilder;
|
private final RESTBuilder restBuilder;
|
||||||
|
|
||||||
public ColliAccettazioneRESTConsumer(RESTBuilder restBuilder) {
|
public ColliAccettazioneRESTConsumer(ExecutorService executorService, RESTBuilder restBuilder) {
|
||||||
|
this.executorService = executorService;
|
||||||
this.restBuilder = restBuilder;
|
this.restBuilder = restBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
@Override
|
||||||
|
public MtbColt synchronousCreateUDC(CreateUDCRequestDTO createUDCRequestDTO) throws Exception {
|
||||||
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliAccettazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
var response = colliAccettazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
|
||||||
analyzeAnswer(response, "accettazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswer(response, "accettazione/createUDC");
|
||||||
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, @NonNull final Exception e) {
|
return data.getMtbColt();
|
||||||
onFailed.run(e);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
MtbColt result = synchronousCreateUDC(createUDCRequestDTO);
|
||||||
|
onComplete.run(result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CloseUDCResponseDTO synchronousCloseUDC(CloseUDCRequestDTO closeUDCRequestDTO) throws Exception {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
var response = colliAccettazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
return analyzeAnswer(response, "accettazione/closeUDC");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
CloseUDCResponseDTO result = synchronousCloseUDC(closeUDCRequestDTO);
|
||||||
|
onComplete.run(result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MtbColr synchronousInsertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO) throws Exception {
|
||||||
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliAccettazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
var response = colliAccettazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
var data = analyzeAnswer(response, "accettazione/insertUDCRow");
|
||||||
analyzeAnswer(response, "accettazione/closeUDC", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
return data.getSavedMtbColr();
|
||||||
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
onComplete.run(synchronousInsertUDCRow(insertUDCRowRequestDTO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MtbColr synchronousEditUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO) throws Exception {
|
||||||
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliAccettazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
var response = colliAccettazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
|
||||||
analyzeAnswer(response, "accettazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswer(response, "accettazione/editUDCRow");
|
||||||
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, @NonNull final Exception e) {
|
return data.getSavedMtbColr();
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
onComplete.run(synchronousEditUDCRow(editUDCRowRequestDTO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void synchronousDeleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO) throws Exception {
|
||||||
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliAccettazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
var response = colliAccettazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
|
||||||
analyzeAnswer(response, "accettazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
analyzeAnswer(response, "accettazione/deleteUDCRow");
|
||||||
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = restBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
colliAccettazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
synchronousDeleteUDCRow(deleteUDCRowRequestDTO);
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
onComplete.run();
|
||||||
@Override
|
} catch (Exception e) {
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
onFailed.run(e);
|
||||||
analyzeAnswer(response, "accettazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkBarcodeUl(String barcodeUl, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed){
|
public void checkBarcodeUl(String barcodeUl, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed){
|
||||||
|
|||||||
@@ -20,10 +20,8 @@ import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSFromArtRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSFromArtRequestDTO;
|
||||||
@@ -31,7 +29,6 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
@@ -53,75 +50,93 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public MtbColt synchronousCreateUDC(CreateUDCRequestDTO createUDCRequestDTO) throws Exception {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
var response = colliLavorazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswer(response, "lavorazione/createUDC");
|
||||||
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, @NonNull final Exception e) {
|
return data.getMtbColt();
|
||||||
onFailed.run(e);
|
}
|
||||||
}
|
|
||||||
});
|
@Override
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
MtbColt result = synchronousCreateUDC(createUDCRequestDTO);
|
||||||
|
onComplete.run(result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CloseUDCResponseDTO synchronousCloseUDC(CloseUDCRequestDTO closeUDCRequestDTO) throws Exception {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
var response = colliLavorazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
return analyzeAnswer(response, "lavorazione/closeUDC");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
CloseUDCResponseDTO result = synchronousCloseUDC(closeUDCRequestDTO);
|
||||||
|
onComplete.run(result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MtbColr synchronousInsertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO) throws Exception {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
var response = colliLavorazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/closeUDC", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswer(response, "lavorazione/insertUDCRow");
|
||||||
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
return data.getSavedMtbColr();
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
onComplete.run(synchronousInsertUDCRow(insertUDCRowRequestDTO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MtbColr synchronousEditUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO) throws Exception {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
var response = colliLavorazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswer(response, "lavorazione/editUDCRow");
|
||||||
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, @NonNull final Exception e) {
|
return data.getSavedMtbColr();
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
colliLavorazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
onComplete.run(synchronousEditUDCRow(editUDCRowRequestDTO));
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
} catch (Exception e) {
|
||||||
@Override
|
onFailed.run(e);
|
||||||
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
}
|
||||||
analyzeAnswer(response, "lavorazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
});
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColt createUDSSynchronized(CreateUDSRequestDTO createUDSRequestDTO) throws Exception {
|
public MtbColt createUDSSynchronized(CreateUDSRequestDTO createUDSRequestDTO) throws Exception {
|
||||||
@@ -231,22 +246,26 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void synchronousDeleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO) throws Exception {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = restBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
var response = colliLavorazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
analyzeAnswer(response, "lavorazione/deleteUDCRow");
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, @NonNull final Exception e) {
|
}
|
||||||
onFailed.run(e);
|
@Override
|
||||||
}
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
});
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
synchronousDeleteUDCRow(deleteUDCRowRequestDTO);
|
||||||
|
onComplete.run();
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,12 @@ import com.annimon.stream.Optional;
|
|||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@@ -22,7 +20,6 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
|
||||||
import it.integry.integrywmsnative.BuildConfig;
|
import it.integry.integrywmsnative.BuildConfig;
|
||||||
import it.integry.integrywmsnative.core.CommonConst;
|
import it.integry.integrywmsnative.core.CommonConst;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
@@ -34,10 +31,12 @@ import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
|||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.GetColliByBarcodesRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.UpdateDepositoULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.UpdatePosizioneULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.UpdatePosizioneULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
@@ -101,19 +100,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MtbColt> saveColliSynchronized(List<MtbColt> mtbColtsToSave) throws Exception {
|
|
||||||
|
|
||||||
for (MtbColt mtbColt : mtbColtsToSave) {
|
|
||||||
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
|
||||||
mtbColt.getMtbColr().get(i)
|
|
||||||
.setMtbAart(null)
|
|
||||||
.setMtbPartitaMag(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.mEntityRESTConsumer.processEntityListSynchronized(mtbColtsToSave, true, MtbColt.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void createColloScaricoDaCarico(MtbColt sourceMtbColt, MtbDepoPosizione posizione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createColloScaricoDaCarico(MtbColt sourceMtbColt, MtbDepoPosizione posizione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
@@ -244,10 +230,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(newMtbColt, onComplete, onFailed);
|
saveCollo(newMtbColt, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createColloFromEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
createColloFromEtichettaAnonima(barcodeScanDTO.getStringValue(), gestione, onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void createColloFromEtichettaAnonima(String barcode, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createColloFromEtichettaAnonima(String barcode, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
MtbColt mtbColtToCreate = new MtbColt()
|
MtbColt mtbColtToCreate = new MtbColt()
|
||||||
@@ -282,6 +264,38 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MtbColt> getBySsccListSynchronized(List<String> ssccList, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
|
||||||
|
if (ssccList == null || ssccList.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var requestData = new GetColliByBarcodesRequestDTO() {{
|
||||||
|
setBarcodes(ssccList);
|
||||||
|
setOnlyResiduo(onlyResiduo);
|
||||||
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
var colloResponse = colliMagazzinoRESTConsumerService.getColliByBarcodes(requestData, throwExcIfNull)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
var mtbColts = analyzeAnswer(colloResponse, "GetBySSCCList");
|
||||||
|
|
||||||
|
if(mtbColts == null || mtbColts.isEmpty()) {
|
||||||
|
if (throwExcIfNull) {
|
||||||
|
throw new Exception("Nessun collo trovato per i codici SSCC forniti");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
fillMtbAartsOfMtbColrsSynchronized(mtbColts.stream()
|
||||||
|
.flatMap(x -> x.getMtbColr().stream())
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
|
||||||
|
return mtbColts;
|
||||||
|
}
|
||||||
|
|
||||||
public MtbColt getBySsccSynchronized(String ssccString, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
|
public MtbColt getBySsccSynchronized(String ssccString, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
var colloResponse = colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull)
|
var colloResponse = colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull)
|
||||||
@@ -309,6 +323,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<MtbColr> fillMtbAartsOfMtbColrsSynchronized(List<MtbColr> mtbColrs) throws Exception {
|
public List<MtbColr> fillMtbAartsOfMtbColrsSynchronized(List<MtbColr> mtbColrs) throws Exception {
|
||||||
|
|
||||||
List<String> codMarts = new ArrayList<>(mtbColrs.stream()
|
List<String> codMarts = new ArrayList<>(mtbColrs.stream()
|
||||||
@@ -390,85 +405,14 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getMultipleByTestate(List<MtbColt> testate, boolean onlyResiduo, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void spostaUlSynchronized(MtbColt mtbColtToMove, String codMdep, String posizione, boolean createDocAutomatically, boolean enableDocumentDailyGrouping) throws Exception {
|
||||||
ArrayList<MtbColt> resultMtbColt = new ArrayList<>();
|
|
||||||
cyclicGetMultipleByTestate(testate.iterator(), onlyResiduo, resultMtbColt, () -> {
|
|
||||||
onComplete.run(resultMtbColt);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void cyclicGetMultipleByTestate(@NotNull Iterator<MtbColt> sourceMtbColts, boolean onlyResiduo, ArrayList<MtbColt> resultMtbColt, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
|
||||||
if (sourceMtbColts.hasNext()) {
|
|
||||||
getByTestata(sourceMtbColts.next(), onlyResiduo, false, mtbColt -> {
|
|
||||||
resultMtbColt.add(mtbColt);
|
|
||||||
cyclicGetMultipleByTestate(sourceMtbColts, onlyResiduo, resultMtbColt, onComplete, onAbort);
|
|
||||||
}, onAbort);
|
|
||||||
} else {
|
|
||||||
onComplete.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColt getByChiaveColloSynchronized(GestioneEnum gestione, int numCollo, String dataCollo, String serCollo, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
|
|
||||||
MtbColt mtbColtToRetrieve = new MtbColt()
|
|
||||||
.setGestione(gestione)
|
|
||||||
.setNumCollo(numCollo)
|
|
||||||
.setDataCollo(dataCollo)
|
|
||||||
.setSerCollo(serCollo);
|
|
||||||
|
|
||||||
return getByTestataSynchronized(mtbColtToRetrieve, onlyResiduo, throwExcIfNull);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void getByChiaveCollo(GestioneEnum gestione, int numCollo, String dataCollo, String serCollo, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
MtbColt mtbColtToRetrieve = new MtbColt()
|
|
||||||
.setGestione(gestione)
|
|
||||||
.setNumCollo(numCollo)
|
|
||||||
.setDataCollo(dataCollo)
|
|
||||||
.setSerCollo(serCollo);
|
|
||||||
|
|
||||||
getByTestata(mtbColtToRetrieve, onlyResiduo, throwExcIfNull, onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColt getByTestataSynchronized(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
|
|
||||||
testata.setMtbColr(new ObservableArrayList<>());
|
|
||||||
|
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
|
||||||
var response = colliMagazzinoRESTConsumerService.getColloInGiac(onlyResiduo, throwExcIfNull, testata)
|
|
||||||
.execute();
|
|
||||||
var mtbColt = analyzeAnswer(response, "getColloInGiac");
|
|
||||||
if (mtbColt != null && mtbColt.getMtbColr() != null && !mtbColt.getMtbColr().isEmpty()) {
|
|
||||||
var mtbColts = fillMtbAartsOfMtbColtsSynchronized(Collections.singletonList(mtbColt));
|
|
||||||
return mtbColts.get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return mtbColt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void getByTestata(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
executorService.execute(() -> {
|
|
||||||
try {
|
|
||||||
var data = getByTestataSynchronized(testata, onlyResiduo, throwExcIfNull);
|
|
||||||
if (onComplete != null) onComplete.run(data);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
if (onFailed != null) onFailed.run(ex);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void spostaUlSynchronized(MtbColt mtbColtToMove, String codMdep, String posizione, boolean createDocAutomatically) throws Exception {
|
|
||||||
MtbColt mtbColtToMoveClone = (MtbColt) mtbColtToMove.clone();
|
|
||||||
|
|
||||||
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
|
||||||
mtbColtToMoveClone.getMtbColr().get(i)
|
|
||||||
.setMtbAart(null)
|
|
||||||
.setMtbPartitaMag(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
SpostaULRequestDTO spostaUlRequestDTO = new SpostaULRequestDTO()
|
SpostaULRequestDTO spostaUlRequestDTO = new SpostaULRequestDTO()
|
||||||
.setCodMdep(codMdep)
|
.setCodMdep(codMdep)
|
||||||
.setPosizione(posizione)
|
.setPosizione(posizione)
|
||||||
.setMtbColtsToMove(Collections.singletonList(mtbColtToMoveClone))
|
.setBarcodeUlList(Collections.singletonList(mtbColtToMove.getBarcodeUl()))
|
||||||
.setCreateDocAutomatically(createDocAutomatically);
|
.setCreateDocAutomatically(createDocAutomatically)
|
||||||
|
.setGroupDailyTransfers(enableDocumentDailyGrouping);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
Response<ServiceRESTResponse<Void>> response = colliMagazzinoRESTConsumerService
|
Response<ServiceRESTResponse<Void>> response = colliMagazzinoRESTConsumerService
|
||||||
@@ -478,11 +422,19 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
analyzeAnswer(response, "spostaUL");
|
analyzeAnswer(response, "spostaUL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void spostaUlSynchronized(MtbColt mtbColtToMove, MtbDepoPosizione posizione, boolean enableDocumentDailyGrouping) throws Exception {
|
||||||
|
|
||||||
public void spostaUL(MtbColt mtbColtToMove, String codMdep, String posizione, boolean createDocAutomatically, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
String codMdep = posizione.getCodMdep();
|
||||||
|
String posizioneString = posizione.getPosizione();
|
||||||
|
|
||||||
|
spostaUlSynchronized(mtbColtToMove, codMdep, posizioneString, true, enableDocumentDailyGrouping);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void spostaUL(MtbColt mtbColtToMove, String codMdep, String posizione, boolean createDocAutomatically, boolean enableDocumentDailyGrouping, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
spostaUlSynchronized(mtbColtToMove, codMdep, posizione, createDocAutomatically);
|
spostaUlSynchronized(mtbColtToMove, codMdep, posizione, createDocAutomatically, enableDocumentDailyGrouping);
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
@@ -490,14 +442,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void spostaUL(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
String codMdep = posizione.getCodMdep();
|
|
||||||
String posizioneString = posizione.getPosizione();
|
|
||||||
|
|
||||||
spostaUL(mtbColtToMove, codMdep, posizioneString, true, onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateTipoULSynchronized(MtbColt mtbColt, String codTcol) throws Exception {
|
public void updateTipoULSynchronized(MtbColt mtbColt, String codTcol) throws Exception {
|
||||||
|
|
||||||
MtbColt mtbColtClone = (MtbColt) mtbColt.clone();
|
MtbColt mtbColtClone = (MtbColt) mtbColt.clone();
|
||||||
@@ -515,7 +459,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
analyzeAnswer(response, "updateTipoUL");
|
analyzeAnswer(response, "updateTipoUL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updateTipoUL(MtbColt mtbColt, String codTcol, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void updateTipoUL(MtbColt mtbColt, String codTcol, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
@@ -527,13 +470,10 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePosizioneULSynchronized(MtbColt mtbColt, String posizione) throws Exception {
|
public void updatePosizioneULSynchronized(String sscc, String posizione) throws Exception {
|
||||||
|
|
||||||
MtbColt mtbColtClone = (MtbColt) mtbColt.clone();
|
|
||||||
mtbColtClone.setMtbColr(new ObservableArrayList<>());
|
|
||||||
|
|
||||||
UpdatePosizioneULRequestDTO updateTipoULRequest = new UpdatePosizioneULRequestDTO()
|
UpdatePosizioneULRequestDTO updateTipoULRequest = new UpdatePosizioneULRequestDTO()
|
||||||
.setMtbColt(mtbColtClone)
|
.setSscc(sscc)
|
||||||
.setPosizione(posizione);
|
.setPosizione(posizione);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
@@ -545,10 +485,10 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updatePosizioneUL(MtbColt mtbColt, String posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void updatePosizioneUL(String sscc, String posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
updatePosizioneULSynchronized(mtbColt, posizione);
|
updatePosizioneULSynchronized(sscc, posizione);
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
@@ -556,19 +496,30 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateDataFine(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void updateDepositoULSynchronized(String gestione, LocalDate data, int num, String serie, String newCodMdep) throws Exception {
|
||||||
|
|
||||||
|
UpdateDepositoULRequestDTO updateDepositoULRequest = new UpdateDepositoULRequestDTO()
|
||||||
|
.setGestione(gestione)
|
||||||
|
.setData(data)
|
||||||
|
.setNum(num)
|
||||||
|
.setSerie(serie);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
Response<ServiceRESTResponse<Void>> response = colliMagazzinoRESTConsumerService
|
||||||
|
.updateDepositoUL(newCodMdep, updateDepositoULRequest)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
analyzeAnswer(response, "updateDepositoUL");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void synchronousUpdateDataFine(MtbColt mtbColt) throws Exception {
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||||
cloneMtbColt.setOraFinePrep(UtilityDate.getDateInstance());
|
cloneMtbColt.setOraFinePrep(UtilityDate.getDateInstance());
|
||||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
saveCollo(cloneMtbColt, value -> {
|
var value = saveColloSynchronized(cloneMtbColt);
|
||||||
onComplete.run();
|
|
||||||
}, ex -> {
|
|
||||||
if (onFailed != null) onFailed.run(ex);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -589,7 +540,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void creaRettificaCollo(MtbColr sourceMtbColrOriginal, BigDecimal newNumCnf, BigDecimal newQtaTot, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public MtbColr creaRettificaColloSynchronized(MtbColr sourceMtbColrOriginal, BigDecimal newNumCnf, BigDecimal newQtaTot) throws Exception {
|
||||||
MtbColr sourceMtbColr = (MtbColr) sourceMtbColrOriginal.clone();
|
MtbColr sourceMtbColr = (MtbColr) sourceMtbColrOriginal.clone();
|
||||||
sourceMtbColr.setMtbPartitaMag(null);
|
sourceMtbColr.setMtbPartitaMag(null);
|
||||||
sourceMtbColr.setMtbAart(null);
|
sourceMtbColr.setMtbAart(null);
|
||||||
@@ -600,25 +551,28 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.setNewQtaCol(newQtaTot);
|
.setNewQtaCol(newQtaTot);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.creaRettificaCollo(
|
var response = colliMagazzinoRESTConsumerService.creaRettificaCollo(
|
||||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||||
rettificaULDTO
|
rettificaULDTO
|
||||||
).enqueue(new ManagedErrorCallback<>() {
|
).execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbColr>> call, Response<ServiceRESTResponse<MtbColr>> response) {
|
|
||||||
analyzeAnswer(response, "creaRettificaCollo", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswer(response, "creaRettificaCollo");
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbColr>> call, @NonNull final Exception e) {
|
return data;
|
||||||
if (onFailed != null) onFailed.run(e);
|
}
|
||||||
|
|
||||||
|
public void creaRettificaCollo(MtbColr sourceMtbColrOriginal, BigDecimal newNumCnf, BigDecimal newQtaTot, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
var result = creaRettificaColloSynchronized(sourceMtbColrOriginal, newNumCnf, newQtaTot);
|
||||||
|
if (onComplete != null) onComplete.run(result);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MtbColr> spostaArtsTraULSynchronized(MtbColt sourceMtbColt, MtbColt destMtbColt, boolean flagForceUseRefs) throws Exception {
|
public List<MtbColr> spostaArtsTraULSynchronized(MtbColt sourceMtbColt, String destBarcodeUl, boolean flagForceUseRefs) throws Exception {
|
||||||
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
|
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
|
||||||
MtbColt mtbColtDestClone = (MtbColt) destMtbColt.clone();
|
|
||||||
|
|
||||||
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
||||||
mtbColtToMoveClone.getMtbColr().get(i)
|
mtbColtToMoveClone.getMtbColr().get(i)
|
||||||
@@ -626,11 +580,9 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.setMtbPartitaMag(null);
|
.setMtbPartitaMag(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
mtbColtDestClone.setMtbColr(null);
|
|
||||||
|
|
||||||
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
|
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
|
||||||
.setSourceMtbColt(mtbColtToMoveClone)
|
.setSourceMtbColt(mtbColtToMoveClone)
|
||||||
.setDestinationMtbColt(mtbColtDestClone)
|
.setDestinationBarcodeUl(destBarcodeUl)
|
||||||
.setFlagForceUseRefs(flagForceUseRefs);
|
.setFlagForceUseRefs(flagForceUseRefs);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
@@ -643,10 +595,10 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
return mtbColrs;
|
return mtbColrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, boolean flagForceUseRefs, RunnableArgs<List<MtbColr>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void spostaArtsTraUL(MtbColt sourceMtbColt, String destBarcodeUl, boolean flagForceUseRefs, RunnableArgs<List<MtbColr>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
var result = spostaArtsTraULSynchronized(sourceMtbColt, destMtbColt, flagForceUseRefs);
|
var result = spostaArtsTraULSynchronized(sourceMtbColt, destBarcodeUl, flagForceUseRefs);
|
||||||
if (onComplete != null) onComplete.run(result);
|
if (onComplete != null) onComplete.run(result);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
@@ -682,17 +634,12 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void versamentoAutomaticoUL(MtbColt sourceMtbColt, RunnableArgs<VersamentoAutomaticoULResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
public void versamentoAutomaticoUL(String barcodeUl, RunnableArgs<VersamentoAutomaticoULResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
MtbColt sourceMtbColt = new MtbColt()
|
||||||
|
.setBarcodeUl(barcodeUl);
|
||||||
for (int i = 0; i < sourceMtbColtClone.getMtbColr().size(); i++) {
|
|
||||||
sourceMtbColtClone.getMtbColr().get(i)
|
|
||||||
.setMtbAart(null)
|
|
||||||
.setMtbPartitaMag(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.versamentoAutomaticoUL(sourceMtbColtClone).enqueue(new ManagedErrorCallback<>() {
|
colliMagazzinoRESTConsumerService.versamentoAutomaticoUL(sourceMtbColt).enqueue(new ManagedErrorCallback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> call, Response<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> response) {
|
public void onResponse(Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> call, Response<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> response) {
|
||||||
analyzeAnswer(response, "versamentoAutomaticoUL", data -> {
|
analyzeAnswer(response, "versamentoAutomaticoUL", data -> {
|
||||||
@@ -735,51 +682,34 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void confirmGiacenzaUL(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void confirmGiacenzaULSynchronized(MtbColt sourceMtbColt) throws Exception {
|
||||||
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||||
sourceMtbColtClone.setMtbColr(new ObservableArrayList<>());
|
sourceMtbColtClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.confirmGiacenzaUL(sourceMtbColtClone).enqueue(new ManagedErrorCallback<>() {
|
var response = colliMagazzinoRESTConsumerService.confirmGiacenzaUL(sourceMtbColtClone).execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
|
||||||
analyzeAnswer(response, "confirmGiacenzaUL", data -> {
|
|
||||||
onComplete.run();
|
|
||||||
|
|
||||||
}, onFailed);
|
analyzeAnswer(response, "confirmGiacenzaUL");
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, @NonNull final Exception e) {
|
|
||||||
if (onFailed != null) onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public MtbColr makeSynchronousRetrieveShipmentUlFromProductionUlRequest(String barcodeUl) throws Exception {
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
HashMap<String, Object> params = new HashMap<>();
|
||||||
params.put("mtb_colr.gestione_rif", mtbColt.getGestione());
|
params.put("barcode_ul_out", barcodeUl);
|
||||||
params.put("mtb_colr.ser_collo_rif", mtbColt.getSerCollo());
|
|
||||||
params.put("mtb_colr.num_collo_rif", mtbColt.getNumCollo());
|
|
||||||
params.put("mtb_colr.data_collo_rif", mtbColt.getDataColloD());
|
|
||||||
|
|
||||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
||||||
|
|
||||||
|
|
||||||
String query = "select distinct mtb_colt.*\n" +
|
String query = "select distinct TOP 1 *\n" +
|
||||||
"from mtb_colt\n" +
|
"from mtb_colr\n" +
|
||||||
" left join mtb_colr on mtb_colt.gestione = mtb_colr.gestione and mtb_colt.data_collo = mtb_colr.data_collo and\n" +
|
"where gestione = 'V'" +
|
||||||
" mtb_colt.ser_collo = mtb_colr.ser_collo and mtb_colt.num_collo = mtb_colr.num_collo\n" +
|
|
||||||
"where mtb_colt.gestione = 'V'" +
|
|
||||||
" AND " + whereCond;
|
" AND " + whereCond;
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColr>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
|
var data = this.mSystemRESTConsumer.<ArrayList<MtbColr>>processSqlSynchronized(query, typeOfObjectsList);
|
||||||
onComplete.run(data.get(0));
|
return data != null && !data.isEmpty() ? data.get(0) : null;
|
||||||
}, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -828,26 +758,28 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printUL(PrintULRequestDTO printULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void printULSynchronized(PrintULRequestDTO printULRequestDTO) throws Exception {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
onComplete.run();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = restBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
colliMagazzinoRESTConsumerService.printUL(printULRequestDTO)
|
var response = colliMagazzinoRESTConsumerService.printUL(printULRequestDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "generic/printUL", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
analyzeAnswer(response, "generic/printUL");
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, @NonNull final Exception e) {
|
}
|
||||||
onFailed.run(e);
|
|
||||||
}
|
public void printUL(PrintULRequestDTO printULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
});
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
printULSynchronized(printULRequestDTO);
|
||||||
|
if (onComplete != null) onComplete.run();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
if (onFailed != null) onFailed.run(ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ import java.util.List;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.GetColliByBarcodesRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.UpdateDepositoULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.UpdatePosizioneULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.UpdatePosizioneULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
@@ -23,12 +25,12 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface ColliMagazzinoRESTConsumerService {
|
public interface ColliMagazzinoRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("getColliByBarcodes")
|
||||||
|
Call<ServiceRESTResponse<List<MtbColt>>> getColliByBarcodes(@Body GetColliByBarcodesRequestDTO requestData, @Query("throwExcIfNull") boolean throwExcIfNull);
|
||||||
|
|
||||||
@POST("getColloByBarcode")
|
@POST("getColloByBarcode")
|
||||||
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
|
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
|
||||||
|
|
||||||
@POST("getColloInGiac")
|
|
||||||
Call<ServiceRESTResponse<MtbColt>> getColloInGiac(@Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull, @Body MtbColt mtbColt);
|
|
||||||
|
|
||||||
@GET("getColliInBasket")
|
@GET("getColliInBasket")
|
||||||
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);
|
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);
|
||||||
|
|
||||||
@@ -41,6 +43,9 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/updatePosizioneUL")
|
@POST("wms/updatePosizioneUL")
|
||||||
Call<ServiceRESTResponse<Void>> updatePosizioneUL(@Body UpdatePosizioneULRequestDTO requestDto);
|
Call<ServiceRESTResponse<Void>> updatePosizioneUL(@Body UpdatePosizioneULRequestDTO requestDto);
|
||||||
|
|
||||||
|
@POST("wms/updateDepositoUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> updateDepositoUL(@Query("newDeposito") String newDeposito, @Body UpdateDepositoULRequestDTO request);
|
||||||
|
|
||||||
@POST("wms/spostaUL")
|
@POST("wms/spostaUL")
|
||||||
Call<ServiceRESTResponse<Void>> spostaUL(@Body SpostaULRequestDTO requestDto);
|
Call<ServiceRESTResponse<Void>> spostaUL(@Body SpostaULRequestDTO requestDto);
|
||||||
|
|
||||||
@@ -54,7 +59,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
@POST("wms/confirmGiacenzaUL")
|
@POST("wms/confirmGiacenzaUL")
|
||||||
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<Void>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
|
||||||
@POST("wms/generic/canULBeDeleted")
|
@POST("wms/generic/canULBeDeleted")
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
getValue(gestName, sectionName, keySection, value -> {
|
getValue(gestName, sectionName, keySection, value -> {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
onComplete.run("S".equalsIgnoreCase(value.value));
|
onComplete.run("S".equalsIgnoreCase(value.getValue()));
|
||||||
} else onComplete.run(false);
|
} else onComplete.run(false);
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
if (onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
@@ -71,7 +71,7 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void getBooleanValue(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBooleanValue(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
getValue(gestName, sectionName, keySection, codMdep, value -> {
|
getValue(gestName, sectionName, keySection, codMdep, value -> {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
onComplete.run("S".equalsIgnoreCase(value.value));
|
onComplete.run("S".equalsIgnoreCase(value.getValue()));
|
||||||
} else onComplete.run(false);
|
} else onComplete.run(false);
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
if (onFailed != null) onFailed.run(ex);
|
if (onFailed != null) onFailed.run(ex);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class GiacenzaPvRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
|
|
||||||
public List<GiacenzaPvDTO> retrieveGiacenzeSynchronized(String codMdep) throws Exception {
|
public List<GiacenzaPvDTO> retrieveGiacenzeSynchronized(String codMdep) throws Exception {
|
||||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 120);
|
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class);
|
||||||
var response = giacenzaPvRESTConsumerService.retrieve(codMdep)
|
var response = giacenzaPvRESTConsumerService.retrieve(codMdep)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ public class GiacenzaPvRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void saveNewRowSynchronized(SaveNewRowVerificaRequestDTO saveNewRowVerificaRequest) throws Exception {
|
public void saveNewRowSynchronized(SaveNewRowVerificaRequestDTO saveNewRowVerificaRequest) throws Exception {
|
||||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 0);
|
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class);
|
||||||
var response = giacenzaPvRESTConsumerService.saveNewRowVerifica(saveNewRowVerificaRequest)
|
var response = giacenzaPvRESTConsumerService.saveNewRowVerifica(saveNewRowVerificaRequest)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ public class GiacenzaPvRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateRowSynchronized(UpdateRowVerificaRequestDTO updateRowVerificaRequest) throws Exception {
|
public void updateRowSynchronized(UpdateRowVerificaRequestDTO updateRowVerificaRequest) throws Exception {
|
||||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 0);
|
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class);
|
||||||
var response = giacenzaPvRESTConsumerService.updateRowVerifica(updateRowVerificaRequest)
|
var response = giacenzaPvRESTConsumerService.updateRowVerifica(updateRowVerificaRequest)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class GiacenzaPvRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteRowSynchronized(DeleteRowVerificaRequestDTO deleteRowVerificaRequest) throws Exception {
|
public void deleteRowSynchronized(DeleteRowVerificaRequestDTO deleteRowVerificaRequest) throws Exception {
|
||||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 0);
|
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class);
|
||||||
var response = giacenzaPvRESTConsumerService.deleteRowVerifica(deleteRowVerificaRequest)
|
var response = giacenzaPvRESTConsumerService.deleteRowVerifica(deleteRowVerificaRequest)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ public class GiacenzaPvRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void closeVerifica(CloseVerificaRequestDTO closeVerificaRequestDTO) throws Exception {
|
public void closeVerifica(CloseVerificaRequestDTO closeVerificaRequestDTO) throws Exception {
|
||||||
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class, 0);
|
GiacenzaPvRESTConsumerService giacenzaPvRESTConsumerService = restBuilder.getService(GiacenzaPvRESTConsumerService.class);
|
||||||
var response = giacenzaPvRESTConsumerService.closeVerifica(closeVerificaRequestDTO)
|
var response = giacenzaPvRESTConsumerService.closeVerifica(closeVerificaRequestDTO)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user