|
@@ -665,6 +665,50 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
return new CommonPage<PmWorkReport>(reportList, reportPage.getTotal(), pageSize, pageNum);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @description: 日报上下滑动
|
|
|
+ * @author: fu
|
|
|
+ * @date: 2024/8/8 19:22
|
|
|
+ * @param: [upOrDown, slideSum, submitDate]
|
|
|
+ * @return: java.util.List<com.usky.iot.vo.PmWorkReportSlideVO>
|
|
|
+ **/
|
|
|
+ @Override
|
|
|
+ public PmWorkReportSlideVO slide(Integer upOrDown, Integer slideSum, LocalDateTime submitDate) {
|
|
|
+ PmWorkReportSlideVO reportSlide = new PmWorkReportSlideVO();
|
|
|
+ if (slideSum <= 0) {
|
|
|
+ throw new BusinessException("slideSum 必须为正整数!");
|
|
|
+ }
|
|
|
+ if (submitDate == null) {
|
|
|
+ return reportSlide;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<PmWorkReport> reportUp = new ArrayList<>();
|
|
|
+ List<PmWorkReport> reportDown = new ArrayList<>();
|
|
|
+ LambdaQueryWrapper<PmWorkReport> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryWrapper.last("LIMIT " + slideSum);
|
|
|
+ if (upOrDown == 1) {
|
|
|
+ queryWrapper.gt(PmWorkReport::getSubmitDate, submitDate)
|
|
|
+ .orderByAsc(PmWorkReport::getSubmitDate);
|
|
|
+ reportUp = pmWorkReportMapper.selectList(queryWrapper);
|
|
|
+ if (reportUp.isEmpty()) {
|
|
|
+ throw new BusinessException("已经是第一篇报告了!");
|
|
|
+ }
|
|
|
+ reportSlide.setSlideUp(reportUp);
|
|
|
+ } else if (upOrDown == 2) {
|
|
|
+ queryWrapper.lt(PmWorkReport::getSubmitDate, submitDate)
|
|
|
+ .orderByDesc(PmWorkReport::getSubmitDate);
|
|
|
+ reportDown = pmWorkReportMapper.selectList(queryWrapper);
|
|
|
+ if (reportDown.isEmpty()) {
|
|
|
+ throw new BusinessException("已经是最后一篇报告了!");
|
|
|
+ }
|
|
|
+ reportSlide.setSlideDown(reportDown);
|
|
|
+ } else {
|
|
|
+ throw new BusinessException("upOrDown 参数无效!");
|
|
|
+ }
|
|
|
+
|
|
|
+ return reportSlide;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @description: 获取报告接收人-工具
|
|
@@ -876,7 +920,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
List<WorkHoursStatisticsVO> userAndProjectD = userAndProject;
|
|
|
|
|
|
- //判断是否为项目维度
|
|
|
+ // 判断是否为项目维度
|
|
|
if (workerOrProject != 1) {
|
|
|
returnList.add(nickName);
|
|
|
// 重组返回数据结构
|
|
@@ -974,7 +1018,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (filter == 2){
|
|
|
+ if (filter == 2) {
|
|
|
for (int i = pmProjectName.size() - 1; i >= 0; i--) {
|
|
|
if (!nonZeroProjectIndices.contains(i)) {
|
|
|
pmProjectName.remove(i);
|