aggiunte funzionalità versamento e recupero alla gestione linee di produzione
This commit is contained in:
parent
344fc42d03
commit
9c45cebf51
@ -27,11 +27,18 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||
<activity
|
||||
android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||
<activity
|
||||
android:name=".gest.prod_dettaglio_linea.ProdDettaglioLineaActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity
|
||||
android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
|
||||
@ -41,6 +41,8 @@ import it.integry.integrywmsnative.gest.picking_resi.PickingResiComponent;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.PickingResiModule;
|
||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoModule;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaModule;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdModule;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaComponent;
|
||||
@ -134,7 +136,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
||||
DialogAskClienteModule.class,
|
||||
DialogEditArticoloModule.class,
|
||||
DialogPrintOrderSSCCListModule.class,
|
||||
ProdLineeProduzioneModule.class
|
||||
ProdLineeProduzioneModule.class,
|
||||
ProdDettaglioLineaModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@ -226,6 +229,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
ProdLineeProduzioneComponent.Factory prodLineeProduzioneComponent();
|
||||
|
||||
ProdDettaglioLineaComponent.Factory prodDettaglioLineaComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.services.inventario.InventarioService;
|
||||
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||
@ -200,4 +201,10 @@ public class MainApplicationModule {
|
||||
return new InventarioService(giacenzaRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ProductionLinesRESTConsumer provideProductionLinesRESTConsumer() {
|
||||
return new ProductionLinesRESTConsumer();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -100,8 +100,13 @@ public abstract class BaseFragment extends Fragment {
|
||||
}
|
||||
|
||||
protected void popMe() {
|
||||
if (requireActivity() instanceof IPoppableActivity) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
((IPoppableActivity) requireActivity()).pop();
|
||||
});
|
||||
} else {
|
||||
requireActivity().getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import java.util.List;
|
||||
@ -88,4 +89,24 @@ public class ProductionLinesRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
public void getLineDetails(ProdLineStatusDTO lineaProd, RunnableArgs<ProdLineStatusDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ProductionLinesRESTConsumerService restService = RESTBuilder.getService(ProductionLinesRESTConsumerService.class);
|
||||
Call<ServiceRESTResponse<List<ProdLineStatusDTO>>> callable = restService.getStatoLinee(lineaProd.getCodMdepLav());
|
||||
callable.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<ProdLineStatusDTO>>> call, Response<ServiceRESTResponse<List<ProdLineStatusDTO>>> response) {
|
||||
analyzeAnswer(response, "getLineDetails", (lines) -> {
|
||||
ProdLineStatusDTO newLine = Stream.of(lines).filter(dto -> dto.getCodJfas().equalsIgnoreCase(lineaProd.getCodJfas())).findFirstOrElse(null);
|
||||
onComplete.run(newLine);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<ProdLineStatusDTO>>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -342,8 +342,8 @@ public class SettingsManager {
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
||||
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", codMdep, (gestSetupDTO) -> {
|
||||
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(value);
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", codMdep, (setupValue) -> {
|
||||
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(setupValue);
|
||||
if (onComplete != null) onComplete.run();
|
||||
}, onFailed);
|
||||
}, onFailed);
|
||||
|
||||
@ -0,0 +1,321 @@
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.InputType;
|
||||
import android.text.SpannableString;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.google.android.material.chip.Chip;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
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.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.ActivityProdDettaglioLineaBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.BottomSheetLineAction;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.DialogStartProduction;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
|
||||
public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDettaglioLineaViewModel.Listener {
|
||||
|
||||
private static final String DATA_KEY_LINE = "keyLinea";
|
||||
|
||||
private ActivityProdDettaglioLineaBinding mBinding;
|
||||
public final ObservableField<String> listaOrd = new ObservableField<>();
|
||||
public final BindableString lineaLabel = new BindableString();
|
||||
public final BindableBoolean isStarted = new BindableBoolean(false);
|
||||
public final BindableBoolean isPaused = new BindableBoolean(false);
|
||||
public final BindableBoolean flagShowProdInfo = new BindableBoolean(false);
|
||||
public final BindableString hrNum = new BindableString();
|
||||
public final BindableString codMart = new BindableString();
|
||||
public final BindableString partitaMag = new BindableString();
|
||||
public final BindableString productDescription = new BindableString();
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
@Inject
|
||||
ProdDettaglioLineaViewModel mViewModel;
|
||||
|
||||
@Inject
|
||||
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||
|
||||
|
||||
public static Intent newInstance(Context context, ProdLineStatusDTO prodLine) {
|
||||
Intent myIntent = new Intent(context, ProdDettaglioLineaActivity.class);
|
||||
String keyLine = DataCache.addItem(prodLine);
|
||||
myIntent.putExtra(DATA_KEY_LINE, keyLine);
|
||||
return myIntent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mBinding = ActivityProdDettaglioLineaBinding.inflate(getLayoutInflater());
|
||||
setContentView(mBinding.getRoot());
|
||||
setSupportActionBar(mBinding.toolbar);
|
||||
setTitle(R.string.line_details);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
ProdLineStatusDTO lineaProd = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_LINE));
|
||||
if (lineaProd == null) {
|
||||
Toast.makeText(this, "Selezionare una linea di produzione e riprovare", Toast.LENGTH_SHORT).show();
|
||||
close();
|
||||
return;
|
||||
}
|
||||
|
||||
MainApplication.appComponent
|
||||
.prodDettaglioLineaComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
|
||||
mViewModel.setListener(this);
|
||||
mBinding.setViewModel(mViewModel);
|
||||
mBinding.setView(this);
|
||||
this.init();
|
||||
mViewModel.init(lineaProd);
|
||||
|
||||
}
|
||||
|
||||
private void init() {
|
||||
initBarcodeReader();
|
||||
mViewModel.lineaProd.observe(this, lineaProd -> {
|
||||
this.listaOrd.set(lineaProd.getListaOrd());
|
||||
this.lineaLabel.set(lineaProd.getLabel());
|
||||
this.isStarted.set(lineaProd.isStarted());
|
||||
this.isPaused.set(lineaProd.isPaused());
|
||||
this.partitaMag.set(lineaProd.getPartitaMag());
|
||||
this.codMart.set(lineaProd.getCodMart());
|
||||
this.productDescription.set(lineaProd.getDescrizioneProd());
|
||||
this.flagShowProdInfo.set(lineaProd.isStarted() && !UtilityString.isNullOrEmpty(lineaProd.getCodMart()));
|
||||
this.hrNum.set(lineaProd.getQtaAllocate().toString());
|
||||
});
|
||||
listaOrd.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
renderOrdersChips();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void renderOrdersChips() {
|
||||
mBinding.ordersList.removeAllViews();
|
||||
String listaOrdString = listaOrd.get();
|
||||
if (!UtilityString.isNullOrEmpty(listaOrdString)) {
|
||||
for (String ord : listaOrdString.split("\\|")) {
|
||||
Chip chip = new Chip(this);
|
||||
chip.setClickable(false);
|
||||
chip.setText(ord);
|
||||
mBinding.ordersList.addView(chip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
onBackPressed();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void onSettingsRequest(ProdLineStatusDTO lineaProd) {
|
||||
BottomSheetLineAction.newInstance(lineaProd, this::requestResources, this::requestOrderChange, this::requestProductionStop, this::requestMaterialRecover, BarcodeManager::enable).show(getSupportFragmentManager(), "BottomSheetLineAction");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestQtaVersamento(MtbColr mtbColr,
|
||||
RunnableArgs<PickedQuantityDTO> onComplete) {
|
||||
onLoadingStarted();
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbColr.getMtbAart())
|
||||
.setInitialNumCnf(mtbColr.getNumCnf())
|
||||
.setInitialQtaCnf(mtbColr.getQtaCnf())
|
||||
.setInitialQtaTot(mtbColr.getQtaCol())
|
||||
.setTotalQtaAvailable(mtbColr.getQtaCol())
|
||||
.setTotalNumCnfAvailable(mtbColr.getNumCnf())
|
||||
.setQtaCnfAvailable(mtbColr.getQtaCnf())
|
||||
.setPartitaMag(mtbColr.getPartitaMag())
|
||||
.setDataScad(mtbColr.getDataScadPartitaD())
|
||||
.setCanOverflowOrderQuantity(false)
|
||||
.setCanPartitaMagBeChanged(false)
|
||||
.setCanLUBeClosed(false)
|
||||
.setFocusOnStart(false);
|
||||
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
this.runOnUiThread(() -> {
|
||||
onLoadingEnded();
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
onComplete.run(pickedQuantityDTO);
|
||||
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(this.getSupportFragmentManager(), "tag");
|
||||
});
|
||||
else this.onLoadingEnded();
|
||||
}
|
||||
|
||||
public void onLineStop() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
public void askForLUBarcode() {
|
||||
this.onLoadingEnded();
|
||||
this.runOnUiThread(() -> {
|
||||
DialogStartProduction.newInstance((dto) -> {
|
||||
this.mViewModel.checkBarcodeAndStartOrdine(dto);
|
||||
},
|
||||
UtilityResources.getString(R.string.title_open_lu),
|
||||
UtilityResources.getString(R.string.scan_lu_to_recover)
|
||||
).show(getSupportFragmentManager(), "DialogStartProduction");
|
||||
});
|
||||
}
|
||||
|
||||
private void initBarcodeReader() {
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
.setOnScanFailed(this::onError));
|
||||
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
|
||||
public void requestResources() {
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.disable();
|
||||
this.runOnUiThread(() -> {
|
||||
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il numero di risorse da allocare", qta -> {
|
||||
this.onLoadingStarted();
|
||||
try {
|
||||
Integer hrNum = Integer.parseInt(qta);
|
||||
this.mViewModel.startProductionLine(hrNum);
|
||||
} catch (NumberFormatException ex) {
|
||||
this.onError(new Exception("Inserire un numero di risorse valido"));
|
||||
}
|
||||
}, BarcodeManager::enable, InputType.TYPE_CLASS_NUMBER).show();
|
||||
});
|
||||
}
|
||||
|
||||
public void requestOrderChange() {
|
||||
this.onLoadingEnded();
|
||||
this.runOnUiThread(() -> {
|
||||
DialogStartProduction.newInstance((dto) -> {
|
||||
this.mViewModel.checkBarcodeAndStartOrdine(dto);
|
||||
}).show(getSupportFragmentManager(), "DialogStartProduction");
|
||||
});
|
||||
}
|
||||
|
||||
public void requestProductionStop() {
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.disable();
|
||||
ProdLineStatusDTO lineaProd = mViewModel.getLineaProd();
|
||||
if (UtilityString.isNullOrEmpty(lineaProd.getListaOrd())) {
|
||||
mViewModel.stopProduction();
|
||||
} else {
|
||||
this.confirmOrderClose(() -> {
|
||||
mViewModel.stopProduction();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void requestMaterialRecover() {
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.disable();
|
||||
this.runOnUiThread(() -> {
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.add(R.id.frame_layout_container,
|
||||
ProdRecuperoMaterialeFragment.newInstance(mViewModel.lineaProd.getValue().getCodJfas()))
|
||||
.addToBackStack("ProdRecuperoMaterialeFragment")
|
||||
.commit();
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void successDialog(String message, Runnable onComplete) {
|
||||
BarcodeManager.disable();
|
||||
|
||||
this.runOnUiThread(() -> DialogSimpleMessageView.makeSuccessDialog(getResources().getString(R.string.success),
|
||||
new SpannableString(message), null, onComplete).show(getSupportFragmentManager(), "successDialog"));
|
||||
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public void confirmOrderClose(Runnable onConfirm) {
|
||||
this.onLoadingEnded();
|
||||
this.runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
Html.fromHtml("Per completare l'operazione è necessario chiudere gli ordini attualmente aperti sulla linea."
|
||||
+ "<br /> <br/>" +
|
||||
"Continuare?"),
|
||||
null,
|
||||
onConfirm,
|
||||
BarcodeManager::enable
|
||||
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void close() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
int count = getSupportFragmentManager().getBackStackEntryCount();
|
||||
if (count > 0) {
|
||||
getSupportFragmentManager().popBackStack();
|
||||
} else {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface ProdDettaglioLineaComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
|
||||
ProdDettaglioLineaComponent create();
|
||||
}
|
||||
|
||||
void inject(ProdDettaglioLineaActivity prodDettaglioLineaActivity);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||
|
||||
@Module(subcomponents = ProdDettaglioLineaComponent.class)
|
||||
public class ProdDettaglioLineaModule {
|
||||
|
||||
|
||||
@Provides
|
||||
ProdDettaglioLineaViewModel providesProdDettaglioLineaViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, MesRESTConsumer mesRESTConsumer) {
|
||||
return new ProdDettaglioLineaViewModel(productionLinesRESTConsumer, barcodeRESTConsumer, colliMagazzinoRESTConsumer, mesRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,238 @@
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
|
||||
public class ProdDettaglioLineaViewModel {
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
private final ProductionLinesRESTConsumer productionLinesRESTConsumer;
|
||||
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
||||
private final MesRESTConsumer mesRESTConsumer;
|
||||
private final BarcodeRESTConsumer mBarcodeRESTConsumer;
|
||||
public final MutableLiveData<ProdLineStatusDTO> lineaProd = new MutableLiveData<>();
|
||||
|
||||
|
||||
@Inject
|
||||
public ProdDettaglioLineaViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer magazzinoRESTConsumer, MesRESTConsumer mesRESTConsumer) {
|
||||
this.productionLinesRESTConsumer = productionLinesRESTConsumer;
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
this.colliMagazzinoRESTConsumer = magazzinoRESTConsumer;
|
||||
this.mesRESTConsumer = mesRESTConsumer;
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
if (UtilityBarcode.isEtichettaAnonima(barcodeScanDTO)) {
|
||||
this.executeEtichettaAnonima(barcodeScanDTO, onComplete);
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
this.executeEAN128(barcodeScanDTO, onComplete);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
private void executeEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
handleSSCCBarcode(barcodeScanDTO.getStringValue(), onComplete);
|
||||
}
|
||||
|
||||
private void handleSSCCBarcode(String sscc, Runnable onComplete) {
|
||||
this.colliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColt -> {
|
||||
|
||||
if (mtbColt == null) {
|
||||
this.sendError(new NoLUFoundException());
|
||||
} else {
|
||||
if (mtbColt.getMtbColr().size() <= 0) {
|
||||
this.sendError(new Exception("E' stata scansionata una UL già vuota"));
|
||||
}
|
||||
onComplete.run();
|
||||
this.sendOnLUSelected(mtbColt);
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void sendOnLUSelected(MtbColt mtbColt) {
|
||||
this.sendOnLoadingStarted();
|
||||
this.checkOrdersCompatibility(mtbColt, () -> {
|
||||
MtbColr row = mtbColt.getMtbColr().get(0);
|
||||
mListener.requestQtaVersamento(
|
||||
row,
|
||||
dto -> {
|
||||
sendOnLoadingStarted();
|
||||
row.setQtaCnf(dto.getQtaCnf());
|
||||
row.setNumCnf(dto.getNumCnf());
|
||||
row.setQtaCol(dto.getQtaTot());
|
||||
row.setPesoLordoKg(null);
|
||||
row.setPesoNettoKg(null);
|
||||
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||
MtbDepoPosizione posizione = new MtbDepoPosizione();
|
||||
posizione.setPosizione(prodLine.getCodJfas());
|
||||
posizione.setCodMdep(prodLine.getCodMdepLav());
|
||||
posizione.setFlagLineaProduzione("S");
|
||||
this.colliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt, posizione,
|
||||
generatedMtbColt -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.mListener.successDialog("Versamento completato!", BarcodeManager::enable);
|
||||
}, this::sendError);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void checkOrdersCompatibility(MtbColt mtbColt, Runnable onComplete) {
|
||||
mesRESTConsumer.getOrdiniLavorazioneMateriale(lineaProd.getValue().getCodJfas(), getIdMaterialeFromCollo(mtbColt), ordini -> {
|
||||
if (ordini != null && ordini.size() > 0) {
|
||||
onComplete.run();
|
||||
} else {
|
||||
this.sendError(new Exception("Nessun ordine compatibile disponibile sulla linea selezionata"));
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private String getIdMaterialeFromCollo(MtbColt mtbColt) {
|
||||
MtbAart articolo = mtbColt.getMtbColr().get(0).getMtbAart();
|
||||
return UtilityString.isNullOrEmpty(articolo.getIdArtEqui()) ? articolo.getCodMart() : articolo.getIdArtEqui();
|
||||
}
|
||||
|
||||
|
||||
private void executeEAN128(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.mBarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||
if (ean128Model != null && !UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
handleSSCCBarcode(ean128Model.Sscc, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void settings() {
|
||||
this.mListener.onSettingsRequest(lineaProd.getValue());
|
||||
}
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
if (this.mListener != null) mListener.onLoadingStarted();
|
||||
}
|
||||
|
||||
private void sendOnLoadingEnded() {
|
||||
if (this.mListener != null) mListener.onLoadingEnded();
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
public void startProductionLine(Integer hrNum) {
|
||||
this.sendOnLoadingStarted();
|
||||
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||
this.productionLinesRESTConsumer.avviaLineaDiProduzione(prodLine.getCodJfas(),
|
||||
hrNum,
|
||||
() -> this.mListener.successDialog("Operazione completata", this::loadLineDetails),
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
|
||||
private void startProduction(String codMart, String partitaMag) {
|
||||
this.sendOnLoadingStarted();
|
||||
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||
this.productionLinesRESTConsumer.avviaProduzioneArticoloSuLinea(prodLine.getCodJfas(), codMart, partitaMag,
|
||||
() -> this.mListener.successDialog("Operazione completata", this::loadLineDetails),
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
public void stopProduction() {
|
||||
this.sendOnLoadingStarted();
|
||||
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||
this.productionLinesRESTConsumer.arrestaLineaDiProduzione(prodLine.getCodJfas(),
|
||||
() -> this.mListener.successDialog("Operazione completata", this::onLineStop),
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
private void onLineStop() {
|
||||
this.mListener.onLineStop();
|
||||
}
|
||||
|
||||
public void checkBarcodeAndStartOrdine(BarcodeScanDTO dto) {
|
||||
this.sendOnLoadingStarted();
|
||||
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||
mBarcodeRESTConsumer.decodeEan128(dto, (ean128) -> {
|
||||
String codMart = ean128.Content;
|
||||
String partitaMag = ean128.BatchLot;
|
||||
if (!prodLine.isStarted()) {
|
||||
this.sendError(new Exception("Impossibile avviare una produzione su una linea ferma!"));
|
||||
} else if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
||||
this.startProduction(codMart, partitaMag);
|
||||
} else {
|
||||
this.mListener.confirmOrderClose(() -> {
|
||||
this.startProduction(codMart, partitaMag);
|
||||
});
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void loadLineDetails() {
|
||||
sendOnLoadingStarted();
|
||||
if (lineaProd.getValue() == null) {
|
||||
this.sendError(new Exception("Nessuna linea selezionata!"));
|
||||
return;
|
||||
}
|
||||
productionLinesRESTConsumer.getLineDetails(lineaProd.getValue(), linea -> {
|
||||
this.lineaProd.postValue(linea);
|
||||
sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void init(ProdLineStatusDTO lineaProd) {
|
||||
this.lineaProd.setValue(lineaProd);
|
||||
this.loadLineDetails();
|
||||
}
|
||||
|
||||
public ProdLineStatusDTO getLineaProd() {
|
||||
return lineaProd.getValue();
|
||||
}
|
||||
|
||||
public void beginMaterialRecover() {
|
||||
this.mListener.askForLUBarcode();
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
void onError(Exception ex);
|
||||
|
||||
void successDialog(String message, Runnable onComplete);
|
||||
|
||||
void requestQtaVersamento(MtbColr mtbColr, RunnableArgs<PickedQuantityDTO> onComplete);
|
||||
|
||||
void onSettingsRequest(ProdLineStatusDTO lineaProd);
|
||||
|
||||
void onLineStop();
|
||||
|
||||
void askForLUBarcode();
|
||||
|
||||
void confirmOrderClose(Runnable onConfirm);
|
||||
}
|
||||
|
||||
public ProdDettaglioLineaViewModel setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs;
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
@ -11,7 +11,6 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetLineActionsBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||
|
||||
@ -20,17 +19,19 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
||||
private BottomSheetLineActionsBinding mBinding;
|
||||
|
||||
private ProdLineStatusDTO prodLine;
|
||||
private RunnableArgs<ProdLineStatusDTO> onChangeResourcesRequest;
|
||||
private RunnableArgs<ProdLineStatusDTO> onChangeOrdersRequest;
|
||||
private RunnableArgs<ProdLineStatusDTO> onLineCloseRequest;
|
||||
private Runnable onChangeResourcesRequest;
|
||||
private Runnable onChangeOrdersRequest;
|
||||
private Runnable onLineCloseRequest;
|
||||
private Runnable onRecoverRequest;
|
||||
private Runnable onCancelAction;
|
||||
|
||||
public static BottomSheetLineAction newInstance(ProdLineStatusDTO dto, RunnableArgs<ProdLineStatusDTO> onChangeResourcesRequest, RunnableArgs<ProdLineStatusDTO> onChangeOrdersRequest, RunnableArgs<ProdLineStatusDTO> onLineCloseRequest, Runnable onCancel) {
|
||||
public static BottomSheetLineAction newInstance(ProdLineStatusDTO dto, Runnable onChangeResourcesRequest, Runnable onChangeOrdersRequest, Runnable onLineCloseRequest, Runnable onRecoverRequest, Runnable onCancel) {
|
||||
BottomSheetLineAction fragment = new BottomSheetLineAction();
|
||||
fragment
|
||||
.setProdLine(dto)
|
||||
.setOnChangeResourcesRequest(onChangeResourcesRequest)
|
||||
.setOnChangeOrdersRequest(onChangeOrdersRequest)
|
||||
.setOnRecoverRequest(onRecoverRequest)
|
||||
.setOnLineCloseRequest(onLineCloseRequest)
|
||||
.setOnCancelAction(onCancel);
|
||||
return fragment;
|
||||
@ -53,19 +54,24 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetLineAction setOnChangeResourcesRequest(RunnableArgs<ProdLineStatusDTO> onChangeResourcesRequest) {
|
||||
public BottomSheetLineAction setOnChangeResourcesRequest(Runnable onChangeResourcesRequest) {
|
||||
this.onChangeResourcesRequest = onChangeResourcesRequest;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetLineAction setOnChangeOrdersRequest(RunnableArgs<ProdLineStatusDTO> onChangeOrdersRequest) {
|
||||
public BottomSheetLineAction setOnChangeOrdersRequest(Runnable onChangeOrdersRequest) {
|
||||
this.onChangeOrdersRequest = onChangeOrdersRequest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetLineAction setOnRecoverRequest(Runnable onRecoverRequest) {
|
||||
this.onRecoverRequest = onRecoverRequest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetLineAction setOnLineCloseRequest(RunnableArgs<ProdLineStatusDTO> onLineCloseRequest) {
|
||||
|
||||
public BottomSheetLineAction setOnLineCloseRequest(Runnable onLineCloseRequest) {
|
||||
this.onLineCloseRequest = onLineCloseRequest;
|
||||
return this;
|
||||
}
|
||||
@ -81,7 +87,7 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
||||
|
||||
public void onResourcesClicked() {
|
||||
if (this.onChangeResourcesRequest != null) {
|
||||
this.onChangeResourcesRequest.run(prodLine);
|
||||
this.onChangeResourcesRequest.run();
|
||||
}
|
||||
this.dismiss();
|
||||
|
||||
@ -89,14 +95,21 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
||||
|
||||
public void onPlayClicked() {
|
||||
if (this.onChangeOrdersRequest != null) {
|
||||
this.onChangeOrdersRequest.run(prodLine);
|
||||
this.onChangeOrdersRequest.run();
|
||||
}
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
public void onStopClicked() {
|
||||
if (this.onLineCloseRequest != null) {
|
||||
this.onLineCloseRequest.run(prodLine);
|
||||
this.onLineCloseRequest.run();
|
||||
}
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
public void onRecoverClicked() {
|
||||
if (this.onRecoverRequest != null) {
|
||||
this.onRecoverRequest.run();
|
||||
}
|
||||
this.dismiss();
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs;
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
@ -19,16 +19,16 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.databinding.DialogStartProductionBinding;
|
||||
|
||||
public class DialogStartProduction extends BaseDialogFragment {
|
||||
public class DialogRecoverUl extends BaseDialogFragment {
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private RunnableArgs<BarcodeScanDTO> onScanSuccessful;
|
||||
private DialogStartProductionBinding mBinding;
|
||||
|
||||
public static DialogStartProduction newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||
public static DialogRecoverUl newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
||||
DialogStartProduction fragment = new DialogStartProduction();
|
||||
DialogRecoverUl fragment = new DialogRecoverUl();
|
||||
fragment.setArguments(args);
|
||||
fragment.setOnScanSuccessful(onScanSuccessful);
|
||||
return fragment;
|
||||
@ -41,7 +41,7 @@ public class DialogStartProduction extends BaseDialogFragment {
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
public DialogStartProduction setOnScanSuccessful(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||
public DialogRecoverUl setOnScanSuccessful(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||
this.onScanSuccessful = onScanSuccessful;
|
||||
return this;
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogStartProductionBinding;
|
||||
|
||||
public class DialogStartProduction extends BaseDialogFragment {
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private RunnableArgs<BarcodeScanDTO> onScanSuccessful;
|
||||
private DialogStartProductionBinding mBinding;
|
||||
private String title;
|
||||
private String label;
|
||||
|
||||
public static DialogStartProduction newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
||||
DialogStartProduction fragment = new DialogStartProduction();
|
||||
fragment.setArguments(args);
|
||||
fragment.setOnScanSuccessful(onScanSuccessful);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public static DialogStartProduction newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful, String title, String label) {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
||||
DialogStartProduction fragment = new DialogStartProduction();
|
||||
fragment.setTitle(title);
|
||||
fragment.setLabel(label);
|
||||
fragment.setArguments(args);
|
||||
fragment.setOnScanSuccessful(onScanSuccessful);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public DialogStartProduction setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public DialogStartProduction setLabel(String label) {
|
||||
this.label = label;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
public DialogStartProduction setOnScanSuccessful(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||
this.onScanSuccessful = onScanSuccessful;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mBinding = DialogStartProductionBinding.inflate(inflater, container, false);
|
||||
mBinding.setLifecycleOwner(this);
|
||||
this.initBarcodeReader();
|
||||
setCancelable(true);
|
||||
getDialog().setCanceledOnTouchOutside(true);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(title)) {
|
||||
mBinding.titleText.setText(title);
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(label)) {
|
||||
mBinding.scanLabel.setText(label);
|
||||
}
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
|
||||
private void initBarcodeReader() {
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(this::processBarcode)
|
||||
.setOnScanFailed(this::onError));
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private void processBarcode(BarcodeScanDTO barcodeScanDTO) {
|
||||
if (UtilityBarcode.isEan128(barcodeScanDTO)) {
|
||||
this.onScanSuccessful.run(barcodeScanDTO);
|
||||
this.dismiss();
|
||||
} else {
|
||||
this.onError(new Exception("Il barcode scansionato non è valido!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,6 @@ package it.integry.integrywmsnative.gest.prod_linee_produzione;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.InputType;
|
||||
import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
@ -10,7 +9,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
@ -27,10 +25,8 @@ import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentLineeProdBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs.BottomSheetLineAction;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs.DialogStartProduction;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaActivity;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.ui.LinesListAdapter;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
@ -60,8 +56,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_linee_prod, container, false);
|
||||
mBinding = FragmentLineeProdBinding.inflate(inflater, container, false);
|
||||
MainApplication.appComponent
|
||||
.prodLineeProduzioneComponent()
|
||||
.create()
|
||||
@ -71,11 +66,17 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
mBinding.setLifecycleOwner(this);
|
||||
this.initRecyclerView();
|
||||
this.initBarcodeReader();
|
||||
mViewModel.init();
|
||||
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
mViewModel.init();
|
||||
}
|
||||
|
||||
|
||||
private void initBarcodeReader() {
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
@ -123,28 +124,6 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
});
|
||||
}
|
||||
|
||||
public void requestOrderChange(ProdLineStatusDTO prodLine) {
|
||||
this.onLoadingEnded();
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
DialogStartProduction.newInstance((dto) -> {
|
||||
this.mViewModel.checkBarcodeAndStartOrdine(prodLine, dto);
|
||||
}).show(getChildFragmentManager(), "DialogStartProduction");
|
||||
});
|
||||
}
|
||||
|
||||
public void requestProductionStop(ProdLineStatusDTO prodLine) {
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.disable();
|
||||
if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
||||
mViewModel.stopProduction(prodLine);
|
||||
} else {
|
||||
this.confirmOrderClose(() -> {
|
||||
mViewModel.stopProduction(prodLine);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void successDialog(String message, Runnable onComplete) {
|
||||
BarcodeManager.disable();
|
||||
@ -160,25 +139,10 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
if (!dto.isStarted()) {
|
||||
this.requestResources(dto);
|
||||
} else {
|
||||
BottomSheetLineAction.newInstance(dto, this::requestResources, this::requestOrderChange, this::requestProductionStop, BarcodeManager::enable).show(getChildFragmentManager(), "BottomSheetLineAction");
|
||||
requireActivity().startActivity(ProdDettaglioLineaActivity.newInstance(requireActivity(), dto));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmOrderClose(Runnable onConfirm) {
|
||||
this.onLoadingEnded();
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
Html.fromHtml("Per completare l'operazione è necessario chiudere gli ordini attualmente aperti sulla linea."
|
||||
+ "<br /> <br/>" +
|
||||
"Continuare?"),
|
||||
null,
|
||||
onConfirm,
|
||||
BarcodeManager::enable
|
||||
).show(getChildFragmentManager(), "confirmOrderClose");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.prod_linee_produzione;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceComponent;
|
||||
|
||||
@ -12,14 +9,8 @@ import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceCompo
|
||||
public class ProdLineeProduzioneModule {
|
||||
|
||||
@Provides
|
||||
ProdLineeProduzioneViewModel providesProdRientroMerceViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
return new ProdLineeProduzioneViewModel(productionLinesRESTConsumer, barcodeRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ProductionLinesRESTConsumer providesProductionLinesRESTConsumer() {
|
||||
return new ProductionLinesRESTConsumer();
|
||||
ProdLineeProduzioneViewModel providesProdRientroMerceViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer) {
|
||||
return new ProdLineeProduzioneViewModel(productionLinesRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,40 +11,34 @@ import javax.inject.Inject;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||
|
||||
public class ProdLineeProduzioneViewModel {
|
||||
|
||||
|
||||
private final ProductionLinesRESTConsumer productionLinesRESTConsumer;
|
||||
private final BarcodeRESTConsumer mBarcodeRESTConsumer;
|
||||
private final MutableLiveData<List<ProdLineStatusDTO>> prodLines = new MutableLiveData<>();
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@Inject
|
||||
public ProdLineeProduzioneViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer) {
|
||||
public ProdLineeProduzioneViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer) {
|
||||
this.productionLinesRESTConsumer = productionLinesRESTConsumer;
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
this.sendOnLoadingStarted();
|
||||
reloadLines();
|
||||
|
||||
}
|
||||
|
||||
private void reloadLines() {
|
||||
BarcodeManager.disable();
|
||||
sendOnLoadingStarted();
|
||||
BarcodeManager.disable();
|
||||
this.productionLinesRESTConsumer.getStatoLinee(SettingsManager.i().getUserSession().getDepo().getCodMdep(), lineeProdList -> {
|
||||
this.sendOnLoadingEnded();
|
||||
BarcodeManager.enable();
|
||||
prodLines.postValue(lineeProdList);
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
@ -58,15 +52,12 @@ public class ProdLineeProduzioneViewModel {
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) {
|
||||
String codJfas = barcodeScanDTO.getStringValue();
|
||||
|
||||
ProdLineStatusDTO prodLine = prodLines.getValue() != null ? Stream.of(prodLines.getValue()).filter(x -> x.getCodJfas().equalsIgnoreCase(codJfas)).findFirstOrElse(null) : null;
|
||||
if (prodLine != null) {
|
||||
this.onLineSelected(prodLine);
|
||||
} else {
|
||||
this.sendError(new Exception("Linea di produzione " + codJfas + " non trovata"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -94,37 +85,6 @@ public class ProdLineeProduzioneViewModel {
|
||||
mListener.selectLine(lineSelected);
|
||||
}
|
||||
|
||||
public void checkBarcodeAndStartOrdine(ProdLineStatusDTO prodLine, BarcodeScanDTO dto) {
|
||||
this.sendOnLoadingStarted();
|
||||
mBarcodeRESTConsumer.decodeEan128(dto, (ean128) -> {
|
||||
String codMart = ean128.Content;
|
||||
String partitaMag = ean128.BatchLot;
|
||||
if (!prodLine.isStarted()) {
|
||||
this.sendError(new Exception("Impossibile avviare una produzione su una linea ferma!"));
|
||||
} else if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
||||
this.startProduction(prodLine, codMart, partitaMag);
|
||||
} else {
|
||||
this.mListener.confirmOrderClose(() -> {
|
||||
this.startProduction(prodLine, codMart, partitaMag);
|
||||
});
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void startProduction(ProdLineStatusDTO prodLine, String codMart, String partitaMag) {
|
||||
this.sendOnLoadingStarted();
|
||||
this.productionLinesRESTConsumer.avviaProduzioneArticoloSuLinea(prodLine.getCodJfas(), codMart, partitaMag,
|
||||
() -> this.mListener.successDialog("Operazione completata", this::reloadLines),
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
public void stopProduction(ProdLineStatusDTO prodLine) {
|
||||
this.sendOnLoadingStarted();
|
||||
this.productionLinesRESTConsumer.arrestaLineaDiProduzione(prodLine.getCodJfas(),
|
||||
() -> this.mListener.successDialog("Operazione completata", this::reloadLines),
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
|
||||
@ -134,8 +94,6 @@ public class ProdLineeProduzioneViewModel {
|
||||
|
||||
void selectLine(ProdLineStatusDTO prodLineStatusDTO);
|
||||
|
||||
void confirmOrderClose(Runnable onConfirm);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -16,12 +16,18 @@ public class ProdLineStatusDTO {
|
||||
|
||||
private Date datetimeEnd;
|
||||
|
||||
private String codMart;
|
||||
|
||||
private String partitaMag;
|
||||
|
||||
private BigDecimal maxAllocazione;
|
||||
|
||||
private Integer qtaAllocate;
|
||||
|
||||
private String listaOrd;
|
||||
|
||||
private String descrizioneProd;
|
||||
|
||||
|
||||
public String getCodJfas() {
|
||||
return codJfas;
|
||||
@ -126,4 +132,31 @@ public class ProdLineStatusDTO {
|
||||
return qtaAllocate + (maxAllocazione != null && maxAllocazione.compareTo(BigDecimal.ZERO) > 0 ? "/" + maxAllocazione : "");
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public ProdLineStatusDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public ProdLineStatusDTO setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public String getDescrizioneProd() {
|
||||
return descrizioneProd;
|
||||
}
|
||||
|
||||
public ProdLineStatusDTO setDescrizioneProd(String descrizioneProd) {
|
||||
this.descrizioneProd = descrizioneProd;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
private FragmentProdRecuperoMaterialeBinding mBinding;
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private String codJfas;
|
||||
|
||||
private final ObservableArrayList<HistoryULsListModel> mHistoryULMutableData = new ObservableArrayList<>();
|
||||
|
||||
@ -67,7 +68,12 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
}
|
||||
|
||||
public static ProdRecuperoMaterialeFragment newInstance() {
|
||||
return newInstance(null);
|
||||
}
|
||||
|
||||
public static ProdRecuperoMaterialeFragment newInstance(String codJfas) {
|
||||
ProdRecuperoMaterialeFragment fragment = new ProdRecuperoMaterialeFragment();
|
||||
fragment.setCodJfas(codJfas);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@ -96,8 +102,12 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
mViewModel.init();
|
||||
this.addOnPreDestroy(() -> {
|
||||
if (barcodeScannerIstanceID > -1) {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
}
|
||||
});
|
||||
mViewModel.init(codJfas);
|
||||
}
|
||||
|
||||
|
||||
@ -115,6 +125,15 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
public String getCodJfas() {
|
||||
return codJfas;
|
||||
}
|
||||
|
||||
public ProdRecuperoMaterialeFragment setCodJfas(String codJfas) {
|
||||
this.codJfas = codJfas;
|
||||
return this;
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
@ -133,7 +152,9 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
|
||||
mBinding.prodRecuperoMaterialeMainList.setAdapter(adapter);
|
||||
|
||||
if (mToolbar != null)
|
||||
mToolbar.setRecyclerView(mBinding.prodRecuperoMaterialeMainList);
|
||||
|
||||
}
|
||||
|
||||
private void refreshList(List<HistoryVersamentoProdULDTO> filteredList) {
|
||||
|
||||
@ -51,11 +51,11 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
this.mPrinterRESTConsumer = printerRESTConsumer;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
public void init(String codJfas) {
|
||||
this.sendOnLoadingStarted();
|
||||
new Thread(() -> {
|
||||
|
||||
mProdRecuperMaterialeRESTConsumer.loadLastULVersate(ulList -> {
|
||||
mProdRecuperMaterialeRESTConsumer.loadLastULVersate(codJfas, ulList -> {
|
||||
this.mUlList.setValue(ulList);
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
@ -151,6 +151,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
BigDecimal totalSumOfQtaCol = BigDecimal.ZERO;
|
||||
BigDecimal totalSumOfNumCnf = BigDecimal.ZERO;
|
||||
|
||||
if (SettingsManager.iDB().isFlagVersamentoDirettoProduzione()) {
|
||||
for (HistoryVersamentoProdULDTO.OrdineDto ordine : item.getOrdini()) {
|
||||
|
||||
BigDecimal qtaColToSave;
|
||||
@ -191,6 +192,39 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||
}
|
||||
} else {
|
||||
BigDecimal qtaColToSave;
|
||||
BigDecimal numCnfToSave;
|
||||
if (SettingsManager.iDB().isFlagForceAllToColli() || (item.getMtbAart() != null && !item.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||
numCnfToSave = inputNumCnf;
|
||||
qtaColToSave = numCnfToSave.multiply(inputQtaCnf).setScale(0, BigDecimal.ROUND_FLOOR);
|
||||
} else {
|
||||
qtaColToSave = inputQtaTot;
|
||||
numCnfToSave = UtilityBigDecimal.divide(qtaColToSave, item.getQtaCnf(), RoundingMode.FLOOR);
|
||||
}
|
||||
|
||||
totalSumOfQtaCol = qtaColToSave;
|
||||
totalSumOfNumCnf = numCnfToSave;
|
||||
|
||||
numCnfToSave = numCnfToSave.multiply(BigDecimal.valueOf(-1));
|
||||
qtaColToSave = qtaColToSave.multiply(BigDecimal.valueOf(-1));
|
||||
|
||||
final MtbColr mtbColrScarico = new MtbColr()
|
||||
.setCodMart(item.getCodMart())
|
||||
.setPartitaMag(UtilityString.empty2null(item.getPartitaMag()))
|
||||
.setQtaCol(qtaColToSave)
|
||||
.setQtaCnf(inputQtaCnf)
|
||||
.setNumCnf(numCnfToSave)
|
||||
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||
.setNumColloRif(item.getNumColloRif())
|
||||
.setDataColloRif(item.getDataColloRif())
|
||||
.setGestioneRif(item.getGestioneRif())
|
||||
.setSerColloRif(item.getSerColloRif());
|
||||
|
||||
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||
}
|
||||
|
||||
boolean updateQtaCnfFirstRow = false;
|
||||
|
||||
|
||||
@ -16,6 +16,9 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||
|
||||
@ -32,6 +35,10 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
loadLastULVersate(null, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void loadLastULVersate(String codJfas, RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
String sql = "WITH ul_list AS ( " +
|
||||
" SELECT jtb_fasi.cod_jfas, " +
|
||||
@ -68,7 +75,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
" AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
||||
" AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
||||
" AND mtb_colr.gestione = mtb_colt.gestione " +
|
||||
" INNER JOIN dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
||||
" " + (SettingsManager.iDB().isFlagVersamentoDirettoProduzione() ? "INNER" : "LEFT OUTER") + " join dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
||||
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
||||
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
||||
" AND dtb_ord_steps.data_iniz is not null " +
|
||||
@ -76,6 +83,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
" INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
||||
" LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
||||
" WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
||||
(UtilityString.isNullOrEmpty(codJfas) ? "" : " AND jtb_fasi.cod_jfas = " + UtilityDB.valueToString(codJfas)) +
|
||||
" AND segno = -1 " +
|
||||
" AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " +
|
||||
" GROUP BY jtb_fasi.cod_jfas, " +
|
||||
@ -177,7 +185,8 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
" ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " +
|
||||
" max_ul.max_datetime_row = ul_list.datetime_row";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {}.getType();
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {
|
||||
}.getType();
|
||||
this.mSystemRESTConsumer.<ArrayList<HistoryVersamentoProdULRestDTO>>processSql(sql, typeOfObjectsList, ulList -> {
|
||||
|
||||
if (ulList == null) {
|
||||
|
||||
@ -31,6 +31,7 @@ public class DialogInputQuantityV2DTO {
|
||||
private boolean isDataScadMandatory = false;
|
||||
private boolean isNotesAllowed = false;
|
||||
private boolean isNotesMandatory = false;
|
||||
private boolean isFocusOnStart = true;
|
||||
private boolean canLUBeClosed;
|
||||
private boolean saveOnImeDone = false;
|
||||
|
||||
@ -131,6 +132,15 @@ public class DialogInputQuantityV2DTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFocusOnStart() {
|
||||
return isFocusOnStart;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setFocusOnStart(boolean focusOnStart) {
|
||||
isFocusOnStart = focusOnStart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalQtaAvailable() {
|
||||
return UtilityBigDecimal.round(totalQtaAvailable);
|
||||
}
|
||||
|
||||
@ -170,7 +170,9 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
});
|
||||
}
|
||||
this.onLoadingEnded();
|
||||
if (mDialogInputQuantityV2DTO.isFocusOnStart()) {
|
||||
mBindings.inputNumCnfText.requestFocus();
|
||||
}
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ public class DialogScanArtView extends BaseDialogFragment implements DialogScanA
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessfull)
|
||||
.setOnScanFailed(this::onError));
|
||||
|
||||
BarcodeManager.enable();
|
||||
setBarcodeListener(true);
|
||||
}
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessfull)
|
||||
.setOnScanFailed(this::onError));
|
||||
|
||||
BarcodeManager.enable();
|
||||
setBarcodeListener(true);
|
||||
}
|
||||
|
||||
|
||||
341
app/src/main/res/layout/activity_prod_dettaglio_linea.xml
Normal file
341
app/src/main/res/layout/activity_prod_dettaglio_linea.xml
Normal file
@ -0,0 +1,341 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="androidx.core.content.ContextCompat" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaViewModel" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaActivity" />
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gray_detail_background_round8">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/header_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<it.integry.integrywmsnative.ui.ElevatedToolbar
|
||||
android:id="@+id/elevated_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize">
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
android:padding="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||
android:text="@{view.lineaLabel}"
|
||||
tools:text="L2 - Linea 2"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/add_extra_items_toolbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/ripple_effect"
|
||||
android:onClick="@{()->viewModel.settings()}"
|
||||
android:src="@drawable/ic_settings_24dp"
|
||||
android:tint="@color/colorPrimaryGray" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@{ContextCompat.getDrawable(context, view.isStarted.get() ? R.drawable.ic_baseline_play_arrow_24 : view.isPaused.get() ? R.drawable.ic_baseline_pause_24 : R.drawable.ic_baseline_stop_24)}"
|
||||
app:tint="@{ContextCompat.getColor(context, view.isStarted.get() ? R.color.green_600 : view.isPaused.get() ? R.color.orange_600 : R.color.red_600)}"
|
||||
tools:tint="@color/green_600"
|
||||
tools:src="@drawable/ic_baseline_play_arrow_24" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/peso_lordo_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:text="@{view.isStarted.get() ? R.string.in_progress : view.isPaused.get() ? R.string.stand_by : R.string.stopped}"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||
app:textColor="@{ContextCompat.getColor(context, view.isStarted.get() ? R.color.green_600 : view.isPaused.get() ? R.color.orange_600 : R.color.red_600)}"
|
||||
tools:textColor="@color/green_600"
|
||||
android:textStyle="bold"
|
||||
tools:text="In lavorazione" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:visibility="@{view.isStarted}"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/risorse_impostate"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="Risorse assegnate" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
app:text="@{view.hrNum}"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:textStyle="bold"
|
||||
tools:text="25" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
app:visibility="@{view.flagShowProdInfo}"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="16dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/production_in_progress"
|
||||
tools:text="Lavorazione in corso"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.TextBoxGroupTitleDashboard" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/article"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="Articolo" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
app:text="@{view.codMart}"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:textStyle="bold"
|
||||
tools:text="150150-09" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/batch_lot"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="Lotto" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
app:text="@{view.partitaMag}"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:textStyle="bold"
|
||||
tools:text="20220530" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/label_descrizione"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/description"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Descrizione" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/label_descrizione"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:text="@{view.productDescription}"
|
||||
tools:text="UVA VITTORIA IN CASSE " />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/orders_in_progress"
|
||||
tools:text="Ordini in lavorazione"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/orders_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
</HorizontalScrollView>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="16dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/versamento_merce_fragment_title"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.TextBoxGroupTitleDashboard" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/scan_art_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintTop_toBottomOf="@id/header_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/scan_lu_to_deposit"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
||||
@ -8,18 +8,19 @@
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="androidx.core.content.ContextCompat" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="androidx.core.content.ContextCompat" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
|
||||
<variable
|
||||
type="it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs.BottomSheetLineAction"
|
||||
type="it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.BottomSheetLineAction"
|
||||
name="view" />
|
||||
|
||||
<variable
|
||||
@ -32,7 +33,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
android:padding="16dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/descriptionLayout"
|
||||
@ -202,6 +203,30 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{()->view.onRecoverClicked()}"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_black_download" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:text="@string/prod_recupero_materiale_title_fragment" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/scan_label"
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
<string name="picking_not_available">Picking non disponibile</string>
|
||||
<string name="scan_item">Scansiona il codice a barre di un <b>articolo</b></string>
|
||||
<string name="please_open_lu">Prima di procedere apri una <b>nuova UL</b></string>
|
||||
<string name="scan_lu_to_deposit">Scansiona il codice a barre di una <b>UL</b> per versarla</string>
|
||||
<string name="extra_item">Articolo extra</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="lu_info">Info UL</string>
|
||||
@ -396,12 +397,16 @@
|
||||
<string name="in_progress">In lavorazione</string>
|
||||
<string name="stand_by">In pausa</string>
|
||||
<string name="stopped">Ferma</string>
|
||||
<string name="risorse_impostate">Risorse allocate</string>
|
||||
<string name="risorse_impostate">Risorse assegnate</string>
|
||||
<string name="orders_in_progress">Ordini in lavorazione</string>
|
||||
<string name="production_in_progress">Lavorazione in corso</string>
|
||||
<string name="ridistribuisci_risorse">Assegna risorse</string>
|
||||
<string name="avvia_nuova_produzione">Avvia nuova produzione</string>
|
||||
<string name="arresta_produzione">Arresta produzione</string>
|
||||
<string name="inizio_produzione">Inizio produzione</string>
|
||||
<string name="ultima_produzione">Ultima produzione</string>
|
||||
<string name="nessuna_linea_disponibile">Nessuna linea disponibile</string>
|
||||
<string name="line_details">Dettaglio linea</string>
|
||||
<string name="materiali_versati">Materiali versati</string>
|
||||
<string name="scan_lu_to_recover">Scansiona il codice a barre della <b>UL</b> da recuperare</string>
|
||||
</resources>
|
||||
@ -118,6 +118,7 @@
|
||||
<string name="scan_item">Please scan an <b>item</b> barcode</string>
|
||||
<string name="extra_item">Extra item</string>
|
||||
<string name="piece">Piece</string>
|
||||
<string name="scan_lu_to_deposit">Please scan a <b>LU barcode</b> to deposit</string>
|
||||
|
||||
<string name="password_error_length">between 3 and 30 alphanumeric characters</string>
|
||||
<string name="username_error_not_valid">enter a valid username</string>
|
||||
@ -404,10 +405,14 @@
|
||||
<string name="stopped">Stopped</string>
|
||||
<string name="risorse_impostate">Resources set</string>
|
||||
<string name="orders_in_progress">Orders in progress</string>
|
||||
<string name="production_in_progress">Production in progress</string>
|
||||
<string name="ridistribuisci_risorse">Set resources</string>
|
||||
<string name="avvia_nuova_produzione">Start production</string>
|
||||
<string name="arresta_produzione">Stop production</string>
|
||||
<string name="inizio_produzione">Production start</string>
|
||||
<string name="ultima_produzione">Last production</string>
|
||||
<string name="nessuna_linea_disponibile">No production line available</string>
|
||||
<string name="line_details">Line details</string>
|
||||
<string name="materiali_versati">Deposited products</string>
|
||||
<string name="scan_lu_to_recover">Please scan the <b>LU barcode</b> to recover</string>
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user