Rev 355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 355 | Rev 409 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | package br.com.ec.domain.dto; |
1 | package br.com.ec.domain.dto; |
| 2 | 2 | ||
| - | 3 | import java.util.ArrayList; |
|
| 3 | import java.util.Calendar; |
4 | import java.util.Calendar; |
| 4 | import java.util.Date; |
5 | import java.util.Date; |
| 5 | import java.util.GregorianCalendar; |
6 | import java.util.GregorianCalendar; |
| 6 | import java.util.List; |
7 | import java.util.List; |
| 7 | 8 | ||
| Line 21... | Line 22... | ||
| 21 | private String periodo; |
22 | private String periodo; |
| 22 | private String periodoIntervalo; |
23 | private String periodoIntervalo; |
| 23 | private String intervalo; |
24 | private String intervalo; |
| 24 | private String inicioPonto; |
25 | private String inicioPonto; |
| 25 | private String justificativas; |
26 | private String justificativas; |
| - | 27 | ||
| - | 28 | private List<FuncionarioEventoDTO> eventosDTO = new ArrayList<FuncionarioEventoDTO>(); |
|
| 26 | 29 | ||
| 27 | public FuncionarioEscalaDTO() {} |
30 | public FuncionarioEscalaDTO() {} |
| 28 | 31 | ||
| 29 | public FuncionarioEscalaDTO(Long sequencialFuncionario, Date dataEscala, String tipoOcorrenciaEscala) { |
32 | public FuncionarioEscalaDTO(Long sequencialFuncionario, Date dataEscala, String tipoOcorrenciaEscala) { |
| 30 | this.sequencialFuncionario = sequencialFuncionario; |
33 | this.sequencialFuncionario = sequencialFuncionario; |
| Line 106... | Line 109... | ||
| 106 | public String getJustificativas() { |
109 | public String getJustificativas() { |
| 107 | return justificativas; |
110 | return justificativas; |
| 108 | }
|
111 | }
|
| 109 | public void setJustificativas(String justificativas) { |
112 | public void setJustificativas(String justificativas) { |
| 110 | this.justificativas = justificativas; |
113 | this.justificativas = justificativas; |
| - | 114 | }
|
|
| - | 115 | ||
| - | 116 | public List<FuncionarioEventoDTO> getEventosDTO() { |
|
| - | 117 | return eventosDTO; |
|
| - | 118 | }
|
|
| - | 119 | public void setEventosDTO(List<FuncionarioEventoDTO> eventosDTO) { |
|
| - | 120 | this.eventosDTO = eventosDTO; |
|
| 111 | }
|
121 | }
|
| 112 | 122 | ||
| 113 | public String diaVigencia() { |
123 | public String diaVigencia() { |
| 114 | if (VerificadorUtil.naoEstaNulo(getDataEscala())) { |
124 | if (VerificadorUtil.naoEstaNulo(getDataEscala())) { |
| 115 | return DataUtils.converterDataParaStringNoFormato(getDataEscala(), "dd"); |
125 | return DataUtils.converterDataParaStringNoFormato(getDataEscala(), "dd"); |
| Line 159... | Line 169... | ||
| 159 | if (ponto.getPontoCompleto()) { |
169 | if (ponto.getPontoCompleto()) { |
| 160 | setTipoOcorrenciaEscala(TipoOcorrenciaEscala.PONTO_COMPLETO.getValor()); |
170 | setTipoOcorrenciaEscala(TipoOcorrenciaEscala.PONTO_COMPLETO.getValor()); |
| 161 | } else { |
171 | } else { |
| 162 | setTipoOcorrenciaEscala(TipoOcorrenciaEscala.PONTO_INCOMPLETO.getValor()); |
172 | setTipoOcorrenciaEscala(TipoOcorrenciaEscala.PONTO_INCOMPLETO.getValor()); |
| 163 | }
|
173 | }
|
| - | 174 | }
|
|
| - | 175 | }
|
|
| - | 176 | }
|
|
| - | 177 | ||
| - | 178 | public void atualizarDadosEventos(Date dataPonto, List<FuncionarioEventoDTO> eventos) { |
|
| - | 179 | for (FuncionarioEventoDTO eventoDTO : eventos) { |
|
| - | 180 | if (DataUtils.dataEstaIgualOuEntrePeriodos(dataPonto, eventoDTO.getDataInicial(), eventoDTO.getDataFinal())) { |
|
| - | 181 | getEventosDTO().add(eventoDTO); |
|
| 164 | }
|
182 | }
|
| 165 | }
|
183 | }
|
| 166 | }
|
184 | }
|
| 167 | 185 | ||
| 168 | }
|
186 | }
|