select b.user_name 姓名,c.emp_code 员工编号,a.salary_date ,'人才储备中心' 组织,a.salary_name,a.salary_value
from t_memeber_salary a
LEFT JOIN t_member_info b on a.member_id=b.id
LEFT JOIN employee c on b.employee_id = c.id
where 1=1
${if(len(员工编号) == 0,"","and c.emp_code like '%"+员工编号+"%'")}
and ${if(len(姓名) == 0,"","and b.user_name like '%"+姓名+"%'")}
and ${if(len(组织) == 0,"","and '人才储备中心' like '%"+组织+"%'")}
and DATE_FORMAT(a.salary_date,'%Y-%m')>='${开始时间}'
and DATE_FORMAT(a.salary_date,'%Y-%m')<='${结束时间}'
order by a.salary_date ASC