Commit 246a7fd6 by sdif

排行榜新增陪诊员工作年限

parent 085d7d00
......@@ -226,6 +226,10 @@ public class EmployeesServiceImpl implements IEmployeesService {
*/
@Override
public TableDataInfo<EmployeesVo> queryPageAppRanking(EmployeesBo bo, PageQuery pageQuery) {
// 获取当前日期
LocalDate currentDate = LocalDate.now();
// 获取当前年份
int year = currentDate.getYear();
Page<EmployeesVo> result = baseMapper.selectEmployees(bo, pageQuery.build());
Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> {
EmployeesVo.forEach(t -> {
......@@ -235,6 +239,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
.orderByDesc(TotalOrder::getId)
.last("LIMIT 1"));
t.setTotalOrderVo(totalOrder);
t.setWrokYear(year - Integer.parseInt(t.getStartYear()));
});
});
return TableDataInfo.build(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment