Compare commits
107 Commits
v1.40.18(4
...
v1.41.11(4
| Author | SHA1 | Date | |
|---|---|---|---|
| 777d6a3c5b | |||
| 403f2ec57c | |||
| e69d99fdf1 | |||
| b48b2fbac9 | |||
| 00515aaf9b | |||
| e70d5697c3 | |||
| fb6d206203 | |||
| d3a9c87d14 | |||
| 39841f6b0d | |||
| 7ed3b421a1 | |||
| 3b5eb32190 | |||
| be31b87eac | |||
| 3d341ac99d | |||
| 9df1c37ee9 | |||
| 385a28c29b | |||
| e26568cdf1 | |||
| 191953a003 | |||
| 47143fe97d | |||
| 387ce6a555 | |||
| 47ff01805c | |||
| 0e24f7188c | |||
| 8b3d1f2a2e | |||
| dcdc823b5f | |||
| 7201e5c8f8 | |||
| 929c52b94c | |||
| 2adfda5f30 | |||
| 421accaf15 | |||
| 574ad6176b | |||
| 290d737ff7 | |||
| 4b0fbd0b6b | |||
| 6327089a55 | |||
| 807c3a8cde | |||
| 665c261b9a | |||
| bdd6f21522 | |||
| 2a0465dc0f | |||
| 3ebe311728 | |||
| 95a51ecc7a | |||
| 342753aeac | |||
| 845a4c8faa | |||
| 0328ebad85 | |||
| c42a597bb4 | |||
| 77c5252bf6 | |||
| b40781db84 | |||
| f5a0bf67c8 | |||
| 044d60fb66 | |||
| 7999e98bd9 | |||
| 7c14688ef3 | |||
| 8039d1942d | |||
| 03e2f4390b | |||
| 08656ae276 | |||
| 9f2ba56c59 | |||
| 34e1ba8f95 | |||
| 4e95f4f9c9 | |||
| 1463510b08 | |||
| a771335ff1 | |||
| 7b1f58412a | |||
| d897c83165 | |||
| 44b9bc3fc1 | |||
| fa95ed1391 | |||
| 26ca580ba4 | |||
| f65e69b745 | |||
| 5a147fb0de | |||
| 64e38ce05a | |||
| 6c79a1781d | |||
| 6177d84131 | |||
| c6975badce | |||
| c548c6484f | |||
| 9aae16521f | |||
| 559ff4e94c | |||
| 7b11f503d8 | |||
| bc788c3a34 | |||
| f936c71188 | |||
| 25a7982a87 | |||
| 74a3749e44 | |||
| 074fb10b44 | |||
| 4f490eb737 | |||
| 2b981b6c40 | |||
| bec80d980f | |||
| 8a5c8f5c94 | |||
| da301ec6b2 | |||
| a5a9cb1c50 | |||
| cef74ab71f | |||
| 3f647952c0 | |||
| 9bf55aae85 | |||
| f9a31faa78 | |||
| 9a643837d4 | |||
| f458a52b18 | |||
| 132437d134 | |||
| 022841c195 | |||
| bdbecfb037 | |||
| 1a501af172 | |||
| fe558a8be8 | |||
| 05d930d8f7 | |||
| 267aa85e01 | |||
| 89a98cac8b | |||
| efc052d622 | |||
| 6f61f3af9b | |||
| e7d06c9752 | |||
| 81e3c70960 | |||
| 76a0fe9b6f | |||
| a9bab6db56 | |||
| 85197c1f9b | |||
| ece434806f | |||
| 0962192144 | |||
| 38139a1ec9 | |||
| 56e5603256 | |||
| 26f9f0e16c |
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>
|
||||
|
||||
17
.idea/runConfigurations.xml
generated
Normal file
17
.idea/runConfigurations.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/runConfigurations/app.xml
generated
2
.idea/runConfigurations/app.xml
generated
@@ -1,6 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
|
||||
<module name="WMS_Native.app.main" />
|
||||
<module name="WMS.app.main" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
|
||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 435
|
||||
def appVersionName = '1.40.18'
|
||||
def appVersionCode = 459
|
||||
def appVersionName = '1.41.11'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@@ -29,6 +29,8 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniE
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti.DialogSelectLottiComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti.DialogSelectLottiModule;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleComponent;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleModule;
|
||||
import it.integry.integrywmsnative.gest.inventario.ElencoInventariComponent;
|
||||
@@ -186,6 +188,7 @@ import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracc
|
||||
DialogSelectDocInfoModule.class,
|
||||
DocInterniEditFormModule.class,
|
||||
DialogSelectDocRowsModule.class,
|
||||
DialogSelectLottiModule.class,
|
||||
DialogAskClienteModule.class,
|
||||
DialogEditArticoloModule.class,
|
||||
DialogPrintOrderSSCCListModule.class,
|
||||
@@ -332,6 +335,7 @@ public interface MainApplicationComponent {
|
||||
DialogInfoSituazioneArticoloComponent.Factory dialogInfoSituazioneArticoloComponent();
|
||||
|
||||
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsNewComponent();
|
||||
DialogSelectLottiComponent.Factory dialogSelectLottiComponent();
|
||||
|
||||
DialogSelectArtToOrderComponent.Factory dialogSelectArtToOrderNewComponent();
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import android.view.KeyEvent;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
@@ -18,7 +20,8 @@ public class BaseActivity extends AppCompatActivity {
|
||||
@Inject
|
||||
public DialogProgressView mCurrentProgress;
|
||||
|
||||
private boolean progressOpened;
|
||||
@Inject
|
||||
public ExecutorService executorService;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@@ -47,28 +50,19 @@ public class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||
this.progressOpened = true;
|
||||
runOnUiThread(() -> {
|
||||
try {
|
||||
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
||||
} catch (IllegalStateException ise) {
|
||||
//ignored
|
||||
}
|
||||
});
|
||||
}
|
||||
//executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(getSupportFragmentManager());
|
||||
//});
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
//executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
//});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,8 @@ import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
@@ -24,7 +26,9 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
||||
|
||||
@Inject
|
||||
public DialogProgressView mCurrentProgress;
|
||||
private boolean progressOpened;
|
||||
|
||||
@Inject
|
||||
public ExecutorService executorService;
|
||||
|
||||
private boolean mBarcodeListener = false;
|
||||
|
||||
@@ -70,28 +74,26 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
|
||||
private void openProgress() {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
BarcodeManager.disable();
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
BarcodeManager.enable();
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
public void onError(Exception ex) {
|
||||
this.onLoadingEnded();
|
||||
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.onLoadingEnded();
|
||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
protected ElevatedToolbar mToolbar;
|
||||
|
||||
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private boolean progressOpened;
|
||||
|
||||
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
@@ -67,22 +66,16 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||
this.progressOpened = true;
|
||||
executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
executorService.execute(() -> {
|
||||
mCurrentProgress.dismissAllowingStateLoss();
|
||||
});
|
||||
}
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
// });
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
|
||||
@@ -261,6 +261,11 @@ public class MtbColr extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColr setDataColloRif(LocalDate dataColloRif) {
|
||||
this.dataColloRif = UtilityDate.formatDate(dataColloRif, UtilityDate.COMMONS_DATE_FORMATS.DMY_SLASH);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.annimon.stream.Stream;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -160,6 +161,10 @@ public class MtbColt extends EntityBase {
|
||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataColloS());
|
||||
}
|
||||
|
||||
public LocalDate getDataColloLD() {
|
||||
return UtilityDate.recognizeLocalDateWithExceptionHandler(getDataColloS());
|
||||
}
|
||||
|
||||
public MtbColt setDataCollo(String dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
@@ -170,6 +175,11 @@ public class MtbColt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt setDataCollo(LocalDate dataCollo) {
|
||||
this.dataCollo = UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_SLASH);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
@@ -114,4 +114,21 @@ public class ColliAccettazioneRESTConsumer extends _BaseRESTConsumer implements
|
||||
});
|
||||
}
|
||||
|
||||
public void checkBarcodeUl(String barcodeUl, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed){
|
||||
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||
|
||||
colliAccettazioneRESTConsumerService.checkIfBarcodeUlAlreadyRegistered(barcodeUl)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||
analyzeAnswer(response, "accettazione/checkIfBarcodeUlAlreadyRegistered", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@ import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ColliAccettazioneRESTConsumerService {
|
||||
|
||||
@@ -31,4 +33,7 @@ public interface ColliAccettazioneRESTConsumerService {
|
||||
@POST("wms/accettazione/deleteUDCRow")
|
||||
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||
|
||||
@GET("wms/accettazione/checkIfBarcodeUlAlreadyRegistered")
|
||||
Call<ServiceRESTResponse<Boolean>> checkIfBarcodeUlAlreadyRegistered(@Query("barcodeUl") String barcodeUl);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
@@ -13,6 +15,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DuplicateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DuplicateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
@@ -113,4 +117,21 @@ public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements Co
|
||||
|
||||
}
|
||||
|
||||
public void duplicateUDS(DuplicateUDSRequestDTO duplicateUDSRequestDTO, RunnableArgs<DuplicateUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||
|
||||
colliSpedizioneRESTConsumerService.duplicateUDS(duplicateUDSRequestDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<ServiceRESTResponse<DuplicateUDSResponseDTO>> call, @NonNull Response<ServiceRESTResponse<DuplicateUDSResponseDTO>> response) {
|
||||
analyzeAnswer(response, "spedizione/duplicateUDS", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<ServiceRESTResponse<DuplicateUDSResponseDTO>> call, @NonNull Throwable t) {
|
||||
onFailed.run(new Exception());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DuplicateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DuplicateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
@@ -35,4 +37,7 @@ public interface ColliSpedizioneRESTConsumerService {
|
||||
@POST("wms/spedizione/deleteUDSRow")
|
||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/spedizione/duplicateUDS")
|
||||
Call<ServiceRESTResponse<DuplicateUDSResponseDTO>> duplicateUDS(@Body DuplicateUDSRequestDTO duplicateUDSRequestDTO);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
@@ -18,7 +19,7 @@ import retrofit2.Response;
|
||||
|
||||
@Singleton
|
||||
public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
|
||||
public void createDocsFromColli(List<LoadColliDTO> listColli, RunnableArgs<List<DtbDoct>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
DocumentiRESTConsumerService documentiRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||
@@ -50,8 +51,21 @@ public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void checkDocument(String fornitore, String numDoc, String dataDoc, String tipoDoc, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
var inventarioRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||
inventarioRESTConsumerService.checkDocument(fornitore, numDoc,tipoDoc, dataDoc)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<ServiceRESTResponse<Boolean>> call, @NonNull Response<ServiceRESTResponse<Boolean>> response) {
|
||||
analyzeAnswer(response, "checkDocument", onComplete, onFailed);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<ServiceRESTResponse<Boolean>> call, @NonNull Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void loadDocumentAvailableArts(String codDtip, String codMgrp, String codAnagForn, RunnableArgs<RetrieveDocumentoArtsResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
var inventarioRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.DtbDoct;
|
||||
@@ -20,8 +21,12 @@ public interface DocumentiRESTConsumerService {
|
||||
@POST("createDocFromColli")
|
||||
Call<ServiceRESTResponse<DtbDoct>> createDocFromColli(@Body LoadColliDTO listColli);
|
||||
|
||||
|
||||
|
||||
@GET("wms/documento/checkDoc")
|
||||
Call<ServiceRESTResponse<Boolean>> checkDocument(
|
||||
@Query("fornitore") String fornitore,
|
||||
@Query("numDoc") String numDoc,
|
||||
@Query("tipoDoc") String tipoDoc,
|
||||
@Query("dataDoc") String dataDoc);
|
||||
|
||||
@GET("wms/documento/arts")
|
||||
Call<ServiceRESTResponse<RetrieveDocumentoArtsResponseDTO>> retrieveArts(
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
@@ -59,4 +65,20 @@ public class MagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void retrieveAllPartitaMag(List<String> codMarts, Date dataScad, RunnableArgs<List<MtbPartitaMag>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MagazzinoRESTConsumerService service = RESTBuilder.getService(MagazzinoRESTConsumerService.class);
|
||||
service.retrieveAllPartitaMag(codMarts, UtilityDate.formatDate(dataScad, UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH))
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<ServiceRESTResponse<List<MtbPartitaMag>>> call, @NonNull Response<ServiceRESTResponse<List<MtbPartitaMag>>> response) {
|
||||
analyzeAnswer(response, "retrieveAllPartitaMag", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<ServiceRESTResponse<List<MtbPartitaMag>>> call, @NonNull Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,12 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface MagazzinoRESTConsumerService {
|
||||
@@ -22,6 +20,7 @@ public interface MagazzinoRESTConsumerService {
|
||||
Call<ServiceRESTResponse<MtbPartitaMag>> retrievePartitaMag(@Query("codMart") String codMart,
|
||||
@Query("partitaMag") String partitaMag);
|
||||
|
||||
|
||||
|
||||
@POST("wms/partita-magazzino/retrieveAllPartitaMag")
|
||||
Call<ServiceRESTResponse<List<MtbPartitaMag>>> retrieveAllPartitaMag(@Body List<String> codMarts,
|
||||
@Query("dataScad") String dataScad);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.OrdineDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
@@ -42,17 +41,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
||||
var startTime = new Date().getTime();
|
||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||
UtilityThread.executeParallel(() -> {
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, false);
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
||||
Log.e("getArticoliListino_pv", t.toString());
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@@ -66,17 +61,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
||||
var startTime = new Date().getTime();
|
||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||
UtilityThread.executeParallel(() -> {
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, false);
|
||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||
onSuccess.run(articoliOrdineWrapper);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
||||
Log.e("getArticoliListino_pv", t.toString());
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@@ -105,7 +96,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
var startTime = new Date().getTime();
|
||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||
UtilityThread.executeParallel(() -> {
|
||||
// UtilityThread.executeParallel(() -> {
|
||||
// if (data == null) {
|
||||
// onFailed.run(new Exception("Nessun ordine generato"));
|
||||
// return;
|
||||
@@ -117,7 +108,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
// ordine.setCodMdep(data.getCodMdep());
|
||||
// ordine.setNumOrd(data.getNumOrd());
|
||||
onSuccess.run(ordine);
|
||||
}, false);
|
||||
// }, false);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class DuplicateUDSRequestDTO {
|
||||
|
||||
private MtbColt mtbColt;
|
||||
|
||||
private int numOfDuplicates;
|
||||
|
||||
public MtbColt getMtbColt() {
|
||||
return mtbColt;
|
||||
}
|
||||
|
||||
public DuplicateUDSRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||
this.mtbColt = mtbColt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNumOfDuplicates() {
|
||||
return numOfDuplicates;
|
||||
}
|
||||
|
||||
public DuplicateUDSRequestDTO setNumOfDuplicates(int numOfDuplicates) {
|
||||
this.numOfDuplicates = numOfDuplicates;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class DuplicateUDSResponseDTO {
|
||||
|
||||
private List<MtbColt> mtbColtList;
|
||||
|
||||
public List<MtbColt> getMtbColtList() {
|
||||
return mtbColtList;
|
||||
}
|
||||
|
||||
public DuplicateUDSResponseDTO setMtbColtList(List<MtbColt> mtbColtList) {
|
||||
this.mtbColtList = mtbColtList;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public class DBSettingsModel {
|
||||
private boolean flagSpedizioneCanSelectMultipleOrders;
|
||||
private List<String> notePerditaDocInterni = new ArrayList<>();
|
||||
private boolean flagSpedizioneUseQtaOrd;
|
||||
private boolean flagSpedizioneUseColliPedana;
|
||||
private boolean flagOrdinaNuoviArticoliInGriglia;
|
||||
private boolean flagOrdinaArticoliOnScan;
|
||||
private boolean flagConsentiFuoriPianoLogistico;
|
||||
@@ -75,9 +76,13 @@ public class DBSettingsModel {
|
||||
private boolean flagProduzioneShowInfo = false;
|
||||
private boolean flagAccettazioneBollaUseQtaOrd = true;
|
||||
private boolean flagWarningNewPartitaMag = false;
|
||||
|
||||
private boolean flagTracciamentoImballiCaricoEnabled = false;
|
||||
private boolean flagTracciamentoImballiScaricoEnabled = false;
|
||||
private boolean flagPickingLiberoEnableScanArt = false;
|
||||
private boolean flagAskDuplicateUDSSpedizione = false;
|
||||
private boolean suggestDataScad = false;
|
||||
private boolean flagPositionChangeRequest = false;
|
||||
private String docInterniRequestNumDoc;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@@ -268,6 +273,15 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagSpedizioneUseColliPedana() {
|
||||
return flagSpedizioneUseColliPedana;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagSpedizioneUseColliPedana(boolean flagSpedizioneUseColliPedana) {
|
||||
this.flagSpedizioneUseColliPedana = flagSpedizioneUseColliPedana;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagOrdinaNuoviArticoliInGriglia(boolean flagOrdinaNuoviArticoliInGriglia) {
|
||||
this.flagOrdinaNuoviArticoliInGriglia = flagOrdinaNuoviArticoliInGriglia;
|
||||
return this;
|
||||
@@ -654,4 +668,49 @@ public class DBSettingsModel {
|
||||
this.flagTracciamentoImballiScaricoEnabled = flagTracciamentoImballiScaricoEnabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagPickingLiberoEnableScanArt() {
|
||||
return flagPickingLiberoEnableScanArt;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagPickingLiberoEnableScanArt(boolean flagPickingLiberoEnableScanArt) {
|
||||
this.flagPickingLiberoEnableScanArt = flagPickingLiberoEnableScanArt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagAskDuplicateUDSSpedizione() {
|
||||
return flagAskDuplicateUDSSpedizione;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagAskDuplicateUDSSpedizione(boolean flagAskDuplicateUDSSpedizione) {
|
||||
this.flagAskDuplicateUDSSpedizione = flagAskDuplicateUDSSpedizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSuggestDataScad() {
|
||||
return suggestDataScad;
|
||||
}
|
||||
|
||||
public DBSettingsModel setSuggestDataScad(boolean suggestDataScad) {
|
||||
this.suggestDataScad = suggestDataScad;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDocInterniRequestNumDoc() {
|
||||
return docInterniRequestNumDoc;
|
||||
}
|
||||
|
||||
public DBSettingsModel setDocInterniRequestNumDoc(String docInterniRequestNumDoc) {
|
||||
this.docInterniRequestNumDoc = docInterniRequestNumDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagPositionChangeRequest() {
|
||||
return flagPositionChangeRequest;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagPositionChangeRequest(boolean flagPositionChangeRequest) {
|
||||
this.flagPositionChangeRequest = flagPositionChangeRequest;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,6 +315,11 @@ public class SettingsManager {
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_USE_QTA_ORD")
|
||||
.setSetter(dbSettingsModelIstance::setFlagSpedizioneUseQtaOrd));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_USE_COLLI_PEDANA")
|
||||
.setSetter(dbSettingsModelIstance::setFlagSpedizioneUseColliPedana));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Integer.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SETUP")
|
||||
@@ -388,6 +393,11 @@ public class SettingsManager {
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_ASK_INFO_AGGIUNTIVE")
|
||||
.setSetter(dbSettingsModelIstance::setFlagAskInfoAggiuntiveSpedizione));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_ASK_DUPLICATE_UDS")
|
||||
.setSetter(dbSettingsModelIstance::setFlagAskDuplicateUDSSpedizione));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
@@ -446,6 +456,12 @@ public class SettingsManager {
|
||||
.setKeySection("GENERA_DOC")
|
||||
.setSetter(dbSettingsModelIstance::setFlagGeneraDocumentoSpedizione)
|
||||
.setDefaultValue(false));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("SUGGEST_DATA_SCAD")
|
||||
.setSetter(dbSettingsModelIstance::setSuggestDataScad)
|
||||
.setDefaultValue(false));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("ACCETTAZIONE_BOLLA")
|
||||
@@ -518,6 +534,18 @@ public class SettingsManager {
|
||||
.setKeySection("FLAG_WARNING_NEW_PARTITA_MAG")
|
||||
.setSetter(dbSettingsModelIstance::setFlagWarningNewPartitaMag)
|
||||
.setDefaultValue(false));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("PICKING_LIBERO")
|
||||
.setKeySection("ENABLE_SCAN_ART")
|
||||
.setSetter(dbSettingsModelIstance::setFlagPickingLiberoEnableScanArt)
|
||||
.setDefaultValue(true));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SETUP")
|
||||
.setKeySection("ENABLE_POSITION_CHANGE_REQUEST")
|
||||
.setSetter(dbSettingsModelIstance::setFlagPositionChangeRequest)
|
||||
.setDefaultValue(true));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("PICKING")
|
||||
@@ -535,6 +563,12 @@ public class SettingsManager {
|
||||
dbSettingsModelIstance.setFlagTracciamentoImballiScaricoEnabled(!UtilityString.isNullOrEmpty(data));
|
||||
}));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("PVM")
|
||||
.setSection("DOC_INTERNI")
|
||||
.setKeySection("REQUEST_NUM_DOC")
|
||||
.setSetter(dbSettingsModelIstance::setDocInterniRequestNumDoc));
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ public class UtilityExceptions {
|
||||
if (!BuildConfig.DEBUG && !toIgnore) {
|
||||
if (sendEmail) UtilityLogger.error(ex);
|
||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
} else {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -33,6 +35,7 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
@@ -54,11 +57,15 @@ import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBo
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.TestataBollaAccettazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.dto.AccettazioneBollaPickingOrderBy;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.dto.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.filters.AccettazioneBollaPickingFilterViewModel;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.ui.AccettazioneBollaPickingListAdapter;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.ui.AccettazioneBollaPickingListModel;
|
||||
import it.integry.integrywmsnative.gest.accettazione_ordini_picking.filters.FilterDescrLayoutView;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliActivity;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView;
|
||||
@@ -82,8 +89,9 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
private ActivityAccettazioneBollaPickingBinding mBindings;
|
||||
|
||||
private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel;
|
||||
|
||||
|
||||
|
||||
private final AccettazioneBollaPickingFilterViewModel mAppliedFilterViewModel = new AccettazioneBollaPickingFilterViewModel();
|
||||
|
||||
private final ObservableArrayList<AccettazioneBollaPickingListModel> mAccettazioneMutableData = new ObservableArrayList<>();
|
||||
|
||||
public BindableBoolean noItemsToPick = new BindableBoolean(false);
|
||||
@@ -150,7 +158,7 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
this.initVars();
|
||||
this.initBarcodeReader();
|
||||
this.initRecyclerView();
|
||||
// this.initFilters();
|
||||
this.initFilters();
|
||||
this.initFab();
|
||||
|
||||
boolean useQtaBolla = SettingsManager.iDB().isFlagAccettazioneBollaUseQtaOrd();
|
||||
@@ -201,16 +209,85 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
this.mBindings.accettazionePickingList.setAdapter(adapter);
|
||||
|
||||
this.mViewModel.getPickingList().observe(this, updatedData -> {
|
||||
// mAppliedFilterViewModel.init(updatedData);
|
||||
mAppliedFilterViewModel.init(updatedData);
|
||||
|
||||
refreshList();
|
||||
});
|
||||
|
||||
adapter.setOnLongClickListener(clickedItem -> {
|
||||
this.mViewModel.dispatchBollaRow(clickedItem, true);
|
||||
});
|
||||
|
||||
adapter.setOnItemClicked(clickedItem -> {
|
||||
this.mViewModel.dispatchBollaRow(clickedItem);
|
||||
});
|
||||
}
|
||||
|
||||
private void initFilters() {
|
||||
|
||||
var onPredicateChanged = new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
refreshList();
|
||||
}
|
||||
};
|
||||
|
||||
mAppliedFilterViewModel.getCurrentDescrPredicate().addOnPropertyChangedCallback(onPredicateChanged);
|
||||
|
||||
List<FilterChipDTO> filterList = Stream.of(AccettazioneBollaPickingBindings.AVAILABLE_FILTERS.entrySet()).map(Map.Entry::getValue).sortBy(FilterChipDTO::getPosizione).toList();
|
||||
|
||||
for (FilterChipDTO filterChipDTO : filterList) {
|
||||
|
||||
FilterChipView filterChipView = new FilterChipView(this, filterChipDTO.getFilterChipText(), v -> initBottomSheetDialogFilter(filterChipDTO));
|
||||
|
||||
if (filterChipDTO.getID() == AccettazioneBollaPickingBindings.DESCR_FILTER_ID) {
|
||||
mAppliedFilterViewModel.getCurrentDescrPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mAppliedFilterViewModel.getCurrentDescrPredicate().get() == null) {
|
||||
mViewModel.resetMatchedRows();
|
||||
filterChipView.disableCloseIcon();
|
||||
|
||||
mBindings.filterChipsGroup.removeView(filterChipView);
|
||||
mBindings.filterChipsGroup.addView(filterChipView);
|
||||
mBindings.filterChips.smoothScrollTo(0, 0);
|
||||
} else {
|
||||
filterChipView.enableCloseIcon();
|
||||
|
||||
mBindings.filterChipsGroup.removeView(filterChipView);
|
||||
mBindings.filterChipsGroup.addView(filterChipView, 0);
|
||||
mBindings.filterChips.smoothScrollTo(0, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentDescrPredicate().set(null));
|
||||
}
|
||||
|
||||
this.mBindings.filterChipsGroup.addView(filterChipView);
|
||||
}
|
||||
}
|
||||
|
||||
private void initBottomSheetDialogFilter(FilterChipDTO filterChipDTO) {
|
||||
|
||||
filterChipDTO.getFilterLayoutView().setFilterName(filterChipDTO.getFilterChipText()).setContext(this);
|
||||
|
||||
var filterLayoutView = filterChipDTO.getFilterLayoutView();
|
||||
|
||||
if (filterChipDTO.getID() == AccettazioneBollaPickingBindings.DESCR_FILTER_ID) {
|
||||
((FilterDescrLayoutView) filterLayoutView)
|
||||
.setAll(mAppliedFilterViewModel.getAllDescrs())
|
||||
.setAvailable(mAppliedFilterViewModel.getAvailableDescrs())
|
||||
.setOnFilterApplied(mAppliedFilterViewModel::setDescrFilter)
|
||||
.setPreselected(
|
||||
Stream.of(Objects.requireNonNull(mViewModel.getPickingList().getValue()))
|
||||
.filter(mAppliedFilterViewModel.getCurrentDescrPredicate().get() == null ? x -> false : Objects.requireNonNull(mAppliedFilterViewModel.getCurrentDescrPredicate().get()))
|
||||
.map(x -> x.getMtbAart().getDescrizioneEstesa()).toList()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (!filterLayoutView.isAdded()) filterLayoutView.show(getSupportFragmentManager(), "TAG");
|
||||
}
|
||||
|
||||
private void initFab() {
|
||||
fabPopupMenu = new PopupMenu(this, this.mBindings.accettazioneOrdineInevasoFab,
|
||||
@@ -246,13 +323,13 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
runOnUiThread(() -> {
|
||||
List<PickingObjectDTO> tmpList;
|
||||
|
||||
// if (mAppliedFilterViewModel != null) {
|
||||
// mAppliedFilterViewModel.applyAllTests();
|
||||
// tmpList = mAppliedFilterViewModel.getMutableFilteredOrderList().getValue();
|
||||
// } else {
|
||||
if (mAppliedFilterViewModel != null) {
|
||||
mAppliedFilterViewModel.applyAllTests();
|
||||
tmpList = mAppliedFilterViewModel.getMutableFilteredOrderList().getValue();
|
||||
} else {
|
||||
tmpList = mViewModel.getPickingList().getValue();
|
||||
// }
|
||||
//
|
||||
}
|
||||
|
||||
var list = convertDataModelToListModel(tmpList);
|
||||
|
||||
this.mAccettazioneMutableData.clear();
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package it.integry.integrywmsnative.gest.accettazione_bolla_picking;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import it.integry.integrywmsnative.gest.accettazione_ordini_picking.filters.FilterDescrLayoutView;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO;
|
||||
|
||||
public class AccettazioneBollaPickingBindings {
|
||||
|
||||
public static final int DESCR_FILTER_ID = 0;
|
||||
|
||||
public static final HashMap<Integer, FilterChipDTO> AVAILABLE_FILTERS = new HashMap<>() {
|
||||
{
|
||||
|
||||
put(DESCR_FILTER_ID, new FilterChipDTO()
|
||||
.setID(DESCR_FILTER_ID)
|
||||
.setPosizione(1)
|
||||
.setFilterChipText("Descrizione articolo")
|
||||
.setFilterLayoutView(new FilterDescrLayoutView()));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -443,7 +443,11 @@ public class AccettazioneBollaPickingViewModel {
|
||||
dispatchBollaRow(pickingObjectDTO);
|
||||
}
|
||||
|
||||
public void dispatchBollaRow(final PickingObjectDTO pickingObjectDTO) {
|
||||
public void dispatchBollaRow(final PickingObjectDTO pickingObjectDTO){
|
||||
dispatchBollaRow(pickingObjectDTO, false);
|
||||
}
|
||||
|
||||
public void dispatchBollaRow(final PickingObjectDTO pickingObjectDTO, boolean longClick) {
|
||||
if (this.mCurrentMtbColt == null) return;
|
||||
|
||||
AtomicBigDecimal numCnfWithdrawRows = new AtomicBigDecimal();
|
||||
@@ -578,31 +582,42 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
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 (!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);
|
||||
});
|
||||
} else {
|
||||
this.saveNewRow(
|
||||
pickingObjectDTO,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
partitaMag,
|
||||
dataScad,
|
||||
false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package it.integry.integrywmsnative.gest.accettazione_bolla_picking.filters;
|
||||
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.annimon.stream.function.Predicate;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.dto.PickingObjectDTO;
|
||||
|
||||
public class AccettazioneBollaPickingFilterViewModel {
|
||||
private final ObservableField<Predicate<PickingObjectDTO>> currentDescrPredicate = new ObservableField<>();
|
||||
|
||||
private List<PickingObjectDTO> initialOrderList;
|
||||
private final MutableLiveData<List<PickingObjectDTO>> currentFilteredOrderList = new MutableLiveData<>();
|
||||
|
||||
public void init(List<PickingObjectDTO> initialList) {
|
||||
this.initialOrderList = initialList;
|
||||
this.currentFilteredOrderList.setValue(this.initialOrderList);
|
||||
}
|
||||
|
||||
public MutableLiveData<List<PickingObjectDTO>> getMutableFilteredOrderList() {
|
||||
return this.currentFilteredOrderList;
|
||||
}
|
||||
|
||||
|
||||
public void setDescrFilter(List<String> descrs) {
|
||||
if (descrs == null || descrs.isEmpty()) currentDescrPredicate.set(null);
|
||||
else {
|
||||
currentDescrPredicate.set(o -> descrs.contains(o.getMtbAart().getDescrizione()));
|
||||
}
|
||||
}
|
||||
|
||||
public void applyAllTests() {
|
||||
|
||||
List<PickingObjectDTO> returnList;
|
||||
|
||||
if (currentDescrPredicate.get() == null) {
|
||||
returnList = this.initialOrderList;
|
||||
} else {
|
||||
Stream<PickingObjectDTO> tmpStream = Stream.of(this.initialOrderList)
|
||||
.filter(x ->(currentDescrPredicate.get() == null || (currentDescrPredicate.get().test(x)))
|
||||
);
|
||||
|
||||
returnList = tmpStream.toList();
|
||||
}
|
||||
|
||||
this.currentFilteredOrderList.setValue(returnList);
|
||||
}
|
||||
|
||||
public ObservableField<Predicate<PickingObjectDTO>> getCurrentDescrPredicate() {
|
||||
return currentDescrPredicate;
|
||||
}
|
||||
|
||||
public List<String> getAllDescrs() {
|
||||
return Stream
|
||||
.of(Objects.requireNonNull(initialOrderList))
|
||||
.filter(x -> x.getMtbAart().getDescrizioneEstesa() != null)
|
||||
.sortBy(x -> x.getMtbAart().getDescrizioneEstesa())
|
||||
.map(x -> x.getMtbAart().getDescrizioneEstesa() != null ? x.getMtbAart().getDescrizioneEstesa() : null)
|
||||
.distinct()
|
||||
.toList();
|
||||
}
|
||||
|
||||
public List<String> getAvailableDescrs() {
|
||||
return Stream.of(this.initialOrderList)
|
||||
.map(x -> x.getMtbAart().getDescrizioneEstesa())
|
||||
.distinct()
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
|
||||
private final List<AccettazioneBollaPickingListModel> mDataset = new ArrayList<>();
|
||||
|
||||
private RunnableArgs<PickingObjectDTO> mOnItemClicked;
|
||||
private RunnableArgs<PickingObjectDTO> mOnItemLongClicked;
|
||||
|
||||
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@@ -75,6 +76,9 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
|
||||
this.mOnItemClicked = onItemClicked;
|
||||
}
|
||||
|
||||
public void setOnLongClickListener(RunnableArgs<PickingObjectDTO> onItemLongClicked){
|
||||
this.mOnItemLongClicked = onItemLongClicked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccettazioneBollaPickingListAdapter.SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||
@@ -160,6 +164,12 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
|
||||
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
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.view.Gravity;
|
||||
import android.view.Menu;
|
||||
@@ -741,6 +742,16 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWarning(String warningText, Runnable action) {
|
||||
this.runOnUiThread(() -> {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
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 canPartitaMagBeChanged, boolean canOverflowQuantity, String customArtDescription, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO().setMtbAart(mtbAart).setInitialNumCnf(initialNumCnf).setInitialQtaCnf(initialQtaCnf).setInitialQtaTot(initialQtaTot).setTotalQtaOrd(totalQtaOrd).setTotalNumCnfOrd(totalNumCnfOrd).setQtaCnfOrd(qtaCnfOrd).setTotalQtaToBeTaken(totalQtaToBeTaken).setTotalNumCnfToBeTaken(totalNumCnfToBeTaken).setQtaCnfToBeTaken(qtaCnfToBeTaken).setTotalQtaAvailable(totalQtaAvailable).setTotalNumCnfAvailable(totalNumCnfAvailable).setQtaCnfAvailable(qtaCnfAvailable).setPartitaMag(partitaMag).setDataScad(dataScad).setCanPartitaMagBeChanged(canPartitaMagBeChanged).setCanLUBeClosed(true).setCanOverflowOrderQuantity(canOverflowQuantity).setCustomArtDescription(customArtDescription);
|
||||
|
||||
@@ -247,8 +247,14 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
try {
|
||||
Ean128Model ean128Model = mEan128Service.decode(barcodeScanDTO);
|
||||
|
||||
//Nel caso trovo un SSCC lo aggiungo
|
||||
this.processBarcodeNotOpenedLU(barcodeScanDTO, ean128Model.Sscc, onComplete);
|
||||
mColliAccettazioneRESTConsumer.checkBarcodeUl(ean128Model.Sscc, result -> {
|
||||
if (result){
|
||||
this.sendWarning("Barcode ul già registrato!", onComplete);
|
||||
} else {
|
||||
//Nel caso trovo un SSCC lo aggiungo
|
||||
this.processBarcodeNotOpenedLU(barcodeScanDTO, ean128Model.Sscc, onComplete);
|
||||
}
|
||||
}, this::sendError);
|
||||
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
@@ -550,7 +556,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
|
||||
if (dataScad == null && pickingObjectDTO.getMtbAart().getGgScadPartita() != null && pickingObjectDTO.getMtbAart().getGgScadPartita() > 0) {
|
||||
dataScad = UtilityDate.getNow();
|
||||
dataScad.plusDays(pickingObjectDTO.getMtbAart().getGgScadPartita());
|
||||
dataScad = dataScad.plusDays(pickingObjectDTO.getMtbAart().getGgScadPartita());
|
||||
}
|
||||
|
||||
if (partitaMag == null && dataScad == null) {
|
||||
@@ -933,6 +939,10 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendWarning(String warningText, Runnable action) {
|
||||
if (this.mListener != null) mListener.onWarning(warningText, action);
|
||||
}
|
||||
|
||||
private void sendLUOpened(MtbColt mtbColt) {
|
||||
if (this.mListener != null) mListener.onLUOpened(mtbColt);
|
||||
}
|
||||
@@ -1050,6 +1060,8 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
|
||||
void onFilterPosizioneApplied(String posizioneToFilter);
|
||||
|
||||
void onWarning(String warningText, Runnable action);
|
||||
|
||||
void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package it.integry.integrywmsnative.gest.contab_doc_interni;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -37,6 +39,7 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniE
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.ui.DocInterniListAdapter;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.ui.DocInterniListModel;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class DocInterniFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, DocInterniViewModel.Listener {
|
||||
|
||||
@@ -120,10 +123,21 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
this.openDocumentSelectionDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWarning(String warningText, Runnable action) {
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDocDetailsChanged(DialogSelectDocInfoResponseDTO selection) {
|
||||
mViewModel.setSelectedDocDetails(selection);
|
||||
mBinding.invalidateAll();
|
||||
mViewModel.setSelectedDocDetails(selection, () -> {
|
||||
mBinding.invalidateAll();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.DocInternoWrapper;
|
||||
@@ -17,6 +18,8 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.documento.DocumentoArtDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoResponseDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||
@@ -76,6 +79,14 @@ public class DocInterniViewModel {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendWarning(String warningText, Runnable action) {
|
||||
if (this.mListener != null) mListener.onWarning(warningText, action);
|
||||
}
|
||||
|
||||
private void sendDocDetailsChanged(DialogSelectDocInfoResponseDTO selection){
|
||||
if (this.mListener != null) mListener.onDocDetailsChanged(selection);
|
||||
}
|
||||
|
||||
public DocInterniViewModel setListeners(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
@@ -85,7 +96,7 @@ public class DocInterniViewModel {
|
||||
return mDocsList;
|
||||
}
|
||||
|
||||
public void setSelectedDocDetails(DialogSelectDocInfoResponseDTO selection) {
|
||||
public void setSelectedDocDetails(DialogSelectDocInfoResponseDTO selection, Runnable action) {
|
||||
this.fornitore = selection.getFornitore();
|
||||
this.dtbTipi = selection.getTipoDoc();
|
||||
|
||||
@@ -94,10 +105,34 @@ public class DocInterniViewModel {
|
||||
this.numDoc = selection.getNumDoc() != null ? selection.getNumDoc().toString() : null;
|
||||
this.note = selection.getNote();
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
fetchProducts(() -> {
|
||||
fetchDocuments(this::sendOnLoadingEnded);
|
||||
});
|
||||
String codAnag = null;
|
||||
if (fornitore != null){
|
||||
codAnag = fornitore.getCodAnag();
|
||||
}
|
||||
|
||||
String codDtip = null;
|
||||
if (dtbTipi != null){
|
||||
codDtip = dtbTipi.getCodDtip();
|
||||
}
|
||||
|
||||
documentRESTConsumer.checkDocument(
|
||||
codAnag,
|
||||
numDoc,
|
||||
UtilityDate.formatDate(dataDoc, "yyyy/MM/dd"),
|
||||
codDtip,
|
||||
data -> {
|
||||
if (!data) {
|
||||
this.sendWarning("Documento di riferimento non trovato!", this::init);
|
||||
} else {
|
||||
action.run();
|
||||
this.sendOnLoadingStarted();
|
||||
fetchProducts(() -> {
|
||||
fetchDocuments(this::sendOnLoadingEnded);
|
||||
});
|
||||
}
|
||||
},
|
||||
this::sendError
|
||||
);
|
||||
}
|
||||
|
||||
public void fetchProducts(Runnable onComplete) {
|
||||
@@ -210,6 +245,8 @@ public class DocInterniViewModel {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onWarning(String warningText, Runnable action);
|
||||
|
||||
void onDocInterniSetupFetched(DocInterniSetupDTO docInterniSetupDTO);
|
||||
|
||||
void onDocDetailsChanged(DialogSelectDocInfoResponseDTO selection);
|
||||
|
||||
@@ -3,10 +3,14 @@ package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.DocumentRequiredException;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.FornitoreRequiredException;
|
||||
@@ -33,9 +37,12 @@ public class DialogSelectDocInfoViewModel extends ViewModel {
|
||||
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
||||
|
||||
public DialogSelectDocInfoViewModel() {
|
||||
String docInterniRequestNumDoc = SettingsManager.iDB().getDocInterniRequestNumDoc();
|
||||
List<String> requestNumDocList = docInterniRequestNumDoc != null ? Arrays.asList(docInterniRequestNumDoc.split("\\|")) : new ArrayList<>();
|
||||
|
||||
tipoDoc.observeForever(val -> fornitoreRequired.postValue(val != null && (val.getGestioneDoc().equals("T") || val.getGestioneDoc().equals("A") || (val.getGestioneDoc().equals("P") && !val.getGestione().equals("L")))));
|
||||
|
||||
tipoDoc.observeForever(val -> documentRequired.postValue(val != null && val.getGestioneDoc().equalsIgnoreCase("P") && !val.getGestione().equalsIgnoreCase("L")));
|
||||
tipoDoc.observeForever(val -> documentRequired.postValue(val != null && (val.getGestioneDoc().equalsIgnoreCase("P") && !val.getGestione().equalsIgnoreCase("L")) || requestNumDocList.contains(Objects.requireNonNull(val).getCodDtip())));
|
||||
|
||||
tipoDoc.observeForever(val -> noteRequired.postValue(val != null && val.getGestioneDoc().equals("P") && val.getGestione().equals("L")));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class RetrieveLottiDTO {
|
||||
|
||||
private String codProd;
|
||||
private String partitaMag;
|
||||
private Date dataScad;
|
||||
|
||||
public String getCodProd() {
|
||||
return codProd;
|
||||
}
|
||||
|
||||
public RetrieveLottiDTO setCodProd(String codProd) {
|
||||
this.codProd = codProd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public RetrieveLottiDTO setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataScad() {
|
||||
return dataScad;
|
||||
}
|
||||
|
||||
public RetrieveLottiDTO setDataScad(Date dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ public class TipoDocDTO {
|
||||
private String gestioneDoc;
|
||||
private boolean flagChkTracciabilita;
|
||||
private boolean requireNote = false;
|
||||
private boolean suggestLotti;
|
||||
|
||||
public String getCodDtip() {
|
||||
return codDtip;
|
||||
@@ -62,4 +63,13 @@ public class TipoDocDTO {
|
||||
this.flagChkTracciabilita = flagChkTracciabilita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSuggestLotti() {
|
||||
return suggestLotti;
|
||||
}
|
||||
|
||||
public TipoDocDTO setSuggestLotti(boolean suggestLotti) {
|
||||
this.suggestLotti = suggestLotti;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDT
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsItemListModel;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsView;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti.DialogSelectLottiItemListModel;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti.DialogSelectLottiView;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.ui.DocumentRowsListAdapter;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
@@ -302,6 +304,30 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
.setFlagDig(isUntMisDig ? "S" : "N");
|
||||
mtbAart.setMtbUntMis(Collections.singletonList(mtbUntMis));
|
||||
|
||||
if (this.viewModel.getTipoDoc().isSuggestLotti()) {
|
||||
this.viewModel.retrieveLotti(row.getCodMart(), lotti -> {
|
||||
var dataSet =
|
||||
Stream.of(lotti)
|
||||
.map(x -> new DialogSelectLottiItemListModel<>()
|
||||
.setPartitaMag(x.getPartitaMag())
|
||||
.setDataScad(UtilityDate.toLocalDate(x.getDataScad()))
|
||||
.setOriginalModel(x)
|
||||
)
|
||||
.toList();
|
||||
|
||||
DialogSelectLottiView.newInstance(dataSet, data -> {
|
||||
row.setPartitaMag(data.getPartitaMag());
|
||||
row.setDataScad(data.getDataScad());
|
||||
|
||||
openInputQuantity(mtbAart, row, flagTracciabilita);
|
||||
}, () -> {}).show(this.getSupportFragmentManager(), "dialogSelectLotti");;
|
||||
});
|
||||
} else {
|
||||
openInputQuantity(mtbAart, row, flagTracciabilita);
|
||||
}
|
||||
}
|
||||
|
||||
private void openInputQuantity(MtbAart mtbAart, SqlMtbColr row, boolean flagTracciabilita) {
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setInitialNumCnf(BigDecimal.valueOf(row.getNumCnf()))
|
||||
|
||||
@@ -19,6 +19,7 @@ import it.integry.integrywmsnative.core.data_store.db.repository.MtbColrDataSour
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromCodMartException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
@@ -32,6 +33,7 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dto.CheckFornitoreDTO
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ColloDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.RetrieveLottiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||
@@ -126,7 +128,7 @@ public class DocInterniEditFormViewModel {
|
||||
}
|
||||
|
||||
public void loadArticoloByCodMartOrBarcode(String codMart) {
|
||||
if(productsList == null) {
|
||||
if (productsList == null) {
|
||||
this.sendError(new NoResultFromCodMartException(codMart));
|
||||
return;
|
||||
}
|
||||
@@ -372,6 +374,10 @@ public class DocInterniEditFormViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
public void retrieveLotti(String codProd, RunnableArgs<List<RetrieveLottiDTO>> onComplete) {
|
||||
docInterniRESTConsumer.retrieveLotti(codProd, onComplete, this::sendError);
|
||||
}
|
||||
|
||||
public void deleteRow(SqlMtbColr sqlMtbColr) {
|
||||
mtbColrRepository.delete(sqlMtbColr, this::fetchDocumentRows, this::sendError);
|
||||
}
|
||||
@@ -397,6 +403,10 @@ public class DocInterniEditFormViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public TipoDocDTO getTipoDoc() {
|
||||
return tipoDoc;
|
||||
}
|
||||
|
||||
public boolean isNotesMandatory() {
|
||||
return this.tipoDoc != null && this.tipoDoc.isRequireNote();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogSelectLottiComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogSelectLottiComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogSelectLottiView dialogSelectLottiView);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
public class DialogSelectLottiItemListModel<T> {
|
||||
|
||||
private String partitaMag;
|
||||
private LocalDate dataScad;
|
||||
private T originalModel;
|
||||
private BindableBoolean checked = new BindableBoolean(false);
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public DialogSelectLottiItemListModel<T> setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDate getDataScad() {
|
||||
return dataScad;
|
||||
}
|
||||
|
||||
public String getDataScadText() {
|
||||
return UtilityDate.formatDate(this.dataScad, UtilityDate.COMMONS_DATE_FORMATS.DMY_SLASH);
|
||||
}
|
||||
|
||||
public DialogSelectLottiItemListModel<T> setDataScad(LocalDate dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
return this;
|
||||
}
|
||||
|
||||
public T getOriginalModel() {
|
||||
return originalModel;
|
||||
}
|
||||
|
||||
public DialogSelectLottiItemListModel<T> setOriginalModel(T originalModel) {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BindableBoolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public DialogSelectLottiItemListModel<T> setChecked(BindableBoolean checked) {
|
||||
this.checked = checked;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
@Module(subcomponents = DialogSelectLottiComponent.class)
|
||||
public class DialogSelectLottiModule {
|
||||
|
||||
@Provides
|
||||
DialogSelectLottiViewModel providesDialogSelectLottiViewModel() {
|
||||
return new DialogSelectLottiViewModel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
import com.ravikoradiya.liveadapter.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.DialogSelectLottiBinding;
|
||||
import it.integry.integrywmsnative.databinding.DialogSelectLottiItemModelBinding;
|
||||
|
||||
/**
|
||||
* @noinspection rawtypes
|
||||
*/
|
||||
public class DialogSelectLottiView extends BaseDialogFragment {
|
||||
@Inject
|
||||
DialogSelectLottiViewModel mViewModel;
|
||||
|
||||
private DialogSelectLottiBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
private final List<DialogSelectLottiItemListModel<Object>> listLotti;
|
||||
private final RunnableArgs<DialogSelectLottiItemListModel> onConfirm;
|
||||
private final Runnable onAbort;
|
||||
|
||||
public static DialogSelectLottiView newInstance(List<DialogSelectLottiItemListModel<Object>> listLotti,
|
||||
RunnableArgs<DialogSelectLottiItemListModel> onConfirm,
|
||||
Runnable onAbort) {
|
||||
return new DialogSelectLottiView(listLotti, onConfirm, onAbort);
|
||||
}
|
||||
|
||||
private DialogSelectLottiView(List<DialogSelectLottiItemListModel<Object>> listLotti,
|
||||
RunnableArgs<DialogSelectLottiItemListModel> onConfirm,
|
||||
Runnable onAbort) {
|
||||
super();
|
||||
|
||||
this.listLotti = listLotti;
|
||||
this.onConfirm = onConfirm;
|
||||
this.onAbort = onAbort;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.mContext = requireContext();
|
||||
|
||||
mBindings = DialogSelectLottiBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogSelectLottiComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
setCancelable(false);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(isCancelable())
|
||||
.setPositiveButton(R.string.confirm, (dialog, which) -> {
|
||||
final DialogSelectLottiItemListModel<Object> selectedItem = Stream.of(listLotti)
|
||||
.filter(x -> x.getChecked().get())
|
||||
.findFirstOrElse(null);
|
||||
if (selectedItem != null)
|
||||
this.onConfirm.run(selectedItem);
|
||||
})
|
||||
.setNegativeButton(R.string.abort, (dialog, which) -> {
|
||||
if (this.onAbort != null) this.onAbort.run();
|
||||
})
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||
alertDialog.setOnShowListener(this);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
super.onShow(dialogInterface);
|
||||
|
||||
this.listLotti.get(0).getChecked().set(true);
|
||||
this.initRecyclerView();
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
var itemType = new Type<DialogSelectLottiItemListModel, DialogSelectLottiItemModelBinding>(R.layout.dialog_select_lotti__item_model, BR.row);
|
||||
itemType.areContentsTheSame(DialogSelectLottiItemListModel::equals);
|
||||
itemType.onClick(x -> {
|
||||
resetChecks();
|
||||
x.getBinding().getRow().getChecked().set(true);
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
new LiveAdapter(listLotti)
|
||||
.map(DialogSelectLottiItemListModel.class, itemType)
|
||||
.into(this.mBindings.itemList);
|
||||
}
|
||||
|
||||
private void resetChecks() {
|
||||
for (var item : listLotti) {
|
||||
item.getChecked().set(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti;
|
||||
|
||||
public class DialogSelectLottiViewModel {
|
||||
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.rest;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.exception.RestException;
|
||||
@@ -9,6 +13,7 @@ import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.RetrieveLottiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
@@ -38,6 +43,21 @@ public class DocInterniRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void retrieveLotti(String codProd, RunnableArgs<List<RetrieveLottiDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
DocInterniRESTConsumerService service = RESTBuilder.getService(DocInterniRESTConsumerService.class);
|
||||
service.retrieveLotti(codProd)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<ServiceRESTResponse<List<RetrieveLottiDTO>>> call, @NonNull Response<ServiceRESTResponse<List<RetrieveLottiDTO>>> response) {
|
||||
analyzeAnswer(response, "retrieveLotti", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<ServiceRESTResponse<List<RetrieveLottiDTO>>> call, @NonNull Throwable t) {
|
||||
onFailed.run(new RestException(t.getMessage()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void saveDoc(SaveDTO saveDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
magazzinoRESTConsumer.saveTerminalinoWMS(saveDTO, onComplete, onFailed);
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.rest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.documento.RetrieveDocumentoArtsResponseDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.RetrieveLottiDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
|
||||
public interface DocInterniRESTConsumerService {
|
||||
@@ -11,4 +16,7 @@ public interface DocInterniRESTConsumerService {
|
||||
@GET("getDocInterniSetup")
|
||||
Call<ServiceRESTResponse<DocInterniSetupDTO>> getSetupDocInterni();
|
||||
|
||||
@GET("wms/documento/retrieveLotti")
|
||||
Call<ServiceRESTResponse<List<RetrieveLottiDTO>>> retrieveLotti(
|
||||
@Query("codProd") String codProd);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class LoginViewModel {
|
||||
this.mSystemRESTConsumer.getAvailableCodMdeps(availableCodMdeps -> {
|
||||
SettingsManager.iDB().setAvailableCodMdep(availableCodMdeps);
|
||||
|
||||
if (availableCodMdeps == null || availableCodMdeps.size() == 0) {
|
||||
if (availableCodMdeps == null || availableCodMdeps.isEmpty()) {
|
||||
this.sendError(new InvalidUserDepositException());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidCodMdepException;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.ScannedPositionNotExistException;
|
||||
@@ -137,13 +138,15 @@ public class PickingLiberoViewModel {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi una UL)
|
||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||
|
||||
} else if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||
} else if (UtilityBarcode.isEanPeso(barcodeScanDTO) && SettingsManager.iDB().isFlagPickingLiberoEnableScanArt()) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
|
||||
} else {
|
||||
} else if (SettingsManager.iDB().isFlagPickingLiberoEnableScanArt()){
|
||||
//Cerco tramite ean13 un collo in posizione mono ul definita in anagrafica articolo, altrimenti se abilitato procedo con picking manuale
|
||||
this.loadArticolo(barcodeScanDTO.getStringValue(), null, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,18 +272,16 @@ public class PickingLiberoViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||
barcodeProd = ean128Model.Content;
|
||||
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
this.executeEtichettaLU(ean128Model.Sscc, onComplete);
|
||||
} else if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
} else if (!UtilityString.isNullOrEmpty(barcodeProd) && SettingsManager.iDB().isFlagPickingLiberoEnableScanArt()) {
|
||||
this.loadArticolo(barcodeProd, ean128Model, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
this.sendError(new NoLUFoundException());
|
||||
@@ -326,11 +327,9 @@ public class PickingLiberoViewModel {
|
||||
private void createNewLU_PostClienteAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, Runnable onComplete) {
|
||||
if (this.mFlagAskLineaProd) {
|
||||
this.sendLULineaProdRequired(response -> {
|
||||
createNewLU_PostLineaProdAsk(customNumCollo, customSerCollo, vtbDest, response.getPosizione(), response.getIdLotto(), onComplete);
|
||||
createNewLU_PostLineaProdAsk(customNumCollo, customSerCollo, vtbDest, response.getPosizione(), response.getIdLotto(), onComplete);
|
||||
|
||||
}, () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
}, this::sendOnLoadingEnded);
|
||||
} else {
|
||||
createNewLU_PostLineaProdAsk(customNumCollo, customSerCollo, vtbDest, null, null, onComplete);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,12 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -93,14 +92,14 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
|
||||
private HistoryVersamentoProdULDTO getHistoryElementFromMtbColt(MtbColt mtbColt) {
|
||||
List<HistoryVersamentoProdULDTO> filteredItems = Stream.of(this.mUlList.getValue())
|
||||
List<HistoryVersamentoProdULDTO> filteredItems = this.mUlList.getValue().stream()
|
||||
.filter(x -> Objects.equals(x.getNumColloRif(), mtbColt.getNumCollo()) &&
|
||||
x.getDataColloRif().equals(mtbColt.getDataColloS()) &&
|
||||
x.getDataColloRif().equals(mtbColt.getDataColloLD()) &&
|
||||
x.getSerColloRif().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
||||
x.getGestioneRif().equalsIgnoreCase(mtbColt.getGestione()))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (filteredItems != null && filteredItems.size() > 0) {
|
||||
if (!filteredItems.isEmpty()) {
|
||||
return filteredItems.get(0);
|
||||
}
|
||||
|
||||
@@ -267,7 +266,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
if (!Objects.equals(mtbColt.getNumCollo(), item.getNumColloRif()) ||
|
||||
!Objects.equals(mtbColt.getSerCollo(), item.getSerColloRif()) ||
|
||||
!Objects.equals(mtbColt.getDataColloS(), item.getDataColloRif()) ||
|
||||
!Objects.equals(mtbColt.getDataColloLD(), item.getDataColloRif()) ||
|
||||
!Objects.equals(mtbColt.getGestione(), item.getGestioneRif())) {
|
||||
|
||||
final MtbColt mtbColtCarico = mtbColt
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,7 +12,7 @@ import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
public class HistoryVersamentoProdULDTO {
|
||||
|
||||
private String gestione;
|
||||
private String dataCollo;
|
||||
private LocalDate dataCollo;
|
||||
private String serCollo;
|
||||
private Integer numCollo;
|
||||
private String segno;
|
||||
@@ -28,7 +29,7 @@ public class HistoryVersamentoProdULDTO {
|
||||
private String descrizioneArt;
|
||||
private String untMis;
|
||||
private String gestioneRif;
|
||||
private String dataColloRif;
|
||||
private LocalDate dataColloRif;
|
||||
private String serColloRif;
|
||||
private Integer numColloRif;
|
||||
|
||||
@@ -50,11 +51,11 @@ public class HistoryVersamentoProdULDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataCollo() {
|
||||
public LocalDate getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setDataCollo(String dataCollo) {
|
||||
public HistoryVersamentoProdULDTO setDataCollo(LocalDate dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
@@ -203,11 +204,11 @@ public class HistoryVersamentoProdULDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataColloRif() {
|
||||
public LocalDate getDataColloRif() {
|
||||
return dataColloRif;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setDataColloRif(String dataColloRif) {
|
||||
public HistoryVersamentoProdULDTO setDataColloRif(LocalDate dataColloRif) {
|
||||
this.dataColloRif = dataColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
public class HistoryVersamentoProdULRestDTO {
|
||||
|
||||
|
||||
private String gestione;
|
||||
private String dataCollo;
|
||||
private LocalDate dataCollo;
|
||||
private String serCollo;
|
||||
private Integer numCollo;
|
||||
private String segno;
|
||||
@@ -27,7 +27,7 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
private String descrizioneArt;
|
||||
private String untMis;
|
||||
private String gestioneRif;
|
||||
private String dataColloRif;
|
||||
private LocalDate dataColloRif;
|
||||
private String serColloRif;
|
||||
private Integer numColloRif;
|
||||
|
||||
@@ -55,11 +55,11 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataCollo() {
|
||||
public LocalDate getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setDataCollo(String dataCollo) {
|
||||
public HistoryVersamentoProdULRestDTO setDataCollo(LocalDate dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
@@ -208,11 +208,11 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataColloRif() {
|
||||
public LocalDate getDataColloRif() {
|
||||
return dataColloRif;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setDataColloRif(String dataColloRif) {
|
||||
public HistoryVersamentoProdULRestDTO setDataColloRif(LocalDate dataColloRif) {
|
||||
this.dataColloRif = dataColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
" 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, " +
|
||||
" SUM(CASE WHEN dtb_ord_steps.hr_num > 0 then dtb_ord_steps.hr_num else 1 end) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
||||
" 0)) as percentage_hr " +
|
||||
" FROM mtb_colr " +
|
||||
" INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
||||
@@ -264,7 +264,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
|
||||
|
||||
if (newUlList.size() > 0) {
|
||||
if (!newUlList.isEmpty()) {
|
||||
List<String> codMarts = Stream.of(newUlList)
|
||||
.map(HistoryVersamentoProdULDTO::getCodMart)
|
||||
.withoutNulls()
|
||||
|
||||
@@ -88,10 +88,7 @@ public class PVOrdiniAcquistoGrigliaFragment extends BaseFragment implements ITi
|
||||
}
|
||||
|
||||
public static PVOrdiniAcquistoGrigliaFragment newInstance() {
|
||||
PVOrdiniAcquistoGrigliaFragment fragment = new PVOrdiniAcquistoGrigliaFragment();
|
||||
Bundle args = new Bundle();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
return new PVOrdiniAcquistoGrigliaFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -130,8 +130,10 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
||||
this.onLoadingStarted();
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
pvOrdiniAcquistoRESTConsumer.retrieveArticoli(codAlis, codMdep, dto -> {
|
||||
|
||||
this.onLoadingEnded();
|
||||
if (dto.getArticoli().size() == 0) {
|
||||
|
||||
if (dto.getArticoli().isEmpty()) {
|
||||
if (UtilityString.isNullOrEmpty(codAlis)) {
|
||||
onFailed.run(new NoArtsFoundException());
|
||||
} else {
|
||||
@@ -146,6 +148,7 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
||||
mGriglia.setDescrDepo(dto.getDescrDepo());
|
||||
mListArticoli = dto.getArticoli();
|
||||
this.dismiss();
|
||||
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
@@ -435,7 +436,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
|
||||
private void askPostionChange(MtbColt mtbColt, Runnable onComplete) {
|
||||
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA || mtbColt.getSegno() == -1) {
|
||||
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA || mtbColt.getSegno() == -1 || !SettingsManager.iDB().isFlagPositionChangeRequest()) {
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@@ -42,6 +44,7 @@ import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@@ -236,9 +239,10 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
File logFilePath = appContext.getLogFilePath();
|
||||
var files = logFilePath.listFiles();
|
||||
|
||||
var fileToShare = Stream.of(files)
|
||||
.sortBy(x -> -1 * x.lastModified())
|
||||
.findFirstOrElse(null);
|
||||
var fileToShare = Arrays.stream(files)
|
||||
.sorted(Comparator.reverseOrder())
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
try {
|
||||
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
||||
|
||||
@@ -275,8 +279,8 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
|
||||
var mailRequest = new MailRequestDTO()
|
||||
.setTo("developer@integry.it")
|
||||
.setMsgText("Questo è una mail che contiene il log del WMS")
|
||||
.setSubject("U vuemmeess")
|
||||
.setMsgText("Questa è una mail contenente il log del WMS")
|
||||
.setSubject("Internal WMS log")
|
||||
.setAttachments(attachmentDTOList);
|
||||
|
||||
|
||||
@@ -289,11 +293,16 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
});
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
DialogSimpleMessageView
|
||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
UtilityExceptions.defaultException(requireContext(), ex);
|
||||
this.closeProgress();
|
||||
|
||||
// requireActivity().runOnUiThread(() -> {
|
||||
// DialogSimpleMessageView
|
||||
// .makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||
// .show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
// });
|
||||
//
|
||||
// FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
}
|
||||
});
|
||||
})
|
||||
@@ -301,22 +310,17 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void openProgress() {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
@@ -329,6 +333,12 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
String line;
|
||||
|
||||
while ((line = br.readLine()) != null) {
|
||||
|
||||
if(!line.matches("\\d{13}.*")) {
|
||||
int lastNewLineChar = text.lastIndexOf("\n");
|
||||
text.deleteCharAt(text.length() - 1);
|
||||
}
|
||||
|
||||
text.append(line);
|
||||
text.append('\n');
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.view.Gravity;
|
||||
import android.widget.Toast;
|
||||
@@ -80,6 +81,7 @@ 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;
|
||||
@@ -211,6 +213,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
boolean canOverflowOrderQuantity = SettingsManager.iDB().isFlagCanAddExtraQuantitySpedizione();
|
||||
boolean shouldAskPesoLU = SettingsManager.iDB().isFlagAskPesoColloSpedizione();
|
||||
boolean useQtaOrd = SettingsManager.iDB().isFlagSpedizioneUseQtaOrd();
|
||||
boolean useColliPedana = SettingsManager.iDB().isFlagSpedizioneUseColliPedana();
|
||||
|
||||
mViewmodel.init(
|
||||
codMdep,
|
||||
@@ -223,7 +226,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
mColliRegistrati,
|
||||
mGestioneCol, mSegnoCol, mDefaultCausaleUL,
|
||||
mEnableQuantityReset,
|
||||
useQtaOrd);
|
||||
useQtaOrd,
|
||||
useColliPedana);
|
||||
|
||||
}
|
||||
|
||||
@@ -280,7 +284,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
fabPopupMenu.getMenu().removeItem(R.id.close_order);
|
||||
}
|
||||
|
||||
if(!SettingsManager.iDB().isFlagTracciamentoImballiScaricoEnabled())
|
||||
if (!SettingsManager.iDB().isFlagTracciamentoImballiScaricoEnabled())
|
||||
fabPopupMenu.getMenu().removeItem(R.id.track_packaging);
|
||||
|
||||
fabPopupMenu.setOnMenuItemClickListener(item -> {
|
||||
@@ -886,6 +890,11 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
boolean canPartitaMagBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
|
||||
if (dataScad == null && pickingObjectDTO.getMtbAart().getGgScadPartita() != null && pickingObjectDTO.getMtbAart().getGgScadPartita() > 0) {
|
||||
dataScad = UtilityDate.getNow();
|
||||
dataScad = dataScad.plusDays(pickingObjectDTO.getMtbAart().getGgScadPartita());
|
||||
}
|
||||
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setInitialNumCnf(initialNumCnf)
|
||||
@@ -907,7 +916,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
.setCanLUBeClosed(true)
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setStatoPartitaMag(pickingObjectDTO != null ? pickingObjectDTO.getStatoArticoloDTO() : null)
|
||||
.setNotifyProductLotStatus(SettingsManager.iDB().isNotifyLotStatus());
|
||||
.setNotifyProductLotStatus(SettingsManager.iDB().isNotifyLotStatus())
|
||||
.setMtbPartitaMagList(mViewmodel.getmPartitaMagList());
|
||||
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
@@ -1072,4 +1082,32 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, onComplete, this::onLoadingEnded)
|
||||
.show(getSupportFragmentManager(), DialogInfoAggiuntiveLUView.class.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInputDuplicate(BigDecimal qtaTot, BigDecimal qtaEvasa, RunnableArgs<Integer> onComplete, Runnable onNegativeClick) {
|
||||
String textWarning = UtilityResources.getString(R.string.ordered_quantity_overflow_error_message);
|
||||
|
||||
dialogInputQuantityToDuplicate(inputNumber -> {
|
||||
if (qtaTot != null && qtaEvasa != null && UtilityBigDecimal.equalsOrGreaterThan(qtaEvasa.multiply(BigDecimal.valueOf(inputNumber)), qtaTot)) {
|
||||
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(textWarning)),
|
||||
null,
|
||||
() -> this.onInputDuplicate(qtaTot, qtaEvasa, onComplete, onNegativeClick)
|
||||
).show(getSupportFragmentManager(), "tag");
|
||||
} else {
|
||||
onComplete.run(inputNumber);
|
||||
}
|
||||
}, onNegativeClick);
|
||||
}
|
||||
|
||||
private void dialogInputQuantityToDuplicate(RunnableArgs<Integer> onComplete, Runnable onNegativeClick) {
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Numero pedane da duplicare", inputValue -> {
|
||||
try {
|
||||
Integer num = Integer.parseInt(inputValue);
|
||||
onComplete.run(num);
|
||||
} catch (NumberFormatException ex) {
|
||||
this.onError(new Exception("Inserire un numero di risorse valido"));
|
||||
}
|
||||
}, onNegativeClick).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsum
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
@@ -36,7 +37,8 @@ public class SpedizioneModule {
|
||||
ColliSpedizioneRESTConsumer colliSpedizioneRESTConsumer,
|
||||
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer,
|
||||
MagazzinoAutomaticoRESTConsumer magazzinoAutomaticoRESTConsumer,
|
||||
ImballiRESTConsumer imballiRESTConsumer) {
|
||||
ImballiRESTConsumer imballiRESTConsumer,
|
||||
MagazzinoRESTConsumer magazzinoRESTConsumer) {
|
||||
return new SpedizioneViewModel(articoloRESTConsumer,
|
||||
barcodeRESTConsumer,
|
||||
colliDataRecoverService,
|
||||
@@ -48,7 +50,8 @@ public class SpedizioneModule {
|
||||
colliSpedizioneRESTConsumer,
|
||||
colliLavorazioneRESTConsumer,
|
||||
magazzinoAutomaticoRESTConsumer,
|
||||
imballiRESTConsumer);
|
||||
imballiRESTConsumer,
|
||||
magazzinoRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -54,6 +56,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsum
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
@@ -72,10 +75,12 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestOrderDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DuplicateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UntMisUtils;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
@@ -96,6 +101,7 @@ public class SpedizioneViewModel {
|
||||
private List<OrdineUscitaInevasoDTO> mTestateOrdini;
|
||||
private MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
||||
private List<MtbColt> mColliRegistrati = new ArrayList<>();
|
||||
private List<MtbPartitaMag> mPartitaMagList = new ArrayList<>();
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@@ -114,6 +120,7 @@ public class SpedizioneViewModel {
|
||||
private boolean mIsNewLU;
|
||||
private boolean mEnableQuantityReset;
|
||||
private boolean mUseQtaOrd;
|
||||
private boolean mUseColliPedana;
|
||||
private boolean mIsOrdTrasf = false;
|
||||
|
||||
private MtbColt mCurrentMtbColt = null;
|
||||
@@ -133,6 +140,7 @@ public class SpedizioneViewModel {
|
||||
private final ImballiRESTConsumer mImballiRESTConsumer;
|
||||
|
||||
private ColliScaricoRESTConsumerInterface mColliScaricoRESTConsumer;
|
||||
private MagazzinoRESTConsumer magazzinoRESTConsumer;
|
||||
|
||||
@Inject
|
||||
public SpedizioneViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||
@@ -146,7 +154,8 @@ public class SpedizioneViewModel {
|
||||
ColliSpedizioneRESTConsumer colliSpedizioneRESTConsumer,
|
||||
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer,
|
||||
MagazzinoAutomaticoRESTConsumer mMagazzinoAutomaticoRESTConsumer,
|
||||
ImballiRESTConsumer imballiRESTConsumer) {
|
||||
ImballiRESTConsumer imballiRESTConsumer,
|
||||
MagazzinoRESTConsumer magazzinoRESTConsumer) {
|
||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
this.mColliDataRecoverService = colliDataRecoverService;
|
||||
@@ -159,10 +168,11 @@ public class SpedizioneViewModel {
|
||||
this.mColliLavorazioneRESTConsumer = colliLavorazioneRESTConsumer;
|
||||
this.mMagazzinoAutomaticoRESTConsumer = mMagazzinoAutomaticoRESTConsumer;
|
||||
this.mImballiRESTConsumer = imballiRESTConsumer;
|
||||
this.magazzinoRESTConsumer = magazzinoRESTConsumer;
|
||||
}
|
||||
|
||||
|
||||
public void init(String codMdep, boolean enableGiacenza, boolean enableCheckPartitaMag, boolean shouldAskPesoLU, boolean canOverflowOrderQuantity, List<SitArtOrdDTO> pickingList, List<OrdineUscitaInevasoDTO> testateOrdini, List<MtbColt> colliRegistrati, GestioneEnum gestioneCol, int segnoCol, Integer defaultCausaleUL, boolean enableQuantityReset, boolean useQtaOrd) {
|
||||
public void init(String codMdep, boolean enableGiacenza, boolean enableCheckPartitaMag, boolean shouldAskPesoLU, boolean canOverflowOrderQuantity, List<SitArtOrdDTO> pickingList, List<OrdineUscitaInevasoDTO> testateOrdini, List<MtbColt> colliRegistrati, GestioneEnum gestioneCol, int segnoCol, Integer defaultCausaleUL, boolean enableQuantityReset, boolean useQtaOrd, boolean useColliPedana) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mDefaultCodMdep = codMdep;
|
||||
@@ -175,18 +185,23 @@ public class SpedizioneViewModel {
|
||||
this.mDefaultCausaleOfUL = defaultCausaleUL;
|
||||
this.mEnableQuantityReset = enableQuantityReset;
|
||||
this.mUseQtaOrd = useQtaOrd;
|
||||
this.mUseColliPedana = useColliPedana;
|
||||
|
||||
if (enableGiacenza) {
|
||||
mOrdiniRestConsumerService.getSuggestedPickingList(this.mDefaultCodMdep, pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
this.sendOnLoadingEnded();
|
||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||
} else {
|
||||
getEmptyPickingList(pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
}
|
||||
getPartitaMagList(pickingList, mtbPartitaMagList -> {
|
||||
this.mPartitaMagList = mtbPartitaMagList;
|
||||
|
||||
if (enableGiacenza) {
|
||||
mOrdiniRestConsumerService.getSuggestedPickingList(this.mDefaultCodMdep, pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
this.sendOnLoadingEnded();
|
||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||
} else {
|
||||
getEmptyPickingList(pickingList, pickingObjectList -> {
|
||||
this.mPickingList.postValue(pickingObjectList);
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.mDefaultGestioneOfUL = gestioneCol;
|
||||
this.mDefaultSegnoCol = segnoCol;
|
||||
@@ -194,6 +209,17 @@ public class SpedizioneViewModel {
|
||||
this.initDefaultVars();
|
||||
}
|
||||
|
||||
private void getPartitaMagList(List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<MtbPartitaMag>> onComplete) {
|
||||
if (SettingsManager.iDB().isSuggestDataScad()) {
|
||||
List<String> codMarts = sitArtOrdList.stream()
|
||||
.map(x -> x.getCodMart().trim())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
this.magazzinoRESTConsumer.retrieveAllPartitaMag(codMarts, new Date(), onComplete, this::sendError);
|
||||
} else {
|
||||
onComplete.run(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
private void getEmptyPickingList(List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete) {
|
||||
List<String> codMarts = sitArtOrdList.stream()
|
||||
@@ -813,7 +839,8 @@ public class SpedizioneViewModel {
|
||||
|
||||
List<PickingObjectDTO> matchPickingObject = pickingList.stream()
|
||||
.filter(x -> UtilityString.equalsIgnoreCase(mtbAart.getCodMart(), x.getSitArtOrdDTO().getCodMart()))
|
||||
.filter(x -> x.getSitArtOrdDTO().isFlagEnableScanArt()).filter(x -> {
|
||||
.filter(x -> x.getSitArtOrdDTO().isFlagEnableScanArt())
|
||||
.filter(x -> {
|
||||
MtbPartitaMag mtbPartitaMag = pickData != null && pickData.getManualPickDTO() != null && pickData.getManualPickDTO().getMtbPartitaMag() != null ? pickData.getManualPickDTO().getMtbPartitaMag() : null;
|
||||
return !mEnableCheckPartitaMag || (mtbPartitaMag != null && UtilityString.equalsIgnoreCase(x.getSitArtOrdDTO().getPartitaMag(), mtbPartitaMag.getPartitaMag()));
|
||||
}).collect(Collectors.toList());
|
||||
@@ -915,7 +942,7 @@ public class SpedizioneViewModel {
|
||||
if (availableBatchLots.stream().anyMatch(x -> x.getDataScad() == null)) {
|
||||
tmp.addAll(availableBatchLots.stream()
|
||||
.filter(x -> x.getDataScad() == null)
|
||||
.sorted(Comparator.comparing(MtbPartitaMag::getPartitaMag))
|
||||
.sorted(Comparator.comparing(x -> UtilityString.isNull(x.getPartitaMag(), "")))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@@ -981,20 +1008,6 @@ public class SpedizioneViewModel {
|
||||
refMtbColt = pickingObjectDTO.getMtbColts().get(0);
|
||||
}
|
||||
|
||||
// MtbColr refMtbColr = null;
|
||||
//
|
||||
// if (scannedMtbColr != null && refMtbColt != null && refMtbColt.getMtbColr().size() > 0) {
|
||||
// Optional<MtbColr> optionalMtbColr = Stream.of(refMtbColt.getMtbColr())
|
||||
// .filter(y -> UtilityString.equalsIgnoreCase(y.getCodMart(), scannedMtbColr.getCodMart()) &&
|
||||
// UtilityString.equalsIgnoreCase(y.getCodTagl(), scannedMtbColr.getCodTagl()) &&
|
||||
// UtilityString.equalsIgnoreCase(y.getCodCol(), scannedMtbColr.getCodCol()) &&
|
||||
// (!mEnableCheckPartitaMag || UtilityString.equalsIgnoreCase(y.getPartitaMag(), scannedMtbColr.getPartitaMag()) || UtilityString.isNullOrEmpty(scannedMtbColr.getPartitaMag())))
|
||||
// .findFirst();
|
||||
//
|
||||
// if (optionalMtbColr.isPresent()) refMtbColr = optionalMtbColr.get();
|
||||
// }
|
||||
|
||||
|
||||
if (refMtbColr != null) {
|
||||
if (pickingObjectDTO.getMtbAart().isFlagQtaCnfFissaBoolean()) {
|
||||
if (UtilityBigDecimal.equalsOrLowerThan(refMtbColr.getQtaCol(), qtaDaEvadere)) {
|
||||
@@ -1082,8 +1095,12 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
BigDecimal initialNumCnf = mUseColliPedana ? pickingObjectDTO.getMtbAart().getColliPedana() : mUseQtaOrd ? numCnfDaPrelevare : null;
|
||||
BigDecimal initialQtaCnf = mUseColliPedana ? pickingObjectDTO.getMtbAart().getQtaCnf() : mUseQtaOrd ? qtaCnfDaPrelevare : null;
|
||||
BigDecimal initialQtaTot = mUseColliPedana ? initialNumCnf.multiply(initialQtaCnf) : mUseQtaOrd ? qtaColDaPrelevare : null;
|
||||
|
||||
MtbColt finalRefMtbColt = refMtbColt;
|
||||
this.onItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), mUseQtaOrd ? numCnfDaPrelevare : null, mUseQtaOrd ? qtaCnfDaPrelevare : null, mUseQtaOrd ? qtaColDaPrelevare : null, qtaDaEvadere, numCnfDaEvadere, qtaCnfDaEvadere, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, mCanOverflowOrderQuantity, canPartitaMagBeChanged, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
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);
|
||||
});
|
||||
}
|
||||
@@ -1548,31 +1565,37 @@ public class SpedizioneViewModel {
|
||||
|
||||
this.closeLU(generatedMtbColts -> {
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.fillMtbAartsOfMtbColts(generatedMtbColts, filledMtbColts -> {
|
||||
this.validateTheUdsToBeDuplicated(generatedMtbColts, duplicatedMtbColts -> {
|
||||
|
||||
this.askPositionChange(
|
||||
filledMtbColts,
|
||||
positionedMtbColts -> {
|
||||
if (duplicatedMtbColts != null) {
|
||||
generatedMtbColts.addAll(duplicatedMtbColts);
|
||||
}
|
||||
|
||||
this.askPrint((shouldPrint && SettingsManager.iDB().isFlagPrintEtichetteOnLUClose()), positionedMtbColts, () -> {
|
||||
positionedMtbColts.stream()
|
||||
.filter(x -> !this.mColliRegistrati.contains(x))
|
||||
.forEach(x -> this.mColliRegistrati.add(x));
|
||||
this.mColliMagazzinoRESTConsumer.fillMtbAartsOfMtbColts(generatedMtbColts, filledMtbColts -> {
|
||||
|
||||
postCloseOperations(positionedMtbColts);
|
||||
this.askPositionChange(
|
||||
filledMtbColts,
|
||||
positionedMtbColts -> {
|
||||
|
||||
this.mIsNewLU = false;
|
||||
this.askPrint((shouldPrint && SettingsManager.iDB().isFlagPrintEtichetteOnLUClose()), positionedMtbColts, () -> {
|
||||
positionedMtbColts.stream()
|
||||
.filter(x -> !this.mColliRegistrati.contains(x))
|
||||
.forEach(x -> this.mColliRegistrati.add(x));
|
||||
|
||||
postCloseOperations(positionedMtbColts);
|
||||
|
||||
this.mIsNewLU = false;
|
||||
|
||||
this.resetMatchedRows();
|
||||
this.sendLUClosed();
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
|
||||
this.resetMatchedRows();
|
||||
this.sendLUClosed();
|
||||
this.sendOnLoadingEnded();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}, this::sendError);
|
||||
}, this::sendError);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1595,8 +1618,79 @@ public class SpedizioneViewModel {
|
||||
this.mColliScaricoRESTConsumer.closeUDS(closeUDSRequestDto, closeResponse -> {
|
||||
onComplete.run(closeResponse.getGeneratedMtbColts());
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void validateTheUdsToBeDuplicated(List<MtbColt> mtbColtList, RunnableArgs<List<MtbColt>> onComplete) {
|
||||
var clonedLu = (MtbColt) this.mCurrentMtbColt.clone();
|
||||
|
||||
boolean noReference = clonedLu.getMtbColr().stream()
|
||||
.allMatch(
|
||||
x -> x.getGestioneRif() == null &&
|
||||
x.getDataColloRifD() == null &&
|
||||
x.getSerColloRif() == null &&
|
||||
x.getNumColloRif() == null
|
||||
);
|
||||
|
||||
if (mtbColtList.size() > 1 || !noReference || !SettingsManager.iDB().isFlagAskDuplicateUDSSpedizione()) {
|
||||
onComplete.run(new ArrayList<>());
|
||||
return;
|
||||
}
|
||||
|
||||
var savedMtbColt = mtbColtList.get(0);
|
||||
|
||||
//Controllo se si va in extra quantity
|
||||
if (!SettingsManager.iDB().isFlagCanAddExtraQuantitySpedizione()) {
|
||||
Map<String, List<MtbColr>> groupedByCodMart = savedMtbColt.getMtbColr()
|
||||
.stream()
|
||||
.filter(x -> x.getCodMart() != null)
|
||||
.collect(Collectors.groupingBy(MtbColr::getCodMart));
|
||||
|
||||
for (PickingObjectDTO pickingObjectDTO : Objects.requireNonNull(this.mPickingList.getValue())) {
|
||||
|
||||
if (pickingObjectDTO.getMtbAart() != null) {
|
||||
String codMart = pickingObjectDTO.getMtbAart().getCodMart();
|
||||
|
||||
if (groupedByCodMart.containsKey(codMart)) {
|
||||
BigDecimal qtaTot = UntMisUtils.shouldBeShowInColli(pickingObjectDTO.getMtbAart()) ? pickingObjectDTO.getSitArtOrdDTO().getNumCnfOrd() : pickingObjectDTO.getSitArtOrdDTO().getQtaOrd();
|
||||
|
||||
BigDecimal qtaEvasa = Objects.requireNonNull(groupedByCodMart.get(codMart)).stream().map(MtbColr::getNumCnf).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
sendInputDuplicate(qtaTot, qtaEvasa, inputNumber -> {
|
||||
duplicateUDS(savedMtbColt, inputNumber, onComplete);
|
||||
}, () -> onComplete.run(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendInputDuplicate(inputNumber -> {
|
||||
duplicateUDS(savedMtbColt, inputNumber, onComplete);
|
||||
}, () -> onComplete.run(null));
|
||||
}
|
||||
}
|
||||
|
||||
private void duplicateUDS(MtbColt savedMtbColt, Integer inputNumber, RunnableArgs<List<MtbColt>> onComplete) {
|
||||
var duplicateUDSRequestDTO = new DuplicateUDSRequestDTO()
|
||||
.setMtbColt(savedMtbColt)
|
||||
.setNumOfDuplicates(inputNumber);
|
||||
|
||||
this.mColliSpedizioneRESTConsumer.duplicateUDS(duplicateUDSRequestDTO, data -> {
|
||||
Map<String, List<MtbColr>> groupedByCodMart = data.getMtbColtList()
|
||||
.stream()
|
||||
.flatMap(x -> x.getMtbColr().stream())
|
||||
.filter(x -> x.getCodMart() != null)
|
||||
.collect(Collectors.groupingBy(MtbColr::getCodMart));
|
||||
|
||||
for (PickingObjectDTO pickingObjectDTO : Objects.requireNonNull(this.mPickingList.getValue())) {
|
||||
if (pickingObjectDTO.getMtbAart() != null) {
|
||||
String codMart = pickingObjectDTO.getMtbAart().getCodMart();
|
||||
if (groupedByCodMart.containsKey(codMart)) {
|
||||
pickingObjectDTO.getWithdrawMtbColrs()
|
||||
.addAll(Objects.requireNonNull(groupedByCodMart.get(codMart)));
|
||||
}
|
||||
}
|
||||
}
|
||||
onComplete.run(data.getMtbColtList());
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void checkIfShouldBeDeleted(Runnable onDeleted, Runnable onContinue) {
|
||||
@@ -1903,6 +1997,10 @@ public class SpedizioneViewModel {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
public List<MtbPartitaMag> getmPartitaMagList() {
|
||||
return mPartitaMagList;
|
||||
}
|
||||
|
||||
public ArrayList<MtbColt> getCreatedMtbColts() {
|
||||
return (ArrayList<MtbColt>) this.mColliRegistrati;
|
||||
}
|
||||
@@ -1937,6 +2035,16 @@ public class SpedizioneViewModel {
|
||||
this.mDocumentRESTConsumer.createDocFromColli(loadCollidto, doc -> this.sendOnOrderClosed(), this::sendError);
|
||||
}
|
||||
|
||||
private void sendInputDuplicate(BigDecimal qtaTot, BigDecimal qtaEvasa, RunnableArgs<Integer> onComplete, Runnable onNegativeClick) {
|
||||
if (this.mListener != null)
|
||||
mListener.onInputDuplicate(qtaTot, qtaEvasa, onComplete, onNegativeClick);
|
||||
}
|
||||
|
||||
private void sendInputDuplicate(RunnableArgs<Integer> onComplete, Runnable onNegativeClick) {
|
||||
if (this.mListener != null)
|
||||
mListener.onInputDuplicate(null, null, onComplete, onNegativeClick);
|
||||
}
|
||||
|
||||
public SpedizioneViewModel setListeners(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
@@ -1969,6 +2077,8 @@ public class SpedizioneViewModel {
|
||||
void onChooseArtsRequest(List<MtbAart> artsList, RunnableArgs<List<MtbAart>> onComplete);
|
||||
|
||||
void onOrderClosed();
|
||||
|
||||
void onInputDuplicate(BigDecimal qtaTot, BigDecimal qtaEvasa, RunnableArgs<Integer> onComplete, Runnable onNegativeClick);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ package it.integry.integrywmsnative.view.dialogs;
|
||||
import android.app.Dialog;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
@@ -26,6 +26,8 @@ public class DialogProgressView extends DialogFragment {
|
||||
private String subtitle;
|
||||
private boolean indeterminateProgress;
|
||||
|
||||
private boolean progressOpened;
|
||||
|
||||
public static DialogProgressView newInstance(String title, String subtitle, boolean indeterminate) {
|
||||
return new DialogProgressView(title, subtitle, indeterminate);
|
||||
}
|
||||
@@ -43,7 +45,7 @@ public class DialogProgressView extends DialogFragment {
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogProgressBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
mBindings = DialogProgressBinding.inflate(getLayoutInflater());
|
||||
|
||||
mBindings.setTitle(UtilityString.isNullOrEmpty(title) ? requireContext().getString(R.string.loading) : title);
|
||||
if (!UtilityString.isNullOrEmpty(subtitle)) mBindings.setSubtitle(subtitle);
|
||||
@@ -61,6 +63,21 @@ public class DialogProgressView extends DialogFragment {
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
public void show(@NonNull FragmentManager manager) {
|
||||
if (!isAdded() && !isInLayout() && !progressOpened) {
|
||||
this.progressOpened = true;
|
||||
super.show(manager, "loading-dialog");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
if (isAdded() || isInLayout() || progressOpened) {
|
||||
this.progressOpened = false;
|
||||
super.dismissAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
viewModel2.setOnAbortClickListener(this::dismiss);
|
||||
|
||||
|
||||
this.dialogProgressView.show(this.getParentFragmentManager(), "tag");
|
||||
this.dialogProgressView.show(this.getParentFragmentManager());
|
||||
|
||||
this.initClienti(viewModel1, () -> {
|
||||
this.initDestinatari(viewModel2, () -> {
|
||||
@@ -207,7 +207,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
" nazione\n" +
|
||||
"FROM vtb_dest\n" +
|
||||
"INNER JOIN vtb_clie ON vtb_clie.cod_anag = vtb_dest.cod_anag\n" +
|
||||
"WHERE vtb_clie.flag_stato = 'A'";
|
||||
"WHERE vtb_clie.flag_stato = 'A' AND vtb_dest.flag_attivo = 'S'";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteDestinatarioDTO>>() {
|
||||
}.getType();
|
||||
|
||||
@@ -2,9 +2,11 @@ package it.integry.integrywmsnative.view.dialogs.input_quantity_v2;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
|
||||
@@ -57,6 +59,8 @@ public class DialogInputQuantityV2DTO {
|
||||
|
||||
private String customArtDescription;
|
||||
|
||||
private List<MtbPartitaMag> mtbPartitaMagList;
|
||||
|
||||
public MtbAart getMtbAart() {
|
||||
return mtbAart;
|
||||
}
|
||||
@@ -380,4 +384,13 @@ public class DialogInputQuantityV2DTO {
|
||||
this.warnOnQuantityOverflow = warnOnQuantityOverflow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbPartitaMag> getMtbPartitaMagList() {
|
||||
return mtbPartitaMagList;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setMtbPartitaMagList(List<MtbPartitaMag> mtbPartitaMagList) {
|
||||
this.mtbPartitaMagList = mtbPartitaMagList;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.pedromassango.doubleclick.DoubleClickListener;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
@@ -177,6 +178,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
.setSuggestPartitaMagRunnable(mDialogInputQuantityV2DTO.getSuggestPartitaMag())
|
||||
.setDataScad(mDialogInputQuantityV2DTO.getDataScad())
|
||||
.setDisableTracciabilitaCheck(mDialogInputQuantityV2DTO.isDisableTracciabilitaCheck())
|
||||
.setmPartitaMagList(mDialogInputQuantityV2DTO.getMtbPartitaMagList())
|
||||
.setStatoArt(mDialogInputQuantityV2DTO.getStatoPartitaMag() != null ? mDialogInputQuantityV2DTO.getStatoPartitaMag().getStatoArt() : null);
|
||||
|
||||
mBindings.setView(this);
|
||||
@@ -301,7 +303,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentPartitaMag, (value) -> {
|
||||
if (this.mEnableDataCallback) {
|
||||
this.mViewModel.setPartitaMag(value);
|
||||
this.mViewModel.setNewPartitaMag(value);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -403,7 +405,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
UtilityObservable.addPropertyChanged(this.mViewModel.blockedQtaTot, (value) -> {
|
||||
toggleTextInputLayoutError(textColorsQtaTot, this.mBindings.inputQtaTotLayout, value);
|
||||
|
||||
if (this.mViewModel.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||
if (Objects.requireNonNull(this.mViewModel.mtbAart.get()).isFlagQtaCnfFissaBoolean()) {
|
||||
this.enabledNumCnf.set(this.mDialogInputQuantityV2DTO.isNumCnfEditable() && !value);
|
||||
} else {
|
||||
if (value) {
|
||||
|
||||
@@ -4,8 +4,13 @@ import androidx.databinding.ObservableField;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.FutureTask;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -100,6 +105,8 @@ public class DialogInputQuantityV2ViewModel {
|
||||
|
||||
private StatoPartitaMag statoArt;
|
||||
|
||||
private List<MtbPartitaMag> mPartitaMagList;
|
||||
|
||||
@Inject
|
||||
public DialogInputQuantityV2ViewModel(BarcodeRESTConsumer barcodeRESTConsumer, MagazzinoRESTConsumer magazzinoRESTConsumer) {
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
@@ -354,6 +361,11 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setmPartitaMagList(List<MtbPartitaMag> mPartitaMagList) {
|
||||
this.mPartitaMagList = mPartitaMagList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setWarnOnQuantityOverflow(boolean warnOnQuantityOverflow) {
|
||||
this.warnOnQuantityOverflow = warnOnQuantityOverflow;
|
||||
return this;
|
||||
@@ -378,6 +390,37 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setNewPartitaMag(String internalPartitaMag) {
|
||||
this.internalPartitaMag = internalPartitaMag;
|
||||
|
||||
if (mPartitaMagList != null && SettingsManager.iDB().isSuggestDataScad()){
|
||||
Optional<MtbPartitaMag> partitaMag = mPartitaMagList.stream()
|
||||
.filter(x -> x.getPartitaMag().equalsIgnoreCase(internalPartitaMag))
|
||||
.findFirst();
|
||||
|
||||
if (partitaMag.isPresent()){
|
||||
setNewDataScad(partitaMag.get().getDataScad());
|
||||
} else {
|
||||
MtbAart localMtbAart = mtbAart.get();
|
||||
LocalDate dataScad = null;
|
||||
|
||||
if (localMtbAart != null && localMtbAart.getGgScadPartita() != null && localMtbAart.getGgScadPartita() > 0) {
|
||||
dataScad = UtilityDate.getNow();
|
||||
dataScad.plusDays(localMtbAart.getGgScadPartita());
|
||||
}
|
||||
|
||||
setNewDataScad(dataScad);
|
||||
}
|
||||
}
|
||||
|
||||
this.mListener.onDataChanged();
|
||||
}
|
||||
|
||||
public void setNewDataScad(LocalDate internalDataScad) {
|
||||
this.internalDataScad = internalDataScad;
|
||||
this.mListener.onDataChanged();
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setDataScad(LocalDate internalDataScad) {
|
||||
this.internalDataScad = internalDataScad;
|
||||
return this;
|
||||
|
||||
@@ -1,61 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="84dp"
|
||||
android:viewportWidth="250"
|
||||
android:viewportHeight="105">
|
||||
|
||||
<path
|
||||
android:pathData="M 29 28.5 H 252 V 81.8 H 29 V 28.5 Z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M41.8,36.6h-9.1v-8.1h9.1V36.6z M41.8,73h-9.1V40.4h9.1V73z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M49.3,40.4h16.2c4.9,0,8.4,0.9,10.5,2.8c2.1,1.8,3.1,4.9,3.1,9.2V73h-8.6V53.4c0-2.4-0.4-4-1.1-4.8 s-2.3-1.1-4.6-1.1h-6.9V73h-8.6V40.4z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M83.2,40.4h6.1V28.5h8.6v11.8h9.1v6.5h-9.1v13.2c0,2.4,0.4,4.1,1.2,5c0.8,0.9,2.3,1.4,4.3,1.4h3.5V73h-7.9 c-3.2,0-5.6-0.9-7.3-2.6c-1.7-1.8-2.5-4.3-2.5-7.6V46.9h-6.1V40.4z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M126.7,73c-5.4,0-9.5-1.4-12.3-4.1c-2.8-2.8-4.2-6.8-4.2-12.2c0-5.4,1.4-9.4,4.2-12.2 c2.8-2.8,6.9-4.1,12.3-4.1h12.6v6.8h-11.4c-3.1,0-5.2,0.4-6.3,1.3c-1.1,0.9-1.7,2.5-1.7,4.8h19.5v6.8h-19.5 c0.1,2.3,0.6,3.9,1.6,4.8c1,0.9,3.1,1.3,6.4,1.3h11.5V73H126.7z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M175.4,71.9c0,4.5-1,7.8-3,9.9c-2,2.1-5.1,3.1-9.4,3.1h-16.9v-6.6h15.4c1.7,0,2.9-0.4,3.8-1.2 c0.9-0.8,1.3-2,1.3-3.5V73h-7c-3.6,0-6.2-0.3-7.8-0.8c-1.6-0.5-3.1-1.5-4.4-2.8c-1.6-1.5-2.8-3.3-3.6-5.5c-0.8-2.2-1.3-4.6-1.3-7.1 c0-2.5,0.4-4.9,1.3-7.1c0.8-2.2,2-4,3.6-5.5c1.4-1.4,3-2.4,4.9-3c1.9-0.6,4.3-0.9,7.4-0.9h15.7V71.9z M162.3,66.3h4.5V47.4h-4.5 c-2.2,0-3.7,0.1-4.5,0.2c-0.9,0.2-1.6,0.4-2.3,0.8c-1.3,0.8-2.3,1.9-2.9,3.2c-0.6,1.3-0.9,3-0.9,5.2c0,3.5,0.8,5.9,2.3,7.4 C155.5,65.6,158.3,66.3,162.3,66.3z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M182.6,40.4h14.5c3.4,0,5.8,0.6,7.1,1.8c1.4,1.2,2,3.4,2,6.4v5.4h-8.2v-4.2c0-1.3-0.2-2.1-0.7-2.6 c-0.5-0.4-1.5-0.7-3.1-0.7h-3V73h-8.6V40.4z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M225.8,65.8h6.9V40.4h8.6v31.8c0,4.3-1,7.5-3,9.6c-2,2.1-5.1,3.1-9.3,3.1h-16.9v-6.6h15.4 c1.7,0,2.9-0.4,3.8-1.2c0.9-0.8,1.3-2,1.3-3.5V73h-7.6c-4.9,0-8.4-1-10.4-2.9c-2.1-1.9-3.1-5.1-3.1-9.6V40.4h8.5v19.5 c0,2.5,0.4,4.1,1.1,4.8C221.9,65.4,223.4,65.8,225.8,65.8z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:strokeColor="#231F20"
|
||||
android:strokeWidth="0.75"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M35.3,7.8" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M84.3,24.8c-7.3-8-17.8-13-29.5-13c-5.5,0-10.7,1.1-15.5,3.1l-3.9-7.2c6-2.7,12.6-4.1,19.5-4.1 c14.3,0,27.1,6.2,35.9,16.1L84.3,24.8z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M93,80.8c-8.7,11.4-22.4,18.7-37.8,18.8l0-8.1c12.8-0.1,24.1-6.3,31.3-15.7L93,80.8z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:strokeColor="#231F20"
|
||||
android:strokeWidth="0.75"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M19.8,84.4" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M16.5,80.5c-6.1-8-9.7-18.1-9.7-28.9c0-17.6,9.5-33.1,23.7-41.4l3.9,7.2c-11.7,6.9-19.5,19.7-19.5,34.3 c0,8.9,2.9,17.2,7.9,23.8L16.5,80.5z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:strokeColor="#231F20"
|
||||
android:strokeWidth="0.75"
|
||||
android:strokeMiterLimit="10"
|
||||
android:pathData="M39.3,15" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M19.8,84.4l6.1-5.2c6.3,6.6,14.7,11,24.2,12.1l0,8.1C38.1,98.2,27.5,92.7,19.8,84.4" />
|
||||
</vector>
|
||||
android:width="646.51dp"
|
||||
android:height="154.53dp"
|
||||
android:viewportWidth="646.51"
|
||||
android:viewportHeight="154.53">
|
||||
<path
|
||||
android:pathData="M203.9,37.12h14.87v66.46h-14.87z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M279.96,77.4l-31.44,-40.28l-10.45,0l0,66.46l14.87,0l0,-39.78l30.97,39.78l11.02,0l0,-66.46l-14.97,0z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M309.61,50.11l20.8,0l0,53.47l14.97,0l0,-53.47l20.71,0l0,-12.99l-56.48,0z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M395.74,75.9l29.65,0l0,-12.52l-29.65,0l0,-13.46l32.48,0l0,-12.8l-32.48,0l-3.48,0l-11.39,0l0,66.46l11.39,0l3.48,0l33.04,0l0,-12.8l-33.04,0z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M475.47,78.45l18.95,0.3c-0.36,1.33 -0.8,2.6 -1.4,3.75c-1.48,2.82 -3.58,4.97 -6.31,6.45c-2.73,1.48 -6.01,2.21 -9.84,2.21c-3.83,0 -7.22,-0.89 -10.17,-2.68c-2.95,-1.79 -5.27,-4.25 -6.97,-7.39c-1.69,-3.14 -2.54,-6.75 -2.54,-10.83c0,-4.14 0.86,-7.77 2.59,-10.87c1.73,-3.1 4.13,-5.52 7.2,-7.25c3.07,-1.73 6.56,-2.59 10.45,-2.59c3.58,0 6.83,0.71 9.75,2.12c2.92,1.41 5.41,3.5 7.48,6.26l10.16,-10.17c-3.07,-3.64 -6.96,-6.51 -11.67,-8.61c-4.71,-2.1 -9.92,-3.15 -15.63,-3.15c-4.96,0 -9.59,0.88 -13.88,2.64c-4.3,1.76 -8.08,4.19 -11.35,7.3c-3.26,3.1 -5.8,6.71 -7.63,10.82c-1.82,4.11 -2.73,8.61 -2.73,13.51c0,4.83 0.89,9.32 2.68,13.46c1.79,4.14 4.25,7.78 7.39,10.92c3.14,3.14 6.82,5.6 11.06,7.39c4.24,1.79 8.8,2.68 13.7,2.68c6.59,0 12.41,-1.4 17.46,-4.19c5.05,-2.79 9,-6.92 11.86,-12.38c2.85,-5.46 4.28,-12.14 4.28,-20.05v-2.16h-34.92V78.45z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M540.71,48.7h10.64c2.89,0 5.13,0.79 6.73,2.35c1.6,1.57 2.4,3.55 2.4,5.93c0,2.51 -0.82,4.5 -2.45,5.98c-1.63,1.47 -3.89,2.21 -6.78,2.21h-10.54V48.7zM564.52,73.83c3.39,-1.63 6.02,-3.91 7.91,-6.83c1.88,-2.92 2.83,-6.38 2.83,-10.4c0,-3.77 -0.93,-7.12 -2.78,-10.07c-1.85,-2.95 -4.44,-5.26 -7.76,-6.92c-3.33,-1.66 -7.22,-2.49 -11.67,-2.49h-12.33h-3.48h-11.39v66.46h14.87v-27.3h1.52l19.75,27.3h17.6l-21.19,-27.82C560.61,75.35 562.66,74.73 564.52,73.83"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M629.66,37.12l-14.12,24.19l-14.12,-24.19l-17.13,0l23.72,38.72l0,27.74l14.97,0l0,-28.32l23.53,-38.14z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M10.98,100.52c-4.47,0 -8.48,-3.14 -9.41,-7.69C0.53,87.74 0,82.5 0,77.27C0,52.12 12.3,28.47 32.91,14c4.35,-3.05 10.34,-2 13.39,2.34c3.05,4.34 2,10.34 -2.34,13.39C28.47,40.61 19.23,58.38 19.23,77.27c0,3.94 0.4,7.88 1.18,11.71c1.06,5.2 -2.29,10.28 -7.49,11.35C12.26,100.45 11.62,100.52 10.98,100.52z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M77.27,154.53c-15.33,0 -30.14,-4.48 -42.85,-12.96c-4.42,-2.95 -5.61,-8.92 -2.66,-13.33c2.95,-4.42 8.92,-5.61 13.33,-2.66c9.53,6.36 20.66,9.72 32.17,9.72c18.88,0 36.64,-9.23 47.51,-24.69c3.05,-4.34 9.05,-5.39 13.39,-2.33c4.34,3.05 5.39,9.05 2.33,13.39C126.03,142.25 102.39,154.53 77.27,154.53z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M143.87,98.86c-0.56,0 -1.13,-0.05 -1.7,-0.15c-5.23,-0.93 -8.71,-5.93 -7.77,-11.16c0.6,-3.37 0.91,-6.83 0.91,-10.29c0,-7.24 -1.31,-14.3 -3.91,-20.99c-1.92,-4.95 0.53,-10.52 5.48,-12.44c4.95,-1.92 10.52,0.54 12.44,5.48c3.46,8.91 5.21,18.31 5.21,27.94c0,4.59 -0.41,9.19 -1.21,13.67C152.49,95.6 148.44,98.86 143.87,98.86z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M124.19,38.15c-2.4,0 -4.8,-0.89 -6.67,-2.69c-10.87,-10.47 -25.16,-16.23 -40.26,-16.23c-3.42,0 -6.84,0.3 -10.17,0.89c-5.23,0.92 -10.22,-2.57 -11.14,-7.8s2.57,-10.22 7.8,-11.14C68.18,0.4 72.73,0 77.27,0c20.09,0 39.13,7.67 53.6,21.61c3.82,3.68 3.94,9.77 0.26,13.59C129.23,37.16 126.71,38.15 124.19,38.15z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M41.24,101.68m-10.9,0a10.9,10.9 0,1 1,21.8 0a10.9,10.9 0,1 1,-21.8 0"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="636.577dp"
|
||||
android:height="271.126dp"
|
||||
android:viewportWidth="636.577"
|
||||
android:viewportHeight="271.126">
|
||||
|
||||
<path
|
||||
android:fillColor="#FF9900"
|
||||
android:pathData="M207.414,61.361c-18.867-18.878-44.938-30.555-73.736-30.555c-12.746,0-24.957,2.287-36.245,6.474 l-8.88-23.535c14.332-5.453,29.88-8.438,46.125-8.438c35.734,0,68.094,14.445,91.559,37.814L207.414,61.361z" />
|
||||
<path
|
||||
android:fillColor="#349933"
|
||||
android:pathData="M63.193,211.868c14.326,13.152,32.343,22.35,52.318,25.859l-4.326,24.957 c-24.722-4.521-46.996-16.049-64.689-32.449L63.193,211.868z" />
|
||||
<path
|
||||
android:fillColor="#0199CB"
|
||||
android:pathData="M33.563,216.368C15.648,194.12,4.928,165.84,4.928,135.055c0-48.096,26.17-90.081,65.047-112.49 l12.32,21.762c-31.569,17.917-52.867,51.835-52.867,90.728c0,24.906,8.734,47.771,23.306,65.701L33.563,216.368z" />
|
||||
<path
|
||||
android:fillColor="#EC0200"
|
||||
android:pathData="M131.927,239.29c0.582,0.01,1.166,0.016,1.75,0.016c24.691,0,47.377-8.586,65.238-22.932l15.982,20.666 c-22.076,17.391-49.938,27.766-80.221,27.766c-1.115,0-2.227-0.014-3.336-0.043L131.927,239.29z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M101.414,95.458H75.426V72.165h25.987V95.458z M101.414,199.928H75.426v-93.78h25.987V199.928z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M114.606,106.148h46.586c14.08,0,24.132,2.651,30.159,7.953c6.025,5.302,9.039,14.095,9.039,26.378v59.449H175.62v-56.406 c0-7.01-1.086-11.561-3.259-13.646c-2.173-2.086-6.534-3.129-13.081-3.129h-19.903v73.181h-24.771V106.148z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M203.937,106.148h17.47V72.165h24.771v33.983h26.161v18.687h-26.161v37.894c0,6.953,1.187,11.777,3.563,14.471 c2.375,2.695,6.519,4.043,12.429,4.043h10.169v18.686H249.74c-9.156,0-16.166-2.533-21.033-7.605 c-4.867-5.068-7.301-12.326-7.301-21.771v-45.716h-17.47V106.148z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M320.557,199.928c-15.529,0-27.277-3.955-35.244-11.863c-7.967-7.91-11.95-19.568-11.95-34.982 c0-15.412,3.998-27.087,11.994-35.027c7.996-7.938,19.729-11.907,35.2-11.907h36.156v19.556h-32.767 c-8.982,0-15.022,1.275-18.122,3.824c-3.1,2.55-4.767,7.158-4.997,13.82h55.886v19.555h-55.886 c0.23,6.723,1.782,11.314,4.649,13.775c2.869,2.465,8.966,3.695,18.296,3.695h32.94v19.555H320.557z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M452.301,196.54c0,12.863-2.868,22.307-8.604,28.334c-5.736,6.025-14.688,9.039-26.856,9.039h-48.585v-19.035h44.326 c4.75,0,8.4-1.145,10.951-3.434c2.549-2.289,3.824-5.605,3.824-9.951v-1.564h-20.164c-10.43,0-17.935-0.781-22.511-2.346 c-4.578-1.564-8.809-4.229-12.689-7.996c-4.463-4.229-7.896-9.502-10.3-15.818c-2.404-6.314-3.606-13.152-3.606-20.512 c0-7.242,1.202-14.008,3.606-20.295c2.404-6.287,5.837-11.544,10.3-15.775c3.998-3.939,8.691-6.764,14.08-8.474 c5.389-1.708,12.429-2.564,21.12-2.564h45.108V196.54z M414.493,180.547h12.863v-54.322h-12.863 c-6.201,0-10.547,0.232-13.037,0.695c-2.492,0.465-4.665,1.247-6.519,2.347c-3.824,2.319-6.62,5.375-8.388,9.168 c-1.768,3.797-2.65,8.736-2.65,14.82c0,10.025,2.229,17.078,6.692,21.162C395.053,178.504,403.021,180.547,414.493,180.547z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M464.711,106.148h41.632c9.734,0,16.557,1.753,20.469,5.258c3.91,3.506,5.866,9.634,5.866,18.382v15.645h-23.641v-12.082 c0-3.65-0.651-6.097-1.956-7.343c-1.303-1.246-4.273-1.869-8.908-1.869h-8.691v75.789h-24.771V106.148z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M580.463,179.243h19.903v-73.094h24.771v91.26c0,12.398-2.898,21.582-8.691,27.551c-5.795,5.967-14.66,8.953-26.596,8.953 h-48.585v-19.035h44.326c4.75,0,8.4-1.145,10.951-3.434c2.549-2.289,3.824-5.605,3.824-9.951v-1.564h-21.902 c-14.023,0-24.019-2.766-29.985-8.301c-5.969-5.531-8.952-14.76-8.952-27.682v-57.797h24.51v55.885 c0,7.07,1.057,11.705,3.173,13.906C569.323,178.143,573.74,179.243,580.463,179.243z" />
|
||||
</vector>
|
||||
android:width="646.51dp"
|
||||
android:height="154.53dp"
|
||||
android:viewportWidth="646.51"
|
||||
android:viewportHeight="154.53">
|
||||
<path
|
||||
android:pathData="M203.9,37.12h14.87v66.46h-14.87z"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M279.96,77.4l-31.44,-40.28l-10.45,0l0,66.46l14.87,0l0,-39.78l30.97,39.78l11.02,0l0,-66.46l-14.97,0z"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M309.61,50.11l20.8,0l0,53.47l14.97,0l0,-53.47l20.71,0l0,-12.99l-56.48,0z"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M395.74,75.9l29.65,0l0,-12.52l-29.65,0l0,-13.46l32.48,0l0,-12.8l-32.48,0l-3.48,0l-11.39,0l0,66.46l11.39,0l3.48,0l33.04,0l0,-12.8l-33.04,0z"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M475.47,78.45l18.95,0.3c-0.36,1.33 -0.8,2.6 -1.4,3.75c-1.48,2.82 -3.58,4.97 -6.31,6.45c-2.73,1.48 -6.01,2.21 -9.84,2.21c-3.83,0 -7.22,-0.89 -10.17,-2.68c-2.95,-1.79 -5.27,-4.25 -6.97,-7.39c-1.69,-3.14 -2.54,-6.75 -2.54,-10.83c0,-4.14 0.86,-7.77 2.59,-10.87c1.73,-3.1 4.13,-5.52 7.2,-7.25c3.07,-1.73 6.56,-2.59 10.45,-2.59c3.58,0 6.83,0.71 9.75,2.12c2.92,1.41 5.41,3.5 7.48,6.26l10.16,-10.17c-3.07,-3.64 -6.96,-6.51 -11.67,-8.61c-4.71,-2.1 -9.92,-3.15 -15.63,-3.15c-4.96,0 -9.59,0.88 -13.88,2.64c-4.3,1.76 -8.08,4.19 -11.35,7.3c-3.26,3.1 -5.8,6.71 -7.63,10.82c-1.82,4.11 -2.73,8.61 -2.73,13.51c0,4.83 0.89,9.32 2.68,13.46c1.79,4.14 4.25,7.78 7.39,10.92c3.14,3.14 6.82,5.6 11.06,7.39c4.24,1.79 8.8,2.68 13.7,2.68c6.59,0 12.41,-1.4 17.46,-4.19c5.05,-2.79 9,-6.92 11.86,-12.38c2.85,-5.46 4.28,-12.14 4.28,-20.05v-2.16h-34.92V78.45z"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M540.71,48.7h10.64c2.89,0 5.13,0.79 6.73,2.35c1.6,1.57 2.4,3.55 2.4,5.93c0,2.51 -0.82,4.5 -2.45,5.98c-1.63,1.47 -3.89,2.21 -6.78,2.21h-10.54V48.7zM564.52,73.83c3.39,-1.63 6.02,-3.91 7.91,-6.83c1.88,-2.92 2.83,-6.38 2.83,-10.4c0,-3.77 -0.93,-7.12 -2.78,-10.07c-1.85,-2.95 -4.44,-5.26 -7.76,-6.92c-3.33,-1.66 -7.22,-2.49 -11.67,-2.49h-12.33h-3.48h-11.39v66.46h14.87v-27.3h1.52l19.75,27.3h17.6l-21.19,-27.82C560.61,75.35 562.66,74.73 564.52,73.83"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M629.66,37.12l-14.12,24.19l-14.12,-24.19l-17.13,0l23.72,38.72l0,27.74l14.97,0l0,-28.32l23.53,-38.14z"
|
||||
android:fillColor="#181715"/>
|
||||
<path
|
||||
android:pathData="M10.98,100.52c-4.47,0 -8.48,-3.14 -9.41,-7.69C0.53,87.74 0,82.5 0,77.27C0,52.12 12.3,28.47 32.91,14c4.35,-3.05 10.34,-2 13.39,2.34c3.05,4.34 2,10.34 -2.34,13.39C28.47,40.61 19.23,58.38 19.23,77.27c0,3.94 0.4,7.88 1.18,11.71c1.06,5.2 -2.29,10.28 -7.49,11.35C12.26,100.45 11.62,100.52 10.98,100.52z"
|
||||
android:fillColor="#F39200"/>
|
||||
<path
|
||||
android:pathData="M77.27,154.53c-15.33,0 -30.14,-4.48 -42.85,-12.96c-4.42,-2.95 -5.61,-8.92 -2.66,-13.33c2.95,-4.42 8.92,-5.61 13.33,-2.66c9.53,6.36 20.66,9.72 32.17,9.72c18.88,0 36.64,-9.23 47.51,-24.69c3.05,-4.34 9.05,-5.39 13.39,-2.33c4.34,3.05 5.39,9.05 2.33,13.39C126.03,142.25 102.39,154.53 77.27,154.53z"
|
||||
android:fillColor="#00A0DE"/>
|
||||
<path
|
||||
android:pathData="M143.87,98.86c-0.56,0 -1.13,-0.05 -1.7,-0.15c-5.23,-0.93 -8.71,-5.93 -7.77,-11.16c0.6,-3.37 0.91,-6.83 0.91,-10.29c0,-7.24 -1.31,-14.3 -3.91,-20.99c-1.92,-4.95 0.53,-10.52 5.48,-12.44c4.95,-1.92 10.52,0.54 12.44,5.48c3.46,8.91 5.21,18.31 5.21,27.94c0,4.59 -0.41,9.19 -1.21,13.67C152.49,95.6 148.44,98.86 143.87,98.86z"
|
||||
android:fillColor="#269C38"/>
|
||||
<path
|
||||
android:pathData="M124.19,38.15c-2.4,0 -4.8,-0.89 -6.67,-2.69c-10.87,-10.47 -25.16,-16.23 -40.26,-16.23c-3.42,0 -6.84,0.3 -10.17,0.89c-5.23,0.92 -10.22,-2.57 -11.14,-7.8s2.57,-10.22 7.8,-11.14C68.18,0.4 72.73,0 77.27,0c20.09,0 39.13,7.67 53.6,21.61c3.82,3.68 3.94,9.77 0.26,13.59C129.23,37.16 126.71,38.15 124.19,38.15z"
|
||||
android:fillColor="#E62400"/>
|
||||
<path
|
||||
android:pathData="M41.24,101.68m-10.9,0a10.9,10.9 0,1 1,21.8 0a10.9,10.9 0,1 1,-21.8 0"
|
||||
android:fillColor="#1D1D1B"/>
|
||||
</vector>
|
||||
|
||||
43
app/src/main/res/layout/dialog_select_lotti.xml
Normal file
43
app/src/main/res/layout/dialog_select_lotti.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<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:paddingVertical="16dp">
|
||||
|
||||
|
||||
<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:layout_marginHorizontal="16dp"
|
||||
android:singleLine="false"
|
||||
android:maxLines="2"
|
||||
android:text="Seleziona lotto" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/item_list"
|
||||
android:layout_width="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/dialog_select_lotti__item_model"
|
||||
tools:itemCount="5"/>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
79
app/src/main/res/layout/dialog_select_lotti__item_model.xml
Normal file
79
app/src/main/res/layout/dialog_select_lotti__item_model.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
<import type="android.view.View" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<variable
|
||||
name="row"
|
||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectLotti.DialogSelectLottiItemListModel" />
|
||||
</data>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_marginVertical="2dp"
|
||||
android:background="@drawable/bg_checked_layout"
|
||||
android:onClick="@{() -> row.checked.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:backgroundTintResID="@{row.checked.get() ? R.color.bg_checked_layout : android.R.color.transparent}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:clickable="false"
|
||||
app:checked="@{row.checked}" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/checkbox"
|
||||
android:layout_marginStart="4dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/partita_mag_label"
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{row.partitaMag}"
|
||||
tools:text="PARTITA MAG" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{row.getDataScadText}"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:textStyle="bold"
|
||||
android:layout_below="@id/partita_mag_label"
|
||||
tools:text="dd/MM/yyyy" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@@ -1,287 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>*|Mail peppino|*</title>
|
||||
|
||||
<meta property="og:title" content="*|MC:SUBJECT|*">
|
||||
|
||||
<style type="text/css">
|
||||
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
|
||||
|
||||
.ExternalClass {
|
||||
width: 100%;
|
||||
}
|
||||
.ExternalClass,
|
||||
.ExternalClass p,
|
||||
.ExternalClass span,
|
||||
.ExternalClass font,
|
||||
.ExternalClass td,
|
||||
.ExternalClass div {
|
||||
line-height: 100%;
|
||||
}
|
||||
body {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table td {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
img {
|
||||
-ms-interpolation-mode: bicubic;
|
||||
display: block;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #333333;
|
||||
line-height: 100%;
|
||||
}
|
||||
body,
|
||||
#body_style {
|
||||
width: 100%!important;
|
||||
min-height: 1000px;
|
||||
color: #333333;
|
||||
background: #fff;
|
||||
font-family: 'Open Sans','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
a {
|
||||
color: #114eb1;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:link {
|
||||
color: #114eb1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #183082;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
color: #0066ff!important;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0066ff!important;
|
||||
}
|
||||
|
||||
a[href^="tel"],
|
||||
a[href^="sms"] {
|
||||
text-decoration: none;
|
||||
color: #333333;
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mobile_link a[href^="tel"],
|
||||
.mobile_link a[href^="sms"] {
|
||||
text-decoration: default;
|
||||
color: #6e5c4f!important;
|
||||
pointer-events: auto;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 639px) {
|
||||
.hide {
|
||||
display: none!important;
|
||||
}
|
||||
.table {
|
||||
width: 320px!important;
|
||||
}
|
||||
.innertable {
|
||||
width: 280px!important;
|
||||
}
|
||||
.heroimage {
|
||||
width: 280px!important;
|
||||
height: 100px!important;
|
||||
}
|
||||
.shadow {
|
||||
width: 280px!important;
|
||||
height: 4px!important;
|
||||
}
|
||||
.collapse-cell {
|
||||
width: 320px!important;
|
||||
}
|
||||
.social-media img {
|
||||
float: left!important;
|
||||
margin: 0 1em 0 0 important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="width:100%!important;min-height:1000px;color:#333333;background: #fff;font-family: 'Open Sans','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;font-size:13px;line-height:1.4;" alink="#114eb1" link="#114eb1" bgcolor="#e0dbcf" text="#333333">
|
||||
|
||||
<div id="body_style">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%!important;margin:0;padding:0;font-family: 'Open Sans';">
|
||||
<tbody>
|
||||
<tr bgcolor="#fff">
|
||||
<td>
|
||||
|
||||
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="table" style="
|
||||
border: solid 1px #d3d3d3;
|
||||
">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tbody>
|
||||
<tr style="text-align: center;">
|
||||
|
||||
<td width="100%" style="
|
||||
padding-top: 24px;
|
||||
padding-bottom: 24px;
|
||||
">
|
||||
<center>
|
||||
<img alt="" height="60" src="https://www.integry.it/assets/common/logo/logo_integry_completo_1024w.png" />
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr style="
|
||||
background: #319be5;
|
||||
">
|
||||
<td style="
|
||||
padding: 24px;
|
||||
line-height: 1.6;
|
||||
">
|
||||
<span style="
|
||||
color: white;
|
||||
opacity: 0.7;
|
||||
">__APP_NAME__</span>
|
||||
|
||||
<span style="
|
||||
color: white;
|
||||
opacity: 0.7;
|
||||
font-size: 20px;
|
||||
line-height: 0.2;
|
||||
">·</span>
|
||||
<span style="
|
||||
color: white;
|
||||
opacity: 0.7;
|
||||
">__APP_PACKAGE__ v__APP_VERSION__ (__APP_VERSION_CODE__)</span>
|
||||
<br><span style="
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
">Nuova segnalazione (__CUSTOMER_NAME__)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="
|
||||
background: #ebeff2;
|
||||
">
|
||||
<td style="
|
||||
padding: 32px 0 0px 0;
|
||||
">
|
||||
|
||||
<center style="padding: 0 100px 0 100px;">
|
||||
|
||||
<table>
|
||||
<tbody style="">
|
||||
<tr style="
|
||||
">
|
||||
<td style="
|
||||
padding: 24px;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
background: #fab301;
|
||||
border-radius: 5px 5px 0 0;
|
||||
">
|
||||
<center>
|
||||
|
||||
<img src="https://www.integry.it/images/exclamation.png" width="80" height="80" />
|
||||
|
||||
<br> Dai forza! È stato riscontrato un problema fatale: __ERROR_TITLE__
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="
|
||||
">
|
||||
<td style="
|
||||
padding: 20px 15px;
|
||||
border: solid 1px #d3d3d3;
|
||||
background: white;
|
||||
">
|
||||
<span style="
|
||||
font-weight: bold;
|
||||
">__ERROR_DETAIL__ (__ERROR_DATE__)</span>
|
||||
<pre>__ERROR_STACKTRACE__</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</center>
|
||||
|
||||
<hr style="
|
||||
border: solid 0.5px #d3d3d3;
|
||||
margin-top: 24px;
|
||||
">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="
|
||||
background: #ebeff2;
|
||||
">
|
||||
<td style="
|
||||
padding: 24px;
|
||||
">
|
||||
<center>
|
||||
<span style="
|
||||
color: #7c7d81;
|
||||
font-size: small;
|
||||
font-weight: bold;
|
||||
">Questa email è solo una notifica riguardo un errore che si è verificato in un progetto</span>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.9.20'
|
||||
agp_version = '8.4.0'
|
||||
agp_version = '8.7.2'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
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.9-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user