修复往期累计不显示的问题

This commit is contained in:
钱涛 2022-07-13 10:13:49 +08:00
parent 1d90bb148e
commit 057ca97c9e
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@
FROM
hrsa_add_up_situation t1
INNER JOIN
(SELECT employee_id, MAX(tax_year_month) tax_year_month FROM hrsa_add_up_situation GROUP BY employee_id) t ON
(SELECT employee_id, MAX(tax_year_month) tax_year_month FROM hrsa_add_up_situation WHERE delete_type = 0 GROUP BY employee_id) t ON
t.employee_id = t1.employee_id AND t.tax_year_month = t1.tax_year_month
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid