mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
bugfix
This commit is contained in:
@@ -897,16 +897,16 @@ public class EmpSalaryService extends BaseService<EmpSalaryEntity, EmpSalaryRepo
|
||||
|
||||
private List<EmpSalaryEntity> queryHisSalary(List<String> employeesIds) {
|
||||
|
||||
em.createNativeQuery(
|
||||
List ids = em.createNativeQuery(
|
||||
"""
|
||||
with tmp1 as (
|
||||
with tmp1 as (
|
||||
|
||||
select s.id, rank() over (partition by employee_id order by batch_year_month desc ) rk from t_emp_salary s where s.employee_id in :ids
|
||||
)
|
||||
select s.id, rank() over (partition by employee_id order by batch_year_month desc ) rk from t_emp_salary s where s.employee_id in :ids
|
||||
)
|
||||
|
||||
select id from tmp1 where rk = 1
|
||||
select id from tmp1 where rk = 1
|
||||
|
||||
""",
|
||||
""",
|
||||
String.class)
|
||||
.setParameter("ids", employeesIds)
|
||||
.getResultList();
|
||||
@@ -914,7 +914,7 @@ select id from tmp1 where rk = 1
|
||||
return em.createQuery(
|
||||
"select s from EmpSalaryEntity s where s.employee.id in :ids",
|
||||
EmpSalaryEntity.class)
|
||||
.setParameter("ids", employeesIds)
|
||||
.setParameter("ids", ids)
|
||||
.getResultList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user