Vario
This commit is contained in:
parent
42ea19a7b0
commit
82dc4e73ee
@ -49,6 +49,9 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
ext.enableCrashlytics = false
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
@ -101,45 +104,35 @@ dependencies {
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0-beta01'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
|
||||
implementation 'com.annimon:stream:1.2.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
|
||||
implementation 'org.apache.commons:commons-text:1.6'
|
||||
implementation 'org.apache.commons:commons-text:1.8'
|
||||
//kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||
|
||||
//MVVM
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.2.0'
|
||||
implementation 'br.com.zbra:android-linq:1.1.0'
|
||||
//FAB
|
||||
implementation 'com.github.clans:fab:1.6.4'
|
||||
//CUSTOM VIEWS
|
||||
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
|
||||
implementation 'de.hdodenhof:circleimageview:3.0.1'
|
||||
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
|
||||
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
|
||||
implementation 'com.github.andrefrsousa:SuperBottomSheet:1.2.1@aar'
|
||||
implementation 'com.fede987:status-bar-alert:1.0.1'
|
||||
implementation 'com.fxn769:stash:1.2'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
||||
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
implementation 'com.github.zhukic:sectioned-recyclerview:1.2.3'
|
||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
|
||||
//SQLite ROOM
|
||||
def room_version = "2.2.3"
|
||||
@ -153,9 +146,11 @@ dependencies {
|
||||
//Barcode
|
||||
implementation project(':pointmobilescannerlibrary')
|
||||
implementation project(':zebrascannerlibrary')
|
||||
implementation project(path: ':barcode_base_android_library')
|
||||
implementation project(path: ':honeywellscannerlibrary')
|
||||
implementation project(':barcode_base_android_library')
|
||||
implementation project(':honeywellscannerlibrary')
|
||||
implementation project(':keyobardemulatorscannerlibrary')
|
||||
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.1'
|
||||
androidTestImplementation 'org.testng:testng:6.9.6'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class SpedizioneViewModelTest {
|
||||
|
||||
@org.junit.jupiter.api.Test
|
||||
void createNewLU() {
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="it.integry.integrywmsnative">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
@ -17,6 +18,7 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:replace="android:debuggable"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity android:name=".gest.spedizione_new.SpedizioneActivity"></activity>
|
||||
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity" />
|
||||
|
||||
@ -3,32 +3,27 @@ package it.integry.integrywmsnative.core.expansion;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
public interface OnListGeneralChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
public abstract class OnListGeneralChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
|
||||
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList sender, int positionStart, int itemCount) {
|
||||
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) {
|
||||
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList sender, int fromPosition, int toPosition, int itemCount) {
|
||||
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList sender, int positionStart, int itemCount) {
|
||||
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -29,8 +29,6 @@ import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
import static br.com.zbra.androidlinq.Linq.stream;
|
||||
|
||||
public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
@ -16,8 +18,6 @@ import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
import static br.com.zbra.androidlinq.Linq.stream;
|
||||
|
||||
public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
public enum Type {
|
||||
@ -51,7 +51,7 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
||||
analyzeAnswer(response, "GetAvailablePrinters", new ISimpleOperationCallback<List<String>>() {
|
||||
@Override
|
||||
public void onSuccess(List<String> value) {
|
||||
callback.onSuccess(value != null ? stream(value).where(x -> x != null).toList() : null);
|
||||
callback.onSuccess(value != null ? Stream.of(value).withoutNulls().toList() : null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -16,13 +16,13 @@ public class UtilityExceptions {
|
||||
|
||||
|
||||
public static void defaultException(Context context, Exception ex, Dialog progressDialog){
|
||||
progressDialog.dismiss();
|
||||
defaultException(context, ex);
|
||||
if(progressDialog != null) progressDialog.dismiss();
|
||||
}
|
||||
|
||||
public static void defaultException(Context context, Exception ex, Dialog progressDialog, boolean sendMail){
|
||||
progressDialog.dismiss();
|
||||
defaultException(context, ex, sendMail);
|
||||
if(progressDialog != null) progressDialog.dismiss();
|
||||
}
|
||||
public static void defaultException(Context context, Exception ex){
|
||||
defaultException(context, ex, false);
|
||||
|
||||
@ -57,8 +57,6 @@ import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuanti
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
|
||||
import static br.com.zbra.androidlinq.Linq.stream;
|
||||
|
||||
public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloClosedCallback, IOnOrdineAccettazioneRowDispatchCallback {
|
||||
|
||||
public ObservableField<Boolean> isFabVisible = new ObservableField<>();
|
||||
@ -463,8 +461,8 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
||||
}
|
||||
|
||||
List<String> codAnags =
|
||||
stream(mOrders)
|
||||
.select(OrdineAccettazioneDTO::getCodAnag)
|
||||
Stream.of(mOrders)
|
||||
.map(OrdineAccettazioneDTO::getCodAnag)
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
@ -473,8 +471,8 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
||||
}
|
||||
|
||||
List<String> rifOrds =
|
||||
stream(mOrders)
|
||||
.select(OrdineAccettazioneDTO::getRifOrd)
|
||||
Stream.of(mOrders)
|
||||
.map(OrdineAccettazioneDTO::getRifOrd)
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
@ -483,8 +481,8 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
||||
}
|
||||
|
||||
List<String> numDataOrds =
|
||||
stream(mOrders)
|
||||
.select(value -> ("" + value.getNumero()) + value.getData())
|
||||
Stream.of(mOrders)
|
||||
.map(value -> ("" + value.getNumero()) + value.getData())
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ import it.integry.integrywmsnative.core.settings.SharedPrefKeys;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityArray;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
|
||||
import static br.com.zbra.androidlinq.Linq.stream;
|
||||
|
||||
public class SettingsPreferenceFragment extends PreferenceFragmentCompat implements ITitledFragment {
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle bundle, String s) {
|
||||
|
||||
@ -489,11 +489,6 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mActivity, new SpannableString("Nessuna posizione trovata con il barcode scansionato"), null, BarcodeManager::enable).show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,78 +3,256 @@ package it.integry.integrywmsnative.gest.spedizione_new;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.tfb.fbtoast.FBToast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeType;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
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.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.ActivitySpedizioneBinding;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.core.SpedizioneListAdapter;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.core.SpedizioneListModel;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
|
||||
public class SpedizioneActivity extends AppCompatActivity {
|
||||
public class SpedizioneActivity extends AppCompatActivity implements SpedizioneViewModel.Listeners {
|
||||
|
||||
private ActivitySpedizioneBinding mBindings;
|
||||
|
||||
private SpedizioneViewModel mViewmodel;
|
||||
|
||||
private ObservableArrayList<List<SpedizioneListModel>> mSpedizioneMutableData = new ObservableArrayList();
|
||||
private ObservableArrayList<SpedizioneListModel> mSpedizioneMutableData = new ObservableArrayList();
|
||||
|
||||
|
||||
public BindableBoolean addExtraItemsEnabled = new BindableBoolean(false);
|
||||
public BindableBoolean noItemsToPick = new BindableBoolean(false);
|
||||
public BindableBoolean noLUPresent = new BindableBoolean(true);
|
||||
|
||||
|
||||
private boolean mFlashShowCodForn;
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private Integer mMtbColtSessionID;
|
||||
|
||||
private ArrayList<PickingObjectDTO> mPickingList;
|
||||
private ArrayList<OrdineVenditaInevasoDTO> mTestateOrdini;
|
||||
private ArrayList<MtbColt> mColliRegistrati;
|
||||
|
||||
private Dialog mCurrentProgress;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
ArrayList<PickingObjectDTO> pickingList = DataCache.retrieveItem(getIntent().getStringExtra("keyPickingList"));
|
||||
ArrayList<OrdineVenditaInevasoDTO> testateOrdini = DataCache.retrieveItem(getIntent().getStringExtra("keyTestateOrdini"));
|
||||
ArrayList<MtbColt> colliRegistrati = DataCache.retrieveItem(getIntent().getStringExtra("keyColliRegistrati"));
|
||||
mPickingList = DataCache.retrieveItem(getIntent().getStringExtra("keyPickingList"));
|
||||
mTestateOrdini = DataCache.retrieveItem(getIntent().getStringExtra("keyTestateOrdini"));
|
||||
mColliRegistrati = DataCache.retrieveItem(getIntent().getStringExtra("keyColliRegistrati"));
|
||||
|
||||
mBindings = DataBindingUtil.setContentView(this, R.layout.activity_spedizione);
|
||||
mViewmodel = new ViewModelProvider(this).get(SpedizioneViewModel.class);
|
||||
mViewmodel.addListeners(this);
|
||||
|
||||
setSupportActionBar(mBindings.toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
ICustomConfiguration customConfiguration = ClassRouter.getInstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
||||
mFlashShowCodForn = customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE);
|
||||
|
||||
mBindings = DataBindingUtil.setContentView(this, R.layout.activity_spedizione);
|
||||
mViewmodel = new ViewModelProvider(this).get(SpedizioneViewModel.class);
|
||||
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setSpedizioneViewModel(mViewmodel);
|
||||
mBindings.setSpedizioneView(this);
|
||||
|
||||
this.initBarcodeReader();
|
||||
this.initRecyclerView();
|
||||
|
||||
mViewmodel.setDataset(pickingList);
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
mViewmodel.setDataset(codMdep, mPickingList, mTestateOrdini);
|
||||
}
|
||||
|
||||
private void initBarcodeReader() {
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(onScanSuccessful)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(this, ex, false)));
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
this.mViewmodel.uiModel.observe(this, updatedData -> {
|
||||
this.mSpedizioneMutableData.postValue(convertDataModelToListModel(updatedData));
|
||||
this.mViewmodel.getmPickingList().observe(this, updatedData -> {
|
||||
this.mSpedizioneMutableData.clear();
|
||||
this.mSpedizioneMutableData.addAll(convertDataModelToListModel(updatedData));
|
||||
this.noItemsToPick.set(!isThereAnyItemToPick(updatedData));
|
||||
});
|
||||
|
||||
SpedizioneListAdapter spedizioneListAdapter = new SpedizioneListAdapter(this, mSpedizioneMutableData);
|
||||
this.mBindings.spedizionePickingList.setAdapter(spedizioneListAdapter);
|
||||
|
||||
this.mBindings.spedizionePickingList.setLayoutManager(new LinearLayoutManager(this));
|
||||
}
|
||||
|
||||
|
||||
private List<SpedizioneListModel> convertDataModelToListModel(List<PickingObjectDTO> dataList) {
|
||||
List<SpedizioneListModel> listToReturn = new ArrayList<>();
|
||||
|
||||
List<PickingObjectDTO> tmpList = Stream.of(dataList)
|
||||
.filter(x -> (x.isHidden() == null || !x.isHidden()) && (x.isTempHidden() == null || !x.isTempHidden()))
|
||||
.toList();
|
||||
|
||||
|
||||
List<PickingObjectDTO> sortedList = Stream.of(tmpList)
|
||||
.filter(x -> !x.isDeactivated() && !UtilityString.isNullOrEmpty(x.getPosizione()))
|
||||
.sortBy(PickingObjectDTO::getPosizione)
|
||||
.toList();
|
||||
|
||||
return listToReturn;
|
||||
sortedList.addAll(
|
||||
Stream.of(tmpList)
|
||||
.filter(x -> !x.isDeactivated() && UtilityString.isNullOrEmpty(x.getPosizione()))
|
||||
.toList()
|
||||
);
|
||||
|
||||
sortedList.addAll(
|
||||
Stream.of(tmpList)
|
||||
.filter(PickingObjectDTO::isDeactivated)
|
||||
.toList()
|
||||
);
|
||||
|
||||
|
||||
return Stream.of(sortedList)
|
||||
.map(x -> {
|
||||
SpedizioneListModel spedizioneListModel = new SpedizioneListModel();
|
||||
|
||||
if (x.isDeactivated()) {
|
||||
spedizioneListModel.setGroupTitle(getString(R.string.picking_not_available));
|
||||
} else {
|
||||
spedizioneListModel.setGroupTitle(String.format("%s: %s", getString(R.string.position_text), UtilityString.isNullOrEmpty(x.getPosizione()) ? "N.A." : x.getPosizione()));
|
||||
}
|
||||
|
||||
spedizioneListModel.setActive(!x.isDeactivated());
|
||||
|
||||
String badge1 = "";
|
||||
if (mFlashShowCodForn) {
|
||||
badge1 += !UtilityString.isNullOrEmpty(x.getCodAlis()) ? (x.getCodAlis() + " - ") : "";
|
||||
badge1 += (!UtilityString.isNullOrEmpty(x.getCodArtFor()) ? x.getCodArtFor() : x.getCodMart());
|
||||
} else {
|
||||
badge1 += x.getCodMart();
|
||||
}
|
||||
|
||||
spedizioneListModel.setBadge1(badge1);
|
||||
spedizioneListModel.setBadge2(x.getCodJcom());
|
||||
|
||||
if (UtilityString.isNullOrEmpty(x.getDescrizioneEstesa())) {
|
||||
spedizioneListModel.setDescrizione(getString(R.string.no_description));
|
||||
spedizioneListModel.setDescrizionePresente(false);
|
||||
} else {
|
||||
spedizioneListModel.setDescrizione(x.getDescrizioneEstesa());
|
||||
spedizioneListModel.setDescrizionePresente(true);
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(x.getPartitaMag())) {
|
||||
spedizioneListModel.setSubDescrizione1(String.format(getString(R.string.batch_lot_text), x.getPartitaMag()));
|
||||
}
|
||||
|
||||
if (x.getNumCollo() != null) {
|
||||
spedizioneListModel.setSubDescrizione2(String.format(getString(R.string.lu_number_data_text), x.getNumCollo(), x.getDataColloHuman()));
|
||||
}
|
||||
|
||||
if (SettingsManager.iDB().isFlagForceAllToColli() || (x.getMtbAart() == null || !x.getMtbAart().isFlagQtaCnfFissa())) {
|
||||
spedizioneListModel.setUntMis("col");
|
||||
spedizioneListModel.setQtaTot(x.getNumCollo() != null ? x.getNumCnfCollo() : x.getNumCnfOrd());
|
||||
} else {
|
||||
spedizioneListModel.setQtaTot(x.getNumCollo() != null ? x.getQtaCollo() : x.getQtaOrd());
|
||||
if (x.getMtbAart() != null)
|
||||
spedizioneListModel.setUntMis(x.getMtbAart().getUntMis());
|
||||
}
|
||||
|
||||
return spedizioneListModel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private boolean isThereAnyItemToPick(List<PickingObjectDTO> dataList) {
|
||||
return Stream.of(dataList)
|
||||
.anyMatch(x -> !x.isDeactivated() && !x.isHidden() && !x.isTempHidden());
|
||||
}
|
||||
|
||||
private RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
mCurrentProgress = UtilityProgress.createDefaultProgressDialog(this);
|
||||
|
||||
this.mViewmodel.processBarcodeDTO(data, () -> {
|
||||
BarcodeManager.enable();
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
public void startManualSearch() {
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il codice a barre", codice -> {
|
||||
|
||||
this.onScanSuccessful.run(new BarcodeScanDTO().setStringValue(codice).setType(BarcodeType.CODE128));
|
||||
BarcodeManager.enable();
|
||||
|
||||
}, BarcodeManager::enable).show();
|
||||
}
|
||||
|
||||
public void removeListFilter() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void createNewUL() {
|
||||
mCurrentProgress = UtilityProgress.createDefaultProgressDialog(this);
|
||||
|
||||
this.mViewmodel.createNewLU(null, null, () -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
public void showCreatedUL() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLUCreated(MtbColt mtbColt) {
|
||||
noLUPresent.set(false);
|
||||
|
||||
mMtbColtSessionID = ColliDataRecover.startNewSession(mtbColt, mTestateOrdini);
|
||||
|
||||
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUClosed() {
|
||||
noLUPresent.set(true);
|
||||
|
||||
if(mMtbColtSessionID != null) ColliDataRecover.closeSession(mMtbColtSessionID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,48 +1,618 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.FiltroOrdineDTO;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.CurrentMonoLUPositionIsNotCorrectException;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.NoOrdersSelectedException;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.NotCurrentYearLUException;
|
||||
import it.integry.integrywmsnative.gest.spedizione_new.exceptions.ScannedPositionNotExistException;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||
|
||||
public class SpedizioneViewModel extends ViewModel {
|
||||
|
||||
public BindableBoolean addExtraItemsEnabled = new BindableBoolean(false);
|
||||
public BindableBoolean anyItemToPick = new BindableBoolean(false);
|
||||
public BindableBoolean anyLUOpened = new BindableBoolean(false);
|
||||
private List<OrdineVenditaInevasoDTO> mTestateOrdini;
|
||||
private MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
||||
|
||||
public MutableLiveData<List<PickingObjectDTO>> uiModel = new MutableLiveData<>();
|
||||
private List<Listeners> mListeners = new ArrayList<>();
|
||||
|
||||
private GestioneEnum mDefaultGestioneOfUL = null;
|
||||
private String mDefaultCodMdep = null;
|
||||
private List<FiltroOrdineDTO> mDefaultFiltroOrdine = new ArrayList<>();
|
||||
private String mDefaultCodAnagOfUL = null;
|
||||
private String mDefaultRagSocOfUL = null;
|
||||
private String mDefaultRifOrdOfUL = null;
|
||||
private Integer mDefaultNumOrdOfUL = null;
|
||||
private Date mDefaultDataOrdOfUL = null;
|
||||
private String mDefaultCodJFasOfUL = null;
|
||||
|
||||
public SpedizioneViewModel() {
|
||||
Log.d("Test", "Test");
|
||||
}
|
||||
private MtbColt mCurrentMtbColt = null;
|
||||
|
||||
public void setDataset(List<PickingObjectDTO> dataset) {
|
||||
this.uiModel.postValue(dataset);
|
||||
public void setDataset(String codMdep, List<PickingObjectDTO> pickingList, List<OrdineVenditaInevasoDTO> testateOrdini) {
|
||||
this.mDefaultCodMdep = codMdep;
|
||||
this.mPickingList.postValue(pickingList);
|
||||
this.mTestateOrdini = testateOrdini;
|
||||
|
||||
this.initDefaultVars();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void startManualSearch() {
|
||||
private void initDefaultVars() {
|
||||
if (this.mTestateOrdini == null || this.mTestateOrdini.size() == 0) {
|
||||
sendError(new NoOrdersSelectedException());
|
||||
return;
|
||||
}
|
||||
|
||||
public void removeListFilter() {
|
||||
//Definizione della gestione collo di default
|
||||
List<GestioneEnum> foundGestioni = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getGestioneEnum)
|
||||
.withoutNulls()
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
if (foundGestioni != null && foundGestioni.size() > 1) {
|
||||
return;
|
||||
} else if (foundGestioni != null && foundGestioni.size() == 1) {
|
||||
mDefaultGestioneOfUL = foundGestioni.get(0);
|
||||
} else {
|
||||
mDefaultGestioneOfUL = GestioneEnum.VENDITA;
|
||||
}
|
||||
|
||||
//Definizione del filtro ordine da applicare a tutti i colli generati
|
||||
Stream.of(mTestateOrdini).forEach(x -> {
|
||||
FiltroOrdineDTO filtro = new FiltroOrdineDTO()
|
||||
.setDataOrd(x.getDataOrdD())
|
||||
.setNumOrd(x.getNumOrd())
|
||||
.setGestioneOrd(x.getGestione())
|
||||
.setDataCons(x.getDataConsD());
|
||||
|
||||
if (!mDefaultFiltroOrdine.contains(filtro)) mDefaultFiltroOrdine.add(filtro);
|
||||
});
|
||||
|
||||
|
||||
//Definizione del codAnag
|
||||
List<String> foundCodAnag = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getCodAnagOrd)
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundCodAnag != null && foundCodAnag.size() == 1) {
|
||||
mDefaultCodAnagOfUL = foundCodAnag.get(0);
|
||||
}
|
||||
|
||||
|
||||
//Definizione del codAnag
|
||||
List<String> foundRagSoc = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getRagSocOrd)
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundRagSoc != null && foundRagSoc.size() == 1) {
|
||||
mDefaultRagSocOfUL = foundRagSoc.get(0);
|
||||
}
|
||||
|
||||
|
||||
//Definizione del rifOrd
|
||||
List<String> foundRifOrd = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getRifOrd)
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundRifOrd != null && foundRifOrd.size() == 1) {
|
||||
mDefaultRifOrdOfUL = foundRifOrd.get(0);
|
||||
}
|
||||
|
||||
|
||||
//Definizione del numOrd
|
||||
List<Integer> foundNumOrd = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getNumOrd)
|
||||
.withoutNulls()
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundNumOrd != null && foundNumOrd.size() == 1) {
|
||||
mDefaultNumOrdOfUL = foundNumOrd.get(0);
|
||||
}
|
||||
|
||||
|
||||
//Definizione del dataOrd
|
||||
List<Date> foundDataOrd = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getDataOrdD)
|
||||
.withoutNulls()
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundDataOrd != null && foundDataOrd.size() == 1) {
|
||||
mDefaultDataOrdOfUL = foundDataOrd.get(0);
|
||||
}
|
||||
|
||||
|
||||
//Definizione del codJfas
|
||||
List<String> foundCodJfas = Stream.of(mTestateOrdini)
|
||||
.map(OrdineVenditaInevasoDTO::getCodJfas)
|
||||
.distinctBy(x -> x)
|
||||
.toList();
|
||||
|
||||
if (foundCodJfas != null && foundCodJfas.size() == 1) {
|
||||
mDefaultCodJFasOfUL = foundCodJfas.get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void createNewUL() {
|
||||
private void sendError(Exception ex) {
|
||||
for (Listeners listener : mListeners) listener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendLUCreated(MtbColt mtbColt) {
|
||||
for (Listeners listener : mListeners) listener.onLUCreated(mtbColt);
|
||||
}
|
||||
|
||||
private void sendLUClosed() {
|
||||
for (Listeners listener : mListeners) listener.onLUClosed();
|
||||
}
|
||||
|
||||
private void sendFilterChanged(String newValue) {
|
||||
for (Listeners listener : mListeners) listener.onFilterChanged(newValue);
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
|
||||
//Se non c'è una UL aperta
|
||||
if (mCurrentMtbColt != null) {
|
||||
|
||||
//Se è un'etichetta anonima
|
||||
if (UtilityBarcode.isEtichettaAnonima(barcodeScanDTO)) {
|
||||
//Se il collo non esiste allora lo creo associandolo a questa etichetta anonima
|
||||
//invece se esiste apro un collo nuovo e cerco gli articoli presenti nell'ul
|
||||
//dell'etichetta anonima
|
||||
this.executeEtichettaAnonimaNotOpenedLU(barcodeScanDTO, onComplete);
|
||||
} else {
|
||||
this.processBarcodeAlreadyOpenedLU(barcodeScanDTO, onComplete);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (UtilityBarcode.isEtichettaAnonima(barcodeScanDTO)) {
|
||||
//Cerco gli articoli presenti nell'ul dell'etichetta anonima
|
||||
this.executeEtichettaLU(barcodeScanDTO.getStringValue(), onComplete);
|
||||
|
||||
} else {
|
||||
this.processBarcodeAlreadyOpenedLU(barcodeScanDTO, onComplete);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processBarcodeAlreadyOpenedLU(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
|
||||
if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
|
||||
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||
|
||||
|
||||
} else if (UtilityBarcode.isEtichettaPosizione(barcodeScanDTO)) {
|
||||
//Cerco l'UL presente all'interno della posizione
|
||||
this.executeEtichettaPosizione(barcodeScanDTO.getStringValue(), onComplete);
|
||||
|
||||
|
||||
} else {
|
||||
this.loadArticolo(barcodeScanDTO.getStringValue(), null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaAnonimaNotOpenedLU(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
ColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), true, false, mtbColt -> {
|
||||
|
||||
if (mtbColt == null) {
|
||||
|
||||
if (!UtilityBarcode.isEtichettaAnonimaOfCurrentYear(barcodeScanDTO.getStringValue())) {
|
||||
this.sendError(new NotCurrentYearLUException());
|
||||
} else {
|
||||
|
||||
this.createNewLU(
|
||||
UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue()),
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, onComplete);
|
||||
}
|
||||
} else {
|
||||
|
||||
this.createNewLU(
|
||||
null,
|
||||
null,
|
||||
() -> searchArtFromUL(mtbColt, onComplete)
|
||||
);
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void executeEtichettaPosizione(String posizione, Runnable onComplete) {
|
||||
MtbDepoPosizione foundPosizione = UtilityPosizione.getFromCache(posizione);
|
||||
|
||||
if (foundPosizione != null) {
|
||||
if (foundPosizione.isFlagMonoCollo()) {
|
||||
|
||||
PosizioniRESTConsumer.getBancaliInPosizione(foundPosizione, mtbColtList -> {
|
||||
|
||||
if (mtbColtList == null || mtbColtList.size() != 1) {
|
||||
//Nessuna UL trovata oppure più UL nella stessa posizione
|
||||
this.sendError(new NoLUFoundException());
|
||||
|
||||
} else {
|
||||
ColliMagazzinoRESTConsumer.getByTestata(mtbColtList.get(0), true, false, mtbColt -> {
|
||||
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||
searchArtFromUL(mtbColt, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
} else {
|
||||
//La posizione non è Mono-UL
|
||||
this.sendError(new CurrentMonoLUPositionIsNotCorrectException());
|
||||
}
|
||||
|
||||
} else {
|
||||
//Nessuna posizione trovata con questo barcode
|
||||
this.sendError(new ScannedPositionNotExistException());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaLU(String SSCC, Runnable onComplete) {
|
||||
ColliMagazzinoRESTConsumer.getBySSCC(SSCC, true, false, mtbColt -> {
|
||||
|
||||
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||
searchArtFromUL(mtbColt, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
BarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||
|
||||
String barcodeProd = null;
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||
barcodeProd = ean128Model.Content;
|
||||
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
this.executeEtichettaLU(ean128Model.Sscc, onComplete);
|
||||
} else {
|
||||
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
|
||||
this.loadArticolo(barcodeProd, PickingObjectDTO.PickData.fromEan128(ean128Model), onComplete);
|
||||
|
||||
}
|
||||
|
||||
public void showCreatedUL() {
|
||||
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
onComplete.run();
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaEanPeso(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
|
||||
try {
|
||||
Ean13PesoModel ean13PesoModel = Ean13PesoModel.fromBarcode(barcodeScanDTO.getStringValue());
|
||||
|
||||
this.loadArticolo(ean13PesoModel.getPrecode(), PickingObjectDTO.PickData.fromEan128(ean13PesoModel.toEan128()), onComplete);
|
||||
} catch (Exception ex) {
|
||||
this.sendError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadArticolo(String barcodeProd, PickingObjectDTO.PickData pickData, Runnable onComplete) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
ArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
this.searchArtFromAnag(mtbAartList.get(0), pickData, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException());
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void searchArtFromUL(MtbColt scannedUL, Runnable onComplete) {
|
||||
|
||||
final List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
|
||||
List<PickingObjectDTO> matchPickingObject = Stream.of(pickingList)
|
||||
.filter(x -> Objects.equals(x.getNumCollo(), scannedUL.getNumCollo()) &&
|
||||
x.getDataColloS().equals(scannedUL.getDataColloS()) &&
|
||||
x.getSerCollo().equalsIgnoreCase(scannedUL.getSerCollo()) &&
|
||||
(scannedUL.getGestioneEnum() == GestioneEnum.ACQUISTO || scannedUL.getGestioneEnum() == GestioneEnum.LAVORAZIONE)).toList();
|
||||
|
||||
List<String> alreadyMatchedArts = Stream.of(matchPickingObject)
|
||||
.map(PickingObjectDTO::getCodMart).toList();
|
||||
|
||||
//Cerco se devo fare pick dell'articolo tramite codMart perché forse non risulta in nessun collo
|
||||
//if(matchPickingObject != null && matchPickingObject.size() == 0 && scannedUL.getItem() != null && scannedUL.getItem().size() > 0) {
|
||||
List<String> listOfCodMartsInRowCollo = Stream.of(scannedUL.getMtbColr())
|
||||
.map(MtbColr::getCodMart)
|
||||
.withoutNulls()
|
||||
.toList();
|
||||
|
||||
|
||||
|
||||
List<PickingObjectDTO> matchPickingObjectByArt = Stream.of(pickingList)
|
||||
.filter(x -> //x.getNumCollo() == null &&
|
||||
(listOfCodMartsInRowCollo.contains(x.getCodMart()) && !alreadyMatchedArts.contains(x.getCodMart())))
|
||||
.toList();
|
||||
|
||||
|
||||
if(SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV()) {
|
||||
for (int i = 0; i < matchPickingObjectByArt.size(); i++) {
|
||||
PickingObjectDTO tmpPickObj = matchPickingObjectByArt.get(i);
|
||||
|
||||
|
||||
|
||||
List<MtbColr> matchWithPartitaMag = Stream.of(scannedUL.getMtbColr())
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(tmpPickObj.getCodMart()) &&
|
||||
Objects.equals(x.getPartitaMag(), tmpPickObj.getPartitaMag())).toList();
|
||||
|
||||
boolean anyMatch = matchWithPartitaMag.size() > 0;
|
||||
|
||||
if(!anyMatch) {
|
||||
matchPickingObjectByArt.remove(i);
|
||||
i--;
|
||||
} else {
|
||||
|
||||
for(int k = 0; k < matchWithPartitaMag.size(); k++) {
|
||||
|
||||
|
||||
MtbColr matchRow = matchWithPartitaMag.get(k);
|
||||
|
||||
PickingObjectDTO.PickData pickData = new PickingObjectDTO.PickData()
|
||||
.setMtbPartitaMag(matchRow.getRifPartitaMag())
|
||||
.setNumCnf(matchRow.getNumCnf())
|
||||
.setQtaCnf(matchRow.getQtaCnf())
|
||||
.setQtaTot(matchRow.getQtaCol())
|
||||
.setSourceMtbColt(scannedUL);
|
||||
|
||||
tmpPickObj.setTempPickData(pickData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
for (int i = 0; i < matchPickingObjectByArt.size(); i++) {
|
||||
|
||||
PickingObjectDTO tmpPickObj = matchPickingObjectByArt.get(i);
|
||||
List<MtbColr> matchWithColloRow = Stream.of(scannedUL.getMtbColr())
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(tmpPickObj.getCodMart())).toList();
|
||||
|
||||
for(int k = 0; k < matchWithColloRow.size(); k++) {
|
||||
|
||||
|
||||
MtbColr matchRow = matchWithColloRow.get(k);
|
||||
PickingObjectDTO.PickData pickData = new PickingObjectDTO.PickData()
|
||||
.setMtbPartitaMag(matchRow.getRifPartitaMag())
|
||||
.setNumCnf(matchRow.getNumCnf())
|
||||
.setQtaCnf(matchRow.getQtaCnf())
|
||||
.setQtaTot(matchRow.getQtaCol())
|
||||
.setSourceMtbColt(scannedUL);
|
||||
|
||||
tmpPickObj.setTempPickData(pickData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//}
|
||||
matchPickingObject.addAll(matchPickingObjectByArt);
|
||||
|
||||
this.loadMatchedRows(matchPickingObject);
|
||||
|
||||
onComplete.run();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void searchArtFromAnag(MtbAart mtbAart, PickingObjectDTO.PickData pickData, Runnable onComplete) {
|
||||
|
||||
final List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
|
||||
List<PickingObjectDTO> matchPickingObject = Stream.of(pickingList)
|
||||
.filter(x -> x.getNumCollo() == null &&
|
||||
(mtbAart.getCodMart().equalsIgnoreCase(x.getCodMart())))
|
||||
.toList();
|
||||
|
||||
|
||||
if (SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV()) {
|
||||
matchPickingObject = Stream.of(matchPickingObject)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbAart.getCodMart()) &&
|
||||
(pickData != null && pickData.getMtbPartitaMag() != null && Objects.equals(x.getPartitaMag(), pickData.getMtbPartitaMag().getPartitaMag()))).toList();
|
||||
|
||||
}
|
||||
|
||||
if (matchPickingObject.size() == 1) {
|
||||
matchPickingObject.get(0).setTempPickData(pickData);
|
||||
}
|
||||
|
||||
this.loadMatchedRows(matchPickingObject);
|
||||
|
||||
onComplete.run();
|
||||
}
|
||||
|
||||
|
||||
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
||||
if(matchedRows == null || matchedRows.size() == 0) {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
} else {
|
||||
List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
|
||||
for(int i = 0; i < pickingList.size(); i++) {
|
||||
if(!matchedRows.contains(pickingList.get(i))) {
|
||||
pickingList.get(i).setTempHidden(true);
|
||||
}
|
||||
}
|
||||
|
||||
if(matchedRows.size() == 1 ) {
|
||||
|
||||
if (matchedRows.get(0).getTempPickData() != null &&
|
||||
matchedRows.get(0).getTempPickData().getSourceMtbColt() != null ) {
|
||||
|
||||
// MtbColt tempSourceMtbColt = matchedRows.get(0).getTempPickData().getSourceMtbColt();
|
||||
|
||||
// if (tempSourceMtbColt.getGestione().equals(matchedRows.get(0).getGestione()) &&
|
||||
// tempSourceMtbColt.getNumCollo() == matchedRows.get(0).getNumCollo() &&
|
||||
// tempSourceMtbColt.getSerCollo().equals(matchedRows.get(0).getSerCollo()) &&
|
||||
// tempSourceMtbColt.getDataColloS().equals(matchedRows.get(0).getDataColloS())) {
|
||||
|
||||
dispatchOrdineRow(matchedRows.get(0));
|
||||
// } else {
|
||||
// //Se sto pickando da una UL diversa da quella suggerita allora non te la apro in
|
||||
// //automatico ma ti mostro il filtro
|
||||
// applyFilter("");
|
||||
// refreshOrderBy(false);
|
||||
// }
|
||||
|
||||
} else if(matchedRows.get(0).isDeactivated()) {
|
||||
this.sendFilterChanged("");
|
||||
// applyFilter("");
|
||||
// refreshOrderBy(false);
|
||||
} else {
|
||||
dispatchOrdineRow(matchedRows.get(0));
|
||||
}
|
||||
} else {
|
||||
this.sendFilterChanged("");
|
||||
// applyFilter("");
|
||||
// refreshOrderBy(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
||||
MtbColt mtbColt = new MtbColt();
|
||||
mtbColt.initDefaultFields();
|
||||
mtbColt.setGestione(mDefaultGestioneOfUL)
|
||||
.setSegno(-1)
|
||||
.setRifOrd(mDefaultRifOrdOfUL)
|
||||
.setNumOrd(mDefaultNumOrdOfUL)
|
||||
.setDataOrdD(mDefaultDataOrdOfUL)
|
||||
.setCodAnag(mDefaultCodAnagOfUL)
|
||||
.setCodMdep(mDefaultCodMdep)
|
||||
.setRagSocCliente(mDefaultRagSocOfUL)
|
||||
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
|
||||
if (mDefaultGestioneOfUL == GestioneEnum.LAVORAZIONE)
|
||||
mtbColt.setPosizione(mDefaultCodJFasOfUL);
|
||||
if (customNumCollo != null) mtbColt.setNumCollo(customNumCollo);
|
||||
if (!UtilityString.isNullOrEmpty(customSerCollo)) mtbColt.setSerCollo(customSerCollo);
|
||||
|
||||
mtbColt.generaFiltroOrdineFromDTO(mDefaultFiltroOrdine);
|
||||
|
||||
ColliMagazzinoRESTConsumer.saveCollo(mtbColt, value -> {
|
||||
|
||||
mtbColt
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setMtbColr(new ObservableArrayList<>());
|
||||
|
||||
// value
|
||||
// .setDisablePrint(disablePrint)
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
|
||||
// setULToCurrentContext(value);
|
||||
|
||||
this.mCurrentMtbColt = mtbColt;
|
||||
|
||||
if (onComplete != null) onComplete.run();
|
||||
this.sendLUCreated(mtbColt);
|
||||
}, this::sendError);
|
||||
|
||||
}
|
||||
|
||||
public MutableLiveData<List<PickingObjectDTO>> getmPickingList() {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
public SpedizioneViewModel addListeners(Listeners mListeners) {
|
||||
this.mListeners.add(mListeners);
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listeners {
|
||||
void onLUCreated(MtbColt mtbColt);
|
||||
|
||||
void onLUClosed();
|
||||
|
||||
void onFilterChanged(String newValue);
|
||||
|
||||
void onError(Exception ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ import it.integry.integrywmsnative.core.CommonConst;
|
||||
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.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -65,41 +66,17 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
}
|
||||
|
||||
|
||||
public SpedizioneListAdapter(AppCompatActivity context, ObservableArrayList<List<SpedizioneListModel>> mutableDataSet) {
|
||||
public SpedizioneListAdapter(AppCompatActivity context, ObservableArrayList<SpedizioneListModel> mutableDataSet) {
|
||||
this.mContext = context;
|
||||
|
||||
mutableDataSet.addOnListChangedCallback(new ObservableList.OnListChangedCallback<ObservableList<List<SpedizioneListModel>>>() {
|
||||
mutableDataSet.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<List<SpedizioneListModel>> sender) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList<List<SpedizioneListModel>> sender, int positionStart, int itemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList<List<SpedizioneListModel>> sender, int positionStart, int itemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList<List<SpedizioneListModel>> sender, int fromPosition, int toPosition, int itemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList<List<SpedizioneListModel>> sender, int positionStart, int itemCount) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mutableDataSet.observe(context, updatedDataSet -> {
|
||||
this.mDataset.clear();
|
||||
this.mDataset.addAll(updatedDataSet);
|
||||
public void onChanged(ObservableList sender) {
|
||||
mDataset.clear();
|
||||
mDataset.addAll(sender);
|
||||
notifyDataSetChanged();
|
||||
notifyDataChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -151,7 +128,6 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
// }
|
||||
// }
|
||||
|
||||
holder.mBinding.qtaEvasa.setText(UtilityNumber.decimalToString(pickingObjectDTO.getQtaEvasa()));
|
||||
holder.mBinding.descrizione.setText(pickingObjectDTO.getDescrizione());
|
||||
holder.mBinding.descrizione.setTextColor(pickingObjectDTO.isDescrizionePresente() ? Color.BLACK : Color.GRAY);
|
||||
|
||||
@ -227,6 +203,10 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
// holder.mBinding.untMis.setText(pickingObjectDTO.getMtbAart().getUntMis());
|
||||
// }
|
||||
|
||||
holder.mBinding.qtaEvasa.setText(UtilityNumber.decimalToString(pickingObjectDTO.getQtaEvasa()));
|
||||
holder.mBinding.qtaTot.setText(UtilityNumber.decimalToString(pickingObjectDTO.getQtaTot()));
|
||||
|
||||
|
||||
holder.mBinding.untMis.setText(pickingObjectDTO.getUntMis());
|
||||
holder.mBinding.untMis.setVisibility(UtilityString.isNullOrEmpty(pickingObjectDTO.getUntMis()) ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
public final class CurrentMonoLUPositionIsNotCorrectException extends Exception {
|
||||
public CurrentMonoLUPositionIsNotCorrectException() {
|
||||
super("La posizione scelta non è Mono-UL");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class NoArtsFoundException extends Exception {
|
||||
public NoArtsFoundException() {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
public final class NoLUFoundException extends Exception {
|
||||
|
||||
public NoLUFoundException() {
|
||||
super("Nessuna UL trovata");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
public final class NoOrdersSelectedException extends Exception {
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class NoResultFromBarcodeException extends Exception {
|
||||
public NoResultFromBarcodeException() {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
public final class NotCurrentYearLUException extends Exception {
|
||||
|
||||
public NotCurrentYearLUException() {
|
||||
super("Per continuare scansiona un'etichetta dell'anno corrente");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione_new.exceptions;
|
||||
|
||||
public final class ScannedPositionNotExistException extends Exception {
|
||||
public ScannedPositionNotExistException() {
|
||||
super("Nessuna posizione trovata con il barcode scansionato");
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,6 @@ import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||
|
||||
|
||||
@ -301,6 +301,7 @@ public class PickingObjectDTO {
|
||||
}
|
||||
|
||||
public Boolean isHidden() {
|
||||
if(hidden == null) hidden = false;
|
||||
return hidden;
|
||||
}
|
||||
|
||||
@ -310,7 +311,8 @@ public class PickingObjectDTO {
|
||||
}
|
||||
|
||||
public Boolean isDeactivated() {
|
||||
return deactivated != null ? deactivated : false;
|
||||
if(deactivated == null) deactivated = getQtaCollo() == null || getQtaCollo().floatValue() == 0;
|
||||
return deactivated;
|
||||
}
|
||||
|
||||
public PickingObjectDTO setDeactivated(boolean deactivated) {
|
||||
@ -319,6 +321,7 @@ public class PickingObjectDTO {
|
||||
}
|
||||
|
||||
public Boolean isTempHidden() {
|
||||
if(tempHidden == null) tempHidden = false;
|
||||
return tempHidden;
|
||||
}
|
||||
|
||||
|
||||
@ -12,6 +12,10 @@
|
||||
name="spedizioneViewModel"
|
||||
type="it.integry.integrywmsnative.gest.spedizione_new.SpedizioneViewModel" />
|
||||
|
||||
<variable
|
||||
name="spedizioneView"
|
||||
type="it.integry.integrywmsnative.gest.spedizione_new.SpedizioneActivity" />
|
||||
|
||||
</data>
|
||||
|
||||
|
||||
@ -48,6 +52,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/add_extra_items_toolbar"
|
||||
android:layout_width="wrap_content"
|
||||
@ -57,7 +62,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_add_24dp"
|
||||
android:tint="@color/colorPrimaryGray"
|
||||
app:visibility="@{spedizioneViewModel.addExtraItemsEnabled}"/>
|
||||
app:visibility="@{spedizioneView.addExtraItemsEnabled}"/>
|
||||
|
||||
|
||||
|
||||
@ -68,7 +73,7 @@
|
||||
android:background="@drawable/ripple_effect"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_black_barcode"
|
||||
android:onClick="@{() -> spedizioneViewModel.startManualSearch()}"
|
||||
android:onClick="@{() -> spedizioneView.startManualSearch()}"
|
||||
android:tint="@color/colorPrimaryGray"
|
||||
android:visibility="@{BuildConfig.DEBUG ? View.VISIBLE : View.GONE}"/>
|
||||
|
||||
@ -133,7 +138,7 @@
|
||||
style="@style/Button.DangerOutline"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/remove_filter_button"
|
||||
android:onClick="@{() -> spedizioneViewModel.removeListFilter()}"
|
||||
android:onClick="@{() -> spedizioneView.removeListFilter()}"
|
||||
app:strokeColor="@color/red_600"/>
|
||||
|
||||
|
||||
@ -157,7 +162,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3"
|
||||
app:visibility="@{spedizioneViewModel.anyItemToPick}">
|
||||
app:visibility="@{spedizioneView.noItemsToPick}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_top"
|
||||
@ -211,7 +216,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:visibility="@{spedizioneViewModel.anyLUOpened}"
|
||||
app:visibility="@{spedizioneView.noLUPresent}"
|
||||
app:layout_anchor="@+id/spedizione_empty_view"
|
||||
app:layout_anchorGravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -254,7 +259,7 @@
|
||||
app:fab_colorPressed="@color/white_pressed"
|
||||
app:fab_colorRipple="#66FFFFFF"
|
||||
app:fab_label="@string/action_show_created_ul"
|
||||
app:onClick="@{() -> spedizioneViewModel.showCreatedUL()}" />
|
||||
app:onClick="@{() -> spedizioneView.showCreatedUL()}" />
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/spedizione_fab_item2"
|
||||
@ -265,7 +270,7 @@
|
||||
app:fab_colorPressed="@color/white_pressed"
|
||||
app:fab_colorRipple="#66FFFFFF"
|
||||
app:fab_label="@string/action_create_ul"
|
||||
app:onClick="@{() -> spedizioneViewModel.createNewUL()}" />
|
||||
app:onClick="@{() -> spedizioneView.createNewUL()}" />
|
||||
|
||||
</com.github.clans.fab.FloatingActionMenu>
|
||||
|
||||
|
||||
@ -10,12 +10,6 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
>
|
||||
|
||||
<!--<de.hdodenhof.circleimageview.CircleImageView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:paddingTop="@dimen/nav_header_vertical_spacing"-->
|
||||
<!--android:src="@android:drawable/sym_def_app_icon" />-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:id="@+id/drawer_username"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
|
||||
@ -31,7 +31,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
}
|
||||
|
||||
@ -35,4 +35,4 @@ android.enableBuildCache=true
|
||||
# Enable simple gradle caching
|
||||
org.gradle.caching=true
|
||||
# Increase memory allotted to JVM
|
||||
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx4096m
|
||||
@ -31,7 +31,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation project(path: ':barcode_base_android_library')
|
||||
|
||||
@ -28,7 +28,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation project(':barcode_base_android_library')
|
||||
|
||||
@ -27,7 +27,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation project(':barcode_base_android_library')
|
||||
|
||||
@ -28,7 +28,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation project(path: ':barcode_base_android_library')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user