From 4dd54e0b2467b02390c5131d177da2444866d2e9 Mon Sep 17 00:00:00 2001 From: erick.sato Date: Tue, 5 Apr 2016 14:47:40 -0300 Subject: [PATCH] [Redmine Atendimento #4281]Geração CSV list view --- cit-contratos-api/src/main/java/br/com/centralit/api/model/Contrato.java | 3 ++- cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoListController.js | 2 +- cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/CronogramaExecucaoListController.js | 5 +++-- cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EncerramentoContratoListController.js | 2 ++ cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EstudoTecnicoListController.js | 1 + cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/NotificacaoContratoListController.js | 2 ++ cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/OrdemFornecimentoListController.js | 4 ++-- cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/RegistroOcorrenciaListController.js | 2 ++ cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/TermoReferenciaListController.js | 1 + 9 files changed, 16 insertions(+), 6 deletions(-) diff --git a/cit-contratos-api/src/main/java/br/com/centralit/api/model/Contrato.java b/cit-contratos-api/src/main/java/br/com/centralit/api/model/Contrato.java index 5049839..38b375c 100644 --- a/cit-contratos-api/src/main/java/br/com/centralit/api/model/Contrato.java +++ b/cit-contratos-api/src/main/java/br/com/centralit/api/model/Contrato.java @@ -119,7 +119,8 @@ public class Contrato extends PersistentObjectAuditOrganizacao { /** Atributo numeroAnoContrato. */ @Transient - @JsonView({ ViewsContrato.OrdemFornecimentoListView.class, + @JsonView({ ViewsContrato.ContratoEditView.class, + ViewsContrato.OrdemFornecimentoListView.class, ViewsContrato.ContratoAutoCompleteView.class, ViewsContrato.CronogramaExecucaoEditView.class, ViewsContrato.RegistroOcorrenciaEditView.class, diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoListController.js index f7f67ab..8366fe4 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoListController.js @@ -10,7 +10,7 @@ citApp.controller('ContratoListController', ['$scope', 'ContratoRepository', 'Do }; // DEFINE CABEÇALHOS DA LISTAGEM - $scope.headers = [ { title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), value : 'numeroAnoContrato', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] } , + $scope.headers = [ { title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), value : 'numeroAnoContrato', typeMask: 'MASK_CONTRATO', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] } , { title : $translate.instant('LABEL.TIPO_CONTRATO'), value : 'dominioTipoContrato.descricao' } , { title : $translate.instant('LABEL.DATA_VIGENCIA_INICIAL'), value : 'dataVigenciaInicial', filter : 'dateBR' }, { title : $translate.instant('LABEL.DATA_VIGENCIA_FINAL'), value : 'dataVigenciaFinal', filter : 'dateBR' }, diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/CronogramaExecucaoListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/CronogramaExecucaoListController.js index dc19706..6df6ca8 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/CronogramaExecucaoListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/CronogramaExecucaoListController.js @@ -1,5 +1,5 @@ 'use strict'; -citApp.controller('CronogramaExecucaoListController', ['$scope', '$translate', '$timeout', 'CronogramaExecucaoRepository', +citApp.controller('CronogramaExecucaoListController', ['$scope', '$translate', '$timeout', 'CronogramaExecucaoRepository', function CronogramaExecucaoListController($scope, $translate, $timeout, CronogramaExecucaoRepository) { $scope.resetForm = function() { @@ -14,6 +14,7 @@ citApp.controller('CronogramaExecucaoListController', ['$scope', '$translate', ' },{ value : 'contrato.numeroAnoContrato', title : $translate.instant('LABEL.NUMERO_CONTRATO'), + typeMask: 'MASK_CONTRATO', filter : 'maskContrato', tamanho : 15 },{ @@ -61,7 +62,7 @@ citApp.controller('CronogramaExecucaoListController', ['$scope', '$translate', ' $scope.url = '/cit-contratos-web/rest/cronogramaExecucao/gerarCronograma?idCronograma='+ $scope.cronogramaExecucaoChecked.id; $scope.visualizarRelatorio($scope.url, $translate.instant("CONTRATOS.LABEL.CRONOGRAMA_EXECUCAO")); } - + }; $scope.remover = function() { diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EncerramentoContratoListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EncerramentoContratoListController.js index e130820..0d27da6 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EncerramentoContratoListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EncerramentoContratoListController.js @@ -16,6 +16,7 @@ citApp.controller('EncerramentoContratoListController', ['$scope', 'Encerramento value : 'contrato.numeroAnoContrato', title : $translate.instant('LABEL.NUM_CONTRATO'), filter : 'maskContrato', + typeMask: 'MASK_CONTRATO', tamanho : 15, align : 'text-center' },{ @@ -32,6 +33,7 @@ citApp.controller('EncerramentoContratoListController', ['$scope', 'Encerramento title : $translate.instant('LABEL.NUM_TERMO'), tamanho : 8, align : 'text-center', + typeMask: 'MASK_10_CODE_ANO', mask : [new RegExp(/(\d{2})(\d{1,4})$/), '$1/$2'] }]; diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EstudoTecnicoListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EstudoTecnicoListController.js index 3ffe6d6..e743546 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EstudoTecnicoListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EstudoTecnicoListController.js @@ -16,6 +16,7 @@ citApp.controller('EstudoTecnicoListController', ['$scope', 'EstudoTecnicoReposi value : 'registroSequencial.sequencialAno', title : $translate.instant('LABEL.NUM_ESTUDO_TECNICO'), align : 'text-center', + typeMask: 'MASK_10_CODE_ANO', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] },{ value : 'descricaoSolucao', diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/NotificacaoContratoListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/NotificacaoContratoListController.js index 311f644..5befb46 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/NotificacaoContratoListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/NotificacaoContratoListController.js @@ -16,6 +16,7 @@ citApp.controller('NotificacaoContratoListController', ['$scope', '$translate', value : 'codigo', title : $translate.instant('NOTIFICACAO_CONTRATO.NUMERO_NOTIFICACAO_ABREV'), tamanho : 20, + typeMask: 'MASK_10_CODE_ANO', mask : [new RegExp(/(\d{2})(\d{1,4})$/), '$1/$2'] },{ value : 'dominioTipoSancao.descricao', @@ -25,6 +26,7 @@ citApp.controller('NotificacaoContratoListController', ['$scope', '$translate', value : 'contrato.numeroAnoContrato', title : $translate.instant('NOTIFICACAO_CONTRATO.NUMERO_CONTRATO_ABREV'), tamanho : 15, + typeMask: 'MASK_CONTRATO', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] }]; diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/OrdemFornecimentoListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/OrdemFornecimentoListController.js index 613cbca..686d4aa 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/OrdemFornecimentoListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/OrdemFornecimentoListController.js @@ -12,10 +12,10 @@ citApp.controller('OrdemFornecimentoListController', ['$scope', 'OrdemFornecimen }; $scope.headers = [ - { title : $translate.instant('LABEL.NUM_ORDEM_FORNECIMENTO'), value : 'numOrdemFornecimento', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] }, + { title : $translate.instant('LABEL.NUM_ORDEM_FORNECIMENTO'), value : 'numOrdemFornecimento', typeMask: 'MASK_10_CODE_ANO', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] }, { title : $translate.instant('LABEL.DATA_EMISSAO'), value : 'dataEmissao', filter : 'dateBR' }, { title : $translate.instant('LABEL.SITUACAO'), value : 'dominioSituacao.descricao' }, - { title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), value : 'contrato.numeroAnoContrato', filter : 'maskContrato' }]; + { title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), value : 'contrato.numeroAnoContrato', typeMask: 'MASK_CONTRATO', filter : 'maskContrato' }]; // default criteria that will be sent to the server $scope.filterCriteria = { diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/RegistroOcorrenciaListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/RegistroOcorrenciaListController.js index 2682738..cfc0f66 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/RegistroOcorrenciaListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/RegistroOcorrenciaListController.js @@ -31,6 +31,7 @@ citApp.controller('RegistroOcorrenciaListController', ['$scope', value : 'registroSequencial.sequencialAno', title : $translate.instant('LABEL.NUMERO_OCORRENCIA'), tamanho : 10, + typeMask: 'MASK_10_CODE_ANO', mask : [new RegExp(/(\d{1})(\d{1,4})$/), '$1/$2'] }, { value : 'tituloOcorrencia', @@ -40,6 +41,7 @@ citApp.controller('RegistroOcorrenciaListController', ['$scope', value : 'contrato.numeroAnoContrato', title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), tamanho : 10, + typeMask: 'MASK_CONTRATO', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] } ]; diff --git a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/TermoReferenciaListController.js b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/TermoReferenciaListController.js index 30ee068..1948918 100644 --- a/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/TermoReferenciaListController.js +++ b/cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/TermoReferenciaListController.js @@ -17,6 +17,7 @@ citApp.controller('TermoReferenciaListController', ['$scope', 'TermoReferenciaRe value : 'codigo', title : $translate.instant('LABEL.CODIGO'), tamanho : 30, + typeMask: 'MASK_10_CODE_ANO', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] },{ value : 'objetoContratacao', -- libgit2 0.21.2