From c2e38b18ce24828e22bce75144d5c7ee64b79ae0 Mon Sep 17 00:00:00 2001 From: lihongjie0209 Date: Mon, 2 Sep 2024 11:03:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E5=BD=92=E6=A1=A3=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E8=BF=9B=E8=A1=8C=E5=B7=A5=E8=B5=84=E5=BD=92=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../empSalary/service/EmpSalaryService.java | 33 ++++++++++++++----- .../service/EmpSalaryBatchService.java | 3 ++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/main/java/cn/lihongjie/coal/empSalary/service/EmpSalaryService.java b/src/main/java/cn/lihongjie/coal/empSalary/service/EmpSalaryService.java index b0ad1524..0da74f5e 100644 --- a/src/main/java/cn/lihongjie/coal/empSalary/service/EmpSalaryService.java +++ b/src/main/java/cn/lihongjie/coal/empSalary/service/EmpSalaryService.java @@ -298,7 +298,8 @@ public class EmpSalaryService extends BaseService queryHisSalary(List employeesIds) { - List ids = em.createNativeQuery( - """ + List ids = + em.createNativeQuery( + """ 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 @@ -868,13 +886,12 @@ public class EmpSalaryService extends BaseService