Merge branch 'develop' into feature/Feature-ORDL
This commit is contained in:
@@ -19,7 +19,8 @@ public class Migration_20240805105151 extends BaseMigration implements Migration
|
||||
" select replace(key_section, 'GENERA_LOTTO_AUTOMATICO_DEP_', '') as cod_mdep,\n" +
|
||||
" gest_name, section,\n" +
|
||||
" 'GENERA_LOTTO_AUTOMATICO' as key_section, value, flag_sync\n" +
|
||||
" from stb_gest_setup where key_section like 'GENERA_LOTTO_AUTOMATICO_DEP_%'");
|
||||
" from stb_gest_setup where key_section like 'GENERA_LOTTO_AUTOMATICO_DEP_%'\n"+
|
||||
"and exists(select * from mtb_depo where cod_mdep = replace(key_section, 'GENERA_LOTTO_AUTOMATICO_DEP_', '') )");
|
||||
|
||||
executeStatement("delete\n" +
|
||||
" from stb_gest_setup where key_section like 'GENERA_LOTTO_AUTOMATICO_DEP_%'");
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
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_20240805120814 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String value = null;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano)) {
|
||||
value = "S";
|
||||
}
|
||||
|
||||
createSetup("PVM", "DELIVERY_PLAN", "MOSTRA_VALORE_MERCE",
|
||||
value, "Flag per mostrare o meno il dettaglio del valore della merce del giorno.", "SI_NO"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240805154541 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("CREATE TABLE vtb_vett_targhe\n" +
|
||||
" (cod_vvet varchar(5) not null, targa varchar(20) not null, tipo varchar(20),\n"+
|
||||
"CONSTRAINT PK_vtb_vett_targhe PRIMARY KEY (cod_vvet,targa),\n"+
|
||||
"FOREIGN KEY (cod_vvet) REFERENCES vtb_vett(cod_vvet));");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240806125019 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomer(IntegryCustomer.RossoGargano)) {
|
||||
executeStatement("\n" +
|
||||
"INSERT INTO vtb_vett_targhe (cod_vvet,targa)\n" +
|
||||
"select * from (\n" +
|
||||
"select cod_vvet, targa\n" +
|
||||
"from dtb_doct where targa is not null and cod_vvet is not null\n" +
|
||||
"union\n" +
|
||||
"select cod_vvet, targa_rim\n" +
|
||||
"from dtb_doct where targa_rim is not null and cod_vvet is not null ) t\n" +
|
||||
"except\n" +
|
||||
"select cod_vvet, targa from vtb_vett_targhe");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -250,14 +250,21 @@ public class PrinterService {
|
||||
}
|
||||
byte[] bytes = reportProcessor.processReportType(reportTypeDTO);
|
||||
if (bytes != null) {
|
||||
Orientation orientation = Orientation.AUTO;
|
||||
Orientation orientation;
|
||||
|
||||
switch (impostazioniStampa.getOrientation()) {
|
||||
case PORTRAIT:
|
||||
orientation = Orientation.PORTRAIT;
|
||||
break;
|
||||
|
||||
break;
|
||||
case LANDSCAPE:
|
||||
orientation = Orientation.LANDSCAPE;
|
||||
|
||||
break;
|
||||
default:
|
||||
case AUTO:
|
||||
orientation = Orientation.AUTO;
|
||||
|
||||
break;
|
||||
}
|
||||
numberOfCopies = numberOfCopies == null ? 1 : numberOfCopies;
|
||||
|
||||
@@ -27,7 +27,6 @@ import net.sf.jasperreports.engine.util.JRXmlUtils;
|
||||
import net.sf.jasperreports.engine.xml.JRXmlLoader;
|
||||
import net.sf.jasperreports.export.SimpleExporterInput;
|
||||
import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput;
|
||||
import net.sf.jasperreports.export.SimplePdfExporterConfiguration;
|
||||
import net.sf.jasperreports.export.SimpleXlsxReportConfiguration;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@@ -363,7 +362,7 @@ public class ReportProcessor {
|
||||
jasperReportsContext.setProperty("net.sf.jasperreports.query.executer.factory.xmla-mdx", "net.sf.jasperreports.engine.query.JRXmlaQueryExecuterFactory");
|
||||
|
||||
JasperDesign jasperDesign = JRXmlLoader.load(pathJrxml);
|
||||
JasperPrint jp = null;
|
||||
JasperPrint jp;
|
||||
|
||||
if (javaBeans != null) {
|
||||
hm_parameters.put("REPORT_CONNECTION", multiDBTransactionManager.getPrimaryConnection());
|
||||
|
||||
@@ -77,6 +77,9 @@ public class VtbVett extends EntityBase {
|
||||
@EntityChild
|
||||
private List<VtbVetr> vtbVetr;
|
||||
|
||||
@EntityChild
|
||||
private List<VtbVettTarghe> vtbVettTarghe;
|
||||
|
||||
private String precode;
|
||||
|
||||
public VtbVett() {
|
||||
@@ -228,14 +231,6 @@ public class VtbVett extends EntityBase {
|
||||
this.numAutoriz = numAutoriz;
|
||||
}
|
||||
|
||||
public List<VtbVetr> getVtbVetr() {
|
||||
return vtbVetr;
|
||||
}
|
||||
|
||||
public void setVtbVetr(List<VtbVetr> vtbVetr) {
|
||||
this.vtbVetr = vtbVetr;
|
||||
}
|
||||
|
||||
public String getPrecode() {
|
||||
return precode;
|
||||
}
|
||||
@@ -245,23 +240,27 @@ public class VtbVett extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insertChilds() throws Exception {
|
||||
for (VtbVetr vtbVetr : getVtbVetr()) {
|
||||
vtbVetr.manageWithParentConnection(connection, vtbVetr.getOperation(), dataCompleting, entityHolder);
|
||||
}
|
||||
public List<VtbVetr> getVtbVetr() {
|
||||
return vtbVetr;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateChilds() throws Exception {
|
||||
for (VtbVetr vtbVetr : getVtbVetr()) {
|
||||
vtbVetr.manageWithParentConnection(connection, vtbVetr.getOperation(), dataCompleting, entityHolder);
|
||||
}
|
||||
public void setVtbVetr(List<VtbVetr> vtbVetr) {
|
||||
this.vtbVetr = vtbVetr;
|
||||
}
|
||||
|
||||
public List<VtbVettTarghe> getVtbVettTarghe() {
|
||||
return vtbVettTarghe;
|
||||
}
|
||||
|
||||
public void setVtbVettTarghe(List<VtbVettTarghe> vtbVettTarghe) {
|
||||
this.vtbVettTarghe = vtbVettTarghe;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteChilds() throws Exception {
|
||||
VtbVetr vtbVetr = new VtbVetr();
|
||||
vtbVetr.deleteAllEntities(connection, this);
|
||||
VtbVettTarghe vtbVettTarghe = new VtbVettTarghe();
|
||||
vtbVettTarghe.deleteAllEntities(connection, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.FK;
|
||||
|
||||
|
||||
@PropertyReactive()
|
||||
@Table(value = VtbVettTarghe.ENTITY)
|
||||
@JsonTypeName(value = VtbVettTarghe.ENTITY)
|
||||
public class VtbVettTarghe extends EntityBase {
|
||||
|
||||
public final static String ENTITY = "vtb_vett_targhe";
|
||||
|
||||
private final static long serialVersionUID = 1L;
|
||||
|
||||
@PK()
|
||||
@SqlField(value = "cod_vvet", maxLength = 5, nullable = false)
|
||||
@FK(tableName = VtbVett.ENTITY, columnName = "cod_vvet")
|
||||
private String codVvet;
|
||||
|
||||
@PK()
|
||||
@SqlField(value = "targa", maxLength = 20, nullable = false)
|
||||
private String targa;
|
||||
|
||||
@SqlField(value = "tipo", maxLength = 20, nullable = true)
|
||||
private String tipo;
|
||||
|
||||
public String getCodVvet() {
|
||||
return codVvet;
|
||||
}
|
||||
|
||||
public VtbVettTarghe setCodVvet(String codVvet) {
|
||||
this.codVvet = codVvet;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTarga() {
|
||||
return targa;
|
||||
}
|
||||
|
||||
public VtbVettTarghe setTarga(String targa) {
|
||||
this.targa = targa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTipo() {
|
||||
return tipo;
|
||||
}
|
||||
|
||||
public VtbVettTarghe setTipo(String tipo) {
|
||||
this.tipo = tipo;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -119,13 +119,18 @@ public class WtbJreptSetup extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public enum Tipo implements IBaseEnum {
|
||||
public enum Tipo implements IBaseEnum<Tipo> {
|
||||
ETICHETTA_SSCC_ACCETTAZIONE((short) 0),
|
||||
ETICHETTA_SSCC_LAVORAZIONE((short) 1),
|
||||
ETICHETTA_SSCC_SPEDIZIONE((short) 2),
|
||||
WMS_SPEDIZIONE_PACKING_LIST_ORD((short) 4),
|
||||
STAMPA_LISTINI_VENDITA((short) 5),
|
||||
STAMPA_LISTINI_VENDITA_RANGE_PEDANE((short) 6),
|
||||
STAMPA_ORDINE_LAVORAZIONE((short) 7);
|
||||
|
||||
ETICHETTA_SSCC_ACCETTAZIONE(0), ETICHETTA_SSCC_LAVORAZIONE(1), ETICHETTA_SSCC_SPEDIZIONE(2), WMS_SPEDIZIONE_PACKING_LIST_ORD(4), STAMPA_LISTINI_VENDITA(5), STAMPA_LISTINI_VENDITA_RANGE_PEDANE(6);
|
||||
private final short value;
|
||||
|
||||
private final int value;
|
||||
|
||||
Tipo(int value) {
|
||||
Tipo(short value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@@ -150,18 +155,19 @@ public class WtbJreptSetup extends EntityBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object fromInternal(Object val) {
|
||||
public Tipo fromInternal(Object val) {
|
||||
return from(val);
|
||||
}
|
||||
}
|
||||
|
||||
public enum Orientation implements IBaseEnum {
|
||||
public enum Orientation implements IBaseEnum<Orientation> {
|
||||
PORTRAIT((short) 0),
|
||||
LANDSCAPE((short) 1),
|
||||
AUTO((short) 2);
|
||||
|
||||
PORTRAIT(0), LANDSCAPE(1);
|
||||
private final short value;
|
||||
|
||||
private final int value;
|
||||
|
||||
Orientation(int value) {
|
||||
Orientation(short value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@@ -185,7 +191,7 @@ public class WtbJreptSetup extends EntityBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object fromInternal(Object val) {
|
||||
public Orientation fromInternal(Object val) {
|
||||
return from(val);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -323,6 +323,17 @@ public class EmsEngineController {
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "retrieveWtbJreptSetupOrientations", method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse retrieveWtbJreptSetupOrientations() {
|
||||
HashMap<Integer, String> orientations = new HashMap<>();
|
||||
|
||||
for (WtbJreptSetup.Orientation orientation : WtbJreptSetup.Orientation.values()) {
|
||||
orientations.put(orientation.getValue(), orientation.toString());
|
||||
}
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(orientations);
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_JTB_DISEGNI_FILES, method = RequestMethod.GET, produces = "application/octet-stream")
|
||||
public byte[] downloadJtbDisegniFiles(HttpServletRequest request, HttpServletResponse response,
|
||||
|
||||
@@ -748,14 +748,21 @@ public class MesProductionServiceV2 {
|
||||
|
||||
logger.debug("L'orientazione è: " + (jasperDTO.getOrientation() == WtbJreptSetup.Orientation.PORTRAIT ? "PORTRAIT" : "LANDSCAPE"));
|
||||
|
||||
Orientation orientation = Orientation.AUTO;
|
||||
Orientation orientation;
|
||||
|
||||
switch (jasperDTO.getOrientation()) {
|
||||
case PORTRAIT:
|
||||
orientation = Orientation.PORTRAIT;
|
||||
break;
|
||||
|
||||
break;
|
||||
case LANDSCAPE:
|
||||
orientation = Orientation.LANDSCAPE;
|
||||
|
||||
break;
|
||||
default:
|
||||
case AUTO:
|
||||
orientation = Orientation.AUTO;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user