Commit 3e4408a1853de306a493def5ffcb85093850371c
1 parent
69ad431c
Exists in
master
[Redmine Atendimento #4206]Máscara aditivo
Showing
4 changed files
with
28 additions
and
5 deletions
Show diff stats
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/EventoAditivoServiceImpl.java
... | ... | @@ -120,7 +120,7 @@ public class EventoAditivoServiceImpl extends GenericServiceImpl<EventoAditivo, |
120 | 120 | } else { |
121 | 121 | sequencial = 1l; |
122 | 122 | } |
123 | - DecimalFormat sequencialFormatado = new DecimalFormat("0000"); | |
123 | + DecimalFormat sequencialFormatado = new DecimalFormat("00000"); | |
124 | 124 | String sequencialAno = sequencialFormatado.format(sequencial) + entity.getDataEmissao().get(Calendar.YEAR); |
125 | 125 | RegistroSequencial registroSequencial = new RegistroSequencial(sequencial, sequencialAno); |
126 | 126 | 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
... | ... | @@ -98,5 +98,28 @@ BEGIN |
98 | 98 | END LOOP; |
99 | 99 | END$$; |
100 | 100 | |
101 | +DO $$ | |
102 | +DECLARE | |
103 | + r RECORD; | |
104 | +BEGIN | |
105 | + FOR r IN | |
106 | + SELECT lpad(sequencialano,9,'0') AS SEQUENCIALANO , ID as ID FROM cnt_ev_aditivo | |
107 | + LOOP | |
108 | + UPDATE cnt_ev_aditivo SET sequencialano = r.SEQUENCIALANO WHERE ID = r.ID; | |
109 | + END LOOP; | |
110 | +END$$; | |
111 | + | |
112 | +DO $$ | |
113 | +DECLARE | |
114 | + r RECORD; | |
115 | +BEGIN | |
116 | + FOR r IN | |
117 | + SELECT concat(substring(descricao, 0, 19),lpad(substring(descricao, 19, 4),5,'0'),substring(descricao, 23, length(descricao))) AS DESCRICAO, | |
118 | + ID as ID FROM cnt_cn_evento WHERE descricao like 'Aditivo%' | |
119 | + LOOP | |
120 | + UPDATE cnt_cn_evento SET descricao = r.DESCRICAO WHERE ID = r.ID; | |
121 | + END LOOP; | |
122 | +END$$; | |
123 | + | |
101 | 124 | -- ERICK FIM 31/03/2016 |
102 | 125 | ... | ... |
cit-contratos-web/src/main/resources/reports/eventoAditivo.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="encerramentoContrato" 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.9487171000000056"/> |
4 | 4 | <property name="ireport.x" value="0"/> |
5 | - <property name="ireport.y" value="869"/> | |
5 | + <property name="ireport.y" value="246"/> | |
6 | 6 | <style name="table"> |
7 | 7 | <box> |
8 | 8 | <pen lineWidth="1.0" lineColor="#000000"/> |
... | ... | @@ -280,8 +280,8 @@ $F{cnpjcontratado}.substring(12,14)]]></textFieldExpression> |
280 | 280 | <rightPen lineWidth="1.0"/> |
281 | 281 | </box> |
282 | 282 | <textElement textAlignment="Left" verticalAlignment="Middle"/> |
283 | - <textFieldExpression><![CDATA[$F{sequencialano}.substring(0,4) + "/" + | |
284 | -$F{sequencialano}.substring(4,8)]]></textFieldExpression> | |
283 | + <textFieldExpression><![CDATA[$F{sequencialano}.substring(0,5) + "/" + | |
284 | +$F{sequencialano}.substring(5,9)]]></textFieldExpression> | |
285 | 285 | </textField> |
286 | 286 | <staticText> |
287 | 287 | <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="205" height="25" backcolor="#CCCCCC" uuid="dacd172c-f3d1-4388-8ea4-d6adda659c51"/> | ... | ... |
cit-contratos-web/src/main/webapp/html/eventos/cnt_ev_aditivo.html
... | ... | @@ -56,7 +56,7 @@ |
56 | 56 | </div> |
57 | 57 | <div class="row"> |
58 | 58 | <div class="col-sm-4"> |
59 | - <label-input ng-type="text" ng-id="aditivo.registroSequencial.sequencialAno" ng-label="CONTRATOS.LABEL.NUM_ADITIVO" ng-mask="9999/9999" | |
59 | + <label-input ng-type="text" ng-id="aditivo.registroSequencial.sequencialAno" ng-label="CONTRATOS.LABEL.NUM_ADITIVO" ng-mask="99999/9999" | |
60 | 60 | ng-model="aditivo.registroSequencial.sequencialAno" ng-custom-maxlength="30" form="formDialogAditivo" ng-disabled="true" /> |
61 | 61 | </div> |
62 | 62 | <div class="col-sm-4"> | ... | ... |