Commit 246a7fd6 by sdif

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

parent 085d7d00
...@@ -226,6 +226,10 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -226,6 +226,10 @@ public class EmployeesServiceImpl implements IEmployeesService {
*/ */
@Override @Override
public TableDataInfo<EmployeesVo> queryPageAppRanking(EmployeesBo bo, PageQuery pageQuery) { public TableDataInfo<EmployeesVo> queryPageAppRanking(EmployeesBo bo, PageQuery pageQuery) {
// 获取当前日期
LocalDate currentDate = LocalDate.now();
// 获取当前年份
int year = currentDate.getYear();
Page<EmployeesVo> result = baseMapper.selectEmployees(bo, pageQuery.build()); Page<EmployeesVo> result = baseMapper.selectEmployees(bo, pageQuery.build());
Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> { Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> {
EmployeesVo.forEach(t -> { EmployeesVo.forEach(t -> {
...@@ -235,6 +239,7 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -235,6 +239,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
.orderByDesc(TotalOrder::getId) .orderByDesc(TotalOrder::getId)
.last("LIMIT 1")); .last("LIMIT 1"));
t.setTotalOrderVo(totalOrder); t.setTotalOrderVo(totalOrder);
t.setWrokYear(year - Integer.parseInt(t.getStartYear()));
}); });
}); });
return TableDataInfo.build(result); 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