|
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ruoyi.common.datascope.annotation.DataScope;
|
|
|
import com.ruoyi.common.datascope.context.DataScopeContextHolder;
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
-import com.usky.common.core.domain.R;
|
|
|
import com.usky.common.core.exception.BusinessException;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
@@ -16,10 +15,10 @@ import com.usky.iot.domain.PmReceive;
|
|
|
import com.usky.iot.domain.PmWorkContent;
|
|
|
import com.usky.iot.domain.PmWorkReport;
|
|
|
import com.usky.iot.mapper.*;
|
|
|
-import com.usky.iot.service.PmProjectService;
|
|
|
import com.usky.iot.service.PmWorkContentService;
|
|
|
import com.usky.iot.service.vo.*;
|
|
|
import com.usky.system.domain.SysUser;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -29,6 +28,7 @@ import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
+import java.time.temporal.TemporalAdjusters;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -40,6 +40,7 @@ import java.util.stream.Collectors;
|
|
|
* @author fu
|
|
|
* @since 2024-05-20
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentMapper, PmWorkContent> implements PmWorkContentService {
|
|
|
|
|
@@ -175,13 +176,18 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
* @return: java.util.List<com.usky.iot.domain.PmProject>
|
|
|
**/
|
|
|
@Override
|
|
|
- public List<PmWorkContent> projectQuery(String startDate, String endDate, String projectName, Integer projectAscription) {
|
|
|
+ public List<PmWorkContent> projectQuery(String startDate, String endDate, String projectName, Integer projectAscription, Long submitterId) {
|
|
|
LocalDateTime startDateTime = null;
|
|
|
LocalDateTime endDateTime = null;
|
|
|
LocalDate start = null;
|
|
|
LocalDate end = null;
|
|
|
List<PmWorkContent> workContentList = new ArrayList<>();
|
|
|
List<Integer> reportIds = new ArrayList<>();
|
|
|
+
|
|
|
+ Set<Integer> reportIdsByDate = new HashSet<>();
|
|
|
+ Set<Integer> reportIdsBySubmitterId = new HashSet<>();
|
|
|
+ Set<Integer> finalReportIds = new HashSet<>();
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)) {
|
|
|
DateTimeFormatter formatter = null;
|
|
|
try {
|
|
@@ -191,15 +197,29 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
start = LocalDate.parse(startDate, formatter);
|
|
|
end = LocalDate.parse(endDate, formatter);
|
|
|
- // startDateTime = start.atStartOfDay();
|
|
|
- // endDateTime = end.atTime(23, 59, 59);
|
|
|
+ startDateTime = start.atStartOfDay();
|
|
|
+ endDateTime = end.atTime(23, 59, 59);
|
|
|
LambdaQueryWrapper<PmWorkReport> reportQuery = Wrappers.lambdaQuery();
|
|
|
- reportQuery.select(PmWorkReport::getId).between(PmWorkReport::getReportDate, start, end);
|
|
|
- reportIds = pmWorkReportMapper.selectList(reportQuery).stream().map(PmWorkReport::getId).collect(Collectors.toList());
|
|
|
- if (reportIds.isEmpty()){
|
|
|
- return workContentList;
|
|
|
- }
|
|
|
+ reportQuery.select(PmWorkReport::getId).between(PmWorkReport::getSubmitDate, startDateTime, endDateTime);
|
|
|
+ reportIdsByDate = pmWorkReportMapper.selectList(reportQuery).stream().map(PmWorkReport::getId).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (submitterId != null) {
|
|
|
+ LambdaQueryWrapper<PmWorkReport> reportQuery = Wrappers.lambdaQuery();
|
|
|
+ reportQuery.select(PmWorkReport::getId).eq(PmWorkReport::getSubmitterId, submitterId);
|
|
|
+ reportIdsBySubmitterId = pmWorkReportMapper.selectList(reportQuery).stream().map(PmWorkReport::getId).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 取交集
|
|
|
+ if (!reportIdsByDate.isEmpty() && !reportIdsBySubmitterId.isEmpty()) {
|
|
|
+ finalReportIds.addAll(reportIdsByDate);
|
|
|
+ finalReportIds.retainAll(reportIdsBySubmitterId);
|
|
|
+ } else if (!reportIdsByDate.isEmpty()) {
|
|
|
+ finalReportIds.addAll(reportIdsByDate);
|
|
|
+ } else if (!reportIdsBySubmitterId.isEmpty()) {
|
|
|
+ finalReportIds.addAll(reportIdsBySubmitterId);
|
|
|
}
|
|
|
+ reportIds = new ArrayList<>(finalReportIds);
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<PmWorkContent> contentLambdaQuery = Wrappers.lambdaQuery();
|
|
@@ -412,13 +432,6 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
return sysUserMapper.selectList(usersQuery);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public List<SysUser> allNickName() {
|
|
|
- LambdaQueryWrapper<SysUser> usersQuery = Wrappers.lambdaQuery();
|
|
|
- usersQuery.select(SysUser::getUserId, SysUser::getNickName, SysUser::getUserName).eq(SysUser::getTenantId, SecurityUtils.getTenantId()).eq(SysUser::getDelFlag, 0);
|
|
|
- return sysUserMapper.selectList(usersQuery);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* @description: 报告记录分页
|
|
|
* @author: fu
|
|
@@ -427,14 +440,21 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
* @return: java.util.List<com.usky.system.domain.PmWorkContent>
|
|
|
**/
|
|
|
@Override
|
|
|
- public CommonPage<PmWorkReport> reportPage(Integer projectAscription, Integer pageNum, Integer pageSize, Integer reportId, String startDate, String endDate, Integer projectId) {
|
|
|
- // LocalDateTime startDateTime = null;
|
|
|
- // LocalDateTime endDateTime = null;
|
|
|
+ public CommonPage<PmWorkReport> reportPage(Integer projectAscription, Integer pageNum, Integer pageSize, Integer reportId,
|
|
|
+ String startDate, String endDate, Integer projectId, Long userId) {
|
|
|
+ LocalDateTime startDateTime = null;
|
|
|
+ LocalDateTime endDateTime = null;
|
|
|
Integer tenantId = SecurityUtils.getTenantId();
|
|
|
LocalDate start = null;
|
|
|
LocalDate end = null;
|
|
|
List<Integer> reportIds = new ArrayList<>();
|
|
|
CommonPage<PmWorkReport> returnPage = new CommonPage<>(new ArrayList<>(), 0, pageSize, pageNum);
|
|
|
+
|
|
|
+ Set<Integer> reportIdsByUser = new HashSet<>();
|
|
|
+ Set<Integer> reportIdsByDate = new HashSet<>();
|
|
|
+ Set<Integer> reportIdsByProject = new HashSet<>();
|
|
|
+ Set<Integer> reportIdsSet = new HashSet<>();
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)) {
|
|
|
DateTimeFormatter formatter = null;
|
|
|
try {
|
|
@@ -444,29 +464,64 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
start = LocalDate.parse(startDate, formatter);
|
|
|
end = LocalDate.parse(endDate, formatter);
|
|
|
- // startDateTime = start.atStartOfDay();
|
|
|
- // endDateTime = end.atTime(23, 59, 59);
|
|
|
+ startDateTime = start.atStartOfDay();
|
|
|
+ endDateTime = end.atTime(23, 59, 59);
|
|
|
LambdaQueryWrapper<PmWorkReport> reportQuery = Wrappers.lambdaQuery();
|
|
|
- reportQuery.select(PmWorkReport::getId).eq(PmWorkReport::getReportStatus, 1).between(PmWorkReport::getReportDate, start, end);
|
|
|
- reportIds = pmWorkReportMapper.selectList(reportQuery).stream().map(PmWorkReport::getId).collect(Collectors.toList());
|
|
|
- if (reportIds.isEmpty()){
|
|
|
- return returnPage;
|
|
|
- }
|
|
|
+ reportQuery.select(PmWorkReport::getId).eq(PmWorkReport::getReportStatus, 1).between(PmWorkReport::getSubmitDate, startDateTime, endDateTime);
|
|
|
+ reportIdsByDate = pmWorkReportMapper.selectList(reportQuery).stream().map(PmWorkReport::getId).collect(Collectors.toSet());
|
|
|
}
|
|
|
|
|
|
- if (projectId != null && projectId > 0) {
|
|
|
+ if (projectId != null) {
|
|
|
LambdaQueryWrapper<PmWorkContent> contentLambdaQuery = Wrappers.lambdaQuery();
|
|
|
contentLambdaQuery.select(PmWorkContent::getReportId).eq(PmWorkContent::getProjectId, projectId);
|
|
|
- reportIds.addAll(pmWorkContentMapper.selectList(contentLambdaQuery).stream().map(PmWorkContent::getReportId).collect(Collectors.toList()));
|
|
|
- if (reportIds.isEmpty()) {
|
|
|
+ reportIdsByProject = pmWorkContentMapper.selectList(contentLambdaQuery).stream().map(PmWorkContent::getReportId).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (userId != null) {
|
|
|
+ LambdaQueryWrapper<PmWorkReport> reportQuery = Wrappers.lambdaQuery();
|
|
|
+ reportQuery.eq(PmWorkReport::getSubmitterId, userId);
|
|
|
+ reportIdsByUser = pmWorkReportMapper.selectList(reportQuery).stream().map(PmWorkReport::getId).collect(Collectors.toSet());
|
|
|
+ if (reportIdsByProject.isEmpty() && reportIdsByUser.isEmpty()) {
|
|
|
return returnPage;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (!reportIdsByUser.isEmpty() && !reportIdsByProject.isEmpty() && !reportIdsByDate.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByUser);
|
|
|
+ reportIdsSet.retainAll(reportIdsByProject);
|
|
|
+ reportIdsSet.retainAll(reportIdsByDate);
|
|
|
+ if (reportIdsSet.isEmpty()) {
|
|
|
+ return returnPage;
|
|
|
+ }
|
|
|
+ } else if (!reportIdsByUser.isEmpty() && !reportIdsByProject.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByUser);
|
|
|
+ reportIdsSet.retainAll(reportIdsByProject);
|
|
|
+ if (reportIdsSet.isEmpty()) {
|
|
|
+ return returnPage;
|
|
|
+ }
|
|
|
+ } else if (!reportIdsByUser.isEmpty() && !reportIdsByDate.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByUser);
|
|
|
+ reportIdsSet.retainAll(reportIdsByDate);
|
|
|
+ if (reportIdsSet.isEmpty()) {
|
|
|
+ return returnPage;
|
|
|
+ }
|
|
|
+ } else if (!reportIdsByProject.isEmpty() && !reportIdsByDate.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByProject);
|
|
|
+ reportIdsSet.retainAll(reportIdsByDate);
|
|
|
+ if (reportIdsSet.isEmpty()) {
|
|
|
+ return returnPage;
|
|
|
+ }
|
|
|
+ } else if (!reportIdsByUser.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByUser);
|
|
|
+ } else if (!reportIdsByProject.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByProject);
|
|
|
+ } else if (!reportIdsByDate.isEmpty()) {
|
|
|
+ reportIdsSet.addAll(reportIdsByDate);
|
|
|
+ }
|
|
|
+ reportIds = new ArrayList<>(reportIdsSet);
|
|
|
|
|
|
List<PmWorkContent> pmWorkContentList = new ArrayList<>();
|
|
|
- // Integer tenantId = SecurityUtils.getTenantId();
|
|
|
- Long userId = SecurityUtils.getUserId();
|
|
|
+ Long userId2 = SecurityUtils.getUserId();
|
|
|
List<Long> userIds = new ArrayList<>();
|
|
|
List<Integer> receiveList = receive();
|
|
|
if (receiveList.isEmpty() && projectAscription == 2) {
|
|
@@ -474,7 +529,6 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
|
|
|
LambdaQueryWrapper<PmWorkContent> contentLambdaQuery = Wrappers.lambdaQuery();
|
|
|
- // contentLambdaQuery.select(PmWorkContent::getReportId, PmWorkContent::getWorkContent, PmWorkContent::getWorkTime, PmWorkContent::getProjectName);
|
|
|
if (reportId != null && reportId >= 0) {
|
|
|
contentLambdaQuery.eq(PmWorkContent::getReportId, reportId);
|
|
|
pmWorkContentList = pmWorkContentMapper.selectList(contentLambdaQuery);
|
|
@@ -526,7 +580,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
|
|
|
// 查询已读状态
|
|
|
LambdaQueryWrapper<PmReceive> statusQuery = Wrappers.lambdaQuery();
|
|
|
- statusQuery.select(PmReceive::getReportId, PmReceive::getReadFlag).eq(PmReceive::getReceiverId, userId);
|
|
|
+ statusQuery.select(PmReceive::getReportId, PmReceive::getReadFlag).eq(PmReceive::getReceiverId, userId2);
|
|
|
if (reportId != null && reportId != 0) {
|
|
|
statusQuery.eq(PmReceive::getReportId, reportId);
|
|
|
} else if (!receiveList.isEmpty()) {
|
|
@@ -559,16 +613,11 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
// 已读未读数量查询
|
|
|
List<PmReceive> receives = new ArrayList<>();
|
|
|
if (!receiveList.isEmpty()) {
|
|
|
- receives = receives(receiveList);
|
|
|
+ receives = receives(reportIds2);
|
|
|
}
|
|
|
|
|
|
Map<Integer, List<PmReceive>> reportReceivesMap = new HashMap<>();
|
|
|
if (!receives.isEmpty()) {
|
|
|
- List<Long> uId = new ArrayList<>();
|
|
|
- for (PmReceive pmReceive : receives) {
|
|
|
- Long receiverId = pmReceive.getReceiverId();
|
|
|
- uId.add(receiverId);
|
|
|
- }
|
|
|
reportReceivesMap = receives.stream().collect(Collectors.groupingBy(PmReceive::getReportId));
|
|
|
}
|
|
|
|
|
@@ -613,51 +662,12 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return new CommonPage<>(reportList, reportPage.getTotal(), pageSize, pageNum);
|
|
|
+ return new CommonPage<PmWorkReport>(reportList, reportPage.getTotal(), pageSize, pageNum);
|
|
|
}
|
|
|
|
|
|
- /*private PmReportReadersVO readCount() {
|
|
|
- List<PmReceive> receives = receives(receiveList);
|
|
|
- List<Long> uId = new ArrayList<>();
|
|
|
- for (PmReceive pmReceive : receives) {
|
|
|
- Long receiverId = pmReceive.getReceiverId();
|
|
|
- uId.add(receiverId);
|
|
|
- }
|
|
|
-
|
|
|
- Set<Long> userIdSet = new HashSet<>();
|
|
|
- for (PmWorkReport report : reportList) {
|
|
|
- Long submitterId = report.getSubmitterId();
|
|
|
- userIdSet.add(submitterId);
|
|
|
- }
|
|
|
- List<Long> userIdList = new ArrayList<>(userIdSet);
|
|
|
-
|
|
|
- List<SysUser> sysUsers = nickNames(userIdList);
|
|
|
-
|
|
|
- Map<Integer, List<PmReceive>> reportReceivesMap = receives.stream()
|
|
|
- .collect(Collectors.groupingBy(PmReceive::getReportId));
|
|
|
-
|
|
|
- if (sysUsers != null) {
|
|
|
- for (PmWorkReport report : reportList) {
|
|
|
- List<Long> readAlready = new ArrayList<>();
|
|
|
- List<Long> readNotAlready = new ArrayList<>();
|
|
|
- int readCount = 0;
|
|
|
- int unreadCount = 0;
|
|
|
- List<PmReceive> reportReceives = reportReceivesMap.getOrDefault(report.getId(), Collections.emptyList());
|
|
|
- for (PmReceive pmReceive : reportReceives) {
|
|
|
- if (pmReceive.getReadFlag() == 1) {
|
|
|
- readCount++;
|
|
|
- readAlready.add(pmReceive.getReceiverId());
|
|
|
- } else {
|
|
|
- unreadCount++;
|
|
|
- readNotAlready.add(pmReceive.getReceiverId());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- PmReportReadersVO readUnreadVO = new PmReportReadersVO(readAlready, readNotAlready, readCount, unreadCount);
|
|
|
- }*/
|
|
|
|
|
|
/**
|
|
|
- * @description: 获取报告接收人
|
|
|
+ * @description: 获取报告接收人-工具
|
|
|
* @author: fu
|
|
|
* @date: 2024/8/8 19:22
|
|
|
* @param: [report]
|
|
@@ -670,7 +680,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @description: 获取时间段内报告列表(按报告时间查询)
|
|
|
+ * @description: 获取时间段内报告列表(按报告时间查询)-工具
|
|
|
* @author: fu
|
|
|
* @date: 2024/8/8 19:22
|
|
|
* @param: [startDate, endDate]
|
|
@@ -684,7 +694,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @description: 项目查询
|
|
|
+ * @description: 项目查询-工具
|
|
|
* @author: fu
|
|
|
* @date: 2024/8/8 19:22
|
|
|
* @param: [startDate, endDate]
|
|
@@ -695,7 +705,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
|
|
LambdaQueryWrapper<PmProject> projectsQuery = Wrappers.lambdaQuery();
|
|
|
projectsQuery.select(PmProject::getId, PmProject::getProjectName);
|
|
|
- if (projectId != null && projectId != 0) {
|
|
|
+ if (projectId != null && projectId >= 0) {
|
|
|
projectsQuery.eq(PmProject::getId, projectId);
|
|
|
return pmProjectMapper.selectList(projectsQuery);
|
|
|
}
|
|
@@ -703,32 +713,33 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
return pmProjectMapper.selectList(projectsQuery);
|
|
|
}
|
|
|
|
|
|
- @DataScope(userAlias = "d")
|
|
|
- private List<SysUser> userNameList(Long userId) {
|
|
|
- Integer tenantId = SecurityUtils.getTenantId();
|
|
|
- Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
|
|
+ /**
|
|
|
+ * @description: 获取用户列表-工具
|
|
|
+ * @author: fu
|
|
|
+ * @date: 2024/8/8 19:22
|
|
|
+ * @param: [userId]
|
|
|
+ * @return: java.util.List<com.usky.iot.domain.SysUser>
|
|
|
+ **/
|
|
|
+ private List<SysUser> userNameList(List<Long> userId) {
|
|
|
LambdaQueryWrapper<SysUser> userNameQuery = Wrappers.lambdaQuery();
|
|
|
userNameQuery.select(SysUser::getUserId, SysUser::getNickName, SysUser::getUserName, SysUser::getPhonenumber, SysUser::getAvatar,
|
|
|
- SysUser::getSex, SysUser::getDeptId)
|
|
|
- .eq(SysUser::getDelFlag, 0)
|
|
|
- .eq(SysUser::getStatus, 0);
|
|
|
- if (userId != null && userId != 0) {
|
|
|
- userNameQuery.eq(SysUser::getUserId, userId);
|
|
|
+ SysUser::getSex, SysUser::getDeptId, SysUser::getAddress);
|
|
|
+ if (!userId.isEmpty()) {
|
|
|
+ userNameQuery.eq(SysUser::getDelFlag, 0).eq(SysUser::getStatus, 0).in(SysUser::getUserId, userId);
|
|
|
return sysUserMapper.selectList(userNameQuery);
|
|
|
+ } else {
|
|
|
+ userNameQuery.eq(SysUser::getUserId, SecurityUtils.getUserId());
|
|
|
}
|
|
|
- // userNameQuery.apply(DataScopeContextHolder.getDataScopeSql());
|
|
|
- userNameQuery.eq(SysUser::getTenantId, tenantId).eq(SysUser::getDeptId, deptId);
|
|
|
return sysUserMapper.selectList(userNameQuery);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @description: 工时统计
|
|
|
+ * @description: 工时统计-工具
|
|
|
* @author: fu
|
|
|
* @date: 2024/8/8 19:22
|
|
|
* @param: [startDate, endDate, projectName, projectAscription]
|
|
|
* @return: java.util.List<com.usky.iot.domain.PmWorkReport>
|
|
|
**/
|
|
|
- //@DataScope//数据权限注解
|
|
|
private List<PmWorkContent> workTimeCount(List<Long> users, List<Integer> project, String startDate, String endDate) {
|
|
|
List<PmWorkContent> pmWorkContentList = new ArrayList<>();
|
|
|
Integer tenantId = SecurityUtils.getTenantId();
|
|
@@ -753,7 +764,6 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
return pmWorkContentList;
|
|
|
}
|
|
|
}
|
|
|
- // workTimeQuery.apply(DataScopeContextHolder.getDataScopeSql());// 数据权限设置
|
|
|
pmWorkContentList = pmWorkContentMapper.selectList(workTimeQuery);
|
|
|
|
|
|
Map<String, PmWorkContent> workTimeMap = new HashMap<>();
|
|
@@ -770,12 +780,45 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
return new ArrayList<>(workTimeMap.values());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @description: 工时统计
|
|
|
+ * @author: fu
|
|
|
+ * @date: 2024/8/8 19:22
|
|
|
+ * @param: [userId, projectId, startDate, endDate]
|
|
|
+ * * @param userId 用户id
|
|
|
+ * * @param filter 是否过滤0工时(默认1:不过滤;2:过滤)
|
|
|
+ * * @param startDate 开始时间
|
|
|
+ * * @param endDate 结束时间
|
|
|
+ * * @param workerOrProject 打工仔还是项目(默认1:打工仔;2:项目)
|
|
|
+ * @return: java.util.List<com.usky.iot.domain.WorkTimeExportVO>
|
|
|
+ **/
|
|
|
+ @DataScope
|
|
|
@Override
|
|
|
- public List<Object> workHourStatistic(Long userId, Integer projectId, Integer filter, String startDate, String endDate, Integer workerOrProject) {
|
|
|
+ public List<Object> workHourStatisticNew(PmWorkHourStatisticRequestVO requestVO) {
|
|
|
+ List<Long> userId = new ArrayList<>();
|
|
|
+ if (requestVO.getUserIds() != null) {
|
|
|
+ userId = requestVO.getUserIds();
|
|
|
+ }
|
|
|
+ Integer projectId = requestVO.getProjectId();
|
|
|
+ Integer filter = 1;
|
|
|
+ if (requestVO.getFilter() != null) {
|
|
|
+ filter = requestVO.getFilter();
|
|
|
+ }
|
|
|
+ String startDate = requestVO.getStartDate();
|
|
|
+ String endDate = requestVO.getEndDate();
|
|
|
+ Integer workerOrProject = 1;
|
|
|
+ if (requestVO.getWorkerOrProject() != null) {
|
|
|
+ workerOrProject = requestVO.getWorkerOrProject();
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
|
|
|
+ startDate = LocalDate.now().with(TemporalAdjusters.firstDayOfYear()).toString();
|
|
|
+ endDate = LocalDate.now().with(TemporalAdjusters.lastDayOfYear()).toString();
|
|
|
+ }
|
|
|
+
|
|
|
List<ProjectWorkTimeVO> projectWorkTime = new ArrayList<>();
|
|
|
List<UserWorkTimeVO> userWorkTimeVO = new ArrayList<>();
|
|
|
List<Object> returnList = new ArrayList<>();
|
|
|
+
|
|
|
if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
|
|
|
throw new BusinessException("请设置查询时间范围!");
|
|
|
}
|
|
@@ -865,6 +908,49 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
}
|
|
|
returnList.add(projectWorkTime);
|
|
|
+
|
|
|
+
|
|
|
+ returnList.add(pmProjectName);
|
|
|
+ // 重组返回数据结构
|
|
|
+ for (String uName : nickName) {
|
|
|
+ String name1 = uName;
|
|
|
+ UserWorkTimeVO userWorkTimeVO2 = new UserWorkTimeVO();
|
|
|
+ userWorkTimeVO2.setProjectOrPerson(name1);
|
|
|
+ List<BigDecimal> workTime1 = new ArrayList<>();
|
|
|
+ boolean hasNonZeroWorkTime1 = false;
|
|
|
+ if (userAndProjectD.isEmpty()) {
|
|
|
+ for (String currentNickName : pmProjectName) {
|
|
|
+ workTime1.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (String currentNickName : pmProjectName) {
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProjectD) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (userNickName == name1 && projectName == currentNickName) {
|
|
|
+ workTime1.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime1 = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime1.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime1) {
|
|
|
+ userWorkTimeVO2.setWorkTime(workTime1);
|
|
|
+ userWorkTimeVO.add(userWorkTimeVO2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnList.add(userWorkTimeVO);
|
|
|
+
|
|
|
} else {
|
|
|
returnList.add(pmProjectName);
|
|
|
// 重组返回数据结构
|
|
@@ -880,46 +966,336 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
}
|
|
|
} else {
|
|
|
for (String currentNickName : pmProjectName) {
|
|
|
- boolean foundWorkTime = false;
|
|
|
- for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProjectD) {
|
|
|
- String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
- String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
- BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
- if (userNickName == name && projectName == currentNickName) {
|
|
|
- workTime.add(userProjectWorkTime);
|
|
|
- if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
- hasNonZeroWorkTime = true;
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProjectD) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (userNickName == name && projectName == currentNickName) {
|
|
|
+ workTime.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
}
|
|
|
- foundWorkTime = true;
|
|
|
- break;
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
}
|
|
|
}
|
|
|
- if (!foundWorkTime) {
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime) {
|
|
|
+ userWorkTimeVO2.setWorkTime(workTime);
|
|
|
+ userWorkTimeVO.add(userWorkTimeVO2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnList.add(userWorkTimeVO);
|
|
|
+
|
|
|
+
|
|
|
+ returnList.add(nickName);
|
|
|
+ // 重组返回数据结构
|
|
|
+ for (String name : pmProjectName) {
|
|
|
+ ProjectWorkTimeVO projectWorkTimeVO = new ProjectWorkTimeVO();
|
|
|
+ projectWorkTimeVO.setProjectOrPerson(name);
|
|
|
+ List<BigDecimal> workTime = new ArrayList<>();
|
|
|
+ boolean hasNonZeroWorkTime = false;
|
|
|
+ if (userAndProject.isEmpty()) {
|
|
|
+ for (String currentNickName : nickName) {
|
|
|
workTime.add(BigDecimal.ZERO);
|
|
|
}
|
|
|
+ } else {
|
|
|
+ for (String currentNickName : nickName) {
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProject) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (projectName == name && userNickName == currentNickName) {
|
|
|
+ workTime.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime) {
|
|
|
+ projectWorkTimeVO.setWorkTime(workTime);
|
|
|
+ projectWorkTime.add(projectWorkTimeVO);
|
|
|
}
|
|
|
}
|
|
|
- // 过滤0工时
|
|
|
- if (filter != 2 || hasNonZeroWorkTime) {
|
|
|
- userWorkTimeVO2.setWorkTime(workTime);
|
|
|
- userWorkTimeVO.add(userWorkTimeVO2);
|
|
|
- }
|
|
|
+ returnList.add(projectWorkTime);
|
|
|
}
|
|
|
- returnList.add(userWorkTimeVO);
|
|
|
+ return returnList;
|
|
|
}
|
|
|
+
|
|
|
+ //回退代码
|
|
|
+ @DataScope
|
|
|
+ @Override
|
|
|
+ public List<Object> workHourStatistic(Long userId, Integer projectId, Integer filter, String startDate, String endDate, Integer workerOrProject) {
|
|
|
+ List<ProjectWorkTimeVO> projectWorkTime = new ArrayList<>();
|
|
|
+ List<UserWorkTimeVO> userWorkTimeVO = new ArrayList<>();
|
|
|
+ List<ProjectWorkTimeVO> projectWorkTime1 = new ArrayList<>();
|
|
|
+ List<UserWorkTimeVO> userWorkTimeVO1 = new ArrayList<>();
|
|
|
+ List<Object> returnList = new ArrayList<>();
|
|
|
+ if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
|
|
|
+ throw new BusinessException("请设置查询时间范围!");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<PmProject> pmProjects = projects(projectId);
|
|
|
+ List<String> pmProjectName = new ArrayList<>();
|
|
|
+ List<Integer> pmProjectId = new ArrayList<>();
|
|
|
+ for (PmProject project : pmProjects) {
|
|
|
+ pmProjectName.add(project.getProjectName());
|
|
|
+ pmProjectId.add(project.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Long> userIdS = new ArrayList<>();
|
|
|
+ if (userId != null) {
|
|
|
+ userIdS.add(userId);
|
|
|
+ }
|
|
|
+ List<SysUser> users = userNameList(userIdS);
|
|
|
+ List<Long> userIds = new ArrayList<>();
|
|
|
+ List<String> nickName = new ArrayList<>();
|
|
|
+ for (SysUser user : users) {
|
|
|
+ userIds.add(user.getUserId());
|
|
|
+ nickName.add(user.getNickName());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 统计userId每个项目所需工时
|
|
|
+ List<WorkHoursStatisticsVO> userAndProject = new ArrayList<>();
|
|
|
+ List<PmWorkContent> pmWorkContentList = workTimeCount(userIds, pmProjectId, startDate, endDate);
|
|
|
+ if (!pmWorkContentList.isEmpty()) {
|
|
|
+ for (PmWorkContent content : pmWorkContentList) {
|
|
|
+ WorkHoursStatisticsVO workHoursStatisticsVO = new WorkHoursStatisticsVO();
|
|
|
+ Long submitterId = content.getSubmitterId();
|
|
|
+ Integer projectId1 = content.getProjectId();
|
|
|
+ BigDecimal workTime = content.getWorkTime();
|
|
|
+ workHoursStatisticsVO.setWorkTime(workTime);
|
|
|
+ for (SysUser user : users) {
|
|
|
+ Long userId1 = user.getUserId();
|
|
|
+ String nickName1 = user.getNickName();
|
|
|
+ if (userId1.equals(submitterId)) {
|
|
|
+ workHoursStatisticsVO.setNickName(nickName1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (PmProject project : pmProjects) {
|
|
|
+ Integer projectId2 = project.getId();
|
|
|
+ String projectName = project.getProjectName();
|
|
|
+ if (projectId2 == projectId1) {
|
|
|
+ workHoursStatisticsVO.setProjectName(projectName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ userAndProject.add(workHoursStatisticsVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<WorkHoursStatisticsVO> userAndProjectD = userAndProject;
|
|
|
+
|
|
|
+ if (workerOrProject != 1) {
|
|
|
+ returnList.add(nickName);
|
|
|
+ // 重组返回数据结构
|
|
|
+ for (String name : pmProjectName) {
|
|
|
+ ProjectWorkTimeVO projectWorkTimeVO = new ProjectWorkTimeVO();
|
|
|
+ projectWorkTimeVO.setProjectOrPerson(name);
|
|
|
+ List<BigDecimal> workTime = new ArrayList<>();
|
|
|
+ boolean hasNonZeroWorkTime = false;
|
|
|
+ if (userAndProject.isEmpty()) {
|
|
|
+ for (String currentNickName : nickName) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (String currentNickName : nickName) {
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProject) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (projectName == name && userNickName == currentNickName) {
|
|
|
+ workTime.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime) {
|
|
|
+ projectWorkTimeVO.setWorkTime(workTime);
|
|
|
+ projectWorkTime.add(projectWorkTimeVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnList.add(projectWorkTime);
|
|
|
+
|
|
|
+
|
|
|
+ returnList.add(pmProjectName);
|
|
|
+ // 重组返回数据结构
|
|
|
+ for (String uName : nickName) {
|
|
|
+ String name1 = uName;
|
|
|
+ UserWorkTimeVO userWorkTimeVO2 = new UserWorkTimeVO();
|
|
|
+ userWorkTimeVO2.setProjectOrPerson(name1);
|
|
|
+ List<BigDecimal> workTime1 = new ArrayList<>();
|
|
|
+ boolean hasNonZeroWorkTime1 = false;
|
|
|
+ if (userAndProjectD.isEmpty()) {
|
|
|
+ for (String currentNickName : pmProjectName) {
|
|
|
+ workTime1.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (String currentNickName : pmProjectName) {
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProjectD) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (userNickName == name1 && projectName == currentNickName) {
|
|
|
+ workTime1.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime1 = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime1.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime1) {
|
|
|
+ userWorkTimeVO2.setWorkTime(workTime1);
|
|
|
+ userWorkTimeVO.add(userWorkTimeVO2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnList.add(userWorkTimeVO);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ returnList.add(pmProjectName);
|
|
|
+ // 重组返回数据结构
|
|
|
+ for (String uName : nickName) {
|
|
|
+ String name = uName;
|
|
|
+ UserWorkTimeVO userWorkTimeVO2 = new UserWorkTimeVO();
|
|
|
+ userWorkTimeVO2.setProjectOrPerson(name);
|
|
|
+ List<BigDecimal> workTime = new ArrayList<>();
|
|
|
+ boolean hasNonZeroWorkTime = false;
|
|
|
+ if (userAndProjectD.isEmpty()) {
|
|
|
+ for (String currentNickName : pmProjectName) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (String currentNickName : pmProjectName) {
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProjectD) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (userNickName == name && projectName == currentNickName) {
|
|
|
+ workTime.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime) {
|
|
|
+ userWorkTimeVO2.setWorkTime(workTime);
|
|
|
+ userWorkTimeVO.add(userWorkTimeVO2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnList.add(userWorkTimeVO);
|
|
|
+
|
|
|
+
|
|
|
+ returnList.add(nickName);
|
|
|
+ // 重组返回数据结构
|
|
|
+ for (String name : pmProjectName) {
|
|
|
+ ProjectWorkTimeVO projectWorkTimeVO = new ProjectWorkTimeVO();
|
|
|
+ projectWorkTimeVO.setProjectOrPerson(name);
|
|
|
+ List<BigDecimal> workTime = new ArrayList<>();
|
|
|
+ boolean hasNonZeroWorkTime = false;
|
|
|
+ if (userAndProject.isEmpty()) {
|
|
|
+ for (String currentNickName : nickName) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (String currentNickName : nickName) {
|
|
|
+ boolean foundWorkTime = false;
|
|
|
+ for (WorkHoursStatisticsVO workHoursStatisticsVO : userAndProject) {
|
|
|
+ String userNickName = workHoursStatisticsVO.getNickName();
|
|
|
+ String projectName = workHoursStatisticsVO.getProjectName();
|
|
|
+ BigDecimal userProjectWorkTime = workHoursStatisticsVO.getWorkTime();
|
|
|
+ if (projectName == name && userNickName == currentNickName) {
|
|
|
+ workTime.add(userProjectWorkTime);
|
|
|
+ if (userProjectWorkTime.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ hasNonZeroWorkTime = true;
|
|
|
+ }
|
|
|
+ foundWorkTime = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!foundWorkTime) {
|
|
|
+ workTime.add(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 过滤0工时
|
|
|
+ if (filter != 2 || hasNonZeroWorkTime) {
|
|
|
+ projectWorkTimeVO.setWorkTime(workTime);
|
|
|
+ projectWorkTime.add(projectWorkTimeVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnList.add(projectWorkTime);
|
|
|
+ }
|
|
|
return returnList;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-@Override
|
|
|
-public List<WorkTimeExportVO> workHourStatisticExport(Long userId, Integer projectId, String startDate, String endDate) {
|
|
|
- Integer tenantId = SecurityUtils.getTenantId();
|
|
|
- LocalDate start = null;
|
|
|
- LocalDate end = null;
|
|
|
- if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)) {
|
|
|
- start = LocalDate.parse(startDate);
|
|
|
- end = LocalDate.parse(endDate);
|
|
|
+ /**
|
|
|
+ * 工时-明细-导出
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DataScope(deptAlias = "u")
|
|
|
+ @Override
|
|
|
+ public List<WorkTimeExportVO> workHourStatisticExport(PmWorkHourStatisticRequestVO requestVO) {
|
|
|
+ List<Long> userIds = new ArrayList<>();
|
|
|
+ if (Objects.isNull(requestVO.getUserIds()) || requestVO.getUserIds().isEmpty()){
|
|
|
+ userIds.add(SecurityUtils.getUserId());
|
|
|
+ requestVO.setUserIds(userIds);
|
|
|
+ }
|
|
|
+ return pmWorkContentMapper.workHourStatisticExport(requestVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 工时-统计-导出
|
|
|
+ * @param userId
|
|
|
+ * @param projectId
|
|
|
+ * @param startDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DataScope
|
|
|
+ @Override
|
|
|
+ public List<WorkTimeExportTwoVO> workHourExport(Long userId, Integer projectId, Integer filter, String
|
|
|
+ startDate, String endDate, Integer workerOrProject) {
|
|
|
+ return Collections.emptyList();
|
|
|
}
|
|
|
- return pmWorkContentMapper.workHourStatisticExport(userId, projectId, start, end, tenantId);
|
|
|
-}
|
|
|
|
|
|
}
|