|
|
@ -46,23 +46,17 @@ public class ClockInServiceImpl extends ServiceImpl<ClockInMapper, ClockInEntity |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<ClockInResponseDTO> pageCondition(ClockInRequestDTO param, Query query) { |
|
|
|
public IPage<ClockInResponseDTO> pageCondition(ClockInRequestDTO param, Query query) { |
|
|
|
QueryWrapper<ClockInEntity> queryWrapper = new QueryWrapper<ClockInEntity>() {{ |
|
|
|
IPage<ClockInResponseDTO> page = this.baseMapper.pageCondition(param,Condition.getPage(query)); |
|
|
|
if(ObjectUtil.isNotEmpty(param.getClockPerson())){ |
|
|
|
if(CollectionUtil.isEmpty(page.getRecords())){ |
|
|
|
eq("CLOCK_PERSON",param.getClockPerson()); |
|
|
|
return page; |
|
|
|
} |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(param.getStatus())){ |
|
|
|
|
|
|
|
eq("STATUS",param.getStatus()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(param.getStartTime())){ |
|
|
|
|
|
|
|
ge("PLAN_START_TIME",param.getStartTime()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if(StringUtils.isNotEmpty(param.getEndTime())){ |
|
|
|
page.setRecords(page.getRecords().stream().peek(record->{ |
|
|
|
le("PLAN_END_TIME",param.getEndTime()); |
|
|
|
User user = UserCache.getUser(record.getClockPerson()); |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
|
|
|
|
record.setClockPersonName(user.getRealName()); |
|
|
|
} |
|
|
|
} |
|
|
|
}}; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
IPage pages = super.page(Condition.getPage(query), queryWrapper); |
|
|
|
return page; |
|
|
|
List list = ClockInWrapper.build().listVO(pages.getRecords()); |
|
|
|
|
|
|
|
return pages.setRecords(list); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|