Compare commits

...

38 Commits

Author SHA1 Message Date
1079c38a5f Finish v1.49.01(545)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-11-24 17:20:22 +01:00
f6388eff1c -> v1.49.01 (545) 2025-11-24 17:20:18 +01:00
495a8dae92 Mini migrazione di dataCollo a LocalDate 2025-11-24 13:11:55 +01:00
ed938815bb Finish v1.49.00(544) 2025-11-24 09:38:12 +01:00
539e8b7c31 Finish v1.49.00(544)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-11-24 09:38:11 +01:00
92da8cde53 -> v1.49.00 (544) 2025-11-24 09:37:54 +01:00
3d0f7f16f9 Finish v1.48.03(543)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-11-21 13:32:21 +01:00
501ca404ff Finish v1.48.03(543) 2025-11-21 13:32:21 +01:00
5ad4fd7821 -> v1.48.03 (543) 2025-11-21 13:32:10 +01:00
1ba2fb96ba Finish v1.48.02(542) 2025-11-20 11:43:17 +01:00
ffdd1a1df5 Finish v1.48.02(542)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-11-20 11:43:16 +01:00
0205255f7d -> v1.48.02 (542) 2025-11-20 11:43:03 +01:00
c21e856a0f Finish v1.48.01(541) 2025-11-19 10:59:03 +01:00
b673940dd6 Finish v1.48.01(541)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-11-19 10:59:03 +01:00
b0ce11cbf7 -> v1.48.01 (541) 2025-11-19 10:58:54 +01:00
4ef2c209c8 Finish v1.48.00(540) 2025-11-18 10:22:03 +01:00
41d77b806f Finish v1.48.00(540)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-11-18 10:22:02 +01:00
6b65c4a570 -> v1.48.00 (540) 2025-11-18 10:21:46 +01:00
4d5c0e5509 In DtbDoct sostituite date in localDate 2025-11-11 11:50:01 +01:00
21af5fc0a9 In accettazione aggiunta proposta lotto se presente nell'ordine 2025-11-07 13:28:14 +01:00
09b984f5d0 Passato barcode di etichetta anonima in fase di creazione collo 2025-11-06 09:49:18 +01:00
dd473412cc Finish v1.47.26#2 2025-10-29 15:51:00 +01:00
4f0c5bf6dd Finish v1.47.26#2
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-10-29 15:50:59 +01:00
90e4e2e464 Fix Jenkinsfile 2025-10-29 15:50:24 +01:00
50e2605ea5 Finish v1.47.26(539)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-10-29 11:11:43 +01:00
4752e3a3a2 Finish v1.47.26(539) 2025-10-29 11:11:43 +01:00
3fe903cc12 -> v1.47.26 (539) 2025-10-29 11:11:32 +01:00
3f95a70039 Fix addEmsApi in restConsumer 2025-10-29 11:10:11 +01:00
067443698a In Rientro merce, quando si effettua un carico è stato aggiunta la richiesta di versamento automatico 2025-10-28 16:37:23 +01:00
990a4d1538 Finish v1.47.25(538)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-10-28 11:33:12 +01:00
55c16e602d Finish v1.47.25(538) 2025-10-28 11:33:12 +01:00
6097a7f736 -> v1.47.25 (538) 2025-10-28 11:32:05 +01:00
f8b92901fd Attivato di default l'http interceptor 2025-10-28 10:38:52 +01:00
6c6daa4809 Finish v1.47.24(537) 2025-10-21 18:33:28 +02:00
de8b48d938 Finish v1.47.24(537)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
2025-10-21 18:33:27 +02:00
bfa69ca78b -> v1.47.24 (537) 2025-10-21 18:33:17 +02:00
bffb471015 Fix null in spedizione 2025-10-21 18:32:15 +02:00
2eff03dee6 Finish v1.47.23(536) 2025-10-15 11:14:03 +02:00
26 changed files with 238 additions and 137 deletions

View File

@@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
<module name="WMS.app.main" />
<module name="WMS_Native.app" />
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
@@ -8,14 +9,17 @@
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="RESTORE_ENABLED" value="false" />
<option name="RESTORE_FILE" value="" />
<option name="RESTORE_FRESH_INSTALL_ONLY" value="false" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
@@ -59,6 +63,7 @@
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />

View File

@@ -49,21 +49,21 @@ pipeline {
bat 'curl -k "https://services.studioml.it/ems-api/updateWMSApp?overrideForced=false"'
bat 'curl -k "https://services.studioml.it/ems-api/updateWMSApp?overrideForced=false&suffix=beta"'
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "master-beta") {
office365ConnectorSend adaptiveCards: true, color: '#008000', message: 'WMS è stato compilato con successo', status: 'SUCCESS', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
office365ConnectorSend adaptiveCards: true, color: '#008000', message: 'WMS è stato compilato con successo', status: 'SUCCESS', webhookUrl: 'https://default0b9c060c159c4e5f82a77459a72572.16.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/a73f903a4044474c84ad9a0d68a9a479/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gXc43FQXqIq7Xpfvis2XgFoPl8lpg0Sf5HtuxZG_jeI'
}
}
}
unstable {
script {
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "master-beta") {
office365ConnectorSend adaptiveCards: true, color: '#FFDE21', message: 'WMS è INSTABILE', status: 'UNSTABLE', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
office365ConnectorSend adaptiveCards: true, color: '#FFDE21', message: 'WMS è INSTABILE', status: 'UNSTABLE', webhookUrl: 'https://default0b9c060c159c4e5f82a77459a72572.16.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/a73f903a4044474c84ad9a0d68a9a479/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gXc43FQXqIq7Xpfvis2XgFoPl8lpg0Sf5HtuxZG_jeI'
}
}
}
failure {
script {
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "master-beta") {
office365ConnectorSend adaptiveCards: true, color: '#FF2C2C', message: 'Errore di compilazione su WMS', status: 'FAILURE', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
office365ConnectorSend adaptiveCards: true, color: '#FF2C2C', message: 'Errore di compilazione su WMS', status: 'FAILURE', webhookUrl: 'https://default0b9c060c159c4e5f82a77459a72572.16.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/a73f903a4044474c84ad9a0d68a9a479/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gXc43FQXqIq7Xpfvis2XgFoPl8lpg0Sf5HtuxZG_jeI'
}
}
}

View File

@@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 536
def appVersionName = '1.47.23'
def appVersionCode = 545
def appVersionName = '1.49.01'
signingConfigs {
release {

View File

@@ -1,5 +1,6 @@
package it.integry.integrywmsnative.core.data_recover;
import java.time.LocalDate;
import java.util.List;
import it.integry.integrywmsnative.core.model.MtbColt;
@@ -10,7 +11,7 @@ public class ColliDataRecoverDTO {
private int id;
private int numCollo;
private String serCollo;
private String dataCollo;
private LocalDate dataCollo;
private String gestioneCollo;
private String filtro;
@@ -43,11 +44,11 @@ public class ColliDataRecoverDTO {
return this;
}
public String getDataCollo() {
public LocalDate getDataCollo() {
return dataCollo;
}
public ColliDataRecoverDTO setDataCollo(String dataCollo) {
public ColliDataRecoverDTO setDataCollo(LocalDate dataCollo) {
this.dataCollo = dataCollo;
return this;
}

View File

@@ -2,7 +2,6 @@ package it.integry.integrywmsnative.core.data_recover;
import android.content.Context;
import com.annimon.stream.Optional;
import com.annimon.stream.Stream;
import com.google.android.gms.common.util.IOUtils;
import com.google.gson.Gson;
@@ -14,6 +13,7 @@ import java.io.InputStream;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Random;
import javax.inject.Inject;
@@ -65,9 +65,9 @@ public class ColliDataRecoverService {
}
private ColliDataRecoverDTO getIfExists(int id) {
Optional<ColliDataRecoverDTO> recoverDTOOptional = Stream.of(mtbColtsSessions)
Optional<ColliDataRecoverDTO> recoverDTOOptional = mtbColtsSessions.stream()
.filter(x -> x.getId() == id)
.findSingle();
.findFirst();
return recoverDTOOptional.isPresent() ? recoverDTOOptional.get() : null;
@@ -85,7 +85,7 @@ public class ColliDataRecoverService {
ColliDataRecoverDTO recoverDTO = new ColliDataRecoverDTO()
.setId(newId)
.setDataCollo(mtbColtSession.getDataColloS())
.setDataCollo(mtbColtSession.getDataColloLD())
.setNumCollo(mtbColtSession.getNumCollo())
.setSerCollo(mtbColtSession.getSerCollo())
.setGestioneCollo(mtbColtSession.getGestione())

View File

@@ -1,7 +1,7 @@
package it.integry.integrywmsnative.core.model;
import java.math.BigDecimal;
import java.util.Date;
import java.time.LocalDate;
import java.util.List;
public class DtbDoct {
@@ -10,7 +10,7 @@ public class DtbDoct {
private String codAnag;
private String codDtip;
private Date dataDoc;
private LocalDate dataDoc;
private Integer numDoc;
private String serDoc;
private BigDecimal acconto;
@@ -41,14 +41,14 @@ public class DtbDoct {
private String compilatoDa;
private String userName;
private String controllatoDa;
private Date dataChkDoc;
private Date dataDocVal;
private Date dataInizTrasp;
private Date dataIns;
private Date dataOrd;
private Date dataReg;
private Date dataRifScad;
private Date dataUltMod;
private LocalDate dataChkDoc;
private LocalDate dataDocVal;
private LocalDate dataInizTrasp;
private LocalDate dataIns;
private LocalDate dataOrd;
private LocalDate dataReg;
private LocalDate dataRifScad;
private LocalDate dataUltMod;
private String descrizionePaga;
private String flagPrzScontati;
private String gestione;
@@ -89,7 +89,7 @@ public class DtbDoct {
private String targa;
private Integer postiPallet;
private BigDecimal tempMedia;
private Date dataCons;
private LocalDate dataCons;
private BigDecimal nolo;
private BigDecimal nolo2;
private String conducente;
@@ -102,7 +102,7 @@ public class DtbDoct {
private String setDataDecorrenza2DataRic;
private BigDecimal totSpese;
private String chkArtListino;
private Date dataCmov;
private LocalDate dataCmov;
private String reso;
private Integer numCmovAutofattura;
private Object dtbTipi;
@@ -141,11 +141,11 @@ public class DtbDoct {
return this;
}
public Date getDataDoc() {
public LocalDate getDataDoc() {
return dataDoc;
}
public DtbDoct setDataDoc(Date dataDoc) {
public DtbDoct setDataDoc(LocalDate dataDoc) {
this.dataDoc = dataDoc;
return this;
}
@@ -420,74 +420,74 @@ public class DtbDoct {
return this;
}
public Date getDataChkDoc() {
public LocalDate getDataChkDoc() {
return dataChkDoc;
}
public DtbDoct setDataChkDoc(Date dataChkDoc) {
public DtbDoct setDataChkDoc(LocalDate dataChkDoc) {
this.dataChkDoc = dataChkDoc;
return this;
}
public Date getDataDocVal() {
public LocalDate getDataDocVal() {
return dataDocVal;
}
public DtbDoct setDataDocVal(Date dataDocVal) {
public DtbDoct setDataDocVal(LocalDate dataDocVal) {
this.dataDocVal = dataDocVal;
return this;
}
public Date getDataInizTrasp() {
public LocalDate getDataInizTrasp() {
return dataInizTrasp;
}
public DtbDoct setDataInizTrasp(Date dataInizTrasp) {
public DtbDoct setDataInizTrasp(LocalDate dataInizTrasp) {
this.dataInizTrasp = dataInizTrasp;
return this;
}
public Date getDataIns() {
public LocalDate getDataIns() {
return dataIns;
}
public DtbDoct setDataIns(Date dataIns) {
public DtbDoct setDataIns(LocalDate dataIns) {
this.dataIns = dataIns;
return this;
}
public Date getDataOrd() {
public LocalDate getDataOrd() {
return dataOrd;
}
public DtbDoct setDataOrd(Date dataOrd) {
public DtbDoct setDataOrd(LocalDate dataOrd) {
this.dataOrd = dataOrd;
return this;
}
public Date getDataReg() {
public LocalDate getDataReg() {
return dataReg;
}
public DtbDoct setDataReg(Date dataReg) {
public DtbDoct setDataReg(LocalDate dataReg) {
this.dataReg = dataReg;
return this;
}
public Date getDataRifScad() {
public LocalDate getDataRifScad() {
return dataRifScad;
}
public DtbDoct setDataRifScad(Date dataRifScad) {
public DtbDoct setDataRifScad(LocalDate dataRifScad) {
this.dataRifScad = dataRifScad;
return this;
}
public Date getDataUltMod() {
public LocalDate getDataUltMod() {
return dataUltMod;
}
public DtbDoct setDataUltMod(Date dataUltMod) {
public DtbDoct setDataUltMod(LocalDate dataUltMod) {
this.dataUltMod = dataUltMod;
return this;
}
@@ -852,11 +852,11 @@ public class DtbDoct {
return this;
}
public Date getDataCons() {
public LocalDate getDataCons() {
return dataCons;
}
public DtbDoct setDataCons(Date dataCons) {
public DtbDoct setDataCons(LocalDate dataCons) {
this.dataCons = dataCons;
return this;
}
@@ -969,11 +969,11 @@ public class DtbDoct {
return this;
}
public Date getDataCmov() {
public LocalDate getDataCmov() {
return dataCmov;
}
public DtbDoct setDataCmov(Date dataCmov) {
public DtbDoct setDataCmov(LocalDate dataCmov) {
this.dataCmov = dataCmov;
return this;
}

View File

@@ -15,7 +15,7 @@ public class MtbColr extends EntityBase {
private String gestione;
private String serCollo;
private Integer numCollo;
private String dataCollo;
private LocalDate dataCollo;
private Integer riga;
private Integer rigaOrd;
private String codMart;
@@ -27,7 +27,7 @@ public class MtbColr extends EntityBase {
private String serColloRif;
private String note;
private LocalDate dataOrd;
private String dataColloRif;
private LocalDate dataColloRif;
private BigDecimal qtaCnf;
private BigDecimal qtaCol;
private Integer numOrd;
@@ -164,21 +164,18 @@ public class MtbColr extends EntityBase {
return this;
}
public String getDataColloS() {
public LocalDate getDataColloLD() {
return dataCollo;
}
public Date getDataColloD() {
return UtilityDate.recognizeDateWithExceptionHandler(getDataColloS());
}
public MtbColr setDataCollo(String dataCollo) {
this.dataCollo = dataCollo;
this.dataCollo = UtilityDate.recognizeLocalDateWithExceptionHandler(dataCollo);
return this;
}
public MtbColr setDataCollo(Date dataCollo) {
setDataCollo(UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH));
public MtbColr setDataCollo(LocalDate dataCollo) {
this.dataCollo = dataCollo;
return this;
}
@@ -287,25 +284,24 @@ public class MtbColr extends EntityBase {
}
public String getDataColloRifS() {
return dataColloRif;
return dataColloRif != null ? UtilityDate.COMMONS_DATE_FORMATS.DATE_DMY_SLASHED_FORMATTER.format(dataColloRif) : null;
}
public Date getDataColloRifD() {
return UtilityDate.recognizeDateWithExceptionHandler(getDataColloRifS());
}
public MtbColr setDataColloRif(String dataColloRif) {
this.dataColloRif = dataColloRif;
return this;
public LocalDate getDataColloRifLD() {
return dataColloRif;
}
public MtbColr setDataColloRif(Date dataColloRif) {
this.dataColloRif = UtilityDate.formatDate(dataColloRif, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
public MtbColr setDataColloRif(String dataColloRif) {
this.dataColloRif = UtilityDate.recognizeLocalDateWithExceptionHandler(dataColloRif);
return this;
}
public MtbColr setDataColloRif(LocalDate dataColloRif) {
this.dataColloRif = UtilityDate.formatDate(dataColloRif, UtilityDate.COMMONS_DATE_FORMATS.DMY_SLASH);
this.dataColloRif = dataColloRif;
return this;
}

View File

@@ -22,7 +22,6 @@ 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;
import it.integry.integrywmsnative.core.utility.UtilityString;
/**
@@ -31,7 +30,7 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
public class MtbColt extends EntityBase {
private String gestione;
private String dataCollo;
private LocalDate dataCollo;
private String serCollo;
private Integer numCollo;
private String rifOrd;
@@ -86,7 +85,7 @@ public class MtbColt extends EntityBase {
public MtbColt() {
type = "mtb_colt";
setDataCollo(UtilityDate.getDateInstance());
setDataCollo(LocalDate.now());
setSerCollo("/");
if (SettingsManager.i().isUserLoggedIn()) {
@@ -145,20 +144,13 @@ public class MtbColt extends EntityBase {
}
public String getDataColloHumanLong() {
Date dataColloD = null;
try {
dataColloD = getDataColloD();
} catch (Exception ex) {
UtilityLogger.error(ex);
}
if (dataColloD != null) {
return UtilityDate.formatDate(dataColloD, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN_LONG);
if (dataCollo != null) {
return UtilityDate.COMMONS_DATE_FORMATS.DATE_DMY_HUMAN_FORMATTER.format(dataCollo);
} else return null;
}
public String getDataColloS() {
return dataCollo;
return dataCollo != null ? UtilityDate.COMMONS_DATE_FORMATS.DATE_DMY_SLASHED_FORMATTER.format(dataCollo) : null;
}
public Date getDataColloD() {
@@ -166,21 +158,16 @@ public class MtbColt extends EntityBase {
}
public LocalDate getDataColloLD() {
return UtilityDate.recognizeLocalDateWithExceptionHandler(getDataColloS());
return dataCollo;
}
public MtbColt setDataCollo(String dataCollo) {
this.dataCollo = dataCollo;
return this;
}
public MtbColt setDataCollo(Date dataCollo) {
this.dataCollo = UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
this.dataCollo = UtilityDate.recognizeLocalDateWithExceptionHandler(dataCollo);
return this;
}
public MtbColt setDataCollo(LocalDate dataCollo) {
this.dataCollo = UtilityDate.formatDate(dataCollo, UtilityDate.COMMONS_DATE_FORMATS.DMY_SLASH);
this.dataCollo = dataCollo;
return this;
}

View File

@@ -4,7 +4,6 @@ import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityNumber;
import it.integry.integrywmsnative.core.utility.UtilityString;
@@ -306,7 +305,7 @@ public class MvwSitArtUdcDetInventario {
return new MtbColr()
.setCodJcom(getCodJcom())
.setCodMart(getCodMart())
.setDataCollo(UtilityDate.toDate(getDataCollo()))
.setDataCollo(getDataCollo())
.setNumCollo(getNumCollo())
.setSerCollo(getSerCollo())
.setGestione(getGestione())

View File

@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest;
import java.io.IOException;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityString;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.Request;
@@ -17,15 +18,19 @@ public class HttpInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
final String APP_TOKEN = "fa3a21af-606b-4129-a22b-aedc2a52c7b6";
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
final String APP_TOKEN = "fa3a21af-606b-4129-a22b-aedc2a52c7b6";
final Request request = chain.request();
final HttpUrl url = request.url().newBuilder()
.addQueryParameter("profileDb", PROFILE_DB)
.build();
HttpUrl.Builder urlBuilder = chain.request().url().newBuilder();
Request.Builder builder = chain.request().newBuilder()
if (!UtilityString.isNullOrEmpty(PROFILE_DB))
urlBuilder
.addQueryParameter("profileDb", PROFILE_DB);
HttpUrl url = urlBuilder.build();
final Request.Builder requestBuilder = chain.request().newBuilder();
Request.Builder builder = requestBuilder
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "*/*")
.addHeader("x-app-token", APP_TOKEN);

View File

@@ -37,19 +37,19 @@ public class RESTBuilder {
}
public <T> T getService(final Class<T> service, int timeout) {
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, true, timeout);
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, timeout);
}
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors) {
return getService(service, protocol, host, port, addInterceptors, true, 60);
public <T> T getService(final Class<T> service, String protocol, String host, int port) {
return getService(service, protocol, host, port, true, 60);
}
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi) {
return getService(service, protocol, host, port, addInterceptors, addEmsApi, 60);
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi) {
return getService(service, protocol, host, port, addEmsApi, 60);
}
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) {
public <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addEmsApi, int timeout) {
OkHttpClient.Builder clientBuilder = getDefaultHttpClient();
timeout = 0;
@@ -62,7 +62,7 @@ public class RESTBuilder {
clientBuilder.retryOnConnectionFailure(true);
clientBuilder.addInterceptor(authInterceptor);
if (addInterceptors) clientBuilder.addInterceptor(new HttpInterceptor());
clientBuilder.addInterceptor(new HttpInterceptor());
if (ADD_LOGGER_INTERCEPTOR) clientBuilder.addInterceptor(new HttpLoggerInterceptor());
OkHttpClient client = clientBuilder.build();

View File

@@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -160,11 +161,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
mtbColrClone
.setNumCollo(null)
.setDataCollo((String) null)
.setDataCollo((LocalDate) null)
.setRiga(null)
.setGestione(GestioneEnum.LAVORAZIONE)
.setDataColloRif(sourceMtbColt.getDataColloD())
.setDataColloRif(sourceMtbColt.getDataColloLD())
.setNumColloRif(sourceMtbColt.getNumCollo())
.setGestioneRif(sourceMtbColt.getGestione())
.setSerColloRif(sourceMtbColt.getSerCollo())
@@ -214,10 +215,10 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
MtbColr mtbColrClone = new MtbColr();
mtbColrClone
.setNumCollo(null)
.setDataCollo((String) null)
.setDataCollo((LocalDate) null)
.setRiga(null)
.setGestione(GestioneEnum.LAVORAZIONE)
.setDataColloRif(sourceMtbColt.getDataColloD())
.setDataColloRif(sourceMtbColt.getDataColloLD())
.setNumColloRif(sourceMtbColt.getNumCollo())
.setGestioneRif(sourceMtbColt.getGestione())
.setSerColloRif(sourceMtbColt.getSerCollo())
@@ -372,7 +373,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
mtbColr.setGestione(mtbColt.getGestione());
mtbColr.setSerCollo(mtbColt.getSerCollo());
mtbColr.setNumCollo(mtbColt.getNumCollo());
mtbColr.setDataCollo(mtbColt.getDataColloS());
mtbColr.setDataCollo(mtbColt.getDataColloLD());
}
}
@@ -408,7 +409,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
}
public MtbColt getByChiaveColloSynchronized(GestioneEnum gestione, int numCollo, String dataCollo, String serCollo, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
public MtbColt getByChiaveColloSynchronized(GestioneEnum gestione, int numCollo, LocalDate dataCollo, String serCollo, boolean onlyResiduo, boolean throwExcIfNull) throws Exception {
MtbColt mtbColtToRetrieve = new MtbColt()
.setGestione(gestione)
.setNumCollo(numCollo)
@@ -418,7 +419,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
return getByTestataSynchronized(mtbColtToRetrieve, onlyResiduo, throwExcIfNull);
}
public void getByChiaveCollo(GestioneEnum gestione, int numCollo, String dataCollo, String serCollo, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
public void getByChiaveCollo(GestioneEnum gestione, int numCollo, LocalDate dataCollo, String serCollo, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToRetrieve = new MtbColt()
.setGestione(gestione)
.setNumCollo(numCollo)

View File

@@ -16,7 +16,6 @@ import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
import it.integry.integrywmsnative.core.utility.UtilityDate;
@Singleton
public class InventarioService {
@@ -48,7 +47,7 @@ public class InventarioService {
MtbColt mtbColt = new MtbColt();
mtbColt.setGestione(inventario.getGestione());
mtbColt.setDataCollo(UtilityDate.toDate(inventario.getDataCollo()));
mtbColt.setDataCollo(inventario.getDataCollo());
mtbColt.setSerCollo(inventario.getSerCollo());
mtbColt.setNumCollo(inventario.getNumCollo());
mtbColt.setSegno(inventario.getSegno());
@@ -71,7 +70,7 @@ public class InventarioService {
MtbColr mtbColr = new MtbColr();
mtbColr.setGestione(inventario.getGestione());
mtbColr.setDataCollo(UtilityDate.toDate(inventario.getDataCollo()));
mtbColr.setDataCollo(inventario.getDataCollo());
mtbColr.setSerCollo(inventario.getSerCollo());
mtbColr.setNumCollo(inventario.getNumCollo());
mtbColr.setCodMart(inventario.getCodMart());

View File

@@ -99,7 +99,8 @@ public class DBSettingsModel {
private boolean flagSpedizioneEnableFastPicking = false;
private boolean flagAccettazioneBollaEditableQtaTot = true;
private boolean flagViewSwitchDepoButton = true;
private boolean flagProduzioneSkipAskVersamentoAutomatico;
private boolean flagAccettazioneViewLotto = false;
public boolean isFlagSpedizioneEnableFakeGiacenza() {
return flagSpedizioneEnableFakeGiacenza;
}
@@ -833,4 +834,22 @@ public class DBSettingsModel {
public void setFlagViewSwitchDepoButton(boolean flagViewSwitchDepoButton) {
this.flagViewSwitchDepoButton = flagViewSwitchDepoButton;
}
public boolean isFlagProduzioneSkipAskVersamentoAutomatico() {
return flagProduzioneSkipAskVersamentoAutomatico;
}
public DBSettingsModel setFlagProduzioneSkipAskVersamentoAutomatico(boolean flagProduzioneSkipAskVersamentoAutomatico) {
this.flagProduzioneSkipAskVersamentoAutomatico = flagProduzioneSkipAskVersamentoAutomatico;
return this;
}
public boolean isFlagAccettazioneViewLotto() {
return flagAccettazioneViewLotto;
}
public DBSettingsModel setFlagAccettazioneViewLotto(boolean flagAccettazioneViewLotto) {
this.flagAccettazioneViewLotto = flagAccettazioneViewLotto;
return this;
}
}

View File

@@ -254,6 +254,11 @@ public class SettingsManager {
.setSection("ACCETTAZIONE")
.setKeySection("FLAG_DELETE_ROW_ON_CLOSE")
.setSetter(dbSettingsModelIstance::setFlagAccettazioneDeleteRowOnClose));
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
.setGestName("PICKING")
.setSection("ACCETTAZIONE")
.setKeySection("FLAG_VIEW_LOTTO")
.setSetter(dbSettingsModelIstance::setFlagAccettazioneViewLotto));
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
.setGestName("PICKING")
.setSection("SPEDIZIONE")
@@ -301,6 +306,12 @@ public class SettingsManager {
.setSection("PRODUZIONE")
.setKeySection("VIEW_POSIZIONI")
.setSetter(dbSettingsModelIstance::setViewPosizioni));
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
.setGestName("PICKING")
.setSection("PRODUZIONE")
.setKeySection("FLAG_SKIP_ASK_VERSAMENTO_AUTOMATICO")
.setSetter(dbSettingsModelIstance::setFlagProduzioneSkipAskVersamentoAutomatico)
.setDefaultValue(false));
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
.setGestName("PICKING")
.setSection("SPEDIZIONE")

View File

@@ -41,6 +41,19 @@ public class UtilityDate {
public static final String DM_HUMAN = "dd MMM";
public static final String DMY_HUMAN = "dd MMM yyyy";
public static final String DMY_HUMAN_LONG = "dd MMMM yyyy";
public static final DateTimeFormatter DATE_DMY_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(DMY_SLASH)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_DMY_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(DMY_TIME_SLASH)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATE_DMY_HUMAN_FORMATTER = DateTimeFormatter.ofPattern(DMY_HUMAN_LONG)
.withZone(ZoneId.systemDefault());
}
public static Date recognizeDateWithExceptionHandler(String dateString) {

View File

@@ -36,6 +36,7 @@ public class SitArtOrdDTO {
private String descrizioneEstesaArt;
private String descrizioneEstesaOrd;
private Date dataCons;
private String partitaMag;
public String getDescrizioneEstesaOrd() {
return descrizioneEstesaOrd;
@@ -301,4 +302,13 @@ public class SitArtOrdDTO {
this.dataCons = dataCons;
return this;
}
public String getPartitaMag() {
return partitaMag;
}
public SitArtOrdDTO setPartitaMag(String partitaMag) {
this.partitaMag = partitaMag;
return this;
}
}

View File

@@ -273,7 +273,7 @@ public class AccettazioneOrdiniPickingViewModel {
try {
numCollo = UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue());
this.createNewLU(
null,
barcodeScanDTO.getStringValue(),
numCollo,
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, true, onComplete);
} catch (Exception ex) {
@@ -559,6 +559,9 @@ public class AccettazioneOrdiniPickingViewModel {
dataScad = dataScad.plusDays(pickingObjectDTO.getMtbAart().getGgScadPartita());
}
if (partitaMag == null && SettingsManager.iDB().isFlagAccettazioneViewLotto())
partitaMag = pickingObjectDTO.getSitArtOrdDTO().getPartitaMag();
if (partitaMag == null && dataScad == null) {
HistoryMtbAartDTO historyMtbAartDTO = this.getHistoryItemIfExists(pickingObjectDTO.getMtbAart().getCodMart());

View File

@@ -34,7 +34,7 @@ public class AuthenticationRESTConsumer extends _BaseRESTConsumer {
String host = CommonConst.Login.Azienda.host;
int port = CommonConst.Login.Azienda.port;
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port, false, true);
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port);
service.loginAzienda(codAzienda).enqueue(new ManagedErrorCallback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<LoginAziendaDTO>> call, Response<ServiceRESTResponse<LoginAziendaDTO>> response) {
@@ -67,7 +67,7 @@ public class AuthenticationRESTConsumer extends _BaseRESTConsumer {
public void authenticate(String protocol, String host, int port, String username, String password, String profileDb, String deviceSalt, RunnableArgs<AuthenticationJwtResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port, false);
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port);
LoginRequestDTO loginRequestDTO = new LoginRequestDTO()
.setUsername(username)
@@ -94,7 +94,7 @@ public class AuthenticationRESTConsumer extends _BaseRESTConsumer {
public void retrieveAvailableProfiles(String protocol, String host, int port, String username, String password, RunnableArgs<List<String>> onComplete, RunnableArgs<Exception> onFailed) {
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port, false);
AuthenticationRESTConsumerService service = restBuilder.getService(AuthenticationRESTConsumerService.class, protocol, host, port);
service.retreiveAvailableProfiles(username, password)
.enqueue(new ManagedErrorCallback<>() {

View File

@@ -575,7 +575,7 @@ public class PickingLiberoViewModel {
MtbColt sourceMtbColt = new MtbColt()
.setNumCollo(mtbColr.getNumCollo())
.setGestione(mtbColr.getGestione())
.setDataCollo(mtbColr.getDataColloD())
.setDataCollo(mtbColr.getDataColloLD())
.setSerCollo(mtbColr.getSerCollo())
.setMtbColr(new ObservableArrayList<>());
@@ -695,7 +695,7 @@ public class PickingLiberoViewModel {
MtbColt mtbColt = mColliMagazzinoRESTConsumer.getByChiaveColloSynchronized(
mtbColr.getGestioneRifEnum(),
mtbColr.getNumColloRif(),
mtbColr.getDataColloRifS(),
mtbColr.getDataColloRifLD(),
mtbColr.getSerColloRif(),
true,
false);

View File

@@ -565,7 +565,7 @@ public class PickingResiViewModel {
.setSerColloRif(UtilityString.empty2null(mtbColrToDispatch.getSerCollo()))
.setNumColloRif(mtbColrToDispatch.getNumCollo())
.setGestioneRif(UtilityString.empty2null(mtbColrToDispatch.getGestione()))
.setDataColloRif(UtilityString.empty2null(mtbColrToDispatch.getDataColloS()));
.setDataColloRif(mtbColrToDispatch.getDataColloLD());
if (mtbColrToDispatch.getPesoNettoKg() != null) {
@@ -608,7 +608,7 @@ public class PickingResiViewModel {
this.mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
mtbColr
.setDataCollo(value.getDataColloS())
.setDataCollo(value.getDataColloLD())
.setNumCollo(value.getNumCollo())
.setGestione(value.getGestione())
.setSerCollo(value.getSerCollo())
@@ -634,7 +634,7 @@ public class PickingResiViewModel {
MtbColt mtbColt = new MtbColt()
.setNumCollo(mtbColrToUpdate.getNumCollo())
.setDataCollo(mtbColrToUpdate.getDataColloS())
.setDataCollo(mtbColrToUpdate.getDataColloLD())
.setSerCollo(mtbColrToUpdate.getSerCollo())
.setGestione(mtbColrToUpdate.getGestione())
.setMtbColr(new ObservableArrayList<>());
@@ -682,7 +682,7 @@ public class PickingResiViewModel {
MtbColt mtbColt = new MtbColt()
.setNumCollo(mtbColrToDelete.getNumCollo())
.setDataCollo(mtbColrToDelete.getDataColloS())
.setDataCollo(mtbColrToDelete.getDataColloLD())
.setSerCollo(mtbColrToDelete.getSerCollo())
.setGestione(mtbColrToDelete.getGestione())
.setMtbColr(new ObservableArrayList<>());

View File

@@ -40,14 +40,17 @@ import it.integry.integrywmsnative.core.model.MtbColr;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
import it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView;
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdDTO;
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView;
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView;
import it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView;
/**
* A simple {@link Fragment} subclass.
@@ -268,6 +271,19 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
}
@Override
public void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
DialogAskShouldVersamentoAutomaticoULView.newInstance(onComplete).show(requireActivity().getSupportFragmentManager(), "tag");
}
@Override
public void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
handler.post(() -> {
DialogVersamentoAutomaticoULDoneView.newInstance(versamentoAutomaticoULResponseDTO, onComplete).show(requireActivity().getSupportFragmentManager(), "tag");
});
}
public void addULButtonClick() {
this.onLoadingStarted();
@@ -355,7 +371,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
public void deleteMtbColr(MtbColr mtbColr) {
MtbColt mtbColt = new MtbColt()
.setGestione(mtbColr.getGestione())
.setDataCollo(mtbColr.getDataColloS())
.setDataCollo(mtbColr.getDataColloLD())
.setSerCollo(mtbColr.getSerCollo())
.setNumCollo(mtbColr.getNumCollo());

View File

@@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ProduzioneRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinDTO;
import it.integry.integrywmsnative.core.rest.model.produzione.CaricoProdFinProdottoDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager;
@@ -173,13 +174,39 @@ public class ProdRientroMerceOrderDetailViewModel {
}, this::sendError);
} else {
synchronized (this.mtbColtsOfOrder) {
this.sendOnLoadingEnded();
this.mListener.onDataSaved(mtbColtSaved);
Runnable onVersamentoCompleted = () -> {
this.sendOnLoadingEnded();
this.mListener.onDataSaved(mtbColtSaved);
};
if (SettingsManager.iDB().isFlagProduzioneSkipAskVersamentoAutomatico()) {
versaAutomaticamenteUL(mtbColtSaved, onVersamentoCompleted);
} else {
sendVersamentoAutomaticoULRequest(response -> {
if (response) {
versaAutomaticamenteUL(mtbColtSaved, onVersamentoCompleted);
} else {
onVersamentoCompleted.run();
}
});
}
}
}
}, this::sendError);
}
private void versaAutomaticamenteUL(MtbColt mtbColt, Runnable onComplete) {
if (mtbColt == null) return;
colliMagazzinoRESTConsumer.versamentoAutomaticoUL(mtbColt, versamentoResult -> {
this.notifyVersamentoAutomaticoResult(versamentoResult, onComplete);
}, this::sendError);
}
private void notifyVersamentoAutomaticoResult(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
if (this.mListener != null)
mListener.onULVersata(versamentoAutomaticoULResponseDTO, onComplete);
}
public void deleteLU(MtbColt mtbColt) {
this.sendOnLoadingStarted();
@@ -251,11 +278,17 @@ public class ProdRientroMerceOrderDetailViewModel {
this::sendError);
}
private void sendVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
}
public interface Listener extends ILoadingListener {
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
void onDataSaved(MtbColt mtbColt);
void onError(Exception ex);
void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete);
}
}

View File

@@ -68,7 +68,7 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
mtbColrList) {
HashMap<String, Object> parm = new HashMap<>();
parm.put("data_collo", mtbcolr.getDataColloD());
parm.put("data_collo", mtbcolr.getDataColloLD());
parm.put("gestione", mtbcolr.getGestione());
parm.put("ser_collo", mtbcolr.getSerCollo());
parm.put("num_collo", mtbcolr.getNumCollo());
@@ -90,7 +90,7 @@ public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
ObservableArrayList<MtbColr> mtbColrsRoAdd = new ObservableArrayList<>();
mtbColrsRoAdd.addAll(Stream.of(mtbColrList)
.filter(x -> x.getNumCollo().equals(mtbColt.getNumCollo()) &&
x.getDataColloD().compareTo(mtbColt.getDataColloD()) == 0 &&
x.getDataColloLD().isEqual(mtbColt.getDataColloLD()) &&
x.getGestione().equals(mtbColt.getGestione()) &&
x.getSerCollo().equals(mtbColt.getSerCollo()))
.toList());

View File

@@ -366,7 +366,7 @@ public class RettificaGiacenzeViewModel {
mtbColr
.setQtaCol(BigDecimal.ZERO)
.setNumCnf(BigDecimal.ZERO)
.setDataCollo(mCurrentMtbColt.getDataColloS())
.setDataCollo(mCurrentMtbColt.getDataColloLD())
.setNumCollo(mCurrentMtbColt.getNumCollo())
.setGestione(mCurrentMtbColt.getGestione())
.setSerCollo(mCurrentMtbColt.getSerCollo());

View File

@@ -860,7 +860,7 @@ public class SpedizioneViewModel {
if (pickingObjectDTO.getMtbColts().stream()
.anyMatch(x ->
Objects.equals(x.getNumCollo(), scannedUL.getNumCollo()) &&
x.getDataColloS().equals(scannedUL.getDataColloS()) &&
x.getDataColloLD().isEqual(scannedUL.getDataColloLD()) &&
x.getSerCollo().equalsIgnoreCase(scannedUL.getSerCollo()) &&
(scannedUL.getGestioneEnum() == GestioneEnum.ACQUISTO || scannedUL.getGestioneEnum() == GestioneEnum.LAVORAZIONE))) {
@@ -874,7 +874,10 @@ public class SpedizioneViewModel {
for (PickingObjectDTO pickingObject : pickingList) {
//Da verificare se il controllo per partita deve essere sempre effettuato
if (UtilityString.equalsIgnoreCase(x.getCodMart(), pickingObject.getSitArtOrdDTO().getCodMart()) && UtilityString.equalsIgnoreCase(x.getCodTagl(), pickingObject.getSitArtOrdDTO().getCodTagl()) && UtilityString.equalsIgnoreCase(x.getCodCol(), pickingObject.getSitArtOrdDTO().getCodCol()) && (!mEnableCheckPartitaMag || UtilityString.equalsIgnoreCase(x.getPartitaMag(), pickingObject.getSitArtOrdDTO().getPartitaMag()) || UtilityString.isNullOrEmpty(pickingObject.getSitArtOrdDTO().getPartitaMag()))) {
if (UtilityString.equalsIgnoreCase(x.getCodMart(), pickingObject.getSitArtOrdDTO().getCodMart()) &&
UtilityString.equalsIgnoreCase(x.getCodTagl(), pickingObject.getSitArtOrdDTO().getCodTagl()) &&
UtilityString.equalsIgnoreCase(x.getCodCol(), pickingObject.getSitArtOrdDTO().getCodCol()) &&
(!mEnableCheckPartitaMag || UtilityString.equalsIgnoreCase(x.getPartitaMag(), pickingObject.getSitArtOrdDTO().getPartitaMag()) || UtilityString.isNullOrEmpty(pickingObject.getSitArtOrdDTO().getPartitaMag()))) {
if (!matchPickingObject.contains(pickingObject)) {
matchPickingObject.add(pickingObject);
@@ -1015,7 +1018,7 @@ public class SpedizioneViewModel {
if (availableBatchLots.stream().anyMatch(x -> x.getDataScad() == null)) {
tmp.addAll(availableBatchLots.stream()
.filter(x -> x.getDataScad() == null)
.sorted(Comparator.comparing(x -> UtilityString.isNull(x.getPartitaMag(), "")))
.sorted(Comparator.comparing(x -> x.getPartitaMag() == null ? "" : x.getPartitaMag()))
.collect(Collectors.toList()));
}
@@ -1467,7 +1470,7 @@ public class SpedizioneViewModel {
private MtbColt loadRifULFromMtbColr(MtbColr mtbColr) throws Exception {
//Se ho dei riferimenti ad una UL devo leggere la QTA ancora disponibile sulla Ul
if (mtbColr != null && !UtilityString.isNullOrEmpty(mtbColr.getGestioneRif()) && !UtilityString.isNullOrEmpty(mtbColr.getSerColloRif()) && !UtilityString.isNullOrEmpty(mtbColr.getDataColloRifS()) && mtbColr.getNumColloRif() != null) {
return mColliMagazzinoRESTConsumer.getByChiaveColloSynchronized(mtbColr.getGestioneRifEnum(), mtbColr.getNumColloRif(), mtbColr.getDataColloRifS(), mtbColr.getSerColloRif(), true, false);
return mColliMagazzinoRESTConsumer.getByChiaveColloSynchronized(mtbColr.getGestioneRifEnum(), mtbColr.getNumColloRif(), mtbColr.getDataColloRifLD(), mtbColr.getSerColloRif(), true, false);
}
return null;
}
@@ -1581,7 +1584,7 @@ public class SpedizioneViewModel {
}
refMtbColr.setNumCollo(refMtbColt.getNumCollo())
.setDataCollo(refMtbColt.getDataColloS())
.setDataCollo(refMtbColt.getDataColloLD())
.setSerCollo(refMtbColt.getSerCollo())
.setGestione(refMtbColt.getGestione());
}
@@ -2021,7 +2024,7 @@ public class SpedizioneViewModel {
cloneMtbColr.setRiga(null)
.setNumCollo(null)
.setGestione((String) null)
.setDataCollo((String) null)
.setDataCollo((LocalDate) null)
.setSerCollo(null)
.setCausale(MtbColr.Causale.VERSAMENTO);
@@ -2080,7 +2083,7 @@ public class SpedizioneViewModel {
Optional<MtbColr> optionalMtbColrReference = pickingObjectDTO.getMtbColts().stream()
.filter(y -> withdrawMtbColr.getRefMtbColr() != null &&
withdrawMtbColr.getRefMtbColr().getNumCollo().equals(y.getNumCollo()) &&
withdrawMtbColr.getRefMtbColr().getDataColloD().equals(y.getDataColloD()) &&
withdrawMtbColr.getRefMtbColr().getDataColloLD().isEqual(y.getDataColloLD()) &&
withdrawMtbColr.getRefMtbColr().getSerCollo().equals(y.getSerCollo()) &&
withdrawMtbColr.getRefMtbColr().getGestioneEnum().equals(y.getGestioneEnum()) &&
UtilityString.equalsIgnoreCase(withdrawMtbColr.getRefMtbColr().getCodMart(), y.getMtbColr() != null && !y.getMtbColr().isEmpty() ? y.getMtbColr().get(0).getCodMart() : null) &&