Commit 48ca806de69d5480184d5e40d8b711232964df92
Exists in
master
Merge branch 'tarefa-4115' into ctr-pj-0001-sprint10
# Conflicts: # cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/ContratoEventoServiceImpl.java # cit-contratos-api/src/main/resources/script-bd/v1.0.0-alpha10/01-cit-contratos-1.0.0-ALFA-10-postgres.sql # cit-contratos-web/src/main/java/br/com/centralit/controller/ContratoEventoController.java
Showing
30 changed files
with
2482 additions
and
38 deletions
Show diff stats
cit-contratos-api/src/main/java/br/com/centralit/api/dao/ContratoEventoDao.java
... | ... | @@ -50,4 +50,6 @@ public interface ContratoEventoDao extends CitGenericDAO { |
50 | 50 | Collection<ContratoEvento> findAllByContratoIntervalDataEmissao(Long contratoId, Date dataInicial, Date dateFinal); |
51 | 51 | |
52 | 52 | Collection<ContratoEvento> findAllByContratoTipoTermoDataEmissao(List<Long> codigosTermo, Date dataInicial, Date dateFinal); |
53 | + | |
54 | + Collection<ContratoEvento> findAllByTipoEvento(List<Long> tiposEvento); | |
53 | 55 | } |
54 | 56 | \ No newline at end of file | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/dao/impl/ContratoDaoHibernate.java
cit-contratos-api/src/main/java/br/com/centralit/api/dao/impl/ContratoEventoDaoHibernate.java
... | ... | @@ -118,4 +118,18 @@ public class ContratoEventoDaoHibernate extends CitGenericDAOImpl implements Con |
118 | 118 | |
119 | 119 | return this.search(search); |
120 | 120 | } |
121 | + | |
122 | + @Override | |
123 | + public Collection<ContratoEvento> findAllByTipoEvento(List<Long> tiposEvento) { | |
124 | + SearchSeven search = new SearchSeven(); | |
125 | + | |
126 | + search.addFilterIn("tipoEvento.id", tiposEvento); | |
127 | + | |
128 | + search.addSort("dataEvento", false); | |
129 | + | |
130 | + search.addSort("id", false); | |
131 | + | |
132 | + return this.search(search); | |
133 | + } | |
134 | + | |
121 | 135 | } | ... | ... |
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 | 44 | return this.search(search, this.persistentClass); |
45 | 45 | } |
46 | 46 | |
47 | + @Override | |
47 | 48 | public PersistentObject buscarUltimoRegistroPorDataEmissao(String property, Calendar dataEmissaoOcorrencia, Long idOrganizacao) { |
48 | 49 | |
49 | 50 | int anoInformado = dataEmissaoOcorrencia.get(Calendar.YEAR); |
50 | 51 | |
51 | 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 | 54 | dataInicial.set(Calendar.MILLISECOND,0); |
57 | 55 | |
58 | 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 | 58 | dataFinal.set(Calendar.MILLISECOND,999); |
64 | 59 | |
65 | 60 | Search search = new Search(); |
... | ... | @@ -91,4 +86,4 @@ public class RegistroOcorrenciaDaoHibernate extends CitGenericDAOImpl implements |
91 | 86 | return totalGlosa; |
92 | 87 | } |
93 | 88 | |
94 | 89 | -} |
90 | +} | |
95 | 91 | \ No newline at end of file | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/model/DominioContrato.java
... | ... | @@ -106,6 +106,7 @@ public class DominioContrato { |
106 | 106 | public static final Long CODIGO_TIPO_EVENTO_RECEBIMENTO_AVALIACAO_DESCUMPRIMENTO = 2L; |
107 | 107 | public static final Long CODIGO_TIPO_EVENTO_RECEBIMENTO_AVALIACAO_PASSIVEL_CORRECAO = 3L; |
108 | 108 | public static final Long CODIGO_TIPO_EVENTO_RECEBIMENTO_AVALIACAO_OUTROS = 4L; |
109 | + | |
109 | 110 | //===================================================================================================================================== |
110 | 111 | // TIPO_RESPOSTA_QUESTAO_CHAVE |
111 | 112 | public static final String TIPO_RESPOSTA_QUESTAO = "tipoRespostaQuestao"; | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/ContratoEmpenhoService.java
... | ... | @@ -2,6 +2,7 @@ package br.com.centralit.api.service; |
2 | 2 | |
3 | 3 | import java.sql.Connection; |
4 | 4 | import java.util.Collection; |
5 | +import java.util.Date; | |
5 | 6 | |
6 | 7 | import javax.servlet.http.HttpServletResponse; |
7 | 8 | |
... | ... | @@ -34,4 +35,7 @@ public interface ContratoEmpenhoService extends GenericService<ContratoEmpenho, |
34 | 35 | |
35 | 36 | JasperPrint getJasperPrintEmpenho(Long id, Connection conn, Usuario usuarioLogado, String titulo) throws JRException; |
36 | 37 | |
38 | + JasperPrint getJasperPrintRelatorioEmpenho(Long idContrato, Date dataInicial, Date dataFinal, | |
39 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException; | |
40 | + | |
37 | 41 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/ContratoEventoService.java
... | ... | @@ -56,4 +56,7 @@ public interface ContratoEventoService extends GenericService<ContratoEvento, Lo |
56 | 56 | void gerarTermos(Long[] tiposTermo, Long idContrato, Date dataInicial, Date dateFinal, boolean download,HttpServletResponse response); |
57 | 57 | |
58 | 58 | Collection<ContratoEvento> findAllByContratoTipoTermoDataEmissao(Long[] codigosTermo,Date dataInicial, Date dateFinal); |
59 | + | |
60 | + void gerarRelatorios(Long[] arrayLong, Long idContrato, Date dataInicio, Date dataFim, boolean download, | |
61 | + HttpServletResponse response); | |
59 | 62 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/EventoLiberacaoPagamentoService.java
1 | 1 | package br.com.centralit.api.service; |
2 | 2 | |
3 | 3 | import java.math.BigDecimal; |
4 | +import java.sql.Connection; | |
5 | +import java.util.Date; | |
4 | 6 | |
7 | +import net.sf.jasperreports.engine.JRException; | |
8 | +import net.sf.jasperreports.engine.JasperPrint; | |
5 | 9 | import br.com.centralit.api.model.EventoLiberacaoPagamento; |
10 | +import br.com.centralit.framework.model.Usuario; | |
6 | 11 | import br.com.centralit.framework.service.arquitetura.GenericService; |
7 | 12 | |
8 | 13 | public interface EventoLiberacaoPagamentoService extends GenericService<EventoLiberacaoPagamento, Long> { |
9 | 14 | |
10 | 15 | BigDecimal getValorTotalLiberado(Long contratoId); |
11 | 16 | |
17 | + JasperPrint getJasperPrintRelatorioLiberacaoPagamento(Long idContrato, Date dataInicial, Date dataFinal, | |
18 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException; | |
19 | + | |
12 | 20 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/EventoPenalidadeService.java
1 | 1 | package br.com.centralit.api.service; |
2 | 2 | |
3 | +import java.sql.Connection; | |
4 | +import java.util.Date; | |
5 | + | |
6 | +import net.sf.jasperreports.engine.JRException; | |
7 | +import net.sf.jasperreports.engine.JasperPrint; | |
3 | 8 | import br.com.centralit.api.model.EventoPenalidade; |
9 | +import br.com.centralit.framework.model.Usuario; | |
4 | 10 | import br.com.centralit.framework.service.arquitetura.GenericService; |
5 | 11 | |
6 | 12 | |
... | ... | @@ -18,4 +24,7 @@ import br.com.centralit.framework.service.arquitetura.GenericService; |
18 | 24 | */ |
19 | 25 | public interface EventoPenalidadeService extends GenericService<EventoPenalidade, Long> { |
20 | 26 | |
27 | + JasperPrint getJasperPrintRelatorioPenalidade(Long idContrato, Date dataInicial, Date dataFinal, | |
28 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException; | |
29 | + | |
21 | 30 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/EventoRegistroNaoConformidadeService.java
1 | 1 | package br.com.centralit.api.service; |
2 | 2 | |
3 | +import java.sql.Connection; | |
4 | +import java.util.Date; | |
3 | 5 | import java.util.List; |
4 | 6 | |
7 | +import net.sf.jasperreports.engine.JRException; | |
8 | +import net.sf.jasperreports.engine.JasperPrint; | |
5 | 9 | import br.com.centralit.api.model.EventoRegistroNaoConformidade; |
10 | +import br.com.centralit.framework.model.Usuario; | |
6 | 11 | import br.com.centralit.framework.service.arquitetura.GenericService; |
7 | 12 | |
8 | 13 | public interface EventoRegistroNaoConformidadeService extends GenericService<EventoRegistroNaoConformidade, Long> { |
... | ... | @@ -11,4 +16,7 @@ public interface EventoRegistroNaoConformidadeService extends GenericService<Eve |
11 | 16 | |
12 | 17 | Boolean existeVinculoSancoesComNaoConformidade(Long sancaoId); |
13 | 18 | |
19 | + JasperPrint getJasperPrintRelatorioRegistroNaoConformidade(Long idContrato, Date dataInicial, Date dataFinal, | |
20 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException; | |
21 | + | |
14 | 22 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/EventoRepactuacaoService.java
1 | 1 | package br.com.centralit.api.service; |
2 | 2 | |
3 | 3 | import java.sql.Connection; |
4 | +import java.util.Date; | |
4 | 5 | |
5 | 6 | import net.sf.jasperreports.engine.JRException; |
6 | 7 | import net.sf.jasperreports.engine.JasperPrint; |
... | ... | @@ -34,4 +35,7 @@ public interface EventoRepactuacaoService extends GenericService<EventoRepactuac |
34 | 35 | |
35 | 36 | JasperPrint getJasperPrintRepactuacao(Long id, Connection conn, Usuario usuarioLogado, String titulo) throws JRException; |
36 | 37 | |
38 | + JasperPrint getJasperPrintRelatorioRepactuacao(Long idContrato, Date dataInicial, Date dataFinal, | |
39 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException; | |
40 | + | |
37 | 41 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/ContratoEmpenhoServiceImpl.java
... | ... | @@ -5,6 +5,7 @@ import java.io.InputStream; |
5 | 5 | import java.sql.Connection; |
6 | 6 | import java.util.ArrayList; |
7 | 7 | import java.util.Collection; |
8 | +import java.util.Date; | |
8 | 9 | import java.util.HashMap; |
9 | 10 | import java.util.List; |
10 | 11 | import java.util.Map; |
... | ... | @@ -23,7 +24,6 @@ import br.com.centralit.api.model.ContratoEmpenhoObservacao; |
23 | 24 | import br.com.centralit.api.model.DominioContrato; |
24 | 25 | import br.com.centralit.api.service.AnexoService; |
25 | 26 | import br.com.centralit.api.service.ContratoEmpenhoService; |
26 | -import br.com.centralit.api.service.ContratoService; | |
27 | 27 | import br.com.centralit.api.service.DominioService; |
28 | 28 | import br.com.centralit.api.service.InternacionalizacaoService; |
29 | 29 | import br.com.centralit.api.service.ParceiroService; |
... | ... | @@ -48,17 +48,29 @@ import net.sf.jasperreports.engine.xml.JRXmlLoader; |
48 | 48 | |
49 | 49 | /** |
50 | 50 | * |
51 | - * <p><img src="http://centralit.com.br/images/logo_central.png"></p> | |
51 | + * <p> | |
52 | + * <img src="http://centralit.com.br/images/logo_central.png"> | |
53 | + * </p> | |
52 | 54 | * |
53 | - * <p><b>Company: </b> Central IT - Governança Corporativa - </p> | |
55 | + * <p> | |
56 | + * <b>Company: </b> Central IT - Governança Corporativa - | |
57 | + * </p> | |
54 | 58 | * |
55 | - * <p><b>Title: </b></p> | |
59 | + * <p> | |
60 | + * <b>Title: </b> | |
61 | + * </p> | |
56 | 62 | * |
57 | - * <p><b>Description: </b></p> | |
63 | + * <p> | |
64 | + * <b>Description: </b> | |
65 | + * </p> | |
58 | 66 | * |
59 | - * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | |
67 | + * <p> | |
68 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
69 | + * </p> | |
60 | 70 | * |
61 | - * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
71 | + * <p> | |
72 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
73 | + * </p> | |
62 | 74 | * |
63 | 75 | * @since 09/03/2016 - 11:46:17 |
64 | 76 | * |
... | ... | @@ -70,10 +82,7 @@ import net.sf.jasperreports.engine.xml.JRXmlLoader; |
70 | 82 | @Service("contratoEmpenhoService") |
71 | 83 | public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpenho, Long> implements ContratoEmpenhoService { |
72 | 84 | |
73 | - private ContratoEmpenhoDao contratoEmpenhoDao; | |
74 | - | |
75 | - @Autowired | |
76 | - private ContratoService contratoService; | |
85 | + private ContratoEmpenhoDao contratoEmpenhoDao; | |
77 | 86 | |
78 | 87 | @Autowired |
79 | 88 | private AnexoService anexoService; |
... | ... | @@ -95,10 +104,10 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
95 | 104 | @Autowired |
96 | 105 | private ReportController reportService; |
97 | 106 | |
98 | - @Autowired | |
99 | - public ContratoEmpenhoServiceImpl(ContratoEmpenhoDao contratoEmpenhoDao) { | |
100 | - this.dao = contratoEmpenhoDao; | |
101 | - this.contratoEmpenhoDao = contratoEmpenhoDao; | |
107 | + @Autowired | |
108 | + public ContratoEmpenhoServiceImpl( ContratoEmpenhoDao contratoEmpenhoDao ) { | |
109 | + this.dao = contratoEmpenhoDao; | |
110 | + this.contratoEmpenhoDao = contratoEmpenhoDao; | |
102 | 111 | } |
103 | 112 | |
104 | 113 | public ContratoEmpenho save(ContratoEmpenho entity) { |
... | ... | @@ -129,7 +138,7 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
129 | 138 | } |
130 | 139 | |
131 | 140 | if (idAutor == null) { |
132 | - idAutor = ((Usuario) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getId(); | |
141 | + idAutor = ( (Usuario) SecurityContextHolder.getContext().getAuthentication().getPrincipal() ).getId(); | |
133 | 142 | } |
134 | 143 | |
135 | 144 | observacao.setAutor(this.usuarioService.find(idAutor)); |
... | ... | @@ -149,8 +158,8 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
149 | 158 | documento.setEmitente(this.parceiroServiceFornecedor.find(documento.getEmitente().getId())); |
150 | 159 | } |
151 | 160 | |
152 | - if (!UtilColecao.isVazio(documento.getAnexos())){ | |
153 | - Anexo anexo = (Anexo) ((List)documento.getAnexos()).get(0); | |
161 | + if (!UtilColecao.isVazio(documento.getAnexos())) { | |
162 | + Anexo anexo = ( (List<Anexo>) documento.getAnexos() ).get(0); | |
154 | 163 | List<Anexo> listaAnexo = new ArrayList<Anexo>(); |
155 | 164 | listaAnexo.add(this.anexoService.getReference(anexo.getId())); |
156 | 165 | documento.setAnexos(listaAnexo); |
... | ... | @@ -163,16 +172,19 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
163 | 172 | |
164 | 173 | @Override |
165 | 174 | public Collection<ContratoEmpenho> findAllByContrato(Long contratoId) { |
175 | + | |
166 | 176 | return this.contratoEmpenhoDao.findAllByContrato(contratoId); |
167 | 177 | } |
168 | 178 | |
169 | 179 | @Override |
170 | 180 | public Collection<ContratoEmpenho> findEmpenhoParaLiberacao(Long contratoId) { |
181 | + | |
171 | 182 | return this.contratoEmpenhoDao.findEmpenhoParaLiberacao(contratoId); |
172 | 183 | } |
173 | 184 | |
174 | 185 | public Dominio getIdioma() { |
175 | - if(!UtilObjeto.isReferencia(idioma)){ | |
186 | + | |
187 | + if (!UtilObjeto.isReferencia(idioma)) { | |
176 | 188 | idioma = this.dominioService.findByChaveAndCodigo("tipoIdioma", Dominio.TIPO_IDIOMA_PT_BR_CODIGO); |
177 | 189 | } |
178 | 190 | return idioma; |
... | ... | @@ -180,6 +192,7 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
180 | 192 | |
181 | 193 | @Override |
182 | 194 | public void gerarPdfEmpenho(Long idEmpenho, boolean download, HttpServletResponse response) { |
195 | + | |
183 | 196 | Connection conn = null; |
184 | 197 | ByteArrayOutputStream baos = null; |
185 | 198 | InputStream input = null; |
... | ... | @@ -204,6 +217,7 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
204 | 217 | |
205 | 218 | @Override |
206 | 219 | public JasperPrint getJasperPrintEmpenho(Long id, Connection conn, Usuario usuarioLogado, String titulo) throws JRException { |
220 | + | |
207 | 221 | InputStream inputSub = null; |
208 | 222 | InputStream input = null; |
209 | 223 | try { |
... | ... | @@ -226,9 +240,43 @@ public class ContratoEmpenhoServiceImpl extends GenericServiceImpl<ContratoEmpen |
226 | 240 | parameters.put("REPORT_CONNECTION", conn); |
227 | 241 | |
228 | 242 | return JasperFillManager.fillReport(jasperReport, parameters, conn); |
229 | - } finally{ | |
243 | + } finally { | |
244 | + UtilDataBase.closeResources(inputSub); | |
245 | + } | |
246 | + } | |
247 | + | |
248 | + @Override | |
249 | + public JasperPrint getJasperPrintRelatorioEmpenho(Long idContrato, Date dataInicial, Date dataFinal, Connection conn, Usuario usuarioLogado, String titulo) throws JRException { | |
250 | + | |
251 | + InputStream input = null; | |
252 | + InputStream inputSub = null; | |
253 | + JasperPrint jasperPrint = null; | |
254 | + try { | |
255 | + input = this.getClass().getResourceAsStream("/reports/templateRetrato.jrxml"); | |
256 | + inputSub = this.getClass().getResourceAsStream("/reports/relatorioEventoEmpenho.jrxml"); | |
257 | + | |
258 | + JasperDesign jasperDesign = JRXmlLoader.load(input); | |
259 | + JasperDesign jasperDesignSub = JRXmlLoader.load(inputSub); | |
260 | + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); | |
261 | + JasperReport jasperReportSub = JasperCompileManager.compileReport(jasperDesignSub); | |
262 | + | |
263 | + Map<String, Object> subReportParameters = new HashMap<String, Object>(); | |
264 | + subReportParameters.put("contratoId", idContrato); | |
265 | + subReportParameters.put("dataInicial", dataInicial); | |
266 | + subReportParameters.put("dataFinal", dataFinal); | |
267 | + | |
268 | + Map<String, Object> parameters = new HashMap<String, Object>(); | |
269 | + parameters.put("ORGANIZACAO_ID", usuarioLogado.getOrganizacao().getId()); | |
270 | + parameters.put("TITULO", titulo); | |
271 | + parameters.put("SUBREPORT_DIR", jasperReportSub); | |
272 | + parameters.put("SUBREPORT_PARAMETERS_MAP", subReportParameters); | |
273 | + parameters.put("REPORT_CONNECTION", conn); | |
274 | + | |
275 | + jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); | |
276 | + } finally { | |
230 | 277 | UtilDataBase.closeResources(inputSub); |
231 | 278 | } |
279 | + return jasperPrint; | |
232 | 280 | } |
233 | 281 | |
234 | 282 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/ContratoEventoServiceImpl.java
... | ... | @@ -38,7 +38,10 @@ import br.com.centralit.api.service.ContratoService; |
38 | 38 | import br.com.centralit.api.service.DominioService; |
39 | 39 | import br.com.centralit.api.service.EventoAditivoService; |
40 | 40 | import br.com.centralit.api.service.EventoApostilamentoService; |
41 | +import br.com.centralit.api.service.EventoLiberacaoPagamentoService; | |
42 | +import br.com.centralit.api.service.EventoPenalidadeService; | |
41 | 43 | import br.com.centralit.api.service.EventoRecebimentoObjetoService; |
44 | +import br.com.centralit.api.service.EventoRegistroNaoConformidadeService; | |
42 | 45 | import br.com.centralit.api.service.EventoRepactuacaoService; |
43 | 46 | import br.com.centralit.api.service.EventoRescisaoContratoService; |
44 | 47 | import br.com.centralit.api.service.InternacionalizacaoService; |
... | ... | @@ -56,17 +59,29 @@ import br.com.centralit.framework.util.UtilObjeto; |
56 | 59 | |
57 | 60 | /** |
58 | 61 | * |
62 | + * <p> | |
59 | 63 | * <p><img src="http://centralit.com.br/images/logo_central.png"></p> |
64 | + * </p> | |
60 | 65 | * |
66 | + * <p> | |
61 | 67 | * <p><b>Company: </b> Central IT - Governança Corporativa - </p> |
68 | + * </p> | |
62 | 69 | * |
70 | + * <p> | |
63 | 71 | * <p><b>Title: </b></p> |
72 | + * </p> | |
64 | 73 | * |
74 | + * <p> | |
65 | 75 | * <p><b>Description: </b></p> |
76 | + * </p> | |
66 | 77 | * |
78 | + * <p> | |
67 | 79 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> |
80 | + * </p> | |
68 | 81 | * |
82 | + * <p> | |
69 | 83 | * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> |
84 | + * </p> | |
70 | 85 | * |
71 | 86 | * @since 09/03/2016 - 11:39:48 |
72 | 87 | * |
... | ... | @@ -115,17 +130,27 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl<ContratoEvento |
115 | 130 | private EventoApostilamentoService apostilamentoService; |
116 | 131 | |
117 | 132 | @Autowired |
133 | + private EventoLiberacaoPagamentoService eventoLiberacaoPagamentoService; | |
134 | + | |
135 | + @Autowired | |
136 | + private EventoRegistroNaoConformidadeService eventoRegistroNaoConformidadeService; | |
137 | + | |
138 | + @Autowired | |
139 | + private EventoPenalidadeService eventoPenalidadeService; | |
140 | + | |
141 | + @Autowired | |
118 | 142 | private ContratoService contratoService; |
119 | 143 | |
120 | 144 | private Dominio idioma; |
121 | 145 | |
122 | 146 | /** |
123 | 147 | * Responsável pela criação de novas instâncias desta classe. |
148 | + * | |
124 | 149 | * @param contratoEnvolvidoDao |
125 | 150 | * @param validator |
126 | 151 | */ |
127 | 152 | @Autowired |
128 | - public ContratoEventoServiceImpl(ContratoEventoDao contratoEventoDao) { | |
153 | + public ContratoEventoServiceImpl( ContratoEventoDao contratoEventoDao ) { | |
129 | 154 | |
130 | 155 | this.dao = contratoEventoDao; |
131 | 156 | |
... | ... | @@ -134,12 +159,14 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl<ContratoEvento |
134 | 159 | |
135 | 160 | @Override |
136 | 161 | public Collection<ContratoEvento> findAllByContrato(Long contratoId) { |
162 | + | |
137 | 163 | return this.contratoEventoDao.findAllByContrato(contratoId); |
138 | 164 | } |
139 | 165 | |
140 | 166 | @Override |
141 | 167 | public Boolean removeEventoContrato(String justificativaRemocao, Long idEvento) { |
142 | - if(StringUtils.isEmpty(justificativaRemocao)){ | |
168 | + | |
169 | + if (StringUtils.isEmpty(justificativaRemocao)) { | |
143 | 170 | throw new BusinessException(this.internacionalizacaoService.getTranslate("MSG.MN001", this.getIdioma())); |
144 | 171 | } |
145 | 172 | ContratoEvento contratoEvento = this.find(idEvento); |
... | ... | @@ -159,7 +186,8 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl<ContratoEvento |
159 | 186 | } |
160 | 187 | |
161 | 188 | public Dominio getIdioma() { |
162 | - if(!UtilObjeto.isReferencia(idioma)){ | |
189 | + | |
190 | + if (!UtilObjeto.isReferencia(idioma)) { | |
163 | 191 | idioma = this.dominioService.findByChaveAndCodigo("tipoIdioma", Dominio.TIPO_IDIOMA_PT_BR_CODIGO); |
164 | 192 | } |
165 | 193 | return idioma; |
... | ... | @@ -167,11 +195,13 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl<ContratoEvento |
167 | 195 | |
168 | 196 | @Override |
169 | 197 | public Collection<ContratoEvento> findAllByContratoTipoEvento(Long contratoId, String tipoEvento) { |
198 | + | |
170 | 199 | return this.contratoEventoDao.findAllByContratoTipoEvento(contratoId, this.dominioService.findByChaveAndNome(DominioContrato.TIPO_EVENTO_CONTRATO, tipoEvento).getId()); |
171 | 200 | } |
172 | 201 | |
173 | 202 | @Override |
174 | 203 | public Collection<ContratoEvento> findAllByContratoIntervalDataEmissao(Long contratoId, Date dataInicial, Date dateFinal) { |
204 | + | |
175 | 205 | return this.contratoEventoDao.findAllByContratoIntervalDataEmissao(contratoId, dataInicial, dateFinal); |
176 | 206 | } |
177 | 207 | |
... | ... | @@ -297,4 +327,110 @@ public class ContratoEventoServiceImpl extends GenericServiceImpl<ContratoEvento |
297 | 327 | return idsContratos; |
298 | 328 | } |
299 | 329 | |
330 | + @Override | |
331 | + public void gerarRelatorios(Long[] idsTipoEvento, Long idContrato, Date dataInicial, Date dataFinal, boolean download, HttpServletResponse response) { | |
332 | + | |
333 | + Connection conn = null; | |
334 | + ByteArrayOutputStream baos = null; | |
335 | + InputStream inputCabecalho = null; | |
336 | + JasperPrint jasperPrint = null; | |
337 | + | |
338 | + try { | |
339 | + conn = reportService.getConnection(); | |
340 | + | |
341 | + Usuario usuarioLogado = (Usuario) usuarioService.find(( (Usuario) SecurityContextHolder.getContext().getAuthentication().getPrincipal() ).getId()); | |
342 | + | |
343 | + List<JasperPrint> jasperPrints = new ArrayList<JasperPrint>(); | |
344 | + JasperPrint jasperPrincipal = new JasperPrint(); | |
345 | + | |
346 | + if (UtilObjeto.isReferencia(idsTipoEvento)) { | |
347 | + Integer index = 1; | |
348 | + | |
349 | + if (idContrato == null) { | |
350 | + | |
351 | + List<Long> idsContratos = obtemIdsContratosPorEvento(idsTipoEvento); | |
352 | + | |
353 | + for (Long contrato : idsContratos) { | |
354 | + | |
355 | + for (Long idTipoEvento : idsTipoEvento) { | |
356 | + Dominio dominioTipoRelatorio = dominioService.find(idTipoEvento); | |
357 | + | |
358 | + jasperPrint = selecionaRelatorio(contrato, dataInicial, dataFinal, conn, jasperPrint, usuarioLogado, dominioTipoRelatorio); | |
359 | + | |
360 | + jasperPrincipal = addJasperPrint(jasperPrint, jasperPrints, jasperPrincipal, index); | |
361 | + index++; | |
362 | + continue; | |
363 | + } | |
364 | + } | |
365 | + | |
366 | + | |
367 | + } else { | |
368 | + | |
369 | + for (Long idTipoEvento : idsTipoEvento) { | |
370 | + Dominio dominioTipoRelatorio = dominioService.find(idTipoEvento); | |
371 | + | |
372 | + jasperPrint = selecionaRelatorio(idContrato, dataInicial, dataFinal, conn, jasperPrint, usuarioLogado, dominioTipoRelatorio); | |
373 | + | |
374 | + jasperPrincipal = addJasperPrint(jasperPrint, jasperPrints, jasperPrincipal, index); | |
375 | + index++; | |
376 | + continue; | |
377 | + } | |
378 | + } | |
379 | + | |
380 | + if (!UtilColecao.isVazio(jasperPrints)) { | |
381 | + for (JasperPrint jasper : jasperPrints) { | |
382 | + for (int j = 0; j < jasper.getPages().size(); j++) { | |
383 | + JRPrintPage object = (JRPrintPage) jasper.getPages().get(j); | |
384 | + jasperPrincipal.addPage(object); | |
385 | + } | |
386 | + } | |
387 | + } | |
388 | + reportService.gerarRelatorio(download, "pdf", jasperPrincipal, response, baos, ""); | |
389 | + } | |
390 | + | |
391 | + } catch (JRException jre) { | |
392 | + throw new RuntimeException(jre); | |
393 | + } finally { | |
394 | + UtilDataBase.closeResources(conn, inputCabecalho, baos); | |
395 | + } | |
396 | + } | |
397 | + | |
398 | + private JasperPrint selecionaRelatorio(Long idContrato, Date dataInicial, Date dataFinal, Connection conn, JasperPrint jasperPrint, Usuario usuarioLogado, Dominio dominioTipoRelatorio) | |
399 | + throws JRException { | |
400 | + | |
401 | + if (dominioTipoRelatorio.getCodigo() == DominioContrato.TIPO_EVENTO_EMPENHO) { | |
402 | + String titulo = this.internacionalizacaoService.getTranslate("CONTRATOS.LABEL.RELATORIO_REGISTRO_EMPENHO", this.getIdioma()); | |
403 | + jasperPrint = this.contratoEmpenhoService.getJasperPrintRelatorioEmpenho(idContrato, dataInicial, dataFinal, conn, usuarioLogado, titulo); | |
404 | + | |
405 | + } else if (dominioTipoRelatorio.getCodigo() == DominioContrato.TIPO_EVENTO_LIBERA_PAGAMENTO) { | |
406 | + String titulo = this.internacionalizacaoService.getTranslate("CONTRATOS.LABEL.RELATORIO_LIBERACAO_PAGAMENTO", this.getIdioma()); | |
407 | + jasperPrint = this.eventoLiberacaoPagamentoService.getJasperPrintRelatorioLiberacaoPagamento(idContrato, dataInicial, dataFinal, conn, usuarioLogado, titulo); | |
408 | + | |
409 | + } else if (dominioTipoRelatorio.getCodigo() == DominioContrato.TIPO_EVENTO_REPACTUACAO) { | |
410 | + String titulo = this.internacionalizacaoService.getTranslate("CONTRATOS.LABEL.RELATORIO_REPACTUACAO", this.getIdioma()); | |
411 | + jasperPrint = this.repactuacaoService.getJasperPrintRelatorioRepactuacao(idContrato, dataInicial, dataFinal, conn, usuarioLogado, titulo); | |
412 | + | |
413 | + } else if (dominioTipoRelatorio.getCodigo() == DominioContrato.TIPO_EVENTO_NAO_CONFORMIDADE) { | |
414 | + String titulo = this.internacionalizacaoService.getTranslate("CONTRATOS.LABEL.RELATORIO_NAO_CONFORMIDADE", this.getIdioma()); | |
415 | + jasperPrint = this.eventoRegistroNaoConformidadeService.getJasperPrintRelatorioRegistroNaoConformidade(idContrato, dataInicial, dataFinal, conn, usuarioLogado, titulo); | |
416 | + | |
417 | + } else if (dominioTipoRelatorio.getCodigo() == DominioContrato.TIPO_EVENTO_PENALIDADE) { | |
418 | + String titulo = this.internacionalizacaoService.getTranslate("CONTRATOS.LABEL.RELATORIO_PENALIDADE_APLICADA", this.getIdioma()); | |
419 | + jasperPrint = this.eventoPenalidadeService.getJasperPrintRelatorioPenalidade(idContrato, dataInicial, dataFinal, conn, usuarioLogado, titulo); | |
420 | + } | |
421 | + | |
422 | + return jasperPrint; | |
423 | + } | |
424 | + | |
425 | + private List<Long> obtemIdsContratosPorEvento(Long[] idsTipoEvento) { | |
426 | + Collection<ContratoEvento> contratoEventos = contratoEventoDao.findAllByTipoEvento(Arrays.asList(idsTipoEvento)); | |
427 | + List<Long> idsContratos = new ArrayList<Long>(); | |
428 | + for (ContratoEvento contratoEvento : contratoEventos) { | |
429 | + if (!idsContratos.contains(contratoEvento.getContrato().getId())) { | |
430 | + idsContratos.add(contratoEvento.getContrato().getId()); | |
431 | + } | |
432 | + } | |
433 | + return idsContratos; | |
434 | + } | |
435 | + | |
300 | 436 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoLiberacaoPagamentoServiceImpl.java
1 | 1 | package br.com.centralit.api.service.impl; |
2 | 2 | |
3 | +import java.io.InputStream; | |
3 | 4 | import java.math.BigDecimal; |
5 | +import java.sql.Connection; | |
4 | 6 | import java.util.ArrayList; |
7 | +import java.util.Date; | |
8 | +import java.util.HashMap; | |
5 | 9 | import java.util.List; |
10 | +import java.util.Map; | |
11 | + | |
12 | +import net.sf.jasperreports.engine.JRException; | |
13 | +import net.sf.jasperreports.engine.JasperCompileManager; | |
14 | +import net.sf.jasperreports.engine.JasperFillManager; | |
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; | |
6 | 19 | |
7 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 21 | import org.springframework.beans.factory.annotation.Qualifier; |
... | ... | @@ -32,6 +45,7 @@ import br.com.centralit.framework.model.Usuario; |
32 | 45 | import br.com.centralit.framework.service.arquitetura.GenericServiceImpl; |
33 | 46 | import br.com.centralit.framework.util.Util; |
34 | 47 | import br.com.centralit.framework.util.UtilColecao; |
48 | +import br.com.centralit.framework.util.UtilDataBase; | |
35 | 49 | import br.com.centralit.framework.util.UtilDate; |
36 | 50 | import br.com.centralit.framework.util.UtilObjeto; |
37 | 51 | |
... | ... | @@ -205,4 +219,37 @@ public class EventoLiberacaoPagamentoServiceImpl extends GenericServiceImpl<Even |
205 | 219 | return liberacaoPagamentoDao.getValorTotalLiberado(contratoId); |
206 | 220 | } |
207 | 221 | |
222 | + @Override | |
223 | + public JasperPrint getJasperPrintRelatorioLiberacaoPagamento(Long idContrato, Date dataInicial, Date dataFinal, | |
224 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException { | |
225 | + | |
226 | + InputStream inputSub = null; | |
227 | + InputStream input = null; | |
228 | + try { | |
229 | + input = this.getClass().getResourceAsStream("/reports/templateRetrato.jrxml"); | |
230 | + inputSub = this.getClass().getResourceAsStream("/reports/relatorioLiberacoesPagamento.jrxml"); | |
231 | + | |
232 | + JasperDesign jasperDesign = JRXmlLoader.load(input); | |
233 | + JasperDesign jasperDesignSub = JRXmlLoader.load(inputSub); | |
234 | + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); | |
235 | + JasperReport jasperReportSub = JasperCompileManager.compileReport(jasperDesignSub); | |
236 | + | |
237 | + Map<String, Object> subReportParameters = new HashMap<String, Object>(); | |
238 | + subReportParameters.put("CONTRATO_ID", idContrato); | |
239 | + subReportParameters.put("DATA_INICIAL", dataInicial); | |
240 | + subReportParameters.put("DATA_FINAL", dataFinal); | |
241 | + | |
242 | + Map<String, Object> parameters = new HashMap<String, Object>(); | |
243 | + parameters.put("ORGANIZACAO_ID", usuarioLogado.getOrganizacao().getId()); | |
244 | + parameters.put("TITULO", titulo); | |
245 | + parameters.put("SUBREPORT_DIR", jasperReportSub); | |
246 | + parameters.put("SUBREPORT_PARAMETERS_MAP", subReportParameters); | |
247 | + parameters.put("REPORT_CONNECTION", conn); | |
248 | + | |
249 | + return JasperFillManager.fillReport(jasperReport, parameters, conn); | |
250 | + } finally{ | |
251 | + UtilDataBase.closeResources(inputSub); | |
252 | + } | |
253 | + } | |
254 | + | |
208 | 255 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoPenalidadeServiceImpl.java
1 | 1 | package br.com.centralit.api.service.impl; |
2 | 2 | |
3 | +import java.io.InputStream; | |
4 | +import java.sql.Connection; | |
3 | 5 | import java.text.SimpleDateFormat; |
4 | 6 | import java.util.Collection; |
5 | 7 | import java.util.Date; |
8 | +import java.util.HashMap; | |
9 | +import java.util.Map; | |
10 | + | |
11 | +import net.sf.jasperreports.engine.JRException; | |
12 | +import net.sf.jasperreports.engine.JasperCompileManager; | |
13 | +import net.sf.jasperreports.engine.JasperFillManager; | |
14 | +import net.sf.jasperreports.engine.JasperPrint; | |
15 | +import net.sf.jasperreports.engine.JasperReport; | |
16 | +import net.sf.jasperreports.engine.design.JasperDesign; | |
17 | +import net.sf.jasperreports.engine.xml.JRXmlLoader; | |
6 | 18 | |
7 | 19 | import org.apache.commons.collections.CollectionUtils; |
8 | 20 | import org.apache.commons.lang3.StringUtils; |
... | ... | @@ -25,7 +37,9 @@ import br.com.centralit.api.service.InternacionalizacaoService; |
25 | 37 | import br.com.centralit.api.service.ParceiroService; |
26 | 38 | import br.com.centralit.api.service.UsuarioService; |
27 | 39 | import br.com.centralit.framework.model.Dominio; |
40 | +import br.com.centralit.framework.model.Usuario; | |
28 | 41 | import br.com.centralit.framework.service.arquitetura.GenericServiceImpl; |
42 | +import br.com.centralit.framework.util.UtilDataBase; | |
29 | 43 | |
30 | 44 | |
31 | 45 | /** |
... | ... | @@ -141,4 +155,37 @@ public class EventoPenalidadeServiceImpl extends GenericServiceImpl<EventoPenali |
141 | 155 | return dominioService.findByChaveAndCodigo("tipoIdioma", Dominio.TIPO_IDIOMA_PT_BR_CODIGO); |
142 | 156 | } |
143 | 157 | |
158 | + @Override | |
159 | + public JasperPrint getJasperPrintRelatorioPenalidade(Long idContrato, Date dataInicial, Date dataFinal, | |
160 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException { | |
161 | + | |
162 | + InputStream inputSub = null; | |
163 | + InputStream input = null; | |
164 | + try { | |
165 | + input = this.getClass().getResourceAsStream("/reports/templateRetrato.jrxml"); | |
166 | + inputSub = this.getClass().getResourceAsStream("/reports/relatorioPenalidades.jrxml"); | |
167 | + | |
168 | + JasperDesign jasperDesign = JRXmlLoader.load(input); | |
169 | + JasperDesign jasperDesignSub = JRXmlLoader.load(inputSub); | |
170 | + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); | |
171 | + JasperReport jasperReportSub = JasperCompileManager.compileReport(jasperDesignSub); | |
172 | + | |
173 | + Map<String, Object> subReportParameters = new HashMap<String, Object>(); | |
174 | + subReportParameters.put("CONTRATO_ID", idContrato); | |
175 | + subReportParameters.put("DATA_INICIAL", dataInicial); | |
176 | + subReportParameters.put("DATA_FINAL", dataFinal); | |
177 | + | |
178 | + Map<String, Object> parameters = new HashMap<String, Object>(); | |
179 | + parameters.put("ORGANIZACAO_ID", usuarioLogado.getOrganizacao().getId()); | |
180 | + parameters.put("TITULO", titulo); | |
181 | + parameters.put("SUBREPORT_DIR", jasperReportSub); | |
182 | + parameters.put("SUBREPORT_PARAMETERS_MAP", subReportParameters); | |
183 | + parameters.put("REPORT_CONNECTION", conn); | |
184 | + | |
185 | + return JasperFillManager.fillReport(jasperReport, parameters, conn); | |
186 | + } finally{ | |
187 | + UtilDataBase.closeResources(inputSub); | |
188 | + } | |
189 | + } | |
190 | + | |
144 | 191 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoRegistroNaoConformidadeServiceImpl.java
1 | 1 | package br.com.centralit.api.service.impl; |
2 | 2 | |
3 | +import java.io.InputStream; | |
4 | +import java.sql.Connection; | |
3 | 5 | import java.text.SimpleDateFormat; |
4 | 6 | import java.util.ArrayList; |
5 | 7 | import java.util.Date; |
8 | +import java.util.HashMap; | |
6 | 9 | import java.util.List; |
10 | +import java.util.Map; | |
11 | + | |
12 | +import net.sf.jasperreports.engine.JRException; | |
13 | +import net.sf.jasperreports.engine.JasperCompileManager; | |
14 | +import net.sf.jasperreports.engine.JasperFillManager; | |
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; | |
7 | 19 | |
8 | 20 | import org.apache.commons.lang3.StringUtils; |
9 | 21 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -29,6 +41,7 @@ import br.com.centralit.framework.model.Dominio; |
29 | 41 | import br.com.centralit.framework.model.Usuario; |
30 | 42 | import br.com.centralit.framework.service.arquitetura.GenericServiceImpl; |
31 | 43 | import br.com.centralit.framework.util.UtilColecao; |
44 | +import br.com.centralit.framework.util.UtilDataBase; | |
32 | 45 | import br.com.centralit.framework.util.UtilObjeto; |
33 | 46 | |
34 | 47 | /** |
... | ... | @@ -137,7 +150,7 @@ public class EventoRegistroNaoConformidadeServiceImpl extends GenericServiceImpl |
137 | 150 | } |
138 | 151 | |
139 | 152 | if (!UtilColecao.isVazio(documento.getAnexos())){ |
140 | - Anexo anexo = (Anexo) ((List)documento.getAnexos()).get(0); | |
153 | + Anexo anexo = ((List<Anexo>)documento.getAnexos()).get(0); | |
141 | 154 | List<Anexo> listaAnexo = new ArrayList<Anexo>(); |
142 | 155 | listaAnexo.add(this.anexoService.getReference(anexo.getId())); |
143 | 156 | documento.setAnexos(listaAnexo); |
... | ... | @@ -164,4 +177,39 @@ public class EventoRegistroNaoConformidadeServiceImpl extends GenericServiceImpl |
164 | 177 | public Boolean existeVinculoSancoesComNaoConformidade(Long sancaoId) { |
165 | 178 | return this.eventoRegistroNaoConformidadeDao.existeVinculoSancoesComNaoConformidade(sancaoId); |
166 | 179 | } |
180 | + | |
181 | + @Override | |
182 | + public JasperPrint getJasperPrintRelatorioRegistroNaoConformidade(Long idContrato, Date dataInicial, Date dataFinal, | |
183 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException { | |
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; | |
214 | + } | |
167 | 215 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoRepactuacaoServiceImpl.java
... | ... | @@ -4,6 +4,7 @@ import java.io.InputStream; |
4 | 4 | import java.sql.Connection; |
5 | 5 | import java.text.SimpleDateFormat; |
6 | 6 | import java.util.Collection; |
7 | +import java.util.Date; | |
7 | 8 | import java.util.HashMap; |
8 | 9 | import java.util.Map; |
9 | 10 | |
... | ... | @@ -187,4 +188,37 @@ public class EventoRepactuacaoServiceImpl extends GenericServiceImpl<EventoRepac |
187 | 188 | } |
188 | 189 | } |
189 | 190 | |
191 | + @Override | |
192 | + public JasperPrint getJasperPrintRelatorioRepactuacao(Long idContrato, Date dataInicial, Date dataFinal, | |
193 | + Connection conn, Usuario usuarioLogado, String titulo) throws JRException { | |
194 | + | |
195 | + InputStream inputSub = null; | |
196 | + InputStream input = null; | |
197 | + try { | |
198 | + input = this.getClass().getResourceAsStream("/reports/templateRetrato.jrxml"); | |
199 | + inputSub = this.getClass().getResourceAsStream("/reports/relatorioRepactuacoes.jrxml"); | |
200 | + | |
201 | + JasperDesign jasperDesign = JRXmlLoader.load(input); | |
202 | + JasperDesign jasperDesignSub = JRXmlLoader.load(inputSub); | |
203 | + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); | |
204 | + JasperReport jasperReportSub = JasperCompileManager.compileReport(jasperDesignSub); | |
205 | + | |
206 | + Map<String, Object> subReportParameters = new HashMap<String, Object>(); | |
207 | + subReportParameters.put("CONTRATO_ID", idContrato); | |
208 | + subReportParameters.put("DATA_INICIAL", dataInicial); | |
209 | + subReportParameters.put("DATA_FINAL", dataFinal); | |
210 | + | |
211 | + Map<String, Object> parameters = new HashMap<String, Object>(); | |
212 | + parameters.put("ORGANIZACAO_ID", usuarioLogado.getOrganizacao().getId()); | |
213 | + parameters.put("TITULO", titulo); | |
214 | + parameters.put("SUBREPORT_DIR", jasperReportSub); | |
215 | + parameters.put("SUBREPORT_PARAMETERS_MAP", subReportParameters); | |
216 | + parameters.put("REPORT_CONNECTION", conn); | |
217 | + | |
218 | + return JasperFillManager.fillReport(jasperReport, parameters, conn); | |
219 | + } finally{ | |
220 | + UtilDataBase.closeResources(inputSub); | |
221 | + } | |
222 | + } | |
223 | + | |
190 | 224 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/InicializarContratosServiceImpl.java
... | ... | @@ -154,7 +154,8 @@ public class InicializarContratosServiceImpl extends UtilStartup { |
154 | 154 | menuTermosRelatorios = this.menuService.mergeIfNotExist(menuTermosRelatorios); |
155 | 155 | |
156 | 156 | criarConsultaTermo(modulo, menuTermosRelatorios); |
157 | - | |
157 | + // Menu Consulta de relatórios | |
158 | + criarOpcaoConsultaRelatorios(modulo, menuTermosRelatorios); | |
158 | 159 | } |
159 | 160 | |
160 | 161 | private void criarOpcaoSolicitacaoDemanda(Modulo modulo, Menu menuDemandas) { |
... | ... | @@ -554,5 +555,18 @@ public class InicializarContratosServiceImpl extends UtilStartup { |
554 | 555 | this.menuService.mergeIfNotExist(menuRelatorioRecisao); |
555 | 556 | } |
556 | 557 | |
558 | + private void criarOpcaoConsultaRelatorios(Modulo modulo, Menu menuTermosRelatorios) { | |
559 | + | |
560 | + Pagina pgConsultaRelatorios = new Pagina("Consulta de relatórios", "/cit-contratos-web/html/consultaRelatorios/consultaRelatorios.html"); | |
561 | + pgConsultaRelatorios = this.paginaService.saveIfNotExist(pgConsultaRelatorios); | |
562 | + Menu menuConsultaRelatorios = new Menu("Consulta de relatório", pgConsultaRelatorios, menuTermosRelatorios, null, 11, null, null, null, null, modulo, "CONSULTA_RELATORIO"); | |
563 | + | |
564 | + List<MenuFile> filesMenuConsultaRelatorios = new ArrayList<MenuFile>(); | |
565 | + filesMenuConsultaRelatorios.add(new MenuFile(CIT_CONTRATOS_WEB_ANGULAR_CUSTOM + "controller/ConsultaRelatoriosController.js", this.dominioJS, menuConsultaRelatorios)); | |
566 | + filesMenuConsultaRelatorios.add(new MenuFile(CIT_CONTRATOS_WEB_ANGULAR_CUSTOM + "controller/ConsultaRelatoriosController.min.js", this.dominioJS, menuConsultaRelatorios)); | |
567 | + menuConsultaRelatorios.setIncludes(filesMenuConsultaRelatorios); | |
568 | + | |
569 | + this.menuService.mergeIfNotExist(menuConsultaRelatorios); | |
570 | + } | |
557 | 571 | |
558 | 572 | } | ... | ... |
cit-contratos-api/src/main/resources/script-bd/v1.0.0-alpha10/01-cit-contratos-1.0.0-ALFA-10-postgres.sql
... | ... | @@ -6,4 +6,15 @@ UPDATE DOMINIO SET descricao = 'Reforço' where CHAVE = 'tipoFinalidadeEmpenhoCo |
6 | 6 | -- CIRO - INÍCIO 01/04/2016 |
7 | 7 | ALTER TABLE cnt_ev_recebimentoobjeto DROP CONSTRAINT fk_mqveh23a280q09lmgmnousda1; |
8 | 8 | ALTER TABLE cnt_ev_recebimentoobjeto DROP COLUMN liberacaopagamento_id; |
9 | --- CIRO - FIM 01/04/2016 | |
10 | 9 | \ No newline at end of file |
10 | +-- CIRO - FIM 01/04/2016 | |
11 | +-- LUÍS CÉSAR INÍCIO 28/03/2016 | |
12 | + | |
13 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
14 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-contratos-web/assets/js/angular/custom/controller/ConsultaRelatoriosController.js', | |
15 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'CONSULTA_RELATORIO')); | |
16 | + | |
17 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
18 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-contratos-web/assets/js/angular/custom/controller/ConsultaRelatoriosController.min.js', | |
19 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'CONSULTA_RELATORIO')); | |
20 | + | |
21 | +-- LUÍS CÉSAR FIM 28/03/2016 | |
11 | 22 | \ No newline at end of file | ... | ... |
cit-contratos-web/src/main/java/br/com/centralit/controller/ContratoEventoController.java
... | ... | @@ -235,4 +235,22 @@ public class ContratoEventoController extends GenericController<ContratoEvento> |
235 | 235 | |
236 | 236 | } |
237 | 237 | |
238 | + @ResponseBody | |
239 | + @RequestMapping(method = RequestMethod.GET, value = "/pdfGerarRelatorios") | |
240 | + public void gerarRelatorios( | |
241 | + @RequestParam(value = "idsTiposRelatorio") String idsRelatoriosSelecionados, | |
242 | + @RequestParam(value = "idContrato", required = false) String idContrato, | |
243 | + @RequestParam(value = "dataInicial", required = false) String dataInicial, | |
244 | + @RequestParam(value = "dataFinal", required = false) String dataFinal, | |
245 | + @RequestParam(value = "download") boolean download, HttpServletResponse response) throws SQLException, JRException, IOException { | |
246 | + | |
247 | + Long[] arrayLong = getArrayLong(idsRelatoriosSelecionados); | |
248 | + | |
249 | + Long contratoId = StringUtils.isNumeric(idContrato) ? Long.parseLong(idContrato) : null; | |
250 | + Date dataInicio = StringUtils.isBlank(dataInicial) ? null : UtilDate.jsonToDate(UtilDate.dataInicioFormatada(dataInicial)); | |
251 | + Date dataFim = StringUtils.isBlank(dataFinal) ? null : UtilDate.jsonToDate(UtilDate.dataInicioFormatada(dataFinal)); | |
252 | + | |
253 | + this.contratoEventoService.gerarRelatorios(arrayLong, contratoId, dataInicio, dataFim, download, response); | |
254 | + } | |
255 | + | |
238 | 256 | } | ... | ... |
cit-contratos-web/src/main/java/br/com/centralit/listener/StartupListenerContratos.java
... | ... | @@ -288,7 +288,6 @@ public class StartupListenerContratos extends UtilStartup implements Application |
288 | 288 | list.add(new Dominio("tipoEventoContratoRecebimentoObjeto", "Passível de correção", "PASSIVEL_CORRECAO", 9L)); |
289 | 289 | list.add(new Dominio("tipoEventoContratoRecebimentoObjeto", "Outros", "OUTROS", 10L)); |
290 | 290 | |
291 | - | |
292 | 291 | this.dominioService.saveListIfNotExist(list); |
293 | 292 | Logger.getLogger(StartupListenerContratos.class).info("Domínios executados - StartupListenerContratos!"); |
294 | 293 | } |
... | ... | @@ -972,6 +971,15 @@ public class StartupListenerContratos extends UtilStartup implements Application |
972 | 971 | internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.DATA_INICIAL_NAO_INFORMADA", "Data inicial não informada", dominio, modulo)); |
973 | 972 | internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.DATA_FINAL_NAO_INFORMADA", "Data final não informada", dominio, modulo)); |
974 | 973 | |
974 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.EMITIR_CONSULTA_RELATORIOS", "Emitir consulta relatórios", dominio, modulo)); | |
975 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.TIPO_RELATORIOS", "Tipo de relatórios", dominio, modulo)); | |
976 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RELATORIO_REGISTRO_EMPENHO", "Relatório de registro de empenho", dominio, modulo)); | |
977 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RELATORIO_LIBERACAO_PAGAMENTO", "Relatório de liberação de pagamento", dominio, modulo)); | |
978 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RELATORIO_REPACTUACAO", "Relatório de repactuação", dominio, modulo)); | |
979 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RELATORIO_NAO_CONFORMIDADE", "Relatório de não conformidade", dominio, modulo)); | |
980 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RELATORIO_PENALIDADE_APLICADA", "Relatório de penalidades aplicadas", dominio, modulo)); | |
981 | + | |
982 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RELATORIOS", "Relatórios do contrato", dominio, modulo)); | |
975 | 983 | } |
976 | 984 | |
977 | 985 | private void gerarMensagem(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { | ... | ... |
cit-contratos-web/src/main/resources/reports/relatorioEventoEmpenho.jrxml
0 → 100644
... | ... | @@ -0,0 +1,395 @@ |
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="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"> | |
3 | + <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
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"/> | |
8 | + <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"> | |
9 | + <box> | |
10 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
11 | + <topPen lineWidth="0.5" lineColor="#000000"/> | |
12 | + <leftPen lineWidth="0.5" lineColor="#000000"/> | |
13 | + <bottomPen lineWidth="0.5" lineColor="#000000"/> | |
14 | + <rightPen lineWidth="0.5" lineColor="#000000"/> | |
15 | + </box> | |
16 | + </style> | |
17 | + <style name="Table_CH" mode="Opaque" backcolor="#CCCCCC"> | |
18 | + <box> | |
19 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
20 | + <topPen lineWidth="0.5" lineColor="#000000"/> | |
21 | + <leftPen lineWidth="0.5" lineColor="#000000"/> | |
22 | + <bottomPen lineWidth="0.5" lineColor="#000000"/> | |
23 | + <rightPen lineWidth="0.5" lineColor="#000000"/> | |
24 | + </box> | |
25 | + </style> | |
26 | + <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF"> | |
27 | + <box> | |
28 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
29 | + <topPen lineWidth="0.5" lineColor="#000000"/> | |
30 | + <leftPen lineWidth="0.5" lineColor="#000000"/> | |
31 | + <bottomPen lineWidth="0.5" lineColor="#000000"/> | |
32 | + <rightPen lineWidth="0.5" lineColor="#000000"/> | |
33 | + </box> | |
34 | + </style> | |
35 | + <subDataset name="empenhos" uuid="7d5280b8-ff88-4032-8eb3-500a1ee9b651"> | |
36 | + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="citgrpdb"/> | |
37 | + <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
38 | + <parameter name="dataInicial" class="java.util.Date"/> | |
39 | + <parameter name="dataFinal" class="java.util.Date"/> | |
40 | + <parameter name="contratoId" class="java.lang.Long"/> | |
41 | + <parameter name="DATA_INICIAL" class="java.lang.String"/> | |
42 | + <parameter name="DATA_FINAL" class="java.lang.String"/> | |
43 | + <queryString> | |
44 | + <![CDATA[select | |
45 | +cntEmpenho.numeroempenho as numeroempenho, | |
46 | +cntEmpenho.data as dataEmpenho, | |
47 | +tipoFinalidade.descricao as finalidadeEmpenho, | |
48 | +tipoCategoriaEconomica.descricao as categoriaEconomica, | |
49 | +cntEmpenho.valorempenhado as valorEmpenhado | |
50 | + | |
51 | +from cnt_cn_evento as evEmpenho | |
52 | + | |
53 | +left join cnt_cn_empenho as cntEmpenho on cntEmpenho.id = evEmpenho.id | |
54 | +left join dominio as tipoEvento on tipoEvento.id = evEmpenho.tipoevento_id | |
55 | +left join dominio as tipoFinalidade on tipoFinalidade.id = cntEmpenho.dominiofinalidadeempenho_id | |
56 | +left join dominio as tipoCategoriaEconomica on tipoCategoriaEconomica.id = cntEmpenho.dominiocategoriaeconomica_id | |
57 | +where evEmpenho.contrato_id = $P{contratoId} and | |
58 | +tipoEvento.chave = 'tipoEventoContrato' and | |
59 | +tipoEvento.codigo = '6' | |
60 | + | |
61 | +$P!{DATA_INICIAL} | |
62 | +$P!{DATA_FINAL} | |
63 | + | |
64 | +group by evEmpenho.id, cntEmpenho.id, tipoFinalidade.id, tipoCategoriaEconomica.id | |
65 | +order by evEmpenho.id asc]]> | |
66 | + </queryString> | |
67 | + <field name="numeroempenho" class="java.lang.String"/> | |
68 | + <field name="dataempenho" class="java.sql.Timestamp"/> | |
69 | + <field name="finalidadeempenho" class="java.lang.String"/> | |
70 | + <field name="categoriaeconomica" class="java.lang.String"/> | |
71 | + <field name="valorempenhado" class="java.math.BigDecimal"/> | |
72 | + </subDataset> | |
73 | + <parameter name="dataInicial" class="java.util.Date"/> | |
74 | + <parameter name="dataFinal" class="java.util.Date"/> | |
75 | + <parameter name="contratoId" class="java.lang.Long"/> | |
76 | + <parameter name="DATA_INICIAL" class="java.lang.String" isForPrompting="false"> | |
77 | + <defaultValueExpression><![CDATA[($P{dataInicial} != null ? " and evEmpenho.dataevento >= '" + $P{dataInicial} + "'" : "")]]></defaultValueExpression> | |
78 | + </parameter> | |
79 | + <parameter name="DATA_FINAL" class="java.lang.String" isForPrompting="false"> | |
80 | + <defaultValueExpression><![CDATA[($P{dataFinal} != null ? " and evEmpenho.dataevento <= '" + $P{dataFinal} + "'" : "")]]></defaultValueExpression> | |
81 | + </parameter> | |
82 | + <queryString> | |
83 | + <![CDATA[select | |
84 | +contrato.numeroanocontrato as numeroanocontrato, | |
85 | +(contrato.valorcontrato + | |
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) | |
92 | +- | |
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)) | |
97 | +ELSE 0 | |
98 | +END)) as valorContrato | |
99 | + | |
100 | +from cnt_cn_evento as evEmpenho | |
101 | + | |
102 | +left join cnt_cn_empenho as cntEmpenho on cntEmpenho.id = evEmpenho.id | |
103 | +left join cnt_contrato as contrato on contrato.id = evEmpenho.contrato_id | |
104 | +left join dominio as tipoEvento on tipoEvento.id = evEmpenho.tipoevento_id | |
105 | + | |
106 | +where evEmpenho.contrato_id = $P{contratoId} and | |
107 | +tipoEvento.chave = 'tipoEventoContrato' and | |
108 | +tipoEvento.codigo = '6' | |
109 | + | |
110 | +limit 1]]> | |
111 | + </queryString> | |
112 | + <field name="numeroanocontrato" class="java.lang.String"/> | |
113 | + <field name="valorcontrato" class="java.math.BigDecimal"/> | |
114 | + <pageHeader> | |
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"> | |
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"/> | |
190 | + </reportElement> | |
191 | + </line> | |
192 | + </band> | |
193 | + </pageHeader> | |
194 | + <detail> | |
195 | + <band height="75" splitType="Stretch"> | |
196 | + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> | |
197 | + <staticText> | |
198 | + <reportElement x="5" y="10" width="544" height="25" uuid="525f239d-ae8a-4237-adff-731b29b36af1"> | |
199 | + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> | |
200 | + <property name="com.jaspersoft.studio.unit.x" value="pixel"/> | |
201 | + <property name="com.jaspersoft.studio.unit.width" value="pixel"/> | |
202 | + </reportElement> | |
203 | + <box leftPadding="5"/> | |
204 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
205 | + <font size="13" isBold="true"/> | |
206 | + </textElement> | |
207 | + <text><![CDATA[1. Relatórios]]></text> | |
208 | + </staticText> | |
209 | + <componentElement> | |
210 | + <reportElement x="15" y="40" width="534" height="30" uuid="daece71a-c857-4368-833f-95e7841c2392"> | |
211 | + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> | |
212 | + <property name="net.sf.jasperreports.export.headertoolbar.table.name" value=""/> | |
213 | + </reportElement> | |
214 | + <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" whenNoDataType="AllSectionsNoDetail"> | |
215 | + <datasetRun subDataset="empenhos" uuid="a2d1f09e-241e-4603-9e5b-d2e989c8c431"> | |
216 | + <datasetParameter name="REPORT_CONNECTION"> | |
217 | + <datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression> | |
218 | + </datasetParameter> | |
219 | + <datasetParameter name="contratoId"> | |
220 | + <datasetParameterExpression><![CDATA[$P{contratoId}]]></datasetParameterExpression> | |
221 | + </datasetParameter> | |
222 | + <datasetParameter name="dataFinal"> | |
223 | + <datasetParameterExpression><![CDATA[$P{dataFinal}]]></datasetParameterExpression> | |
224 | + </datasetParameter> | |
225 | + <datasetParameter name="dataInicial"> | |
226 | + <datasetParameterExpression><![CDATA[$P{dataInicial}]]></datasetParameterExpression> | |
227 | + </datasetParameter> | |
228 | + <datasetParameter name="DATA_INICIAL"> | |
229 | + <datasetParameterExpression><![CDATA[$P{DATA_INICIAL}]]></datasetParameterExpression> | |
230 | + </datasetParameter> | |
231 | + <datasetParameter name="DATA_FINAL"> | |
232 | + <datasetParameterExpression><![CDATA[$P{DATA_FINAL}]]></datasetParameterExpression> | |
233 | + </datasetParameter> | |
234 | + <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> | |
235 | + </datasetRun> | |
236 | + <jr:column width="105" uuid="6c7df2c1-247a-4d29-b49a-cf835ea9fc01"> | |
237 | + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/> | |
238 | + <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> | |
239 | + <staticText> | |
240 | + <reportElement x="0" y="0" width="105" height="30" uuid="e6106735-9cb7-4e8e-a3c2-9cdbd675331a"/> | |
241 | + <box padding="5"> | |
242 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
243 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
244 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
245 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
246 | + </box> | |
247 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
248 | + <font size="12" isBold="true"/> | |
249 | + </textElement> | |
250 | + <text><![CDATA[Nº do empenho]]></text> | |
251 | + </staticText> | |
252 | + </jr:columnHeader> | |
253 | + <jr:detailCell height="30" rowSpan="1"> | |
254 | + <textField isBlankWhenNull="true"> | |
255 | + <reportElement x="0" y="0" width="105" height="30" uuid="5f693b8e-9aea-4eb3-9fdc-39601a9f5a50"/> | |
256 | + <box padding="5"> | |
257 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
258 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
259 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
260 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
261 | + </box> | |
262 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
263 | + <textFieldExpression><![CDATA[$F{numeroempenho}]]></textFieldExpression> | |
264 | + </textField> | |
265 | + </jr:detailCell> | |
266 | + </jr:column> | |
267 | + <jr:column width="105" uuid="fccca2ba-f587-4a4a-878c-c4bd0260931e"> | |
268 | + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/> | |
269 | + <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> | |
270 | + <staticText> | |
271 | + <reportElement x="0" y="0" width="105" height="30" uuid="239910ff-efc4-4da7-bbea-198cfc6487a9"/> | |
272 | + <box padding="5"> | |
273 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
274 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
275 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
276 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
277 | + </box> | |
278 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
279 | + <font size="12" isBold="true"/> | |
280 | + </textElement> | |
281 | + <text><![CDATA[Dt do empenho]]></text> | |
282 | + </staticText> | |
283 | + </jr:columnHeader> | |
284 | + <jr:detailCell height="30" rowSpan="1"> | |
285 | + <textField isBlankWhenNull="true"> | |
286 | + <reportElement x="0" y="0" width="105" height="30" uuid="4efd6c53-0d6b-4c98-864f-7296a185a285"/> | |
287 | + <box padding="5"> | |
288 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
289 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
290 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
291 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
292 | + </box> | |
293 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
294 | + <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{dataempenho})]]></textFieldExpression> | |
295 | + </textField> | |
296 | + </jr:detailCell> | |
297 | + </jr:column> | |
298 | + <jr:column width="110" uuid="b786a6af-2777-4710-8dd6-48f55e2d4eae"> | |
299 | + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/> | |
300 | + <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> | |
301 | + <staticText> | |
302 | + <reportElement x="0" y="0" width="110" height="30" uuid="ffd14591-401f-4be0-ba1e-8903b27dae76"/> | |
303 | + <box padding="5"> | |
304 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
305 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
306 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
307 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
308 | + </box> | |
309 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
310 | + <font size="12" isBold="true"/> | |
311 | + </textElement> | |
312 | + <text><![CDATA[Finalidade]]></text> | |
313 | + </staticText> | |
314 | + </jr:columnHeader> | |
315 | + <jr:detailCell height="30" rowSpan="1"> | |
316 | + <textField isBlankWhenNull="true"> | |
317 | + <reportElement x="0" y="0" width="110" height="30" uuid="8817772f-afa7-4515-9d8d-71e50fb7e4ef"/> | |
318 | + <box padding="5"> | |
319 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
320 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
321 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
322 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
323 | + </box> | |
324 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
325 | + <textFieldExpression><![CDATA[$F{finalidadeempenho}]]></textFieldExpression> | |
326 | + </textField> | |
327 | + </jr:detailCell> | |
328 | + </jr:column> | |
329 | + <jr:column width="110" uuid="0bcfe885-1bdb-4a0c-a2b2-3c38c0eb331d"> | |
330 | + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/> | |
331 | + <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> | |
332 | + <staticText> | |
333 | + <reportElement x="0" y="0" width="110" height="30" uuid="1f54f03e-37a0-437b-916b-78717c24673c"/> | |
334 | + <box padding="5"> | |
335 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
336 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
337 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
338 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
339 | + </box> | |
340 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
341 | + <font size="12" isBold="true"/> | |
342 | + </textElement> | |
343 | + <text><![CDATA[Categoria econômica]]></text> | |
344 | + </staticText> | |
345 | + </jr:columnHeader> | |
346 | + <jr:detailCell height="30" rowSpan="1"> | |
347 | + <textField isBlankWhenNull="true"> | |
348 | + <reportElement x="0" y="0" width="110" height="30" uuid="1fdf5e79-78d4-4aac-af4c-465d2e0e98fb"/> | |
349 | + <box padding="5"> | |
350 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
351 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
352 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
353 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
354 | + </box> | |
355 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
356 | + <textFieldExpression><![CDATA[$F{categoriaeconomica}]]></textFieldExpression> | |
357 | + </textField> | |
358 | + </jr:detailCell> | |
359 | + </jr:column> | |
360 | + <jr:column width="106" uuid="eebe6f80-b08d-4f95-b204-bae284b6cca8"> | |
361 | + <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/> | |
362 | + <jr:columnHeader style="Table_CH" height="30" rowSpan="1"> | |
363 | + <staticText> | |
364 | + <reportElement x="0" y="0" width="105" height="30" uuid="ab8d621e-50a7-484e-99bd-3c28b015a77e"/> | |
365 | + <box padding="5"> | |
366 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
367 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
368 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
369 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
370 | + </box> | |
371 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
372 | + <font size="12" isBold="true"/> | |
373 | + </textElement> | |
374 | + <text><![CDATA[Vlr empenhado]]></text> | |
375 | + </staticText> | |
376 | + </jr:columnHeader> | |
377 | + <jr:detailCell height="30" rowSpan="1"> | |
378 | + <textField pattern="¤#,##0.00;¤-#,##0.00" isBlankWhenNull="true"> | |
379 | + <reportElement x="0" y="0" width="105" height="30" uuid="b1153c35-ce40-4f61-bdc9-584f2b5def50"/> | |
380 | + <box padding="5"> | |
381 | + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
382 | + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
383 | + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
384 | + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> | |
385 | + </box> | |
386 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
387 | + <textFieldExpression><![CDATA[$F{valorempenhado}]]></textFieldExpression> | |
388 | + </textField> | |
389 | + </jr:detailCell> | |
390 | + </jr:column> | |
391 | + </jr:table> | |
392 | + </componentElement> | |
393 | + </band> | |
394 | + </detail> | |
395 | +</jasperReport> | ... | ... |
cit-contratos-web/src/main/resources/reports/relatorioEventoNaoConformidade.jrxml
0 → 100644
... | ... | @@ -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/resources/reports/relatorioLiberacoesPagamento.jrxml
0 → 100644
... | ... | @@ -0,0 +1,368 @@ |
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="relatorioPenalidades" pageWidth="554" pageHeight="802" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="554" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="2a9bde7e-349d-4f0b-b96c-98310606be6f"> | |
3 | + <property name="ireport.zoom" value="1.5"/> | |
4 | + <property name="ireport.x" value="0"/> | |
5 | + <property name="ireport.y" value="0"/> | |
6 | + <style name="table"> | |
7 | + <box> | |
8 | + <pen lineWidth="1.0" lineColor="#000000"/> | |
9 | + </box> | |
10 | + </style> | |
11 | + <style name="table_TH" mode="Opaque" backcolor="#F0F8FF"> | |
12 | + <box> | |
13 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
14 | + </box> | |
15 | + </style> | |
16 | + <style name="table_CH" mode="Opaque" backcolor="#BFE1FF"> | |
17 | + <box> | |
18 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
19 | + </box> | |
20 | + </style> | |
21 | + <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> | |
22 | + <box> | |
23 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
24 | + </box> | |
25 | + </style> | |
26 | + <subDataset name="liberacoesPagamento" uuid="889bcaeb-aaf2-4da7-bd38-1d8c3779d286"> | |
27 | + <parameter name="CONTRATO_ID" class="java.lang.Long"/> | |
28 | + <parameter name="DATA_INICIAL_TOKEN" class="java.lang.String"> | |
29 | + <defaultValueExpression><![CDATA[]]></defaultValueExpression> | |
30 | + </parameter> | |
31 | + <parameter name="DATA_FINAL_TOKEN" class="java.lang.String"> | |
32 | + <defaultValueExpression><![CDATA[]]></defaultValueExpression> | |
33 | + </parameter> | |
34 | + <queryString> | |
35 | + <![CDATA[select lp.numeroliberacao, lp.emissao, ps.nome as responsavelliberacao, lp.totalliberadopagamento, cne.numeroempenho | |
36 | +from cnt_ev_liberacao_pagamento lp | |
37 | + inner join cnt_cn_evento e on e.id = lp.id | |
38 | + inner join cnt_contrato c on c.id = e.contrato_id | |
39 | + inner join cnt_cn_envolvido en on en.id = lp.responsavel_id | |
40 | + left join parceiro_colaborador pc on pc.id = en.envolvido_id | |
41 | + left join parceiro p on p.id = pc.id | |
42 | + left join pessoa ps on ps.id = p.id | |
43 | + inner join cnt_lp_empenho lpe on lpe.liberacaopagamento_id = lp.id | |
44 | + inner join cnt_cn_empenho cne on cne.id = lpe.contratoempenho_id | |
45 | +where c.id = $P{CONTRATO_ID} $P!{DATA_INICIAL_TOKEN} $P!{DATA_FINAL_TOKEN};]]> | |
46 | + </queryString> | |
47 | + <field name="numeroliberacao" class="java.lang.String"/> | |
48 | + <field name="emissao" class="java.sql.Timestamp"/> | |
49 | + <field name="responsavelliberacao" class="java.lang.String"/> | |
50 | + <field name="totalliberadopagamento" class="java.math.BigDecimal"/> | |
51 | + <field name="numeroempenho" class="java.lang.String"/> | |
52 | + </subDataset> | |
53 | + <parameter name="CONTRATO_ID" class="java.lang.Long"/> | |
54 | + <parameter name="SUBREPORT_DIR" class="java.lang.Object" isForPrompting="false"> | |
55 | + <defaultValueExpression><![CDATA["D:\\desenvolvimento\\workspaces\\workspace_eclipse\\workspace-grp\\modulos\\cit-contratos\\cit-contratos-web\\src\\main\\resources\\reports\\"]]></defaultValueExpression> | |
56 | + </parameter> | |
57 | + <parameter name="SUBREPORT_PARAMETERS_MAP" class="java.util.Map" isForPrompting="false"> | |
58 | + <parameterDescription><![CDATA[Parametros do SubReport]]></parameterDescription> | |
59 | + </parameter> | |
60 | + <parameter name="DATA_INICIAL" class="java.util.Date"/> | |
61 | + <parameter name="DATA_FINAL" class="java.util.Date"/> | |
62 | + <parameter name="DATA_FINAL_TOKEN" class="java.lang.String"> | |
63 | + <defaultValueExpression><![CDATA[( $P{DATA_FINAL} != null ? " and p.datapenalizacao <= '" + $P{DATA_FINAL} + "'" : "" )]]></defaultValueExpression> | |
64 | + </parameter> | |
65 | + <parameter name="DATA_INICIAL_TOKEN" class="java.lang.String"> | |
66 | + <defaultValueExpression><![CDATA[( $P{DATA_INICIAL} != null ? " and p.datapenalizacao >= '" + $P{DATA_INICIAL} + "'" : "" )]]></defaultValueExpression> | |
67 | + </parameter> | |
68 | + <queryString> | |
69 | + <![CDATA[select c.numeroanocontrato as numanocontrato, pess.nome as contratada | |
70 | +from cnt_contrato c | |
71 | + inner join parceiro parc ON parc.id = c.fornecedor_id | |
72 | + inner join pessoa pess ON pess.id = parc.pessoa_id | |
73 | +where c.id = $P{CONTRATO_ID}]]> | |
74 | + </queryString> | |
75 | + <field name="numanocontrato" class="java.lang.String"/> | |
76 | + <field name="contratada" class="java.lang.String"/> | |
77 | + <background> | |
78 | + <band splitType="Stretch"/> | |
79 | + </background> | |
80 | + <detail> | |
81 | + <band height="90" splitType="Prevent"> | |
82 | + <frame> | |
83 | + <reportElement positionType="Float" x="5" y="10" width="544" height="25" uuid="38d5011b-885b-4c06-ae9f-8ae5f9101873"/> | |
84 | + <staticText> | |
85 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="ae43a2db-f404-4c5d-b934-87a70c8b5716"/> | |
86 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
87 | + <pen lineWidth="0.0"/> | |
88 | + <topPen lineWidth="0.0"/> | |
89 | + <leftPen lineWidth="0.0"/> | |
90 | + <bottomPen lineWidth="0.0"/> | |
91 | + <rightPen lineWidth="0.0"/> | |
92 | + </box> | |
93 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
94 | + <font isBold="true"/> | |
95 | + </textElement> | |
96 | + <text><![CDATA[Período]]></text> | |
97 | + </staticText> | |
98 | + <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="false"> | |
99 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" uuid="263dadd4-8d94-4de9-a045-a741d1d6f127"/> | |
100 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
101 | + <pen lineWidth="0.0"/> | |
102 | + <topPen lineWidth="0.0"/> | |
103 | + <leftPen lineWidth="0.0"/> | |
104 | + <bottomPen lineWidth="0.0"/> | |
105 | + <rightPen lineWidth="0.0"/> | |
106 | + </box> | |
107 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
108 | + <textFieldExpression><![CDATA[($P{DATA_INICIAL} == null && $P{DATA_FINAL} == null) ? "Não informado" : | |
109 | +($P{DATA_INICIAL} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{DATA_INICIAL})) + " à " + | |
110 | +($P{DATA_FINAL} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{DATA_FINAL}))]]></textFieldExpression> | |
111 | + </textField> | |
112 | + </frame> | |
113 | + <frame> | |
114 | + <reportElement positionType="Float" x="5" y="35" width="544" height="25" uuid="f96ac29b-e8ab-44fd-b943-3abe7589504e"/> | |
115 | + <staticText> | |
116 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="9dc4d075-c3fa-467f-bbcc-84727a545527"/> | |
117 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
118 | + <pen lineWidth="0.0"/> | |
119 | + <topPen lineWidth="0.0"/> | |
120 | + <leftPen lineWidth="0.0"/> | |
121 | + <bottomPen lineWidth="0.0"/> | |
122 | + <rightPen lineWidth="0.0"/> | |
123 | + </box> | |
124 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
125 | + <font isBold="true"/> | |
126 | + </textElement> | |
127 | + <text><![CDATA[Número / Ano do contrato]]></text> | |
128 | + </staticText> | |
129 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
130 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" isRemoveLineWhenBlank="true" uuid="afc850e0-f7e1-47ec-a9de-090502bfdadd"/> | |
131 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
132 | + <pen lineWidth="0.0"/> | |
133 | + <topPen lineWidth="0.0"/> | |
134 | + <leftPen lineWidth="0.0"/> | |
135 | + <bottomPen lineWidth="0.0"/> | |
136 | + <rightPen lineWidth="0.0"/> | |
137 | + </box> | |
138 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
139 | + <textFieldExpression><![CDATA[$F{numanocontrato}.substring(0,9) + "/" + $F{numanocontrato}.substring(9,13)]]></textFieldExpression> | |
140 | + </textField> | |
141 | + </frame> | |
142 | + <frame> | |
143 | + <reportElement positionType="Float" x="5" y="60" width="544" height="25" uuid="af3077ce-5d6b-44cb-879e-5e216ade93d0"/> | |
144 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
145 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" uuid="f1e51c51-3e1c-4e9d-a254-252c38ee2908"/> | |
146 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
147 | + <pen lineWidth="0.0"/> | |
148 | + <topPen lineWidth="0.0"/> | |
149 | + <leftPen lineWidth="0.0"/> | |
150 | + <bottomPen lineWidth="0.0"/> | |
151 | + <rightPen lineWidth="0.0"/> | |
152 | + </box> | |
153 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
154 | + <textFieldExpression><![CDATA[$F{contratada}]]></textFieldExpression> | |
155 | + </textField> | |
156 | + <staticText> | |
157 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="b6fc395c-4e28-49d9-b9ea-a49dd16f358a"/> | |
158 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
159 | + <pen lineWidth="0.0"/> | |
160 | + <topPen lineWidth="0.0"/> | |
161 | + <leftPen lineWidth="0.0"/> | |
162 | + <bottomPen lineWidth="0.0"/> | |
163 | + <rightPen lineWidth="0.0"/> | |
164 | + </box> | |
165 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
166 | + <font isBold="true"/> | |
167 | + </textElement> | |
168 | + <text><![CDATA[Contratada]]></text> | |
169 | + </staticText> | |
170 | + </frame> | |
171 | + <line> | |
172 | + <reportElement x="5" y="85" width="544" height="1" uuid="0a116f87-49ef-40ba-8e38-021384df19ac"/> | |
173 | + </line> | |
174 | + </band> | |
175 | + <band height="75" splitType="Stretch"> | |
176 | + <staticText> | |
177 | + <reportElement x="5" y="10" width="549" height="25" uuid="b507a610-f7ee-4c3b-9d62-3ac4f2da7706"/> | |
178 | + <box topPadding="0" leftPadding="5"/> | |
179 | + <textElement verticalAlignment="Middle"> | |
180 | + <font size="13" isBold="true"/> | |
181 | + </textElement> | |
182 | + <text><![CDATA[1. Relatórios]]></text> | |
183 | + </staticText> | |
184 | + <componentElement> | |
185 | + <reportElement key="table 1" positionType="Float" x="15" y="40" width="534" height="30" isPrintWhenDetailOverflows="true" uuid="a2f9cf2e-2f72-4013-9cbd-94bd20ce6df2"/> | |
186 | + <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"> | |
187 | + <datasetRun subDataset="liberacoesPagamento" uuid="164d2db9-5e45-482b-b184-e729be724bfd"> | |
188 | + <datasetParameter name="REPORT_CONNECTION"> | |
189 | + <datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression> | |
190 | + </datasetParameter> | |
191 | + <datasetParameter name="CONTRATO_ID"> | |
192 | + <datasetParameterExpression><![CDATA[$P{CONTRATO_ID}]]></datasetParameterExpression> | |
193 | + </datasetParameter> | |
194 | + <datasetParameter name="DATA_INICIAL_TOKEN"> | |
195 | + <datasetParameterExpression><![CDATA[$P{DATA_INICIAL_TOKEN}]]></datasetParameterExpression> | |
196 | + </datasetParameter> | |
197 | + <datasetParameter name="DATA_FINAL_TOKEN"> | |
198 | + <datasetParameterExpression><![CDATA[$P{DATA_FINAL_TOKEN}]]></datasetParameterExpression> | |
199 | + </datasetParameter> | |
200 | + <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> | |
201 | + </datasetRun> | |
202 | + <jr:column width="100" uuid="fdfe3465-3b51-423a-af25-4045485d5a1e"> | |
203 | + <jr:columnHeader height="30" rowSpan="1"> | |
204 | + <staticText> | |
205 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="100" height="30" backcolor="#CCCCCC" uuid="bf8f850b-5145-49fd-8c41-52c7ac05faee"/> | |
206 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
207 | + <pen lineWidth="1.0"/> | |
208 | + <topPen lineWidth="1.0"/> | |
209 | + <leftPen lineWidth="1.0"/> | |
210 | + <bottomPen lineWidth="1.0"/> | |
211 | + <rightPen lineWidth="1.0"/> | |
212 | + </box> | |
213 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
214 | + <font isBold="true"/> | |
215 | + </textElement> | |
216 | + <text><![CDATA[Nr. da liberação]]></text> | |
217 | + </staticText> | |
218 | + </jr:columnHeader> | |
219 | + <jr:detailCell height="25" rowSpan="1"> | |
220 | + <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> | |
221 | + <reportElement positionType="Float" x="0" y="0" width="100" height="25" uuid="27fc566c-19fd-4f74-b01c-e2c58ae5b107"/> | |
222 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
223 | + <pen lineWidth="1.0"/> | |
224 | + <topPen lineWidth="1.0"/> | |
225 | + <leftPen lineWidth="1.0"/> | |
226 | + <bottomPen lineWidth="1.0"/> | |
227 | + <rightPen lineWidth="1.0"/> | |
228 | + </box> | |
229 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
230 | + <font isBold="false"/> | |
231 | + </textElement> | |
232 | + <textFieldExpression><![CDATA[$F{numeroliberacao}]]></textFieldExpression> | |
233 | + </textField> | |
234 | + </jr:detailCell> | |
235 | + </jr:column> | |
236 | + <jr:column width="100" uuid="0a1e8915-6f85-4d7a-a08e-73b217283674"> | |
237 | + <jr:columnHeader height="30" rowSpan="1"> | |
238 | + <staticText> | |
239 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="100" height="30" backcolor="#CCCCCC" uuid="5aadd943-07a6-4a31-a246-3111079e1b23"/> | |
240 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
241 | + <pen lineWidth="1.0"/> | |
242 | + <topPen lineWidth="1.0"/> | |
243 | + <leftPen lineWidth="1.0"/> | |
244 | + <bottomPen lineWidth="1.0"/> | |
245 | + <rightPen lineWidth="1.0"/> | |
246 | + </box> | |
247 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
248 | + <font isBold="true"/> | |
249 | + </textElement> | |
250 | + <text><![CDATA[Data]]></text> | |
251 | + </staticText> | |
252 | + </jr:columnHeader> | |
253 | + <jr:detailCell height="25" rowSpan="1"> | |
254 | + <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true"> | |
255 | + <reportElement positionType="Float" x="0" y="0" width="100" height="25" uuid="c4c4f934-ddee-489a-b261-9438a2c87051"/> | |
256 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
257 | + <pen lineWidth="1.0"/> | |
258 | + <topPen lineWidth="1.0"/> | |
259 | + <leftPen lineWidth="1.0"/> | |
260 | + <bottomPen lineWidth="1.0"/> | |
261 | + <rightPen lineWidth="1.0"/> | |
262 | + </box> | |
263 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
264 | + <textFieldExpression><![CDATA[$F{emissao}]]></textFieldExpression> | |
265 | + </textField> | |
266 | + </jr:detailCell> | |
267 | + </jr:column> | |
268 | + <jr:column width="134" uuid="f46445fc-007b-46e6-ade9-eef37e5d0b29"> | |
269 | + <jr:columnHeader height="30" rowSpan="1"> | |
270 | + <staticText> | |
271 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="134" height="30" backcolor="#CCCCCC" uuid="2cea64aa-39b7-4fe4-acaa-c11e1981148a"/> | |
272 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
273 | + <pen lineWidth="1.0"/> | |
274 | + <topPen lineWidth="1.0"/> | |
275 | + <leftPen lineWidth="1.0"/> | |
276 | + <bottomPen lineWidth="1.0"/> | |
277 | + <rightPen lineWidth="1.0"/> | |
278 | + </box> | |
279 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
280 | + <font isBold="true"/> | |
281 | + </textElement> | |
282 | + <text><![CDATA[Responsável pela liberação]]></text> | |
283 | + </staticText> | |
284 | + </jr:columnHeader> | |
285 | + <jr:detailCell height="25" rowSpan="1"> | |
286 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
287 | + <reportElement positionType="Float" x="0" y="0" width="134" height="25" uuid="1a4d3c83-faee-4ef1-9f14-8459e5436112"/> | |
288 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
289 | + <pen lineWidth="1.0"/> | |
290 | + <topPen lineWidth="1.0"/> | |
291 | + <leftPen lineWidth="1.0"/> | |
292 | + <bottomPen lineWidth="1.0"/> | |
293 | + <rightPen lineWidth="1.0"/> | |
294 | + </box> | |
295 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
296 | + <textFieldExpression><![CDATA[$F{responsavelliberacao}]]></textFieldExpression> | |
297 | + </textField> | |
298 | + </jr:detailCell> | |
299 | + </jr:column> | |
300 | + <jr:column width="100" uuid="c297508b-d28b-41d0-b617-8d905832ba11"> | |
301 | + <jr:columnHeader height="30" rowSpan="1"> | |
302 | + <staticText> | |
303 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="100" height="30" backcolor="#CCCCCC" uuid="eda2a9c7-8e71-424c-964b-0adcfdbd626d"/> | |
304 | + <box topPadding="2" leftPadding="3" bottomPadding="2" rightPadding="5"> | |
305 | + <pen lineWidth="1.0"/> | |
306 | + <topPen lineWidth="1.0"/> | |
307 | + <leftPen lineWidth="1.0"/> | |
308 | + <bottomPen lineWidth="1.0"/> | |
309 | + <rightPen lineWidth="1.0"/> | |
310 | + </box> | |
311 | + <textElement textAlignment="Right" verticalAlignment="Middle"> | |
312 | + <font isBold="true"/> | |
313 | + </textElement> | |
314 | + <text><![CDATA[Vlr. liberado para pgto.]]></text> | |
315 | + </staticText> | |
316 | + </jr:columnHeader> | |
317 | + <jr:detailCell height="25" rowSpan="1"> | |
318 | + <textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true"> | |
319 | + <reportElement positionType="Float" x="0" y="0" width="100" height="25" uuid="7461c57c-7e7c-43de-bacd-9e25c72fce48"/> | |
320 | + <box topPadding="2" leftPadding="3" bottomPadding="2" rightPadding="5"> | |
321 | + <pen lineWidth="1.0"/> | |
322 | + <topPen lineWidth="1.0"/> | |
323 | + <leftPen lineWidth="1.0"/> | |
324 | + <bottomPen lineWidth="1.0"/> | |
325 | + <rightPen lineWidth="1.0"/> | |
326 | + </box> | |
327 | + <textElement textAlignment="Right" verticalAlignment="Middle"/> | |
328 | + <textFieldExpression><![CDATA[$F{totalliberadopagamento}]]></textFieldExpression> | |
329 | + </textField> | |
330 | + </jr:detailCell> | |
331 | + </jr:column> | |
332 | + <jr:column width="100" uuid="c2128a98-752d-409e-89cc-eb883a56b4e6"> | |
333 | + <jr:columnHeader height="30" rowSpan="1"> | |
334 | + <staticText> | |
335 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="100" height="30" backcolor="#CCCCCC" uuid="6df9dcd8-69d0-4d0b-9870-e3e7c89a468b"/> | |
336 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
337 | + <pen lineWidth="1.0"/> | |
338 | + <topPen lineWidth="1.0"/> | |
339 | + <leftPen lineWidth="1.0"/> | |
340 | + <bottomPen lineWidth="1.0"/> | |
341 | + <rightPen lineWidth="1.0"/> | |
342 | + </box> | |
343 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
344 | + <font isBold="true"/> | |
345 | + </textElement> | |
346 | + <text><![CDATA[Nr. do empenho]]></text> | |
347 | + </staticText> | |
348 | + </jr:columnHeader> | |
349 | + <jr:detailCell height="25" rowSpan="1"> | |
350 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
351 | + <reportElement positionType="Float" x="0" y="0" width="100" height="25" uuid="89c24ae1-9089-4a3a-859d-c0b737b24509"/> | |
352 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
353 | + <pen lineWidth="1.0"/> | |
354 | + <topPen lineWidth="1.0"/> | |
355 | + <leftPen lineWidth="1.0"/> | |
356 | + <bottomPen lineWidth="1.0"/> | |
357 | + <rightPen lineWidth="1.0"/> | |
358 | + </box> | |
359 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
360 | + <textFieldExpression><![CDATA[$F{numeroempenho}]]></textFieldExpression> | |
361 | + </textField> | |
362 | + </jr:detailCell> | |
363 | + </jr:column> | |
364 | + </jr:table> | |
365 | + </componentElement> | |
366 | + </band> | |
367 | + </detail> | |
368 | +</jasperReport> | ... | ... |
cit-contratos-web/src/main/resources/reports/relatorioPenalidades.jrxml
0 → 100644
... | ... | @@ -0,0 +1,365 @@ |
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="relatorioPenalidades" pageWidth="554" pageHeight="802" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="554" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="2a9bde7e-349d-4f0b-b96c-98310606be6f"> | |
3 | + <property name="ireport.zoom" value="1.5"/> | |
4 | + <property name="ireport.x" value="0"/> | |
5 | + <property name="ireport.y" value="0"/> | |
6 | + <style name="table"> | |
7 | + <box> | |
8 | + <pen lineWidth="1.0" lineColor="#000000"/> | |
9 | + </box> | |
10 | + </style> | |
11 | + <style name="table_TH" mode="Opaque" backcolor="#F0F8FF"> | |
12 | + <box> | |
13 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
14 | + </box> | |
15 | + </style> | |
16 | + <style name="table_CH" mode="Opaque" backcolor="#BFE1FF"> | |
17 | + <box> | |
18 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
19 | + </box> | |
20 | + </style> | |
21 | + <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> | |
22 | + <box> | |
23 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
24 | + </box> | |
25 | + </style> | |
26 | + <subDataset name="penalidades" uuid="889bcaeb-aaf2-4da7-bd38-1d8c3779d286"> | |
27 | + <parameter name="CONTRATO_ID" class="java.lang.Long"/> | |
28 | + <parameter name="DATA_INICIAL_TOKEN" class="java.lang.String"> | |
29 | + <defaultValueExpression><![CDATA[]]></defaultValueExpression> | |
30 | + </parameter> | |
31 | + <parameter name="DATA_FINAL_TOKEN" class="java.lang.String"> | |
32 | + <defaultValueExpression><![CDATA[]]></defaultValueExpression> | |
33 | + </parameter> | |
34 | + <queryString> | |
35 | + <![CDATA[select p.datapenalizacao, trp.penalidade, ro.sequencialano, ro.descricaoocorrencia, p.respostacontratada | |
36 | +from cnt_ev_penalidade p | |
37 | + inner join cnt_cn_evento e on e.id = p.id | |
38 | + inner join cnt_contrato c on c.id = e.contrato_id | |
39 | + inner join cnt_tr_penalidade trp on trp.id = p.termoreferenciapenalidade_id | |
40 | + left join cnt_pn_registroocorrencia pnro on pnro.eventopenalidade_id = p.id | |
41 | + left join cnt_registroocorrencia ro on ro.id = pnro.registroocorrencia_id | |
42 | +where c.id = $P{CONTRATO_ID} $P!{DATA_INICIAL_TOKEN} $P!{DATA_FINAL_TOKEN};]]> | |
43 | + </queryString> | |
44 | + <field name="datapenalizacao" class="java.sql.Timestamp"/> | |
45 | + <field name="penalidade" class="java.lang.String"/> | |
46 | + <field name="sequencialano" class="java.lang.String"/> | |
47 | + <field name="descricaoocorrencia" class="java.lang.String"/> | |
48 | + <field name="respostacontratada" class="java.lang.String"/> | |
49 | + </subDataset> | |
50 | + <parameter name="CONTRATO_ID" class="java.lang.Long"/> | |
51 | + <parameter name="SUBREPORT_DIR" class="java.lang.Object" isForPrompting="false"> | |
52 | + <defaultValueExpression><![CDATA["D:\\desenvolvimento\\workspaces\\workspace_eclipse\\workspace-grp\\modulos\\cit-contratos\\cit-contratos-web\\src\\main\\resources\\reports\\"]]></defaultValueExpression> | |
53 | + </parameter> | |
54 | + <parameter name="SUBREPORT_PARAMETERS_MAP" class="java.util.Map" isForPrompting="false"> | |
55 | + <parameterDescription><![CDATA[Parametros do SubReport]]></parameterDescription> | |
56 | + </parameter> | |
57 | + <parameter name="DATA_INICIAL" class="java.util.Date"/> | |
58 | + <parameter name="DATA_FINAL" class="java.util.Date"/> | |
59 | + <parameter name="DATA_FINAL_TOKEN" class="java.lang.String"> | |
60 | + <defaultValueExpression><![CDATA[( $P{DATA_FINAL} != null ? " and p.datapenalizacao <= '" + $P{DATA_FINAL} + "'" : "" )]]></defaultValueExpression> | |
61 | + </parameter> | |
62 | + <parameter name="DATA_INICIAL_TOKEN" class="java.lang.String"> | |
63 | + <defaultValueExpression><![CDATA[( $P{DATA_INICIAL} != null ? " and p.datapenalizacao >= '" + $P{DATA_INICIAL} + "'" : "" )]]></defaultValueExpression> | |
64 | + </parameter> | |
65 | + <queryString> | |
66 | + <![CDATA[select c.numeroanocontrato as numanocontrato, pess.nome as contratada | |
67 | +from cnt_contrato c | |
68 | + inner join parceiro parc ON parc.id = c.fornecedor_id | |
69 | + inner join pessoa pess ON pess.id = parc.pessoa_id | |
70 | +where c.id = $P{CONTRATO_ID}]]> | |
71 | + </queryString> | |
72 | + <field name="numanocontrato" class="java.lang.String"/> | |
73 | + <field name="contratada" class="java.lang.String"/> | |
74 | + <background> | |
75 | + <band splitType="Stretch"/> | |
76 | + </background> | |
77 | + <detail> | |
78 | + <band height="90" splitType="Prevent"> | |
79 | + <frame> | |
80 | + <reportElement positionType="Float" x="5" y="10" width="544" height="25" uuid="38d5011b-885b-4c06-ae9f-8ae5f9101873"/> | |
81 | + <staticText> | |
82 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="ae43a2db-f404-4c5d-b934-87a70c8b5716"/> | |
83 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
84 | + <pen lineWidth="0.0"/> | |
85 | + <topPen lineWidth="0.0"/> | |
86 | + <leftPen lineWidth="0.0"/> | |
87 | + <bottomPen lineWidth="0.0"/> | |
88 | + <rightPen lineWidth="0.0"/> | |
89 | + </box> | |
90 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
91 | + <font isBold="true"/> | |
92 | + </textElement> | |
93 | + <text><![CDATA[Período]]></text> | |
94 | + </staticText> | |
95 | + <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="false"> | |
96 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" uuid="263dadd4-8d94-4de9-a045-a741d1d6f127"/> | |
97 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
98 | + <pen lineWidth="0.0"/> | |
99 | + <topPen lineWidth="0.0"/> | |
100 | + <leftPen lineWidth="0.0"/> | |
101 | + <bottomPen lineWidth="0.0"/> | |
102 | + <rightPen lineWidth="0.0"/> | |
103 | + </box> | |
104 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
105 | + <textFieldExpression><![CDATA[($P{DATA_INICIAL} == null && $P{DATA_FINAL} == null) ? "Não informado" : | |
106 | +($P{DATA_INICIAL} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{DATA_INICIAL})) + " à " + | |
107 | +($P{DATA_FINAL} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{DATA_FINAL}))]]></textFieldExpression> | |
108 | + </textField> | |
109 | + </frame> | |
110 | + <frame> | |
111 | + <reportElement positionType="Float" x="5" y="35" width="544" height="25" uuid="f96ac29b-e8ab-44fd-b943-3abe7589504e"/> | |
112 | + <staticText> | |
113 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="9dc4d075-c3fa-467f-bbcc-84727a545527"/> | |
114 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
115 | + <pen lineWidth="0.0"/> | |
116 | + <topPen lineWidth="0.0"/> | |
117 | + <leftPen lineWidth="0.0"/> | |
118 | + <bottomPen lineWidth="0.0"/> | |
119 | + <rightPen lineWidth="0.0"/> | |
120 | + </box> | |
121 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
122 | + <font isBold="true"/> | |
123 | + </textElement> | |
124 | + <text><![CDATA[Número / Ano do contrato]]></text> | |
125 | + </staticText> | |
126 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
127 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" isRemoveLineWhenBlank="true" uuid="afc850e0-f7e1-47ec-a9de-090502bfdadd"/> | |
128 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
129 | + <pen lineWidth="0.0"/> | |
130 | + <topPen lineWidth="0.0"/> | |
131 | + <leftPen lineWidth="0.0"/> | |
132 | + <bottomPen lineWidth="0.0"/> | |
133 | + <rightPen lineWidth="0.0"/> | |
134 | + </box> | |
135 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
136 | + <textFieldExpression><![CDATA[$F{numanocontrato}.substring(0,9) + "/" + $F{numanocontrato}.substring(9,13)]]></textFieldExpression> | |
137 | + </textField> | |
138 | + </frame> | |
139 | + <frame> | |
140 | + <reportElement positionType="Float" x="5" y="60" width="544" height="25" uuid="af3077ce-5d6b-44cb-879e-5e216ade93d0"/> | |
141 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
142 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" uuid="f1e51c51-3e1c-4e9d-a254-252c38ee2908"/> | |
143 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
144 | + <pen lineWidth="0.0"/> | |
145 | + <topPen lineWidth="0.0"/> | |
146 | + <leftPen lineWidth="0.0"/> | |
147 | + <bottomPen lineWidth="0.0"/> | |
148 | + <rightPen lineWidth="0.0"/> | |
149 | + </box> | |
150 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
151 | + <textFieldExpression><![CDATA[$F{contratada}]]></textFieldExpression> | |
152 | + </textField> | |
153 | + <staticText> | |
154 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="b6fc395c-4e28-49d9-b9ea-a49dd16f358a"/> | |
155 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
156 | + <pen lineWidth="0.0"/> | |
157 | + <topPen lineWidth="0.0"/> | |
158 | + <leftPen lineWidth="0.0"/> | |
159 | + <bottomPen lineWidth="0.0"/> | |
160 | + <rightPen lineWidth="0.0"/> | |
161 | + </box> | |
162 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
163 | + <font isBold="true"/> | |
164 | + </textElement> | |
165 | + <text><![CDATA[Contratada]]></text> | |
166 | + </staticText> | |
167 | + </frame> | |
168 | + <line> | |
169 | + <reportElement x="5" y="85" width="544" height="1" uuid="c86827d4-91f0-4452-bc2d-6d68c7d7804c"/> | |
170 | + </line> | |
171 | + </band> | |
172 | + <band height="75" splitType="Stretch"> | |
173 | + <staticText> | |
174 | + <reportElement x="5" y="10" width="544" height="25" uuid="b507a610-f7ee-4c3b-9d62-3ac4f2da7706"/> | |
175 | + <box topPadding="0" leftPadding="5"/> | |
176 | + <textElement verticalAlignment="Middle"> | |
177 | + <font size="13" isBold="true"/> | |
178 | + </textElement> | |
179 | + <text><![CDATA[1. Relatórios]]></text> | |
180 | + </staticText> | |
181 | + <componentElement> | |
182 | + <reportElement key="table 1" positionType="Float" x="15" y="40" width="534" height="30" isPrintWhenDetailOverflows="true" uuid="a2f9cf2e-2f72-4013-9cbd-94bd20ce6df2"/> | |
183 | + <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"> | |
184 | + <datasetRun subDataset="penalidades" uuid="164d2db9-5e45-482b-b184-e729be724bfd"> | |
185 | + <datasetParameter name="REPORT_CONNECTION"> | |
186 | + <datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression> | |
187 | + </datasetParameter> | |
188 | + <datasetParameter name="CONTRATO_ID"> | |
189 | + <datasetParameterExpression><![CDATA[$P{CONTRATO_ID}]]></datasetParameterExpression> | |
190 | + </datasetParameter> | |
191 | + <datasetParameter name="DATA_INICIAL_TOKEN"> | |
192 | + <datasetParameterExpression><![CDATA[$P{DATA_INICIAL_TOKEN}]]></datasetParameterExpression> | |
193 | + </datasetParameter> | |
194 | + <datasetParameter name="DATA_FINAL_TOKEN"> | |
195 | + <datasetParameterExpression><![CDATA[$P{DATA_FINAL_TOKEN}]]></datasetParameterExpression> | |
196 | + </datasetParameter> | |
197 | + <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> | |
198 | + </datasetRun> | |
199 | + <jr:column width="65" uuid="fdfe3465-3b51-423a-af25-4045485d5a1e"> | |
200 | + <jr:columnHeader height="30" rowSpan="1"> | |
201 | + <staticText> | |
202 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="65" height="30" backcolor="#CCCCCC" uuid="bf8f850b-5145-49fd-8c41-52c7ac05faee"/> | |
203 | + <box topPadding="0" leftPadding="3" bottomPadding="0" rightPadding="3"> | |
204 | + <pen lineWidth="1.0"/> | |
205 | + <topPen lineWidth="1.0"/> | |
206 | + <leftPen lineWidth="1.0"/> | |
207 | + <bottomPen lineWidth="1.0"/> | |
208 | + <rightPen lineWidth="1.0"/> | |
209 | + </box> | |
210 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
211 | + <font isBold="true"/> | |
212 | + </textElement> | |
213 | + <text><![CDATA[Data]]></text> | |
214 | + </staticText> | |
215 | + </jr:columnHeader> | |
216 | + <jr:detailCell height="25" rowSpan="1"> | |
217 | + <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true"> | |
218 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="65" height="25" uuid="27fc566c-19fd-4f74-b01c-e2c58ae5b107"/> | |
219 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
220 | + <pen lineWidth="1.0"/> | |
221 | + <topPen lineWidth="1.0"/> | |
222 | + <leftPen lineWidth="1.0"/> | |
223 | + <bottomPen lineWidth="1.0"/> | |
224 | + <rightPen lineWidth="1.0"/> | |
225 | + </box> | |
226 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
227 | + <font isBold="false"/> | |
228 | + </textElement> | |
229 | + <textFieldExpression><![CDATA[$F{datapenalizacao}]]></textFieldExpression> | |
230 | + </textField> | |
231 | + </jr:detailCell> | |
232 | + </jr:column> | |
233 | + <jr:column width="130" uuid="0a1e8915-6f85-4d7a-a08e-73b217283674"> | |
234 | + <jr:columnHeader height="30" rowSpan="1"> | |
235 | + <staticText> | |
236 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="130" height="30" backcolor="#CCCCCC" uuid="5aadd943-07a6-4a31-a246-3111079e1b23"/> | |
237 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
238 | + <pen lineWidth="1.0"/> | |
239 | + <topPen lineWidth="1.0"/> | |
240 | + <leftPen lineWidth="1.0"/> | |
241 | + <bottomPen lineWidth="1.0"/> | |
242 | + <rightPen lineWidth="1.0"/> | |
243 | + </box> | |
244 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
245 | + <font isBold="true"/> | |
246 | + </textElement> | |
247 | + <text><![CDATA[Penalidade]]></text> | |
248 | + </staticText> | |
249 | + </jr:columnHeader> | |
250 | + <jr:detailCell height="25" rowSpan="1"> | |
251 | + <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> | |
252 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="130" height="25" uuid="c4c4f934-ddee-489a-b261-9438a2c87051"/> | |
253 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
254 | + <pen lineWidth="1.0"/> | |
255 | + <topPen lineWidth="1.0"/> | |
256 | + <leftPen lineWidth="1.0"/> | |
257 | + <bottomPen lineWidth="1.0"/> | |
258 | + <rightPen lineWidth="1.0"/> | |
259 | + </box> | |
260 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
261 | + <textFieldExpression><![CDATA[$F{penalidade}]]></textFieldExpression> | |
262 | + </textField> | |
263 | + </jr:detailCell> | |
264 | + </jr:column> | |
265 | + <jr:column width="79" uuid="f46445fc-007b-46e6-ade9-eef37e5d0b29"> | |
266 | + <jr:columnHeader height="30" rowSpan="1"> | |
267 | + <staticText> | |
268 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="79" height="30" backcolor="#CCCCCC" uuid="2cea64aa-39b7-4fe4-acaa-c11e1981148a"/> | |
269 | + <box topPadding="0" leftPadding="3" bottomPadding="0" rightPadding="3"> | |
270 | + <pen lineWidth="1.0"/> | |
271 | + <topPen lineWidth="1.0"/> | |
272 | + <leftPen lineWidth="1.0"/> | |
273 | + <bottomPen lineWidth="1.0"/> | |
274 | + <rightPen lineWidth="1.0"/> | |
275 | + </box> | |
276 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
277 | + <font isBold="true"/> | |
278 | + </textElement> | |
279 | + <text><![CDATA[Nr. da ocorr. vinculada]]></text> | |
280 | + </staticText> | |
281 | + </jr:columnHeader> | |
282 | + <jr:detailCell height="25" rowSpan="1"> | |
283 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
284 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="79" height="25" uuid="1a4d3c83-faee-4ef1-9f14-8459e5436112"/> | |
285 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
286 | + <pen lineWidth="1.0"/> | |
287 | + <topPen lineWidth="1.0"/> | |
288 | + <leftPen lineWidth="1.0"/> | |
289 | + <bottomPen lineWidth="1.0"/> | |
290 | + <rightPen lineWidth="1.0"/> | |
291 | + </box> | |
292 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
293 | + <textFieldExpression><![CDATA[$F{sequencialano}.substring(0, $F{sequencialano}.length() - 4).concat("/").concat($F{sequencialano}.substring($F{sequencialano}.length() - 4))]]></textFieldExpression> | |
294 | + </textField> | |
295 | + </jr:detailCell> | |
296 | + </jr:column> | |
297 | + <jr:column width="130" uuid="c297508b-d28b-41d0-b617-8d905832ba11"> | |
298 | + <jr:columnHeader height="30" rowSpan="1"> | |
299 | + <staticText> | |
300 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="130" height="30" backcolor="#CCCCCC" uuid="eda2a9c7-8e71-424c-964b-0adcfdbd626d"/> | |
301 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
302 | + <pen lineWidth="1.0"/> | |
303 | + <topPen lineWidth="1.0"/> | |
304 | + <leftPen lineWidth="1.0"/> | |
305 | + <bottomPen lineWidth="1.0"/> | |
306 | + <rightPen lineWidth="1.0"/> | |
307 | + </box> | |
308 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
309 | + <font isBold="true"/> | |
310 | + </textElement> | |
311 | + <text><![CDATA[Ocorrência da penalidade]]></text> | |
312 | + </staticText> | |
313 | + </jr:columnHeader> | |
314 | + <jr:detailCell height="25" rowSpan="1"> | |
315 | + <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> | |
316 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="130" height="25" uuid="7461c57c-7e7c-43de-bacd-9e25c72fce48"/> | |
317 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
318 | + <pen lineWidth="1.0"/> | |
319 | + <topPen lineWidth="1.0"/> | |
320 | + <leftPen lineWidth="1.0"/> | |
321 | + <bottomPen lineWidth="1.0"/> | |
322 | + <rightPen lineWidth="1.0"/> | |
323 | + </box> | |
324 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
325 | + <textFieldExpression><![CDATA[$F{descricaoocorrencia}]]></textFieldExpression> | |
326 | + </textField> | |
327 | + </jr:detailCell> | |
328 | + </jr:column> | |
329 | + <jr:column width="130" uuid="c2128a98-752d-409e-89cc-eb883a56b4e6"> | |
330 | + <jr:columnHeader height="30" rowSpan="1"> | |
331 | + <staticText> | |
332 | + <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="130" height="30" backcolor="#CCCCCC" uuid="6df9dcd8-69d0-4d0b-9870-e3e7c89a468b"/> | |
333 | + <box leftPadding="5" rightPadding="3"> | |
334 | + <pen lineWidth="1.0"/> | |
335 | + <topPen lineWidth="1.0"/> | |
336 | + <leftPen lineWidth="1.0"/> | |
337 | + <bottomPen lineWidth="1.0"/> | |
338 | + <rightPen lineWidth="1.0"/> | |
339 | + </box> | |
340 | + <textElement verticalAlignment="Middle"> | |
341 | + <font isBold="true"/> | |
342 | + </textElement> | |
343 | + <text><![CDATA[Resposta da contratada]]></text> | |
344 | + </staticText> | |
345 | + </jr:columnHeader> | |
346 | + <jr:detailCell height="25" rowSpan="1"> | |
347 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
348 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="130" height="25" uuid="89c24ae1-9089-4a3a-859d-c0b737b24509"/> | |
349 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
350 | + <pen lineWidth="1.0"/> | |
351 | + <topPen lineWidth="1.0"/> | |
352 | + <leftPen lineWidth="1.0"/> | |
353 | + <bottomPen lineWidth="1.0"/> | |
354 | + <rightPen lineWidth="1.0"/> | |
355 | + </box> | |
356 | + <textElement verticalAlignment="Middle"/> | |
357 | + <textFieldExpression><![CDATA[$F{respostacontratada}]]></textFieldExpression> | |
358 | + </textField> | |
359 | + </jr:detailCell> | |
360 | + </jr:column> | |
361 | + </jr:table> | |
362 | + </componentElement> | |
363 | + </band> | |
364 | + </detail> | |
365 | +</jasperReport> | ... | ... |
cit-contratos-web/src/main/resources/reports/relatorioRepactuacoes.jrxml
0 → 100644
... | ... | @@ -0,0 +1,296 @@ |
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="relatorioRepactuacoes" pageWidth="554" pageHeight="802" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="554" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="2a9bde7e-349d-4f0b-b96c-98310606be6f"> | |
3 | + <property name="ireport.zoom" value="1.5"/> | |
4 | + <property name="ireport.x" value="0"/> | |
5 | + <property name="ireport.y" value="0"/> | |
6 | + <style name="table"> | |
7 | + <box> | |
8 | + <pen lineWidth="1.0" lineColor="#000000"/> | |
9 | + </box> | |
10 | + </style> | |
11 | + <style name="table_TH" mode="Opaque" backcolor="#F0F8FF"> | |
12 | + <box> | |
13 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
14 | + </box> | |
15 | + </style> | |
16 | + <style name="table_CH" mode="Opaque" backcolor="#BFE1FF"> | |
17 | + <box> | |
18 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
19 | + </box> | |
20 | + </style> | |
21 | + <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> | |
22 | + <box> | |
23 | + <pen lineWidth="0.5" lineColor="#000000"/> | |
24 | + </box> | |
25 | + </style> | |
26 | + <subDataset name="repactuacoes" uuid="889bcaeb-aaf2-4da7-bd38-1d8c3779d286"> | |
27 | + <parameter name="CONTRATO_ID" class="java.lang.Long"/> | |
28 | + <parameter name="DATA_INICIAL_TOKEN" class="java.lang.String"> | |
29 | + <defaultValueExpression><![CDATA[]]></defaultValueExpression> | |
30 | + </parameter> | |
31 | + <parameter name="DATA_FINAL_TOKEN" class="java.lang.String"> | |
32 | + <defaultValueExpression><![CDATA[]]></defaultValueExpression> | |
33 | + </parameter> | |
34 | + <queryString> | |
35 | + <![CDATA[select r.numerorepactuacao, r.datarepactuacao, r.justificativarepactuacao | |
36 | +from cnt_ev_repactuacao r | |
37 | + inner join cnt_cn_evento e on e.id = r.id | |
38 | + inner join cnt_contrato c on c.id = e.contrato_id | |
39 | +where c.id = $P{CONTRATO_ID} $P!{DATA_INICIAL_TOKEN} $P!{DATA_FINAL_TOKEN}]]> | |
40 | + </queryString> | |
41 | + <field name="numerorepactuacao" class="java.lang.String"/> | |
42 | + <field name="datarepactuacao" class="java.sql.Timestamp"/> | |
43 | + <field name="justificativarepactuacao" class="java.lang.String"/> | |
44 | + </subDataset> | |
45 | + <parameter name="CONTRATO_ID" class="java.lang.Long"/> | |
46 | + <parameter name="SUBREPORT_DIR" class="java.lang.Object" isForPrompting="false"> | |
47 | + <defaultValueExpression><![CDATA["D:\\desenvolvimento\\workspaces\\workspace_eclipse\\workspace-grp\\modulos\\cit-contratos\\cit-contratos-web\\src\\main\\resources\\reports\\"]]></defaultValueExpression> | |
48 | + </parameter> | |
49 | + <parameter name="SUBREPORT_PARAMETERS_MAP" class="java.util.Map" isForPrompting="false"> | |
50 | + <parameterDescription><![CDATA[Parametros do SubReport]]></parameterDescription> | |
51 | + </parameter> | |
52 | + <parameter name="DATA_INICIAL" class="java.util.Date"/> | |
53 | + <parameter name="DATA_FINAL" class="java.util.Date"/> | |
54 | + <parameter name="DATA_FINAL_TOKEN" class="java.lang.String"> | |
55 | + <defaultValueExpression><![CDATA[( $P{DATA_FINAL} != null ? " and p.datapenalizacao <= '" + $P{DATA_FINAL} + "'" : "" )]]></defaultValueExpression> | |
56 | + </parameter> | |
57 | + <parameter name="DATA_INICIAL_TOKEN" class="java.lang.String"> | |
58 | + <defaultValueExpression><![CDATA[( $P{DATA_INICIAL} != null ? " and p.datapenalizacao >= '" + $P{DATA_INICIAL} + "'" : "" )]]></defaultValueExpression> | |
59 | + </parameter> | |
60 | + <queryString> | |
61 | + <![CDATA[select c.numeroanocontrato as numanocontrato, pess.nome as contratada | |
62 | +from cnt_contrato c | |
63 | + inner join parceiro parc ON parc.id = c.fornecedor_id | |
64 | + inner join pessoa pess ON pess.id = parc.pessoa_id | |
65 | +where c.id = $P{CONTRATO_ID}]]> | |
66 | + </queryString> | |
67 | + <field name="numanocontrato" class="java.lang.String"/> | |
68 | + <field name="contratada" class="java.lang.String"/> | |
69 | + <background> | |
70 | + <band splitType="Stretch"/> | |
71 | + </background> | |
72 | + <detail> | |
73 | + <band height="90" splitType="Prevent"> | |
74 | + <frame> | |
75 | + <reportElement positionType="Float" x="5" y="10" width="544" height="25" uuid="38d5011b-885b-4c06-ae9f-8ae5f9101873"/> | |
76 | + <staticText> | |
77 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="ae43a2db-f404-4c5d-b934-87a70c8b5716"/> | |
78 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
79 | + <pen lineWidth="0.0"/> | |
80 | + <topPen lineWidth="0.0"/> | |
81 | + <leftPen lineWidth="0.0"/> | |
82 | + <bottomPen lineWidth="0.0"/> | |
83 | + <rightPen lineWidth="0.0"/> | |
84 | + </box> | |
85 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
86 | + <font isBold="true"/> | |
87 | + </textElement> | |
88 | + <text><![CDATA[Período]]></text> | |
89 | + </staticText> | |
90 | + <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="false"> | |
91 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" uuid="263dadd4-8d94-4de9-a045-a741d1d6f127"/> | |
92 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
93 | + <pen lineWidth="0.0"/> | |
94 | + <topPen lineWidth="0.0"/> | |
95 | + <leftPen lineWidth="0.0"/> | |
96 | + <bottomPen lineWidth="0.0"/> | |
97 | + <rightPen lineWidth="0.0"/> | |
98 | + </box> | |
99 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
100 | + <textFieldExpression><![CDATA[($P{DATA_INICIAL} == null && $P{DATA_FINAL} == null) ? "Não informado" : | |
101 | +($P{DATA_INICIAL} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{DATA_INICIAL})) + " à " + | |
102 | +($P{DATA_FINAL} == null ? "Não informado" : new SimpleDateFormat("dd/MM/yyyy").format($P{DATA_FINAL}))]]></textFieldExpression> | |
103 | + </textField> | |
104 | + </frame> | |
105 | + <frame> | |
106 | + <reportElement positionType="Float" x="5" y="35" width="544" height="25" uuid="f96ac29b-e8ab-44fd-b943-3abe7589504e"/> | |
107 | + <staticText> | |
108 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="9dc4d075-c3fa-467f-bbcc-84727a545527"/> | |
109 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
110 | + <pen lineWidth="0.0"/> | |
111 | + <topPen lineWidth="0.0"/> | |
112 | + <leftPen lineWidth="0.0"/> | |
113 | + <bottomPen lineWidth="0.0"/> | |
114 | + <rightPen lineWidth="0.0"/> | |
115 | + </box> | |
116 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
117 | + <font isBold="true"/> | |
118 | + </textElement> | |
119 | + <text><![CDATA[Número / Ano do contrato]]></text> | |
120 | + </staticText> | |
121 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
122 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" isRemoveLineWhenBlank="true" uuid="afc850e0-f7e1-47ec-a9de-090502bfdadd"/> | |
123 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
124 | + <pen lineWidth="0.0"/> | |
125 | + <topPen lineWidth="0.0"/> | |
126 | + <leftPen lineWidth="0.0"/> | |
127 | + <bottomPen lineWidth="0.0"/> | |
128 | + <rightPen lineWidth="0.0"/> | |
129 | + </box> | |
130 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
131 | + <textFieldExpression><![CDATA[$F{numanocontrato}.substring(0,9) + "/" + $F{numanocontrato}.substring(9,13)]]></textFieldExpression> | |
132 | + </textField> | |
133 | + </frame> | |
134 | + <frame> | |
135 | + <reportElement positionType="Float" x="5" y="60" width="544" height="25" uuid="af3077ce-5d6b-44cb-879e-5e216ade93d0"/> | |
136 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
137 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="150" y="0" width="394" height="25" uuid="f1e51c51-3e1c-4e9d-a254-252c38ee2908"/> | |
138 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
139 | + <pen lineWidth="0.0"/> | |
140 | + <topPen lineWidth="0.0"/> | |
141 | + <leftPen lineWidth="0.0"/> | |
142 | + <bottomPen lineWidth="0.0"/> | |
143 | + <rightPen lineWidth="0.0"/> | |
144 | + </box> | |
145 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
146 | + <textFieldExpression><![CDATA[$F{contratada}]]></textFieldExpression> | |
147 | + </textField> | |
148 | + <staticText> | |
149 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Transparent" x="0" y="0" width="150" height="25" backcolor="#FFFFFF" uuid="b6fc395c-4e28-49d9-b9ea-a49dd16f358a"/> | |
150 | + <box topPadding="0" leftPadding="5" bottomPadding="0" rightPadding="3"> | |
151 | + <pen lineWidth="0.0"/> | |
152 | + <topPen lineWidth="0.0"/> | |
153 | + <leftPen lineWidth="0.0"/> | |
154 | + <bottomPen lineWidth="0.0"/> | |
155 | + <rightPen lineWidth="0.0"/> | |
156 | + </box> | |
157 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
158 | + <font isBold="true"/> | |
159 | + </textElement> | |
160 | + <text><![CDATA[Contratada]]></text> | |
161 | + </staticText> | |
162 | + </frame> | |
163 | + <line> | |
164 | + <reportElement x="5" y="85" width="544" height="1" uuid="966cf623-bcb2-4497-8bc1-2a8a7ffd1484"/> | |
165 | + </line> | |
166 | + </band> | |
167 | + <band height="75" splitType="Stretch"> | |
168 | + <componentElement> | |
169 | + <reportElement key="table 1" positionType="Float" x="15" y="40" width="534" height="30" isPrintWhenDetailOverflows="true" uuid="a2f9cf2e-2f72-4013-9cbd-94bd20ce6df2"/> | |
170 | + <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"> | |
171 | + <datasetRun subDataset="repactuacoes" uuid="164d2db9-5e45-482b-b184-e729be724bfd"> | |
172 | + <datasetParameter name="REPORT_CONNECTION"> | |
173 | + <datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression> | |
174 | + </datasetParameter> | |
175 | + <datasetParameter name="CONTRATO_ID"> | |
176 | + <datasetParameterExpression><![CDATA[$P{CONTRATO_ID}]]></datasetParameterExpression> | |
177 | + </datasetParameter> | |
178 | + <datasetParameter name="DATA_INICIAL_TOKEN"> | |
179 | + <datasetParameterExpression><![CDATA[$P{DATA_INICIAL_TOKEN}]]></datasetParameterExpression> | |
180 | + </datasetParameter> | |
181 | + <datasetParameter name="DATA_FINAL_TOKEN"> | |
182 | + <datasetParameterExpression><![CDATA[$P{DATA_FINAL_TOKEN}]]></datasetParameterExpression> | |
183 | + </datasetParameter> | |
184 | + <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> | |
185 | + </datasetRun> | |
186 | + <jr:column width="100" uuid="fdfe3465-3b51-423a-af25-4045485d5a1e"> | |
187 | + <jr:columnHeader height="25" rowSpan="1"> | |
188 | + <staticText> | |
189 | + <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="100" height="25" backcolor="#CCCCCC" uuid="bf8f850b-5145-49fd-8c41-52c7ac05faee"/> | |
190 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
191 | + <pen lineWidth="1.0"/> | |
192 | + <topPen lineWidth="1.0"/> | |
193 | + <leftPen lineWidth="1.0"/> | |
194 | + <bottomPen lineWidth="1.0"/> | |
195 | + <rightPen lineWidth="1.0"/> | |
196 | + </box> | |
197 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
198 | + <font isBold="true"/> | |
199 | + </textElement> | |
200 | + <text><![CDATA[Nr. da repactuação]]></text> | |
201 | + </staticText> | |
202 | + </jr:columnHeader> | |
203 | + <jr:detailCell height="25" rowSpan="1"> | |
204 | + <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> | |
205 | + <reportElement positionType="Float" x="0" y="0" width="100" height="25" uuid="27fc566c-19fd-4f74-b01c-e2c58ae5b107"/> | |
206 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
207 | + <pen lineWidth="1.0"/> | |
208 | + <topPen lineWidth="1.0"/> | |
209 | + <leftPen lineWidth="1.0"/> | |
210 | + <bottomPen lineWidth="1.0"/> | |
211 | + <rightPen lineWidth="1.0"/> | |
212 | + </box> | |
213 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
214 | + <font isBold="false"/> | |
215 | + </textElement> | |
216 | + <textFieldExpression><![CDATA[$F{numerorepactuacao}]]></textFieldExpression> | |
217 | + </textField> | |
218 | + </jr:detailCell> | |
219 | + </jr:column> | |
220 | + <jr:column width="84" uuid="0a1e8915-6f85-4d7a-a08e-73b217283674"> | |
221 | + <jr:columnHeader height="25" rowSpan="1"> | |
222 | + <staticText> | |
223 | + <reportElement positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="84" height="25" backcolor="#CCCCCC" uuid="5aadd943-07a6-4a31-a246-3111079e1b23"/> | |
224 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
225 | + <pen lineWidth="1.0"/> | |
226 | + <topPen lineWidth="1.0"/> | |
227 | + <leftPen lineWidth="1.0"/> | |
228 | + <bottomPen lineWidth="1.0"/> | |
229 | + <rightPen lineWidth="1.0"/> | |
230 | + </box> | |
231 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
232 | + <font isBold="true"/> | |
233 | + </textElement> | |
234 | + <text><![CDATA[Data]]></text> | |
235 | + </staticText> | |
236 | + </jr:columnHeader> | |
237 | + <jr:detailCell height="25" rowSpan="1"> | |
238 | + <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true"> | |
239 | + <reportElement positionType="Float" x="0" y="0" width="84" height="25" uuid="c4c4f934-ddee-489a-b261-9438a2c87051"/> | |
240 | + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> | |
241 | + <pen lineWidth="1.0"/> | |
242 | + <topPen lineWidth="1.0"/> | |
243 | + <leftPen lineWidth="1.0"/> | |
244 | + <bottomPen lineWidth="1.0"/> | |
245 | + <rightPen lineWidth="1.0"/> | |
246 | + </box> | |
247 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
248 | + <textFieldExpression><![CDATA[$F{datarepactuacao}]]></textFieldExpression> | |
249 | + </textField> | |
250 | + </jr:detailCell> | |
251 | + </jr:column> | |
252 | + <jr:column width="350" uuid="f46445fc-007b-46e6-ade9-eef37e5d0b29"> | |
253 | + <jr:columnHeader height="25" rowSpan="1"> | |
254 | + <staticText> | |
255 | + <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="350" height="25" backcolor="#CCCCCC" uuid="2cea64aa-39b7-4fe4-acaa-c11e1981148a"/> | |
256 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
257 | + <pen lineWidth="1.0"/> | |
258 | + <topPen lineWidth="1.0"/> | |
259 | + <leftPen lineWidth="1.0"/> | |
260 | + <bottomPen lineWidth="1.0"/> | |
261 | + <rightPen lineWidth="1.0"/> | |
262 | + </box> | |
263 | + <textElement textAlignment="Left" verticalAlignment="Middle"> | |
264 | + <font isBold="true"/> | |
265 | + </textElement> | |
266 | + <text><![CDATA[Justificativa]]></text> | |
267 | + </staticText> | |
268 | + </jr:columnHeader> | |
269 | + <jr:detailCell height="25" rowSpan="1"> | |
270 | + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> | |
271 | + <reportElement positionType="Float" x="0" y="0" width="350" height="25" uuid="1a4d3c83-faee-4ef1-9f14-8459e5436112"/> | |
272 | + <box topPadding="2" leftPadding="5" bottomPadding="2" rightPadding="3"> | |
273 | + <pen lineWidth="1.0"/> | |
274 | + <topPen lineWidth="1.0"/> | |
275 | + <leftPen lineWidth="1.0"/> | |
276 | + <bottomPen lineWidth="1.0"/> | |
277 | + <rightPen lineWidth="1.0"/> | |
278 | + </box> | |
279 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
280 | + <textFieldExpression><![CDATA[$F{justificativarepactuacao}]]></textFieldExpression> | |
281 | + </textField> | |
282 | + </jr:detailCell> | |
283 | + </jr:column> | |
284 | + </jr:table> | |
285 | + </componentElement> | |
286 | + <staticText> | |
287 | + <reportElement x="5" y="10" width="544" height="25" uuid="b507a610-f7ee-4c3b-9d62-3ac4f2da7706"/> | |
288 | + <box topPadding="0" leftPadding="5"/> | |
289 | + <textElement verticalAlignment="Middle"> | |
290 | + <font size="13" isBold="true"/> | |
291 | + </textElement> | |
292 | + <text><![CDATA[1. Relatórios]]></text> | |
293 | + </staticText> | |
294 | + </band> | |
295 | + </detail> | |
296 | +</jasperReport> | ... | ... |
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ConsultaRelatoriosController.js
0 → 100644
... | ... | @@ -0,0 +1,87 @@ |
1 | +'use strict'; | |
2 | + | |
3 | +citApp.controller('ConsultaRelatoriosController', ['$scope', '$filter', '$timeout', '$translate', 'ContratoRepository', 'DominioRepository', 'ContratoEventoRepository', | |
4 | + function VisaoContratoController($scope, $filter, $timeout, $translate, ContratoRepository, DominioRepository, ContratoEventoRepository) { | |
5 | + | |
6 | + $scope.contrato = null; | |
7 | + $scope.dataInicial = ''; | |
8 | + $scope.dataFinal = ''; | |
9 | + $scope.tiposRelatorios = []; | |
10 | + $scope.isTiposRelatorioSelecionado = false; | |
11 | + | |
12 | + $scope.findContrato = function (value) { | |
13 | + return ContratoRepository.findContrato(value, $scope.usuarioLogado.organizacao.id).then(function (result) { | |
14 | + return result; | |
15 | + }); | |
16 | + }; | |
17 | + | |
18 | + DominioRepository.findAllDominio('tipoEventoContrato').then(function (result) { | |
19 | + angular.forEach(result, function(dominio, key) { | |
20 | + if(dominio.codigo != 1 && dominio.codigo != 3 && dominio.codigo != 4 && dominio.codigo != 8 && dominio.codigo != 10){ | |
21 | + $scope.tiposRelatorios.push(dominio); | |
22 | + } | |
23 | + }); | |
24 | + }); | |
25 | + | |
26 | + $scope.resetForm = function () { | |
27 | + $scope.contrato = null; | |
28 | + $timeout(function () { | |
29 | + $scope.consultaRelatoriosForm.$submitted = false; | |
30 | + $scope.consultaRelatoriosForm.$setPristine(); | |
31 | + }); | |
32 | + }; | |
33 | + | |
34 | + // Seleciona todos os tipos de relatórios da lista | |
35 | + $scope.checkAll = function(value) { | |
36 | + angular.forEach($scope.tiposRelatorios, function (item, key) { | |
37 | + item.$selected = value; | |
38 | + item.$index = key; | |
39 | + }); | |
40 | + $scope.atualizaTiposRelatorioSelecionado(); | |
41 | + }; | |
42 | + | |
43 | + $scope.atualizaTiposRelatorioSelecionado = function() { | |
44 | + $scope.isTiposRelatorioSelecionado = false; | |
45 | + angular.forEach($scope.tiposRelatorios, function (item) { | |
46 | + if (item.$selected) { | |
47 | + $scope.isTiposRelatorioSelecionado = true; | |
48 | + } | |
49 | + }); | |
50 | + }; | |
51 | + | |
52 | + $scope.gerar = function () { | |
53 | + $scope.consultaRelatoriosForm.$submitted = true; | |
54 | + | |
55 | + if ($scope.dataInicial && $scope.dataFinal) { | |
56 | + if (!isPeriodoValido($scope.dataInicial, $scope.dataFinal)){ | |
57 | + $scope.showAlert('error', $translate.instant('VALIDACAO.INTERVALO_DATAS_INVALIDO'), " ", false); | |
58 | + return; | |
59 | + } | |
60 | + } | |
61 | + $scope.setLoadingGet(true); | |
62 | + if($scope.consultaRelatoriosForm.$invalid && !$scope.isTiposRelatorioSelecionado) { | |
63 | + $scope.setLoading(false); | |
64 | + //Mensagem de erro de campos obrigatorios não preenchidos | |
65 | + $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); | |
66 | + return; | |
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); | |
85 | + }; | |
86 | + | |
87 | +}]); | |
0 | 88 | \ No newline at end of file | ... | ... |
cit-contratos-web/src/main/webapp/html/consultaRelatorios/consultaRelatorios.html
0 → 100644
cit-contratos-web/src/main/webapp/html/consultaRelatorios/consultaRelatoriosList.html
0 → 100644
... | ... | @@ -0,0 +1,109 @@ |
1 | +<div class="page-content" id="searchConsultaRelatorios" ng-controller="ConsultaRelatoriosController"> | |
2 | + <div class="bar-buttons-action fixed"> | |
3 | + <div class="row"> | |
4 | + <div class="col-sm-8 text-left"> | |
5 | + | |
6 | + <button | |
7 | + title="{{$translate.instant('LABEL.GERAR_TERMO_CONTRATO')}}" | |
8 | + alt="{{$translate.instant('LABEL.GERAR_TERMO_CONTRATO')}}" | |
9 | + class="btn btn-clear" type="button" ng-disabled="false" | |
10 | + ng-click="gerar();" > | |
11 | + <i class="fa fa-print"></i> | |
12 | + <translate>CONTRATOS.LABEL.GERAR</translate> | |
13 | + </button> | |
14 | + | |
15 | + <span class="divider-vertical"></span> | |
16 | + | |
17 | + <!-- <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> --> | |
18 | + | |
19 | + </div> | |
20 | + | |
21 | + <div class="col-sm-4 text-right"> | |
22 | + | |
23 | + <favorito/> | |
24 | + | |
25 | + <help-button workspace="workspace" /> | |
26 | + | |
27 | + </div><!-- .col --> | |
28 | + </div><!-- .row --> | |
29 | + </div><!-- .bar-buttons-action --> | |
30 | + | |
31 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | |
32 | + | |
33 | + <form name="consultaRelatoriosForm" novalidate autocomplete="off"> | |
34 | + <p> | |
35 | + <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | |
36 | + </p> | |
37 | + | |
38 | + <fieldset> | |
39 | + <legend> | |
40 | + <translate>CONTRATOS.LABEL.EMITIR_CONSULTA_RELATORIOS</translate> | |
41 | + </legend> | |
42 | + | |
43 | + <div class="row"> | |
44 | + <div class="col-sm-4"> | |
45 | + <auto-complete ng-id="contrato" ng-label="LABEL.NUMERO_ANO_CONTRATO" ng-find="findContrato(value)" ng-item="item.numeroAnoContratoFormatado" | |
46 | + ng-acao-borracha="resetForm()" ng-model="contrato" form="consultaRelatoriosForm" ng-obrigatorio="false"> | |
47 | + </auto-complete> | |
48 | + </div> | |
49 | + <div class="col-sm-4"> | |
50 | + <label-input-data ng-id="dataInicial" ng-label="CONTRATOS.LABEL.DATA_INICIAL" ng-model="dataInicial" | |
51 | + form="consultaRelatoriosForm" ng-obrigatorio="false" ng-disabled="false" ng-mode="day" ng-format="dd/MM/yyyy"/> | |
52 | + </div> | |
53 | + <div class="col-sm-4"> | |
54 | + <label-input-data ng-id="dataFinal" ng-label="CONTRATOS.LABEL.DATA_FINAL" ng-model="dataFinal" | |
55 | + form="consultaRelatoriosForm" ng-obrigatorio="false" ng-disabled="false" ng-mode="day" ng-format="dd/MM/yyyy"/> | |
56 | + </div> | |
57 | + </div> | |
58 | + </fieldset> | |
59 | + | |
60 | + <fieldset> | |
61 | + <legend> | |
62 | + <label ng-class="{'has-error' : consultaRelatoriosForm.$submitted && !isTiposRelatorioSelecionado }"> | |
63 | + <translate>CONTRATOS.LABEL.TIPO_RELATORIOS</translate> | |
64 | + <span class='red'>*</span> | |
65 | + <i ng-show="consultaRelatoriosForm.$submitted && !isTiposRelatorioSelecionado" class='fa fa-warning red' | |
66 | + tooltip="{{$translate.instant('CONTRATOS.LABEL.TIPO_RELATORIOS') + ' ' +$translate.instant('CONTRATOS.LABEL.TIPO_RELATORIOS')}}" tooltip-placement='top'></i> | |
67 | + </label> | |
68 | + </legend> | |
69 | + | |
70 | + <div class="row"> | |
71 | + <div class="col-sm-4"> | |
72 | + <div class="panel panel-default"> | |
73 | + | |
74 | + <table class="table table-striped table-bordered table-hover"> | |
75 | + <thead> | |
76 | + <tr> | |
77 | + <th class="text-center" style="width: 10%;"> | |
78 | + <input type="checkbox" ng-model="selectedAll" ng-checked="selectedAll" ng-click="checkAll(selectedAll);" /> | |
79 | + </th> | |
80 | + <th class="text-left" style="width: 90%;"> | |
81 | + <translate>CONTRATOS.LABEL.TIPO_RELATORIOS</translate> | |
82 | + </th> | |
83 | + </tr> | |
84 | + </thead> | |
85 | + <tbody> | |
86 | + <tr ng-repeat="tipo in tiposRelatorios" ng-show="tiposRelatorios.length > 0"> | |
87 | + <td class="text-center"> | |
88 | + <input type="checkbox" ng-click="tipo.$index = $index; atualizaTiposRelatorioSelecionado();" ng-checked="tipo.$selected" ng-model="tipo.$selected" /> | |
89 | + </td> | |
90 | + <td class="text-left"> | |
91 | + {{ tipo.descricao }} | |
92 | + </td> | |
93 | + </tr> | |
94 | + | |
95 | + <tr ng-hide="tiposRelatorios.length != 0"> | |
96 | + <td colspan="5"> | |
97 | + <translate>LABEL.TABELA_VAZIA</translate> | |
98 | + </td> | |
99 | + </tr> | |
100 | + | |
101 | + </tbody> | |
102 | + </table> | |
103 | + </div> | |
104 | + </div> | |
105 | + </div> | |
106 | + </fieldset> | |
107 | + </form> | |
108 | + | |
109 | +</div><!-- .page-content --> | ... | ... |
cit-contratos-web/src/main/webapp/html/consultaTermo/consultaTermo.html
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | </tr> |
50 | 50 | </thead> |
51 | 51 | <tbody> |
52 | - <tr <tr ng-hide="(termos && termos.length != 0)"> | |
52 | + <tr ng-hide="(termos && termos.length != 0)"> | |
53 | 53 | <td colspan="5" class="text-center"><translate>CONTRATOS.LABEL.NAO_HA_TERMOS</translate></td> |
54 | 54 | </tr> |
55 | 55 | <tr ng-repeat="termo in termos"> | ... | ... |