diff --git a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml index 8c962287b..98ae3bf84 100644 --- a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml @@ -332,7 +332,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 @@ -352,7 +352,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