modifiche per nuova impostazione scontrini
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -12,7 +12,7 @@ public class Migration_20250828145642 extends BaseMigration implements Migration
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "PROFILE_DB", null,
|
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "PROFILE_DB", null,
|
||||||
"insiere il profile del db a cui collegarsi", false, null, false, false,
|
"Inserire il profile del db a cui collegarsi", false, null, false, false,
|
||||||
false, false, false, null, false, null);
|
false, false, false, null, false, null);
|
||||||
|
|
||||||
if (isCustomerDb(IntegryCustomerDB.Carelli_Carelli) && isCustomerDb(IntegryCustomerDB.Carelli_GestFood) ) {
|
if (isCustomerDb(IntegryCustomerDB.Carelli_Carelli) && isCustomerDb(IntegryCustomerDB.Carelli_GestFood) ) {
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package it.integry.ems.migration.model;
|
||||||
|
|
||||||
|
import it.integry.ems.migration._base.BaseMigration;
|
||||||
|
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||||
|
|
||||||
|
public class Migration_20250922095154 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void up() throws Exception {
|
||||||
|
if (isHistoryDB())
|
||||||
|
return;
|
||||||
|
|
||||||
|
dropColumn("ntb_docr", "val_sco_art");
|
||||||
|
executeStatement("alter table ntb_docr add val_voucher numeric(20,5);");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void down() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package it.integry.ems.migration.model;
|
||||||
|
|
||||||
|
import it.integry.ems.migration._base.BaseMigration;
|
||||||
|
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||||
|
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||||
|
|
||||||
|
public class Migration_20250922140309 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void up() throws Exception {
|
||||||
|
if (isHistoryDB())
|
||||||
|
return;
|
||||||
|
|
||||||
|
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_DATI_ORDINE", "N",
|
||||||
|
"Imposta sulla riga dello scontrino i dati dell'ordine", false, null, false, false,
|
||||||
|
false, false, false, null, false, null);
|
||||||
|
|
||||||
|
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_KIT", "N",
|
||||||
|
"Imposta sulla riga dello scontrino il codice del kit ( menu ) ", false, null, false, false,
|
||||||
|
false, false, false, null, false, null);
|
||||||
|
|
||||||
|
if ( isCustomerDb(IntegryCustomerDB.Carelli_Murgia)) {
|
||||||
|
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_DATI_ORDINE", "S");
|
||||||
|
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_KIT", "S");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void down() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -100,8 +100,8 @@ public class NtbDocr extends EntityBase {
|
|||||||
@SqlField(value = "causale_reso", maxLength = 5)
|
@SqlField(value = "causale_reso", maxLength = 5)
|
||||||
private String causaleReso;
|
private String causaleReso;
|
||||||
|
|
||||||
@SqlField(value = "val_sco_art", nullable = false, defaultObjectValue = "0")
|
@SqlField(value = "val_voucher", nullable = false, defaultObjectValue = "0")
|
||||||
private BigDecimal valScoArt;
|
private BigDecimal valVoucher;
|
||||||
|
|
||||||
private List<NtbDocs> ntbDocs = new ArrayList<>();
|
private List<NtbDocs> ntbDocs = new ArrayList<>();
|
||||||
|
|
||||||
@@ -334,12 +334,12 @@ public class NtbDocr extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getValScoArt() {
|
public BigDecimal getValVoucher() {
|
||||||
return valScoArt;
|
return valVoucher;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NtbDocr setValScoArt(BigDecimal valScoArt) {
|
public NtbDocr setValVoucher(BigDecimal valVoucher) {
|
||||||
this.valScoArt = valScoArt;
|
this.valVoucher = valVoucher;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,256 +142,225 @@ public class NtbDoct extends EntityBase {
|
|||||||
return codMdep;
|
return codMdep;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCodMdep(String codMdep) {
|
public NtbDoct setCodMdep(String codMdep) {
|
||||||
this.codMdep = codMdep;
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCodCassa() {
|
public String getCodCassa() {
|
||||||
return codCassa;
|
return codCassa;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCodCassa(String codCassa) {
|
public NtbDoct setCodCassa(String codCassa) {
|
||||||
this.codCassa = codCassa;
|
this.codCassa = codCassa;
|
||||||
}
|
return this;
|
||||||
|
|
||||||
public String getCausale() {
|
|
||||||
return causale;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCausale(String causale) {
|
|
||||||
this.causale = causale;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodAnag() {
|
|
||||||
return codAnag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodAnag(String codAnag) {
|
|
||||||
this.codAnag = codAnag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodDivi() {
|
|
||||||
return codDivi;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodDivi(String codDivi) {
|
|
||||||
this.codDivi = codDivi;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodOper() {
|
|
||||||
return codOper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodOper(String codOper) {
|
|
||||||
this.codOper = codOper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodAnagVal() {
|
|
||||||
return codAnagVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodAnagVal(String codAnagVal) {
|
|
||||||
this.codAnagVal = codAnagVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodDtipVal() {
|
|
||||||
return codDtipVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodDtipVal(String codDtipVal) {
|
|
||||||
this.codDtipVal = codDtipVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSerDocVal() {
|
|
||||||
return serDocVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSerDocVal(String serDocVal) {
|
|
||||||
this.serDocVal = serDocVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodFidelity() {
|
|
||||||
return codFidelity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodFidelity(String codFidelity) {
|
|
||||||
this.codFidelity = codFidelity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataDoc() {
|
public Date getDataDoc() {
|
||||||
return dataDoc;
|
return dataDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataDoc(Date dataDoc) {
|
public NtbDoct setDataDoc(Date dataDoc) {
|
||||||
this.dataDoc = dataDoc;
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCausale() {
|
||||||
|
return causale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCausale(String causale) {
|
||||||
|
this.causale = causale;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDivi() {
|
||||||
|
return codDivi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodDivi(String codDivi) {
|
||||||
|
this.codDivi = codDivi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodOper() {
|
||||||
|
return codOper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodOper(String codOper) {
|
||||||
|
this.codOper = codOper;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnagVal() {
|
||||||
|
return codAnagVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodAnagVal(String codAnagVal) {
|
||||||
|
this.codAnagVal = codAnagVal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtipVal() {
|
||||||
|
return codDtipVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodDtipVal(String codDtipVal) {
|
||||||
|
this.codDtipVal = codDtipVal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDocVal() {
|
||||||
|
return serDocVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setSerDocVal(String serDocVal) {
|
||||||
|
this.serDocVal = serDocVal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodFidelity() {
|
||||||
|
return codFidelity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodFidelity(String codFidelity) {
|
||||||
|
this.codFidelity = codFidelity;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScontr() {
|
public Date getDataScontr() {
|
||||||
return dataScontr;
|
return dataScontr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataScontr(Date dataScontr) {
|
public NtbDoct setDataScontr(Date dataScontr) {
|
||||||
this.dataScontr = dataScontr;
|
this.dataScontr = dataScontr;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataImport() {
|
public Date getDataImport() {
|
||||||
return dataImport;
|
return dataImport;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataImport(Date dataImport) {
|
public NtbDoct setDataImport(Date dataImport) {
|
||||||
this.dataImport = dataImport;
|
this.dataImport = dataImport;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataDocVal() {
|
public Date getDataDocVal() {
|
||||||
return dataDocVal;
|
return dataDocVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataDocVal(Date dataDocVal) {
|
public NtbDoct setDataDocVal(Date dataDocVal) {
|
||||||
this.dataDocVal = dataDocVal;
|
this.dataDocVal = dataDocVal;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCountFidelity() {
|
public BigDecimal getCountFidelity() {
|
||||||
return countFidelity;
|
return countFidelity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCountFidelity(BigDecimal countFidelity) {
|
public NtbDoct setCountFidelity(BigDecimal countFidelity) {
|
||||||
this.countFidelity = countFidelity;
|
this.countFidelity = countFidelity;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCountPremio() {
|
public BigDecimal getCountPremio() {
|
||||||
return countPremio;
|
return countPremio;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCountPremio(BigDecimal countPremio) {
|
public NtbDoct setCountPremio(BigDecimal countPremio) {
|
||||||
this.countPremio = countPremio;
|
this.countPremio = countPremio;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getIdScontr() {
|
public Integer getIdScontr() {
|
||||||
return idScontr;
|
return idScontr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIdScontr(Integer idScontr) {
|
public NtbDoct setIdScontr(Integer idScontr) {
|
||||||
this.idScontr = idScontr;
|
this.idScontr = idScontr;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNumDocVal() {
|
public Integer getNumDocVal() {
|
||||||
return numDocVal;
|
return numDocVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumDocVal(Integer numDocVal) {
|
public NtbDoct setNumDocVal(Integer numDocVal) {
|
||||||
this.numDocVal = numDocVal;
|
this.numDocVal = numDocVal;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFlagChkGg() {
|
public String getFlagChkGg() {
|
||||||
return flagChkGg;
|
return flagChkGg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFlagChkGg(String flagChkGg) {
|
public NtbDoct setFlagChkGg(String flagChkGg) {
|
||||||
this.flagChkGg = flagChkGg;
|
this.flagChkGg = flagChkGg;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getImportatoDa() {
|
public String getImportatoDa() {
|
||||||
return importatoDa;
|
return importatoDa;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setImportatoDa(String importatoDa) {
|
public NtbDoct setImportatoDa(String importatoDa) {
|
||||||
this.importatoDa = importatoDa;
|
this.importatoDa = importatoDa;
|
||||||
}
|
return this;
|
||||||
|
|
||||||
public MtbDepoOper getMtbDepoOper() {
|
|
||||||
return mtbDepoOper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMtbDepoOper(MtbDepoOper mtbDepoOper) {
|
|
||||||
this.mtbDepoOper = mtbDepoOper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbDepoCasse getMtbDepoCasse() {
|
|
||||||
return mtbDepoCasse;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMtbDepoCasse(MtbDepoCasse mtbDepoCasse) {
|
|
||||||
this.mtbDepoCasse = mtbDepoCasse;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<NtbDocr> getNtbDocr() {
|
|
||||||
return ntbDocr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNtbDocr(List<NtbDocr> ntbDocr) {
|
|
||||||
this.ntbDocr = ntbDocr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<NtbDocp> getNtbDocp() {
|
|
||||||
return ntbDocp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNtbDocp(List<NtbDocp> ntbDocp) {
|
|
||||||
this.ntbDocp = ntbDocp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDateOnlyDoc() {
|
public Date getDateOnlyDoc() {
|
||||||
return dateOnlyDoc;
|
return dateOnlyDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDateOnlyDoc(Date dateOnlyDoc) {
|
public NtbDoct setDateOnlyDoc(Date dateOnlyDoc) {
|
||||||
this.dateOnlyDoc = dateOnlyDoc;
|
this.dateOnlyDoc = dateOnlyDoc;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getControllatoDa() {
|
public String getControllatoDa() {
|
||||||
return controllatoDa;
|
return controllatoDa;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setControllatoDa(String controllatoDa) {
|
public NtbDoct setControllatoDa(String controllatoDa) {
|
||||||
this.controllatoDa = controllatoDa;
|
this.controllatoDa = controllatoDa;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataChk() {
|
public Date getDataChk() {
|
||||||
return dataChk;
|
return dataChk;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataChk(Date dataChk) {
|
public NtbDoct setDataChk(Date dataChk) {
|
||||||
this.dataChk = dataChk;
|
this.dataChk = dataChk;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRifOrd() {
|
public String getRifOrd() {
|
||||||
return rifOrd;
|
return rifOrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRifOrd(String rifOrd) {
|
public NtbDoct setRifOrd(String rifOrd) {
|
||||||
this.rifOrd = rifOrd;
|
this.rifOrd = rifOrd;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBarcodeScontrino() {
|
public String getBarcodeScontrino() {
|
||||||
return barcodeScontrino;
|
return barcodeScontrino;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBarcodeScontrino(String barcodeScontrino) {
|
public NtbDoct setBarcodeScontrino(String barcodeScontrino) {
|
||||||
this.barcodeScontrino = barcodeScontrino;
|
this.barcodeScontrino = barcodeScontrino;
|
||||||
}
|
return this;
|
||||||
|
|
||||||
public Date getDataOrd() {
|
|
||||||
return dataOrd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDataOrd(Date dataOrd) {
|
|
||||||
this.dataOrd = dataOrd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumOrd() {
|
|
||||||
return numOrd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumOrd(Integer numOrd) {
|
|
||||||
this.numOrd = numOrd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodVlis() {
|
|
||||||
return codVlis;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodVlis(String codVlis) {
|
|
||||||
this.codVlis = codVlis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getSegueFattura() {
|
public Boolean getSegueFattura() {
|
||||||
@@ -430,6 +399,69 @@ public class NtbDoct extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setDataOrd(Date dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setNumOrd(Integer numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodVlis() {
|
||||||
|
return codVlis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setCodVlis(String codVlis) {
|
||||||
|
this.codVlis = codVlis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbDepoOper getMtbDepoOper() {
|
||||||
|
return mtbDepoOper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setMtbDepoOper(MtbDepoOper mtbDepoOper) {
|
||||||
|
this.mtbDepoOper = mtbDepoOper;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbDepoCasse getMtbDepoCasse() {
|
||||||
|
return mtbDepoCasse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setMtbDepoCasse(MtbDepoCasse mtbDepoCasse) {
|
||||||
|
this.mtbDepoCasse = mtbDepoCasse;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<NtbDocr> getNtbDocr() {
|
||||||
|
return ntbDocr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setNtbDocr(List<NtbDocr> ntbDocr) {
|
||||||
|
this.ntbDocr = ntbDocr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<NtbDocp> getNtbDocp() {
|
||||||
|
return ntbDocp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NtbDoct setNtbDocp(List<NtbDocp> ntbDocp) {
|
||||||
|
this.ntbDocp = ntbDocp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void insertChilds() throws Exception {
|
protected void insertChilds() throws Exception {
|
||||||
for (NtbDocr row : getNtbDocr()) {
|
for (NtbDocr row : getNtbDocr()) {
|
||||||
|
|||||||
@@ -275,10 +275,11 @@ rule "completeValScoArtNtbDocr"
|
|||||||
no-loop
|
no-loop
|
||||||
when
|
when
|
||||||
eval(completeRulesEnabled)
|
eval(completeRulesEnabled)
|
||||||
$entity: NtbDocr(( valScoArt == null || valScoArt == 0 ) && operation != OperationType.DELETE && ntbDocs.size() > 0)
|
$entity: NtbDocr(( valVoucher == null || valVoucher == 0 ) && operation != OperationType.DELETE && ntbDocs.size() > 0)
|
||||||
then
|
then
|
||||||
BigDecimal valScoArt = ReceiptRules.calcValScoArt($entity);
|
BigDecimal valScoArt = ReceiptRules.calcValScoArt($entity);
|
||||||
|
BigDecimal valSco = $entity.getValSco() != null ? $entity.getValSco() : BigDecimal.ZERO;
|
||||||
modify ( $entity ) {
|
modify ( $entity ) {
|
||||||
setValScoArt(valScoArt)
|
setValVoucher(valSco.subtract(valScoArt))
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -1,58 +1,63 @@
|
|||||||
package it.integry.ems.retail.Scontrini.dto;
|
package it.integry.ems.retail.Scontrini.dto;
|
||||||
|
|
||||||
import it.integry.ems_model.annotation.SqlField;
|
import it.integry.ems_model.annotation.SqlField;
|
||||||
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class MMPosDTO {
|
public class MMPosDTO {
|
||||||
@SqlField(value="CODICE")
|
@SqlField(value="CODICE")
|
||||||
private String codice;
|
private String codice;
|
||||||
|
|
||||||
@SqlField(value="CODICOPER")
|
@SqlField(value="CODICOPER")
|
||||||
private String codicoper;
|
private String codiceOper;
|
||||||
|
|
||||||
@SqlField(value="CODINTER")
|
@SqlField(value="CODINTER")
|
||||||
private String codinter;
|
private String codInter;
|
||||||
|
|
||||||
@SqlField(value="CODREP")
|
@SqlField(value="CODREP")
|
||||||
private String codrep;
|
private String codRep;
|
||||||
|
|
||||||
@SqlField(value="DESRIDOT")
|
@SqlField(value="DESRIDOT")
|
||||||
private String desridot;
|
private String desRidot;
|
||||||
|
|
||||||
@SqlField(value="FLAGIDENT")
|
@SqlField(value="FLAGIDENT")
|
||||||
private String flagident;
|
private String flagIdent;
|
||||||
|
|
||||||
@SqlField(value="FLSCANBIL")
|
@SqlField(value="FLSCANBIL")
|
||||||
private String flscanbil;
|
private String flScanBil;
|
||||||
|
|
||||||
@SqlField(value="FLTRANS")
|
@SqlField(value="FLTRANS")
|
||||||
private String fltrans;
|
private String flTrans;
|
||||||
|
|
||||||
@SqlField(value="GIORNO")
|
@SqlField(value="GIORNO")
|
||||||
private String giorno;
|
private String giorno;
|
||||||
|
|
||||||
@SqlField(value="GRMERCP")
|
@SqlField(value="GRMERCP")
|
||||||
private String grmercp;
|
private String grMercP;
|
||||||
|
|
||||||
@SqlField(value="GRPROMOZP")
|
@SqlField(value="GRPROMOZP")
|
||||||
private String grpromozp;
|
private String grPromozp;
|
||||||
|
|
||||||
@SqlField(value="ISCOPY")
|
@SqlField(value="ISCOPY")
|
||||||
private String iscopy;
|
private String isCopy;
|
||||||
|
|
||||||
@SqlField(value="LKIVAP")
|
@SqlField(value="LKIVAP")
|
||||||
private String lkivap;
|
private String lkIvap;
|
||||||
|
|
||||||
@SqlField(value="N_CASSA")
|
@SqlField(value="N_CASSA")
|
||||||
private String n_cassa;
|
private Integer cassa;
|
||||||
|
|
||||||
@SqlField(value="N_SCONTR")
|
@SqlField(value="N_SCONTR")
|
||||||
private String n_scontr;
|
private String numScontr;
|
||||||
|
|
||||||
@SqlField(value="ORA")
|
@SqlField(value="ORA")
|
||||||
private String ora;
|
private String ora;
|
||||||
|
|
||||||
@SqlField(value="PRACQ")
|
@SqlField(value="PRACQ")
|
||||||
private String pracq;
|
private String prAcq;
|
||||||
|
|
||||||
@SqlField(value="PREZZO")
|
@SqlField(value="PREZZO")
|
||||||
private String prezzo;
|
private String prezzo;
|
||||||
@@ -70,22 +75,22 @@ public class MMPosDTO {
|
|||||||
private String idx;
|
private String idx;
|
||||||
|
|
||||||
@SqlField(value="codfascia")
|
@SqlField(value="codfascia")
|
||||||
private String codfascia;
|
private String codFascia;
|
||||||
|
|
||||||
@SqlField(value="key_battuta")
|
@SqlField(value="key_battuta")
|
||||||
private String key_battuta;
|
private String keyBattuta;
|
||||||
|
|
||||||
@SqlField(value="stampato")
|
@SqlField(value="stampato")
|
||||||
private String stampato;
|
private String stampato;
|
||||||
|
|
||||||
@SqlField(value="CodiceScontrino")
|
@SqlField(value="CodiceScontrino")
|
||||||
private String codicescontrino;
|
private String codiceScontrino;
|
||||||
|
|
||||||
@SqlField(value="PREZZONETTO")
|
@SqlField(value="PREZZONETTO")
|
||||||
private String prezzonetto;
|
private BigDecimal prezzoNetto;
|
||||||
|
|
||||||
@SqlField(value="OPTRANS")
|
@SqlField(value="OPTRANS")
|
||||||
private String optrans;
|
private String opTrans;
|
||||||
|
|
||||||
@SqlField(value="VALTRANS")
|
@SqlField(value="VALTRANS")
|
||||||
private String valtrans;
|
private String valtrans;
|
||||||
@@ -97,9 +102,348 @@ public class MMPosDTO {
|
|||||||
private String param2;
|
private String param2;
|
||||||
|
|
||||||
@SqlField(value="KEYS_REF")
|
@SqlField(value="KEYS_REF")
|
||||||
private String keys_ref;
|
private String keysRef;
|
||||||
|
|
||||||
@SqlField(value="CodMagaz.")
|
@SqlField(value="CodMagaz")
|
||||||
private String codmagaz;
|
private String codMagaz;
|
||||||
|
|
||||||
|
@SqlField(value="_codPV.")
|
||||||
|
private String codPv;
|
||||||
|
|
||||||
|
public String getCodice() {
|
||||||
|
return codice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodice(String codice) {
|
||||||
|
this.codice = codice;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodiceOper() {
|
||||||
|
return codiceOper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodiceOper(String codiceOper) {
|
||||||
|
this.codiceOper = codiceOper;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodInter() {
|
||||||
|
return codInter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodInter(String codInter) {
|
||||||
|
this.codInter = codInter;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodRep() {
|
||||||
|
return codRep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodRep(String codRep) {
|
||||||
|
this.codRep = codRep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesRidot() {
|
||||||
|
return desRidot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setDesRidot(String desRidot) {
|
||||||
|
this.desRidot = desRidot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagIdent() {
|
||||||
|
return flagIdent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setFlagIdent(String flagIdent) {
|
||||||
|
this.flagIdent = flagIdent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlScanBil() {
|
||||||
|
return flScanBil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setFlScanBil(String flScanBil) {
|
||||||
|
this.flScanBil = flScanBil;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlTrans() {
|
||||||
|
return flTrans;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setFlTrans(String flTrans) {
|
||||||
|
this.flTrans = flTrans;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiorno() {
|
||||||
|
return giorno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setGiorno(String giorno) {
|
||||||
|
this.giorno = giorno;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrMercP() {
|
||||||
|
return grMercP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setGrMercP(String grMercP) {
|
||||||
|
this.grMercP = grMercP;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrPromozp() {
|
||||||
|
return grPromozp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setGrPromozp(String grPromozp) {
|
||||||
|
this.grPromozp = grPromozp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsCopy() {
|
||||||
|
return isCopy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setIsCopy(String isCopy) {
|
||||||
|
this.isCopy = isCopy;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLkIvap() {
|
||||||
|
return lkIvap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setLkIvap(String lkIvap) {
|
||||||
|
this.lkIvap = lkIvap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCassa() {
|
||||||
|
return cassa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCassa(Integer cassa) {
|
||||||
|
this.cassa = cassa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumScontr() {
|
||||||
|
return numScontr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setNumScontr(String numScontr) {
|
||||||
|
this.numScontr = numScontr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodPv() {
|
||||||
|
return codPv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodPv(String codPv) {
|
||||||
|
this.codPv = codPv;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOra() {
|
||||||
|
return ora;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setOra(String ora) {
|
||||||
|
this.ora = ora;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrAcq() {
|
||||||
|
return prAcq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setPrAcq(String prAcq) {
|
||||||
|
this.prAcq = prAcq;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrezzo() {
|
||||||
|
return prezzo.replace(",", ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setPrezzo(String prezzo) {
|
||||||
|
this.prezzo = prezzo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getImporto() {
|
||||||
|
BigDecimal importo;
|
||||||
|
if (UtilityString.isNullOrEmpty(prezzo)) {
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
importo = new BigDecimal(prezzo);
|
||||||
|
importo = importo.divide(new BigDecimal("100"), 5, RoundingMode.HALF_UP);
|
||||||
|
return importo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQuantita() {
|
||||||
|
return quantita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setQuantita(String quantita) {
|
||||||
|
this.quantita = quantita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public BigDecimal getQtaRow() {
|
||||||
|
BigDecimal qtaRow;
|
||||||
|
if (UtilityString.isNullOrEmpty(quantita)) {
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
qtaRow = new BigDecimal(quantita.trim());
|
||||||
|
qtaRow.divide(new BigDecimal("1000"), 5, RoundingMode.HALF_UP);
|
||||||
|
return qtaRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSegno() {
|
||||||
|
return segno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setSegno(String segno) {
|
||||||
|
this.segno = segno;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValuta() {
|
||||||
|
return valuta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setValuta(String valuta) {
|
||||||
|
this.valuta = valuta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdx() {
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setIdx(String idx) {
|
||||||
|
this.idx = idx;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodFascia() {
|
||||||
|
return codFascia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodFascia(String codFascia) {
|
||||||
|
this.codFascia = codFascia;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeyBattuta() {
|
||||||
|
return keyBattuta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setKeyBattuta(String keyBattuta) {
|
||||||
|
this.keyBattuta = keyBattuta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStampato() {
|
||||||
|
return stampato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setStampato(String stampato) {
|
||||||
|
this.stampato = stampato;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodiceScontrino() {
|
||||||
|
return codiceScontrino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodiceScontrino(String codiceScontrino) {
|
||||||
|
this.codiceScontrino = codiceScontrino;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPrezzoNetto() {
|
||||||
|
return prezzoNetto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setPrezzoNetto(BigDecimal prezzoNetto) {
|
||||||
|
this.prezzoNetto = prezzoNetto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpTrans() {
|
||||||
|
return opTrans;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setOpTrans(String opTrans) {
|
||||||
|
this.opTrans = opTrans;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValtrans() {
|
||||||
|
return valtrans;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setValtrans(String valtrans) {
|
||||||
|
this.valtrans = valtrans;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParam1() {
|
||||||
|
return param1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setParam1(String param1) {
|
||||||
|
this.param1 = param1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParam2() {
|
||||||
|
return param2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setParam2(String param2) {
|
||||||
|
this.param2 = param2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeysRef() {
|
||||||
|
return keysRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setKeysRef(String keysRef) {
|
||||||
|
this.keysRef = keysRef;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMagaz() {
|
||||||
|
return codMagaz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MMPosDTO setCodMagaz(String codMagaz) {
|
||||||
|
this.codMagaz = codMagaz;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (!(o instanceof MMPosDTO)) return false;
|
||||||
|
MMPosDTO mmPosDTO = (MMPosDTO) o;
|
||||||
|
return Objects.equals(getCodice(), mmPosDTO.getCodice()) && Objects.equals(getCodiceOper(), mmPosDTO.getCodiceOper()) && Objects.equals(getCodInter(), mmPosDTO.getCodInter()) && Objects.equals(getCodRep(), mmPosDTO.getCodRep()) && Objects.equals(getDesRidot(), mmPosDTO.getDesRidot()) && Objects.equals(getFlagIdent(), mmPosDTO.getFlagIdent()) && Objects.equals(getFlScanBil(), mmPosDTO.getFlScanBil()) && Objects.equals(getFlTrans(), mmPosDTO.getFlTrans()) && Objects.equals(getGiorno(), mmPosDTO.getGiorno()) && Objects.equals(getGrMercP(), mmPosDTO.getGrMercP()) && Objects.equals(getGrPromozp(), mmPosDTO.getGrPromozp()) && Objects.equals(getIsCopy(), mmPosDTO.getIsCopy()) && Objects.equals(getLkIvap(), mmPosDTO.getLkIvap()) && Objects.equals(getCassa(), mmPosDTO.getCassa()) && Objects.equals(getNumScontr(), mmPosDTO.getNumScontr()) && Objects.equals(getOra(), mmPosDTO.getOra()) && Objects.equals(getPrAcq(), mmPosDTO.getPrAcq()) && Objects.equals(getPrezzo(), mmPosDTO.getPrezzo()) && Objects.equals(getQuantita(), mmPosDTO.getQuantita()) && Objects.equals(getSegno(), mmPosDTO.getSegno()) && Objects.equals(getValuta(), mmPosDTO.getValuta()) && Objects.equals(getIdx(), mmPosDTO.getIdx()) && Objects.equals(getCodFascia(), mmPosDTO.getCodFascia()) && Objects.equals(getKeyBattuta(), mmPosDTO.getKeyBattuta()) && Objects.equals(getStampato(), mmPosDTO.getStampato()) && Objects.equals(getCodiceScontrino(), mmPosDTO.getCodiceScontrino()) && Objects.equals(getPrezzoNetto(), mmPosDTO.getPrezzoNetto()) && Objects.equals(getOpTrans(), mmPosDTO.getOpTrans()) && Objects.equals(getValtrans(), mmPosDTO.getValtrans()) && Objects.equals(getParam1(), mmPosDTO.getParam1()) && Objects.equals(getParam2(), mmPosDTO.getParam2()) && Objects.equals(getKeysRef(), mmPosDTO.getKeysRef()) && Objects.equals(getCodMagaz(), mmPosDTO.getCodMagaz()) && Objects.equals(getCodPv(), mmPosDTO.getCodPv());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(getCodice(), getCodiceOper(), getCodInter(), getCodRep(), getDesRidot(), getFlagIdent(), getFlScanBil(), getFlTrans(), getGiorno(), getGrMercP(), getGrPromozp(), getIsCopy(), getLkIvap(), getCassa(), getNumScontr(), getOra(), getPrAcq(), getPrezzo(), getQuantita(), getSegno(), getValuta(), getIdx(), getCodFascia(), getKeyBattuta(), getStampato(), getCodiceScontrino(), getPrezzoNetto(), getOpTrans(), getValtrans(), getParam1(), getParam2(), getKeysRef(), getCodMagaz(), getCodPv());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,420 @@
|
|||||||
package it.integry.ems.retail.Scontrini.service;
|
package it.integry.ems.retail.Scontrini.service;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import it.integry.common.var.CommonConstants;
|
||||||
import it.integry.ems.Import.dto.AnomalieDTO;
|
import it.integry.ems.Import.dto.AnomalieDTO;
|
||||||
|
import it.integry.ems.retail.Scontrini.dto.MMPosDTO;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.Connection;
|
import it.integry.ems.sync.MultiDBTransaction.Connection;
|
||||||
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
import it.integry.ems_model.base.EntityBase;
|
import it.integry.ems_model.base.EntityBase;
|
||||||
|
import it.integry.ems_model.config.EmsRestConstants;
|
||||||
|
import it.integry.ems_model.entity.NtbDocp;
|
||||||
|
import it.integry.ems_model.entity.NtbDocr;
|
||||||
|
import it.integry.ems_model.entity.NtbDocs;
|
||||||
|
import it.integry.ems_model.entity.NtbDoct;
|
||||||
|
import it.integry.ems_model.service.SetupGest;
|
||||||
|
import it.integry.ems_model.types.OperationType;
|
||||||
|
import it.integry.ems_model.utility.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static java.util.stream.Collectors.groupingBy;
|
||||||
|
|
||||||
|
@Service
|
||||||
public class MmposServices {
|
public class MmposServices {
|
||||||
public List<EntityBase> importScontrini(String fileName, Connection connection, String typeImport, String formatImport, List<AnomalieDTO> anomalie) throws Exception {
|
@Autowired
|
||||||
return null;
|
private SetupGest setupGest;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MultiDBTransactionManager multiDBTransactionManager;
|
||||||
|
|
||||||
|
private List<HashMap<String, String>> elencoPromozioni = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<EntityBase> importScontrini(String typeImport, String formatImport,
|
||||||
|
String whereCond) throws Exception {
|
||||||
|
|
||||||
|
List<EntityBase> list = new ArrayList<>();
|
||||||
|
HashMap<String, String> setupSection = setupGest.getSetupSection(multiDBTransactionManager.getPrimaryConnection(), formatImport, typeImport);
|
||||||
|
|
||||||
|
String profileDb = getGestSetup(formatImport, typeImport, "PROFILE_DB", setupSection);
|
||||||
|
String codAnag = getGestSetup(formatImport, typeImport, "COD_ANAG", setupSection);
|
||||||
|
boolean impostaDatiOrdine = UtilityString.isNull(getGestSetup(formatImport, typeImport, "IMPOSTA_DATI_ORDINE", setupSection), "N").equalsIgnoreCase("S");
|
||||||
|
boolean impostaKit = UtilityString.isNull(getGestSetup(formatImport, typeImport, "IMPOSTA_KIT", setupSection), "N").equalsIgnoreCase("S");
|
||||||
|
|
||||||
|
String sql =
|
||||||
|
"SELECT REPLACE(key_section,'TIPO_INCA_', '') AS flagTrans, value " +
|
||||||
|
" FROM stb_gest_setup " +
|
||||||
|
" WHERE gest_name = 'IMPORT_" + typeImport + "' AND " +
|
||||||
|
" section = " + UtilityDB.valueToString(formatImport) + " AND " +
|
||||||
|
" key_section LIKE 'TIPO_INCA%'";
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> setupTipiIncassi = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||||
|
|
||||||
|
try (MultiDBTransactionManager mmpos = new MultiDBTransactionManager(profileDb)) {
|
||||||
|
sql =
|
||||||
|
"SELECT codice,\n" +
|
||||||
|
" codicoper,\n" +
|
||||||
|
" codinter,\n" +
|
||||||
|
" codrep,\n" +
|
||||||
|
" desridot,\n" +
|
||||||
|
" flagident,\n" +
|
||||||
|
" flscanbil,\n" +
|
||||||
|
" fltrans,\n" +
|
||||||
|
" giorno,\n" +
|
||||||
|
" grmercp,\n" +
|
||||||
|
" grpromozp,\n" +
|
||||||
|
" iscopy,\n" +
|
||||||
|
" lkivap,\n" +
|
||||||
|
" n_cassa,\n" +
|
||||||
|
" n_scontr,\n" +
|
||||||
|
" ora,\n" +
|
||||||
|
" pracq,\n" +
|
||||||
|
" prezzo,\n" +
|
||||||
|
" quantita,\n" +
|
||||||
|
" segno,\n" +
|
||||||
|
" valuta,\n" +
|
||||||
|
" idx,\n" +
|
||||||
|
" codfascia,\n" +
|
||||||
|
" key_battuta,\n" +
|
||||||
|
" stampato,\n" +
|
||||||
|
" codicescontrino,\n" +
|
||||||
|
" prezzonetto,\n" +
|
||||||
|
" optrans,\n" +
|
||||||
|
" valtrans,\n" +
|
||||||
|
" param1,\n" +
|
||||||
|
" param2,\n" +
|
||||||
|
" keys_ref,\n" +
|
||||||
|
" codmagaz,\n" +
|
||||||
|
" venduto._codPV\n" +
|
||||||
|
"FROM venduto\n" +
|
||||||
|
" INNER JOIN relaz_pdv_mag\n" +
|
||||||
|
" ON venduto._codazienda = relaz_pdv_mag._codazienda AND venduto._codpv = relaz_pdv_mag._codpv\n" +
|
||||||
|
"WHERE venduto.fltrans NOT IN ('FS', 'PC', 'SS', 'IP', 'VO', 'BB', 'CP')\n" +
|
||||||
|
"ORDER BY idx\n";
|
||||||
|
sql = UtilityDB.addwhereCond(sql, whereCond, false);
|
||||||
|
|
||||||
|
List<MMPosDTO> mmPosDTOS = UtilityDB.executeSimpleQueryDTO(mmpos.getPrimaryConnection(), sql, MMPosDTO.class);
|
||||||
|
|
||||||
|
Map<HashMap<String, Object>, List<MMPosDTO>> scontrini =
|
||||||
|
mmPosDTOS.stream().collect(groupingBy(x -> {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("codMagaz", x.getCodMagaz());
|
||||||
|
map.put("cassa", x.getCassa());
|
||||||
|
map.put("codiceScontrino", x.getCodiceScontrino());
|
||||||
|
return map;
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
for (Map.Entry<HashMap<String, Object>, List<MMPosDTO>> entry : scontrini.entrySet()) {
|
||||||
|
if (entry.getValue().get(0).getFlTrans().equalsIgnoreCase("IS")) {
|
||||||
|
if (entry.getValue().stream().noneMatch(x -> x.getOpTrans().equalsIgnoreCase("SN"))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NtbDoct ntbDoct = getTestata(mmpos.getPrimaryConnection(), entry.getValue().get(0), codAnag);
|
||||||
|
list.add(ntbDoct);
|
||||||
|
|
||||||
|
for (MMPosDTO row : entry.getValue()) {
|
||||||
|
String flagTrans = row.getFlTrans();
|
||||||
|
if (flagTrans.startsWith("UC") ||
|
||||||
|
"T".equals(flagTrans.substring(0, 1)) ||
|
||||||
|
"AM".equals(flagTrans.substring(0, 2)) ||
|
||||||
|
"AS".equals(flagTrans.substring(0, 2))) {
|
||||||
|
NtbDocp ntbDocp = getPagamenti(row, setupTipiIncassi);
|
||||||
|
if (ntbDocp != null) {
|
||||||
|
ntbDoct.getNtbDocp().add(ntbDocp);
|
||||||
|
}
|
||||||
|
} else if (!flagTrans.equalsIgnoreCase("CS") &&
|
||||||
|
"C".equals(flagTrans.substring(0, 1)) || "R".equals(flagTrans.substring(0, 1))) {
|
||||||
|
NtbDocr ntbDocr = getRow(row, multiDBTransactionManager.getPrimaryConnection(), impostaDatiOrdine, impostaKit, mmpos.getPrimaryConnection());
|
||||||
|
if (ntbDocr != null) {
|
||||||
|
ntbDoct.getNtbDocr().add(ntbDocr);
|
||||||
|
}
|
||||||
|
} else if (flagTrans.equalsIgnoreCase("CS")) {
|
||||||
|
|
||||||
|
NtbDocr lastNtbDocr =
|
||||||
|
ntbDoct.getNtbDocr().isEmpty() ? null : ntbDoct.getNtbDocr().get(ntbDoct.getNtbDocr().size() - 1);
|
||||||
|
if (lastNtbDocr != null) {
|
||||||
|
NtbDocs ntbDocs = getPromozioni(row);
|
||||||
|
if (ntbDocs != null) {
|
||||||
|
lastNtbDocr.getNtbDocs().add(ntbDocs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private NtbDoct getTestata(Connection conn, MMPosDTO row, String codAnag) throws Exception {
|
||||||
|
NtbDoct ntbDoct = new NtbDoct();
|
||||||
|
|
||||||
|
Date date;
|
||||||
|
String flagTrans = row.getFlTrans();
|
||||||
|
String dataString = row.getGiorno().substring(0, 10) + " " + row.getOra();
|
||||||
|
|
||||||
|
try {
|
||||||
|
date = UtilityString.parseDate(dataString);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new Exception("Formato data errato " + dataString);
|
||||||
|
}
|
||||||
|
|
||||||
|
ntbDoct.setOperation(OperationType.INSERT);
|
||||||
|
|
||||||
|
String causale = "";
|
||||||
|
if (flagTrans.startsWith("UC")) {
|
||||||
|
// PRELIEVO/FONDOCASSA
|
||||||
|
causale = "C";
|
||||||
|
} else if (("EP").equals(flagTrans) || ("UP").equals(flagTrans)) {
|
||||||
|
//ENTRATA\USCITA PROGRAMMA
|
||||||
|
causale = flagTrans;
|
||||||
|
} else {
|
||||||
|
causale = "V";
|
||||||
|
}
|
||||||
|
|
||||||
|
ntbDoct.setImportatoDa("EMS");
|
||||||
|
String codMdep = row.getCodMagaz();
|
||||||
|
|
||||||
|
// spostare sulle righe
|
||||||
|
// if (head.length >= 32) {
|
||||||
|
// Boolean segueFattura = head[31].equalsIgnoreCase("1");
|
||||||
|
// receipts.setSegueFattura(segueFattura);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
ntbDoct.setCodOper(row.getCodiceOper())
|
||||||
|
.setDataScontr(date)
|
||||||
|
.setDataDoc(date)
|
||||||
|
.setDataImport(new Date())
|
||||||
|
.setCodAnag(codAnag)
|
||||||
|
.setCodMdep(codMdep)
|
||||||
|
.setCausale(causale)
|
||||||
|
.setCodCassa(row.getCassa().toString())
|
||||||
|
.setIdScontr(Integer.valueOf(row.getNumScontr()));
|
||||||
|
|
||||||
|
if (flagTrans.equalsIgnoreCase("IS")) {
|
||||||
|
ntbDoct.setCodFidelity(row.getCodice());
|
||||||
|
|
||||||
|
if ((row.getOpTrans().equalsIgnoreCase("RESO") || row.getOpTrans().equalsIgnoreCase("RS")) &&
|
||||||
|
!UtilityString.isNullOrEmpty(row.getParam1())) {
|
||||||
|
String sql =
|
||||||
|
Query.format(
|
||||||
|
"SELECT CONVERT(VARCHAR(10), giorno, 103) AS giorno, ora, n_cassa, n_scontr\n" +
|
||||||
|
"FROM venduto\n" +
|
||||||
|
"WHERE venduto.fltrans = %\n" +
|
||||||
|
" AND v.codicescontrino = %\n" +
|
||||||
|
" AND venduto._codpv = %\n",
|
||||||
|
row.getFlTrans(),
|
||||||
|
row.getParam1(),
|
||||||
|
row.getCodPv());
|
||||||
|
|
||||||
|
|
||||||
|
HashMap<String, Object> hashMaps = UtilityDB.executeSimpleQueryOnlyFirstRow(conn, sql);
|
||||||
|
if (UtilityHashMap.isPresent(hashMaps)) {
|
||||||
|
ntbDoct
|
||||||
|
.setDataDocRif(UtilityDate.StringToDate((String) hashMaps.get("giorno") + " " +
|
||||||
|
hashMaps.get("ora"), CommonConstants.DATETIME_FORMAT_DMY_SLASHED))
|
||||||
|
.setCodCassaRif((String) hashMaps.get("n_cassa"))
|
||||||
|
.setNumDocRif((Integer) hashMaps.get("n_scontr"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ntbDoct;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getGestSetup(String formatImport, String typeImport, String key, HashMap<String, String> setupSection) throws Exception {
|
||||||
|
String value = setupSection.get(key);
|
||||||
|
|
||||||
|
if (UtilityString.isNullOrEmpty(value)) {
|
||||||
|
throw new Exception(String.format("Profile db non configurato %s -> %s -> %s", formatImport, typeImport, key));
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getTipoInca(List<HashMap<String, Object>> setupTipiIncassi, String flagTrans, String opTrans) {
|
||||||
|
String codPaga = flagTrans + (UtilityString.isNullOrEmpty(opTrans) ? "" : "_" + opTrans);
|
||||||
|
String tipoInca =
|
||||||
|
Stream.of(setupTipiIncassi)
|
||||||
|
.filter(x -> ((String) UtilityHashMap.getValueIfExists(x, "flagTrans")).equalsIgnoreCase(flagTrans))
|
||||||
|
.map(x -> (String) UtilityHashMap.getValueIfExists(x, "value"))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
return tipoInca;
|
||||||
|
}
|
||||||
|
|
||||||
|
private NtbDocp getPagamenti(MMPosDTO row, List<HashMap<String, Object>> setupTipiIncassi) {
|
||||||
|
NtbDocp ntbDocp = new NtbDocp();
|
||||||
|
|
||||||
|
String segno = row.getSegno();
|
||||||
|
if (row.getFlTrans().equalsIgnoreCase("AM")) {
|
||||||
|
segno = "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal importo = row.getImporto();
|
||||||
|
if (("-").equals(segno)) {
|
||||||
|
importo = importo.negate();
|
||||||
|
}
|
||||||
|
ntbDocp.setImpPaga(importo);
|
||||||
|
String tipoInca = getTipoInca(setupTipiIncassi, row.getFlTrans(), row.getOpTrans());
|
||||||
|
ntbDocp.setTipoInca(tipoInca);
|
||||||
|
return ntbDocp;
|
||||||
|
}
|
||||||
|
|
||||||
|
private NtbDocr getRow(MMPosDTO row, Connection connection, boolean impostaDatiOrdine, boolean impostaKit, Connection mmPosConn) throws Exception {
|
||||||
|
NtbDocr ntbDocr = new NtbDocr();
|
||||||
|
ntbDocr
|
||||||
|
.setBarCode(row.getCodice().trim())
|
||||||
|
.setCodMart(row.getCodInter().trim())
|
||||||
|
.setReparto(row.getCodRep().trim())
|
||||||
|
.setDescrizione(row.getDesRidot().trim());
|
||||||
|
|
||||||
|
String promozione = row.getKeysRef();
|
||||||
|
|
||||||
|
if ((!UtilityString.isNullOrEmpty(promozione)) && !("NULL").equalsIgnoreCase(promozione)) {
|
||||||
|
String finalPromozione = promozione;
|
||||||
|
HashMap<String, String> datiPromo = Stream.of(elencoPromozioni)
|
||||||
|
.filter(x -> UtilityHashMap.getValueIfExists(x, finalPromozione) != null).findFirst().orElse(null);
|
||||||
|
|
||||||
|
if (datiPromo != null) {
|
||||||
|
promozione = datiPromo.get(finalPromozione);
|
||||||
|
} else {
|
||||||
|
String sqlPromo =
|
||||||
|
"SELECT vtb_list_data.cod_promo " +
|
||||||
|
" FROM vtb_list_data INNER JOIN mtb_depo on mtb_depo.cod_vlis = vtb_list_data.cod_vlis " +
|
||||||
|
" WHERE vtb_list_data.cod_vlis + '_' + Cast(vtb_list_data.versione as varchar ) + '_0-F' = " + UtilityDB.valueToString(promozione) + " AND " +
|
||||||
|
"mtb_depo.cod_vlis = " + UtilityDB.valueToString(row.getCodMagaz());
|
||||||
|
|
||||||
|
String codPromoWingest = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sqlPromo);
|
||||||
|
if (!UtilityString.isNullOrEmpty(codPromoWingest)) {
|
||||||
|
HashMap<String, String> p = new HashMap<>();
|
||||||
|
p.put(promozione, codPromoWingest);
|
||||||
|
elencoPromozioni.add(p);
|
||||||
|
promozione = codPromoWingest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ntbDocr.setPromozione(promozione == null ? EmsRestConstants.NULL : promozione);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntbDocr.setPromozione(EmsRestConstants.NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal qtaDoc = row.getQtaRow();
|
||||||
|
String segno = row.getSegno();
|
||||||
|
|
||||||
|
BigDecimal importo = row.getImporto();
|
||||||
|
if (("-").equals(segno)) {
|
||||||
|
qtaDoc = qtaDoc.negate();
|
||||||
|
importo = importo.negate();
|
||||||
|
}
|
||||||
|
ntbDocr.setQtaDoc(qtaDoc);
|
||||||
|
|
||||||
|
BigDecimal przUnt;
|
||||||
|
if (qtaDoc.compareTo(BigDecimal.ZERO) == 0 && importo.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
przUnt = BigDecimal.ZERO;
|
||||||
|
} else if (qtaDoc.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
przUnt = importo;
|
||||||
|
} else {
|
||||||
|
przUnt = importo.divide(qtaDoc, 5, RoundingMode.HALF_UP);
|
||||||
|
przUnt = przUnt.setScale(5, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
ntbDocr.setPrzUntIva(przUnt);
|
||||||
|
|
||||||
|
if (row.getFlTrans().equalsIgnoreCase("CV")) {
|
||||||
|
if (row.getParam1() != null) {
|
||||||
|
try {
|
||||||
|
int param1 = Integer.parseInt(row.getParam1());
|
||||||
|
if (param1 != 0) {
|
||||||
|
BigDecimal prezzo = row.getPrezzo() != null ? row.getImporto() : BigDecimal.ZERO;
|
||||||
|
BigDecimal prezzonetto = row.getPrezzoNetto() != null ? row.getPrezzoNetto() : BigDecimal.ZERO;
|
||||||
|
BigDecimal quantita = row.getQuantita() != null ? row.getQtaRow() : BigDecimal.ZERO;
|
||||||
|
BigDecimal valsco = prezzo.subtract(
|
||||||
|
prezzonetto.divide(new BigDecimal(param1), 5, RoundingMode.HALF_UP)
|
||||||
|
.multiply(quantita)
|
||||||
|
);
|
||||||
|
ntbDocr.setValSco(valsco);
|
||||||
|
} else {
|
||||||
|
ntbDocr.setValSco(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
ntbDocr.setValSco(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
BigDecimal prezzo = row.getPrezzo() != null ? row.getImporto() : BigDecimal.ZERO;
|
||||||
|
BigDecimal prezzonetto = row.getPrezzoNetto() != null ? row.getPrezzoNetto() : BigDecimal.ZERO;
|
||||||
|
ntbDocr.setValSco(prezzo.subtract(prezzonetto));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (impostaKit && !UtilityString.isNullOrEmpty(row.getOpTrans())) {
|
||||||
|
ntbDocr.setCodKit(row.getOpTrans());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (impostaDatiOrdine) {
|
||||||
|
String sql = "";
|
||||||
|
HashMap<String, Object> datiOrdSc = UtilityDB.executeSimpleQueryOnlyFirstRow(mmPosConn, sql);
|
||||||
|
|
||||||
|
if (datiOrdSc != null && !datiOrdSc.isEmpty()) {
|
||||||
|
sql =
|
||||||
|
Query.format(
|
||||||
|
"SELECT venduto.param1 AS num_ord\n" +
|
||||||
|
"FROM venduto\n" +
|
||||||
|
"WHERE venduto._codpv = %s\n" +
|
||||||
|
" AND venduto.n_cassa = %s\n" +
|
||||||
|
" AND venduto.fltrans = 'CP'\n" +
|
||||||
|
" AND venduto.desridot LIKE '%ORDINE%'\n" +
|
||||||
|
" AND venduto.codicescontrino = %s\n" +
|
||||||
|
"GROUP BY venduto._codpv,\n" +
|
||||||
|
" venduto.n_cassa,\n" +
|
||||||
|
" venduto.codicescontrino,\n" +
|
||||||
|
" venduto.param1\n" +
|
||||||
|
"HAVING %s BETWEEN \n" +
|
||||||
|
" MAX(CASE WHEN venduto.desridot = 'INIZIO ORDINE' THEN idx ELSE NULL END) AND \n" +
|
||||||
|
" MAX(CASE WHEN venduto.desridot = 'FINE ORDINE' THEN idx ELSE NULL END)\n",
|
||||||
|
row.getCodPv(), row.getCassa(), row.getCodiceScontrino(), row.getIdx());
|
||||||
|
|
||||||
|
String numOrdSc = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(mmPosConn, sql);
|
||||||
|
if (!UtilityString.isNullOrEmpty(numOrdSc) && !("NULL").equalsIgnoreCase(numOrdSc)) {
|
||||||
|
String sqlNumOrd =
|
||||||
|
"SELECT TOP 1 dtb_ordt.data_ord, dtb_ordt.num_ord " +
|
||||||
|
" FROM dtb_ordt INNER JOIN dtb_ordr on dtb_ordt.gestione = dtb_ordr.gestione AND dtb_ordt.data_ord = dtb_ordr.data_ord AND dtb_ordt.num_ord = dtb_ordr.num_ord " +
|
||||||
|
" WHERE dtb_ordt.cod_mdep = " + UtilityDB.valueToString(row.getCodMagaz()) + " AND " +
|
||||||
|
" dtb_ordt.gestione = 'V' AND " +
|
||||||
|
" dtb_ordt.num_ord = " + numOrdSc + " AND " +
|
||||||
|
" dtb_ordr.cod_mart = " + UtilityDB.valueToString(row.getCodInter()) +
|
||||||
|
" ORDER BY dtb_ordt.data_ord desc ";
|
||||||
|
|
||||||
|
HashMap<String, Object> datiOrdine = UtilityDB.executeSimpleQueryOnlyFirstRow(connection, sqlNumOrd);
|
||||||
|
if (datiOrdine != null && !datiOrdine.isEmpty()) {
|
||||||
|
ntbDocr.setDataOrd((Date) datiOrdine.get("data_ord"))
|
||||||
|
.setNumOrd((Integer) datiOrdine.get("num_ord"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String opTrans = row.getOpTrans().toUpperCase();
|
||||||
|
if (UtilityString.isNullOrEmpty(opTrans) && !opTrans.startsWith("ORD")) {
|
||||||
|
ntbDocr.setCausaleReso(opTrans);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ntbDocr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private NtbDocs getPromozioni(MMPosDTO row) {
|
||||||
|
NtbDocs ntbDocs = new NtbDocs()
|
||||||
|
.setPromozione(row.getOpTrans())
|
||||||
|
.setValSco(row.getImporto());
|
||||||
|
return ntbDocs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import it.integry.ems.response.ServiceRestResponse;
|
|||||||
import it.integry.ems.response.StatusResponse;
|
import it.integry.ems.response.StatusResponse;
|
||||||
import it.integry.ems.retail.ReportVariazioni.dto.VariazioniPvInputDTO;
|
import it.integry.ems.retail.ReportVariazioni.dto.VariazioniPvInputDTO;
|
||||||
import it.integry.ems.retail.ReportVariazioni.service.VariazioniPvService;
|
import it.integry.ems.retail.ReportVariazioni.service.VariazioniPvService;
|
||||||
|
import it.integry.ems.retail.Scontrini.service.MmposServices;
|
||||||
import it.integry.ems.retail.dto.IntegRetailRequestDTO;
|
import it.integry.ems.retail.dto.IntegRetailRequestDTO;
|
||||||
import it.integry.ems.retail.export.VariazioniExporter;
|
import it.integry.ems.retail.export.VariazioniExporter;
|
||||||
import it.integry.ems.retail.pvmRetail.controller.PvmController;
|
import it.integry.ems.retail.pvmRetail.controller.PvmController;
|
||||||
@@ -59,6 +60,7 @@ public class RetailController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||||
|
private MmposServices mmposServices;
|
||||||
|
|
||||||
@RequestMapping(value = "/retail/status", method = RequestMethod.GET)
|
@RequestMapping(value = "/retail/status", method = RequestMethod.GET)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
@@ -193,5 +195,12 @@ public class RetailController {
|
|||||||
return response;
|
return response;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@PostMapping(value = "/importScontriniMMPOS")
|
||||||
|
public @ResponseBody
|
||||||
|
ServiceRestResponse importScontriniMMPOS(@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||||
|
@RequestParam(value = "whereCond", required = false) String whereCond) throws Exception {
|
||||||
|
|
||||||
|
return ServiceRestResponse.createEntityPositiveResponse(mmposServices.importScontrini("SCONTRINI", "MMPOS", whereCond));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user