|
@@ -376,14 +376,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
//再匹配corpwxUserid为null的,需要按照姓名匹配
|
|
//再匹配corpwxUserid为null的,需要按照姓名匹配
|
|
List<String> userNameList = userList.stream().filter(u->u.getCorpwxUserid() == null).map(User::getName).collect(Collectors.toList());
|
|
List<String> userNameList = userList.stream().filter(u->u.getCorpwxUserid() == null).map(User::getName).collect(Collectors.toList());
|
|
- List<UserCorpwxTime> corpwxTimeList2 = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("name", userNameList).eq("create_date", date));
|
|
|
|
- for (Map<String, Object> memb : nameList) {
|
|
|
|
- if (memb.get("corpwxUserId") == null) {
|
|
|
|
- String name = (String)memb.get("name");
|
|
|
|
- Optional<UserCorpwxTime> first = corpwxTimeList2.stream().filter(u -> u.getName().equals(name)).findFirst();
|
|
|
|
- if (first.isPresent()) {
|
|
|
|
- UserCorpwxTime corpwxTime = first.get();
|
|
|
|
- memb.put("cardTime", corpwxTime.getWorkHours());
|
|
|
|
|
|
+ if (userNameList.size() > 0) {
|
|
|
|
+ List<UserCorpwxTime> corpwxTimeList2 = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("name", userNameList).eq("create_date", date));
|
|
|
|
+ for (Map<String, Object> memb : nameList) {
|
|
|
|
+ if (memb.get("corpwxUserId") == null) {
|
|
|
|
+ String name = (String)memb.get("name");
|
|
|
|
+ Optional<UserCorpwxTime> first = corpwxTimeList2.stream().filter(u -> u.getName().equals(name)).findFirst();
|
|
|
|
+ if (first.isPresent()) {
|
|
|
|
+ UserCorpwxTime corpwxTime = first.get();
|
|
|
|
+ memb.put("cardTime", corpwxTime.getWorkHours());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|