处理假期问题
This commit is contained in:
parent
74e439eb15
commit
309b9804b4
@ -98,7 +98,7 @@
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="userIds != null and userIds.length > 0">
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
AND a.owner_user_id in
|
||||
<foreach collection="userIds" item="id" index="index" open="(" close=")" separator=",">
|
||||
#{id}
|
||||
|
@ -281,10 +281,12 @@ public class HolidayUserRecordServiceImpl implements HolidayUserRecordService {
|
||||
String year = String.valueOf(now.getYear());
|
||||
newHolidayUserDOList.forEach(
|
||||
a -> {
|
||||
if (BigDecimal.ZERO.compareTo(a.getHolidayBalance()) > 0) {
|
||||
newHolidayUserEmploymentRecordDOList.add(new HolidayUserEmploymentRecordDO().setUserId(a.getUserId())
|
||||
.setHolidaySettingId(holidaySetting.getId())
|
||||
.setYearNum(year));
|
||||
}
|
||||
}
|
||||
);
|
||||
if (CollUtil.isNotEmpty(newHolidayUserEmploymentRecordDOList)) {
|
||||
holidayUserEmploymentRecordMapper.insertBatch(newHolidayUserEmploymentRecordDOList);
|
||||
@ -300,6 +302,7 @@ public class HolidayUserRecordServiceImpl implements HolidayUserRecordService {
|
||||
List<AdminUserDO> users = this.getUsersByRange(holidaySetting, holidaySettingRangeDOS);
|
||||
// -- 计算获取每个人的假期额度
|
||||
Map<Long, BigDecimal> userQuotaMap = this.getQuotaMap(users, holidayBalanceSettingDO, holidayWorkingAgeDOS);
|
||||
log.info("计算获取每个人的假期额度 userQuotaMap:{}", userQuotaMap);
|
||||
// -- 获取用户的假期表
|
||||
List<Long> userIds = users.stream().map(AdminUserDO::getId).collect(Collectors.toList());
|
||||
Map<Long, AdminUserDO> userMap = users.stream().collect(Collectors.toMap(AdminUserDO::getId, a -> a));
|
||||
|
Loading…
Reference in New Issue
Block a user