Commit b4ca4403acac4e59a1dcb36499e51eb3664089d0

Authored by erick.sato
1 parent ad443276
Exists in master

[Redmine #4109]Label

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.text.SimpleDateFormat;
3 4 import java.util.Collection;
  5 +import java.util.Date;
4 6  
5 7 import org.apache.commons.collections.CollectionUtils;
  8 +import org.apache.commons.lang3.StringUtils;
6 9 import org.apache.log4j.Logger;
7 10 import org.springframework.beans.factory.annotation.Autowired;
8 11 import org.springframework.beans.factory.annotation.Qualifier;
... ... @@ -93,9 +96,13 @@ public class EventoPenalidadeServiceImpl extends GenericServiceImpl<EventoPenali
93 96 penalidadeRegistroOcorrencia.setEventoPenalidade(eventoPenalidade);
94 97 }
95 98  
96   - String descricao = internacionalizacaoService.getTranslate("CONTRATOS.MSG.DESCRICAO_EVENTO_APLICAR_PENALIDADE", this.getIdioma());
97   - descricao = descricao.concat(eventoPenalidade.getTermoReferenciaPenalidade().getOcorrencia());
98   - eventoPenalidade.setDescricao(descricao);
  99 + String descricao = this.internacionalizacaoService.getTranslate("CONTRATOS.MSG.DESCRICAO_EVENTO_APLICAR_PENALIDADE_DATA", this.getIdioma());
  100 + if(StringUtils.isNotEmpty(descricao)){
  101 + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
  102 + String date = sdf.format(new Date());
  103 + eventoPenalidade.setDescricao(String.format(descricao, date));
  104 + }
  105 +
99 106 eventoPenalidade.setDataEvento(eventoPenalidade.getDataPenalizacao());
100 107 eventoPenalidade.setTipoEvento(this.dominioService.findByChaveAndCodigo(DominioContrato.TIPO_EVENTO_CONTRATO, DominioContrato.TIPO_EVENTO_PENALIDADE));
101 108  
... ...
cit-contratos-web/src/main/java/br/com/centralit/listener/StartupListenerContratos.java
... ... @@ -518,7 +518,7 @@ public class StartupListenerContratos extends UtilStartup implements Application
518 518 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.PAPEIS_OBRIGATORIOS_CONTRATO_FALTANDO", "Estão faltando um ou mais papéis obrigatórios dos envolvidos no contrato. Verifique quais dentre os seguintes papéis não forma informados ", dominio, modulo));
519 519 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.FINALIDADE_EMPENHO_FALTANDO", "Não é permitido informar as finalidades 'Anulação' e 'Reforço' antes de informar a finalidade 'Despesa contrato'.", dominio, modulo));
520 520 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.VALOR_GARANTIA_ACIMA_LIMITE_MAXIMO", "O valor da garantia do contrato está acima do valor máximo. Valor máximo da garantia ", dominio, modulo));
521   - internacionalizacaoList.add(new Internacionalizacao("VALIDACAO.ALTERACAO_ENVOLVIDOS_EXIGE_JUSTIFICATIVA", "É obrigatório informar uma justificativa para alterar os envolvidos do contrato", dominio, modulo));
  521 + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.ALTERACAO_ENVOLVIDOS_EXIGE_JUSTIFICATIVA", "É obrigatório informar uma justificativa para alterar os envolvidos do contrato", dominio, modulo));
522 522 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.VALOR_LIBERADO_MAIOR_VALOR_CONTRATO", "Valor liberado não pode ser maior que o valor do contrato", dominio, modulo));
523 523 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.VALOR_LIBERADO_MAIOR_VALOR_OFBS", "O valor liberado para pagamento não pode ser maior que o valor liberado referente às ordem de fornecimento de bens e serviços", dominio, modulo));
524 524 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.VALIDACAO.VALOR_TOTAL_CONTRATO_JA_LIBERADO", "Já liberado o pagamento no valor do contrato.", dominio, modulo));
... ... @@ -953,6 +953,7 @@ public class StartupListenerContratos extends UtilStartup implements Application
953 953 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.OCORRENCIA_PENALIDADE", "Ocorrência da penalidade", dominio, modulo));
954 954 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.RESPOSTA_CONTRATADA", "Resposta da contratada", dominio, modulo));
955 955 internacionalizacaoList.add(new Internacionalizacao("MSG.DESCRICAO_EVENTO_APLICAR_PENALIDADE", "Aplicação de penalidade para a ocorrência da penalidade: ", dominio, modulo));
  956 + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.MSG.DESCRICAO_EVENTO_APLICAR_PENALIDADE_DATA", "Penalidade gerada em ", dominio, modulo));
956 957  
957 958 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.NOTA_EMPENHO", "Nota de empenho", dominio, modulo));
958 959 internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.JUSTIFICATIVA_EMPENHO", "Justificativa do empenho", dominio, modulo));
... ... @@ -1115,6 +1116,7 @@ public class StartupListenerContratos extends UtilStartup implements Application
1115 1116 internacionalizacaoList.add(new Internacionalizacao("LABEL.VALOR_TOTAL_CONTRATO", "Valor total do contrato", dominio, modulo));
1116 1117 internacionalizacaoList.add(new Internacionalizacao("LABEL.POSSIVEL_RESPOSTA", "Possível resposta", dominio, modulo));
1117 1118 internacionalizacaoList.add(new Internacionalizacao("LABEL.VIGENCIA", "Vigência", dominio, modulo));
  1119 + internacionalizacaoList.add(new Internacionalizacao("LABEL.ANEXOS", "Anexos", dominio, modulo));
1118 1120 internacionalizacaoList.add(new Internacionalizacao("LABEL.ANEXOS_OBSERVACOES", "Anexos e observações", dominio, modulo));
1119 1121 internacionalizacaoList.add(new Internacionalizacao("LABEL.ATUALIZAR_STATUS", "Atualizar Status", dominio, modulo));
1120 1122 internacionalizacaoList.add(new Internacionalizacao("LABEL.BENEFICIOS_ESPERADOS", "Benefícios Esperados", dominio, modulo));
... ...
cit-contratos-web/src/main/resources/reports/registroOcorrencia.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="registroOcorrencia" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="e3539b84-00a7-49ab-94ac-e56c384a5198">
3 3 <property name="ireport.zoom" value="1.4641000000000013"/>
4 4 <property name="ireport.x" value="0"/>
5   - <property name="ireport.y" value="332"/>
  5 + <property name="ireport.y" value="306"/>
6 6 <property name="com.jaspersoft.studio.data.sql.tables" value="cGFyY2Vpcm9fY29sYWJvcmFkb3IgLDE1LDExODMsZTFiNzExOWItN2ZhZi00NDA4LTk2MzgtOTI5&#xA;ZTJmMjIzMjVmO3BhcmNlaXJvIEFTICwyMjcsMTUsOWViMzc4NzgtMTY4Yy00ODg4LWI2YzktZDBm&#xA;OTJmYmZlMjVlO2N0cnRfZW52b2x2aWRvICw1ODcsMTYxMywxM2NlMDk4Yi1jNmVmLTQ0M2YtOGIy&#xA;Yi0yMmRhNWZmZjMzNWE7Y3RydF9jb250cmF0byBBUyAsODM1LDU2MyxjNjM1NzE0YS0yMDhiLTQ1&#xA;NDUtOGYzMC04YWY4ZGRkYzg4Njk7Zm9ybmVjZWRvciBBUyAsMTI0MCw0NTcsNDNkM2RlMTQtMjdm&#xA;MS00ODMwLWI2ZTQtZmIxZjYxZTlhNmY3O3Blc3NvYSAsMjI3LDEyODksZWEyZGMzNzEtZDI4Yi00&#xA;YWJlLWIwMGYtMjc1MjRjNmQyMzM5O3JvX3JlZ2lzdHJvb2NvcnJlbmNpYSBBUyAsNTg3LDEyMSwx&#xA;YWMxZjE4NS05ZjU4LTQ2NzItODQxMC04ZmMyMDQyMTVjZDQ7cGVzc29hanVyaWRpY2EgQVMgLDM5&#xA;NCwxMjEsMzE2NzVmY2QtOGY1Yi00YjI0LWE4MzAtOWY0Y2U3ZTAyZDM5O3BhcmNlaXJvICwzOTQs&#xA;ODAyLGQxYzQ0MWQ1LWQ4OTItNDAyMS1iMWE4LWU1NGE3NWQzNWVlNTtwYXJjZWlyb19jb2xhYm9y&#xA;YWRvciAsMTUsNjk2LGIwNTZkMjkxLTE5NzktNGZhYi04OGZlLTI2NzM5NTEwODRmYTtvZl9vcmRl&#xA;bWZvcm5lY2ltZW50byBBUyAsODM1LDEyMSwzYjFkZjkzOS1jYWQ2LTQyOTktOTM0OS1mZDVhYzlk&#xA;Yzg2OWI7Y3RydF9lbnZvbHZpZG8gLDU4Nyw2ODMsNjUxOTBkOGEtMWQ2Yi00YmQ2LTk3ZWQtZjU1&#xA;OGMxNDM0MWQ5O3BhcmNlaXJvICwzOTQsMTI4OSxjNDBlNWNiNS02MzA2LTQ5MGMtYjVkZC00OGJj&#xA;YmE2NjFiMzE7cGFyY2Vpcm9fY29sYWJvcmFkb3IgLDE1LDIxMzYsM2UyZGMxN2ItM2MyZC00MWJl&#xA;LWI1YTctNmEyZmEyNGRlNWZjO3Blc3NvYSAsMjI3LDgwMiwxOGU4YWQwZi01YTMxLTQxNjItOTFl&#xA;OC1kMDA5YThmNDI3NDA7cGVzc29hICwyMjcsMTc1NSxjMGQ0YWZkOS05MWQ5LTRiNjEtOTNhOC1k&#xA;MWViZDk3ZTIzZDg7ZG9taW5pbyBBUyAsMTA5MywzMjEsYjdlZjlmOGQtMzMyNy00MmRkLTg2OWUt&#xA;ZjI4MmU3NDI2YTA5O2N0cnRfZW52b2x2aWRvICw1ODcsMTA4MCxhZDU1NDNmZi0xYWRiLTQ5Yjkt&#xA;OGY2OC0wMDQxZDZkYTgzNDM7cGFyY2Vpcm8gLDM5NCwxNzI4LDZmODgwNjI0LTc5MWItNDgzNi05&#xA;NmUzLTkyNWM0YzdjMTc3NDs="/>
7 7 <property name="com.jaspersoft.studio.data.defaultdataadapter" value="citgrpdb"/>
8 8 <parameter name="registroOcorrenciaId" class="java.lang.Long">
... ... @@ -192,7 +192,7 @@ WHERE
192 192 <text><![CDATA[Término da vigência]]></text>
193 193 </staticText>
194 194 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
195   - <reportElement x="175" y="160" width="375" height="25" uuid="12ab56e1-ded2-4151-ae15-f7011f37db72">
  195 + <reportElement x="175" y="160" width="375" height="25" isRemoveLineWhenBlank="true" uuid="12ab56e1-ded2-4151-ae15-f7011f37db72">
196 196 <printWhenExpression><![CDATA[$F{numordemfornecimento} != null]]></printWhenExpression>
197 197 </reportElement>
198 198 <box leftPadding="5" rightPadding="3">
... ... @@ -206,7 +206,7 @@ WHERE
206 206 <textFieldExpression><![CDATA[$F{numordemfornecimento}]]></textFieldExpression>
207 207 </textField>
208 208 <staticText>
209   - <reportElement mode="Opaque" x="15" y="160" width="160" height="25" backcolor="#CCCCCC" uuid="4e56ee20-3278-47bb-a437-ad5fc743449a">
  209 + <reportElement mode="Opaque" x="15" y="160" width="160" height="25" isRemoveLineWhenBlank="true" backcolor="#CCCCCC" uuid="4e56ee20-3278-47bb-a437-ad5fc743449a">
210 210 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
211 211 <printWhenExpression><![CDATA[$F{numordemfornecimento} != null]]></printWhenExpression>
212 212 </reportElement>
... ... @@ -545,7 +545,7 @@ WHERE
545 545 </textField>
546 546 </frame>
547 547 </band>
548   - <band height="215">
  548 + <band height="164" splitType="Prevent">
549 549 <textField pattern="dd/MM/yyyy">
550 550 <reportElement x="480" y="10" width="70" height="25" uuid="14ec1c5e-d522-4c1c-ab23-d9469ed04530"/>
551 551 <textElement textAlignment="Right" verticalAlignment="Bottom"/>
... ... @@ -557,7 +557,7 @@ WHERE
557 557 <text><![CDATA[____________________, ]]></text>
558 558 </staticText>
559 559 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
560   - <reportElement stretchType="RelativeToTallestObject" x="15" y="160" width="178" height="25" uuid="2b042a8e-b1b5-4249-97d6-1e54390b60d9">
  560 + <reportElement stretchType="RelativeToTallestObject" x="15" y="106" width="178" height="25" uuid="2b042a8e-b1b5-4249-97d6-1e54390b60d9">
561 561 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
562 562 </reportElement>
563 563 <box>
... ... @@ -571,7 +571,7 @@ WHERE
571 571 <textFieldExpression><![CDATA[$F{gestor}]]></textFieldExpression>
572 572 </textField>
573 573 <staticText>
574   - <reportElement mode="Opaque" x="15" y="135" width="178" height="25" backcolor="#C0C0C0" uuid="6d9d85fa-6a2d-4b77-8e77-a7ee6641f958">
  574 + <reportElement mode="Opaque" x="15" y="81" width="178" height="25" backcolor="#C0C0C0" uuid="6d9d85fa-6a2d-4b77-8e77-a7ee6641f958">
575 575 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
576 576 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
577 577 </reportElement>
... ... @@ -588,7 +588,7 @@ WHERE
588 588 <text><![CDATA[Gestor do Contrato]]></text>
589 589 </staticText>
590 590 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
591   - <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="15" y="185" width="178" height="25" uuid="95a94b85-25d9-4154-b415-cf46f5dcb112">
  591 + <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="15" y="131" width="178" height="25" uuid="95a94b85-25d9-4154-b415-cf46f5dcb112">
592 592 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
593 593 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
594 594 </reportElement>
... ... @@ -603,7 +603,7 @@ WHERE
603 603 <textFieldExpression><![CDATA[$F{gestormatricula}]]></textFieldExpression>
604 604 </textField>
605 605 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
606   - <reportElement stretchType="RelativeToTallestObject" x="193" y="160" width="178" height="25" uuid="11320692-2ec4-4f0c-a14c-b21b1a549d4b">
  606 + <reportElement stretchType="RelativeToTallestObject" x="193" y="106" width="178" height="25" uuid="11320692-2ec4-4f0c-a14c-b21b1a549d4b">
607 607 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
608 608 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
609 609 </reportElement>
... ... @@ -618,7 +618,7 @@ WHERE
618 618 <textFieldExpression><![CDATA[$F{fiscaltecnico}]]></textFieldExpression>
619 619 </textField>
620 620 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
621   - <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="193" y="185" width="178" height="25" uuid="4c90573f-fd0b-4da6-9367-d5a4a89a25f1">
  621 + <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="193" y="131" width="178" height="25" uuid="4c90573f-fd0b-4da6-9367-d5a4a89a25f1">
622 622 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
623 623 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
624 624 </reportElement>
... ... @@ -633,7 +633,7 @@ WHERE
633 633 <textFieldExpression><![CDATA[$F{fiscaltecnicomatricula}]]></textFieldExpression>
634 634 </textField>
635 635 <staticText>
636   - <reportElement mode="Opaque" x="193" y="135" width="178" height="25" backcolor="#C0C0C0" uuid="f5f4def3-c40a-4549-a26f-967fa8def378">
  636 + <reportElement mode="Opaque" x="193" y="81" width="178" height="25" backcolor="#C0C0C0" uuid="f5f4def3-c40a-4549-a26f-967fa8def378">
637 637 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
638 638 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
639 639 </reportElement>
... ... @@ -650,7 +650,7 @@ WHERE
650 650 <text><![CDATA[Fiscal do Contrato]]></text>
651 651 </staticText>
652 652 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
653   - <reportElement stretchType="RelativeToTallestObject" x="371" y="160" width="179" height="25" uuid="0ff9ad2c-7858-45fe-a014-7526365df018">
  653 + <reportElement stretchType="RelativeToTallestObject" x="371" y="106" width="179" height="25" uuid="0ff9ad2c-7858-45fe-a014-7526365df018">
654 654 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
655 655 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
656 656 </reportElement>
... ... @@ -665,7 +665,7 @@ WHERE
665 665 <textFieldExpression><![CDATA[$F{preposto}]]></textFieldExpression>
666 666 </textField>
667 667 <textField isStretchWithOverflow="true" isBlankWhenNull="true">
668   - <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="371" y="185" width="179" height="25" uuid="b5a91278-5d56-4396-8385-5654f09838d2">
  668 + <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="371" y="131" width="179" height="25" uuid="b5a91278-5d56-4396-8385-5654f09838d2">
669 669 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
670 670 </reportElement>
671 671 <box>
... ... @@ -679,7 +679,7 @@ WHERE
679 679 <textFieldExpression><![CDATA[$F{prepostomatricula}]]></textFieldExpression>
680 680 </textField>
681 681 <staticText>
682   - <reportElement mode="Opaque" x="371" y="135" width="179" height="25" backcolor="#C0C0C0" uuid="d9b8b663-80a0-4a7a-b334-096f97320f29">
  682 + <reportElement mode="Opaque" x="371" y="81" width="179" height="25" backcolor="#C0C0C0" uuid="d9b8b663-80a0-4a7a-b334-096f97320f29">
683 683 <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
684 684 <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
685 685 </reportElement>
... ...
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/VisaoContratoController.js
... ... @@ -106,6 +106,7 @@ citApp.controller(&#39;VisaoContratoController&#39;, [&#39;$scope&#39;,
106 106 });
107 107 break;
108 108 case 'EMPENHO':
  109 + $scope.valorResidual = $scope.valorTotalContratoAditivado - $scope.contratoEventos[0].contrato.totalEmpenhado;
109 110 $scope.$openModalController('cnt_ev_empenho.html', 'lg', 'EventoEmpenhoController');
110 111 break;
111 112 case 'NAO_CONFORMIDADE':
... ...
cit-contratos-web/src/main/webapp/html/contrato/contratoPg5.html
... ... @@ -69,7 +69,7 @@
69 69 <fieldset ng-if="(contrato.id && hasAlteracaoEnvolvido) || (contrato.id && contrato.justificativas.length > 0)">
70 70 <legend>
71 71 <label ng-class="{'has-error' : informacoesEnvolvidosContratoForm.$submitted && hasAlteracaoEnvolvido && (!contrato.justificativas || contrato.justificativas.length < 1)}">
72   - <translate>CONTRATOS.LABEL.JUSTIFICATIVAS</translate>
  72 + <translate>LABEL.JUSTIFICATIVAS</translate>
73 73 <span class='red' ng-show="true">*</span>
74 74 <i ng-show="informacoesEnvolvidosContratoForm.$submitted && hasAlteracaoEnvolvido && (!contrato.justificativas || contrato.justificativas.length < 1)" class='fa fa-warning red'
75 75 tooltip="{{$translate.instant('CONTRATOS.VALIDACAO.ALTERACAO_ENVOLVIDOS_EXIGE_JUSTIFICATIVA')}}" tooltip-placement='top'/>
... ...