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