|
@@ -356,6 +356,53 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
memb.put("reportTime", df.format(reportTime));
|
|
memb.put("reportTime", df.format(reportTime));
|
|
}
|
|
}
|
|
|
|
+ //显示考勤数据
|
|
|
|
+ if (timeType.getShowCorpwxCardtime() == 1) {
|
|
|
|
+ List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id", userIds));
|
|
|
|
+ if (companyId == 469) {
|
|
|
|
+ //赛元微电子,需要按照corpwxUserid或者姓名匹配
|
|
|
|
+ List<String> corpwxUserIds = userList.stream().map(User::getCorpwxUserid).collect(Collectors.toList());
|
|
|
|
+ List<UserCorpwxTime> corpwxTimeList = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("corpwx_userid", corpwxUserIds).eq("create_date", date));
|
|
|
|
+ for (Map<String, Object> memb : nameList) {
|
|
|
|
+ userList.stream().filter(u->u.getId().equals(memb.get("id"))).findFirst().ifPresent(u->{
|
|
|
|
+ memb.put("corpwxUserId", u.getCorpwxUserid());
|
|
|
|
+ });
|
|
|
|
+ String corpwxUserId = (String)memb.get("corpwxUserId");
|
|
|
|
+ Optional<UserCorpwxTime> first = corpwxTimeList.stream().filter(u -> u.getCorpwxUserid().equals(corpwxUserId)).findFirst();
|
|
|
|
+ if (first.isPresent()) {
|
|
|
|
+ UserCorpwxTime corpwxTime = first.get();
|
|
|
|
+ memb.put("cardTime", corpwxTime.getWorkHours());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //再匹配corpwxUserid为null的,需要按照姓名匹配
|
|
|
|
+ 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());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ List<String> corpwxUserIds = userList.stream().map(User::getCorpwxUserid).collect(Collectors.toList());
|
|
|
|
+ List<UserCorpwxTime> corpwxTimeList = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("corpwx_userid", corpwxUserIds).eq("create_date", date));
|
|
|
|
+ for (Map<String, Object> memb : nameList) {
|
|
|
|
+ userList.stream().filter(u->u.getId().equals(memb.get("id"))).findFirst().ifPresent(u->{
|
|
|
|
+ memb.put("corpwxUserId", u.getCorpwxUserid());
|
|
|
|
+ });
|
|
|
|
+ String corpwxUserId = (String)memb.get("corpwxUserId");
|
|
|
|
+ Optional<UserCorpwxTime> first = corpwxTimeList.stream().filter(u -> u.getCorpwxUserid().equals(corpwxUserId)).findFirst();
|
|
|
|
+ if (first.isPresent()) {
|
|
|
|
+ UserCorpwxTime corpwxTime = first.get();
|
|
|
|
+ memb.put("cardTime", corpwxTime.getWorkHours());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//处理项目专业进度的数据展示
|
|
//处理项目专业进度的数据展示
|