From 258c8805439f9f6cbfe1b0a16e9a6f9ab11008c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 3 Feb 2023 15:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sql/申报表字段缺失.sql | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 resource/sql/申报表字段缺失.sql diff --git a/resource/sql/申报表字段缺失.sql b/resource/sql/申报表字段缺失.sql new file mode 100644 index 000000000..7eb4d4a69 --- /dev/null +++ b/resource/sql/申报表字段缺失.sql @@ -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'; \ No newline at end of file