Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 279 | espaco | 1 | package br.com.ec.domain.dto; |
| 2 | |||
| 3 | import java.util.Date; |
||
| 4 | |||
| 5 | import br.com.ec.core.util.DataUtils; |
||
| 6 | import br.com.ec.core.util.VerificadorUtil; |
||
| 7 | |||
| 8 | public class PontoDTO { |
||
| 9 | |||
| 10 | private Long sequencial; |
||
| 11 | private LojaDTO lojaDTO; |
||
| 12 | private PessoaDTO pessoaDTO; |
||
| 13 | private Date dataPonto; |
||
| 14 | |||
| 15 | private Date dataHoraPontoInicio; |
||
| 16 | private String justificativaPontoInicio; |
||
| 17 | |||
| 18 | private Date dataHoraPontoFim; |
||
| 19 | private String justificativaPontoFim; |
||
| 20 | |||
| 21 | private Date dataHoraIntervaloInicio; |
||
| 22 | private String justificativaIntervaloInicio; |
||
| 23 | |||
| 24 | private Date dataHoraIntervaloFim; |
||
| 25 | private String justificativaIntervaloFim; |
||
| 26 | |||
| 27 | private String observacao; |
||
| 28 | private String tipoSituacao; |
||
| 29 | private Boolean indicadorAtivo = true; |
||
| 30 | |||
| 31 | public PontoDTO() {} |
||
| 32 | |||
| 33 | public Long getSequencial() { |
||
| 34 | return sequencial; |
||
| 35 | } |
||
| 36 | |||
| 37 | public void setSequencial(Long sequencial) { |
||
| 38 | this.sequencial = sequencial; |
||
| 39 | } |
||
| 40 | |||
| 41 | public LojaDTO getLojaDTO() { |
||
| 42 | return lojaDTO; |
||
| 43 | } |
||
| 44 | |||
| 45 | public void setLojaDTO(LojaDTO lojaDTO) { |
||
| 46 | this.lojaDTO = lojaDTO; |
||
| 47 | } |
||
| 48 | |||
| 49 | public PessoaDTO getPessoaDTO() { |
||
| 50 | return pessoaDTO; |
||
| 51 | } |
||
| 52 | |||
| 53 | public void setPessoaDTO(PessoaDTO pessoaDTO) { |
||
| 54 | this.pessoaDTO = pessoaDTO; |
||
| 55 | } |
||
| 56 | |||
| 57 | public Date getDataPonto() { |
||
| 58 | return dataPonto; |
||
| 59 | } |
||
| 60 | |||
| 61 | public void setDataPonto(Date dataPonto) { |
||
| 62 | this.dataPonto = dataPonto; |
||
| 63 | } |
||
| 64 | |||
| 65 | public Date getDataHoraPontoInicio() { |
||
| 66 | return dataHoraPontoInicio; |
||
| 67 | } |
||
| 68 | |||
| 69 | public void setDataHoraPontoInicio(Date dataHoraPontoInicio) { |
||
| 70 | this.dataHoraPontoInicio = dataHoraPontoInicio; |
||
| 71 | } |
||
| 72 | |||
| 73 | public String getJustificativaPontoInicio() { |
||
| 74 | return justificativaPontoInicio; |
||
| 75 | } |
||
| 76 | |||
| 77 | public void setJustificativaPontoInicio(String justificativaPontoInicio) { |
||
| 78 | this.justificativaPontoInicio = justificativaPontoInicio; |
||
| 79 | } |
||
| 80 | |||
| 81 | public Date getDataHoraPontoFim() { |
||
| 82 | return dataHoraPontoFim; |
||
| 83 | } |
||
| 84 | |||
| 85 | public void setDataHoraPontoFim(Date dataHoraPontoFim) { |
||
| 86 | this.dataHoraPontoFim = dataHoraPontoFim; |
||
| 87 | } |
||
| 88 | |||
| 89 | public String getJustificativaPontoFim() { |
||
| 90 | return justificativaPontoFim; |
||
| 91 | } |
||
| 92 | |||
| 93 | public void setJustificativaPontoFim(String justificativaPontoFim) { |
||
| 94 | this.justificativaPontoFim = justificativaPontoFim; |
||
| 95 | } |
||
| 96 | |||
| 97 | public Date getDataHoraIntervaloInicio() { |
||
| 98 | return dataHoraIntervaloInicio; |
||
| 99 | } |
||
| 100 | |||
| 101 | public void setDataHoraIntervaloInicio(Date dataHoraIntervaloInicio) { |
||
| 102 | this.dataHoraIntervaloInicio = dataHoraIntervaloInicio; |
||
| 103 | } |
||
| 104 | |||
| 105 | public String getJustificativaIntervaloInicio() { |
||
| 106 | return justificativaIntervaloInicio; |
||
| 107 | } |
||
| 108 | |||
| 109 | public void setJustificativaIntervaloInicio(String justificativaIntervaloInicio) { |
||
| 110 | this.justificativaIntervaloInicio = justificativaIntervaloInicio; |
||
| 111 | } |
||
| 112 | |||
| 113 | public Date getDataHoraIntervaloFim() { |
||
| 114 | return dataHoraIntervaloFim; |
||
| 115 | } |
||
| 116 | |||
| 117 | public void setDataHoraIntervaloFim(Date dataHoraIntervaloFim) { |
||
| 118 | this.dataHoraIntervaloFim = dataHoraIntervaloFim; |
||
| 119 | } |
||
| 120 | |||
| 121 | public String getJustificativaIntervaloFim() { |
||
| 122 | return justificativaIntervaloFim; |
||
| 123 | } |
||
| 124 | |||
| 125 | public void setJustificativaIntervaloFim(String justificativaIntervaloFim) { |
||
| 126 | this.justificativaIntervaloFim = justificativaIntervaloFim; |
||
| 127 | } |
||
| 128 | |||
| 129 | public String getObservacao() { |
||
| 130 | return observacao; |
||
| 131 | } |
||
| 132 | |||
| 133 | public void setObservacao(String observacao) { |
||
| 134 | this.observacao = observacao; |
||
| 135 | } |
||
| 136 | |||
| 137 | public String getTipoSituacao() { |
||
| 138 | return tipoSituacao; |
||
| 139 | } |
||
| 140 | |||
| 141 | public void setTipoSituacao(String tipoSituacao) { |
||
| 142 | this.tipoSituacao = tipoSituacao; |
||
| 143 | } |
||
| 144 | |||
| 145 | public Boolean getIndicadorAtivo() { |
||
| 146 | return indicadorAtivo; |
||
| 147 | } |
||
| 148 | |||
| 149 | public void setIndicadorAtivo(Boolean indicadorAtivo) { |
||
| 150 | this.indicadorAtivo = indicadorAtivo; |
||
| 151 | } |
||
| 152 | |||
| 153 | public Long getSequencialDaLoja() { |
||
| 154 | return VerificadorUtil.naoEstaNulo(getLojaDTO())? getLojaDTO().getSequencial() : null; |
||
| 155 | } |
||
| 156 | |||
| 157 | public String getDescricaoDaLoja() { |
||
| 158 | return VerificadorUtil.naoEstaNulo(getLojaDTO())? getLojaDTO().getDescricao() : null; |
||
| 159 | } |
||
| 160 | |||
| 161 | public Boolean getPontoCompleto() { |
||
| 162 | return VerificadorUtil.naoEstaNulo(getDataHoraPontoInicio()) && |
||
| 163 | VerificadorUtil.naoEstaNulo(getDataHoraPontoFim()) && |
||
| 164 | VerificadorUtil.naoEstaNulo(getDataHoraIntervaloInicio()) && |
||
| 165 | VerificadorUtil.naoEstaNulo(getDataHoraIntervaloFim()); |
||
| 166 | } |
||
| 167 | |||
| 168 | public String getHorasTrabalhadas() { |
||
| 169 | if (VerificadorUtil.naoEstaNulo(getDataHoraPontoInicio()) && VerificadorUtil.naoEstaNulo(getDataHoraPontoFim())) { |
||
| 170 | return DataUtils.calcularDiferencaEntreDatasRetornandoHorasEeMinutos(getDataHoraPontoInicio(),getDataHoraPontoFim()); |
||
| 171 | } |
||
| 172 | return null; |
||
| 173 | } |
||
| 174 | |||
| 175 | public String getIntervalo() { |
||
| 176 | if (VerificadorUtil.naoEstaNulo(getDataHoraIntervaloInicio()) && VerificadorUtil.naoEstaNulo(getDataHoraIntervaloFim())) { |
||
| 177 | return DataUtils.calcularDiferencaEntreDatasRetornandoHorasEeMinutos(getDataHoraIntervaloInicio(),getDataHoraIntervaloFim()); |
||
| 178 | } |
||
| 179 | return null; |
||
| 180 | } |
||
| 181 | |||
| 182 | } |