Commit 4ec0e239bf4ebde146f2e18dbd3464dd769d3807

Authored by luis.camargo
2 parents 9b32cbd1 57f7d000
Exists in master

Merge branch 'tarefa-4115' of http://ferramentasgo.centralit.com.br:8080/scm/git…

…/cit-grp-contratos into tarefa-4115

# Conflicts:
#	cit-contratos-web/src/main/java/br/com/centralit/controller/ContratoEventoController.java
#	cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ConsultaRelatoriosController.js
cit-contratos-api/src/main/java/br/com/centralit/api/dao/impl/RegistroOcorrenciaDaoHibernate.java
@@ -44,22 +44,17 @@ public class RegistroOcorrenciaDaoHibernate extends CitGenericDAOImpl implements @@ -44,22 +44,17 @@ public class RegistroOcorrenciaDaoHibernate extends CitGenericDAOImpl implements
44 return this.search(search, this.persistentClass); 44 return this.search(search, this.persistentClass);
45 } 45 }
46 46
  47 + @Override
47 public PersistentObject buscarUltimoRegistroPorDataEmissao(String property, Calendar dataEmissaoOcorrencia, Long idOrganizacao) { 48 public PersistentObject buscarUltimoRegistroPorDataEmissao(String property, Calendar dataEmissaoOcorrencia, Long idOrganizacao) {
48 49
49 int anoInformado = dataEmissaoOcorrencia.get(Calendar.YEAR); 50 int anoInformado = dataEmissaoOcorrencia.get(Calendar.YEAR);
50 51
51 Calendar dataInicial = Calendar.getInstance(); 52 Calendar dataInicial = Calendar.getInstance();
52 - dataInicial.set(anoInformado, Calendar.JANUARY, 1);  
53 - dataInicial.set(Calendar.HOUR_OF_DAY,00);  
54 - dataInicial.set(Calendar.MINUTE,00);  
55 - dataInicial.set(Calendar.SECOND,00); 53 + dataInicial.set(anoInformado, Calendar.JANUARY, 1, 00, 00, 00);
56 dataInicial.set(Calendar.MILLISECOND,0); 54 dataInicial.set(Calendar.MILLISECOND,0);
57 55
58 Calendar dataFinal = Calendar.getInstance(); 56 Calendar dataFinal = Calendar.getInstance();
59 - dataFinal.set(anoInformado, Calendar.DECEMBER, 31);  
60 - dataFinal.set(Calendar.HOUR_OF_DAY,23);  
61 - dataFinal.set(Calendar.MINUTE,59);  
62 - dataFinal.set(Calendar.SECOND,59); 57 + dataFinal.set(anoInformado, Calendar.DECEMBER, 31, 23, 59, 59);
63 dataFinal.set(Calendar.MILLISECOND,999); 58 dataFinal.set(Calendar.MILLISECOND,999);
64 59
65 Search search = new Search(); 60 Search search = new Search();
@@ -91,4 +86,4 @@ public class RegistroOcorrenciaDaoHibernate extends CitGenericDAOImpl implements @@ -91,4 +86,4 @@ public class RegistroOcorrenciaDaoHibernate extends CitGenericDAOImpl implements
91 return totalGlosa; 86 return totalGlosa;
92 } 87 }
93 88
94 -} 89 -}
  90 +}
95 \ No newline at end of file 91 \ No newline at end of file
cit-contratos-api/src/main/java/br/com/centralit/api/service/ContratoService.java
@@ -72,6 +72,4 @@ public interface ContratoService extends GenericService<Contrato, Long> { @@ -72,6 +72,4 @@ public interface ContratoService extends GenericService<Contrato, Long> {
72 72
73 Collection<Contrato> findAutoCompleteContratoPorNumeroAndOrganizacao(String numeroAnoContrato, Long idOrganizacao); 73 Collection<Contrato> findAutoCompleteContratoPorNumeroAndOrganizacao(String numeroAnoContrato, Long idOrganizacao);
74 74
75 - Collection<Contrato> findAllByEvento(Long[] idsTipoEvento);  
76 -  
77 } 75 }
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/ContratoEventoServiceImpl.java
@@ -299,13 +299,7 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl&lt;ContratoEvento @@ -299,13 +299,7 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl&lt;ContratoEvento
299 299
300 if (idContrato == null) { 300 if (idContrato == null) {
301 301
302 - Collection<ContratoEvento> contratoEventos = contratoEventoDao.findAllByTipoEvento(Arrays.asList(idsTipoEvento));  
303 - List<Long> idsContratos = new ArrayList<Long>();  
304 - for (ContratoEvento contratoEvento : contratoEventos) {  
305 - if (!idsContratos.contains(contratoEvento.getContrato().getId())) {  
306 - idsContratos.add(contratoEvento.getContrato().getId());  
307 - }  
308 - } 302 + List<Long> idsContratos = obtemIdsContratosPorEvento(idsTipoEvento);
309 303
310 for (Long contrato : idsContratos) { 304 for (Long contrato : idsContratos) {
311 305
@@ -378,4 +372,16 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl&lt;ContratoEvento @@ -378,4 +372,16 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl&lt;ContratoEvento
378 372
379 return jasperPrint; 373 return jasperPrint;
380 } 374 }
  375 +
  376 + private List<Long> obtemIdsContratosPorEvento(Long[] idsTipoEvento) {
  377 + Collection<ContratoEvento> contratoEventos = contratoEventoDao.findAllByTipoEvento(Arrays.asList(idsTipoEvento));
  378 + List<Long> idsContratos = new ArrayList<Long>();
  379 + for (ContratoEvento contratoEvento : contratoEventos) {
  380 + if (!idsContratos.contains(contratoEvento.getContrato().getId())) {
  381 + idsContratos.add(contratoEvento.getContrato().getId());
  382 + }
  383 + }
  384 + return idsContratos;
  385 + }
  386 +
381 } 387 }
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoRegistroNaoConformidadeServiceImpl.java
1 package br.com.centralit.api.service.impl; 1 package br.com.centralit.api.service.impl;
2 2
  3 +import java.io.InputStream;
3 import java.sql.Connection; 4 import java.sql.Connection;
4 import java.text.SimpleDateFormat; 5 import java.text.SimpleDateFormat;
5 import java.util.ArrayList; 6 import java.util.ArrayList;
6 import java.util.Date; 7 import java.util.Date;
  8 +import java.util.HashMap;
7 import java.util.List; 9 import java.util.List;
  10 +import java.util.Map;
8 11
9 import net.sf.jasperreports.engine.JRException; 12 import net.sf.jasperreports.engine.JRException;
  13 +import net.sf.jasperreports.engine.JasperCompileManager;
  14 +import net.sf.jasperreports.engine.JasperFillManager;
10 import net.sf.jasperreports.engine.JasperPrint; 15 import net.sf.jasperreports.engine.JasperPrint;
  16 +import net.sf.jasperreports.engine.JasperReport;
  17 +import net.sf.jasperreports.engine.design.JasperDesign;
  18 +import net.sf.jasperreports.engine.xml.JRXmlLoader;
11 19
12 import org.apache.commons.lang3.StringUtils; 20 import org.apache.commons.lang3.StringUtils;
13 import org.springframework.beans.factory.annotation.Autowired; 21 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,6 +41,7 @@ import br.com.centralit.framework.model.Dominio; @@ -33,6 +41,7 @@ import br.com.centralit.framework.model.Dominio;
33 import br.com.centralit.framework.model.Usuario; 41 import br.com.centralit.framework.model.Usuario;
34 import br.com.centralit.framework.service.arquitetura.GenericServiceImpl; 42 import br.com.centralit.framework.service.arquitetura.GenericServiceImpl;
35 import br.com.centralit.framework.util.UtilColecao; 43 import br.com.centralit.framework.util.UtilColecao;
  44 +import br.com.centralit.framework.util.UtilDataBase;
36 import br.com.centralit.framework.util.UtilObjeto; 45 import br.com.centralit.framework.util.UtilObjeto;
37 46
38 /** 47 /**
@@ -141,7 +150,7 @@ public class EventoRegistroNaoConformidadeServiceImpl extends GenericServiceImpl @@ -141,7 +150,7 @@ public class EventoRegistroNaoConformidadeServiceImpl extends GenericServiceImpl
141 } 150 }
142 151
143 if (!UtilColecao.isVazio(documento.getAnexos())){ 152 if (!UtilColecao.isVazio(documento.getAnexos())){
144 - Anexo anexo = (Anexo) ((List)documento.getAnexos()).get(0); 153 + Anexo anexo = ((List<Anexo>)documento.getAnexos()).get(0);
145 List<Anexo> listaAnexo = new ArrayList<Anexo>(); 154 List<Anexo> listaAnexo = new ArrayList<Anexo>();
146 listaAnexo.add(this.anexoService.getReference(anexo.getId())); 155 listaAnexo.add(this.anexoService.getReference(anexo.getId()));
147 documento.setAnexos(listaAnexo); 156 documento.setAnexos(listaAnexo);
@@ -170,9 +179,37 @@ public class EventoRegistroNaoConformidadeServiceImpl extends GenericServiceImpl @@ -170,9 +179,37 @@ public class EventoRegistroNaoConformidadeServiceImpl extends GenericServiceImpl
170 } 179 }
171 180
172 @Override 181 @Override
173 - public JasperPrint getJasperPrintRelatorioRegistroNaoConformidade(Long idContrato, Date dataInicial, Date dataFinal, 182 + public JasperPrint getJasperPrintRelatorioRegistroNaoConformidade(Long idContrato, Date dataInicial, Date dataFinal,
174 Connection conn, Usuario usuarioLogado, String titulo) throws JRException { 183 Connection conn, Usuario usuarioLogado, String titulo) throws JRException {
175 - // TODO Auto-generated method stub  
176 - return null; 184 +
  185 + InputStream input = null;
  186 + InputStream inputSub = null;
  187 + JasperPrint jasperPrint = null;
  188 + try {
  189 + input = this.getClass().getResourceAsStream("/reports/templateRetrato.jrxml");
  190 + inputSub = this.getClass().getResourceAsStream("/reports/relatorioEventoNaoConformidade.jrxml");
  191 +
  192 + JasperDesign jasperDesign = JRXmlLoader.load(input);
  193 + JasperDesign jasperDesignSub = JRXmlLoader.load(inputSub);
  194 + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
  195 + JasperReport jasperReportSub = JasperCompileManager.compileReport(jasperDesignSub);
  196 +
  197 + Map<String, Object> subReportParameters = new HashMap<String, Object>();
  198 + subReportParameters.put("contratoId", idContrato);
  199 + subReportParameters.put("dataInicial", dataInicial);
  200 + subReportParameters.put("dataFinal", dataFinal);
  201 +
  202 + Map<String, Object> parameters = new HashMap<String, Object>();
  203 + parameters.put("ORGANIZACAO_ID", usuarioLogado.getOrganizacao().getId());
  204 + parameters.put("TITULO", titulo);
  205 + parameters.put("SUBREPORT_DIR", jasperReportSub);
  206 + parameters.put("SUBREPORT_PARAMETERS_MAP", subReportParameters);
  207 + parameters.put("REPORT_CONNECTION", conn);
  208 +
  209 + jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
  210 + } finally {
  211 + UtilDataBase.closeResources(inputSub);
  212 + }
  213 + return jasperPrint;
177 } 214 }
178 } 215 }
cit-contratos-web/src/main/java/br/com/centralit/controller/ContratoEventoController.java
@@ -136,8 +136,8 @@ public class ContratoEventoController extends GenericController&lt;ContratoEvento&gt; @@ -136,8 +136,8 @@ public class ContratoEventoController extends GenericController&lt;ContratoEvento&gt;
136 136
137 List<ContratoEventosVH> lista = new ArrayList<ContratoEventosVH>(); 137 List<ContratoEventosVH> lista = new ArrayList<ContratoEventosVH>();
138 138
139 - Date dataInicial = dataInicio != null ? UtilDate.jsonToDate(dataInicio) : null;  
140 - Date dateFinal = dataFim != null ? UtilDate.jsonToDate(dataFim) : null; 139 + Date dataInicial = StringUtils.isNotBlank(dataInicio) ? UtilDate.jsonToDate(dataInicio) : null;
  140 + Date dateFinal = StringUtils.isNotBlank(dataFim) ? UtilDate.jsonToDate(dataFim) : null;
141 141
142 Collection<ContratoEvento> listaEventos = this.contratoEventoService.findAllByContratoIntervalDataEmissao(contratoId, dataInicial, dateFinal); 142 Collection<ContratoEvento> listaEventos = this.contratoEventoService.findAllByContratoIntervalDataEmissao(contratoId, dataInicial, dateFinal);
143 143
@@ -224,18 +224,18 @@ public class ContratoEventoController extends GenericController&lt;ContratoEvento&gt; @@ -224,18 +224,18 @@ public class ContratoEventoController extends GenericController&lt;ContratoEvento&gt;
224 @ResponseBody 224 @ResponseBody
225 @RequestMapping(method = RequestMethod.GET, value = "/pdfGerarRelatorios") 225 @RequestMapping(method = RequestMethod.GET, value = "/pdfGerarRelatorios")
226 public void gerarRelatorios( 226 public void gerarRelatorios(
227 - @RequestParam(value = "idsTiposRelatorio") String idsRelatoriosSelecionados, 227 + @RequestParam(value = "idsTiposRelatorio") String idsRelatoriosSelecionados,
228 @RequestParam(value = "idContrato", required = false) String idContrato, 228 @RequestParam(value = "idContrato", required = false) String idContrato,
229 - @RequestParam(value = "dataInicial", required = false) String dataInicial, 229 + @RequestParam(value = "dataInicial", required = false) String dataInicial,
230 @RequestParam(value = "dataFinal", required = false) String dataFinal, 230 @RequestParam(value = "dataFinal", required = false) String dataFinal,
231 @RequestParam(value = "download") boolean download, HttpServletResponse response) throws SQLException, JRException, IOException { 231 @RequestParam(value = "download") boolean download, HttpServletResponse response) throws SQLException, JRException, IOException {
232 - 232 +
233 Long[] arrayLong = getArrayLong(idsRelatoriosSelecionados); 233 Long[] arrayLong = getArrayLong(idsRelatoriosSelecionados);
234 234
235 Long contratoId = StringUtils.isNumeric(idContrato) ? Long.parseLong(idContrato) : null; 235 Long contratoId = StringUtils.isNumeric(idContrato) ? Long.parseLong(idContrato) : null;
236 - Date dataInicio = StringUtils.isEmpty(dataInicial) || dataInicial.equalsIgnoreCase("null") ? null : UtilDate.jsonToDate(UtilDate.dataInicioFormatada(dataInicial));  
237 - Date dataFim = StringUtils.isEmpty(dataFinal) || dataFinal.equalsIgnoreCase("null") ? null : UtilDate.jsonToDate(UtilDate.dataInicioFormatada(dataFinal));  
238 - 236 + Date dataInicio = StringUtils.isBlank(dataInicial) ? null : UtilDate.jsonToDate(UtilDate.dataInicioFormatada(dataInicial));
  237 + Date dataFim = StringUtils.isBlank(dataFinal) ? null : UtilDate.jsonToDate(UtilDate.dataInicioFormatada(dataFinal));
  238 +
239 this.contratoEventoService.gerarRelatorios(arrayLong, contratoId, dataInicio, dataFim, download, response); 239 this.contratoEventoService.gerarRelatorios(arrayLong, contratoId, dataInicio, dataFim, download, response);
240 } 240 }
241 241
cit-contratos-web/src/main/resources/reports/relatorioEventoEmpenho.jrxml
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 -<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 -->  
3 -<!-- 2016-03-30T19:10:52 -->  
4 <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="relatorioEventoEmpenho" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" uuid="d74b4c6b-2cfa-4211-acc4-a49eb0fe52fc"> 2 <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="relatorioEventoEmpenho" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" uuid="d74b4c6b-2cfa-4211-acc4-a49eb0fe52fc">
5 <property name="com.jaspersoft.studio.data.sql.tables" value=""/> 3 <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
6 <property name="com.jaspersoft.studio.data.defaultdataadapter" value="citgrpdb"/> 4 <property name="com.jaspersoft.studio.data.defaultdataadapter" value="citgrpdb"/>
  5 + <property name="ireport.zoom" value="1.4641000000000006"/>
  6 + <property name="ireport.x" value="0"/>
  7 + <property name="ireport.y" value="0"/>
7 <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"> 8 <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
8 <box> 9 <box>
9 <pen lineWidth="0.5" lineColor="#000000"/> 10 <pen lineWidth="0.5" lineColor="#000000"/>
@@ -53,8 +54,8 @@ left join cnt_cn_empenho as cntEmpenho on cntEmpenho.id = evEmpenho.id @@ -53,8 +54,8 @@ left join cnt_cn_empenho as cntEmpenho on cntEmpenho.id = evEmpenho.id
53 left join dominio as tipoEvento on tipoEvento.id = evEmpenho.tipoevento_id 54 left join dominio as tipoEvento on tipoEvento.id = evEmpenho.tipoevento_id
54 left join dominio as tipoFinalidade on tipoFinalidade.id = cntEmpenho.dominiofinalidadeempenho_id 55 left join dominio as tipoFinalidade on tipoFinalidade.id = cntEmpenho.dominiofinalidadeempenho_id
55 left join dominio as tipoCategoriaEconomica on tipoCategoriaEconomica.id = cntEmpenho.dominiocategoriaeconomica_id 56 left join dominio as tipoCategoriaEconomica on tipoCategoriaEconomica.id = cntEmpenho.dominiocategoriaeconomica_id
56 -where evEmpenho.contrato_id = $P{contratoId} and  
57 -tipoEvento.chave = 'tipoEventoContrato' and 57 +where evEmpenho.contrato_id = $P{contratoId} and
  58 +tipoEvento.chave = 'tipoEventoContrato' and
58 tipoEvento.codigo = '6' 59 tipoEvento.codigo = '6'
59 60
60 $P!{DATA_INICIAL} 61 $P!{DATA_INICIAL}
@@ -82,17 +83,17 @@ order by evEmpenho.id asc]]&gt; @@ -82,17 +83,17 @@ order by evEmpenho.id asc]]&gt;
82 <![CDATA[select 83 <![CDATA[select
83 contrato.numeroanocontrato as numeroanocontrato, 84 contrato.numeroanocontrato as numeroanocontrato,
84 (contrato.valorcontrato + 85 (contrato.valorcontrato +
85 -(CASE WHEN  
86 -(SELECT count(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = $P{contratoId} AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 1)) > 0  
87 -THEN  
88 -(SELECT sum(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = $P{contratoId} AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 1))  
89 -ELSE 0  
90 -END) 86 +(CASE WHEN
  87 +(SELECT count(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = evEmpenho.contrato_id AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 1)) > 0
  88 +THEN
  89 +(SELECT sum(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = evEmpenho.contrato_id AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 1))
  90 +ELSE 0
  91 +END)
91 - 92 -
92 -(CASE WHEN  
93 -(SELECT count(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = $P{contratoId} AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 2)) > 0  
94 -THEN  
95 -(SELECT sum(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = contrato.id AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 2)) 93 +(CASE WHEN
  94 +(SELECT count(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = evEmpenho.contrato_id AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 2)) > 0
  95 +THEN
  96 +(SELECT sum(valoraditivo) FROM cnt_ev_aditivo WHERE contratoaditivo_id = evEmpenho.contrato_id AND tipoalteracaovalor_id = (SELECT id FROM dominio WHERE chave = 'tipoAlteracaoValor' AND codigo = 2))
96 ELSE 0 97 ELSE 0
97 END)) as valorContrato 98 END)) as valorContrato
98 99
@@ -103,76 +104,110 @@ left join cnt_contrato as contrato on contrato.id = evEmpenho.contrato_id @@ -103,76 +104,110 @@ left join cnt_contrato as contrato on contrato.id = evEmpenho.contrato_id
103 left join dominio as tipoEvento on tipoEvento.id = evEmpenho.tipoevento_id 104 left join dominio as tipoEvento on tipoEvento.id = evEmpenho.tipoevento_id
104 105
105 where evEmpenho.contrato_id = $P{contratoId} and 106 where evEmpenho.contrato_id = $P{contratoId} and
106 -tipoEvento.chave = 'tipoEventoContrato' and  
107 -tipoEvento.codigo = '6']]> 107 +tipoEvento.chave = 'tipoEventoContrato' and
  108 +tipoEvento.codigo = '6'
  109 +
  110 +limit 1]]>
108 </queryString> 111 </queryString>
109 <field name="numeroanocontrato" class="java.lang.String"/> 112 <field name="numeroanocontrato" class="java.lang.String"/>
110 <field name="valorcontrato" class="java.math.BigDecimal"/> 113 <field name="valorcontrato" class="java.math.BigDecimal"/>
111 <pageHeader> 114 <pageHeader>
112 - <band height="79">  
113 - <staticText>  
114 - <reportElement x="0" y="6" width="555" height="30" uuid="bf46ddbd-7f34-4527-8170-6208b2527208"/>  
115 - <textElement textAlignment="Center" verticalAlignment="Middle">  
116 - <font size="16" isBold="true"/>  
117 - </textElement>  
118 - <text><![CDATA[Consulta de relatórios]]></text>  
119 - </staticText>  
120 - <staticText>  
121 - <reportElement x="20" y="50" width="60" height="25" uuid="9ede57f9-e6f1-474e-b69b-f7962867927d">  
122 - <property name="com.jaspersoft.studio.unit.height" value="pixel"/>  
123 - </reportElement>  
124 - <textElement textAlignment="Left" verticalAlignment="Middle">  
125 - <font isBold="true"/>  
126 - </textElement>  
127 - <text><![CDATA[Período:]]></text>  
128 - </staticText>  
129 - <textField>  
130 - <reportElement x="80" y="50" width="475" height="25" uuid="0fe71459-79b7-429e-bd18-4309f83c70b3"> 115 + <band height="90">
  116 + <frame>
  117 + <reportElement x="5" y="10" width="544" height="25" uuid="49228958-c953-4f27-bf6e-874a60b4f019"/>
  118 + <staticText>
  119 + <reportElement x="0" y="0" width="150" height="25" uuid="9ede57f9-e6f1-474e-b69b-f7962867927d">
  120 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  121 + </reportElement>
  122 + <box leftPadding="5" rightPadding="3"/>
  123 + <textElement textAlignment="Left" verticalAlignment="Middle">
  124 + <font isBold="true"/>
  125 + </textElement>
  126 + <text><![CDATA[Período:]]></text>
  127 + </staticText>
  128 + <textField>
  129 + <reportElement x="150" y="0" width="394" height="25" uuid="0fe71459-79b7-429e-bd18-4309f83c70b3">
  130 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  131 + </reportElement>
  132 + <box leftPadding="5" rightPadding="3"/>
  133 + <textElement verticalAlignment="Middle"/>
  134 + <textFieldExpression><![CDATA[($P{dataInicial} != null && $P{dataFinal} != null) ? (new SimpleDateFormat("dd/MM/yyyy").format($P{dataInicial}) + " a " + new SimpleDateFormat("dd/MM/yyyy").format($P{dataFinal})) :
  135 +$P{dataInicial} != null ? "Apartir de " + new SimpleDateFormat("dd/MM/yyyy").format($P{dataInicial}) :
  136 +$P{dataFinal} != null ? "Até " + new SimpleDateFormat("dd/MM/yyyy").format($P{dataFinal}) :
  137 +"Não informado"]]></textFieldExpression>
  138 + </textField>
  139 + </frame>
  140 + <frame>
  141 + <reportElement x="5" y="35" width="544" height="25" uuid="23c0fa75-b74a-45b3-9f39-01ec2e451ddb"/>
  142 + <staticText>
  143 + <reportElement x="0" y="0" width="150" height="25" uuid="29d0c9a4-2635-4ef8-b257-3e8d5d2006ec">
  144 + <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
  145 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  146 + </reportElement>
  147 + <box padding="0" leftPadding="5" rightPadding="3"/>
  148 + <textElement verticalAlignment="Middle">
  149 + <font isBold="true"/>
  150 + </textElement>
  151 + <text><![CDATA[Número / ano do contrato:]]></text>
  152 + </staticText>
  153 + <textField isBlankWhenNull="true">
  154 + <reportElement x="150" y="0" width="394" height="25" uuid="6492b8bb-061a-4c97-9f17-84773a127db4">
  155 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  156 + </reportElement>
  157 + <box padding="0" leftPadding="5" rightPadding="3"/>
  158 + <textElement textAlignment="Left" verticalAlignment="Middle"/>
  159 + <textFieldExpression><![CDATA[$F{numeroanocontrato}.substring(0, $F{numeroanocontrato}.length() - 4)
  160 +.concat("/")
  161 +.concat($F{numeroanocontrato}.substring($F{numeroanocontrato}.length() - 4))]]></textFieldExpression>
  162 + </textField>
  163 + </frame>
  164 + <frame>
  165 + <reportElement x="5" y="60" width="544" height="25" uuid="6818cb3e-16e3-4a02-93c0-e3e93e8b6642"/>
  166 + <staticText>
  167 + <reportElement x="0" y="0" width="150" height="25" uuid="baf877b5-16f3-4e94-9bcb-623905f58c29">
  168 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  169 + </reportElement>
  170 + <box padding="0" leftPadding="5" rightPadding="3"/>
  171 + <textElement textAlignment="Left" verticalAlignment="Middle">
  172 + <font isBold="true"/>
  173 + </textElement>
  174 + <text><![CDATA[Valor total do contrato:]]></text>
  175 + </staticText>
  176 + <textField pattern="¤#,##0.00;¤-#,##0.00" isBlankWhenNull="true">
  177 + <reportElement x="150" y="0" width="394" height="25" uuid="61434fec-2f9f-4b7c-b53a-8c3c37744334">
  178 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  179 + </reportElement>
  180 + <box padding="0" leftPadding="5" rightPadding="3"/>
  181 + <textElement textAlignment="Left" verticalAlignment="Middle"/>
  182 + <textFieldExpression><![CDATA[$F{valorcontrato}]]></textFieldExpression>
  183 + </textField>
  184 + </frame>
  185 + <line>
  186 + <reportElement x="5" y="85" width="544" height="1" uuid="183040b3-7cc8-4d05-b417-03aa04eab538">
131 <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 187 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  188 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  189 + <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
132 </reportElement> 190 </reportElement>
133 - <textElement verticalAlignment="Middle"/>  
134 - <textFieldExpression><![CDATA[($P{dataInicial} == null && $P{dataFinal} == null) ? "Não informado" :  
135 -($P{dataInicial} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{dataInicial})) + " à " +  
136 -($P{dataFinal} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{dataFinal}))]]></textFieldExpression>  
137 - </textField> 191 + </line>
138 </band> 192 </band>
139 </pageHeader> 193 </pageHeader>
140 <detail> 194 <detail>
141 - <band height="155" splitType="Stretch"> 195 + <band height="75" splitType="Stretch">
  196 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
142 <staticText> 197 <staticText>
143 - <reportElement x="20" y="0" width="500" height="25" uuid="525f239d-ae8a-4237-adff-731b29b36af1"> 198 + <reportElement x="5" y="10" width="544" height="25" uuid="525f239d-ae8a-4237-adff-731b29b36af1">
144 <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 199 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
145 <property name="com.jaspersoft.studio.unit.x" value="pixel"/> 200 <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
146 <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 201 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
147 </reportElement> 202 </reportElement>
  203 + <box leftPadding="5"/>
148 <textElement textAlignment="Left" verticalAlignment="Middle"> 204 <textElement textAlignment="Left" verticalAlignment="Middle">
149 - <font isBold="true"/>  
150 - </textElement>  
151 - <text><![CDATA[1. Relatório de registro de empenho]]></text>  
152 - </staticText>  
153 - <staticText>  
154 - <reportElement x="20" y="25" width="160" height="25" uuid="29d0c9a4-2635-4ef8-b257-3e8d5d2006ec">  
155 - <property name="com.jaspersoft.studio.unit.x" value="pixel"/>  
156 - <property name="com.jaspersoft.studio.unit.height" value="pixel"/>  
157 - </reportElement>  
158 - <box padding="0"/>  
159 - <textElement verticalAlignment="Middle">  
160 - <font isBold="true"/>  
161 - </textElement>  
162 - <text><![CDATA[Número / ano do contrato:]]></text>  
163 - </staticText>  
164 - <staticText>  
165 - <reportElement x="20" y="50" width="160" height="25" uuid="baf877b5-16f3-4e94-9bcb-623905f58c29">  
166 - <property name="com.jaspersoft.studio.unit.height" value="pixel"/>  
167 - </reportElement>  
168 - <box padding="0"/>  
169 - <textElement textAlignment="Left" verticalAlignment="Middle">  
170 - <font isBold="true"/> 205 + <font size="13" isBold="true"/>
171 </textElement> 206 </textElement>
172 - <text><![CDATA[Valor total do contrato:]]></text> 207 + <text><![CDATA[1. Relatórios]]></text>
173 </staticText> 208 </staticText>
174 <componentElement> 209 <componentElement>
175 - <reportElement x="0" y="95" width="555" height="60" uuid="daece71a-c857-4368-833f-95e7841c2392"> 210 + <reportElement x="15" y="40" width="534" height="30" uuid="daece71a-c857-4368-833f-95e7841c2392">
176 <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> 211 <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
177 <property name="net.sf.jasperreports.export.headertoolbar.table.name" value=""/> 212 <property name="net.sf.jasperreports.export.headertoolbar.table.name" value=""/>
178 </reportElement> 213 </reportElement>
@@ -198,11 +233,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -198,11 +233,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
198 </datasetParameter> 233 </datasetParameter>
199 <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> 234 <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
200 </datasetRun> 235 </datasetRun>
201 - <jr:column width="111" uuid="6c7df2c1-247a-4d29-b49a-cf835ea9fc01"> 236 + <jr:column width="105" uuid="6c7df2c1-247a-4d29-b49a-cf835ea9fc01">
202 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/> 237 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
203 <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> 238 <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
204 <staticText> 239 <staticText>
205 - <reportElement x="0" y="0" width="111" height="30" uuid="e6106735-9cb7-4e8e-a3c2-9cdbd675331a"/> 240 + <reportElement x="0" y="0" width="105" height="30" uuid="e6106735-9cb7-4e8e-a3c2-9cdbd675331a"/>
206 <box padding="5"> 241 <box padding="5">
207 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 242 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
208 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 243 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -215,9 +250,9 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -215,9 +250,9 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
215 <text><![CDATA[Nº do empenho]]></text> 250 <text><![CDATA[Nº do empenho]]></text>
216 </staticText> 251 </staticText>
217 </jr:columnHeader> 252 </jr:columnHeader>
218 - <jr:detailCell height="30"> 253 + <jr:detailCell height="30" rowSpan="1">
219 <textField isBlankWhenNull="true"> 254 <textField isBlankWhenNull="true">
220 - <reportElement x="0" y="0" width="111" height="30" uuid="5f693b8e-9aea-4eb3-9fdc-39601a9f5a50"/> 255 + <reportElement x="0" y="0" width="105" height="30" uuid="5f693b8e-9aea-4eb3-9fdc-39601a9f5a50"/>
221 <box padding="5"> 256 <box padding="5">
222 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 257 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
223 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 258 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -229,11 +264,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -229,11 +264,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
229 </textField> 264 </textField>
230 </jr:detailCell> 265 </jr:detailCell>
231 </jr:column> 266 </jr:column>
232 - <jr:column width="111" uuid="fccca2ba-f587-4a4a-878c-c4bd0260931e"> 267 + <jr:column width="105" uuid="fccca2ba-f587-4a4a-878c-c4bd0260931e">
233 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/> 268 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
234 <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> 269 <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
235 <staticText> 270 <staticText>
236 - <reportElement x="0" y="0" width="111" height="30" uuid="239910ff-efc4-4da7-bbea-198cfc6487a9"/> 271 + <reportElement x="0" y="0" width="105" height="30" uuid="239910ff-efc4-4da7-bbea-198cfc6487a9"/>
237 <box padding="5"> 272 <box padding="5">
238 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 273 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
239 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 274 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -243,12 +278,12 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -243,12 +278,12 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
243 <textElement textAlignment="Center" verticalAlignment="Middle"> 278 <textElement textAlignment="Center" verticalAlignment="Middle">
244 <font size="12" isBold="true"/> 279 <font size="12" isBold="true"/>
245 </textElement> 280 </textElement>
246 - <text><![CDATA[Data do empenho]]></text> 281 + <text><![CDATA[Dt do empenho]]></text>
247 </staticText> 282 </staticText>
248 </jr:columnHeader> 283 </jr:columnHeader>
249 - <jr:detailCell height="30"> 284 + <jr:detailCell height="30" rowSpan="1">
250 <textField isBlankWhenNull="true"> 285 <textField isBlankWhenNull="true">
251 - <reportElement x="0" y="0" width="111" height="30" uuid="4efd6c53-0d6b-4c98-864f-7296a185a285"/> 286 + <reportElement x="0" y="0" width="105" height="30" uuid="4efd6c53-0d6b-4c98-864f-7296a185a285"/>
252 <box padding="5"> 287 <box padding="5">
253 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 288 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
254 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 289 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -260,11 +295,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -260,11 +295,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
260 </textField> 295 </textField>
261 </jr:detailCell> 296 </jr:detailCell>
262 </jr:column> 297 </jr:column>
263 - <jr:column width="111" uuid="b786a6af-2777-4710-8dd6-48f55e2d4eae"> 298 + <jr:column width="110" uuid="b786a6af-2777-4710-8dd6-48f55e2d4eae">
264 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/> 299 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
265 <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> 300 <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
266 <staticText> 301 <staticText>
267 - <reportElement x="0" y="0" width="111" height="30" uuid="ffd14591-401f-4be0-ba1e-8903b27dae76"/> 302 + <reportElement x="0" y="0" width="110" height="30" uuid="ffd14591-401f-4be0-ba1e-8903b27dae76"/>
268 <box padding="5"> 303 <box padding="5">
269 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 304 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
270 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 305 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -277,9 +312,9 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -277,9 +312,9 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
277 <text><![CDATA[Finalidade]]></text> 312 <text><![CDATA[Finalidade]]></text>
278 </staticText> 313 </staticText>
279 </jr:columnHeader> 314 </jr:columnHeader>
280 - <jr:detailCell height="30"> 315 + <jr:detailCell height="30" rowSpan="1">
281 <textField isBlankWhenNull="true"> 316 <textField isBlankWhenNull="true">
282 - <reportElement x="0" y="0" width="111" height="30" uuid="8817772f-afa7-4515-9d8d-71e50fb7e4ef"/> 317 + <reportElement x="0" y="0" width="110" height="30" uuid="8817772f-afa7-4515-9d8d-71e50fb7e4ef"/>
283 <box padding="5"> 318 <box padding="5">
284 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 319 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
285 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 320 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -291,11 +326,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -291,11 +326,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
291 </textField> 326 </textField>
292 </jr:detailCell> 327 </jr:detailCell>
293 </jr:column> 328 </jr:column>
294 - <jr:column width="111" uuid="0bcfe885-1bdb-4a0c-a2b2-3c38c0eb331d"> 329 + <jr:column width="110" uuid="0bcfe885-1bdb-4a0c-a2b2-3c38c0eb331d">
295 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/> 330 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
296 <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> 331 <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
297 <staticText> 332 <staticText>
298 - <reportElement x="0" y="0" width="111" height="30" uuid="1f54f03e-37a0-437b-916b-78717c24673c"/> 333 + <reportElement x="0" y="0" width="110" height="30" uuid="1f54f03e-37a0-437b-916b-78717c24673c"/>
299 <box padding="5"> 334 <box padding="5">
300 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 335 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
301 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 336 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -308,9 +343,9 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -308,9 +343,9 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
308 <text><![CDATA[Categoria econômica]]></text> 343 <text><![CDATA[Categoria econômica]]></text>
309 </staticText> 344 </staticText>
310 </jr:columnHeader> 345 </jr:columnHeader>
311 - <jr:detailCell height="30"> 346 + <jr:detailCell height="30" rowSpan="1">
312 <textField isBlankWhenNull="true"> 347 <textField isBlankWhenNull="true">
313 - <reportElement x="0" y="0" width="111" height="30" uuid="1fdf5e79-78d4-4aac-af4c-465d2e0e98fb"/> 348 + <reportElement x="0" y="0" width="110" height="30" uuid="1fdf5e79-78d4-4aac-af4c-465d2e0e98fb"/>
314 <box padding="5"> 349 <box padding="5">
315 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 350 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
316 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 351 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -322,11 +357,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -322,11 +357,11 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
322 </textField> 357 </textField>
323 </jr:detailCell> 358 </jr:detailCell>
324 </jr:column> 359 </jr:column>
325 - <jr:column width="111" uuid="eebe6f80-b08d-4f95-b204-bae284b6cca8"> 360 + <jr:column width="106" uuid="eebe6f80-b08d-4f95-b204-bae284b6cca8">
326 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/> 361 <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
327 <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> 362 <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
328 <staticText> 363 <staticText>
329 - <reportElement x="0" y="0" width="111" height="30" uuid="ab8d621e-50a7-484e-99bd-3c28b015a77e"/> 364 + <reportElement x="0" y="0" width="105" height="30" uuid="ab8d621e-50a7-484e-99bd-3c28b015a77e"/>
330 <box padding="5"> 365 <box padding="5">
331 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 366 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
332 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 367 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -336,12 +371,12 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -336,12 +371,12 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
336 <textElement textAlignment="Center" verticalAlignment="Middle"> 371 <textElement textAlignment="Center" verticalAlignment="Middle">
337 <font size="12" isBold="true"/> 372 <font size="12" isBold="true"/>
338 </textElement> 373 </textElement>
339 - <text><![CDATA[Valor empenhado]]></text> 374 + <text><![CDATA[Vlr empenhado]]></text>
340 </staticText> 375 </staticText>
341 </jr:columnHeader> 376 </jr:columnHeader>
342 - <jr:detailCell height="30"> 377 + <jr:detailCell height="30" rowSpan="1">
343 <textField pattern="¤#,##0.00;¤-#,##0.00" isBlankWhenNull="true"> 378 <textField pattern="¤#,##0.00;¤-#,##0.00" isBlankWhenNull="true">
344 - <reportElement x="0" y="0" width="111" height="30" uuid="b1153c35-ce40-4f61-bdc9-584f2b5def50"/> 379 + <reportElement x="0" y="0" width="105" height="30" uuid="b1153c35-ce40-4f61-bdc9-584f2b5def50"/>
345 <box padding="5"> 380 <box padding="5">
346 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 381 <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
347 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> 382 <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
@@ -355,24 +390,6 @@ tipoEvento.codigo = &#39;6&#39;]]&gt; @@ -355,24 +390,6 @@ tipoEvento.codigo = &#39;6&#39;]]&gt;
355 </jr:column> 390 </jr:column>
356 </jr:table> 391 </jr:table>
357 </componentElement> 392 </componentElement>
358 - <textField pattern="¤#,##0.00;¤-#,##0.00" isBlankWhenNull="true">  
359 - <reportElement x="180" y="50" width="160" height="25" uuid="61434fec-2f9f-4b7c-b53a-8c3c37744334">  
360 - <property name="com.jaspersoft.studio.unit.height" value="pixel"/>  
361 - </reportElement>  
362 - <box padding="0"/>  
363 - <textElement textAlignment="Left" verticalAlignment="Middle"/>  
364 - <textFieldExpression><![CDATA[$F{valorcontrato}]]></textFieldExpression>  
365 - </textField>  
366 - <textField isBlankWhenNull="true">  
367 - <reportElement x="180" y="25" width="160" height="25" uuid="6492b8bb-061a-4c97-9f17-84773a127db4">  
368 - <property name="com.jaspersoft.studio.unit.height" value="pixel"/>  
369 - </reportElement>  
370 - <box padding="0"/>  
371 - <textElement textAlignment="Left" verticalAlignment="Middle"/>  
372 - <textFieldExpression><![CDATA[$F{numeroanocontrato}.substring(0, $F{numeroanocontrato}.length() - 4)  
373 -.concat("/")  
374 -.concat($F{numeroanocontrato}.substring($F{numeroanocontrato}.length() - 4))]]></textFieldExpression>  
375 - </textField>  
376 </band> 393 </band>
377 </detail> 394 </detail>
378 </jasperReport> 395 </jasperReport>
cit-contratos-web/src/main/resources/reports/relatorioEventoNaoConformidade.jrxml 0 → 100644
@@ -0,0 +1,363 @@ @@ -0,0 +1,363 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="relatorioEventoNaoConformidade" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="78f13db4-6ced-46df-8bfd-074b8436fa4b">
  3 + <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
  4 + <property name="ireport.zoom" value="1.610510000000001"/>
  5 + <property name="ireport.x" value="0"/>
  6 + <property name="ireport.y" value="0"/>
  7 + <style name="Table_TH" mode="Opaque" backcolor="#A9A9A9">
  8 + <box>
  9 + <pen lineWidth="0.5" lineColor="#000000"/>
  10 + <topPen lineWidth="0.5" lineColor="#000000"/>
  11 + <leftPen lineWidth="0.5" lineColor="#000000"/>
  12 + <bottomPen lineWidth="0.5" lineColor="#000000"/>
  13 + <rightPen lineWidth="0.5" lineColor="#000000"/>
  14 + </box>
  15 + </style>
  16 + <style name="Table_CH" mode="Opaque" backcolor="#CCCCCC">
  17 + <box>
  18 + <pen lineWidth="0.5" lineColor="#000000"/>
  19 + <topPen lineWidth="0.5" lineColor="#000000"/>
  20 + <leftPen lineWidth="0.5" lineColor="#000000"/>
  21 + <bottomPen lineWidth="0.5" lineColor="#000000"/>
  22 + <rightPen lineWidth="0.5" lineColor="#000000"/>
  23 + </box>
  24 + </style>
  25 + <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
  26 + <box>
  27 + <pen lineWidth="0.5" lineColor="#000000"/>
  28 + <topPen lineWidth="0.5" lineColor="#000000"/>
  29 + <leftPen lineWidth="0.5" lineColor="#000000"/>
  30 + <bottomPen lineWidth="0.5" lineColor="#000000"/>
  31 + <rightPen lineWidth="0.5" lineColor="#000000"/>
  32 + </box>
  33 + </style>
  34 + <subDataset name="naoConformidade" uuid="8d076663-9b03-4973-983c-475015a20c62">
  35 + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="citgrpdb"/>
  36 + <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
  37 + <parameter name="contratoId" class="java.lang.Long"/>
  38 + <parameter name="dataInicial" class="java.util.Date">
  39 + <parameterDescription><![CDATA[]]></parameterDescription>
  40 + </parameter>
  41 + <parameter name="dataFinal" class="java.util.Date">
  42 + <parameterDescription><![CDATA[]]></parameterDescription>
  43 + </parameter>
  44 + <parameter name="DATA_INICIAL" class="java.lang.String"/>
  45 + <parameter name="DATA_FINAL" class="java.lang.String"/>
  46 + <queryString>
  47 + <![CDATA[select
  48 +evNaoConformidade.datanaoconformidade as dataNaoConformidade,
  49 +trSancao.sancao as naoConformidadeAplicavel,
  50 +trSancao.descricao as descricao,
  51 +evNaoConformidade.respostacontratada as resposta
  52 +
  53 +from cnt_cn_evento as eventos
  54 +
  55 +left join cnt_ev_registro_nc as evNaoConformidade on evNaoConformidade.id = eventos.id
  56 +left join cnt_tr_sancao as trSancao on trSancao.id = evNaoConformidade.tiponaoconformidade_id
  57 +left join dominio as tipoEvento on tipoEvento.id = eventos.tipoevento_id
  58 +
  59 +where eventos.contrato_id = $P{contratoId}
  60 +and tipoEvento.chave = 'tipoEventoContrato' and tipoEvento.codigo = '7'
  61 +$P!{DATA_INICIAL}
  62 +$P!{DATA_FINAL}
  63 +
  64 +group by evNaoConformidade.id, trSancao.id, tipoEvento.id
  65 +order by evNaoConformidade.id]]>
  66 + </queryString>
  67 + <field name="datanaoconformidade" class="java.sql.Timestamp"/>
  68 + <field name="naoconformidadeaplicavel" class="java.lang.String"/>
  69 + <field name="descricao" class="java.lang.String"/>
  70 + <field name="resposta" class="java.lang.String"/>
  71 + </subDataset>
  72 + <parameter name="contratoId" class="java.lang.Long"/>
  73 + <parameter name="dataInicial" class="java.util.Date">
  74 + <parameterDescription><![CDATA[]]></parameterDescription>
  75 + </parameter>
  76 + <parameter name="dataFinal" class="java.util.Date"/>
  77 + <parameter name="DATA_INICIAL" class="java.lang.String" isForPrompting="false">
  78 + <defaultValueExpression><![CDATA[($P{dataInicial} != null ? " and eventos.dataevento >= '" + $P{dataInicial} + "'" : "")]]></defaultValueExpression>
  79 + </parameter>
  80 + <parameter name="DATA_FINAL" class="java.lang.String" isForPrompting="false">
  81 + <defaultValueExpression><![CDATA[($P{dataFinal} != null ? " and eventos.dataevento <= '" + $P{dataFinal} + "'" : "")]]></defaultValueExpression>
  82 + </parameter>
  83 + <queryString>
  84 + <![CDATA[select
  85 +contrato.numeroanocontrato as numeroanocontrato
  86 +
  87 +from cnt_cn_evento as eventos
  88 +
  89 +left join cnt_contrato as contrato on contrato.id = eventos.contrato_id
  90 +left join dominio as tipoEvento on tipoEvento.id = eventos.tipoevento_id
  91 +
  92 +where eventos.contrato_id = $P{contratoId}
  93 +and tipoEvento.chave = 'tipoEventoContrato'
  94 +and tipoEvento.codigo = '7'
  95 +
  96 +group by contrato.id, tipoEvento.id, eventos.id
  97 +limit 1]]>
  98 + </queryString>
  99 + <field name="numeroanocontrato" class="java.lang.String"/>
  100 + <pageHeader>
  101 + <band height="65" splitType="Stretch">
  102 + <frame>
  103 + <reportElement x="5" y="10" width="544" height="25" uuid="ca1de359-745c-40f6-9b5f-c57c1957f4ae"/>
  104 + <staticText>
  105 + <reportElement x="0" y="0" width="150" height="25" uuid="967d8fd8-d42e-4294-ae3f-8e9e9cc75a11">
  106 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  107 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  108 + <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
  109 + <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
  110 + </reportElement>
  111 + <box leftPadding="5" rightPadding="3"/>
  112 + <textElement textAlignment="Left" verticalAlignment="Middle">
  113 + <font isBold="true"/>
  114 + </textElement>
  115 + <text><![CDATA[Período:]]></text>
  116 + </staticText>
  117 + <textField>
  118 + <reportElement x="150" y="0" width="394" height="25" uuid="1fb03a9d-ef90-4c2f-8da0-c9d02834b531">
  119 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  120 + </reportElement>
  121 + <box leftPadding="5" rightPadding="3"/>
  122 + <textElement verticalAlignment="Middle"/>
  123 + <textFieldExpression><![CDATA[($P{dataInicial} != null && $P{dataFinal} != null) ? (new SimpleDateFormat("dd/MM/yyyy").format($P{dataInicial}) + " a " + new SimpleDateFormat("dd/MM/yyyy").format($P{dataFinal})) :
  124 +$P{dataInicial} != null ? "Apartir de " + new SimpleDateFormat("dd/MM/yyyy").format($P{dataInicial}) :
  125 +$P{dataFinal} != null ? "Até " + new SimpleDateFormat("dd/MM/yyyy").format($P{dataFinal}) :
  126 +"Não informado"]]></textFieldExpression>
  127 + </textField>
  128 + </frame>
  129 + <frame>
  130 + <reportElement x="5" y="35" width="544" height="25" uuid="bcd4711f-c2a2-4ef5-bb90-a150b346a0cf"/>
  131 + <staticText>
  132 + <reportElement x="0" y="0" width="150" height="25" uuid="a6eead87-8e02-41a7-9499-59b318edef85">
  133 + <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
  134 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  135 + </reportElement>
  136 + <box padding="0" leftPadding="5" rightPadding="3"/>
  137 + <textElement textAlignment="Left" verticalAlignment="Middle">
  138 + <font isBold="true"/>
  139 + </textElement>
  140 + <text><![CDATA[Número / ano do contrato:]]></text>
  141 + </staticText>
  142 + <textField isBlankWhenNull="true">
  143 + <reportElement x="150" y="0" width="394" height="25" uuid="a0057589-19f8-437d-b135-9da3b94a8f28">
  144 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  145 + </reportElement>
  146 + <box padding="0" leftPadding="5" rightPadding="3"/>
  147 + <textElement textAlignment="Left" verticalAlignment="Middle"/>
  148 + <textFieldExpression><![CDATA[$F{numeroanocontrato}.substring(0, $F{numeroanocontrato}.length() - 4)
  149 +.concat("/")
  150 +.concat($F{numeroanocontrato}.substring($F{numeroanocontrato}.length() - 4))]]></textFieldExpression>
  151 + </textField>
  152 + </frame>
  153 + <line>
  154 + <reportElement x="5" y="60" width="544" height="1" uuid="d11d5dc2-5b37-419a-a86c-53f374300d94">
  155 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  156 + </reportElement>
  157 + </line>
  158 + </band>
  159 + </pageHeader>
  160 + <detail>
  161 + <band height="75" splitType="Stretch">
  162 + <staticText>
  163 + <reportElement x="5" y="10" width="544" height="25" uuid="699d764a-311e-4534-8606-9f3589ef7aa8">
  164 + <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
  165 + <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
  166 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  167 + </reportElement>
  168 + <box leftPadding="5" rightPadding="3"/>
  169 + <textElement textAlignment="Left" verticalAlignment="Middle">
  170 + <font size="13" isBold="true"/>
  171 + </textElement>
  172 + <text><![CDATA[1. Relatórios]]></text>
  173 + </staticText>
  174 + <componentElement>
  175 + <reportElement x="15" y="40" width="534" height="30" uuid="687f8495-5035-426f-8cde-dfbd8bfae41d">
  176 + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
  177 + </reportElement>
  178 + <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
  179 + <datasetRun subDataset="naoConformidade" uuid="cb840415-cc30-4246-bf34-2ce599102802">
  180 + <datasetParameter name="REPORT_CONNECTION">
  181 + <datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression>
  182 + </datasetParameter>
  183 + <datasetParameter name="contratoId">
  184 + <datasetParameterExpression><![CDATA[$P{contratoId}]]></datasetParameterExpression>
  185 + </datasetParameter>
  186 + <datasetParameter name="dataInicial">
  187 + <datasetParameterExpression><![CDATA[$P{dataInicial}]]></datasetParameterExpression>
  188 + </datasetParameter>
  189 + <datasetParameter name="dataFinal">
  190 + <datasetParameterExpression><![CDATA[$P{dataFinal}]]></datasetParameterExpression>
  191 + </datasetParameter>
  192 + <datasetParameter name="DATA_INICIAL">
  193 + <datasetParameterExpression><![CDATA[$P{DATA_INICIAL}]]></datasetParameterExpression>
  194 + </datasetParameter>
  195 + <datasetParameter name="DATA_FINAL">
  196 + <datasetParameterExpression><![CDATA[$P{DATA_FINAL}]]></datasetParameterExpression>
  197 + </datasetParameter>
  198 + <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
  199 + </datasetRun>
  200 + <jr:column width="90" uuid="407635d7-42da-4179-9431-a025caf11fbd">
  201 + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
  202 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  203 + <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
  204 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  205 + <staticText>
  206 + <reportElement x="0" y="0" width="90" height="30" uuid="1f98eb0c-6f4a-4af7-9425-586f89befa01"/>
  207 + <box padding="0">
  208 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  209 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  210 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  211 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  212 + </box>
  213 + <textElement textAlignment="Center" verticalAlignment="Middle">
  214 + <font isBold="true"/>
  215 + </textElement>
  216 + <text><![CDATA[Data]]></text>
  217 + </staticText>
  218 + </jr:columnHeader>
  219 + <jr:detailCell style="Table_TD" height="30" rowSpan="1">
  220 + <box padding="0">
  221 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  222 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  223 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  224 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  225 + </box>
  226 + <textField isStretchWithOverflow="true" isBlankWhenNull="true">
  227 + <reportElement x="0" y="0" width="90" height="30" isPrintWhenDetailOverflows="true" uuid="17e1d601-2f4b-4a1f-b380-1494c8286bb0"/>
  228 + <box padding="3">
  229 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  230 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  231 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  232 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  233 + </box>
  234 + <textElement textAlignment="Center" verticalAlignment="Middle"/>
  235 + <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{datanaoconformidade})]]></textFieldExpression>
  236 + </textField>
  237 + </jr:detailCell>
  238 + </jr:column>
  239 + <jr:column width="100" uuid="0283b8c0-e839-4788-b019-aaece0882599">
  240 + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
  241 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  242 + <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
  243 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  244 + <staticText>
  245 + <reportElement x="0" y="0" width="100" height="30" uuid="974e758a-8bf7-4952-999f-ce9618f47caa"/>
  246 + <box padding="0">
  247 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  248 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  249 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  250 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  251 + </box>
  252 + <textElement textAlignment="Center" verticalAlignment="Middle">
  253 + <font isBold="true"/>
  254 + </textElement>
  255 + <text><![CDATA[Não conformidade aplicável]]></text>
  256 + </staticText>
  257 + </jr:columnHeader>
  258 + <jr:detailCell style="Table_TD" height="30" rowSpan="1">
  259 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  260 + <box padding="0">
  261 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  262 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  263 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  264 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  265 + </box>
  266 + <textField isStretchWithOverflow="true" isBlankWhenNull="true">
  267 + <reportElement x="0" y="0" width="100" height="30" isPrintWhenDetailOverflows="true" uuid="210d7971-8daf-455b-a85c-321bda7fb0b5"/>
  268 + <box padding="3">
  269 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  270 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  271 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  272 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  273 + </box>
  274 + <textElement textAlignment="Left" verticalAlignment="Middle"/>
  275 + <textFieldExpression><![CDATA[$F{naoconformidadeaplicavel}]]></textFieldExpression>
  276 + </textField>
  277 + </jr:detailCell>
  278 + </jr:column>
  279 + <jr:column width="172" uuid="c1974531-3543-43df-aa80-bb50a6da10fe">
  280 + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
  281 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  282 + <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
  283 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  284 + <staticText>
  285 + <reportElement x="0" y="0" width="172" height="30" uuid="861458cb-d5e8-4899-a0e7-2bfb6a35cfd2"/>
  286 + <box padding="0">
  287 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  288 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  289 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  290 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  291 + </box>
  292 + <textElement textAlignment="Center" verticalAlignment="Middle">
  293 + <font isBold="true"/>
  294 + </textElement>
  295 + <text><![CDATA[Descrição]]></text>
  296 + </staticText>
  297 + </jr:columnHeader>
  298 + <jr:detailCell style="Table_TD" height="30" rowSpan="1">
  299 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  300 + <box padding="0">
  301 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  302 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  303 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  304 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  305 + </box>
  306 + <textField isStretchWithOverflow="true" isBlankWhenNull="true">
  307 + <reportElement x="0" y="0" width="172" height="30" isPrintWhenDetailOverflows="true" uuid="9fb27778-d8ca-4ca3-8050-afbf4ef71f2e"/>
  308 + <box padding="3">
  309 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  310 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  311 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  312 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  313 + </box>
  314 + <textElement textAlignment="Left" verticalAlignment="Middle"/>
  315 + <textFieldExpression><![CDATA[$F{descricao}]]></textFieldExpression>
  316 + </textField>
  317 + </jr:detailCell>
  318 + </jr:column>
  319 + <jr:column width="172" uuid="1a9d9d9a-960c-4941-9117-8661ba8362bf">
  320 + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
  321 + <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
  322 + <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
  323 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  324 + <staticText>
  325 + <reportElement x="0" y="0" width="172" height="30" uuid="88c4c49d-2a32-4a3b-afd4-99977d3a707b"/>
  326 + <box padding="0">
  327 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  328 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  329 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  330 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  331 + </box>
  332 + <textElement textAlignment="Center" verticalAlignment="Middle">
  333 + <font isBold="true"/>
  334 + </textElement>
  335 + <text><![CDATA[Resposta da contratada]]></text>
  336 + </staticText>
  337 + </jr:columnHeader>
  338 + <jr:detailCell style="Table_TD" height="30" rowSpan="1">
  339 + <property name="com.jaspersoft.studio.unit.width" value="px"/>
  340 + <box padding="0">
  341 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  342 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  343 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  344 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  345 + </box>
  346 + <textField isStretchWithOverflow="true" isBlankWhenNull="true">
  347 + <reportElement x="0" y="0" width="172" height="30" isPrintWhenDetailOverflows="true" uuid="8578f83b-3f28-4045-bbb5-9981bf617ee4"/>
  348 + <box padding="3">
  349 + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  350 + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  351 + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  352 + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
  353 + </box>
  354 + <textElement textAlignment="Left" verticalAlignment="Middle"/>
  355 + <textFieldExpression><![CDATA[$F{resposta}]]></textFieldExpression>
  356 + </textField>
  357 + </jr:detailCell>
  358 + </jr:column>
  359 + </jr:table>
  360 + </componentElement>
  361 + </band>
  362 + </detail>
  363 +</jasperReport>
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ConsultaRelatoriosController.js
@@ -59,26 +59,29 @@ citApp.controller(&#39;ConsultaRelatoriosController&#39;, [&#39;$scope&#39;, &#39;$filter&#39;, &#39;$timeou @@ -59,26 +59,29 @@ citApp.controller(&#39;ConsultaRelatoriosController&#39;, [&#39;$scope&#39;, &#39;$filter&#39;, &#39;$timeou
59 } 59 }
60 } 60 }
61 $scope.setLoadingGet(true); 61 $scope.setLoadingGet(true);
62 - if($scope.consultaRelatoriosForm.$valid && $scope.isTiposRelatorioSelecionado) {  
63 -  
64 - var idsRelatoriosSelecionados = '';  
65 - angular.forEach($scope.tiposRelatorios, function(relatorio) {  
66 - if(relatorio.$selected){  
67 - idsRelatoriosSelecionados += relatorio.id + ',';  
68 - }  
69 - });  
70 -  
71 - var idContrato = $scope.contrato ? $scope.contrato.id : null;  
72 - $scope.url = '/cit-contratos-web/rest/contratoEvento/pdfGerarRelatorios?idsTiposRelatorio='  
73 - + idsRelatoriosSelecionados + '&idContrato=' + idContrato + '&dataInicial=' + $scope.dataInicial + '&dataFinal=' + $scope.dataFinal;  
74 - $scope.visualizarRelatorio($scope.url, $translate.instant('CONTRATOS.LABEL.RELATORIOS'));  
75 - $scope.setLoading(false);  
76 -  
77 - } else { 62 + if($scope.consultaRelatoriosForm.$invalid && !$scope.isTiposRelatorioSelecionado) {
78 $scope.setLoading(false); 63 $scope.setLoading(false);
79 //Mensagem de erro de campos obrigatorios não preenchidos 64 //Mensagem de erro de campos obrigatorios não preenchidos
80 $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); 65 $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false);
  66 + return;
81 } 67 }
  68 + var idsRelatoriosSelecionados = '';
  69 + angular.forEach($scope.tiposRelatorios, function(relatorio) {
  70 + if(relatorio.$selected){
  71 + idsRelatoriosSelecionados += relatorio.id + ',';
  72 + }
  73 + });
  74 +
  75 + var contratoId = $scope.contrato ? $scope.contrato.id : null;
  76 + var dataInicial = $scope.dataInicial == null ? '' : $scope.dataInicial;
  77 + var dataFinal = $scope.dataFinal == null ? '' : $scope.dataFinal;
  78 + $scope.url = '/cit-contratos-web/rest/contratoEvento/pdfGerarRelatorios?' +
  79 + 'idsTiposRelatorio='+ idsRelatoriosSelecionados +
  80 + '&idContrato=' + contratoId +
  81 + '&dataInicial=' + dataInicial +
  82 + '&dataFinal=' + dataFinal;
  83 + $scope.visualizarRelatorio($scope.url, $translate.instant('CONTRATOS.LABEL.RELATORIOS'));
  84 + $scope.setLoading(false);
82 }; 85 };
83 86
84 }]); 87 }]);
85 \ No newline at end of file 88 \ No newline at end of file