|
|
@@ -16,11 +16,6 @@ import java.util.Optional;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-import com.punchsettle.server.constant.PunchInStatusEnum;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInDataQuery;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInDataResult;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInCalendarDataResult;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInRecordDataResult;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -35,12 +30,19 @@ import com.punchsettle.server.common.exception.BusinessException;
|
|
|
import com.punchsettle.server.common.utils.Assert;
|
|
|
import com.punchsettle.server.constant.PunchInCategoryEnum;
|
|
|
import com.punchsettle.server.constant.PunchInSettleTypeEnum;
|
|
|
+import com.punchsettle.server.constant.PunchInStatusEnum;
|
|
|
import com.punchsettle.server.constant.PunchInStatusViewEnum;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInDto;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInQuery;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInRecordDto;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInRecordQuery;
|
|
|
-import com.punchsettle.server.dto.punchin.PunchInWithRecordDto;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInCalendarDataVO;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInDataQuery;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInDataVO;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInQuery;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInRecordDataVO;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInRecordQuery;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInRecordRequest;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInRecordVO;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInRequest;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInVO;
|
|
|
+import com.punchsettle.server.pojo.punchin.PunchInWithRecordVO;
|
|
|
import com.punchsettle.server.service.manager.IPunchInManager;
|
|
|
import com.punchsettle.server.service.manager.ISettleManager;
|
|
|
import com.punchsettle.server.utiis.DateUtils;
|
|
|
@@ -73,7 +75,7 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
private static final BigDecimal ONE_HUNDRED = new BigDecimal(100);
|
|
|
|
|
|
@Override
|
|
|
- public List<PunchInWithRecordDto> queryPunchInAndRecord() {
|
|
|
+ public List<PunchInWithRecordVO> queryPunchInAndRecord() {
|
|
|
// 获取当前用户ID
|
|
|
Long currentUserId = Optional.ofNullable(UserUtils.getCurrentUserId())
|
|
|
.orElseThrow(() -> BusinessException.fail("无法获取当前用户信息,无法查询打卡任务"));
|
|
|
@@ -93,43 +95,43 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
// 获取打卡任务ID
|
|
|
List<Long> punchInIds = punchIns.stream().map(PunchIn::getId).collect(Collectors.toList());
|
|
|
// 找出范围内的打卡记录
|
|
|
- PunchInRecordQuery query = new PunchInRecordQuery();
|
|
|
- query.setPunchInIds(punchInIds);
|
|
|
- query.setStartDate(weeklyDateRange.getFirst().toString());
|
|
|
- query.setEndDate(weeklyDateRange.getLast().toString());
|
|
|
- List<PunchInRecord> punchInRecords = punchInRecordService.listByCondition(query);
|
|
|
+ PunchInRecordQuery punchInRecordQuery = new PunchInRecordQuery();
|
|
|
+ punchInRecordQuery.setPunchInIds(punchInIds);
|
|
|
+ punchInRecordQuery.setStartDate(weeklyDateRange.getFirst().toString());
|
|
|
+ punchInRecordQuery.setEndDate(weeklyDateRange.getLast().toString());
|
|
|
+ List<PunchInRecord> punchInRecords = punchInRecordService.listByCondition(punchInRecordQuery);
|
|
|
|
|
|
// 打卡任务-打卡记录 分组
|
|
|
Map<Long, List<PunchInRecord>> recordMap =
|
|
|
punchInRecords.stream().collect(Collectors.groupingBy(PunchInRecord::getPunchInId));
|
|
|
|
|
|
// 日期格式化
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ SimpleDateFormat sdf = DateUtils.buildDateFormat();
|
|
|
|
|
|
// 当前日期
|
|
|
LocalDate today = LocalDate.now();
|
|
|
|
|
|
// 构建打卡记录
|
|
|
- List<PunchInWithRecordDto> punchInWithRecordDtos = new ArrayList<>();
|
|
|
+ List<PunchInWithRecordVO> punchInWithRecordVOS = new ArrayList<>();
|
|
|
for (PunchIn punchIn : punchIns) {
|
|
|
// 一周的打卡记录容器
|
|
|
- List<PunchInRecordDto> weeklyRecords = new ArrayList<>();
|
|
|
+ List<PunchInRecordVO> weeklyRecords = new ArrayList<>();
|
|
|
// 打卡任务信息
|
|
|
- PunchInWithRecordDto punchInWithRecordDto = new PunchInWithRecordDto();
|
|
|
- BeanUtils.copyProperties(punchIn, punchInWithRecordDto);
|
|
|
- punchInWithRecordDto.setPunchInId(punchIn.getId());
|
|
|
+ PunchInWithRecordVO punchInWithRecordVO = new PunchInWithRecordVO();
|
|
|
+ BeanUtils.copyProperties(punchIn, punchInWithRecordVO);
|
|
|
+ punchInWithRecordVO.setPunchInId(punchIn.getId());
|
|
|
// 设置一个默认的页面显示值
|
|
|
- punchInWithRecordDto.setTimeTrack(LocalTime.parse("00:00:00.000"));
|
|
|
- punchInWithRecordDto.setCountTrack(0);
|
|
|
- punchInWithRecordDto.setPunchInRecords(weeklyRecords);
|
|
|
- punchInWithRecordDtos.add(punchInWithRecordDto);
|
|
|
+ punchInWithRecordVO.setTimeTrack(LocalTime.parse("00:00:00.000"));
|
|
|
+ punchInWithRecordVO.setCountTrack(0);
|
|
|
+ punchInWithRecordVO.setPunchInRecords(weeklyRecords);
|
|
|
+ punchInWithRecordVOS.add(punchInWithRecordVO);
|
|
|
|
|
|
// 打卡任务创建日期
|
|
|
LocalDate punchInCreationDate = LocalDate.parse(sdf.format(punchIn.getCreationTime()));
|
|
|
|
|
|
// 获取打卡任务对应的打卡记录,并转为打卡日期-打卡记录map
|
|
|
List<PunchInRecord> records =
|
|
|
- Optional.ofNullable(recordMap.get(punchInWithRecordDto.getPunchInId())).orElse(List.of());
|
|
|
+ Optional.ofNullable(recordMap.get(punchInWithRecordVO.getPunchInId())).orElse(List.of());
|
|
|
Map<String, PunchInRecord> weeklyRecordMap = records.stream()
|
|
|
.collect(Collectors.toMap(PunchInRecord::getPunchInDate, Function.identity(), (key1, key2) -> key1));
|
|
|
|
|
|
@@ -143,25 +145,25 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
PunchInStatusViewEnum punchInStatus = judgePunchInStatus(today, weeklyDate, punchInCreationDate, punchIn, punchInRecord);
|
|
|
|
|
|
// 设置打卡记录
|
|
|
- PunchInRecordDto punchInRecordDto = new PunchInRecordDto();
|
|
|
- punchInRecordDto.setPunchInDate(weeklyDateStr);
|
|
|
- punchInRecordDto.setPunchInStatus(punchInStatus);
|
|
|
- weeklyRecords.add(punchInRecordDto);
|
|
|
+ PunchInRecordVO punchInRecordVO = new PunchInRecordVO();
|
|
|
+ punchInRecordVO.setPunchInDate(weeklyDateStr);
|
|
|
+ punchInRecordVO.setPunchInStatus(punchInStatus);
|
|
|
+ weeklyRecords.add(punchInRecordVO);
|
|
|
|
|
|
// 如果是今天的打卡记录,设置计数/计时属性
|
|
|
if (!Objects.isNull(punchInRecord) && today.isEqual(weeklyDate)) {
|
|
|
- punchInWithRecordDto.setTimeTrack(punchInRecord.getTimeTrack());
|
|
|
- punchInWithRecordDto.setCountTrack(punchInRecord.getCountTrack());
|
|
|
+ punchInWithRecordVO.setTimeTrack(punchInRecord.getTimeTrack());
|
|
|
+ punchInWithRecordVO.setCountTrack(punchInRecord.getCountTrack());
|
|
|
}
|
|
|
|
|
|
// 如果是今天设置状态控制页面显示
|
|
|
if (today.isEqual(weeklyDate)) {
|
|
|
- punchInWithRecordDto.setPunchInStatus(punchInStatus);
|
|
|
+ punchInWithRecordVO.setPunchInStatus(punchInStatus);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return punchInWithRecordDtos;
|
|
|
+ return punchInWithRecordVOS;
|
|
|
}
|
|
|
|
|
|
private PunchInStatusViewEnum judgePunchInStatus(LocalDate today, LocalDate weeklyDate, LocalDate punchInCreationDate, PunchIn punchIn, PunchInRecord punchInRecord) {
|
|
|
@@ -204,31 +206,31 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PunchInDto queryPunchInById(Long punchInId) {
|
|
|
+ public PunchInVO queryPunchInById(Long punchInId) {
|
|
|
Assert.isNullInBusiness(punchInId, "请传入待查询的任务ID");
|
|
|
return Optional.ofNullable(punchInService.getById(punchInId)).map(punchIn -> {
|
|
|
- PunchInDto dto = new PunchInDto();
|
|
|
- BeanUtils.copyProperties(punchIn, dto);
|
|
|
- return dto;
|
|
|
+ PunchInVO punchInVO = new PunchInVO();
|
|
|
+ BeanUtils.copyProperties(punchIn, punchInVO);
|
|
|
+ return punchInVO;
|
|
|
}).orElseThrow(() -> BusinessException.fail("无法查询到该打卡任务"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void saveOrUpdatePunchIn(PunchInDto dto) {
|
|
|
- Assert.isNullInBusiness(dto, "请传入任务信息");
|
|
|
+ public void saveOrUpdatePunchIn(PunchInRequest request) {
|
|
|
+ Assert.isNullInBusiness(request, "请传入任务信息");
|
|
|
|
|
|
- if (PunchInCategoryEnum.COUNT.equals(dto.getCategory())
|
|
|
- && (Objects.isNull(dto.getRule()) || Objects.isNull(dto.getCountTrack()))) {
|
|
|
+ if (PunchInCategoryEnum.COUNT.equals(request.getCategory())
|
|
|
+ && (Objects.isNull(request.getRule()) || Objects.isNull(request.getCountTrack()))) {
|
|
|
throw BusinessException.fail("打卡类型:计数,比较规则和次数不能为空");
|
|
|
}
|
|
|
|
|
|
- if (PunchInCategoryEnum.TIME.equals(dto.getCategory())
|
|
|
- && (Objects.isNull(dto.getRule()) || Objects.isNull(dto.getTimeTrack()))) {
|
|
|
+ if (PunchInCategoryEnum.TIME.equals(request.getCategory())
|
|
|
+ && (Objects.isNull(request.getRule()) || Objects.isNull(request.getTimeTrack()))) {
|
|
|
throw BusinessException.fail("打卡类型:计时,比较规则和时间不能为空");
|
|
|
}
|
|
|
|
|
|
PunchIn punchIn = new PunchIn();
|
|
|
- BeanUtils.copyProperties(dto, punchIn);
|
|
|
+ BeanUtils.copyProperties(request, punchIn);
|
|
|
punchIn.setArchiveFlag(false);
|
|
|
|
|
|
if (Objects.isNull(punchIn.getId())) {
|
|
|
@@ -246,14 +248,14 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void doPunchIn(PunchInDto punchInDto) {
|
|
|
- if (Objects.isNull(punchInDto) || Objects.isNull(punchInDto.getId())) {
|
|
|
+ public void doPunchIn(PunchInRequest request) {
|
|
|
+ if (Objects.isNull(request) || Objects.isNull(request.getId())) {
|
|
|
BusinessException.throwFail("请传入待打卡的任务");
|
|
|
}
|
|
|
|
|
|
- PunchIn punchIn = Optional.ofNullable(punchInService.getById(punchInDto.getId()))
|
|
|
+ PunchIn punchIn = Optional.ofNullable(punchInService.getById(request.getId()))
|
|
|
.orElseThrow(() -> BusinessException.fail("无法查询到该打卡任务"));
|
|
|
- if (PunchInCategoryEnum.TIME.equals(punchIn.getCategory()) && Objects.isNull(punchInDto.getTimeTrack())) {
|
|
|
+ if (PunchInCategoryEnum.TIME.equals(punchIn.getCategory()) && Objects.isNull(request.getTimeTrack())) {
|
|
|
BusinessException.throwFail("打卡类型:计时,请传入时间记录");
|
|
|
}
|
|
|
|
|
|
@@ -261,7 +263,7 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
LocalDate today = LocalDate.now();
|
|
|
PunchInRecordQuery punchInRecordQuery = new PunchInRecordQuery();
|
|
|
punchInRecordQuery.setPunchInDate(today.toString());
|
|
|
- punchInRecordQuery.setPunchInId(punchInDto.getId());
|
|
|
+ punchInRecordQuery.setPunchInId(request.getId());
|
|
|
PunchInRecord oldPunchInRecord = punchInRecordService.selectOneByCondition(punchInRecordQuery);
|
|
|
|
|
|
// 打卡类型:单次打卡,需要判断是否重复打卡
|
|
|
@@ -272,7 +274,7 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
// 获取或创建打卡记录
|
|
|
PunchInRecord punchInRecord = Optional.ofNullable(oldPunchInRecord).orElseGet(() -> {
|
|
|
PunchInRecord record = new PunchInRecord();
|
|
|
- record.setPunchInId(punchInDto.getId());
|
|
|
+ record.setPunchInId(request.getId());
|
|
|
record.setPunchInDate(LocalDate.now().toString());
|
|
|
return record;
|
|
|
});
|
|
|
@@ -284,7 +286,7 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
|
|
|
// 打卡类型:计时,需要记录最新打卡时长
|
|
|
if (PunchInCategoryEnum.TIME.equals(punchIn.getCategory())) {
|
|
|
- punchInRecord.setTimeTrack(punchInDto.getTimeTrack());
|
|
|
+ punchInRecord.setTimeTrack(request.getTimeTrack());
|
|
|
}
|
|
|
|
|
|
// 新增或更新
|
|
|
@@ -306,9 +308,9 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void remakePunchIn(PunchInRecordDto dto) {
|
|
|
+ public void remakePunchIn(PunchInRecordRequest request) {
|
|
|
// 待补卡的打卡日期
|
|
|
- LocalDate punchInDate = LocalDate.parse(dto.getPunchInDate());
|
|
|
+ LocalDate punchInDate = LocalDate.parse(request.getPunchInDate());
|
|
|
|
|
|
// 如果补打卡日期是今天,则不允许补卡
|
|
|
if (punchInDate.isEqual(LocalDate.now())) {
|
|
|
@@ -316,22 +318,22 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
}
|
|
|
|
|
|
// 获取打卡任务
|
|
|
- PunchIn punchIn = Optional.ofNullable(punchInService.getById(dto.getPunchInId())).orElseThrow(() -> BusinessException.fail("无法查询到该打卡任务"));
|
|
|
+ PunchIn punchIn = Optional.ofNullable(punchInService.getById(request.getPunchInId())).orElseThrow(() -> BusinessException.fail("无法查询到该打卡任务"));
|
|
|
// 补打卡的打卡日期不能早于打卡任务创建日期
|
|
|
if (punchInDate.isBefore(punchIn.getCreationTime().toLocalDateTime().toLocalDate())) {
|
|
|
BusinessException.throwFail("补打卡日期不能早于打卡任务创建日期");
|
|
|
}
|
|
|
|
|
|
- settleManager.settleHandler(PunchInSettleTypeEnum.REMAKE, punchInDate, Arrays.asList(UserUtils.getCurrentUserId()), Arrays.asList(dto.getPunchInId()));
|
|
|
+ settleManager.settleHandler(PunchInSettleTypeEnum.REMAKE, punchInDate, Arrays.asList(UserUtils.getCurrentUserId()), Arrays.asList(request.getPunchInId()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void revokePunchIn(PunchInDto dto) {
|
|
|
+ public void revokePunchIn(PunchInRecordRequest request) {
|
|
|
// 获取打卡任务
|
|
|
- PunchIn punchIn = Optional.ofNullable(punchInService.getById(dto.getId())).orElseThrow(() -> BusinessException.fail("无法查询到该打卡任务"));
|
|
|
+ PunchIn punchIn = Optional.ofNullable(punchInService.getById(request.getPunchInId())).orElseThrow(() -> BusinessException.fail("无法查询到该打卡任务"));
|
|
|
|
|
|
PunchInRecordQuery punchInRecordQuery = new PunchInRecordQuery();
|
|
|
- punchInRecordQuery.setPunchInId(dto.getId());
|
|
|
+ punchInRecordQuery.setPunchInId(request.getPunchInId());
|
|
|
punchInRecordQuery.setPunchInDate(LocalDate.now().toString());
|
|
|
PunchInRecord punchInRecord = punchInRecordService.selectOneByCondition(punchInRecordQuery);
|
|
|
if (Objects.isNull(punchInRecord)) {
|
|
|
@@ -357,10 +359,10 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PunchInDataResult queryPunchInData(PunchInDataQuery query) {
|
|
|
+ public PunchInDataVO queryPunchInData(PunchInDataQuery query) {
|
|
|
PunchIn punchIn = Optional.ofNullable(punchInService.getById(query.getId())).orElseThrow(() -> BusinessException.fail("找到指定的打卡任务"));
|
|
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ SimpleDateFormat sdf = DateUtils.buildDateFormat();
|
|
|
YearMonth yearMonth = YearMonth.of(query.getYear(), query.getMonth());
|
|
|
// 本月第一日
|
|
|
LocalDate firstOfMonth = yearMonth.atDay(1);
|
|
|
@@ -377,22 +379,22 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
List<PunchInRecord> punchInRecords = punchInRecordService.listByCondition(punchInRecordQuery);
|
|
|
|
|
|
// 构造数据,日历部分的数据只需要已打卡的数据
|
|
|
- List<PunchInCalendarDataResult> punchInCalendarDataResults = new ArrayList<>();
|
|
|
- List<PunchInRecordDataResult> punchInRecordDtoList = new ArrayList<>();
|
|
|
+ List<PunchInCalendarDataVO> punchInCalendarDataVOS = new ArrayList<>();
|
|
|
+ List<PunchInRecordDataVO> punchInRecordDtoList = new ArrayList<>();
|
|
|
for (PunchInRecord punchInRecord : punchInRecords) {
|
|
|
- PunchInRecordDataResult punchInRecordDto = new PunchInRecordDataResult();
|
|
|
- BeanUtils.copyProperties(punchInRecord, punchInRecordDto);
|
|
|
- punchInRecordDtoList.add(punchInRecordDto);
|
|
|
+ PunchInRecordDataVO punchInRecordDataVO = new PunchInRecordDataVO();
|
|
|
+ BeanUtils.copyProperties(punchInRecord, punchInRecordDataVO);
|
|
|
+ punchInRecordDtoList.add(punchInRecordDataVO);
|
|
|
|
|
|
if (PunchInStatusEnum.UN_FINISH.equals(punchInRecord.getPunchInStatus())
|
|
|
|| PunchInStatusEnum.DOING.equals(punchInRecord.getPunchInStatus())) {
|
|
|
continue;
|
|
|
}
|
|
|
- PunchInCalendarDataResult punchInCalendarDataResult = new PunchInCalendarDataResult();
|
|
|
- punchInCalendarDataResult.setPunchInDate(punchInRecord.getPunchInDate());
|
|
|
- punchInCalendarDataResult.setInfo("打卡");
|
|
|
- punchInCalendarDataResult.setDate(punchInRecord.getPunchInDate());
|
|
|
- punchInCalendarDataResults.add(punchInCalendarDataResult);
|
|
|
+ PunchInCalendarDataVO punchInCalendarDataVO = new PunchInCalendarDataVO();
|
|
|
+ punchInCalendarDataVO.setPunchInDate(punchInRecord.getPunchInDate());
|
|
|
+ punchInCalendarDataVO.setInfo("打卡");
|
|
|
+ punchInCalendarDataVO.setDate(punchInRecord.getPunchInDate());
|
|
|
+ punchInCalendarDataVOS.add(punchInCalendarDataVO);
|
|
|
}
|
|
|
|
|
|
// 计算全勤率
|
|
|
@@ -400,20 +402,20 @@ public class PunchInManagerImpl implements IPunchInManager {
|
|
|
// 要考虑任务刚创建的情况,任务较迟创建的话则使用任务创建时间
|
|
|
long dayLength = ChronoUnit.DAYS.between(firstOfMonth.isBefore(punchInCreationDate) ? punchInCreationDate : firstOfMonth, LocalDate.now());
|
|
|
if (dayLength != 0) {
|
|
|
- punchInRate = BigDecimal.valueOf(punchInCalendarDataResults.size())
|
|
|
+ punchInRate = BigDecimal.valueOf(punchInCalendarDataVOS.size())
|
|
|
.divide(BigDecimal.valueOf(dayLength), 4, RoundingMode.HALF_DOWN)
|
|
|
.multiply(ONE_HUNDRED);
|
|
|
}
|
|
|
|
|
|
// 构造返回结果
|
|
|
- PunchInDataResult punchInDataResult = new PunchInDataResult();
|
|
|
- punchInDataResult.setStartDate(sdf.format(punchIn.getCreationTime()));
|
|
|
- punchInDataResult.setEndDate(LocalDate.now().toString());
|
|
|
- punchInDataResult.setPunchInNum(punchInCalendarDataResults.size());
|
|
|
- punchInDataResult.setCalendarSelected(punchInCalendarDataResults);
|
|
|
- punchInDataResult.setPunchInRecords(punchInRecordDtoList);
|
|
|
- punchInDataResult.setPunchInRate(punchInRate);
|
|
|
-
|
|
|
- return punchInDataResult;
|
|
|
+ PunchInDataVO punchInDataVO = new PunchInDataVO();
|
|
|
+ punchInDataVO.setStartDate(sdf.format(punchIn.getCreationTime()));
|
|
|
+ punchInDataVO.setEndDate(LocalDate.now().toString());
|
|
|
+ punchInDataVO.setPunchInNum(punchInCalendarDataVOS.size());
|
|
|
+ punchInDataVO.setCalendarSelected(punchInCalendarDataVOS);
|
|
|
+ punchInDataVO.setPunchInRecords(punchInRecordDtoList);
|
|
|
+ punchInDataVO.setPunchInRate(punchInRate);
|
|
|
+
|
|
|
+ return punchInDataVO;
|
|
|
}
|
|
|
}
|