case s.STATUS when 0 then '待提交' when 1 then '待审核' when 2 then '待推送明细' when 3 then '已推送待发放' when 4 then '已发放' when 5 then '审核不通过' when 6 then '确认不通过' when 7 then '财务退回' when 10 then '推送失败' when 11 then '已审核生成收入中' when 12 then '已审核生成收入失败' else '-' end as status
,
a.DEPT_NAME as deptName,
a.DEPT_NO as deptNo,
a.SETTLEMENT_MONTH as settlementMonth,
a.SALARY_MONTH as salaryMonth,
a.EMP_NAME as empName,
a.EMP_IDCARD as empIdcard,
a.EMP_PHONE as empPhone,
a.BANK_NO as bankNo,
a.BANK_NAME as bankName,
ap.AREA_NAME as bankProvince,
ac.AREA_NAME as bankCity,
a.BANK_SUB_NAME as bankSubName,
a.RELAY_SALARY as relaySalary,
if(a.SALARY_GIVE_TIME='1','暂停发','立即发') as salaryGiveTime,
if(a.IS_PERSON_TAX='1','个人承担部分税费',if(a.IS_PERSON_TAX='2','个人承担全部税费','公司承担全部税费')) as isPersonTax,
a.SALARY_TAX as salaryTax,
a.SALARY_TAX_UNIT as salaryTaxUnit,
a.RELAY_SALARY_UNIT as relaySalaryUnit,
a.ACTUAL_SALARY as actualSalary,
if(a.IS_REPEAT='0','否','是') as isRepeat,
if(a.OWN_FLAG='0','否','是') as ownFlag,
if(a.HAVE_SALARY_FLAG='0','否','是') as haveSalaryFlag,
left join t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
left join sys_area ap on ap.id=a.BANK_PROVINCE
left join sys_area ac on ac.id=a.BANK_CITY
where s.APPLY_NO = #{applyNo} and a.DELETE_FLAG = 0
case s.STATUS when 0 then '待提交' when 1 then '待审核' when 2 then '待推送明细' when 3 then '已推送待发放' when 4 then '已发放' when 5 then '审核不通过' when 6 then '确认不通过' when 7 then '财务退回' when 10 then '推送失败' when 11 then '已审核生成收入中' when 12 then '已审核生成收入失败' else '-' end as status
,
a.DEPT_NAME as deptName,
a.DEPT_NO as deptNo,
a.SETTLEMENT_MONTH as settlementMonth,
a.SALARY_MONTH as salaryMonth,
a.EMP_NAME as empName,
a.EMP_IDCARD as empIdcard,
a.EMP_PHONE as empPhone,
a.BANK_NO as bankNo,
a.BANK_NAME as bankName,
ap.AREA_NAME as bankProvince,
ac.AREA_NAME as bankCity,
a.BANK_SUB_NAME as bankSubName,
a.RELAY_SALARY as relaySalary,
a.SALARY_TAX as salaryTax,
a.ACTUAL_SALARY as actualSalary,
if(a.IS_REPEAT='0','否','是') as isRepeat,
if(a.OWN_FLAG='0','否','是') as ownFlag,
if(a.HAVE_SALARY_FLAG='0','否','是') as haveSalaryFlag,
left join t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
left join sys_area ap on ap.id=a.BANK_PROVINCE
left join sys_area ac on ac.id=a.BANK_CITY
where s.APPLY_NO = #{applyNo} and a.DELETE_FLAG = 0