|
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.attendance.service.info;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
|
import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
|
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
|
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|
@@ -225,8 +226,9 @@ public class AttendanceInfoServiceImpl implements AttendanceInfoService {
|
|
|
public PageResult<AttendanceDailyInfoRespVO> getDailyInfoPage(AttendanceDailyInfoPageReqVO pageReqVO) {
|
|
|
int currentPage = pageReqVO.getPageNo();
|
|
|
if (currentPage > 0) {
|
|
|
- pageReqVO.setPageNo(currentPage - 1);
|
|
|
+ currentPage = currentPage - 1;
|
|
|
}
|
|
|
+ pageReqVO.setPageNo(currentPage * pageReqVO.getPageSize());
|
|
|
List<AttendanceDailyInfoRespVO> list = infoMapper.getDailyInfoPage(pageReqVO);
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (AttendanceDailyInfoRespVO info : list) {
|
|
@@ -262,7 +264,13 @@ public class AttendanceInfoServiceImpl implements AttendanceInfoService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return new PageResult<>(list, (long) list.size());
|
|
|
+ Long total = 0L;
|
|
|
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
+ List<AttendanceDailyInfoRespVO> totalList = infoMapper.getDailyInfoPage(pageReqVO);
|
|
|
+ if (totalList != null && totalList.size() > 0) {
|
|
|
+ total = (long) totalList.size();
|
|
|
+ }
|
|
|
+ return new PageResult<>(list, total);
|
|
|
}
|
|
|
|
|
|
@Override
|