Aggiunta personalizzazione per IME.

Bugfix su ricerca per UL.
This commit is contained in:
2019-06-21 13:06:54 +02:00
parent 411092cf52
commit 8ae5c19820
26 changed files with 344 additions and 167 deletions

View File

@@ -83,7 +83,9 @@ android {
abortOnError false
}
dynamicFeatures = [":dynamic_vgalimenti"]
dynamicFeatures = [":dynamic__base",":dynamic_vgalimenti",":dynamic_ime"]
}
@@ -95,17 +97,17 @@ dependencies {
})
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.orhanobut:logger:2.2.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.google.firebase:firebase-perf:17.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
implementation 'com.google.firebase:firebase-perf:18.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5'
implementation 'com.google.android.material:material:1.1.0-alpha07'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha06'
implementation 'androidx.preference:preference:1.1.0-beta01'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

View File

@@ -0,0 +1,26 @@
package it.integry.integrywmsnative.core.class_router;
import java.util.HashMap;
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
import it.integry.integrywmsnative.core.utility.UtilityHashMap;
public class BaseCustomConfiguration implements ICustomConfiguration {
public static class Keys {
public static int FLAG_SHOW_COD_FORN_IN_SPEDIZIONE = 0;
}
protected HashMap<Integer, Object> configurations = new HashMap<Integer, Object>() {{
put(Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE, true);
}};
@Override
public <T> T getConfig(int key) {
return UtilityHashMap.getValue(configurations, key);
}
}

View File

@@ -2,6 +2,6 @@ package it.integry.integrywmsnative.core.class_router.interfaces;
public interface ICustomConfiguration {
boolean shoudShowCodFornInVendita();
<T>T getConfig(int key);
}

View File

@@ -0,0 +1,19 @@
package it.integry.integrywmsnative.core.utility;
import java.util.HashMap;
public class UtilityHashMap {
public static<T> T getValueIfExists(HashMap map, Object key){
T value = null;
if(map != null && map.containsKey(key)) value = (T) map.get(key);
return value;
}
public static<T> T getValue(HashMap map, Object key){
return (T) map.get(key);
}
}

View File

@@ -224,15 +224,15 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
@OnClick(R.id.fast_button_prod_versamento_materiale)
public void onClickProdVersamentoMateriale(View view) {
((MainActivity) getActivity()).setItem(R.id.nav_prod_versamento_materiale);
}
@OnClick(R.id.fast_button_prod_recupero_materiale)
public void onClickProdRecuperoMateriale(View view) {
((MainActivity) getActivity()).setItem(R.id.nav_prod_recupero_materiale);
}
// @OnClick(R.id.fast_button_prod_versamento_materiale)
// public void onClickProdVersamentoMateriale(View view) {
// ((MainActivity) getActivity()).setItem(R.id.nav_prod_versamento_materiale);
// }
//
// @OnClick(R.id.fast_button_prod_recupero_materiale)
// public void onClickProdRecuperoMateriale(View view) {
// ((MainActivity) getActivity()).setItem(R.id.nav_prod_recupero_materiale);
// }
@Override
public void setScrollToolbar(ElevatedToolbar toolbar) {

View File

@@ -94,7 +94,7 @@ public class VenditaHelper {
String joinedBarcodes = TextUtils.join(",", barcodeOrdini);
OrdiniVenditaRESTConsumerService service = RESTBuilder.getService(OrdiniVenditaRESTConsumerService.class, 60);
OrdiniVenditaRESTConsumerService service = RESTBuilder.getService(OrdiniVenditaRESTConsumerService.class, 90);
Trace perfTrace = UtilityFirebase.getNewPerformanceTrace("db_load_pick_v");
perfTrace.start();

View File

@@ -106,7 +106,7 @@ public class VenditaViewModel {
if(mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
if(mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO) {
if(mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) {
//GET BY COMMESSA COLLO
mHelper.getOrdiniInCommessaCollo(mtbColt, orderList -> {
@@ -176,7 +176,7 @@ public class VenditaViewModel {
private void showWrongGestioneUL() {
DialogSimpleMessageHelper.makeWarningDialog(mContext,
new SpannableString(Html.fromHtml(mContext.getResources().getText(R.string.gestione_V_not_accepted_message).toString())),
new SpannableString(Html.fromHtml(mContext.getResources().getText(R.string.gestione_A_L_only_accepted_message).toString())),
null, null).show();
}

View File

@@ -11,6 +11,7 @@ import java.util.ArrayList;
import java.util.List;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.class_router.BaseCustomConfiguration;
import it.integry.integrywmsnative.core.class_router.ClassRouter;
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
import it.integry.integrywmsnative.core.model.MtbColr;
@@ -44,9 +45,13 @@ public class VenditaOrdineInevasoHelper {
for(int i = 0; i < mPickingList.size(); i++) {
mPickingList.get(i).setDeactivated(mPickingList.get(i).getQtaCollo().floatValue() == 0);
mPickingList.get(i).setHidden(false);
mPickingList.get(i).setTempHidden(false);
if(mPickingList.get(i).isHidden() == null || forceHiddenCheck) {
PickingObjectDTO tmpItem = mPickingList.get(i);
tmpItem.setDeactivated(tmpItem.getQtaCollo().floatValue() == 0);
tmpItem.setHidden(false);
tmpItem.setTempHidden(false);
}
}
List<String> listOfKnownPositions = Stream.of(mPickingList)
@@ -122,7 +127,7 @@ public class VenditaOrdineInevasoHelper {
String badge1 = "";
if(customConfiguration.shoudShowCodFornInVendita()) {
if(customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE)) {
badge1 += !UtilityString.isNullOrEmpty(currentItem.getCodAlis()) ? (currentItem.getCodAlis() + " - ") : "";
badge1 += (!UtilityString.isNullOrEmpty(currentItem.getCodArtFor()) ? currentItem.getCodArtFor() : currentItem.getCodMart());
} else {

View File

@@ -429,172 +429,172 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/fast_button_resi_clienti"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/fast_button_versamento"
app:layout_constraintStart_toEndOf="@id/guide_1"
app:layout_constraintEnd_toEndOf="parent">
<!--<RelativeLayout-->
<!--android:id="@+id/fast_button_resi_clienti"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--app:layout_constraintTop_toBottomOf="@id/fast_button_versamento"-->
<!--app:layout_constraintStart_toEndOf="@id/guide_1"-->
<!--app:layout_constraintEnd_toEndOf="parent">-->
<com.google.android.material.card.MaterialCardView
style="@style/Widget.MaterialComponents.CardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="4dp">
<!--<com.google.android.material.card.MaterialCardView-->
<!--style="@style/Widget.MaterialComponents.CardView"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="8dp"-->
<!--app:cardBackgroundColor="@android:color/white"-->
<!--app:cardCornerRadius="4dp">-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="8dp">
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_horizontal"-->
<!--android:orientation="vertical"-->
<!--android:padding="8dp">-->
<ImageView
android:layout_width="64sp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/ic_latest_delivery" />
<!--<ImageView-->
<!--android:layout_width="64sp"-->
<!--android:layout_height="wrap_content"-->
<!--android:adjustViewBounds="true"-->
<!--android:src="@drawable/ic_latest_delivery" />-->
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:text="@string/fragment_ultime_consegne_cliente_title"
android:textAllCaps="true"
android:textColor="@color/gray_700"
android:textStyle="bold" />
<!--<androidx.appcompat.widget.AppCompatTextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="16dp"-->
<!--android:gravity="center_horizontal"-->
<!--android:text="@string/fragment_ultime_consegne_cliente_title"-->
<!--android:textAllCaps="true"-->
<!--android:textColor="@color/gray_700"-->
<!--android:textStyle="bold" />-->
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!--</LinearLayout>-->
<!--</com.google.android.material.card.MaterialCardView>-->
</RelativeLayout>
<!--</RelativeLayout>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp">
<!--<androidx.constraintlayout.widget.ConstraintLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:padding="8dp">-->
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guide_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5"/>
<!--<androidx.constraintlayout.widget.Guideline-->
<!--android:id="@+id/guide_2"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--app:layout_constraintGuide_percent="0.5"/>-->
<TextView
android:id="@+id/prod_dashboard_group_title"
style="@style/AppTheme.NewMaterial.Text.TextBoxGroupTitleDashboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:text="@string/production" />
<!--<TextView-->
<!--android:id="@+id/prod_dashboard_group_title"-->
<!--style="@style/AppTheme.NewMaterial.Text.TextBoxGroupTitleDashboard"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--app:layout_constraintTop_toTopOf="parent"-->
<!--android:text="@string/production" />-->
<RelativeLayout
android:id="@+id/fast_button_prod_versamento_materiale"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/prod_dashboard_group_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/guide_2">
<!--<RelativeLayout-->
<!--android:id="@+id/fast_button_prod_versamento_materiale"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--app:layout_constraintTop_toBottomOf="@id/prod_dashboard_group_title"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintEnd_toStartOf="@id/guide_2">-->
<com.google.android.material.card.MaterialCardView
style="@style/Widget.MaterialComponents.CardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="4dp">
<!--<com.google.android.material.card.MaterialCardView-->
<!--style="@style/Widget.MaterialComponents.CardView"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="8dp"-->
<!--app:cardBackgroundColor="@android:color/white"-->
<!--app:cardCornerRadius="4dp">-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="8dp">
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_horizontal"-->
<!--android:orientation="vertical"-->
<!--android:padding="8dp">-->
<ImageView
android:layout_width="64sp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/ic_dashboard_prod_versamento_materiale" />
<!--<ImageView-->
<!--android:layout_width="64sp"-->
<!--android:layout_height="wrap_content"-->
<!--android:adjustViewBounds="true"-->
<!--android:src="@drawable/ic_dashboard_prod_versamento_materiale" />-->
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:text="@string/prod_versamento_materiale_title_fragment"
android:textAllCaps="true"
android:textColor="@color/gray_700"
android:textStyle="bold" />
<!--<androidx.appcompat.widget.AppCompatTextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="16dp"-->
<!--android:gravity="center_horizontal"-->
<!--android:text="@string/prod_versamento_materiale_title_fragment"-->
<!--android:textAllCaps="true"-->
<!--android:textColor="@color/gray_700"-->
<!--android:textStyle="bold" />-->
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</RelativeLayout>
<!--</LinearLayout>-->
<!--</com.google.android.material.card.MaterialCardView>-->
<!--</RelativeLayout>-->
<RelativeLayout
android:id="@+id/fast_button_prod_recupero_materiale"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/prod_dashboard_group_title"
app:layout_constraintStart_toEndOf="@id/guide_2"
app:layout_constraintEnd_toEndOf="parent">
<!--<RelativeLayout-->
<!--android:id="@+id/fast_button_prod_recupero_materiale"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--app:layout_constraintTop_toBottomOf="@id/prod_dashboard_group_title"-->
<!--app:layout_constraintStart_toEndOf="@id/guide_2"-->
<!--app:layout_constraintEnd_toEndOf="parent">-->
<com.google.android.material.card.MaterialCardView
style="@style/Widget.MaterialComponents.CardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="4dp">
<!--<com.google.android.material.card.MaterialCardView-->
<!--style="@style/Widget.MaterialComponents.CardView"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="8dp"-->
<!--app:cardBackgroundColor="@android:color/white"-->
<!--app:cardCornerRadius="4dp">-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="8dp">
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_horizontal"-->
<!--android:orientation="vertical"-->
<!--android:padding="8dp">-->
<ImageView
android:layout_width="64sp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/ic_dashboard_prod_recupero_materiale" />
<!--<ImageView-->
<!--android:layout_width="64sp"-->
<!--android:layout_height="wrap_content"-->
<!--android:adjustViewBounds="true"-->
<!--android:src="@drawable/ic_dashboard_prod_recupero_materiale" />-->
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:text="@string/prod_recupero_materiale_title_fragment"
android:textAllCaps="true"
android:textColor="@color/gray_700"
android:textStyle="bold" />
<!--<androidx.appcompat.widget.AppCompatTextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="16dp"-->
<!--android:gravity="center_horizontal"-->
<!--android:text="@string/prod_recupero_materiale_title_fragment"-->
<!--android:textAllCaps="true"-->
<!--android:textColor="@color/gray_700"-->
<!--android:textStyle="bold" />-->
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!--</LinearLayout>-->
<!--</com.google.android.material.card.MaterialCardView>-->
</RelativeLayout>
<!--</RelativeLayout>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<!--</androidx.constraintlayout.widget.ConstraintLayout>-->

View File

@@ -172,6 +172,7 @@
<string name="no_items_found_message">Nessun articolo trovato</string>
<string name="no_lu_found_message">Nessuna UL trovata</string>
<string name="no_orders_found_message">Non sono stati trovati ordini</string>
<string name="gestione_A_L_only_accepted_message">Sono ammesse solo UL di <b>Acquisto</b> o <b>Lavorazione</b> qui</string>
<string name="gestione_A_V_not_accepted_message"><![CDATA[Le UL di tipo <b>Acquisto</b> o <b>Vendita</b> non sono ammesse qui]]></string>
<string name="gestione_V_not_accepted_message"><![CDATA[Le UL di tipo <b>Vendita</b> non sono ammesse qui]]></string>
<string name="too_much_lu_found_message">E\' stata trovata più di una UL</string>

View File

@@ -178,6 +178,7 @@
<string name="no_items_found_message">No items found</string>
<string name="no_lu_found_message">No LU found</string>
<string name="no_orders_found_message">No orders found</string>
<string name="gestione_A_L_only_accepted_message">Only <b>Purchase</b> or <b>Production\'s</b> LU are accepted here</string>
<string name="gestione_A_V_not_accepted_message">The LU of type Purchase or Sale is not accepted here</string>
<string name="gestione_V_not_accepted_message">The LU of type Sale is not accepted here</string>
<string name="too_much_lu_found_message">Multiple LU found</string>
@@ -225,6 +226,7 @@
<string name="select_a_recipient_message">Please, select a <b>recipient</b> before proceeding</string>
<string name="not_valid_customer_error">Invalid customer</string>
<string name="not_valid_recipient_error">Invalid recipient</string>
<string name="title_dynamic_ime">Module Title</string>
</resources>