Implementata richiesta commessa in PickingLibero di Lavorazione.
Implementato servizio di spostamento arts tra UL in PickingLibero. Implementata generazione documenti in CloseUDS in PickingLibero.
This commit is contained in:
parent
1463510b08
commit
7ee59ea814
8
.idea/deploymentTargetSelector.xml
generated
8
.idea/deploymentTargetSelector.xml
generated
@ -4,6 +4,14 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2024-09-13T09:26:42.884931500Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=R52T60AZ93A" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
<DialogSelection />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
|
||||
@ -92,7 +92,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
@ -103,16 +103,16 @@ dependencies {
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:32.8.1')
|
||||
implementation platform('com.google.firebase:firebase-bom:33.2.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.3.0'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.4.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.11.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||
@ -127,12 +127,12 @@ dependencies {
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.5'
|
||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
def dagger2_version = '2.46.1'
|
||||
def dagger2_version = '2.49'
|
||||
api "com.google.dagger:dagger:$dagger2_version"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||
|
||||
@ -110,6 +110,8 @@ import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetM
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_commessa.DialogAskCommessaComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_commessa.DialogAskCommessaModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_unknown_barcode_notes.DialogAskUnknownBarcodeNotesComponent;
|
||||
@ -215,7 +217,8 @@ import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracc
|
||||
DialogInfoGiacenzaModule.class,
|
||||
ArticoliInGiacenzaModule.class,
|
||||
DialogTracciamentoImballiModule.class,
|
||||
DialogAskVettoreModule.class
|
||||
DialogAskVettoreModule.class,
|
||||
DialogAskCommessaModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@ -361,6 +364,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
DialogAskVettoreComponent.Factory dialogAskVettoreComponent();
|
||||
|
||||
DialogAskCommessaComponent.Factory dialogAskCommessaComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
@ -88,7 +88,8 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setTitleText(R.string.free_picking)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
|
||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(R.string.free_picking, GestioneEnum.VENDITA, SettingsManager.iDB().isFlagAskClienteInPickingLibero(), false)))
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(R.string.free_picking, GestioneEnum.VENDITA,
|
||||
SettingsManager.iDB().isFlagAskClienteInPickingLibero(), false, false)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_cliente)
|
||||
@ -124,7 +125,8 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setTitleText(R.string.free_lav_picking)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
|
||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(R.string.free_lav_picking, GestioneEnum.LAVORAZIONE, SettingsManager.iDB().isFlagAskClienteInPickingLibero(), false)))
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(R.string.free_lav_picking, GestioneEnum.LAVORAZIONE,
|
||||
SettingsManager.iDB().isFlagAskClienteInPickingLibero(), false, SettingsManager.iDB().isFlagAskCommessaInPickingLiberoLav())))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_posizionamento_da_ord)
|
||||
@ -180,7 +182,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setTitleText(R.string.prod_versamento_su_ordine_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_su_ord)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(R.string.prod_versamento_su_ordine_title_fragment, GestioneEnum.LAVORAZIONE, false, true)))
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(R.string.prod_versamento_su_ordine_title_fragment, GestioneEnum.LAVORAZIONE, false, true, false)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_riposizionamento_da_ord)
|
||||
|
||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.model;
|
||||
public class JtbComt extends EntityBase {
|
||||
|
||||
private String codJcom;
|
||||
private String codAnag;
|
||||
private String codJfas;
|
||||
private String codJflav;
|
||||
private String descrizione;
|
||||
@ -20,6 +21,15 @@ public class JtbComt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public JtbComt setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJfas() {
|
||||
return codJfas;
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
@ -497,8 +498,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
new Thread(() -> {
|
||||
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, boolean flagForceUseRefs, RunnableArgs<List<MtbColr>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
|
||||
MtbColt mtbColtDestClone = (MtbColt) destMtbColt.clone();
|
||||
|
||||
@ -512,23 +512,23 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
|
||||
.setSourceMtbColt(mtbColtToMoveClone)
|
||||
.setDestinationMtbColt(mtbColtDestClone);
|
||||
.setDestinationMtbColt(mtbColtDestClone)
|
||||
.setFlagForceUseRefs(flagForceUseRefs);
|
||||
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService.spostaArtsTraUL(spostaArtsTraULRequestDTO).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
public void onResponse(Call<ServiceRESTResponse<SpostaArtsTraULResponseDTO>> call, Response<ServiceRESTResponse<SpostaArtsTraULResponseDTO>> response) {
|
||||
analyzeAnswer(response, "spostaArtsTraUL", data -> {
|
||||
onComplete.run();
|
||||
onComplete.run(data.getGeneratedMtbColr());
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
public void onFailure(Call<ServiceRESTResponse<SpostaArtsTraULResponseDTO>> call, Throwable t) {
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}).start();
|
||||
}
|
||||
|
||||
public void assegnaLottoSuColloScarico(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
@ -7,6 +7,7 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
@ -35,7 +36,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
||||
Call<ServiceRESTResponse<Object>> spostaULInPosizione(@Query("codMdep") String codMdep, @Query("posizione") String posizione, @Body MtbColt mtbColtToMove);
|
||||
|
||||
@POST("wms/spostaArtsTraUL")
|
||||
Call<ServiceRESTResponse<Object>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
||||
Call<ServiceRESTResponse<SpostaArtsTraULResponseDTO>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
||||
|
||||
@POST("wms/assegnaLottoSuColloScarico")
|
||||
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
package it.integry.integrywmsnative.core.rest.model;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public enum CriterioDistribuzioneEnum {
|
||||
@SerializedName("U")
|
||||
U("U"), //AGGIORNA IL COLLO ESISTENTE
|
||||
|
||||
@SerializedName("O")
|
||||
O("O"), //DIVIDE IL COLLO INIZIALE PER ORDINE
|
||||
|
||||
@SerializedName("G")
|
||||
G("G"), //DIVIDE IL COLLO INIZIALE PER IL GRUPPO BOLLA DEGLI ARTICOLI
|
||||
|
||||
@SerializedName("UP")
|
||||
UP("UP"), //SI TRATTA DI UN COLLO DI LAVORAZIONE CHE HA SULLE RIGHE I RIFERIMENTI DELL'ORDINE DI PRODUZIONE (GESTIONE_RIF = 'A')
|
||||
//E VIENE LANCIATA LA NORMALE DISTRIBUZIONE MA NELL'AGGIORNARE IL COLLO VENGONO LETTI I RIFERIMENTI DELL'ORDINE DI LAVORAZIOKNE
|
||||
// A CUI LA CHIAVE DATA,NUMERO E RIGA ORDINE FANNO RIFERIMENTO
|
||||
|
||||
|
||||
@SerializedName("FASE")
|
||||
FASE("FASE");
|
||||
|
||||
private final String text;
|
||||
|
||||
CriterioDistribuzioneEnum(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
|
||||
public String getText() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
public static CriterioDistribuzioneEnum fromString(String text) {
|
||||
for (CriterioDistribuzioneEnum b : CriterioDistribuzioneEnum.values()) {
|
||||
if (b.text.equalsIgnoreCase(text)) return b;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -9,6 +9,8 @@ public class SpostaArtsTraULRequestDTO {
|
||||
|
||||
private MtbColt destinationMtbColt;
|
||||
|
||||
private boolean flagForceUseRefs;
|
||||
|
||||
public MtbColt getSourceMtbColt() {
|
||||
return sourceMtbColt;
|
||||
}
|
||||
@ -27,4 +29,12 @@ public class SpostaArtsTraULRequestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagForceUseRefs() {
|
||||
return flagForceUseRefs;
|
||||
}
|
||||
|
||||
public SpostaArtsTraULRequestDTO setFlagForceUseRefs(boolean flagForceUseRefs) {
|
||||
this.flagForceUseRefs = flagForceUseRefs;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package it.integry.integrywmsnative.core.rest.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class SpostaArtsTraULResponseDTO {
|
||||
private List<MtbColr> generatedMtbColr;
|
||||
|
||||
public List<MtbColr> getGeneratedMtbColr() {
|
||||
return generatedMtbColr;
|
||||
}
|
||||
|
||||
public SpostaArtsTraULResponseDTO setGeneratedMtbColr(List<MtbColr> generatedMtbColr) {
|
||||
this.generatedMtbColr = generatedMtbColr;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.CriterioDistribuzioneEnum;
|
||||
|
||||
public class CloseUDSRequestDTO {
|
||||
|
||||
@ -8,6 +9,20 @@ public class CloseUDSRequestDTO {
|
||||
private String orderCodMdep;
|
||||
private MtbColt mtbColt;
|
||||
|
||||
private boolean createDocument;
|
||||
private String documentCodDtip;
|
||||
private String documentCodAnag;
|
||||
|
||||
private CriterioDistribuzioneEnum criterioDistribuzione;
|
||||
|
||||
public boolean isCreateDocument() {
|
||||
return createDocument;
|
||||
}
|
||||
|
||||
public String getDocumentCodDtip() {
|
||||
return documentCodDtip;
|
||||
}
|
||||
|
||||
public boolean isPrintSSCC() {
|
||||
return printSSCC;
|
||||
}
|
||||
@ -34,4 +49,32 @@ public class CloseUDSRequestDTO {
|
||||
this.mtbColt = mtbColt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CloseUDSRequestDTO setCreateDocument(boolean createDocument) {
|
||||
this.createDocument = createDocument;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CloseUDSRequestDTO setDocumentCodDtip(String documentCodDtip) {
|
||||
this.documentCodDtip = documentCodDtip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDocumentCodAnag() {
|
||||
return documentCodAnag;
|
||||
}
|
||||
|
||||
public CloseUDSRequestDTO setDocumentCodAnag(String documentCodAnag) {
|
||||
this.documentCodAnag = documentCodAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CriterioDistribuzioneEnum getCriterioDistribuzione() {
|
||||
return criterioDistribuzione;
|
||||
}
|
||||
|
||||
public CloseUDSRequestDTO setCriterioDistribuzione(CriterioDistribuzioneEnum criterioDistribuzione) {
|
||||
this.criterioDistribuzione = criterioDistribuzione;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.DtbDoct;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class CloseUDSResponseDTO {
|
||||
@ -9,6 +10,7 @@ public class CloseUDSResponseDTO {
|
||||
private boolean deleted;
|
||||
|
||||
private List<MtbColt> generatedMtbColts;
|
||||
private DtbDoct generatedDocument;
|
||||
|
||||
public boolean isSaved() {
|
||||
return saved;
|
||||
@ -21,4 +23,8 @@ public class CloseUDSResponseDTO {
|
||||
public List<MtbColt> getGeneratedMtbColts() {
|
||||
return generatedMtbColts;
|
||||
}
|
||||
|
||||
public DtbDoct getGeneratedDocument() {
|
||||
return generatedDocument;
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,8 @@ public class InsertUDSRowRequestDTO {
|
||||
private String partitaMag;
|
||||
private LocalDate dataScad;
|
||||
|
||||
private String codJcom;
|
||||
|
||||
public MtbColr getSourceMtbColr() {
|
||||
return sourceMtbColr;
|
||||
}
|
||||
@ -89,4 +91,13 @@ public class InsertUDSRowRequestDTO {
|
||||
this.dataScad = dataScad;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJcom() {
|
||||
return codJcom;
|
||||
}
|
||||
|
||||
public InsertUDSRowRequestDTO setCodJcom(String codJcom) {
|
||||
this.codJcom = codJcom;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ public class DBSettingsModel {
|
||||
private boolean flagMultiClienteOrdV;
|
||||
private boolean flagUseCodAnagAziendale;
|
||||
private boolean flagAskClienteInPickingLibero;
|
||||
private boolean flagAskCommessaInPickingLiberoLav;
|
||||
private boolean flagPickLiberoAllowEmptyCliente;
|
||||
|
||||
private boolean flagCanAddExtraItemSpedizione;
|
||||
@ -82,6 +83,10 @@ public class DBSettingsModel {
|
||||
private boolean flagAskDuplicateUDSSpedizione = false;
|
||||
private boolean suggestDataScad = false;
|
||||
private String docInterniRequestNumDoc;
|
||||
private String produzioneCodDtipCar;
|
||||
private boolean produzioneGeneraDocCar;
|
||||
private String produzioneCodDtipScar;
|
||||
private boolean produzioneGeneraDocScar;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@ -172,6 +177,15 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagAskCommessaInPickingLiberoLav() {
|
||||
return flagAskCommessaInPickingLiberoLav;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagAskCommessaInPickingLiberoLav(boolean flagAskCommessaInPickingLiberoLav) {
|
||||
this.flagAskCommessaInPickingLiberoLav = flagAskCommessaInPickingLiberoLav;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagPickLiberoAllowEmptyCliente() {
|
||||
return flagPickLiberoAllowEmptyCliente;
|
||||
}
|
||||
@ -703,4 +717,40 @@ public class DBSettingsModel {
|
||||
this.docInterniRequestNumDoc = docInterniRequestNumDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProduzioneCodDtipCar() {
|
||||
return produzioneCodDtipCar;
|
||||
}
|
||||
|
||||
public DBSettingsModel setProduzioneCodDtipCar(String produzioneCodDtipCar) {
|
||||
this.produzioneCodDtipCar = produzioneCodDtipCar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isProduzioneGeneraDocCar() {
|
||||
return produzioneGeneraDocCar;
|
||||
}
|
||||
|
||||
public DBSettingsModel setProduzioneGeneraDocCar(boolean produzioneGeneraDocCar) {
|
||||
this.produzioneGeneraDocCar = produzioneGeneraDocCar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProduzioneCodDtipScar() {
|
||||
return produzioneCodDtipScar;
|
||||
}
|
||||
|
||||
public DBSettingsModel setProduzioneCodDtipScar(String produzioneCodDtipScar) {
|
||||
this.produzioneCodDtipScar = produzioneCodDtipScar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isProduzioneGeneraDocScar() {
|
||||
return produzioneGeneraDocScar;
|
||||
}
|
||||
|
||||
public DBSettingsModel setProduzioneGeneraDocScar(boolean produzioneGeneraDocScar) {
|
||||
this.produzioneGeneraDocScar = produzioneGeneraDocScar;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,6 +228,11 @@ public class SettingsManager {
|
||||
.setSection("PICKING_LIBERO")
|
||||
.setKeySection("FLAG_ASK_CLIENTE")
|
||||
.setSetter(dbSettingsModelIstance::setFlagAskClienteInPickingLibero));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("PICKING_LIBERO")
|
||||
.setKeySection("FLAG_ASK_COMMESSA_LAV")
|
||||
.setSetter(dbSettingsModelIstance::setFlagAskCommessaInPickingLiberoLav));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("PICKING_LIBERO")
|
||||
@ -563,6 +568,30 @@ public class SettingsManager {
|
||||
.setKeySection("REQUEST_NUM_DOC")
|
||||
.setSetter(dbSettingsModelIstance::setDocInterniRequestNumDoc));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("W_PORDI_RC")
|
||||
.setSection("SETUP_DOCUMENTI")
|
||||
.setKeySection("COD_DTIP_CAR")
|
||||
.setSetter(dbSettingsModelIstance::setProduzioneCodDtipCar));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("PRODUZIONE")
|
||||
.setKeySection("FLAG_GENERA_DOC_CAR")
|
||||
.setSetter(dbSettingsModelIstance::setProduzioneGeneraDocCar));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("W_PORDI_RC")
|
||||
.setSection("SETUP_DOCUMENTI")
|
||||
.setKeySection("COD_DTIP_SCAR")
|
||||
.setSetter(dbSettingsModelIstance::setProduzioneCodDtipScar));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("PRODUZIONE")
|
||||
.setKeySection("FLAG_GENERA_DOC_SCAR")
|
||||
.setSetter(dbSettingsModelIstance::setProduzioneGeneraDocScar));
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
|
||||
|
||||
|
||||
@ -92,13 +92,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
private final List<HistoryMtbAartDTO> mHistoryUsedAarts = new ArrayList<>();
|
||||
|
||||
@Inject
|
||||
public AccettazioneBollaPickingViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||
BarcodeRESTConsumer barcodeRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
PrinterRESTConsumer printerRESTConsumer,
|
||||
AccettazioneBollaPickingRESTConsumer accettazioneBollaPickingRESTConsumer,
|
||||
ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer,
|
||||
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
|
||||
public AccettazioneBollaPickingViewModel(ArticoloRESTConsumer articoloRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, AccettazioneBollaPickingRESTConsumer accettazioneBollaPickingRESTConsumer, ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer, ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
|
||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||
@ -112,20 +106,14 @@ public class AccettazioneBollaPickingViewModel {
|
||||
this.mBolle = bolle;
|
||||
this.mUseQtaBolla = useQtaOrd;
|
||||
|
||||
List<SitBollaAccettazioneDTO> mSitArts = Stream.of(sitArts)
|
||||
.filter(x ->
|
||||
UtilityBigDecimal.greaterThan(x.getQtaDaAccettare(), BigDecimal.ZERO))
|
||||
.toList();
|
||||
List<SitBollaAccettazioneDTO> mSitArts = Stream.of(sitArts).filter(x -> UtilityBigDecimal.greaterThan(x.getQtaDaAccettare(), BigDecimal.ZERO)).toList();
|
||||
|
||||
getEmptyPickingList(mSitArts, this.mPickingList::postValue);
|
||||
|
||||
|
||||
defaultGestioneOfUL = GestioneEnum.ACQUISTO;
|
||||
|
||||
var availableCodAnags = bolle.stream()
|
||||
.map(TestataBollaAccettazioneDTO::getCodAnag)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
var availableCodAnags = bolle.stream().map(TestataBollaAccettazioneDTO::getCodAnag).distinct().collect(Collectors.toList());
|
||||
defaultCodAnag = availableCodAnags.size() == 1 ? availableCodAnags.get(0) : null;
|
||||
|
||||
switch (defaultGestioneOfUL) {
|
||||
@ -136,13 +124,10 @@ public class AccettazioneBollaPickingViewModel {
|
||||
|
||||
private void getEmptyPickingList(List<SitBollaAccettazioneDTO> sitBolleList, RunnableArgs<List<PickingObjectDTO>> onComplete) {
|
||||
|
||||
List<String> codMarts = Stream.of(sitBolleList)
|
||||
.map(SitBollaAccettazioneDTO::getCodMart)
|
||||
.toList();
|
||||
List<String> codMarts = Stream.of(sitBolleList).map(SitBollaAccettazioneDTO::getCodMart).toList();
|
||||
|
||||
this.mArticoloRESTConsumer.getByCodMarts(codMarts, listMtbAarts -> {
|
||||
List<PickingObjectDTO> pickingList = Stream.of(sitBolleList)
|
||||
.map(sitBolla -> {
|
||||
List<PickingObjectDTO> pickingList = Stream.of(sitBolleList).map(sitBolla -> {
|
||||
MtbAart mtbAart = null;
|
||||
|
||||
for (MtbAart mtbAartItem : listMtbAarts) {
|
||||
@ -152,11 +137,8 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
return new PickingObjectDTO()
|
||||
.setSitBollaAccettazione(sitBolla)
|
||||
.setMtbAart(mtbAart);
|
||||
})
|
||||
.toList();
|
||||
return new PickingObjectDTO().setSitBollaAccettazione(sitBolla).setMtbAart(mtbAart);
|
||||
}).toList();
|
||||
|
||||
onComplete.run(pickingList);
|
||||
}, this::sendError);
|
||||
@ -219,9 +201,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
|
||||
try {
|
||||
numCollo = UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue());
|
||||
this.createNewLU(
|
||||
numCollo,
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, true, onComplete);
|
||||
this.createNewLU(numCollo, CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, true, onComplete);
|
||||
} catch (Exception ex) {
|
||||
this.sendError(ex);
|
||||
}
|
||||
@ -234,11 +214,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
private void processBarcodeNotOpenedLU(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.createNewLU(
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
() -> processBarcodeAlreadyOpenedLU(barcodeScanDTO, onComplete));
|
||||
this.createNewLU(null, null, false, () -> processBarcodeAlreadyOpenedLU(barcodeScanDTO, onComplete));
|
||||
}
|
||||
|
||||
private void processBarcodeAlreadyOpenedLU(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
@ -301,9 +277,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
|
||||
private void executeEtichettaPosizione(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
|
||||
var optionalPos = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||
.filter(x -> x.getPosizione().equalsIgnoreCase(barcodeScanDTO.getStringValue()))
|
||||
.findFirst();
|
||||
var optionalPos = Stream.of(SettingsManager.iDB().getAvailablePosizioni()).filter(x -> x.getPosizione().equalsIgnoreCase(barcodeScanDTO.getStringValue())).findFirst();
|
||||
|
||||
this.sendFilterPosizioneApplied(optionalPos.get().getPosizione());
|
||||
onComplete.run();
|
||||
@ -325,9 +299,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
private void searchArtFromAnag(MtbAart mtbAart, PickDataDTO pickData, Runnable onComplete) {
|
||||
final List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
|
||||
List<PickingObjectDTO> matchPickingObject = Stream.of(pickingList)
|
||||
.filter(x -> UtilityString.equalsIgnoreCase(mtbAart.getCodMart(), x.getSitBollaAccettazione().getCodMart()))
|
||||
.toList();
|
||||
List<PickingObjectDTO> matchPickingObject = Stream.of(pickingList).filter(x -> UtilityString.equalsIgnoreCase(mtbAart.getCodMart(), x.getSitBollaAccettazione().getCodMart())).toList();
|
||||
|
||||
for (PickingObjectDTO pickingObjectDTO : matchPickingObject) {
|
||||
pickingObjectDTO.setTempPickData(pickData);
|
||||
@ -344,11 +316,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
this.manageDispatchBollaRow(matchedRows.get(0));
|
||||
} else {
|
||||
//So che il codMart sarà solo 1
|
||||
var firstCodMart = Stream.of(matchedRows)
|
||||
.map(x -> x.getSitBollaAccettazione().getCodMart())
|
||||
.distinct()
|
||||
.findFirst()
|
||||
.get();
|
||||
var firstCodMart = Stream.of(matchedRows).map(x -> x.getSitBollaAccettazione().getCodMart()).distinct().findFirst().get();
|
||||
|
||||
this.sendFilterCodMartApplied(firstCodMart);
|
||||
}
|
||||
@ -359,14 +327,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
if (SettingsManager.iDB().isFlagAccettazioneBollaCanAddUnknownBarcodes()) {
|
||||
//TODO: Implementare popup che richiede delle note aggiuntive sul barcode scansionato
|
||||
this.sendOnUnknownBarcodeScanned(barcode, notes -> {
|
||||
this.manageDispatchBollaRow(new PickingObjectDTO()
|
||||
.setMtbAart(new MtbAart()
|
||||
.setDescrizione(notes)
|
||||
.setDescrizioneEstesa(notes)
|
||||
.setFlagTracciabilita("N")
|
||||
.setFlagQtaCnfFissa("S")
|
||||
.setQtaCnf(BigDecimal.ONE)
|
||||
.setBarCode(barcode)));
|
||||
this.manageDispatchBollaRow(new PickingObjectDTO().setMtbAart(new MtbAart().setDescrizione(notes).setDescrizioneEstesa(notes).setFlagTracciabilita("N").setFlagQtaCnfFissa("S").setQtaCnf(BigDecimal.ONE).setBarCode(barcode)));
|
||||
onComplete.run();
|
||||
}, onComplete);
|
||||
} else {
|
||||
@ -378,29 +339,19 @@ public class AccettazioneBollaPickingViewModel {
|
||||
private void manageNoArtFound(MtbAart mtbAart, PickDataDTO pickDataDTO) {
|
||||
if (SettingsManager.iDB().isFlagAccettazioneBollaCanAddUnknownItems()) {
|
||||
|
||||
this.manageDispatchBollaRow(new PickingObjectDTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setTempPickData(pickDataDTO));
|
||||
} else
|
||||
this.sendError(new NoArtsFoundException());
|
||||
this.manageDispatchBollaRow(new PickingObjectDTO().setMtbAart(mtbAart).setTempPickData(pickDataDTO));
|
||||
} else this.sendError(new NoArtsFoundException());
|
||||
}
|
||||
|
||||
public void createNewLU(Integer customNumCollo, String customSerCollo, boolean disablePrint, Runnable onComplete) {
|
||||
this.manageInfoAggiuntiveRequest((additionalNotes, tCol) -> {
|
||||
|
||||
final CreateUDCRequestDTO createUDCRequestDTO = new CreateUDCRequestDTO()
|
||||
.setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep())
|
||||
.setAnnotazioni(additionalNotes)
|
||||
.setCodTcol(tCol != null ? tCol.getCodTcol() : null)
|
||||
.setNumCollo(customNumCollo)
|
||||
.setSerCollo(customSerCollo)
|
||||
.setCodAnag(defaultCodAnag);
|
||||
final CreateUDCRequestDTO createUDCRequestDTO = new CreateUDCRequestDTO().setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep()).setAnnotazioni(additionalNotes).setCodTcol(tCol != null ? tCol.getCodTcol() : null).setNumCollo(customNumCollo).setSerCollo(customSerCollo).setCodAnag(defaultCodAnag);
|
||||
|
||||
this.mColliCaricoRESTConsumer.createUDC(createUDCRequestDTO, createdUDS -> {
|
||||
this.mCurrentMtbColt = createdUDS;
|
||||
|
||||
this.mCurrentMtbColt.setMtbColr(new ObservableArrayList<>())
|
||||
.setDisablePrint(disablePrint);
|
||||
this.mCurrentMtbColt.setMtbColr(new ObservableArrayList<>()).setDisablePrint(disablePrint);
|
||||
|
||||
if (onComplete != null) onComplete.run();
|
||||
this.sendLUOpened(createdUDS);
|
||||
@ -429,13 +380,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
if (SettingsManager.iDB().isFlagAccettazioneBollaEnableFastPick()) {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
BigDecimal.ONE,
|
||||
pickingObjectDTO.getMtbAart().getQtaCnf(),
|
||||
pickingObjectDTO.getMtbAart().getQtaCnf(),
|
||||
partitaMag,
|
||||
null,
|
||||
false);
|
||||
this.saveNewRow(pickingObjectDTO, BigDecimal.ONE, pickingObjectDTO.getMtbAart().getQtaCnf(), pickingObjectDTO.getMtbAart().getQtaCnf(), partitaMag, null, false);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -447,14 +392,13 @@ public class AccettazioneBollaPickingViewModel {
|
||||
dispatchBollaRow(pickingObjectDTO, false);
|
||||
}
|
||||
|
||||
public void dispatchBollaRow(final PickingObjectDTO pickingObjectDTO, boolean longClick) {
|
||||
public void dispatchBollaRow(final PickingObjectDTO pickingObjectDTO, boolean executeImmediately) {
|
||||
if (this.mCurrentMtbColt == null) return;
|
||||
|
||||
AtomicBigDecimal numCnfWithdrawRows = new AtomicBigDecimal();
|
||||
AtomicBigDecimal qtaColWithdrawRows = new AtomicBigDecimal();
|
||||
|
||||
Stream.of(pickingObjectDTO.getWithdrawMtbColrs())
|
||||
.forEach(row -> {
|
||||
pickingObjectDTO.getWithdrawMtbColrs().forEach(row -> {
|
||||
numCnfWithdrawRows.addAndGet(row.getNumCnf());
|
||||
qtaColWithdrawRows.addAndGet(row.getQtaCol());
|
||||
});
|
||||
@ -555,8 +499,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
if (!this.mUseQtaBolla) {
|
||||
if (UtilityBigDecimal.greaterThan(pickingObjectDTO.getMtbAart().getColliPedana(), BigDecimal.ZERO) &&
|
||||
UtilityBigDecimal.greaterThan(initialNumCnf, pickingObjectDTO.getMtbAart().getColliPedana())) {
|
||||
if (UtilityBigDecimal.greaterThan(pickingObjectDTO.getMtbAart().getColliPedana(), BigDecimal.ZERO) && UtilityBigDecimal.greaterThan(initialNumCnf, pickingObjectDTO.getMtbAart().getColliPedana())) {
|
||||
initialNumCnf = pickingObjectDTO.getMtbAart().getColliPedana();
|
||||
initialQtaTot = initialNumCnf.multiply(initialQtaCnf);
|
||||
} else if (UtilityBigDecimal.greaterThan(initialNumCnf, BigDecimal.ONE) && pickingObjectDTO.getMtbAart().isFlagQtaCnfFissaBoolean()) {
|
||||
@ -571,10 +514,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
if (partitaMag == null && dataScad == null) {
|
||||
HistoryMtbAartDTO historyMtbAartDTO =
|
||||
pickingObjectDTO.getMtbAart().getCodMart() != null ?
|
||||
this.getHistoryItemByCodMartIfExists(pickingObjectDTO.getMtbAart().getCodMart()) :
|
||||
this.getHistoryItemByBarcodeIfExists(pickingObjectDTO.getMtbAart().getBarCode());
|
||||
HistoryMtbAartDTO historyMtbAartDTO = pickingObjectDTO.getMtbAart().getCodMart() != null ? this.getHistoryItemByCodMartIfExists(pickingObjectDTO.getMtbAart().getCodMart()) : this.getHistoryItemByBarcodeIfExists(pickingObjectDTO.getMtbAart().getBarCode());
|
||||
|
||||
if (historyMtbAartDTO != null) {
|
||||
partitaMag = historyMtbAartDTO.getPartitaMag();
|
||||
@ -582,48 +522,18 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
if (!longClick){
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
initialNumCnf, initialQtaCnf, initialQtaTot,
|
||||
qtaDaEvadere,
|
||||
numCnfDaEvadere,
|
||||
qtaCnfDaEvadere,
|
||||
qtaColDaPrelevare,
|
||||
numCnfDaPrelevare,
|
||||
qtaCnfDaPrelevare,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
partitaMag,
|
||||
dataScad,
|
||||
true,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag(),
|
||||
pickedQuantityDTO.getDataScad(),
|
||||
shouldCloseLU);
|
||||
});
|
||||
if (executeImmediately) {
|
||||
this.saveNewRow(pickingObjectDTO, initialNumCnf, initialQtaCnf, initialQtaTot, partitaMag, dataScad, false);
|
||||
} else {
|
||||
this.saveNewRow(
|
||||
pickingObjectDTO,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
partitaMag,
|
||||
dataScad,
|
||||
false);
|
||||
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), initialNumCnf, initialQtaCnf, initialQtaTot, qtaDaEvadere, numCnfDaEvadere, qtaCnfDaEvadere, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, null, null, null, partitaMag, dataScad, true, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal
|
||||
qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
||||
resetMatchedRows();
|
||||
|
||||
@ -640,31 +550,16 @@ public class AccettazioneBollaPickingViewModel {
|
||||
var sitBolla = pickingObjectDTO.getSitBollaAccettazione();
|
||||
var firstAvailableBolla = mBolle.get(0);
|
||||
|
||||
var insertUDCRowRequestDto = new InsertUDCRowRequestDTO()
|
||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
.setDescrizione(pickingObjectDTO.getMtbAart().getCodMart() == null ? pickingObjectDTO.getMtbAart().getDescrizione() : null)
|
||||
.setBarcode(pickingObjectDTO.getMtbAart().getBarCode())
|
||||
.setQtaTot(qtaTot)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf)
|
||||
.setPartitaMag(partitaMag)
|
||||
var insertUDCRowRequestDto = new InsertUDCRowRequestDTO().setCodMart(pickingObjectDTO.getMtbAart().getCodMart()).setDescrizione(pickingObjectDTO.getMtbAart().getCodMart() == null ? pickingObjectDTO.getMtbAart().getDescrizione() : null).setBarcode(pickingObjectDTO.getMtbAart().getBarCode()).setQtaTot(qtaTot).setQtaCnf(qtaCnf).setNumCnf(numCnf).setPartitaMag(partitaMag)
|
||||
// .setCodJcom(pickingObjectDTO.getSitBollaAccettazione().getCodJcom())
|
||||
.setDataDoc(sitBolla != null ? sitBolla.getDataDoc() : firstAvailableBolla.getDataDoc())
|
||||
.setNumDoc(sitBolla != null ? sitBolla.getNumDoc() : firstAvailableBolla.getNumDoc())
|
||||
.setCodDtip(sitBolla != null ? sitBolla.getCodDtip() : firstAvailableBolla.getCodDtip())
|
||||
.setSerDoc(sitBolla != null ? sitBolla.getSerDoc() : firstAvailableBolla.getSerDoc())
|
||||
.setTargetMtbColt(clonedTargetMtbColt);
|
||||
.setDataDoc(sitBolla != null ? sitBolla.getDataDoc() : firstAvailableBolla.getDataDoc()).setNumDoc(sitBolla != null ? sitBolla.getNumDoc() : firstAvailableBolla.getNumDoc()).setCodDtip(sitBolla != null ? sitBolla.getCodDtip() : firstAvailableBolla.getCodDtip()).setSerDoc(sitBolla != null ? sitBolla.getSerDoc() : firstAvailableBolla.getSerDoc()).setTargetMtbColt(clonedTargetMtbColt);
|
||||
|
||||
if (dataScad != null)
|
||||
insertUDCRowRequestDto
|
||||
.setDataScad(dataScad);
|
||||
if (dataScad != null) insertUDCRowRequestDto.setDataScad(dataScad);
|
||||
|
||||
mColliCaricoRESTConsumer.insertUDCRow(insertUDCRowRequestDto, insertedMtbColr -> {
|
||||
this.addHistoryItem(insertedMtbColr);
|
||||
|
||||
insertedMtbColr
|
||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
insertedMtbColr.setUntMis(pickingObjectDTO.getMtbAart().getUntMis()).setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
|
||||
pickingObjectDTO.getWithdrawMtbColrs().add(insertedMtbColr);
|
||||
mCurrentMtbColt.getMtbColr().add(insertedMtbColr);
|
||||
@ -682,66 +577,32 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
public void dispatchRowEdit(MtbColr mtbColrToEdit) {
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(mtbColrToEdit.getMtbAart());
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbColrToEdit.getMtbAart());
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
mtbColrToEdit.getNumCnf(),
|
||||
mtbColrToEdit.getQtaCnf(),
|
||||
mtbColrToEdit.getQtaCol(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null, null, null,
|
||||
null, null, null,
|
||||
mtbColrToEdit.getPartitaMag(),
|
||||
mtbColrToEdit.getDataScadPartita(),
|
||||
true,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), mtbColrToEdit.getNumCnf(), mtbColrToEdit.getQtaCnf(), mtbColrToEdit.getQtaCol(), null, null, null, null, null, null, null, null, null, mtbColrToEdit.getPartitaMag(), mtbColrToEdit.getDataScadPartita(), true, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
|
||||
this.saveEditedRow(mtbColrToEdit,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag(),
|
||||
pickedQuantityDTO.getDataScad(),
|
||||
shouldCloseLU);
|
||||
this.saveEditedRow(mtbColrToEdit, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
||||
});
|
||||
}
|
||||
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal
|
||||
qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
MtbColr mtbColrClone = (MtbColr) mtbColrToUpdate.clone();
|
||||
mtbColrClone.setMtbAart(null)
|
||||
.setMtbPartitaMag(null);
|
||||
mtbColrClone.setMtbAart(null).setMtbPartitaMag(null);
|
||||
|
||||
var editUDCRowRequest = new EditUDCRowRequestDTO()
|
||||
.setSourceMtbColr(mtbColrClone)
|
||||
.setNewNumCnf(numCnf)
|
||||
.setNewQtaCnf(qtaCnf)
|
||||
.setNewQtaTot(qtaTot)
|
||||
.setNewPartitaMag(partitaMag);
|
||||
var editUDCRowRequest = new EditUDCRowRequestDTO().setSourceMtbColr(mtbColrClone).setNewNumCnf(numCnf).setNewQtaCnf(qtaCnf).setNewQtaTot(qtaTot).setNewPartitaMag(partitaMag);
|
||||
|
||||
if (dataScad != null)
|
||||
editUDCRowRequest
|
||||
.setNewDataScad(dataScad);
|
||||
if (dataScad != null) editUDCRowRequest.setNewDataScad(dataScad);
|
||||
|
||||
|
||||
this.mColliCaricoRESTConsumer.editUDCRow(editUDCRowRequest, (editedMtbColr) -> {
|
||||
|
||||
this.addHistoryItem(editedMtbColr);
|
||||
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate))
|
||||
.findSingle();
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue()).filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
|
||||
editedMtbColr
|
||||
.setUntMis(mtbColrToUpdate.getUntMis())
|
||||
.setMtbAart(mtbColrToUpdate.getMtbAart());
|
||||
editedMtbColr.setUntMis(mtbColrToUpdate.getUntMis()).setMtbAart(mtbColrToUpdate.getMtbAart());
|
||||
|
||||
if (pickingObjectDTO.isPresent()) {
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||
@ -764,19 +625,14 @@ public class AccettazioneBollaPickingViewModel {
|
||||
public void deleteRow(MtbColr mtbColrToDelete) {
|
||||
this.sendMtbColrDeleteRequest(shouldDelete -> {
|
||||
|
||||
if (!shouldDelete)
|
||||
return;
|
||||
if (!shouldDelete) return;
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
var deleteUDCRowRequest = new DeleteUDCRowRequestDTO()
|
||||
.setMtbColrToDelete(mtbColrToDelete);
|
||||
var deleteUDCRowRequest = new DeleteUDCRowRequestDTO().setMtbColrToDelete(mtbColrToDelete);
|
||||
|
||||
this.mColliCaricoRESTConsumer.deleteUDCRow(deleteUDCRowRequest,
|
||||
() -> {
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||
.filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete))
|
||||
.findSingle();
|
||||
this.mColliCaricoRESTConsumer.deleteUDCRow(deleteUDCRowRequest, () -> {
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue()).filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToDelete)).findSingle();
|
||||
|
||||
if (pickingObjectDTO.isPresent()) {
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToDelete);
|
||||
@ -804,8 +660,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
} else {
|
||||
CloseUDCRequestDTO closeUDCRequestDTO = new CloseUDCRequestDTO()
|
||||
.setMtbColt(mCurrentMtbColt);
|
||||
CloseUDCRequestDTO closeUDCRequestDTO = new CloseUDCRequestDTO().setMtbColt(mCurrentMtbColt);
|
||||
mColliCaricoRESTConsumer.closeUDC(closeUDCRequestDTO, closeUDCResponse -> {
|
||||
|
||||
Runnable onVersamentoCompleted = () -> {
|
||||
@ -859,11 +714,9 @@ public class AccettazioneBollaPickingViewModel {
|
||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
|
||||
|
||||
var printUDSRequestDto = new PrintULRequestDTO()
|
||||
.setMtbColt(cloneMtbColt);
|
||||
var printUDSRequestDto = new PrintULRequestDTO().setMtbColt(cloneMtbColt);
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.printUL(printUDSRequestDto, onComplete,
|
||||
ex -> this.sendLUPrintError(ex, onComplete));
|
||||
this.mColliMagazzinoRESTConsumer.printUL(printUDSRequestDto, onComplete, ex -> this.sendLUPrintError(ex, onComplete));
|
||||
}
|
||||
|
||||
private void postCloseOperations() {
|
||||
@ -873,8 +726,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
private void deleteLU(Runnable onComplete) {
|
||||
DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO()
|
||||
.setMtbColt(this.mCurrentMtbColt);
|
||||
DeleteULRequestDTO deleteULRequestDTO = new DeleteULRequestDTO().setMtbColt(this.mCurrentMtbColt);
|
||||
|
||||
mColliMagazzinoRESTConsumer.deleteUL(deleteULRequestDTO, () -> {
|
||||
this.mCurrentMtbColt = null;
|
||||
@ -885,44 +737,30 @@ public class AccettazioneBollaPickingViewModel {
|
||||
|
||||
public void resetMatchedRows() {
|
||||
for (PickingObjectDTO pickingObjectDTO : this.mPickingList.getValue()) {
|
||||
pickingObjectDTO
|
||||
.setTempPickData(null);
|
||||
pickingObjectDTO.setTempPickData(null);
|
||||
}
|
||||
|
||||
this.mPickingList.postValue(this.mPickingList.getValue());
|
||||
}
|
||||
|
||||
private void addHistoryItem(@NonNull MtbColr mtbColr) {
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts)
|
||||
.filter(x -> (x.getCodMart() != null && x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart())) ||
|
||||
(x.getCodMart() == null && x.getBarcode().equalsIgnoreCase(mtbColr.getCodBarre())))
|
||||
.findFirst();
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts).filter(x -> (x.getCodMart() != null && x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart())) || (x.getCodMart() == null && x.getBarcode().equalsIgnoreCase(mtbColr.getCodBarre()))).findFirst();
|
||||
|
||||
if (optional.isPresent()) {
|
||||
optional.get()
|
||||
.setPartitaMag(mtbColr.getPartitaMag())
|
||||
.setDataScad(mtbColr.getDataScadPartita());
|
||||
optional.get().setPartitaMag(mtbColr.getPartitaMag()).setDataScad(mtbColr.getDataScadPartita());
|
||||
} else {
|
||||
this.mHistoryUsedAarts.add(new HistoryMtbAartDTO()
|
||||
.setCodMart(mtbColr.getCodMart())
|
||||
.setBarcode(mtbColr.getCodBarre())
|
||||
.setPartitaMag(mtbColr.getPartitaMag())
|
||||
.setDataScad(mtbColr.getDataScadPartita()));
|
||||
this.mHistoryUsedAarts.add(new HistoryMtbAartDTO().setCodMart(mtbColr.getCodMart()).setBarcode(mtbColr.getCodBarre()).setPartitaMag(mtbColr.getPartitaMag()).setDataScad(mtbColr.getDataScadPartita()));
|
||||
}
|
||||
}
|
||||
|
||||
private HistoryMtbAartDTO getHistoryItemByCodMartIfExists(@NonNull String codMart) {
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(codMart))
|
||||
.findFirst();
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts).filter(x -> x.getCodMart().equalsIgnoreCase(codMart)).findFirst();
|
||||
|
||||
return optional.isPresent() ? optional.get() : null;
|
||||
}
|
||||
|
||||
private HistoryMtbAartDTO getHistoryItemByBarcodeIfExists(@NonNull String barcode) {
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts)
|
||||
.filter(x -> x.getBarcode().equalsIgnoreCase(barcode))
|
||||
.findFirst();
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts).filter(x -> x.getBarcode().equalsIgnoreCase(barcode)).findFirst();
|
||||
|
||||
return optional.isPresent() ? optional.get() : null;
|
||||
}
|
||||
@ -963,43 +801,9 @@ public class AccettazioneBollaPickingViewModel {
|
||||
if (this.mListener != null) mListener.onLUPrintError(ex, onComplete);
|
||||
}
|
||||
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaOrd,
|
||||
BigDecimal totalNumCnfOrd,
|
||||
BigDecimal qtaCnfOrd,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
BigDecimal totalQtaAvailable,
|
||||
BigDecimal totalNumCnfAvailable,
|
||||
BigDecimal qtaCnfAvailable,
|
||||
String partitaMag,
|
||||
LocalDate dataScad,
|
||||
boolean canPartitaMagBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null) mListener.onItemDispatched(pickingObjectDTO,
|
||||
mtbAart,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
totalQtaOrd,
|
||||
totalNumCnfOrd,
|
||||
qtaCnfOrd,
|
||||
totalQtaToBeTaken,
|
||||
totalNumCnfToBeTaken,
|
||||
qtaCnfToBeTaken,
|
||||
totalQtaAvailable,
|
||||
totalNumCnfAvailable,
|
||||
qtaCnfAvailable,
|
||||
partitaMag,
|
||||
dataScad,
|
||||
canPartitaMagBeChanged,
|
||||
true,
|
||||
onComplete);
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaOrd, BigDecimal totalNumCnfOrd, BigDecimal qtaCnfOrd, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, String partitaMag, LocalDate dataScad, boolean canPartitaMagBeChanged, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onItemDispatched(pickingObjectDTO, mtbAart, initialNumCnf, initialQtaCnf, initialQtaTot, totalQtaOrd, totalNumCnfOrd, qtaCnfOrd, totalQtaToBeTaken, totalNumCnfToBeTaken, qtaCnfToBeTaken, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, canPartitaMagBeChanged, true, onComplete);
|
||||
}
|
||||
|
||||
|
||||
@ -1019,16 +823,13 @@ public class AccettazioneBollaPickingViewModel {
|
||||
if (this.mListener != null) mListener.onMtbColrDeleteRequest(onComplete);
|
||||
}
|
||||
|
||||
private void notifyVersamentoAutomaticoResult(VersamentoAutomaticoULResponseDTO
|
||||
versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||
private void notifyVersamentoAutomaticoResult(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onULVersata(versamentoAutomaticoULResponseDTO, onComplete);
|
||||
}
|
||||
|
||||
private void sendOnUnknownBarcodeScanned(String
|
||||
barocde, RunnableArgs<String> onComplete, Runnable onAbort) {
|
||||
if (this.mListener != null)
|
||||
mListener.onUnknownBarcodeScanned(barocde, onComplete, onAbort);
|
||||
private void sendOnUnknownBarcodeScanned(String barocde, RunnableArgs<String> onComplete, Runnable onAbort) {
|
||||
if (this.mListener != null) mListener.onUnknownBarcodeScanned(barocde, onComplete, onAbort);
|
||||
}
|
||||
|
||||
public AccettazioneBollaPickingViewModel setListeners(Listener listener) {
|
||||
@ -1045,25 +846,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaOrd,
|
||||
BigDecimal totalNumCnfOrd,
|
||||
BigDecimal qtaCnfOrd,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
BigDecimal totalQtaAvailable,
|
||||
BigDecimal totalNumCnfAvailable,
|
||||
BigDecimal qtaCnfAvailable,
|
||||
String partitaMag,
|
||||
LocalDate dataScad,
|
||||
boolean canPartitaMagBeChanged,
|
||||
boolean canOverflowQuantity,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaOrd, BigDecimal totalNumCnfOrd, BigDecimal qtaCnfOrd, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, String partitaMag, LocalDate dataScad, boolean canPartitaMagBeChanged, boolean canOverflowQuantity, RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
|
||||
void onFilterCodMartApplied(String codMartToFilter);
|
||||
|
||||
|
||||
@ -355,7 +355,11 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
});
|
||||
|
||||
accettazioneOrdiniPickingListAdapter.setOnItemClicked(clickedItem -> {
|
||||
this.mViewModel.dispatchOrdineRow(clickedItem);
|
||||
this.mViewModel.dispatchOrdineRow(clickedItem, false);
|
||||
});
|
||||
|
||||
accettazioneOrdiniPickingListAdapter.setOnItemLongClicked(clickedItem -> {
|
||||
this.mViewModel.dispatchOrdineRow(clickedItem, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -395,13 +395,13 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
}
|
||||
|
||||
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
||||
if (matchedRows == null || matchedRows.size() == 0) {
|
||||
if (matchedRows == null || matchedRows.isEmpty()) {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
} else if (matchedRows.size() == 1) {
|
||||
this.dispatchOrdineRow(matchedRows.get(0));
|
||||
this.dispatchOrdineRow(matchedRows.get(0), false);
|
||||
} else {
|
||||
//So che il codMart sarà solo 1
|
||||
var firstCodMart = Stream.of(matchedRows)
|
||||
var firstCodMart = matchedRows.stream()
|
||||
.map(x -> x.getSitArtOrdDTO().getCodMart())
|
||||
.distinct()
|
||||
.findFirst()
|
||||
@ -414,7 +414,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
public void createNewLU(String customSSCC, Integer customNumCollo, String customSerCollo, boolean disablePrint, Runnable onComplete) {
|
||||
this.sendOnInfoAggiuntiveRequest((additionalNotes, tCol) -> {
|
||||
|
||||
final List<CreateUDCRequestOrderDTO> orders = Stream.of(this.mOrders)
|
||||
final List<CreateUDCRequestOrderDTO> orders = this.mOrders.stream()
|
||||
.map(x -> {
|
||||
final CreateUDCRequestOrderDTO createUDCRequestOrderDTO = new CreateUDCRequestOrderDTO()
|
||||
.setDataCons(x.getDataConsD() != null ? UtilityDate.toLocalDate(x.getDataConsD()) : null)
|
||||
@ -432,7 +432,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
|
||||
return createUDCRequestOrderDTO;
|
||||
})
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final CreateUDCRequestDTO createUDCRequestDTO = new CreateUDCRequestDTO()
|
||||
.setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep())
|
||||
@ -457,7 +457,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO) {
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, boolean executeImmediately) {
|
||||
if (this.mCurrentMtbColt == null) return;
|
||||
|
||||
BigDecimal totalQtaOrd = pickingObjectDTO.getSitArtOrdDTO().getQtaOrd();
|
||||
@ -467,7 +467,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
AtomicBigDecimal numCnfWithdrawRows = new AtomicBigDecimal();
|
||||
AtomicBigDecimal qtaColWithdrawRows = new AtomicBigDecimal();
|
||||
|
||||
Stream.of(pickingObjectDTO.getWithdrawMtbColrs())
|
||||
pickingObjectDTO.getWithdrawMtbColrs()
|
||||
.forEach(row -> {
|
||||
numCnfWithdrawRows.addAndGet(row.getNumCnf());
|
||||
qtaColWithdrawRows.addAndGet(row.getQtaCol());
|
||||
@ -568,6 +568,15 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
if (executeImmediately) {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
numCnfDaPrelevare,
|
||||
qtaCnfDaPrelevare,
|
||||
qtaColDaPrelevare,
|
||||
partitaMag,
|
||||
dataScad,
|
||||
false);
|
||||
} else {
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
@ -594,7 +603,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
pickedQuantityDTO.getDataScad(),
|
||||
shouldCloseLU);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,6 @@ import java.util.List;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.AccettazioneOrdineInevasoMainListGroupHeaderBinding;
|
||||
@ -35,6 +34,7 @@ public class AccettazioneOrdiniPickingListAdapter extends SectionedRecyclerViewA
|
||||
private final List<AccettazioneOrdiniPickingListModel> mDataset = new ArrayList<>();
|
||||
|
||||
private RunnableArgs<PickingObjectDTO> mOnItemClicked;
|
||||
private RunnableArgs<PickingObjectDTO> mOnItemLongClicked;
|
||||
|
||||
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@ -77,6 +77,10 @@ public class AccettazioneOrdiniPickingListAdapter extends SectionedRecyclerViewA
|
||||
this.mOnItemClicked = onItemClicked;
|
||||
}
|
||||
|
||||
public void setOnItemLongClicked(RunnableArgs<PickingObjectDTO> onItemLongClicked) {
|
||||
this.mOnItemLongClicked = onItemLongClicked;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||
@ -154,6 +158,12 @@ public class AccettazioneOrdiniPickingListAdapter extends SectionedRecyclerViewA
|
||||
if (this.mOnItemClicked != null)
|
||||
this.mOnItemClicked.run(pickingObjectDTO.getOriginalModel());
|
||||
});
|
||||
|
||||
holder.mBinding.getRoot().setOnLongClickListener(v -> {
|
||||
if (this.mOnItemLongClicked != null)
|
||||
this.mOnItemLongClicked.run(pickingObjectDTO.getOriginalModel());
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -38,6 +38,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
@ -54,6 +55,7 @@ import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_commessa.DialogAskCommessaView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.dto.DialogAskLineaProdResponse;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@ -90,12 +92,13 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
private GestioneEnum mCurrentGestione;
|
||||
private boolean mAskCliente;
|
||||
private boolean mAskLineaProd;
|
||||
private boolean mAskCommessa;
|
||||
|
||||
public PickingLiberoFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
public static PickingLiberoFragment newInstance(@StringRes int title, GestioneEnum gestioneEnum, boolean askCliente, boolean askLineaProd) {
|
||||
public static PickingLiberoFragment newInstance(@StringRes int title, GestioneEnum gestioneEnum, boolean askCliente, boolean askLineaProd, boolean flagAskCommessaInPickingLiberoLav) {
|
||||
PickingLiberoFragment fragment = new PickingLiberoFragment();
|
||||
Bundle args = new Bundle();
|
||||
|
||||
@ -103,6 +106,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
args.putString("gestione", gestioneEnum.getText());
|
||||
args.putBoolean("askCliente", askCliente);
|
||||
args.putBoolean("askLineaProd", askLineaProd);
|
||||
args.putBoolean("askCommessa", flagAskCommessaInPickingLiberoLav);
|
||||
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
@ -121,6 +125,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
mCurrentGestione = GestioneEnum.fromString(getArguments().getString("gestione"));
|
||||
mAskCliente = getArguments().getBoolean("askCliente");
|
||||
mAskLineaProd = getArguments().getBoolean("askLineaProd");
|
||||
mAskCommessa = getArguments().getBoolean("askCommessa");
|
||||
|
||||
|
||||
mToolbarTitleText.setText(getText(getArguments().getInt("title")).toString());
|
||||
@ -150,7 +155,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
this.initRecyclerView();
|
||||
|
||||
mViewModel.init(mAskCliente, mAskLineaProd, mCurrentGestione);
|
||||
mViewModel.init(mAskCliente, mAskLineaProd, mAskCommessa, mCurrentGestione);
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
@ -303,6 +308,12 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
.show(getParentFragmentManager(), DialogAskLineaProdView.class.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUCommessaRequired(RunnableArgs<JtbComt> onComplete, Runnable onAbort) {
|
||||
DialogAskCommessaView.newInstance(onComplete, onAbort)
|
||||
.show(getParentFragmentManager(), DialogAskCommessaView.class.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
DialogChooseArtsFromMtbColrList
|
||||
|
||||
@ -24,12 +24,14 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUBaseOperationsListener;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||
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.MvwSitArtUdcDetInventario;
|
||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
@ -45,6 +47,7 @@ import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.magazzino_automatico.MagazzinoAutomaticoPickItemsRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -76,8 +79,11 @@ public class PickingLiberoViewModel {
|
||||
|
||||
private boolean mFlagAskCliente;
|
||||
private boolean mFlagAskLineaProd;
|
||||
private boolean mFlagAskCommessa;
|
||||
private GestioneEnum mDefaultGestione;
|
||||
|
||||
private JtbComt mDefaultCommessa;
|
||||
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@ -102,9 +108,10 @@ public class PickingLiberoViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void init(boolean flagAskCliente, boolean flagAskLineaProd, GestioneEnum defaultGestione) {
|
||||
public void init(boolean flagAskCliente, boolean flagAskLineaProd, boolean flagAskCommessa, GestioneEnum defaultGestione) {
|
||||
this.mFlagAskCliente = defaultGestione == GestioneEnum.VENDITA && flagAskCliente;
|
||||
this.mFlagAskLineaProd = defaultGestione == GestioneEnum.LAVORAZIONE && flagAskLineaProd;
|
||||
this.mFlagAskCommessa = defaultGestione == GestioneEnum.LAVORAZIONE && flagAskCommessa;
|
||||
this.mDefaultGestione = defaultGestione;
|
||||
|
||||
|
||||
@ -316,9 +323,7 @@ public class PickingLiberoViewModel {
|
||||
if (this.mFlagAskCliente) {
|
||||
this.sendLUClienteRequired((vtbDest, codJcom) -> {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, onComplete);
|
||||
}, () -> {
|
||||
|
||||
});
|
||||
}, this::sendOnLoadingEnded);
|
||||
} else {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, null, onComplete);
|
||||
}
|
||||
@ -329,15 +334,25 @@ public class PickingLiberoViewModel {
|
||||
this.sendLULineaProdRequired(response -> {
|
||||
createNewLU_PostLineaProdAsk(customNumCollo, customSerCollo, vtbDest, response.getPosizione(), response.getIdLotto(), onComplete);
|
||||
|
||||
}, () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
}, this::sendOnLoadingEnded);
|
||||
} else {
|
||||
createNewLU_PostLineaProdAsk(customNumCollo, customSerCollo, vtbDest, null, null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
private void createNewLU_PostLineaProdAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, String codJfas, Integer idLotto, Runnable onComplete) {
|
||||
private void createNewLU_PostLineaProdAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, String posizione, Integer idLotto, Runnable onComplete) {
|
||||
if (this.mFlagAskCommessa) {
|
||||
this.sendLUCommessaRequired(response -> {
|
||||
createNewLU_PostCommessaAsk(customNumCollo, customSerCollo, vtbDest, posizione, idLotto, response, onComplete);
|
||||
|
||||
}, this::sendOnLoadingEnded);
|
||||
} else {
|
||||
createNewLU_PostCommessaAsk(customNumCollo, customSerCollo, vtbDest, null, null, null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
private void createNewLU_PostCommessaAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, String codJfas, Integer idLotto, JtbComt codJcom, Runnable onComplete) {
|
||||
this.mDefaultCommessa = codJcom;
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
@ -536,61 +551,23 @@ public class PickingLiberoViewModel {
|
||||
if (!pickedAarts.isEmpty()) {
|
||||
askQuantities(pickedAarts.iterator(), destNewMtbColr, () -> {
|
||||
if (!destNewMtbColr.isEmpty()) {
|
||||
MtbColt clonedTestata = (MtbColt) this.mCurrentMtbColt.clone();
|
||||
clonedTestata.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||
|
||||
ObservableArrayList<MtbColr> mtbColrObservableField = new ObservableArrayList<>();
|
||||
destNewMtbColr.forEach(x -> x.setCodJcom(this.mDefaultCommessa.getCodJcom()));
|
||||
|
||||
for (int i = 0; i < destNewMtbColr.size(); i++) {
|
||||
MtbColr cloneMtbColr = (MtbColr) destNewMtbColr.get(i).clone();
|
||||
MtbColt clonedTestata = (MtbColt) sourceMtbColt.clone();
|
||||
clonedTestata.getMtbColr().clear();
|
||||
clonedTestata.getMtbColr().addAll(destNewMtbColr);
|
||||
|
||||
cloneMtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
mColliMagazzinoRESTConsumer.spostaArtsTraUL(clonedTestata,
|
||||
this.mCurrentMtbColt, true, (generatedMtbColrs) -> {
|
||||
|
||||
cloneMtbColr
|
||||
.setGestioneRif(cloneMtbColr.getGestione())
|
||||
.setGestione((String) null)
|
||||
|
||||
.setSerColloRif(cloneMtbColr.getSerCollo())
|
||||
.setSerCollo(null)
|
||||
|
||||
.setNumColloRif(cloneMtbColr.getNumCollo())
|
||||
.setNumCollo(null)
|
||||
|
||||
.setDataColloRif(cloneMtbColr.getDataColloS())
|
||||
.setDataCollo((String) null)
|
||||
|
||||
.setPesoLordoKg(null)
|
||||
.setPesoNettoKg(null);
|
||||
|
||||
mtbColrObservableField.add(cloneMtbColr);
|
||||
}
|
||||
|
||||
clonedTestata.setMtbColr(mtbColrObservableField);
|
||||
|
||||
new Thread(() -> {
|
||||
mColliMagazzinoRESTConsumer.saveCollo(clonedTestata, value -> {
|
||||
for (int i = 0; i < mtbColrObservableField.size(); i++) {
|
||||
MtbColr initialMtbColr = mtbColrObservableField.get(i);
|
||||
var startIdx = (value.getMtbColr().size() - mtbColrObservableField.size());
|
||||
|
||||
initialMtbColr
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setGestione(value.getGestione())
|
||||
.setSerCollo(value.getSerCollo());
|
||||
|
||||
initialMtbColr.setRiga(value.getMtbColr().get(startIdx + i).getRiga());
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColrObservableField.get(i));
|
||||
}
|
||||
mCurrentMtbColt.getMtbColr().addAll(generatedMtbColrs);
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
onComplete.run();
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
}).start();
|
||||
}
|
||||
}, onComplete);
|
||||
} else {
|
||||
@ -675,7 +652,8 @@ public class PickingLiberoViewModel {
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf)
|
||||
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||
.setCodJcom(this.mDefaultCommessa.getCodJcom());
|
||||
|
||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
|
||||
@ -888,6 +866,7 @@ public class PickingLiberoViewModel {
|
||||
}
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
this.mDefaultCommessa = null;
|
||||
|
||||
mColliMagazzinoRESTConsumer.canULBeDeleted(mCurrentMtbColt, canBeDeleted -> {
|
||||
if (canBeDeleted) {
|
||||
@ -901,7 +880,18 @@ public class PickingLiberoViewModel {
|
||||
} else {
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.assegnaLottoSuColloScarico(mCurrentMtbColt, () -> {
|
||||
this.mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
||||
|
||||
var closeUDSRequest = new CloseUDSRequestDTO()
|
||||
.setMtbColt(mCurrentMtbColt);
|
||||
|
||||
if (this.mDefaultGestione == GestioneEnum.LAVORAZIONE) {
|
||||
closeUDSRequest
|
||||
.setCreateDocument(SettingsManager.iDB().isProduzioneGeneraDocScar())
|
||||
.setDocumentCodDtip(SettingsManager.iDB().getProduzioneCodDtipScar())
|
||||
.setDocumentCodAnag(SettingsManager.iDB().getInternalCodAnags().stream().filter(InternalCodAnagsDTO::isFornitore).findFirst().get().getCodAnag());
|
||||
}
|
||||
|
||||
this.mColliScaricoRESTConsumer.closeUDS(closeUDSRequest, response -> {
|
||||
this.sendLUClosed();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
@ -956,6 +946,10 @@ public class PickingLiberoViewModel {
|
||||
if (this.mListener != null) mListener.onLULineaProdRequired(onComplete, onAbort);
|
||||
}
|
||||
|
||||
private void sendLUCommessaRequired(RunnableArgs<JtbComt> onComplete, Runnable onAbort) {
|
||||
if (this.mListener != null) mListener.onLUCommessaRequired(onComplete, onAbort);
|
||||
}
|
||||
|
||||
private void sendArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
if (this.mListener != null)
|
||||
mListener.onArtSelectionRequest(mtbColrsToPick, mtbAart, onComplete, onAbort);
|
||||
@ -1014,6 +1008,8 @@ public class PickingLiberoViewModel {
|
||||
|
||||
void onLULineaProdRequired(RunnableArgs<DialogAskLineaProdResponse> onComplete, Runnable onAbort);
|
||||
|
||||
void onLUCommessaRequired(RunnableArgs<JtbComt> onComplete, Runnable onAbort);
|
||||
|
||||
void onArtSelectionRequest(List<MtbColr> mtbColrsToPick, MtbAart mtbAart, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort);
|
||||
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
|
||||
@ -208,6 +208,7 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
.setDescrizione(x.getDescrizioneArt())
|
||||
.setNumCollo(x.getNumColloRif())
|
||||
.setPartitaMag(x.getPartitaMag())
|
||||
.setCodJcom(x.getCodJcom())
|
||||
.setQtaVersata(x.getQtaCol())
|
||||
.setUntMisVersata(x.getUntMis());
|
||||
|
||||
|
||||
@ -67,9 +67,10 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
" dtb_ord_steps.gestione as gestione_ord, " +
|
||||
" dtb_ord_steps.hr_num as hr, " +
|
||||
" mtb_colr.riga_ord, " +
|
||||
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " +
|
||||
" SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
||||
" 0)) as percentage_hr " +
|
||||
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) /\n" +
|
||||
" IIF(SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo) = 0, 1,\n" +
|
||||
" SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo))) * 100,\n" +
|
||||
" 0)) AS percentage_hr " +
|
||||
" FROM mtb_colr " +
|
||||
" INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
||||
" AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
||||
@ -249,8 +250,10 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
.setCodJfas(restDTO.getCodJfas())
|
||||
.setDescrizioneArt(restDTO.getDescrizioneArt())
|
||||
.setDescrizioneFase(restDTO.getDescrizioneFase())
|
||||
.setQtaCol(qtaColTot)
|
||||
.setNumCnf(numCnfColTot)
|
||||
.setQtaCol(restDTO.getQtaCol())
|
||||
.setNumCnf(restDTO.getNumCnf())
|
||||
// .setQtaCol(qtaColTot)
|
||||
// .setNumCnf(numCnfColTot)
|
||||
.setPartitaMag(restDTO.getPartitaMag())
|
||||
.setCodJcom(restDTO.getCodJcom())
|
||||
.setDatetimeRow(restDTO.getDatetimeRow())
|
||||
@ -273,7 +276,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
this.mArticoloRESTConsumer.getByCodMarts(codMarts, arts -> {
|
||||
|
||||
if (arts != null && arts.size() > 0) {
|
||||
if (arts != null && !arts.isEmpty()) {
|
||||
for (HistoryVersamentoProdULDTO value : newUlList) {
|
||||
|
||||
MtbAart foundMtbAart = null;
|
||||
@ -281,7 +284,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
List<MtbAart> mtbAartStream = Stream.of(arts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(value.getCodMart())).toList();
|
||||
|
||||
if (mtbAartStream != null && mtbAartStream.size() > 0) {
|
||||
if (mtbAartStream != null && !mtbAartStream.isEmpty()) {
|
||||
foundMtbAart = mtbAartStream.get(0);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
@ -98,7 +99,12 @@ public class HistoryULsListAdapter extends ExtendedSectionedRecyclerView<History
|
||||
holder.binding.codMart.setText(ul.getCodMart());
|
||||
holder.binding.descrizione.setText(ul.getDescrizione());
|
||||
holder.binding.numCollo.setText(String.valueOf(ul.getNumCollo()));
|
||||
holder.binding.partitaMag.setText("(" + ul.getPartitaMag() + ")");
|
||||
|
||||
holder.binding.partitaMagContainer.setVisibility(UtilityString.isNullOrEmpty(ul.getPartitaMag()) ? View.GONE : View.VISIBLE);
|
||||
holder.binding.partitaMag.setText(ul.getPartitaMag());
|
||||
|
||||
holder.binding.commessaContainer.setVisibility(UtilityString.isNullOrEmpty(ul.getCodJcom()) ? View.GONE : View.VISIBLE);
|
||||
holder.binding.commessa.setText(ul.getCodJcom());
|
||||
|
||||
holder.binding.qtaVersata.setText(UtilityNumber.decimalToString(ul.getQtaVersata(), 2));
|
||||
holder.binding.untMisQtaVersata.setText(String.valueOf(ul.getUntMisVersata()));
|
||||
|
||||
@ -12,6 +12,7 @@ public class HistoryULsListModel {
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private String partitaMag;
|
||||
private String codJcom;
|
||||
|
||||
private BigDecimal qtaVersata;
|
||||
private String untMisVersata;
|
||||
@ -63,6 +64,15 @@ public class HistoryULsListModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJcom() {
|
||||
return codJcom;
|
||||
}
|
||||
|
||||
public HistoryULsListModel setCodJcom(String codJcom) {
|
||||
this.codJcom = codJcom;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaVersata() {
|
||||
return qtaVersata;
|
||||
}
|
||||
|
||||
@ -2,8 +2,6 @@ package it.integry.integrywmsnative.gest.prod_rientro_merce;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -13,7 +11,6 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.IOrdersLo
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneStatoEnum;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadException;
|
||||
|
||||
public class ProdRientroMerceViewModel {
|
||||
@ -37,10 +34,11 @@ public class ProdRientroMerceViewModel {
|
||||
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, codAnag, ordiniLavorazioneList -> {
|
||||
List<OrdineLavorazioneDTO> filteredList = null;
|
||||
|
||||
if(ordiniLavorazioneList != null)
|
||||
filteredList = Stream.of(ordiniLavorazioneList)
|
||||
.filter(x -> x.getStatoEnum() != OrdineLavorazioneStatoEnum.PROGRAMMATO)
|
||||
.toList();
|
||||
filteredList = ordiniLavorazioneList;
|
||||
// if(ordiniLavorazioneList != null)
|
||||
// filteredList = ordiniLavorazioneList.stream()
|
||||
// .filter(x -> x.getStatoEnum() != OrdineLavorazioneStatoEnum.PROGRAMMATO)
|
||||
// .collect(Collectors.toList());
|
||||
|
||||
this.mOrdiniLavorazioneAperti.postValue(filteredList);
|
||||
this.sendOnOrdersLoadingEnded();
|
||||
|
||||
@ -87,7 +87,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
public ObservableField<BigDecimal> sumNetKG = new ObservableField<>(BigDecimal.ZERO);
|
||||
public ObservableField<BigDecimal> sumGrossKG = new ObservableField<>(BigDecimal.ZERO);
|
||||
public ObservableField<Integer> progress = new ObservableField<>(0);
|
||||
public boolean isOrderColli = false;
|
||||
public ObservableField<Boolean> isOrderColli = new ObservableField<>(false);
|
||||
|
||||
public ProdRientroMerceOrderDetailFragment() {
|
||||
// Required empty public constructor
|
||||
@ -121,7 +121,6 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
if (currentOrder.getValue() != null) {
|
||||
refreshOrder();
|
||||
isOrderColli = currentOrder.getValue().getQtaCnf().compareTo(BigDecimal.ONE) == 0;
|
||||
}
|
||||
this.mViewModel.mtbColtsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
||||
|
||||
@ -200,9 +199,15 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
private void refreshOrder() {
|
||||
OrdineLavorazioneDTO currentOrd = currentOrder.getValue();
|
||||
|
||||
if(currentOrd != null) {
|
||||
isOrderColli.set(currentOrd.getQtaCnf().compareTo(BigDecimal.ONE) == 0);
|
||||
}
|
||||
|
||||
if (mBindings != null) mBindings.invalidateAll();
|
||||
if (mAdapter != null) mAdapter.clearDataset();
|
||||
if (mViewModel != null) mViewModel.setOrder(currentOrder.getValue());
|
||||
if (mViewModel != null) mViewModel.setOrder(currentOrd);
|
||||
}
|
||||
|
||||
private void refreshList(List<MtbColt> mtbColts) {
|
||||
@ -402,6 +407,16 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.label_primary_text);
|
||||
}
|
||||
|
||||
public Drawable getUntMisIcon() {
|
||||
if (currentOrder.getValue() != null) {
|
||||
if(currentOrder.getValue().getUntOrd().equalsIgnoreCase("KG"))
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.ic_weight_kg);
|
||||
else
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.ic_puzzle);
|
||||
} else
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.ic_weight_kg);
|
||||
}
|
||||
|
||||
public Integer getOrderStatusLabelTextColor() {
|
||||
if (currentOrder.getValue() != null) {
|
||||
switch (currentOrder.getValue().getStatoEnum()) {
|
||||
|
||||
@ -5,7 +5,7 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@ -68,9 +68,7 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
|
||||
public void createLU(ProdRientroMerceOrderDetailPickedQuantityDTO pickedQuantityDTO) {
|
||||
|
||||
new Thread(this::sendOnLoadingStarted).start();
|
||||
|
||||
new Thread(() -> {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO =
|
||||
new ImportColliDaProduzioneRequestDTO()
|
||||
@ -78,10 +76,11 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
.setQtaCnf(pickedQuantityDTO.getPesoCollo())
|
||||
.setQtaCol(pickedQuantityDTO.getPesoNetto())
|
||||
.setCodJcom(currentOrder.getCodJcom())
|
||||
// .setCodJfas("OFF")
|
||||
.setCodJfas(pickedQuantityDTO.getJtbFasi() != null ? pickedQuantityDTO.getJtbFasi().getCodJfas() : null)
|
||||
.setCodMart(currentOrder.getCodProd())
|
||||
.setCodTcol(pickedQuantityDTO.getMtbTCol() != null ? pickedQuantityDTO.getMtbTCol().getCodTcol() : null)
|
||||
.setDataCollo(new Date())
|
||||
.setDataCollo(LocalDate.now())
|
||||
.setDataOrd(currentOrder.getDataOrdD())
|
||||
.setNumOrd(currentOrder.getNumOrd())
|
||||
.setGestione(currentOrder.getGestione())
|
||||
@ -97,8 +96,6 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
}).start();
|
||||
|
||||
}
|
||||
|
||||
public void deleteLU(MtbColt mtbColt) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
public class ImportColliDaProduzioneRequestDTO {
|
||||
@ -15,7 +16,7 @@ public class ImportColliDaProduzioneRequestDTO {
|
||||
|
||||
private int colliBancale;
|
||||
private BigDecimal qtaCnf;
|
||||
private Date dataCollo;
|
||||
private LocalDate dataCollo;
|
||||
|
||||
private Date dataOrd;
|
||||
private int numOrd;
|
||||
@ -107,11 +108,11 @@ public class ImportColliDaProduzioneRequestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataCollo() {
|
||||
public LocalDate getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public ImportColliDaProduzioneRequestDTO setDataCollo(Date dataCollo) {
|
||||
public ImportColliDaProduzioneRequestDTO setDataCollo(LocalDate dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -229,15 +229,20 @@ public class ProdRiposizionamentoDaProdViewModel {
|
||||
}
|
||||
|
||||
public void loadData() {
|
||||
List<String> posizioni = Arrays.asList(SettingsManager.iDB().getViewPosizioni().split("\\|"));
|
||||
String posizioniToSee = SettingsManager.iDB().getViewPosizioni();
|
||||
if(posizioniToSee == null || posizioniToSee.isEmpty()) {
|
||||
this.sendOnInventoriesLoadingEnded();
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> posizioni = Arrays.asList(posizioniToSee.split("\\|"));
|
||||
|
||||
this.mGiacenzaRESTConsumer.getGiacenzeInPosizione(posizioni, true, availableItems -> {
|
||||
availableItems = Stream.of(availableItems)
|
||||
availableItems = availableItems.stream()
|
||||
.sorted(Comparator.comparing(ArtsInGiacenzaDTO::getPosizione))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
itemsInventario.postValue(availableItems);
|
||||
this.sendOnInventoriesLoadingEnded();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgssss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
@ -81,7 +82,6 @@ import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAgg
|
||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowQtaTotOrderedQuantityException;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtView;
|
||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
@ -319,15 +319,18 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
this.mBindings.spedizionePickingList.setAdapter(spedizioneListAdapter);
|
||||
this.mBindings.spedizionePickingList.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
spedizioneListAdapter.setOnItemClicked((clickedItem, refMtbColt, refMtbColr) -> {
|
||||
RunnableArgssss<PickingObjectDTO, MtbColt, MtbColr, Boolean> onItemClicked = (clickedItem, refMtbColt, refMtbColr, executeImmediately) -> {
|
||||
if (!noLUPresent.get() &&
|
||||
((SettingsManager.iDB().isFlagSpedizioneEnableManualPick() &&
|
||||
clickedItem.getSitArtOrdDTO().isFlagEnablePickManuale()) ||
|
||||
clickedItem.getTempPickData() != null)) {
|
||||
this.mViewmodel.dispatchOrdineRow(clickedItem, refMtbColt, refMtbColr,
|
||||
SettingsManager.iDB().isFlagSpedizioneEnableManualPick() && clickedItem.getSitArtOrdDTO().isFlagEnablePickManuale());
|
||||
SettingsManager.iDB().isFlagSpedizioneEnableManualPick() && clickedItem.getSitArtOrdDTO().isFlagEnablePickManuale(), executeImmediately);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
spedizioneListAdapter.setOnItemClicked(onItemClicked);
|
||||
spedizioneListAdapter.setOnItemLongClicked(onItemClicked);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione;
|
||||
|
||||
import androidx.annotation.IntegerRes;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
@ -11,18 +10,15 @@ import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.exception.EmptyLUException;
|
||||
@ -65,6 +61,7 @@ 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.interfaces.ColliScaricoRESTConsumerInterface;
|
||||
import it.integry.integrywmsnative.core.rest.model.CriterioDistribuzioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
||||
@ -89,7 +86,6 @@ import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.CurrentMonoLUPositionIsNotCorrectException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidMagazzinoAutomaticoMovementException;
|
||||
@ -99,7 +95,6 @@ import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadExceptio
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PrintOrderCloseDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowQtaTotOrderedQuantityException;
|
||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.TracciamentoImballoDTO;
|
||||
|
||||
public class SpedizioneViewModel {
|
||||
@ -882,7 +877,7 @@ public class SpedizioneViewModel {
|
||||
refMtbColt = matchedItem.getTempPickData().getSourceMtbColt();
|
||||
}
|
||||
MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
||||
this.dispatchOrdineRow(matchedItem, refMtbColt, refMtbColr, refMtbColr == null);
|
||||
this.dispatchOrdineRow(matchedItem, refMtbColt, refMtbColr, refMtbColr == null, false);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -901,7 +896,7 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, boolean canPartitaMagBeChanged) {
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, boolean canPartitaMagBeChanged, boolean executeImmediately) {
|
||||
|
||||
//TODO: Al posto di prelevare la prima riga bisognerebbe controllare se c'è ne una che corrisponde con la partita richiesta
|
||||
// MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
||||
@ -962,20 +957,20 @@ public class SpedizioneViewModel {
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged);
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately);
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged);
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged, executeImmediately);
|
||||
}
|
||||
|
||||
} else {
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, null, canPartitaMagBeChanged);
|
||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, null, canPartitaMagBeChanged, executeImmediately);
|
||||
}
|
||||
}
|
||||
|
||||
private void dispatchOrdineRowOnPostBatchLotSelection(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, MtbColr scannedMtbColr, boolean canPartitaMagBeChanged) {
|
||||
private void dispatchOrdineRowOnPostBatchLotSelection(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, MtbColr scannedMtbColr, boolean canPartitaMagBeChanged, boolean executeImmediately) {
|
||||
BigDecimal totalQtaOrd = pickingObjectDTO.getSitArtOrdDTO().getQtaOrd();
|
||||
BigDecimal totalNumCnfOrd = pickingObjectDTO.getSitArtOrdDTO().getNumCnfOrd();
|
||||
BigDecimal qtaCnfOrd = pickingObjectDTO.getSitArtOrdDTO().getQtaCnfOrd();
|
||||
@ -1104,11 +1099,15 @@ public class SpedizioneViewModel {
|
||||
BigDecimal initialQtaCnf = mUseColliPedana ? pickingObjectDTO.getMtbAart().getQtaCnf() : mUseQtaOrd ? qtaCnfDaPrelevare : null;
|
||||
BigDecimal initialQtaTot = mUseColliPedana ? initialNumCnf.multiply(initialQtaCnf) : mUseQtaOrd ? qtaColDaPrelevare : null;
|
||||
|
||||
if (executeImmediately) {
|
||||
this.saveNewRow(pickingObjectDTO, refMtbColt, numCnfDaPrelevare, qtaCnfDaPrelevare, qtaColDaPrelevare, partitaMag, dataScad, false, false);
|
||||
} else {
|
||||
MtbColt finalRefMtbColt = refMtbColt;
|
||||
this.onItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), initialNumCnf, initialQtaCnf, initialQtaTot, qtaDaEvadere, numCnfDaEvadere, qtaCnfDaEvadere, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, mCanOverflowOrderQuantity, canPartitaMagBeChanged, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
||||
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaOrd, BigDecimal totalNumCnfOrd, BigDecimal qtaCnfOrd, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, String partitaMag, LocalDate dataScad, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (SettingsManager.iDB().isNotifyLotStatus() && !UtilityString.isNullOrEmpty(partitaMag)) {
|
||||
@ -1230,7 +1229,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
MtbColt finalRefMtbColt = refMtbColt;
|
||||
this.onItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), initialNumCnf, initialQtaCnf, initialQtaTot, null, null, null, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, mCanOverflowOrderQuantity, true, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
||||
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU, true);
|
||||
});
|
||||
}
|
||||
|
||||
@ -1391,7 +1390,7 @@ public class SpedizioneViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU, boolean removeFilters) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
//TODO: Al posto di prelevare la prima riga bisognerebbe controllare se c'è ne una che corrisponde con la partita richiesta
|
||||
@ -1453,7 +1452,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (refMtbColt != null) {
|
||||
|
||||
MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && refMtbColt.getMtbColr().size() > 0 ? refMtbColt.getMtbColr().get(0) : null;
|
||||
MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && !refMtbColt.getMtbColr().isEmpty() ? refMtbColt.getMtbColr().get(0) : null;
|
||||
|
||||
if (originalRefMtbColr != null) {
|
||||
refMtbColr.setId(originalRefMtbColr.getId());
|
||||
@ -1468,7 +1467,11 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||
if (removeFilters)
|
||||
resetMatchedRows();
|
||||
else
|
||||
//Refresh della lista forzato
|
||||
this.mPickingList.postValue(this.mPickingList.getValue());
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
@ -1620,6 +1623,23 @@ public class SpedizioneViewModel {
|
||||
//.setPrintSSCC(shouldPrint)
|
||||
.setOrderCodMdep(codMdep);
|
||||
|
||||
if (this.mColliScaricoRESTConsumer instanceof ColliLavorazioneRESTConsumer && !mIsOrdTrasf) {
|
||||
closeUDSRequestDto.setCriterioDistribuzione(CriterioDistribuzioneEnum.FASE);
|
||||
|
||||
var codAnag = mTestateOrdini.stream()
|
||||
.map(OrdineUscitaInevasoDTO::getCodAnagOrd)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.findFirst()
|
||||
.get();
|
||||
closeUDSRequestDto.setDocumentCodAnag(codAnag);
|
||||
|
||||
closeUDSRequestDto
|
||||
.setCreateDocument(SettingsManager.iDB().isProduzioneGeneraDocScar())
|
||||
.setDocumentCodDtip(SettingsManager.iDB().getProduzioneCodDtipScar());
|
||||
|
||||
}
|
||||
|
||||
this.mColliScaricoRESTConsumer.closeUDS(closeUDSRequestDto, closeResponse -> {
|
||||
onComplete.run(closeResponse.getGeneratedMtbColts());
|
||||
}, this::sendError);
|
||||
@ -2017,7 +2037,8 @@ public class SpedizioneViewModel {
|
||||
void createDocs() {
|
||||
var loadCollidto = new LoadColliDTO();
|
||||
|
||||
var codAnag = mTestateOrdini.stream().map(OrdineUscitaInevasoDTO::getCodAnagOrd)
|
||||
var codAnag = mTestateOrdini.stream()
|
||||
.map(OrdineUscitaInevasoDTO::getCodAnagOrd)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.findFirst()
|
||||
|
||||
@ -25,7 +25,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgssss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
@ -43,7 +43,8 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
private final FragmentManager mFragmentManager;
|
||||
private final List<SpedizioneListModel> mDataset = new ArrayList<>();
|
||||
|
||||
private RunnableArgsss<PickingObjectDTO, MtbColt, MtbColr> mOnItemClicked;
|
||||
private RunnableArgssss<PickingObjectDTO, MtbColt, MtbColr, Boolean> mOnItemClicked;
|
||||
private RunnableArgssss<PickingObjectDTO, MtbColt, MtbColr, Boolean> mOnItemLongClicked;
|
||||
|
||||
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@ -83,10 +84,14 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
});
|
||||
}
|
||||
|
||||
public void setOnItemClicked(RunnableArgsss<PickingObjectDTO, MtbColt, MtbColr> onItemClicked) {
|
||||
public void setOnItemClicked(RunnableArgssss<PickingObjectDTO, MtbColt, MtbColr, Boolean> onItemClicked) {
|
||||
this.mOnItemClicked = onItemClicked;
|
||||
}
|
||||
|
||||
public void setOnItemLongClicked(RunnableArgssss<PickingObjectDTO, MtbColt, MtbColr, Boolean> onItemLongClicked) {
|
||||
this.mOnItemLongClicked = onItemLongClicked;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||
@ -179,7 +184,13 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
|
||||
holder.mBinding.getRoot().setOnClickListener(v -> {
|
||||
if (this.mOnItemClicked != null)
|
||||
this.mOnItemClicked.run(pickingObjectDTO.getOriginalModel(), pickingObjectDTO.getSourceMtbColt(), pickingObjectDTO.getSourceMtbColr());
|
||||
this.mOnItemClicked.run(pickingObjectDTO.getOriginalModel(), pickingObjectDTO.getSourceMtbColt(), pickingObjectDTO.getSourceMtbColr(), false);
|
||||
});
|
||||
|
||||
holder.mBinding.getRoot().setOnLongClickListener(v -> {
|
||||
if (this.mOnItemLongClicked != null)
|
||||
this.mOnItemLongClicked.run(pickingObjectDTO.getOriginalModel(), pickingObjectDTO.getSourceMtbColt(), pickingObjectDTO.getSourceMtbColr(), true);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -239,7 +239,8 @@ public class VersamentoMerceViewModel {
|
||||
this.mColliMagazzinoRESTConsumer.spostaArtsTraUL(
|
||||
clonedSourceTestata,
|
||||
destMtbColt,
|
||||
() -> {
|
||||
false,
|
||||
(generatedMtbColrs) -> {
|
||||
this.sendOnDataSaved();
|
||||
onComplete.run();
|
||||
},
|
||||
|
||||
@ -11,23 +11,25 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.ArrayAdapterTwoLinesItemBinding;
|
||||
|
||||
public class SimpleAutoCompleteTwoLinesDropdownAdapter<T> extends ArrayAdapter<SimpleAutoCompleteTwoLinesDropdownListModel<T>> {
|
||||
|
||||
private List<SimpleAutoCompleteTwoLinesDropdownListModel<T>> mObjects;
|
||||
private RunnableArgs<String> onTextChanged;
|
||||
|
||||
public SimpleAutoCompleteTwoLinesDropdownAdapter(@NonNull Context context, int resource) {
|
||||
super(context, resource);
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteTwoLinesDropdownAdapter(@NonNull Context context, @NonNull SimpleAutoCompleteTwoLinesDropdownListModel<T>[] objects) {
|
||||
super(context, R.layout.array_adapter_two_lines_item, objects);
|
||||
mObjects = Arrays.asList(objects);
|
||||
public SimpleAutoCompleteTwoLinesDropdownAdapter(@NonNull Context context, int resource, @NonNull List<SimpleAutoCompleteTwoLinesDropdownListModel<T>> objects) {
|
||||
super(context, resource, objects);
|
||||
mObjects = objects;
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteTwoLinesDropdownAdapter(@NonNull Context context, @NonNull List<SimpleAutoCompleteTwoLinesDropdownListModel<T>> objects) {
|
||||
@ -35,10 +37,15 @@ public class SimpleAutoCompleteTwoLinesDropdownAdapter<T> extends ArrayAdapter<S
|
||||
mObjects = objects;
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteTwoLinesDropdownAdapter<T> setOnTextChanged(RunnableArgs<String> onTextChanged) {
|
||||
this.onTextChanged = onTextChanged;
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
return new StringFilter(mObjects);
|
||||
return new StringFilter(mObjects, this.onTextChanged);
|
||||
}
|
||||
|
||||
|
||||
@ -67,8 +74,11 @@ public class SimpleAutoCompleteTwoLinesDropdownAdapter<T> extends ArrayAdapter<S
|
||||
private class StringFilter extends Filter {
|
||||
|
||||
private ArrayList<SimpleAutoCompleteTwoLinesDropdownListModel<T>> sourceObjects;
|
||||
private final RunnableArgs<String> onTextChanged;
|
||||
|
||||
public StringFilter(List<SimpleAutoCompleteTwoLinesDropdownListModel<T>> objects, RunnableArgs<String> onTextChanged) {
|
||||
this.onTextChanged = onTextChanged;
|
||||
|
||||
public StringFilter(List<SimpleAutoCompleteTwoLinesDropdownListModel<T>> objects) {
|
||||
if (objects == null) return;
|
||||
sourceObjects = new ArrayList<>();
|
||||
|
||||
@ -79,17 +89,16 @@ public class SimpleAutoCompleteTwoLinesDropdownAdapter<T> extends ArrayAdapter<S
|
||||
|
||||
@Override
|
||||
protected FilterResults performFiltering(CharSequence chars) {
|
||||
if(this.onTextChanged != null) this.onTextChanged.run(chars.toString());
|
||||
|
||||
String filterSeq = chars.toString().toLowerCase();
|
||||
FilterResults result = new FilterResults();
|
||||
if (!filterSeq.isEmpty()) {
|
||||
ArrayList<SimpleAutoCompleteTwoLinesDropdownListModel<T>> filter = new ArrayList<>();
|
||||
List<SimpleAutoCompleteTwoLinesDropdownListModel<T>> filter = sourceObjects.parallelStream()
|
||||
.filter(x -> x.getDescription().toLowerCase().contains(filterSeq) ||
|
||||
x.getTitle().toLowerCase().contains(filterSeq))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (SimpleAutoCompleteTwoLinesDropdownListModel<T> object : sourceObjects) {
|
||||
// the filtering itself:
|
||||
if (object.getDescription().toLowerCase().contains(filterSeq) ||
|
||||
object.getTitle().toLowerCase().contains(filterSeq))
|
||||
filter.add(object);
|
||||
}
|
||||
|
||||
result.count = filter.size();
|
||||
result.values = filter;
|
||||
@ -110,11 +119,9 @@ public class SimpleAutoCompleteTwoLinesDropdownAdapter<T> extends ArrayAdapter<S
|
||||
// NOTE: this function is *always* called from the UI thread.
|
||||
if (constraint != null && constraint.length() > 2) {
|
||||
ArrayList<SimpleAutoCompleteTwoLinesDropdownListModel<T>> filtered = (ArrayList<SimpleAutoCompleteTwoLinesDropdownListModel<T>>) results.values;
|
||||
notifyDataSetChanged();
|
||||
clear();
|
||||
for (int i = 0, l = filtered.size(); i < l; i++)
|
||||
add(filtered.get(i));
|
||||
notifyDataSetInvalidated();
|
||||
addAll(filtered);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,4 +33,9 @@ public class SimpleAutoCompleteTwoLinesDropdownListModel<T> {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getTitle() + " - " + getDescription();
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class DialogAskCliente_Page1_Cliente_ArrayAdapter extends ArrayAdapter<Di
|
||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||
View listItem = convertView;
|
||||
if(listItem == null) {
|
||||
listItem = LayoutInflater.from(mContext).inflate(R.layout.dropdown_simple_item_w_subtitle, parent, false);
|
||||
listItem = LayoutInflater.from(mContext).inflate(R.layout.dropdown_simple_item_w_subtitle_bottom, parent, false);
|
||||
}
|
||||
|
||||
if(position < mDataset.size()) {
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_commessa;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogAskCommessaComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogAskCommessaComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogAskCommessaView dialogAskCommessaView);
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_commessa;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
|
||||
@Module(subcomponents = DialogAskCommessaComponent.class)
|
||||
public class DialogAskCommessaModule {
|
||||
|
||||
@Provides
|
||||
DialogAskCommessaViewModel providesDialogAskCommessaViewModel(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new DialogAskCommessaViewModel(systemRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,168 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_commessa;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
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.di.TextWatcherAdapter;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskCommessaBinding;
|
||||
import it.integry.integrywmsnative.ui.adapter.SimpleAutoCompleteTwoLinesDropdownAdapter;
|
||||
import it.integry.integrywmsnative.ui.adapter.SimpleAutoCompleteTwoLinesDropdownListModel;
|
||||
|
||||
public class DialogAskCommessaView extends BaseDialogFragment implements DialogAskCommessaViewModel.Listener {
|
||||
|
||||
@Inject
|
||||
DialogAskCommessaViewModel mViewModel;
|
||||
|
||||
private final RunnableArgs<JtbComt> onComplete;
|
||||
private final Runnable onAbort;
|
||||
|
||||
private DialogAskCommessaBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
private int mBarcodeScannerIstanceID;
|
||||
|
||||
private JtbComt selectedJtbComt;
|
||||
|
||||
//Pass here all external parameters
|
||||
public static DialogAskCommessaView newInstance(RunnableArgs<JtbComt> onComplete, Runnable onAbort) {
|
||||
return new DialogAskCommessaView(onComplete, onAbort);
|
||||
}
|
||||
|
||||
private DialogAskCommessaView(RunnableArgs<JtbComt> onComplete, Runnable onAbort) {
|
||||
super();
|
||||
|
||||
this.onComplete = onComplete;
|
||||
this.onAbort = onAbort;
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogAskCommessaComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.mContext = requireContext();
|
||||
|
||||
mBindings = DialogAskCommessaBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
setCancelable(false);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(isCancelable())
|
||||
.setNeutralButton(R.string.action_close, null)
|
||||
.setPositiveButton(R.string.confirm, (dialog, which) -> {
|
||||
//Volutamente vuoto
|
||||
})
|
||||
.create();
|
||||
|
||||
|
||||
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||
alertDialog.setOnShowListener(this);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
super.onShow(dialogInterface);
|
||||
|
||||
var alertDialog = ((AlertDialog) dialogInterface);
|
||||
|
||||
var positiveButton = alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
|
||||
positiveButton.setOnClickListener(view -> {
|
||||
if (selectedJtbComt != null) {
|
||||
this.onComplete.run(this.selectedJtbComt);
|
||||
alertDialog.dismiss();
|
||||
} else {
|
||||
Snackbar.make(mContext, mBindings.getRoot(), "Seleziona una commessa prima di procedere", Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInit(DialogInterface dialogInterface) {
|
||||
this.initBarcode();
|
||||
|
||||
this.mViewModel.setListener(this);
|
||||
this.mViewModel.init();
|
||||
}
|
||||
|
||||
private void initBarcode() {
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
.setOnScanFailed(this::onError));
|
||||
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
// this.mViewModel.processBarcodeDTO(data, BarcodeManager::enable);
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onCommesseLoaded(List<JtbComt> dataList) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
|
||||
var listModel = dataList.stream()
|
||||
.map(x -> new SimpleAutoCompleteTwoLinesDropdownListModel<JtbComt>()
|
||||
.setTitle(x.getCodJcom())
|
||||
.setDescription(x.getDescrizione())
|
||||
.setOriginalModel(x))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
var adapter = new SimpleAutoCompleteTwoLinesDropdownAdapter<>(requireActivity(), listModel);
|
||||
mBindings.dropdownCommessa.setAdapter(adapter);
|
||||
|
||||
mBindings.inputCliente.getEditText().addTextChangedListener(new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
|
||||
selectedJtbComt = null;
|
||||
}
|
||||
});
|
||||
|
||||
mBindings.dropdownCommessa.setOnItemClickListener((parent, view, position, id) -> {
|
||||
selectedJtbComt = Objects.requireNonNull(adapter.getItem(position)).getOriginalModel();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_commessa;
|
||||
|
||||
import com.google.common.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
|
||||
public class DialogAskCommessaViewModel {
|
||||
|
||||
private final SystemRESTConsumer systemRESTConsumer;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@Inject
|
||||
public DialogAskCommessaViewModel(SystemRESTConsumer systemRESTConsumer) {
|
||||
this.systemRESTConsumer = systemRESTConsumer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void init() {
|
||||
Type jtbComtListType = new TypeToken<ArrayList<JtbComt>>() {}.getType();
|
||||
|
||||
this.systemRESTConsumer.<List<JtbComt>>processSql("SELECT * " +
|
||||
"FROM jtb_comt " +
|
||||
"WHERE ISNULL(stato_commessa, '') <> 'CHIUSA'", jtbComtListType, data -> {
|
||||
|
||||
this.sendOnCommesseLoaded(data);
|
||||
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
private void sendOnCommesseLoaded(List<JtbComt> commesseList) {
|
||||
if (this.mListener != null) mListener.onCommesseLoaded(commesseList);
|
||||
}
|
||||
|
||||
public DialogAskCommessaViewModel setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
interface Listener extends ILoadingListener {
|
||||
void onCommesseLoaded(List<JtbComt> dataList);
|
||||
|
||||
void onError(Exception ex);
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,9 @@ import android.widget.ArrayAdapter;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
|
||||
@ -20,10 +20,12 @@ public class DialogInputLUProdTipoColloAdapter extends ArrayAdapter<DialogInputL
|
||||
super(context, resource);
|
||||
|
||||
inputData.observeForever(data -> {
|
||||
mDataset = Stream.of(data)
|
||||
if (data != null)
|
||||
mDataset = data.stream()
|
||||
.map(x -> new DialogInputLUProdTipoColloListModel()
|
||||
.setOriginalModel(x))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
else mDataset = new ArrayList<>();
|
||||
|
||||
clear();
|
||||
addAll(mDataset);
|
||||
|
||||
9
app/src/main/res/drawable/ic_puzzle.xml
Normal file
9
app/src/main/res/drawable/ic_puzzle.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M11.5,0C10.119,0 9,1.119 9,2.5L9,4L5,4C3.895,4 3,4.895 3,6L3,9C3,9.552 3.448,10 4,10L4.357,10C5.665,10 6.855,10.941 6.986,12.242C7.136,13.739 5.966,15 4.5,15L4,15C3.448,15 3,15.448 3,16L3,19C3,20.105 3.895,21 5,21L8,21C8.552,21 9,20.552 9,20L9,19.643C9,18.335 9.941,17.145 11.242,17.014C12.739,16.864 14,18.034 14,19.5L14,20C14,20.552 14.448,21 15,21L18,21C19.105,21 20,20.105 20,19L20,15L21.5,15C22.881,15 24,13.881 24,12.5C24,11.119 22.881,10 21.5,10L20,10L20,6C20,4.895 19.105,4 18,4L14,4L14,2.5C14,1.119 12.881,0 11.5,0z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
100
app/src/main/res/layout/dialog_ask_commessa.xml
Normal file
100
app/src/main/res/layout/dialog_ask_commessa.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/job" />
|
||||
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cliente"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionDone"
|
||||
android:hint="@string/job">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/dropdown_commessa"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionDone" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="OPPURE"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginHorizontal="16dp">
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
style="?attr/circularProgressIndicatorStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:trackCornerRadius="4dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_horizontal"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:text="Scansiona il codice a barre di una commessa"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
@ -7,6 +7,7 @@
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
|
||||
@ -301,8 +302,8 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewMaterial.Dialog.SupportingText"
|
||||
@ -371,8 +372,8 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="end">
|
||||
android:layout_gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="24dp"
|
||||
@ -436,25 +437,26 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:src="@drawable/ic_weight_kg"
|
||||
android:src="@{view.untMisIcon}"
|
||||
tools:src="@drawable/ic_weight_kg"
|
||||
android:tint="@color/gray_500" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="@{view.isOrderColli ? View.GONE :View.VISIBLE}"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="@{view.isOrderColli ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="KG"
|
||||
android:text="@{view.currentOrder.untOrd}"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"
|
||||
tools:text="KG" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
@ -475,9 +477,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@{view.currentOrder.untOrd}"
|
||||
tools:text="KG"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:textColor="@android:color/black" />
|
||||
android:textColor="@android:color/black"
|
||||
tools:text="KG" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@ -490,16 +492,16 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextViewMaterial.Dialog.SupportingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:text="Prodotto"
|
||||
android:textStyle="bold"
|
||||
android:gravity="end"
|
||||
tools:text="Prodotto" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@ -696,7 +698,8 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:src="@drawable/ic_weight_kg"
|
||||
android:src="@{view.untMisIcon}"
|
||||
tools:src="@drawable/ic_weight_kg"
|
||||
android:tint="@color/gray_500" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
@ -34,37 +34,51 @@
|
||||
android:textStyle="bold"
|
||||
tools:text="22" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_gravity="center_vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/cod_mart"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignTop="@id/partita_mag_container"
|
||||
android:layout_alignBaseline="@id/partita_mag_container"
|
||||
tools:text="150101-040" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/partita_mag_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/green_200"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_toEndOf="@id/cod_mart">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/partita_mag"
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@id/cod_mart"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_toStartOf="@id/right_content"
|
||||
android:layout_toEndOf="@id/cod_mart"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
tools:text="Lotto articolo" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/right_content"
|
||||
@ -84,6 +98,7 @@
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
tools:text="27" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@ -92,6 +107,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="PZ" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@ -99,16 +115,49 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/descrizione"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="false"
|
||||
android:maxLines="3"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@id/commessa_container"
|
||||
tools:text="Descrizione estesa articolo" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/commessa_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/orange_300"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_alignParentEnd="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/commessa"
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
tools:text="Descrizione estesa articolo" />
|
||||
tools:text="Commessa" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -93,6 +93,10 @@
|
||||
<color name="light_blue_800">#0277BD</color>
|
||||
|
||||
|
||||
<color name="orange_200">#FFCC80</color>
|
||||
<color name="orange_300">#FFB74D</color>
|
||||
<color name="orange_400">#FFA726</color>
|
||||
<color name="orange_500">#FF9800</color>
|
||||
<color name="orange_600_with_alpha">#88FB8C00</color>
|
||||
<color name="orange_600">#FB8C00</color>
|
||||
<color name="orange_700">#F57C00</color>
|
||||
|
||||
@ -32,5 +32,5 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.9.20'
|
||||
agp_version = '8.4.0'
|
||||
agp_version = '8.6.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -13,12 +13,12 @@ buildscript {
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:$agp_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.4.1'
|
||||
classpath 'com.google.gms:google-services:4.4.2'
|
||||
|
||||
classpath 'com.google.firebase:perf-plugin:1.4.2'
|
||||
|
||||
// Add the Firebase Crashlytics Gradle plugin.
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@ -40,7 +40,7 @@ allprojects {
|
||||
// }
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Mon Feb 13 15:14:43 CET 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@ -33,6 +33,6 @@ dependencies {
|
||||
// implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
|
||||
implementation project(":honeywellsdk")
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation project(path: ':barcode_base_android_library')
|
||||
}
|
||||
|
||||
@ -32,6 +32,6 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation project(':barcode_base_android_library')
|
||||
}
|
||||
|
||||
@ -30,6 +30,6 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation project(':barcode_base_android_library')
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ dependencies {
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
implementation project(path: ':barcode_base_android_library')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user