|
|
@@ -946,12 +946,18 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void userRecordMerge() {
|
|
|
+ public AjaxResult userRecordMerge() {
|
|
|
Long userId = SecurityUtils.getUserId();
|
|
|
+ List<UserRecord> list = userRecordMapper.selectByUserId(userId);
|
|
|
+ //未匹配数量
|
|
|
+ List<UserRecord> collect = list.stream().filter(userRecord -> userRecord.getClockStatus() == 2).collect(Collectors.toList());
|
|
|
+ int unmatched = collect.size();
|
|
|
+ int matched = list.size()-unmatched;
|
|
|
//合并到打卡表
|
|
|
userRecordMapper.userRecordMerge(userId);
|
|
|
//清楚考勤合并数据
|
|
|
userRecordMapper.deleteByUserId(userId);
|
|
|
+ return AjaxResult.success(String.format("导入数据未匹配%s条,完成匹配%s条.", unmatched,matched));
|
|
|
}
|
|
|
|
|
|
@Override
|