|
@@ -1716,14 +1716,21 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
for (Map map : nameList) {
|
|
|
String corpwxUserid = (String)map.get("corpwxUserid");
|
|
|
String dateStr = (String)map.get("dateStr");
|
|
|
- userCorpwxTimeQueryWrapper.or(wrapper->wrapper.eq("corpwx_userid", corpwxUserid).eq("create_date", dateStr));
|
|
|
+ String name = (String)map.get("name");
|
|
|
+ if (corpwxUserid != null) {
|
|
|
+ userCorpwxTimeQueryWrapper.or(wrapper->wrapper.eq("corpwx_userid", corpwxUserid).eq("create_date", dateStr));
|
|
|
+ } else {
|
|
|
+ userCorpwxTimeQueryWrapper.or(wrapper->wrapper.eq("name", name).eq("create_date", dateStr));
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
List<UserCorpwxTime> timeList = userCorpwxTimeMapper.selectList(userCorpwxTimeQueryWrapper);
|
|
|
//过滤匹配当前的数据
|
|
|
for (Map map : nameList) {
|
|
|
String corpwxUserid = (String)map.get("corpwxUserid");
|
|
|
+ String name = (String)map.get("name");
|
|
|
String dateStr = (String)map.get("dateStr");
|
|
|
- Optional<UserCorpwxTime> first = timeList.stream().filter(time -> time.getCorpwxUserid().equals(corpwxUserid) && dtf.format(time.getCreateDate()).equals(dateStr)).findFirst();
|
|
|
+ Optional<UserCorpwxTime> first = timeList.stream().filter(time -> ((time.getCorpwxUserid() != null && time.getCorpwxUserid().equals(corpwxUserid)) || (time.getCorpwxUserid() == null && name != null && name.equals(time.getName()))) && dtf.format(time.getCreateDate()).equals(dateStr)).findFirst();
|
|
|
if (first.isPresent()) {
|
|
|
double wh = first.get().getWorkHours();
|
|
|
//赋值打卡时长
|