Commit 592a7290 by Wangmin

Merge remote-tracking branch 'origin/dev' into dev

parents 8dfacc3e 246a7fd6
......@@ -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);
......@@ -246,6 +251,10 @@ public class EmployeesServiceImpl implements IEmployeesService {
*/
@Override
public EmployeesVo queryByApp(Integer id) {
// 获取当前日期
LocalDate currentDate = LocalDate.now();
// 获取当前年份
int year = currentDate.getYear();
EmployeesVo employeesVo = baseMapper.selectEmployeesById(id);
if(null != employeesVo){
List<TotalOrderVo> totalOrder = totalOrderMapper.selectVoList(Wrappers.<TotalOrder>lambdaQuery()
......@@ -260,6 +269,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
}
}
}
employeesVo.setWrokYear(year - Integer.parseInt(employeesVo.getStartYear()));
employeesVo.setTotalOrderVo(totalOrder);
}
return employeesVo;
......
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