Implementato salvataggio filtro ordine in JSON
This commit is contained in:
parent
c856a2b0e8
commit
c1b9c3693b
@ -15,6 +15,7 @@ import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
|
||||
@ -673,10 +674,10 @@ public class MtbColt extends EntityBase implements Parcelable {
|
||||
|
||||
public void generaFiltroOrdineFromDTO(List<FiltroOrdineDTO> filtroOrdineDtos) {
|
||||
|
||||
String xmlPrefix = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ROOT><FILTER>";
|
||||
String xmlSuffix = "</FILTER></ROOT>";
|
||||
String xmlPrefix = "{\"whereCond\": \"";
|
||||
String xmlSuffix = "\"}";
|
||||
|
||||
StringBuilder xmlContent = new StringBuilder();
|
||||
StringBuilder whereCond = new StringBuilder();
|
||||
|
||||
if(filtroOrdineDtos != null && filtroOrdineDtos.size() > 0) {
|
||||
|
||||
@ -684,7 +685,16 @@ public class MtbColt extends EntityBase implements Parcelable {
|
||||
FiltroOrdineDTO x = filtroOrdineDtos.get(i);
|
||||
|
||||
try {
|
||||
xmlContent.append("<DTB_ORDT COND=\"OR\"><GESTIONE type=\"V\">" + x.getGestioneOrd() + "</GESTIONE><DATA_ORD type=\"D\">" + UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH) + "</DATA_ORD><NUM_ORD type=\"N\">" + x.getNumOrd() + "</NUM_ORD></DTB_ORDT>");
|
||||
whereCond.append(String.format("(dtb_ordt.gestione = %s AND dtb_ordt.data_ord = %s and dtb_ordt.num_ord = %s)",
|
||||
UtilityDB.valueToString(x.getGestioneOrd()),
|
||||
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH)),
|
||||
UtilityDB.valueToString(x.getNumOrd())));
|
||||
|
||||
if(i < filtroOrdineDtos.size()-1) {
|
||||
whereCond.append(" OR ");
|
||||
}
|
||||
|
||||
//whereCond.append("<DTB_ORDT COND=\"OR\"><GESTIONE type=\"V\">" + x.getGestioneOrd() + "</GESTIONE><DATA_ORD type=\"D\">" + UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH) + "</DATA_ORD><NUM_ORD type=\"N\">" + x.getNumOrd() + "</NUM_ORD></DTB_ORDT>");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -692,7 +702,7 @@ public class MtbColt extends EntityBase implements Parcelable {
|
||||
|
||||
}
|
||||
|
||||
this.filtroOrdini = xmlPrefix + xmlContent + xmlSuffix;
|
||||
this.filtroOrdini = xmlPrefix + whereCond + xmlSuffix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
|
||||
return barcodeScanDTO != null && isPosizione;
|
||||
return isPosizione;
|
||||
}
|
||||
|
||||
public static boolean isEanPeso(BarcodeScanDTO barcodeScanDTO) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user