Aggiornata gestione Rientro Merce per supportare la nuova logica dei colli
This commit is contained in:
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2025-05-14T09:45:15.341614500Z">
|
<DropdownSelection timestamp="2025-06-10T08:33:51.753564600Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=23324B682F" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import android.widget.EditText;
|
|||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.ColorRes;
|
import androidx.annotation.ColorRes;
|
||||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||||
@@ -38,6 +39,8 @@ import java.math.BigDecimal;
|
|||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -471,6 +474,7 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
||||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
@@ -1154,4 +1158,52 @@ public class Converters {
|
|||||||
view.setLayoutParams(layoutParams);
|
view.setLayoutParams(layoutParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BindingAdapter per bindare una LocalDate diretta su una TextView con un formato specificato.
|
||||||
|
* Esempio di utilizzo in XML:
|
||||||
|
* app:localDateText="@{myLocalDate}" app:dateFormat="@{@string/my_date_format}"
|
||||||
|
*/
|
||||||
|
@BindingAdapter(value = {"localDateText", "dateFormat"}, requireAll = false)
|
||||||
|
public static void bindLocalDateText(TextView view, LocalDate date, String dateFormat) {
|
||||||
|
if (date == null) {
|
||||||
|
view.setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String pattern = dateFormat != null ? dateFormat : "dd/MM/yyyy";
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||||
|
view.setText(date.format(formatter));
|
||||||
|
}
|
||||||
|
|
||||||
|
@BindingAdapter(value = {"localDateTimeText", "dateFormat"}, requireAll = false)
|
||||||
|
public static void bindLocalDateText(TextView view, LocalDateTime date, String dateFormat) {
|
||||||
|
if (date == null) {
|
||||||
|
view.setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String pattern = dateFormat != null ? dateFormat : "dd/MM/yyyy hh:mm";
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||||
|
view.setText(date.format(formatter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BindingAdapter per bindare una ObservableField<LocalDate> su una TextView con un formato specificato.
|
||||||
|
* Esempio di utilizzo in XML:
|
||||||
|
* app:localDateObservableText="@{myObservableLocalDate}" app:dateFormat="@{@string/my_date_format}"
|
||||||
|
*/
|
||||||
|
@BindingAdapter(value = {"localDateObservableText", "dateFormat"}, requireAll = false)
|
||||||
|
public static void bindObservableLocalDateText(TextView view, ObservableField<LocalDate> observableDate, String dateFormat) {
|
||||||
|
if (observableDate == null) {
|
||||||
|
view.setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LocalDate date = observableDate.get();
|
||||||
|
if (date == null) {
|
||||||
|
view.setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String pattern = dateFormat != null ? dateFormat : "dd/MM/yyyy";
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||||
|
view.setText(date.format(formatter));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.model;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -59,7 +60,7 @@ public class MtbColr extends EntityBase {
|
|||||||
@SerializedName("numColloRif")
|
@SerializedName("numColloRif")
|
||||||
private Integer numColloRif;
|
private Integer numColloRif;
|
||||||
@SerializedName("datetimeRow")
|
@SerializedName("datetimeRow")
|
||||||
private String datetimeRow;
|
private LocalDateTime datetimeRow;
|
||||||
@SerializedName("codJcom")
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
@SerializedName("numCnf")
|
@SerializedName("numCnf")
|
||||||
@@ -430,26 +431,15 @@ public class MtbColr extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getDatetimeRow() {
|
||||||
public String getDatetimeRowS() {
|
|
||||||
return datetimeRow;
|
return datetimeRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDatetimeRowD() {
|
public MtbColr setDatetimeRow(LocalDateTime datetimeRow) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDatetimeRowS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColr setDatetimeRow(String datetimeRow) {
|
|
||||||
this.datetimeRow = datetimeRow;
|
this.datetimeRow = datetimeRow;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDatetimeRow(Date datetimeRow) {
|
|
||||||
this.datetimeRow = UtilityDate.formatDate(datetimeRow, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getCodJcom() {
|
public String getCodJcom() {
|
||||||
return codJcom;
|
return codJcom;
|
||||||
}
|
}
|
||||||
@@ -651,9 +641,6 @@ public class MtbColr extends EntityBase {
|
|||||||
return dataColloRif;
|
return dataColloRif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDatetimeRow() {
|
|
||||||
return datetimeRow;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarcodeUlIn() {
|
public String getBarcodeUlIn() {
|
||||||
return barcodeUlIn;
|
return barcodeUlIn;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.model.key;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
public class MtbColrKey extends MtbColtKey{
|
public class MtbColrKey extends MtbColtKey {
|
||||||
|
|
||||||
private final int riga;
|
private final int riga;
|
||||||
|
|
||||||
|
|||||||
@@ -677,30 +677,24 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public MtbColr makeSynchronousRetrieveShipmentUlFromProductionUlRequest(String barcodeUl) throws Exception {
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
HashMap<String, Object> params = new HashMap<>();
|
||||||
params.put("mtb_colr.gestione_rif", mtbColt.getGestione());
|
params.put("barcode_ul_out", barcodeUl);
|
||||||
params.put("mtb_colr.ser_collo_rif", mtbColt.getSerCollo());
|
|
||||||
params.put("mtb_colr.num_collo_rif", mtbColt.getNumCollo());
|
|
||||||
params.put("mtb_colr.data_collo_rif", mtbColt.getDataColloD());
|
|
||||||
|
|
||||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
||||||
|
|
||||||
|
|
||||||
String query = "select distinct mtb_colt.*\n" +
|
String query = "select distinct TOP 1 *\n" +
|
||||||
"from mtb_colt\n" +
|
"from mtb_colr\n" +
|
||||||
" left join mtb_colr on mtb_colt.gestione = mtb_colr.gestione and mtb_colt.data_collo = mtb_colr.data_collo and\n" +
|
"where gestione = 'V'" +
|
||||||
" mtb_colt.ser_collo = mtb_colr.ser_collo and mtb_colt.num_collo = mtb_colr.num_collo\n" +
|
|
||||||
"where mtb_colt.gestione = 'V'" +
|
|
||||||
" AND " + whereCond;
|
" AND " + whereCond;
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColr>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
|
var data = this.mSystemRESTConsumer.<ArrayList<MtbColr>>processSqlSynchronized(query, typeOfObjectsList);
|
||||||
onComplete.run(data.get(0));
|
return data != null && !data.isEmpty() ? data.get(0) : null;
|
||||||
}, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printReportType(ReportType reportType, String codMdep, String codAnag, HashMap<String, Object> params, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void makeSynchronousPrintReportTypeRequest(ReportType reportType, String codMdep, String codAnag, HashMap<String, Object> params) throws Exception {
|
||||||
|
|
||||||
ReportTypeDTO reportTypeDTO = new ReportTypeDTO();
|
ReportTypeDTO reportTypeDTO = new ReportTypeDTO();
|
||||||
reportTypeDTO.setReportType(reportType);
|
reportTypeDTO.setReportType(reportType);
|
||||||
@@ -98,29 +98,11 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.forEach(x -> reportTypeDTO.getParams().add(new JasperPairDTO(x.getKey(), x.getValue())));
|
.forEach(x -> reportTypeDTO.getParams().add(new JasperPairDTO(x.getKey(), x.getValue())));
|
||||||
|
|
||||||
PrinterRESTConsumerService printerService = restBuilder.getService(PrinterRESTConsumerService.class);
|
PrinterRESTConsumerService printerService = restBuilder.getService(PrinterRESTConsumerService.class);
|
||||||
printerService
|
var response = printerService
|
||||||
.printReportType(reportTypeDTO)
|
.printReportType(reportTypeDTO)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
|
||||||
analyzeAnswer(response, "printReportType", data -> {
|
|
||||||
onComplete.run();
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
analyzeAnswer(response, "printReportType");
|
||||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void printReportType(ReportType reportType, HashMap<String, Object> params, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
printReportType(reportType, null, null, params, onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void printReportType(ReportType reportType, String codMdep, HashMap<String, Object> params, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
printReportType(reportType, codMdep, null, params, onComplete, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printClosedOrdersSynchronized(PrintOrderCloseDTO dto, String codMdep) throws Exception {
|
public void printClosedOrdersSynchronized(PrintOrderCloseDTO dto, String codMdep) throws Exception {
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinDTO;
|
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinDTO;
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ProduzioneRESTConsumer extends _BaseRESTConsumer {
|
public class ProduzioneRESTConsumer extends _BaseRESTConsumer {
|
||||||
@@ -22,23 +15,14 @@ public class ProduzioneRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void caricoProdFin(CaricoProdFinDTO caricoProdFin, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void makeSynchronousCaricoProdFin(CaricoProdFinDTO caricoProdFin) throws Exception {
|
||||||
|
|
||||||
ProduzioneRESTConsumerService service = restBuilder.getService(ProduzioneRESTConsumerService.class);
|
ProduzioneRESTConsumerService service = restBuilder.getService(ProduzioneRESTConsumerService.class);
|
||||||
service.caricoProdFin(caricoProdFin)
|
var response = service.caricoProdFin(caricoProdFin)
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
analyzeAnswer(response, "caricoProdFin");
|
||||||
analyzeAnswer(response, "caricoProdFin", Void -> onComplete.run(), ex -> {
|
|
||||||
if (onFailed != null) onFailed.run(ex);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,34 +91,40 @@ public abstract class _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <T> void analyzeAnswerList(Response<ServiceRESTResponse<T>> response, String logTitle, RunnableArgs<List<T>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static <T> void analyzeAnswerList(Response<ServiceRESTResponse<T>> response, String logTitle, RunnableArgs<List<T>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
try {
|
||||||
|
var dataList = analyzeAnswerList(response, logTitle);
|
||||||
|
onComplete.run(dataList);
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> List<T> analyzeAnswerList(Response<ServiceRESTResponse<T>> response, String logTitle) throws Exception {
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
if (response.body().getEsito() == EsitoType.OK) {
|
if (response.body().getEsito() == EsitoType.OK) {
|
||||||
if (!UtilityString.isNullOrEmpty(response.body().getErrorMessage())) {
|
if (!UtilityString.isNullOrEmpty(response.body().getErrorMessage())) {
|
||||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
throw new Exception(response.body().getErrorMessage());
|
||||||
} else {
|
} else {
|
||||||
|
return response.body().getEntityList();
|
||||||
List<T> dataObj = response.body().getEntityList();
|
|
||||||
|
|
||||||
onComplete.run(dataObj);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e(logTitle, response.body().getErrorMessage());
|
Log.e(logTitle, response.body().getErrorMessage());
|
||||||
onFailed.run(CommonRESTException.tryRecognizeException(response.body().getErrorMessage()));
|
throw CommonRESTException.tryRecognizeException(response.body().getErrorMessage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e(logTitle, response.message());
|
Log.e(logTitle, response.message());
|
||||||
onFailed.run(new Exception(response.message()));
|
throw new Exception(response.message());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (response.code() == 404) {
|
if (response.code() == 404) {
|
||||||
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata");
|
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata");
|
||||||
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")"));
|
throw new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")");
|
||||||
} else if (response.code() == 550)
|
} else if (response.code() == 550)
|
||||||
onFailed.run(new InvalidLicenseException());
|
throw new InvalidLicenseException();
|
||||||
else {
|
else {
|
||||||
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
||||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
throw new Exception("Status " + response.code() + ": " + response.message());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ public class PickingLiberoViewModel {
|
|||||||
.setQtaCol(pickedQuantityDTO.getQtaTot())
|
.setQtaCol(pickedQuantityDTO.getQtaTot())
|
||||||
.setQtaCnf(pickedQuantityDTO.getQtaCnf())
|
.setQtaCnf(pickedQuantityDTO.getQtaCnf())
|
||||||
.setNumCnf(pickedQuantityDTO.getNumCnf())
|
.setNumCnf(pickedQuantityDTO.getNumCnf())
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
.setDatetimeRow(UtilityDate.getNowTime())
|
||||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||||
|
|
||||||
return mtbColr;
|
return mtbColr;
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ public class PickingResiViewModel {
|
|||||||
.setQtaCnf(qtaCnf)
|
.setQtaCnf(qtaCnf)
|
||||||
.setNumCnf(numCnf)
|
.setNumCnf(numCnf)
|
||||||
.setDescrizione(withdrawableDtbDocr.getMtbAart().getDescrizioneEstesa())
|
.setDescrizione(withdrawableDtbDocr.getMtbAart().getDescrizioneEstesa())
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
.setDatetimeRow(UtilityDate.getNowTime())
|
||||||
|
|
||||||
.setCodAnagDoc(withdrawableDtbDocr.getCodAnag())
|
.setCodAnagDoc(withdrawableDtbDocr.getCodAnag())
|
||||||
.setCodDtipDoc(withdrawableDtbDocr.getCodDtip())
|
.setCodDtipDoc(withdrawableDtbDocr.getCodDtip())
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
|||||||
mProdRientroMerceOrderDetailFragment.setOrder(order);
|
mProdRientroMerceOrderDetailFragment.setOrder(order);
|
||||||
})
|
})
|
||||||
.setOnRefreshListener(this);
|
.setOnRefreshListener(this);
|
||||||
mProdRientroMerceOrderDetailFragment.setOnMtbColtClicked(item -> {
|
mProdRientroMerceOrderDetailFragment.setOnMtbColrClicked(item -> {
|
||||||
new BottomSheetMtbColrEditModalView(item.getMtbColr().get(0))
|
new BottomSheetMtbColrEditModalView(item)
|
||||||
.setListener(this)
|
.setListener(this)
|
||||||
.show(getParentFragmentManager(), "BottomSheetMtbColrEditModal");
|
.show(getParentFragmentManager(), "BottomSheetMtbColrEditModal");
|
||||||
});
|
});
|
||||||
@@ -196,7 +196,7 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||||
|
mProdRientroMerceOrderDetailFragment.editMtbColr(mtbColr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
@@ -71,7 +70,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
private FragmentProdRientroMerceOrderDetailBinding mBindings;
|
private FragmentProdRientroMerceOrderDetailBinding mBindings;
|
||||||
private ProdRientroMerceOrderDetailMtbColtListAdapter mAdapter;
|
private ProdRientroMerceOrderDetailMtbColtListAdapter mAdapter;
|
||||||
|
|
||||||
private RunnableArgs<MtbColt> onMtbColtClicked;
|
private RunnableArgs<MtbColr> onMtbColrClicked;
|
||||||
|
|
||||||
private BluetoothManager bluetoothManager;
|
private BluetoothManager bluetoothManager;
|
||||||
private BluetoothSerialDevice mConnectedBluetoothDevice;
|
private BluetoothSerialDevice mConnectedBluetoothDevice;
|
||||||
@@ -103,8 +102,8 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
mBindings = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_prod_rientro_merce_order_detail, container, false);
|
mBindings = FragmentProdRientroMerceOrderDetailBinding.inflate(LayoutInflater.from(getActivity()), container, false);
|
||||||
mBindings.setLifecycleOwner(this);
|
mBindings.setLifecycleOwner(getViewLifecycleOwner());
|
||||||
|
|
||||||
mBindings.setView(this);
|
mBindings.setView(this);
|
||||||
|
|
||||||
@@ -118,7 +117,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
if (currentOrder.getValue() != null) {
|
if (currentOrder.getValue() != null) {
|
||||||
refreshOrder();
|
refreshOrder();
|
||||||
}
|
}
|
||||||
this.mViewModel.mtbColtsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
this.mViewModel.mtbColrsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
||||||
|
|
||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
this.initULScaleBluetoothConnection();
|
this.initULScaleBluetoothConnection();
|
||||||
@@ -141,7 +140,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
|
|
||||||
mBindings.mainList.setAdapter(mAdapter);
|
mBindings.mainList.setAdapter(mAdapter);
|
||||||
mAdapter.setOnItemClickListener(item -> {
|
mAdapter.setOnItemClickListener(item -> {
|
||||||
if (this.onMtbColtClicked != null) this.onMtbColtClicked.run(item);
|
if (this.onMtbColrClicked != null) this.onMtbColrClicked.run(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,35 +206,43 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
|
|
||||||
if (mBindings != null) mBindings.invalidateAll();
|
if (mBindings != null) mBindings.invalidateAll();
|
||||||
if (mAdapter != null) mAdapter.clearDataset();
|
if (mAdapter != null) mAdapter.clearDataset();
|
||||||
if (mViewModel != null) mViewModel.setOrder(currentOrd);
|
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
if (mViewModel != null) mViewModel.setOrder(currentOrd);
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.onError(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList(List<MtbColt> mtbColts) {
|
private void refreshList(List<MtbColr> mtbColrs) {
|
||||||
if (mtbColts != null) {
|
if (mtbColrs != null) {
|
||||||
sumLUNumber.set(new BigDecimal(mtbColts.size()));
|
sumLUNumber.set(new BigDecimal(mtbColrs.size()));
|
||||||
|
|
||||||
AtomicBigDecimal sumColli = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumColli = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
AtomicBigDecimal sumNet = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumNet = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
AtomicBigDecimal sumGross = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumGross = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
AtomicBigDecimal sumQtaCol = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumQtaCol = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
|
|
||||||
mtbColts.stream()
|
mtbColrs.stream()
|
||||||
.forEach(x -> x.getMtbColr().stream().forEach(y -> {
|
.forEach(y -> {
|
||||||
sumColli.getAndAdd(y.getNumCnf());
|
sumColli.getAndAdd(y.getNumCnf());
|
||||||
sumNet.getAndAdd(y.getPesoNettoKg());
|
sumNet.getAndAdd(y.getPesoNettoKg());
|
||||||
sumGross.getAndAdd(y.getPesoLordoKg());
|
sumGross.getAndAdd(y.getPesoLordoKg());
|
||||||
sumQtaCol.getAndAdd(y.getQtaCol());
|
sumQtaCol.getAndAdd(y.getQtaCol());
|
||||||
}));
|
});
|
||||||
|
|
||||||
ComparatorCompat<MtbColt> c = ComparatorCompat
|
ComparatorCompat<MtbColt> c = ComparatorCompat
|
||||||
.chain(
|
.chain(
|
||||||
new ComparatorCompat<MtbColt>((x, y) -> x.getDataVersD().compareTo(y.getDataVersD()))
|
new ComparatorCompat<MtbColt>((x, y) -> x.getDataVersD().compareTo(y.getDataVersD()))
|
||||||
)
|
)
|
||||||
.reversed();
|
.reversed();
|
||||||
MtbColt lastUl = Stream.of(mtbColts).sorted(c).findFirstOrElse(null);
|
// MtbColt lastUl = Stream.of(mtbColts).sorted(c).findFirstOrElse(null);
|
||||||
if (lastUl != null && !UtilityString.isNullOrEmpty(lastUl.getCodTcol())) {
|
// if (lastUl != null && !UtilityString.isNullOrEmpty(lastUl.getCodTcol())) {
|
||||||
mLatestCodTcol = lastUl.getCodTcol();
|
// mLatestCodTcol = lastUl.getCodTcol();
|
||||||
}
|
// }
|
||||||
|
|
||||||
currentOrder.getValue().setQtaTrasferite(sumQtaCol.get());
|
currentOrder.getValue().setQtaTrasferite(sumQtaCol.get());
|
||||||
this.progress.set(currentOrder.getValue().getProgress());
|
this.progress.set(currentOrder.getValue().getProgress());
|
||||||
@@ -250,7 +257,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
sumNetKG.set(BigDecimal.ZERO);
|
sumNetKG.set(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
mAdapter.updateDataset(mtbColts);
|
mAdapter.updateDataset(mtbColrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -258,11 +265,18 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
String codJcom = currentOrder.getValue().getCodJcom();
|
String codJcom = currentOrder.getValue().getCodJcom();
|
||||||
|
|
||||||
DialogPrintUlSSCCView.newInstance(codJcom, mtbColt, result -> {
|
DialogPrintUlSSCCView.newInstance(codJcom, mtbColt, result -> {
|
||||||
if (result.isFlagPrintShipmentLabel() || result.isFlagPrintProductionLabel()) {
|
executorService.execute(() -> {
|
||||||
this.mViewModel.printSavedMtbColt(result);
|
|
||||||
} else {
|
try {
|
||||||
this.mViewModel.refreshMtbColts();
|
if (result.isFlagPrintShipmentLabel() || result.isFlagPrintProductionLabel()) {
|
||||||
}
|
this.mViewModel.printSavedMtbColt(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mViewModel.refreshMtbColts();
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.onError(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.show(requireActivity().getSupportFragmentManager(), "DialogPrintUlSSCC");
|
.show(requireActivity().getSupportFragmentManager(), "DialogPrintUlSSCC");
|
||||||
|
|
||||||
@@ -343,8 +357,8 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProdRientroMerceOrderDetailFragment setOnMtbColtClicked(RunnableArgs<MtbColt> onMtbColtClicked) {
|
public ProdRientroMerceOrderDetailFragment setOnMtbColrClicked(RunnableArgs<MtbColr> onMtbColrClicked) {
|
||||||
this.onMtbColtClicked = onMtbColtClicked;
|
this.onMtbColrClicked = onMtbColrClicked;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,13 +367,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteMtbColr(MtbColr mtbColr) {
|
public void deleteMtbColr(MtbColr mtbColr) {
|
||||||
MtbColt mtbColt = new MtbColt()
|
this.mViewModel.deleteCarico(mtbColr);
|
||||||
.setGestione(mtbColr.getGestione())
|
|
||||||
.setDataCollo(mtbColr.getDataColloS())
|
|
||||||
.setSerCollo(mtbColr.getSerCollo())
|
|
||||||
.setNumCollo(mtbColr.getNumCollo());
|
|
||||||
|
|
||||||
this.mViewModel.deleteLU(mtbColt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getOrderStatusIcon() {
|
public Drawable getOrderStatusIcon() {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
@@ -21,13 +23,14 @@ public class ProdRientroMerceOrderDetailModule {
|
|||||||
@Provides
|
@Provides
|
||||||
ProdRientroMerceOrderDetailViewModel provideProdRientroMerceOrderDetailViewModel(
|
ProdRientroMerceOrderDetailViewModel provideProdRientroMerceOrderDetailViewModel(
|
||||||
RESTBuilder restBuilder,
|
RESTBuilder restBuilder,
|
||||||
|
ExecutorService executorService,
|
||||||
ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
||||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||||
PrinterRESTConsumer printerRESTConsumer,
|
PrinterRESTConsumer printerRESTConsumer,
|
||||||
ArticoloRESTConsumer articoloRESTConsumer,
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
SystemRESTConsumer systemRESTConsumer,
|
SystemRESTConsumer systemRESTConsumer,
|
||||||
ProduzioneRESTConsumer produzioneRESTConsumer) {
|
ProduzioneRESTConsumer produzioneRESTConsumer) {
|
||||||
return new ProdRientroMerceOrderDetailViewModel(prodRientroMerceOrderDetailRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, articoloRESTConsumer, systemRESTConsumer, produzioneRESTConsumer);
|
return new ProdRientroMerceOrderDetailViewModel(executorService, prodRientroMerceOrderDetailRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, articoloRESTConsumer, systemRESTConsumer, produzioneRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.view.ExtendedRecyclerView;
|
import it.integry.integrywmsnative.core.expansion.view.ExtendedRecyclerView;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailMtbColtItemModelBinding;
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailMtbColtItemModelBinding;
|
||||||
|
|
||||||
public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyclerView<MtbColt, ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder> {
|
public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyclerView<MtbColr, ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder> {
|
||||||
|
|
||||||
private OnItemClickListener mOnItemClickListener;
|
private OnItemClickListener mOnItemClickListener;
|
||||||
|
|
||||||
public ProdRientroMerceOrderDetailMtbColtListAdapter(ObservableArrayList<MtbColt> myDataset) {
|
public ProdRientroMerceOrderDetailMtbColtListAdapter(ObservableArrayList<MtbColr> myDataset) {
|
||||||
super(myDataset);
|
super(myDataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,8 +29,8 @@ public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyc
|
|||||||
mViewDataBinding = v;
|
mViewDataBinding = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bind(MtbColt mtbColt) {
|
public void bind(MtbColr mtbColr) {
|
||||||
mViewDataBinding.setMtbColt(mtbColt);
|
mViewDataBinding.setMtbColr(mtbColr);
|
||||||
mViewDataBinding.executePendingBindings();
|
mViewDataBinding.executePendingBindings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,8 +48,8 @@ public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder holder, int position) {
|
public void onBindViewHolder(ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder holder, int position) {
|
||||||
MtbColt mtbColt = mDataset.get(position);
|
MtbColr mtbColr = mDataset.get(position);
|
||||||
holder.bind(mtbColt);
|
holder.bind(mtbColr);
|
||||||
|
|
||||||
//Setting qty with unt_mis
|
//Setting qty with unt_mis
|
||||||
// if(!SettingsManager.iDB().isFlagForceAllToColli() && (mtbColr.getMtbAart() == null || mtbColr.getMtbAart().isFlagQtaCnfFissaBoolean())){
|
// if(!SettingsManager.iDB().isFlagForceAllToColli() && (mtbColr.getMtbAart() == null || mtbColr.getMtbAart().isFlagQtaCnfFissaBoolean())){
|
||||||
@@ -66,7 +66,7 @@ public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyc
|
|||||||
|
|
||||||
holder.mViewDataBinding.getRoot().setOnClickListener(x -> {
|
holder.mViewDataBinding.getRoot().setOnClickListener(x -> {
|
||||||
if(mOnItemClickListener != null) {
|
if(mOnItemClickListener != null) {
|
||||||
mOnItemClickListener.onItemClick(holder.mViewDataBinding.getMtbColt());
|
mOnItemClickListener.onItemClick(holder.mViewDataBinding.getMtbColr());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyc
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface OnItemClickListener {
|
public interface OnItemClickListener {
|
||||||
void onItemClick(MtbColt item);
|
void onItemClick(MtbColr item);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,14 +10,15 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
import it.integry.integrywmsnative.core.model.DtbOrdSteps;
|
import it.integry.integrywmsnative.core.model.DtbOrdSteps;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.report.ReportType;
|
import it.integry.integrywmsnative.core.report.ReportType;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
@@ -37,9 +38,10 @@ import it.integry.integrywmsnative.view.dialogs.printSsccUl.dto.PrintUlDTO;
|
|||||||
|
|
||||||
public class ProdRientroMerceOrderDetailViewModel {
|
public class ProdRientroMerceOrderDetailViewModel {
|
||||||
|
|
||||||
public final MutableLiveData<List<MtbColt>> mtbColtsOfOrder = new MutableLiveData<>();
|
public final MutableLiveData<List<MtbColr>> mtbColrsOfOrder = new MutableLiveData<>();
|
||||||
private OrdineLavorazioneDTO currentOrder;
|
private OrdineLavorazioneDTO currentOrder;
|
||||||
|
|
||||||
|
private final ExecutorService executorService;
|
||||||
private final ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer;
|
private final ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer;
|
||||||
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
||||||
private final PrinterRESTConsumer printerRESTConsumer;
|
private final PrinterRESTConsumer printerRESTConsumer;
|
||||||
@@ -50,12 +52,14 @@ public class ProdRientroMerceOrderDetailViewModel {
|
|||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public ProdRientroMerceOrderDetailViewModel(ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
public ProdRientroMerceOrderDetailViewModel(ExecutorService executorService,
|
||||||
|
ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
||||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||||
PrinterRESTConsumer printerRESTConsumer,
|
PrinterRESTConsumer printerRESTConsumer,
|
||||||
ArticoloRESTConsumer articoloRESTConsumer,
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
SystemRESTConsumer systemRESTConsumer,
|
SystemRESTConsumer systemRESTConsumer,
|
||||||
ProduzioneRESTConsumer produzioneRESTConsumer) {
|
ProduzioneRESTConsumer produzioneRESTConsumer) {
|
||||||
|
this.executorService = executorService;
|
||||||
this.prodRientroMerceOrderDetailRESTConsumer = prodRientroMerceOrderDetailRESTConsumer;
|
this.prodRientroMerceOrderDetailRESTConsumer = prodRientroMerceOrderDetailRESTConsumer;
|
||||||
this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||||
this.printerRESTConsumer = printerRESTConsumer;
|
this.printerRESTConsumer = printerRESTConsumer;
|
||||||
@@ -64,27 +68,25 @@ public class ProdRientroMerceOrderDetailViewModel {
|
|||||||
this.produzioneRESTConsumer = produzioneRESTConsumer;
|
this.produzioneRESTConsumer = produzioneRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOrder(OrdineLavorazioneDTO order) {
|
public void setOrder(OrdineLavorazioneDTO order) throws Exception {
|
||||||
this.currentOrder = order;
|
this.currentOrder = order;
|
||||||
|
|
||||||
refreshMtbColts();
|
refreshMtbColts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshMtbColts() {
|
public void refreshMtbColts() throws Exception {
|
||||||
//this.sendOnLoadingStarted();
|
this.mtbColrsOfOrder.postValue(null);
|
||||||
this.mtbColtsOfOrder.postValue(null);
|
|
||||||
|
|
||||||
if (currentOrder != null) {
|
if (currentOrder != null) {
|
||||||
this.prodRientroMerceOrderDetailRESTConsumer.getMtbColtsOfOrder(currentOrder, mtbColts -> {
|
var mtbColrs = this.prodRientroMerceOrderDetailRESTConsumer.makeSynchronousRetrieveULOfOrder(currentOrder);
|
||||||
for (MtbColt mtbColt : mtbColts) {
|
|
||||||
mtbColt.getMtbColr().get(0)
|
|
||||||
.setDescrizione(currentOrder.getDescrizioneProd())
|
|
||||||
.setUntMis(currentOrder.getUntOrd());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.mtbColtsOfOrder.postValue(mtbColts);
|
for (MtbColr mtbColr : mtbColrs) {
|
||||||
//this.sendOnLoadingEnded();
|
mtbColr
|
||||||
}, this::sendError);
|
.setDescrizione(currentOrder.getDescrizioneProd())
|
||||||
|
.setUntMis(currentOrder.getUntOrd());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mtbColrsOfOrder.postValue(mtbColrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,89 +121,100 @@ public class ProdRientroMerceOrderDetailViewModel {
|
|||||||
public void createLU(ProdRientroMerceOrderDetailPickedQuantityDTO pickedQuantityDTO) {
|
public void createLU(ProdRientroMerceOrderDetailPickedQuantityDTO pickedQuantityDTO) {
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
executorService.execute(() -> {
|
||||||
ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO =
|
try {
|
||||||
new ImportColliDaProduzioneRequestDTO()
|
|
||||||
.setColliBancale(pickedQuantityDTO.getNumCnf().intValue())
|
|
||||||
.setQtaCnf(pickedQuantityDTO.getQtaCnf())
|
|
||||||
.setQtaCol(pickedQuantityDTO.getQtaCol())
|
|
||||||
.setCodJcom(currentOrder.getCodJcom())
|
|
||||||
.setCodJfas(pickedQuantityDTO.getCodJfas())
|
|
||||||
.setCodMart(currentOrder.getCodProd())
|
|
||||||
.setCodTcol(pickedQuantityDTO.getMtbTCol() != null ? pickedQuantityDTO.getMtbTCol().getCodTcol() : null)
|
|
||||||
.setDataCollo(LocalDate.now())
|
|
||||||
.setDataOrd(currentOrder.getDataOrd())
|
|
||||||
.setNumOrd(currentOrder.getNumOrd())
|
|
||||||
.setGestione(currentOrder.getGestione())
|
|
||||||
.setPartitaMag(currentOrder.getPartitaMag())
|
|
||||||
.setFornitore(currentOrder.getRagSocAnag())
|
|
||||||
.setPesoLordo(pickedQuantityDTO.getPesoLordo())
|
|
||||||
.setPesoNetto(pickedQuantityDTO.getPesoNetto())
|
|
||||||
.setAutoGeneraVendita(false);
|
|
||||||
|
|
||||||
this.prodRientroMerceOrderDetailRESTConsumer.importColliDaProduzione(importColliDaProduzioneRequestDTO, mtbColtSaved -> {
|
|
||||||
|
|
||||||
if (SettingsManager.iDB().isProduzioneGeneraDocCar() || SettingsManager.iDB().isProduzioneGeneraDocScar()) {
|
|
||||||
|
|
||||||
CaricoProdFinDTO caricoProdFinDTO = new CaricoProdFinDTO()
|
|
||||||
.setEscludiArticoliGestitiDaWmsInScarico(true)
|
|
||||||
.setGestione(currentOrder.getGestione())
|
|
||||||
.setNumOrd(currentOrder.getNumOrd())
|
|
||||||
.setDataOrd(currentOrder.getDataOrd())
|
|
||||||
.setCodJfas(pickedQuantityDTO.getCodJfas())
|
|
||||||
.setCodAnag(currentOrder.getCodAnag())
|
|
||||||
.setCodMdep(currentOrder.getCodMdep())
|
|
||||||
.setPreparatoDa(SettingsManager.i().getUser().getFullname())
|
|
||||||
.setEffettuaCaricoProdotto(SettingsManager.iDB().isProduzioneGeneraDocCar())
|
|
||||||
.setCreaCaricoDaCollo(true)
|
|
||||||
.setCodDtipCar(SettingsManager.iDB().getProduzioneCodDtipCar())
|
|
||||||
.setEffettuaScaricoMateriali(SettingsManager.iDB().isProduzioneGeneraDocScar())
|
|
||||||
.setCodDtipScar(SettingsManager.iDB().getProduzioneCodDtipScar());
|
|
||||||
|
|
||||||
caricoProdFinDTO.getProdotti().getRow()
|
|
||||||
.add(new CaricoProdFinProdottoDTO()
|
|
||||||
.setQtaProdAna(pickedQuantityDTO.getQtaCol()));
|
|
||||||
|
|
||||||
|
|
||||||
produzioneRESTConsumer.caricoProdFin(caricoProdFinDTO, () -> {
|
ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO =
|
||||||
|
new ImportColliDaProduzioneRequestDTO()
|
||||||
|
.setColliBancale(pickedQuantityDTO.getNumCnf().intValue())
|
||||||
|
.setQtaCnf(pickedQuantityDTO.getQtaCnf())
|
||||||
|
.setQtaCol(pickedQuantityDTO.getQtaCol())
|
||||||
|
.setCodJcom(currentOrder.getCodJcom())
|
||||||
|
.setCodJfas(pickedQuantityDTO.getCodJfas())
|
||||||
|
.setCodMart(currentOrder.getCodProd())
|
||||||
|
.setCodTcol(pickedQuantityDTO.getMtbTCol() != null ? pickedQuantityDTO.getMtbTCol().getCodTcol() : null)
|
||||||
|
.setDataCollo(LocalDate.now())
|
||||||
|
.setDataOrd(currentOrder.getDataOrd())
|
||||||
|
.setNumOrd(currentOrder.getNumOrd())
|
||||||
|
.setGestione(currentOrder.getGestione())
|
||||||
|
.setPartitaMag(currentOrder.getPartitaMag())
|
||||||
|
.setFornitore(currentOrder.getRagSocAnag())
|
||||||
|
.setPesoLordo(pickedQuantityDTO.getPesoLordo())
|
||||||
|
.setPesoNetto(pickedQuantityDTO.getPesoNetto())
|
||||||
|
.setAutoGeneraVendita(false);
|
||||||
|
|
||||||
|
var mtbColtSaved = this.prodRientroMerceOrderDetailRESTConsumer.makeSynchronousImportColliDaProduzione(importColliDaProduzioneRequestDTO);
|
||||||
|
|
||||||
|
|
||||||
|
if (SettingsManager.iDB().isProduzioneGeneraDocCar() || SettingsManager.iDB().isProduzioneGeneraDocScar()) {
|
||||||
|
|
||||||
|
CaricoProdFinDTO caricoProdFinDTO = new CaricoProdFinDTO()
|
||||||
|
.setEscludiArticoliGestitiDaWmsInScarico(true)
|
||||||
|
.setGestione(currentOrder.getGestione())
|
||||||
|
.setNumOrd(currentOrder.getNumOrd())
|
||||||
|
.setDataOrd(currentOrder.getDataOrd())
|
||||||
|
.setCodJfas(pickedQuantityDTO.getCodJfas())
|
||||||
|
.setCodAnag(currentOrder.getCodAnag())
|
||||||
|
.setCodMdep(currentOrder.getCodMdep())
|
||||||
|
.setPreparatoDa(SettingsManager.i().getUser().getFullname())
|
||||||
|
.setEffettuaCaricoProdotto(SettingsManager.iDB().isProduzioneGeneraDocCar())
|
||||||
|
.setCreaCaricoDaCollo(true)
|
||||||
|
.setCodDtipCar(SettingsManager.iDB().getProduzioneCodDtipCar())
|
||||||
|
.setEffettuaScaricoMateriali(SettingsManager.iDB().isProduzioneGeneraDocScar())
|
||||||
|
.setCodDtipScar(SettingsManager.iDB().getProduzioneCodDtipScar());
|
||||||
|
|
||||||
|
caricoProdFinDTO.getProdotti().getRow()
|
||||||
|
.add(new CaricoProdFinProdottoDTO()
|
||||||
|
.setQtaProdAna(pickedQuantityDTO.getQtaCol()));
|
||||||
|
|
||||||
|
|
||||||
|
produzioneRESTConsumer.makeSynchronousCaricoProdFin(caricoProdFinDTO);
|
||||||
|
|
||||||
synchronized (this.mtbColtsOfOrder) {
|
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
this.mListener.onDataSaved(mtbColtSaved);
|
|
||||||
}
|
|
||||||
|
|
||||||
}, this::sendError);
|
|
||||||
} else {
|
|
||||||
synchronized (this.mtbColtsOfOrder) {
|
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
this.mListener.onDataSaved(mtbColtSaved);
|
|
||||||
}
|
}
|
||||||
|
synchronized (this.mtbColrsOfOrder) {
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
this.mListener.onDataSaved(mtbColtSaved.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.sendError(e);
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void deleteLU(MtbColt mtbColt) {
|
public void deleteCarico(MtbColr mtbColtToDelete) {
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
|
|
||||||
this.prodRientroMerceOrderDetailRESTConsumer.deleteColloDaProduzione(mtbColt, () -> {
|
executorService.execute(() -> {
|
||||||
synchronized (this.mtbColtsOfOrder) {
|
|
||||||
Optional<MtbColt> mtbColtToRemove = Objects.requireNonNull(this.mtbColtsOfOrder.getValue()).stream()
|
this.sendOnLoadingStarted();
|
||||||
.filter(x -> x.getNumCollo().equals(mtbColt.getNumCollo()) &&
|
|
||||||
x.getSerCollo().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
try {
|
||||||
x.getDataColloD().compareTo(mtbColt.getDataColloD()) == 0 &&
|
this.prodRientroMerceOrderDetailRESTConsumer.deleteCaricoDaProduzione(mtbColtToDelete);
|
||||||
x.getGestione().equalsIgnoreCase(mtbColt.getGestione()))
|
} catch (Exception e) {
|
||||||
|
this.sendError(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
synchronized (this.mtbColrsOfOrder) {
|
||||||
|
Optional<MtbColr> mtbColtToRemove = Objects.requireNonNull(this.mtbColrsOfOrder.getValue()).stream()
|
||||||
|
.filter(x -> x.getNumCollo().equals(mtbColtToDelete.getNumCollo()) &&
|
||||||
|
x.getSerCollo().equalsIgnoreCase(mtbColtToDelete.getSerCollo()) &&
|
||||||
|
x.getDataColloD().compareTo(mtbColtToDelete.getDataColloD()) == 0 &&
|
||||||
|
x.getGestione().equalsIgnoreCase(mtbColtToDelete.getGestione()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (mtbColtToRemove.isPresent()) {
|
if (mtbColtToRemove.isPresent()) {
|
||||||
this.mtbColtsOfOrder.getValue().remove(mtbColtToRemove.get());
|
this.mtbColrsOfOrder.getValue().remove(mtbColtToRemove.get());
|
||||||
this.mtbColtsOfOrder.postValue(this.mtbColtsOfOrder.getValue());
|
this.mtbColrsOfOrder.postValue(this.mtbColrsOfOrder.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
}, this::sendError);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setListener(Listener listener) {
|
public void setListener(Listener listener) {
|
||||||
@@ -221,34 +234,32 @@ public class ProdRientroMerceOrderDetailViewModel {
|
|||||||
if (this.mListener != null) mListener.onError(ex);
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printSavedMtbColt(PrintUlDTO result) {
|
public void printSavedMtbColt(PrintUlDTO result) throws Exception {
|
||||||
if (result.isFlagPrintProductionLabel()) {
|
if (result.isFlagPrintProductionLabel()) {
|
||||||
this.startPrint(result.getMtbColt(), ReportType.ETICHETTA_SSCC_LAVORAZIONE, currentOrder.getCodAnag());
|
this.printUl(result.getMtbColt().getMtbColr().get(0), ReportType.ETICHETTA_SSCC_LAVORAZIONE, currentOrder.getCodAnag());
|
||||||
} else {
|
} else {
|
||||||
this.loadShipmentUlFromProductionUL(result.getMtbColt(), mtbColt -> {
|
var mtbColr = this.loadShipmentUlFromProductionUL(result.getMtbColt().getMtbColr().get(0));
|
||||||
this.startPrint(mtbColt, ReportType.ETICHETTA_SSCC_SPEDIZIONE, mtbColt.getCodAnag());
|
this.printUl(mtbColr, ReportType.ETICHETTA_SSCC_SPEDIZIONE, result.getMtbColt().getCodAnag());
|
||||||
}, this::sendError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadShipmentUlFromProductionUL(MtbColt productionUL, RunnableArgs<MtbColt> onLoad, RunnableArgs<Exception> onError) {
|
private MtbColr loadShipmentUlFromProductionUL(MtbColr productionUdcRow) throws Exception {
|
||||||
this.colliMagazzinoRESTConsumer.loadShipmentUlFromProductionUL(productionUL, onLoad, onError);
|
return this.colliMagazzinoRESTConsumer.makeSynchronousRetrieveShipmentUlFromProductionUlRequest(productionUdcRow.getBarcodeUlIn());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startPrint(MtbColt mtbColt, ReportType reportType, String codAnag) {
|
private void printUl(MtbColr mtbColr, ReportType reportType, String codAnag) throws Exception {
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
HashMap<String, Object> params = new HashMap<>() {{
|
||||||
params.put("gestione", mtbColt.getGestione());
|
put("gestione", mtbColr.getGestione());
|
||||||
params.put("ser_collo", mtbColt.getSerCollo());
|
put("ser_collo", mtbColr.getSerCollo());
|
||||||
params.put("num_collo", mtbColt.getNumCollo());
|
put("num_collo", mtbColr.getNumCollo());
|
||||||
params.put("data_collo", UtilityDate.formatDate(mtbColt.getDataColloD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH));
|
put("data_collo", UtilityDate.formatDate(mtbColr.getDataColloD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH));
|
||||||
this.printerRESTConsumer.printReportType(
|
}};
|
||||||
|
|
||||||
|
this.printerRESTConsumer.makeSynchronousPrintReportTypeRequest(
|
||||||
reportType,
|
reportType,
|
||||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||||
codAnag,
|
codAnag,
|
||||||
params,
|
params);
|
||||||
this::refreshMtbColts,
|
|
||||||
this::sendError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Listener extends ILoadingListener {
|
public interface Listener extends ILoadingListener {
|
||||||
|
|||||||
@@ -1,34 +1,24 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest;
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.DeleteCaricoDaProduzioneRequestDTO;
|
||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
||||||
@@ -43,7 +33,7 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getMtbColtsOfOrder(OrdineLavorazioneDTO ordineLavorazioneDTO, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public List<MtbColr> makeSynchronousRetrieveULOfOrder(OrdineLavorazioneDTO ordineLavorazioneDTO) throws Exception {
|
||||||
|
|
||||||
String sql = "SELECT mtb_colr.* " +
|
String sql = "SELECT mtb_colr.* " +
|
||||||
" FROM mtb_colr " +
|
" FROM mtb_colr " +
|
||||||
@@ -57,99 +47,39 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColr>>() {
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColr>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
systemRESTConsumer.<List<MtbColr>>processSql(sql, typeOfObjectsList, mtbColrList -> {
|
var mtbColrList = systemRESTConsumer.<List<MtbColr>>processSqlSynchronized(sql, typeOfObjectsList);
|
||||||
|
return mtbColrList;
|
||||||
|
|
||||||
if (mtbColrList != null && !mtbColrList.isEmpty()) {
|
|
||||||
|
|
||||||
List<HashMap<String, Object>> params = new ArrayList<>();
|
|
||||||
|
|
||||||
for (MtbColr mtbcolr :
|
|
||||||
mtbColrList) {
|
|
||||||
HashMap<String, Object> parm = new HashMap<>();
|
|
||||||
|
|
||||||
parm.put("data_collo", mtbcolr.getDataColloD());
|
|
||||||
parm.put("gestione", mtbcolr.getGestione());
|
|
||||||
parm.put("ser_collo", mtbcolr.getSerCollo());
|
|
||||||
parm.put("num_collo", mtbcolr.getNumCollo());
|
|
||||||
|
|
||||||
params.add(parm);
|
|
||||||
}
|
|
||||||
|
|
||||||
String mtbColtSql = "SELECT * FROM mtb_colt WHERE " + UtilityQuery.concatFieldListInWhereCond(params) + "";
|
|
||||||
|
|
||||||
|
|
||||||
Type mtbColtTypeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
|
||||||
}.getType();
|
|
||||||
systemRESTConsumer.<List<MtbColt>>processSql(mtbColtSql, mtbColtTypeOfObjectsList, mtbColtList -> {
|
|
||||||
|
|
||||||
if (mtbColtList == null) mtbColtList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (MtbColt mtbColt : mtbColtList) {
|
|
||||||
|
|
||||||
ObservableArrayList<MtbColr> mtbColrsRoAdd = new ObservableArrayList<>();
|
|
||||||
mtbColrsRoAdd.addAll(Stream.of(mtbColrList)
|
|
||||||
.filter(x -> x.getNumCollo().equals(mtbColt.getNumCollo()) &&
|
|
||||||
x.getDataColloD().compareTo(mtbColt.getDataColloD()) == 0 &&
|
|
||||||
x.getGestione().equals(mtbColt.getGestione()) &&
|
|
||||||
x.getSerCollo().equals(mtbColt.getSerCollo()))
|
|
||||||
.toList());
|
|
||||||
|
|
||||||
mtbColt.setMtbColr(mtbColrsRoAdd);
|
|
||||||
}
|
|
||||||
|
|
||||||
onComplete.run(mtbColtList);
|
|
||||||
|
|
||||||
}, onFailed);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
onComplete.run(new ArrayList<>());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void importColliDaProduzione(ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public List<MtbColt> makeSynchronousImportColliDaProduzione(ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO) throws Exception {
|
||||||
|
|
||||||
ProdRientroMerceOrderDetailRESTConsumerService service = restBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
ProdRientroMerceOrderDetailRESTConsumerService service = restBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
||||||
service.importColliDaProduzione(Collections.singletonList(importColliDaProduzioneRequestDTO))
|
var response = service.importColliDaProduzione(Collections.singletonList(importColliDaProduzioneRequestDTO))
|
||||||
.enqueue(new ManagedErrorCallback<>() {
|
.execute();
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
|
||||||
analyzeAnswerList(response, "importColliDaProduzione", mtbColt -> {
|
|
||||||
onComplete.run(mtbColt.get(0));
|
|
||||||
}, ex -> {
|
|
||||||
if (onFailed != null) onFailed.run(ex);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var data = analyzeAnswerList(response, "importColliDaProduzione");
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, @NonNull final Exception e) {
|
return data != null ? data : new ArrayList<>();
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void deleteColloDaProduzione(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void deleteCaricoDaProduzione(MtbColr mtbColrToDelete) throws Exception {
|
||||||
ProdRientroMerceOrderDetailRESTConsumerService service = restBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
|
||||||
service.deleteColloDaProduzione(mtbColtToDelete).enqueue(new ManagedErrorCallback<>() {
|
DeleteCaricoDaProduzioneRequestDTO deleteCaricoDaProduzioneRequestDTO = new DeleteCaricoDaProduzioneRequestDTO()
|
||||||
@Override
|
.setBarcodeUl(mtbColrToDelete.getBarcodeUlIn())
|
||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
.setCodMart(mtbColrToDelete.getCodMart())
|
||||||
analyzeAnswer(response, "deleteColloDaProduzione", mtbColt -> {
|
.setPartitaMag(mtbColrToDelete.getPartitaMag())
|
||||||
onComplete.run();
|
.setCodJcom(mtbColrToDelete.getCodJcom())
|
||||||
}, ex -> {
|
.setCodCol(mtbColrToDelete.getCodCol())
|
||||||
if (onFailed != null) onFailed.run(ex);
|
.setCodTagl(mtbColrToDelete.getCodTagl());
|
||||||
});
|
|
||||||
}
|
ProdRientroMerceOrderDetailRESTConsumerService service = restBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
||||||
|
var response = service.deleteCaricoDaProduzione(deleteCaricoDaProduzioneRequestDTO)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
analyzeAnswer(response, "deleteCaricoDaProduzione");
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, @NonNull final Exception e) {
|
|
||||||
onFailed.run(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.DeleteCaricoDaProduzioneRequestDTO;
|
||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
@@ -15,7 +16,7 @@ public interface ProdRientroMerceOrderDetailRESTConsumerService {
|
|||||||
@POST("importColliDaProduzioneJson")
|
@POST("importColliDaProduzioneJson")
|
||||||
Call<ServiceRESTResponse<MtbColt>> importColliDaProduzione(@Body List<ImportColliDaProduzioneRequestDTO> importColliDaProduzioneRequestDTO);
|
Call<ServiceRESTResponse<MtbColt>> importColliDaProduzione(@Body List<ImportColliDaProduzioneRequestDTO> importColliDaProduzioneRequestDTO);
|
||||||
|
|
||||||
@POST("cancellaColloDaProduzione")
|
@POST("cancellaCaricoDaProduzione")
|
||||||
Call<ServiceRESTResponse<Object>> deleteColloDaProduzione(@Body MtbColt mtbColtToDelete);
|
Call<ServiceRESTResponse<Object>> deleteCaricoDaProduzione(@Body DeleteCaricoDaProduzioneRequestDTO caricoToDeleteRequestDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class DeleteCaricoDaProduzioneRequestDTO {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("barcodeUl")
|
||||||
|
private String barcodeUl;
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("codJcom")
|
||||||
|
private String codJcom;
|
||||||
|
|
||||||
|
@SerializedName("codCol")
|
||||||
|
private String codCol;
|
||||||
|
|
||||||
|
@SerializedName("codTagl")
|
||||||
|
private String codTagl;
|
||||||
|
|
||||||
|
public String getBarcodeUl() {
|
||||||
|
return barcodeUl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteCaricoDaProduzioneRequestDTO setBarcodeUl(String barcodeUl) {
|
||||||
|
this.barcodeUl = barcodeUl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteCaricoDaProduzioneRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteCaricoDaProduzioneRequestDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteCaricoDaProduzioneRequestDTO setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodCol() {
|
||||||
|
return codCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteCaricoDaProduzioneRequestDTO setCodCol(String codCol) {
|
||||||
|
this.codCol = codCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTagl() {
|
||||||
|
return codTagl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteCaricoDaProduzioneRequestDTO setCodTagl(String codTagl) {
|
||||||
|
this.codTagl = codTagl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,31 +1,69 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto;
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
public class ImportColliDaProduzioneRequestDTO {
|
public class ImportColliDaProduzioneRequestDTO {
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
|
@SerializedName("codJcom")
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
|
@SerializedName("partitaMag")
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
|
||||||
|
@SerializedName("pesoLordo")
|
||||||
private BigDecimal pesoLordo;
|
private BigDecimal pesoLordo;
|
||||||
|
|
||||||
|
@SerializedName("pesoNetto")
|
||||||
private BigDecimal pesoNetto;
|
private BigDecimal pesoNetto;
|
||||||
|
|
||||||
|
@SerializedName("codTcol")
|
||||||
private String codTcol;
|
private String codTcol;
|
||||||
private String fornitore;
|
private String fornitore;
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("colliBancale")
|
||||||
private int colliBancale;
|
private int colliBancale;
|
||||||
|
|
||||||
|
@SerializedName("qtaCnf")
|
||||||
private BigDecimal qtaCnf;
|
private BigDecimal qtaCnf;
|
||||||
|
|
||||||
|
@SerializedName("dataCollo")
|
||||||
private LocalDate dataCollo;
|
private LocalDate dataCollo;
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("dataOrd")
|
||||||
private LocalDate dataOrd;
|
private LocalDate dataOrd;
|
||||||
|
|
||||||
|
@SerializedName("numOrd")
|
||||||
private int numOrd;
|
private int numOrd;
|
||||||
|
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
|
||||||
|
@SerializedName("gestione")
|
||||||
private String gestione;
|
private String gestione;
|
||||||
|
|
||||||
|
@SerializedName("qtaCol")
|
||||||
private BigDecimal qtaCol;
|
private BigDecimal qtaCol;
|
||||||
|
|
||||||
|
@SerializedName("rigaOrd")
|
||||||
private Integer rigaOrd;
|
private Integer rigaOrd;
|
||||||
|
|
||||||
|
@SerializedName("numRisorse")
|
||||||
private Integer numRisorse;
|
private Integer numRisorse;
|
||||||
|
|
||||||
|
@SerializedName("annotazioni")
|
||||||
private String annotazioni;
|
private String annotazioni;
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("autoGeneraVendita")
|
||||||
private boolean autoGeneraVendita;
|
private boolean autoGeneraVendita;
|
||||||
|
|
||||||
public String getCodMart() {
|
public String getCodMart() {
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
.setPartitaMag(partitaMag)
|
.setPartitaMag(partitaMag)
|
||||||
.setDataScadPartita(dataScad)
|
.setDataScadPartita(dataScad)
|
||||||
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
.setDatetimeRow(UtilityDate.getNowTime())
|
||||||
.setCausale(MtbColr.Causale.RETTIFICA)
|
.setCausale(MtbColr.Causale.RETTIFICA)
|
||||||
.setUtente(mCurrentUser);
|
.setUtente(mCurrentUser);
|
||||||
|
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ public class VersamentoMerceViewModel {
|
|||||||
.setQtaCol(pickedQuantity.getQtaTot())
|
.setQtaCol(pickedQuantity.getQtaTot())
|
||||||
.setQtaCnf(pickedQuantity.getQtaCnf())
|
.setQtaCnf(pickedQuantity.getQtaCnf())
|
||||||
.setNumCnf(pickedQuantity.getNumCnf())
|
.setNumCnf(pickedQuantity.getNumCnf())
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
.setDatetimeRow(UtilityDate.getNowTime());
|
||||||
|
|
||||||
onComplete.run(mtbColr);
|
onComplete.run(mtbColr);
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import android.content.res.ColorStateList;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Html;
|
import android.os.Handler;
|
||||||
import android.text.SpannableString;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -16,7 +15,6 @@ import android.widget.Toast;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.fragment.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
|
||||||
@@ -43,7 +41,6 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
|||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||||
import it.integry.integrywmsnative.databinding.DialogInputLuProdBinding;
|
import it.integry.integrywmsnative.databinding.DialogInputLuProdBinding;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLULineeProdAdapter;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLULineeProdAdapter;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLULineeProdListModel;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLULineeProdListModel;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLUProdTipoColloAdapter;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLUProdTipoColloAdapter;
|
||||||
@@ -54,6 +51,9 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
|||||||
@Inject
|
@Inject
|
||||||
DialogInputLUProdViewModel mViewModel;
|
DialogInputLUProdViewModel mViewModel;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
Handler handler;
|
||||||
|
|
||||||
private final SimpleBluetoothDeviceInterface mBluetoothDeviceInterface;
|
private final SimpleBluetoothDeviceInterface mBluetoothDeviceInterface;
|
||||||
private final DialogInputLUProdDTO mDialogInputLUProdDTO;
|
private final DialogInputLUProdDTO mDialogInputLUProdDTO;
|
||||||
private final RunnableArgs<DialogInputLUProdResultDTO> mOnComplete;
|
private final RunnableArgs<DialogInputLUProdResultDTO> mOnComplete;
|
||||||
@@ -116,7 +116,7 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_input_lu_prod, container, false);
|
mBindings = DialogInputLuProdBinding.inflate(inflater, container, false);
|
||||||
mBindings.setLifecycleOwner(this);
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
mBindings.toolbar.setTitle("Creazione pedana");
|
mBindings.toolbar.setTitle("Creazione pedana");
|
||||||
@@ -439,25 +439,20 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDataChanged() {
|
public void onDataChanged() {
|
||||||
this.mEnableDataCallback = false;
|
handler.post(() -> {
|
||||||
|
|
||||||
this.currentNumCnf.set(this.mViewModel.getNumCnf());
|
this.mEnableDataCallback = false;
|
||||||
this.currentPesoCollo.set(this.mViewModel.getPesoCollo());
|
|
||||||
this.currentPesoNetto.set(this.mViewModel.getPesoNetto());
|
|
||||||
this.currentTaraPed.set(this.mViewModel.getTaraPed());
|
|
||||||
this.currentTaraCol.set(this.mViewModel.getTaraCol());
|
|
||||||
this.currentPesoLordo.set(this.mViewModel.getPesoLordo());
|
|
||||||
|
|
||||||
this.mBindings.executePendingBindings();
|
this.currentNumCnf.set(this.mViewModel.getNumCnf());
|
||||||
|
this.currentPesoCollo.set(this.mViewModel.getPesoCollo());
|
||||||
|
this.currentPesoNetto.set(this.mViewModel.getPesoNetto());
|
||||||
|
this.currentTaraPed.set(this.mViewModel.getTaraPed());
|
||||||
|
this.currentTaraCol.set(this.mViewModel.getTaraCol());
|
||||||
|
this.currentPesoLordo.set(this.mViewModel.getPesoLordo());
|
||||||
|
|
||||||
this.mEnableDataCallback = true;
|
this.mBindings.executePendingBindings();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
this.mEnableDataCallback = true;
|
||||||
public void onError(Exception ex) {
|
});
|
||||||
this.onLoadingEnded();
|
|
||||||
DialogSimpleMessageView
|
|
||||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
|
||||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,24 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.printSsccUl;
|
package it.integry.integrywmsnative.view.dialogs.printSsccUl;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.DialogPrintUlSsccBinding;
|
import it.integry.integrywmsnative.databinding.DialogPrintUlSsccBinding;
|
||||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.dto.PrintUlDTO;
|
import it.integry.integrywmsnative.view.dialogs.printSsccUl.dto.PrintUlDTO;
|
||||||
@@ -47,26 +46,33 @@ public class DialogPrintUlSSCCView extends BaseDialogFragment {
|
|||||||
.setMtbColt(mtbColt)
|
.setMtbColt(mtbColt)
|
||||||
.setFlagPrintShipmentLabel(!UtilityString.isNullOrEmpty(codJcom))
|
.setFlagPrintShipmentLabel(!UtilityString.isNullOrEmpty(codJcom))
|
||||||
.setFlagPrintProductionLabel(UtilityString.isNullOrEmpty(codJcom));
|
.setFlagPrintProductionLabel(UtilityString.isNullOrEmpty(codJcom));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
||||||
this.mContext = getActivity();
|
|
||||||
|
|
||||||
mBindings = DialogPrintUlSsccBinding.inflate(inflater, container, false);
|
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
.dialogPrintUlSSCCComponent()
|
.dialogPrintUlSSCCComponent()
|
||||||
.create();
|
.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
|
mBindings = DialogPrintUlSsccBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
mBindings.setView(this);
|
mBindings.setView(this);
|
||||||
setCancelable(true);
|
|
||||||
getDialog().setCanceledOnTouchOutside(true);
|
|
||||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
|
|
||||||
return mBindings.getRoot();
|
setCancelable(true);
|
||||||
|
|
||||||
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
|
.setView(mBindings.getRoot())
|
||||||
|
.setCancelable(isCancelable())
|
||||||
|
.setPositiveButton(R.string.confirm, (dialog, which) -> onPositiveClick())
|
||||||
|
.setNegativeButton(R.string.abort, (dialog, which) -> onNegativeClick())
|
||||||
|
.create();
|
||||||
|
|
||||||
|
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||||
|
alertDialog.setOnShowListener(this);
|
||||||
|
alertDialog.setOnDismissListener(this);
|
||||||
|
|
||||||
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCheckChange(RadioGroup radioGroup, int id) {
|
public void onCheckChange(RadioGroup radioGroup, int id) {
|
||||||
@@ -76,13 +82,18 @@ public class DialogPrintUlSSCCView extends BaseDialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onPositiveClick() {
|
public void onPositiveClick() {
|
||||||
this.dismiss();
|
// this.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onNegativeClick() {
|
public void onNegativeClick() {
|
||||||
this.printUlDTO.setFlagPrintProductionLabel(false);
|
this.printUlDTO.setFlagPrintProductionLabel(false);
|
||||||
this.printUlDTO.setFlagPrintShipmentLabel(false);
|
this.printUlDTO.setFlagPrintShipmentLabel(false);
|
||||||
this.dismiss();
|
// this.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dismiss() {
|
||||||
|
if(getDialog() != null) getDialog().dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -107,10 +118,4 @@ public class DialogPrintUlSSCCView extends BaseDialogFragment {
|
|||||||
super.onStart();
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(this.mContext, ex);
|
|
||||||
dismiss();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,22 +324,21 @@
|
|||||||
android:weightSum="1">
|
android:weightSum="1">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<Button
|
||||||
android:id="@+id/abort_btn"
|
android:id="@+id/abort_btn"
|
||||||
style="@style/Button.DangerFull"
|
style="@style/Button.DangerOutline"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:onClick="@{() -> view.dismiss()}"
|
android:onClick="@{() -> view.dismiss()}"
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:text="@string/abort"
|
android:text="@string/abort"
|
||||||
app:icon="@drawable/ic_close_24dp"
|
app:icon="@drawable/ic_close_24dp"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<Button
|
||||||
android:id="@+id/save_btn"
|
android:id="@+id/save_btn"
|
||||||
style="@style/Button.PrimaryFull"
|
style="@style/Button.PrimaryFull"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -347,7 +346,6 @@
|
|||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:onClick="@{() -> view.save()}"
|
android:onClick="@{() -> view.save()}"
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:text="@string/confirm"
|
android:text="@string/confirm"
|
||||||
app:icon="@drawable/ic_save_24"
|
app:icon="@drawable/ic_save_24"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
|
|||||||
@@ -12,110 +12,93 @@
|
|||||||
type="it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView" />
|
type="it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
app:cardCornerRadius="16dp"
|
||||||
app:cardBackgroundColor="@android:color/transparent"
|
|
||||||
app:cardCornerRadius="24dp"
|
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<LinearLayout
|
||||||
android:id="@+id/base"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
||||||
android:layout_gravity="center_horizontal"
|
android:paddingHorizontal="16dp"
|
||||||
android:orientation="vertical"
|
android:paddingVertical="16dp">
|
||||||
app:cardBackgroundColor="@color/light_blue_300"
|
|
||||||
app:cardCornerRadius="24dp"
|
|
||||||
app:cardElevation="0dp">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="4dp"
|
android:text="@string/action_close_order"
|
||||||
android:background="@drawable/dialog_card_child_bg"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:padding="24dp">
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/description_text"
|
||||||
|
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:text="@string/message_print_SSCC_list_on_close_order" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<RadioGroup
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/radioGroup"
|
||||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginTop="8dp"
|
||||||
android:gravity="center_horizontal"
|
android:onCheckedChanged="@{view::onCheckChange}">
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:text="@string/action_close_order" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<RadioButton
|
||||||
android:id="@+id/description_text"
|
android:id="@+id/print_shipping_label"
|
||||||
style="@style/TextViewMaterial"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:gravity="left"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_text"
|
|
||||||
android:text="@string/message_print_SSCC_list_on_close_order" />
|
|
||||||
|
|
||||||
<RadioGroup
|
|
||||||
android:id="@+id/radioGroup"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:onCheckedChanged="@{view::onCheckChange}"
|
android:text="@string/action_print_shipping_SSCC" />
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/description_text">
|
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/print_shipping_label"
|
android:id="@+id/print_production_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="@string/action_print_shipping_SSCC" />
|
android:text="@string/action_print_production_SSCC" />
|
||||||
|
</RadioGroup>
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/print_production_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/action_print_production_SSCC" />
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<!-- <com.google.android.material.button.MaterialButton-->
|
||||||
android:id="@+id/buttonPositive"
|
<!-- android:id="@+id/buttonPositive"-->
|
||||||
style="?attr/materialButtonOutlinedStyle"
|
<!-- style="?attr/materialButtonOutlinedStyle"-->
|
||||||
android:layout_marginTop="12dp"
|
<!-- android:layout_width="0dp"-->
|
||||||
android:layout_width="0dp"
|
<!-- android:layout_height="wrap_content"-->
|
||||||
android:layout_height="wrap_content"
|
<!-- android:layout_marginTop="12dp"-->
|
||||||
android:onClick="@{() -> view.onPositiveClick()}"
|
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||||
android:text="@string/confirm"
|
<!-- android:text="@string/confirm"-->
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
app:layout_constraintTop_toBottomOf="@id/radioGroup" />
|
<!-- app:layout_constraintTop_toBottomOf="@id/radioGroup" />-->
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<!-- <com.google.android.material.button.MaterialButton-->
|
||||||
android:id="@+id/buttonNegative"
|
<!-- android:id="@+id/buttonNegative"-->
|
||||||
style="@style/Button.DangerOutline"
|
<!-- style="@style/Button.DangerOutline"-->
|
||||||
android:layout_marginTop="12dp"
|
<!-- android:layout_width="0dp"-->
|
||||||
android:layout_width="0dp"
|
<!-- android:layout_height="wrap_content"-->
|
||||||
android:layout_height="wrap_content"
|
<!-- android:layout_marginStart="12dp"-->
|
||||||
android:onClick="@{() -> view.onNegativeClick()}"
|
<!-- android:layout_marginTop="12dp"-->
|
||||||
android:text="@string/abort"
|
<!-- android:layout_marginEnd="12dp"-->
|
||||||
android:layout_marginEnd="12dp"
|
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||||
android:layout_marginStart="12dp"
|
<!-- android:text="@string/abort"-->
|
||||||
app:layout_constraintTop_toBottomOf="@id/radioGroup"
|
<!-- app:layout_constraintEnd_toStartOf="@id/buttonPositive"-->
|
||||||
app:layout_constraintEnd_toStartOf="@id/buttonPositive"
|
<!-- app:layout_constraintTop_toBottomOf="@id/radioGroup"-->
|
||||||
|
|
||||||
/>
|
<!-- />-->
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@@ -726,7 +726,7 @@
|
|||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<Button
|
||||||
style="@style/Button.PrimaryOutline"
|
style="@style/Button.PrimaryOutline"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -734,7 +734,7 @@
|
|||||||
app:icon="@drawable/ic_add_24dp"
|
app:icon="@drawable/ic_add_24dp"
|
||||||
app:singleClick="@{() -> view.addULButtonClick()}" />
|
app:singleClick="@{() -> view.addULButtonClick()}" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<Button
|
||||||
style="@style/Button.PrimaryOutline"
|
style="@style/Button.PrimaryOutline"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.model.MtbColt" />
|
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||||
@@ -14,8 +12,8 @@
|
|||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="mtbColt"
|
name="mtbColr"
|
||||||
type="MtbColt" />
|
type="it.integry.integrywmsnative.core.model.MtbColr" />
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
@@ -54,7 +52,7 @@
|
|||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingRight="6dp"
|
android:paddingRight="6dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@{mtbColt.numCollo.toString()}"
|
android:text="@{mtbColr.numCollo.toString()}"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="22222" />
|
tools:text="22222" />
|
||||||
@@ -68,7 +66,7 @@
|
|||||||
android:paddingTop="0dp"
|
android:paddingTop="0dp"
|
||||||
android:paddingRight="6dp"
|
android:paddingRight="6dp"
|
||||||
android:paddingBottom="0dp"
|
android:paddingBottom="0dp"
|
||||||
android:text="@{mtbColt.mtbColr.get(0).numCnf.intValue() + ` col`}"
|
android:text="@{mtbColr.numCnf.intValue() + ` col`}"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="45 col" />
|
tools:text="45 col" />
|
||||||
|
|
||||||
@@ -94,7 +92,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_toStartOf="@id/peso_lordo_collo"
|
android:layout_toStartOf="@id/peso_lordo_collo"
|
||||||
android:text="@{mtbColt.getDataColloHumanLong()}"
|
app:localDateText="@{mtbColr.dataColloLD}"
|
||||||
|
app:dateFormat="@{UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN_LONG}"
|
||||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
@@ -106,10 +105,11 @@
|
|||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_toEndOf="@id/peso_lordo_collo"
|
android:layout_toEndOf="@id/peso_lordo_collo"
|
||||||
android:text="@{mtbColt.timeVers}"
|
app:localDateTimeText="@{mtbColr.datetimeRow}"
|
||||||
|
app:dateFormat="@{UtilityDate.COMMONS_DATE_FORMATS.TIME}"
|
||||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
tools:text="28 ottobre 2018" />
|
tools:text="10:16" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
android:backgroundTint="@color/green_400"
|
android:backgroundTint="@color/green_400"
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingEnd="6dp"
|
android:paddingEnd="6dp"
|
||||||
android:text="@{UtilityNumber.decimalToString(mtbColt.pesoKg, 0) + ` KG`}"
|
android:text="@{UtilityNumber.decimalToString(mtbColr.pesoLordoKg, 0) + ` KG`}"
|
||||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@@ -136,15 +136,15 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||||
android:layout_width="wrap_content"
|
<!-- android:layout_width="wrap_content"-->
|
||||||
android:layout_height="wrap_content"
|
<!-- android:layout_height="wrap_content"-->
|
||||||
android:layout_alignParentStart="true"
|
<!-- android:layout_alignParentStart="true"-->
|
||||||
android:layout_toStartOf="@id/peso_netto_collo"
|
<!-- android:layout_toStartOf="@id/peso_netto_collo"-->
|
||||||
android:text="@{`Linea: ` + mtbColt.codJfas}"
|
<!-- android:text="@{`Linea: ` + mtbColr.codJfas}"-->
|
||||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
<!-- android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"-->
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.codJfas) ? View.INVISIBLE : View.VISIBLE}"
|
<!-- android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.codJfas) ? View.INVISIBLE : View.VISIBLE}"-->
|
||||||
tools:text="Linea: L3" />
|
<!-- tools:text="Linea: L3" />-->
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/peso_netto_collo"
|
android:id="@+id/peso_netto_collo"
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:text="@{UtilityNumber.decimalToString(mtbColt.pesoNettoKg, 0) + `KG netto`}"
|
android:text="@{UtilityNumber.decimalToString(mtbColr.pesoNettoKg, 0) + `KG netto`}"
|
||||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
tools:text="628KG netto" />
|
tools:text="628KG netto" />
|
||||||
|
|||||||
@@ -31,11 +31,6 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Button.DangerFull" parent="Widget.Material3.Button.UnelevatedButton">
|
<style name="Button.DangerFull" parent="Widget.Material3.Button.UnelevatedButton">
|
||||||
<!-- <item name="fontFamily">@font/product_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
|
||||||
<!-- <item name="android:textStyle">bold</item>-->
|
|
||||||
<!-- <item name="android:textAllCaps">false</item>-->
|
|
||||||
<!-- <item name="android:paddingTop">8dp</item>-->
|
|
||||||
<!-- <item name="android:paddingBottom">8dp</item>-->
|
|
||||||
<item name="backgroundTint">@color/red_400</item>
|
<item name="backgroundTint">@color/red_400</item>
|
||||||
<item name="iconTint">@android:color/white</item>
|
<item name="iconTint">@android:color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -80,13 +80,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<style name="AppTheme.NewMaterial.Dialog.FullscreenDialog" parent="Theme.Material3.DayNight">
|
<style name="AppTheme.NewMaterial.Dialog.FullscreenDialog" parent="AppTheme">
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
|
||||||
|
|
||||||
<item name="fontFamily">@font/google_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
|
||||||
|
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
<item name="android:windowIsFloating">false</item>
|
<item name="android:windowIsFloating">false</item>
|
||||||
<item name="android:windowAnimationStyle">@style/Animation.AppCompat.Dialog</item>
|
<item name="android:windowAnimationStyle">@style/Animation.AppCompat.Dialog</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user