Commit b95658534fa8dcbf7da06223429cba4fb4caa683
Exists in
master
Merge branch 'cnt-1.0.0-alfa11' of http://ferramentasgo.centralit.com.br:8080/sc…
…m/git/cit-grp-contratos into cnt-1.0.0-alfa11
Showing
2 changed files
with
11 additions
and
11 deletions
Show diff stats
cit-contratos-api/src/main/java/br/com/centralit/api/model/RegistroSequencial.java
... | ... | @@ -39,7 +39,7 @@ public class RegistroSequencial { |
39 | 39 | @Transient |
40 | 40 | @JsonView({ ViewsContrato.EventoPenalidadeEditView.class, Views.GenericView.class }) |
41 | 41 | private String sequencialAnoFormatado; |
42 | - | |
42 | + | |
43 | 43 | public RegistroSequencial() {}; |
44 | 44 | |
45 | 45 | public RegistroSequencial( Long numeroSequencial, String sequencialAno ) { |
... | ... | @@ -70,12 +70,12 @@ public class RegistroSequencial { |
70 | 70 | |
71 | 71 | public String getSequencialAnoFormatado() { |
72 | 72 | if (StringUtils.isNotEmpty(sequencialAno)) { |
73 | - sequencialAnoFormatado = StringUtils.leftPad(sequencialAno, 7, '0'); | |
74 | - sequencialAnoFormatado = sequencialAnoFormatado.substring(0, 3).concat("/").concat(sequencialAnoFormatado.substring(3)); | |
73 | + sequencialAnoFormatado = StringUtils.leftPad(sequencialAno, 9, '0'); | |
74 | + sequencialAnoFormatado = sequencialAnoFormatado.substring(0, 5).concat("/").concat(sequencialAnoFormatado.substring(5)); | |
75 | 75 | } |
76 | 76 | return sequencialAnoFormatado; |
77 | 77 | } |
78 | - | |
78 | + | |
79 | 79 | public void setSequencialAnoFormatado(String sequencialAnoFormatado) { |
80 | 80 | this.sequencialAnoFormatado = sequencialAnoFormatado; |
81 | 81 | } | ... | ... |
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EventoPenalidadeController.js
... | ... | @@ -49,23 +49,23 @@ citApp.controller('EventoPenalidadeController', ['$scope', '$filter', '$timeout' |
49 | 49 | RegistroOcorrenciaRepository.findAllOcorrenciasPorContrato($scope.contrato.id).then(function(result) { |
50 | 50 | $timeout(function (){ |
51 | 51 | $scope.listaOcorrenciasFixa = result; |
52 | - | |
53 | - removerOcorrenciasExistentes(); | |
54 | - | |
55 | 52 | $scope.listaOcorrencias = angular.copy($scope.listaOcorrenciasFixa); |
53 | + | |
54 | + removerOcorrenciasExistentes(); | |
55 | + | |
56 | 56 | }); |
57 | 57 | }); |
58 | 58 | |
59 | 59 | function removerOcorrenciasExistentes() { |
60 | 60 | for(var i = $scope.eventoPenalidade.ocorrencias.length - 1; i >= 0; i--) { |
61 | - for (var j = $scope.listaOcorrenciasFixa.length -1; j >= 0; j--) { | |
62 | - if ($scope.listaOcorrenciasFixa[j].id === $scope.eventoPenalidade.ocorrencias[i].registroOcorrencia.id) { | |
63 | - $scope.listaOcorrenciasFixa.splice(j, 1); | |
61 | + for (var j = $scope.listaOcorrencias.length -1; j >= 0; j--) { | |
62 | + if ($scope.listaOcorrencias[j].id === $scope.eventoPenalidade.ocorrencias[i].registroOcorrencia.id) { | |
63 | + $scope.listaOcorrencias.splice(j, 1); | |
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
67 | 67 | }; |
68 | - | |
68 | + | |
69 | 69 | $scope.addRegistroOcorrencia = function(){ |
70 | 70 | |
71 | 71 | if($scope.eventoPenalidade.registroOcorrencia){ | ... | ... |