aggiunte classi per stampa scheda costi
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
package it.integry.core.report_javabean.model.scheda_costi;
|
||||
|
||||
public class StampaSchedaCostiDTO {
|
||||
|
||||
private String codMart;
|
||||
private String descrArt;
|
||||
private String untMis;
|
||||
private String codVlis;
|
||||
private String descrLisv;
|
||||
private Integer sort;
|
||||
private Integer gruppo;
|
||||
private String descrizioneGruppo;
|
||||
private String categoria;
|
||||
private String descrCosto;
|
||||
private String qtaQrod;
|
||||
private String costoUnit;
|
||||
private String valore;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrArt() {
|
||||
return descrArt;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setDescrArt(String descrArt) {
|
||||
this.descrArt = descrArt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getQtaQrod() {
|
||||
return qtaQrod;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setQtaQrod(String qtaQrod) {
|
||||
this.qtaQrod = qtaQrod;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCostoUnit() {
|
||||
return costoUnit;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setCostoUnit(String costoUnit) {
|
||||
this.costoUnit = costoUnit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getValore() {
|
||||
return valore;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setValore(String valore) {
|
||||
this.valore = valore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodVlis() {
|
||||
return codVlis;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setCodVlis(String codVlis) {
|
||||
this.codVlis = codVlis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrLisv() {
|
||||
return descrLisv;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setDescrLisv(String descrLisv) {
|
||||
this.descrLisv = descrLisv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGruppo() {
|
||||
return gruppo;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setGruppo(Integer gruppo) {
|
||||
this.gruppo = gruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizioneGruppo() {
|
||||
return descrizioneGruppo;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setDescrizioneGruppo(String descrizioneGruppo) {
|
||||
this.descrizioneGruppo = descrizioneGruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCategoria() {
|
||||
return categoria;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setCategoria(String categoria) {
|
||||
this.categoria = categoria;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrCosto() {
|
||||
return descrCosto;
|
||||
}
|
||||
|
||||
public StampaSchedaCostiDTO setDescrCosto(String descrCosto) {
|
||||
this.descrCosto = descrCosto;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package it.integry.core.report_javabean.model.scheda_costi;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import it.integry.core.report_javabean.UtilityReportJavabean;
|
||||
import it.integry.core.report_javabean.model.base.BaseReportJavabean;
|
||||
import it.integry.core.report_javabean.model.base.IReportJavabean;
|
||||
import it.integry.core.report_javabean.model.exception.NoPageProcessedException;
|
||||
import it.integry.core.report_javabean.model.stampa_inventario.StampaInventarioDTO;
|
||||
import it.integry.ems.json.JSONObjectMapper;
|
||||
import it.integry.ems.report.dto.JasperDTO;
|
||||
import it.integry.ems.retail.wms.inventario.dto.InventarioArtDTO;
|
||||
import it.integry.ems.retail.wms.inventario.service.WMSInventarioService;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class StampaSchedaCostiJavabean extends BaseReportJavabean implements IReportJavabean {
|
||||
|
||||
public static void testRun(java.util.Vector collection) {
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yy");
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
StampaSchedaCostiDTO dto = new StampaSchedaCostiDTO();
|
||||
// dto.setCodMart("abc")
|
||||
// .setCodMdep("pc")
|
||||
// .setDescrDepo("dadsa")
|
||||
// .setDescrArt("aa");
|
||||
collection.add(dto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void register() {
|
||||
UtilityReportJavabean.registerJavabean("StampaSchedaCosti", StampaSchedaCostiJavabean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] process(JasperDTO jasperDTO) throws Exception {
|
||||
HashMap<String, Object> paramsMap = reportProcessor.createParamsFromList(jasperDTO.getParams());
|
||||
|
||||
List<Object> javaBeans = this.run(paramsMap);
|
||||
|
||||
if (javaBeans != null) {
|
||||
jasperDTO.setJavaBeans(javaBeans);
|
||||
return reportProcessor.processReport(jasperDTO);
|
||||
}
|
||||
|
||||
|
||||
throw new NoPageProcessedException();
|
||||
}
|
||||
|
||||
|
||||
public List<Object> run(HashMap<String, Object> paramsMap) throws Exception {
|
||||
|
||||
List<Object> stampaSchedaCostiDTOS = new ArrayList<Object>();
|
||||
|
||||
String sql =
|
||||
"select mtb_lisv_data.cod_mart, ISNULL( mtb_lisv_data.descrizione_html, IsNull(mtb_aart.descrizione_estesa, mtb_aart.descrizione)) as descr_art,\n" +
|
||||
"mtb_lisv_data.system_note, mtb_lisv_data.unt_mis_ven, mtb_lisv_data.cod_vlis, vtb_list.descrizione as descr_lisv\n" +
|
||||
"from mtb_lisv_data inner join mtb_aart on mtb_lisv_data.cod_mart = mtb_aart.cod_mart\n" +
|
||||
"inner join vtb_list on mtb_lisv_data.cod_vlis = vtb_list.cod_vlis\n" +
|
||||
"where system_note is not null\n" +
|
||||
"and mtb_lisv_data.cod_mart = 'CEB5NAZDOLC'\n" +
|
||||
"and mtb_lisv_data.cod_vlis = 'C1086'\n" +
|
||||
"and versione = 30\n";
|
||||
|
||||
|
||||
HashMap<String, Object> dati = UtilityDB.executeSimpleQueryOnlyFirstRow(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
if (dati.isEmpty()) return null;
|
||||
|
||||
StampaSchedaCostiDTO stampaSchedaCostiDTO = new StampaSchedaCostiDTO()
|
||||
.setCodMart(UtilityHashMap.getValueIfExists(dati, "cod_mart"))
|
||||
.setDescrArt(UtilityHashMap.getValueIfExists(dati, "descr_art"))
|
||||
.setCodVlis(UtilityHashMap.getValueIfExists(dati, "cod_vlis"))
|
||||
.setDescrLisv(UtilityHashMap.getValueIfExists(dati, "descr_lisv"));
|
||||
|
||||
String systemNote = UtilityHashMap.getValueIfExists(dati, "system_note");
|
||||
if (!UtilityString.isNullOrEmpty(systemNote)) {
|
||||
|
||||
}
|
||||
|
||||
stampaSchedaCostiDTOS.add(stampaSchedaCostiDTO);
|
||||
|
||||
return stampaSchedaCostiDTOS;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1043,7 +1043,9 @@ public class RossoGarganoSyncService {
|
||||
ctbMovt.setCtbPart(ctbPart);
|
||||
}
|
||||
|
||||
private List<CtbScad> pagaScadenze(String pnPartita, String tipoAnag, String codAnag, CtbMovt ctbMovt, BigDecimal impIncasso, String pnSegnoMovimento, CtbMovr ctbMovr) throws Exception {
|
||||
private List<CtbScad> pagaScadenze(String pnPartita, String tipoAnag, String codAnag, CtbMovt ctbMovt, BigDecimal impIncasso,
|
||||
String pnSegnoMovimento,
|
||||
CtbMovr ctbMovr) throws Exception {
|
||||
String anno = null;
|
||||
if (UtilityString.isNumber(pnPartita.substring(0, 2)))
|
||||
anno = "20" + pnPartita.substring(0, 2);
|
||||
|
||||
Reference in New Issue
Block a user