|
@@ -404,14 +404,18 @@ public class QwWatchLogServiceImpl extends ServiceImpl<QwWatchLogMapper, QwWatch
|
|
|
// 获取当前公司下的所有销售
|
|
// 获取当前公司下的所有销售
|
|
|
List<Long> userIds;
|
|
List<Long> userIds;
|
|
|
if(param.getCompanyUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())){
|
|
if(param.getCompanyUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())){
|
|
|
- List<CompanyUser> companyUsers = companyUserMapper.selectCompanyUserByCompanyId(param.getCompanyId());
|
|
|
|
|
- if(CollectionUtils.isEmpty(companyUsers)){
|
|
|
|
|
- throw new CustomException("该公司下面没有任何销售!");
|
|
|
|
|
|
|
+ if(param.getCompanyId() == null){
|
|
|
|
|
+ userIds = null;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ List<CompanyUser> companyUsers = companyUserMapper.selectCompanyUserByCompanyId(param.getCompanyId());
|
|
|
|
|
+ if(CollectionUtils.isEmpty(companyUsers)){
|
|
|
|
|
+ throw new CustomException("该公司下面没有任何销售!");
|
|
|
|
|
+ }
|
|
|
|
|
+ userIds = companyUsers.stream()
|
|
|
|
|
+ .map(CompanyUser::getUserId)
|
|
|
|
|
+ .filter(Objects::nonNull)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
}
|
|
}
|
|
|
- userIds = companyUsers.stream()
|
|
|
|
|
- .map(CompanyUser::getUserId)
|
|
|
|
|
- .filter(Objects::nonNull)
|
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
} else if((param.getUserIds() != null && !param.getUserIds().isEmpty())){
|
|
} else if((param.getUserIds() != null && !param.getUserIds().isEmpty())){
|
|
|
userIds = param.getUserIds().stream().map(Long::valueOf).collect(Collectors.toList());
|
|
userIds = param.getUserIds().stream().map(Long::valueOf).collect(Collectors.toList());
|
|
|
}else{
|
|
}else{
|
|
@@ -483,14 +487,18 @@ public class QwWatchLogServiceImpl extends ServiceImpl<QwWatchLogMapper, QwWatch
|
|
|
List<Long> userIds = null;
|
|
List<Long> userIds = null;
|
|
|
// 获取当前公司下的所有销售
|
|
// 获取当前公司下的所有销售
|
|
|
if(param.getCompanyUserId() == null){
|
|
if(param.getCompanyUserId() == null){
|
|
|
- List<CompanyUser> companyUsers = companyUserMapper.selectCompanyUserByCompanyId(param.getCompanyId());
|
|
|
|
|
- if(CollectionUtils.isEmpty(companyUsers)){
|
|
|
|
|
- throw new CustomException("该公司下面没有任何销售!");
|
|
|
|
|
|
|
+ if(param.getCompanyId() == null){
|
|
|
|
|
+ userIds = null;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ List<CompanyUser> companyUsers = companyUserMapper.selectCompanyUserByCompanyId(param.getCompanyId());
|
|
|
|
|
+ if(CollectionUtils.isEmpty(companyUsers)){
|
|
|
|
|
+ throw new CustomException("该公司下面没有任何销售!");
|
|
|
|
|
+ }
|
|
|
|
|
+ userIds = companyUsers.stream()
|
|
|
|
|
+ .map(CompanyUser::getUserId)
|
|
|
|
|
+ .filter(Objects::nonNull)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
}
|
|
}
|
|
|
- userIds = companyUsers.stream()
|
|
|
|
|
- .map(CompanyUser::getUserId)
|
|
|
|
|
- .filter(Objects::nonNull)
|
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
} else {
|
|
} else {
|
|
|
userIds = new ArrayList<>();
|
|
userIds = new ArrayList<>();
|
|
|
userIds.add(param.getCompanyUserId());
|
|
userIds.add(param.getCompanyUserId());
|