申报表字段缺失

This commit is contained in:
钱涛 2023-02-03 15:14:04 +08:00
parent cdfced412f
commit 258c880543
1 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,81 @@
-- 累计子女教育
UPDATE a set a.field_value = b.add_up_child_education
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpChildEducation';
-- 累计住房贷款利息
UPDATE a set a.field_value = b.add_up_housing_loan_interest
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpHousingLoanInterest';
-- 累计住房租金
UPDATE a set a.field_value = b.add_up_housing_rent
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpHousingRent';
-- 累计继续教育
UPDATE a set a.field_value = b.add_up_continuing_education
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpContinuingEducation';
--
UPDATE a set a.field_value = b.add_up_support_elderly
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpSupportElderly';
--
UPDATE a set a.field_value = b.add_up_illness_medical
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpIllnessMedical';
--
UPDATE a set a.field_value = b.add_up_infant_care
FROM hrsa_tax_declaration_detail a,hrsa_add_up_deduction b
where a.employee_id = b.employee_id
and b.tax_agent_id = 4
and a.tax_declaration_id = 1675151551804
and a.delete_type = 0
and b.delete_type =0
and b.declare_month='2023-01-01 00:00:00'
and a.field_code = 'addUpInfantCare';