Commit 7ab4bdc5ce71ccb9eb82b3574394de9cfde990f5
1 parent
3e4408a1
Exists in
master
[Redmine Atendimento #4206]Apostilamento máscara
Showing
4 changed files
with
26 additions
and
3 deletions
Show diff stats
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoApostilamentoServiceImpl.java
... | ... | @@ -207,7 +207,7 @@ public class EventoApostilamentoServiceImpl extends GenericServiceImpl<EventoApo |
207 | 207 | } else { |
208 | 208 | sequencial = 1l; |
209 | 209 | } |
210 | - DecimalFormat sequencialFormatado = new DecimalFormat("0000"); | |
210 | + DecimalFormat sequencialFormatado = new DecimalFormat("00000"); | |
211 | 211 | String sequencialAno = sequencialFormatado.format(sequencial) + entity.getDataEmissao().get(Calendar.YEAR); |
212 | 212 | RegistroSequencial registroSequencial = new RegistroSequencial(sequencial, sequencialAno); |
213 | 213 | entity.setRegistroSequencial(registroSequencial); | ... | ... |
cit-contratos-api/src/main/resources/script-bd/v1.0.0-alpha10/01-cit-contratos-1.0.0-ALFA-10-postgres.sql
... | ... | @@ -121,5 +121,28 @@ BEGIN |
121 | 121 | END LOOP; |
122 | 122 | END$$; |
123 | 123 | |
124 | +DO $$ | |
125 | +DECLARE | |
126 | + r RECORD; | |
127 | +BEGIN | |
128 | + FOR r IN | |
129 | + SELECT lpad(sequencialano,9,'0') AS SEQUENCIALANO , ID as ID FROM cnt_ev_apostilamento | |
130 | + LOOP | |
131 | + UPDATE cnt_ev_apostilamento SET sequencialano = r.SEQUENCIALANO WHERE ID = r.ID; | |
132 | + END LOOP; | |
133 | +END$$; | |
134 | + | |
135 | +DO $$ | |
136 | +DECLARE | |
137 | + r RECORD; | |
138 | +BEGIN | |
139 | + FOR r IN | |
140 | + SELECT concat(substring(descricao, 0, 26),lpad(substring(descricao, 26, 4),5,'0'),substring(descricao, 30, length(descricao))) AS DESCRICAO, | |
141 | + ID as ID FROM cnt_cn_evento WHERE descricao like 'Apostilamento%' | |
142 | + LOOP | |
143 | + UPDATE cnt_cn_evento SET descricao = r.DESCRICAO WHERE ID = r.ID; | |
144 | + END LOOP; | |
145 | +END$$; | |
146 | + | |
124 | 147 | -- ERICK FIM 31/03/2016 |
125 | 148 | ... | ... |
cit-contratos-web/src/main/resources/reports/eventoApostilamento.jrxml
... | ... | @@ -2,7 +2,7 @@ |
2 | 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="eventoApostilamento" 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 | 3 | <property name="ireport.zoom" value="1.6105100000000048"/> |
4 | 4 | <property name="ireport.x" value="0"/> |
5 | - <property name="ireport.y" value="71"/> | |
5 | + <property name="ireport.y" value="0"/> | |
6 | 6 | <style name="table"> |
7 | 7 | <box> |
8 | 8 | <pen lineWidth="1.0" lineColor="#000000"/> | ... | ... |
cit-contratos-web/src/main/webapp/html/eventos/cnt_ev_apostilamentoModal.html
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | <div class="row"> |
59 | 59 | <div class="col-sm-4" ng-show="eventoApostilamento.id"> |
60 | 60 | <label-input ng-type="text" ng-id="eventoApostilamento.registroSequencial.sequencialAno" ng-label="CONTRATOS.LABEL.NUMERO_APOSTILAMENTO" ng-disabled="true" |
61 | - ng-custom-maxlength="30" ng-model="eventoApostilamento.registroSequencial.sequencialAno" ng-mask="9999/9999" form="cnt_ev_apostilamentoForm"/> | |
61 | + ng-custom-maxlength="30" ng-model="eventoApostilamento.registroSequencial.sequencialAno" ng-mask="99999/9999" form="cnt_ev_apostilamentoForm"/> | |
62 | 62 | </div><!-- .col --> |
63 | 63 | <div class="col-sm-4"> |
64 | 64 | <label-input-data ng-id="eventoApostilamento.dataEmissao" ng-label="CONTRATOS.LABEL.DATA_EMISSAO_APOSTILAMENTO" ng-disabled="!edit || eventoApostilamento.id" | ... | ... |