Rev 353 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 353 | Rev 355 | ||
|---|---|---|---|
| Line 244... | Line 244... | ||
| 244 | public String getIntervalo() { |
244 | public String getIntervalo() { |
| 245 | if (VerificadorUtil.naoEstaNulo(getDataHoraIntervaloInicio()) && VerificadorUtil.naoEstaNulo(getDataHoraIntervaloFim())) { |
245 | if (VerificadorUtil.naoEstaNulo(getDataHoraIntervaloInicio()) && VerificadorUtil.naoEstaNulo(getDataHoraIntervaloFim())) { |
| 246 | return DataUtils.calcularDiferencaEntreDatasRetornandoHorasEeMinutos(getDataHoraIntervaloInicio(),getDataHoraIntervaloFim()); |
246 | return DataUtils.calcularDiferencaEntreDatasRetornandoHorasEeMinutos(getDataHoraIntervaloInicio(),getDataHoraIntervaloFim()); |
| 247 | }
|
247 | }
|
| 248 | return null; |
248 | return null; |
| - | 249 | }
|
|
| - | 250 | ||
| - | 251 | @Transient |
|
| - | 252 | public String getPeriodoTrabalhado() { |
|
| - | 253 | StringBuilder periodoTrabalhado = new StringBuilder(""); |
|
| - | 254 | if (VerificadorUtil.naoEstaNulo(getDataHoraPontoInicio())) { |
|
| - | 255 | periodoTrabalhado.append(DataUtils.converterDataParaStringNoFormato(getDataHoraPontoInicio(), "HH:mm:ss")); |
|
| - | 256 | }
|
|
| - | 257 | if (VerificadorUtil.naoEstaNulo(getDataHoraPontoFim())) { |
|
| - | 258 | periodoTrabalhado.append(" - "); |
|
| - | 259 | periodoTrabalhado.append(DataUtils.converterDataParaStringNoFormato(getDataHoraPontoFim(), "HH:mm:ss")); |
|
| - | 260 | }
|
|
| - | 261 | return periodoTrabalhado.toString(); |
|
| - | 262 | }
|
|
| - | 263 | ||
| - | 264 | @Transient |
|
| - | 265 | public String getPeriodoIntervaloTrabalhado() { |
|
| - | 266 | StringBuilder periodoTrabalhado = new StringBuilder(""); |
|
| - | 267 | if (VerificadorUtil.naoEstaNulo(getDataHoraIntervaloInicio())) { |
|
| - | 268 | periodoTrabalhado.append(DataUtils.converterDataParaStringNoFormato(getDataHoraIntervaloInicio(), "HH:mm:ss")); |
|
| - | 269 | }
|
|
| - | 270 | if (VerificadorUtil.naoEstaNulo(getDataHoraIntervaloFim())) { |
|
| - | 271 | periodoTrabalhado.append(" - "); |
|
| - | 272 | periodoTrabalhado.append(DataUtils.converterDataParaStringNoFormato(getDataHoraIntervaloFim(), "HH:mm:ss")); |
|
| - | 273 | }
|
|
| - | 274 | return periodoTrabalhado.toString(); |
|
| - | 275 | }
|
|
| - | 276 | ||
| - | 277 | @Transient |
|
| - | 278 | public String getInicioPonto() { |
|
| - | 279 | if (VerificadorUtil.naoEstaNulo(getDataHoraPontoInicio())) { |
|
| - | 280 | return DataUtils.converterDataParaStringNoFormato(getDataHoraPontoInicio(), "HH:mm"); |
|
| - | 281 | }
|
|
| - | 282 | return "-"; |
|
| - | 283 | }
|
|
| - | 284 | ||
| - | 285 | @Transient |
|
| - | 286 | public String getJustificativas() { |
|
| - | 287 | StringBuilder justificativas = new StringBuilder(""); |
|
| - | 288 | if (!getJustificativaPontoInicio().isEmpty()) { |
|
| - | 289 | justificativas.append(getJustificativaPontoInicio()); |
|
| - | 290 | }
|
|
| - | 291 | if (!getJustificativaPontoFim().isEmpty()) { |
|
| - | 292 | justificativas.append(" : "); |
|
| - | 293 | justificativas.append(getJustificativaPontoFim()); |
|
| - | 294 | }
|
|
| - | 295 | if (!getJustificativaIntervaloInicio().isEmpty()) { |
|
| - | 296 | justificativas.append(" : "); |
|
| - | 297 | justificativas.append(getJustificativaIntervaloInicio()); |
|
| - | 298 | }
|
|
| - | 299 | if (!getJustificativaIntervaloFim().isEmpty()) { |
|
| - | 300 | justificativas.append(" : "); |
|
| - | 301 | justificativas.append(getJustificativaIntervaloFim()); |
|
| - | 302 | }
|
|
| - | 303 | return justificativas.toString(); |
|
| 249 | }
|
304 | }
|
| 250 | 305 | ||
| 251 | @Transient |
306 | @Transient |
| 252 | public String getNomeDaPessoa() { |
307 | public String getNomeDaPessoa() { |
| 253 | return VerificadorUtil.naoEstaNulo(getPessoa())? getPessoa().getNome() : null; |
308 | return VerificadorUtil.naoEstaNulo(getPessoa())? getPessoa().getNome() : null; |