diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index d1a30653c..e31dada38 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=3.0.2.2504.03 +version=3.0.2.2504.04 openFormulaForcedEditing=true \ No newline at end of file diff --git a/resource/sqlupgrade/DM/sql202506190103.sql b/resource/sqlupgrade/DM/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/DM/sql202507010303.sql b/resource/sqlupgrade/DM/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/DM/sql202507010403.sql b/resource/sqlupgrade/DM/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/DM/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/resource/sqlupgrade/GS/sql202506190103.sql b/resource/sqlupgrade/GS/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/GS/sql202507010303.sql b/resource/sqlupgrade/GS/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/GS/sql202507010403.sql b/resource/sqlupgrade/GS/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/GS/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/resource/sqlupgrade/JC/sql202506190103.sql b/resource/sqlupgrade/JC/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/JC/sql202507010303.sql b/resource/sqlupgrade/JC/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/JC/sql202507010403.sql b/resource/sqlupgrade/JC/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/JC/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202506190103.sql b/resource/sqlupgrade/Mysql/sql202506190103.sql new file mode 100644 index 000000000..2ee229b09 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202506190103.sql @@ -0,0 +1,10 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); \ No newline at end of file diff --git a/resource/sqlupgrade/Mysql/sql202507010303.sql b/resource/sqlupgrade/Mysql/sql202507010303.sql new file mode 100644 index 000000000..8b3a971e8 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202507010303.sql @@ -0,0 +1,7 @@ +ALTER TABLE hrsa_free_income ADD COLUMN income_category int(0); +ALTER TABLE hrsa_derate_deduction ADD COLUMN income_category int(0); +ALTER TABLE hrsa_endowment_insurance ADD COLUMN income_category int(0); +ALTER TABLE hrsa_grant_donation ADD COLUMN income_category int(0); +ALTER TABLE hrsa_health_insurance ADD COLUMN income_category int(0); +ALTER TABLE hrsa_other_derate_deduction ADD COLUMN income_category int(0); +ALTER TABLE hrsa_personal_pension ADD COLUMN income_category int(0); \ No newline at end of file diff --git a/resource/sqlupgrade/Mysql/sql202507010403.sql b/resource/sqlupgrade/Mysql/sql202507010403.sql new file mode 100644 index 000000000..d6247eefc --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202507010403.sql @@ -0,0 +1,7 @@ +update hrsa_free_income set income_category = 1; +update hrsa_derate_deduction set income_category = 1; +update hrsa_endowment_insurance set income_category = 1; +update hrsa_grant_donation set income_category = 1; +update hrsa_health_insurance set income_category = 1; +update hrsa_other_derate_deduction set income_category = 1; +update hrsa_personal_pension set income_category = 1; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202506190103.sql b/resource/sqlupgrade/Oracle/sql202506190103.sql new file mode 100644 index 000000000..4196b1982 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202506190103.sql @@ -0,0 +1,18 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0) +/ + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0) +/ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202507010303.sql b/resource/sqlupgrade/Oracle/sql202507010303.sql new file mode 100644 index 000000000..7cfc02c85 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202507010303.sql @@ -0,0 +1,20 @@ +ALTER TABLE hrsa_free_income ADD income_category int +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int +/ \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202507010403.sql b/resource/sqlupgrade/Oracle/sql202507010403.sql new file mode 100644 index 000000000..4eff5bab6 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202507010403.sql @@ -0,0 +1,14 @@ +update hrsa_free_income set income_category = 1 +/ +update hrsa_derate_deduction set income_category = 1 +/ +update hrsa_endowment_insurance set income_category = 1 +/ +update hrsa_grant_donation set income_category = 1 +/ +update hrsa_health_insurance set income_category = 1 +/ +update hrsa_other_derate_deduction set income_category = 1 +/ +update hrsa_personal_pension set income_category = 1 +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202506190103.sql b/resource/sqlupgrade/PG/sql202506190103.sql new file mode 100644 index 000000000..2ee229b09 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202506190103.sql @@ -0,0 +1,10 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202507010303.sql b/resource/sqlupgrade/PG/sql202507010303.sql new file mode 100644 index 000000000..f54b534b9 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202507010303.sql @@ -0,0 +1,20 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202507010403.sql b/resource/sqlupgrade/PG/sql202507010403.sql new file mode 100644 index 000000000..f5ebbdb76 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202507010403.sql @@ -0,0 +1,20 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202506190103.sql b/resource/sqlupgrade/SQLServer/sql202506190103.sql new file mode 100644 index 000000000..adfe5e358 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202506190103.sql @@ -0,0 +1,18 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0) +go + + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0) +go +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0) +go \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202507010303.sql b/resource/sqlupgrade/SQLServer/sql202507010303.sql new file mode 100644 index 000000000..9ca6c463d --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202507010303.sql @@ -0,0 +1,20 @@ +ALTER TABLE hrsa_free_income ADD income_category int +GO + +ALTER TABLE hrsa_derate_deduction ADD income_category int +GO + +ALTER TABLE hrsa_endowment_insurance ADD income_category int +GO + +ALTER TABLE hrsa_grant_donation ADD income_category int +GO + +ALTER TABLE hrsa_health_insurance ADD income_category int +GO + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int +GO + +ALTER TABLE hrsa_personal_pension ADD income_category int +GO \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202507010403.sql b/resource/sqlupgrade/SQLServer/sql202507010403.sql new file mode 100644 index 000000000..99fc8e409 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202507010403.sql @@ -0,0 +1,14 @@ +update hrsa_free_income set income_category = 1 +GO +update hrsa_derate_deduction set income_category = 1 +GO +update hrsa_endowment_insurance set income_category = 1 +GO +update hrsa_grant_donation set income_category = 1 +GO +update hrsa_health_insurance set income_category = 1 +GO +update hrsa_other_derate_deduction set income_category = 1 +GO +update hrsa_personal_pension set income_category = 1 +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202506190103.sql b/resource/sqlupgrade/ST/sql202506190103.sql new file mode 100644 index 000000000..952cd69b8 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202506190103.sql @@ -0,0 +1,24 @@ +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158200, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '当期收入额', 'dividendsIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158201, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '免税收入', 'dividendsFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158202, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '准予扣除的捐赠额', 'dividendsAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158203, NULL, NULL, NULL, 0, 'all_teams', '1', '800', '减免税额', 'dividendsTaxDeduction', 'string', 'jmse', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158204, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '本期收入', 'listedCompanyIncome', 'number', 'sre', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158206, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '免税收入', 'listedCompanyFreeIncome', 'number', 'mssd', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158207, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '准予扣除的捐赠额', 'listedCompanyAllowedDonation', 'number', 'zykcjze', NULL, 0); +/ + +INSERT INTO hrsa_tax_report_column(id, create_time, update_time, creator, delete_type, tenant_key, tax_report_type, income_category, report_column_name, report_column_data_index, data_type, request_param_key, report_column_label, contrast_type) VALUES (805915446042158208, NULL, NULL, NULL, 0, 'all_teams', '1', '810', '减免税额', 'listedCompanyTaxDeduction', 'string', 'jmse', NULL, 0); +/ + diff --git a/resource/sqlupgrade/ST/sql202507010303.sql b/resource/sqlupgrade/ST/sql202507010303.sql new file mode 100644 index 000000000..a25d13d65 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202507010303.sql @@ -0,0 +1,21 @@ +ALTER TABLE hrsa_free_income ADD income_category int; +/ + +ALTER TABLE hrsa_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_endowment_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_grant_donation ADD income_category int; +/ + +ALTER TABLE hrsa_health_insurance ADD income_category int; +/ + +ALTER TABLE hrsa_other_derate_deduction ADD income_category int; +/ + +ALTER TABLE hrsa_personal_pension ADD income_category int; +/ + diff --git a/resource/sqlupgrade/ST/sql202507010403.sql b/resource/sqlupgrade/ST/sql202507010403.sql new file mode 100644 index 000000000..69d97a34e --- /dev/null +++ b/resource/sqlupgrade/ST/sql202507010403.sql @@ -0,0 +1,21 @@ +update hrsa_free_income set income_category = 1; +/ + +update hrsa_derate_deduction set income_category = 1; +/ + +update hrsa_endowment_insurance set income_category = 1; +/ + +update hrsa_grant_donation set income_category = 1; +/ + +update hrsa_health_insurance set income_category = 1; +/ + +update hrsa_other_derate_deduction set income_category = 1; +/ + +update hrsa_personal_pension set income_category = 1; +/ + diff --git a/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java index c0751492b..dc2ec8f44 100644 --- a/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/DerateDeductionListDTO.java @@ -82,17 +82,22 @@ public class DerateDeductionListDTO { @TableTitle(title = "璇佷欢鍙风爜", dataIndex = "idNo", key = "idNo") private String idNo; - @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + + @ExcelProperty(index = 7) @TableTitle(title = "鍑忓厤浜嬮」", dataIndex = "derateItem", key = "derateItem") private String derateItem; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "鍑忓厤鎬ц川", dataIndex = "derateProperty", key = "derateProperty") @ElogTransform(name = "鍑忓厤鎬ц川") private String derateProperty; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "鍑忓厤閲戦", dataIndex = "derateAmount", key = "derateAmount") @ElogTransform(name = "鍑忓厤閲戦") private String derateAmount; diff --git a/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java b/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java index 4b48e20bc..1a9919d01 100644 --- a/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/EndowmentInsuranceListDTO.java @@ -82,27 +82,32 @@ public class EndowmentInsuranceListDTO { private String idNo; @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "鐢虫姤鎵i櫎鏈堜唤", dataIndex = "deductionMonth", key = "deductionMonth") @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") private Date deductionMonth; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "绋庡欢鍏昏佽处鎴风紪鍙", dataIndex = "accountNumber", key = "accountNumber") private String accountNumber; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "鎶ョ◣鏍¢獙鐮", dataIndex = "checkCode", key = "checkCode") private String checkCode; - @ExcelProperty(index = 9) + @ExcelProperty(index = 10) @TableTitle(title = "骞村害淇濊垂", dataIndex = "yearPremium", key = "yearPremium") private String yearPremium; - @ExcelProperty(index = 10) + @ExcelProperty(index = 11) @TableTitle(title = "鏈堝害淇濊垂", dataIndex = "monthPremium", key = "monthPremium") private String monthPremium; - @ExcelProperty(index = 11) + @ExcelProperty(index = 12) @TableTitle(title = "鏈湡鎵i櫎閲戦", dataIndex = "currentDeduction", key = "currentDeduction") private String currentDeduction; diff --git a/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java b/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java index 698dcbde0..d6ae1ada7 100644 --- a/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/FreeIncomeListDTO.java @@ -84,14 +84,19 @@ public class FreeIncomeListDTO { @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "鍏嶇◣浜嬮」", dataIndex = "freeItem", key = "freeItem") private String freeItem; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "鍏嶇◣鎬ц川", dataIndex = "freeProperty", key = "freeProperty") private String freeProperty; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "鍏嶇◣閲戦", dataIndex = "freeAmount", key = "freeAmount") @Encrypt private String freeAmount; diff --git a/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java b/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java index f38aa7181..a6a26aaf1 100644 --- a/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/GrantDonationListDTO.java @@ -88,33 +88,38 @@ public class GrantDonationListDTO { @ExcelProperty(index = 5) private String idNo; - @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + + @ExcelProperty(index = 7) @TableTitle(title = "鍙楄禒鍗曚綅鍚嶇О", dataIndex = "recipientName", key = "recipientName") private String recipientName; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "鍙楄禒鍗曚綅绾崇◣浜鸿瘑鍒彿", dataIndex = "taxCode", key = "taxCode") private String taxCode; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "鎹愯禒鍑瘉鍙", dataIndex = "donationNumber", key = "donationNumber") private String donationNumber; - @ExcelProperty(index = 9) + @ExcelProperty(index = 10) @TableTitle(title = "鎹愯禒鏃ユ湡", dataIndex = "donateDate", key = "donateDate") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date donateDate; - @ExcelProperty(index = 10) + @ExcelProperty(index = 11) @TableTitle(title = "鎹愯禒閲戦", dataIndex = "donateAmount", key = "donateAmount") private String donateAmount; - @ExcelProperty(index = 11) + @ExcelProperty(index = 12) @TableTitle(title = "鎵i櫎姣斾緥", dataIndex = "deductionProportion", key = "deductionProportion") private String deductionProportion; - @ExcelProperty(index = 12) + @ExcelProperty(index = 13) @TableTitle(title = "瀹為檯鎵i櫎閲戦", dataIndex = "actualDeduction", key = "actualDeduction") private String actualDeduction; diff --git a/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java b/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java index 890682379..6f2393a9e 100644 --- a/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/HealthInsuranceListDTO.java @@ -85,23 +85,28 @@ public class HealthInsuranceListDTO { private String idNo; @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "绋庝紭璇嗗埆鐮", dataIndex = "identificationNumber", key = "identificationNumber") private String identificationNumber; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "淇濆崟鐢熸晥鏃ユ湡", dataIndex = "effectiveDate", key = "effectiveDate") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date effectiveDate; - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "骞村害淇濊垂", dataIndex = "yearPremium", key = "yearPremium") private String yearPremium; - @ExcelProperty(index = 9) + @ExcelProperty(index = 10) @TableTitle(title = "鏈堝害淇濊垂", dataIndex = "monthPremium", key = "monthPremium") private String monthPremium; - @ExcelProperty(index = 10) + @ExcelProperty(index = 11) @TableTitle(title = "鏈湡鎵i櫎閲戦", dataIndex = "currentDeduction", key = "currentDeduction") private String currentDeduction; diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java index d4d292a14..216b5ab7a 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDerateDeductionListDTO.java @@ -85,10 +85,15 @@ public class OtherDerateDeductionListDTO { private String idNo; @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + + @ExcelProperty(index = 7) @TableTitle(title = "鍑忓厤绋庨", dataIndex = "otherDeduction", key = "otherDeduction") private String otherDeduction; - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "澶囨敞", dataIndex = "remark", key = "remark") private String remark; diff --git a/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java index d4f28e78b..eafeae03e 100644 --- a/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/PersonalPensionListDTO.java @@ -83,6 +83,11 @@ public class PersonalPensionListDTO { @TableTitle(title = "璇佷欢鍙风爜", dataIndex = "idNo", key = "idNo") private String idNo; + @ExcelProperty(index = 6) + @TableTitle(title = "鎵寰楅」鐩", dataIndex = "incomeCategoryName", key = "incomeCategoryName") + private String incomeCategoryName; + private Integer incomeCategory; + //缂磋垂鏈堝害 private Date payMonth; @@ -91,17 +96,17 @@ public class PersonalPensionListDTO { private Integer voucherType; //鍑瘉绫诲埆鍚嶇О - @ExcelProperty(index = 6) + @ExcelProperty(index = 7) @TableTitle(title = "鍑瘉绫诲瀷", dataIndex = "voucherTypeName", key = "voucherTypeName") private String voucherTypeName; //鍑瘉缂栫爜 - @ExcelProperty(index = 7) + @ExcelProperty(index = 8) @TableTitle(title = "鍑瘉缂栫爜", dataIndex = "voucherNo", key = "voucherNo") private String voucherNo; //缂磋垂閲戦 - @ExcelProperty(index = 8) + @ExcelProperty(index = 9) @TableTitle(title = "缂磋垂閲戦", dataIndex = "payAmount", key = "payAmount") private String payAmount; diff --git a/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java b/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java index cd70723d3..196da93c3 100644 --- a/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/DerateDeductionSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,12 @@ public class DerateDeductionSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //鍑忓厤浜嬮」 private String derateItem; diff --git a/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java b/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java index f86c8603b..044e92295 100644 --- a/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/EndowmentInsuranceSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; import lombok.Builder; @@ -30,6 +31,12 @@ public class EndowmentInsuranceSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //鐢虫姤鎵i櫎鏈堜唤 @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") diff --git a/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java b/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java index 216f2e3a5..213a3391d 100644 --- a/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/FreeIncomeSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,11 @@ public class FreeIncomeSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; //鍏嶇◣浜嬮」 private String freeItem; diff --git a/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java b/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java index ec98e212b..47ef897ca 100644 --- a/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/GrantDonationSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,12 @@ public class GrantDonationSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //鍙楄禒鍗曚綅鍚嶇О private String recipientName; diff --git a/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java b/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java index 13c8a9030..971fc5ccb 100644 --- a/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/HealthInsuranceSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,6 +29,12 @@ public class HealthInsuranceSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //绋庝紭璇嗗埆鐮 private String identificationNumber; diff --git a/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java b/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java index ab4114d6e..8aa1c17d9 100644 --- a/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/OtherDerateDeductionSaveParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.param; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,6 +27,12 @@ public class OtherDerateDeductionSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //鍑忓厤绋庨 private String otherDeduction; diff --git a/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java b/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java index ecd0f92c5..ad7ceea3f 100644 --- a/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java +++ b/src/com/engine/salary/entity/datacollection/param/PersonalPensionSaveParam.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.param; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.datacollection.EnumDeductionDataSource; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -31,6 +32,12 @@ public class PersonalPensionSaveParam { //涓昏〃鏁版嵁Id private Long mainId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + //缂磋垂鏈堝害 private Date payMonth; diff --git a/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java index 5d94d3627..226f05848 100644 --- a/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/DerateDeductionPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import io.swagger.annotations.ApiModel; import lombok.AllArgsConstructor; import lombok.Builder; @@ -42,6 +43,12 @@ public class DerateDeductionPO{ @ElogTransform(name = "涓◣鎵g即涔夊姟浜") private Long taxAgentId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "鍑忓厤浜嬮」") private String derateItem; diff --git a/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java b/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java index 9bb444ebe..6718ee753 100644 --- a/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java +++ b/src/com/engine/salary/entity/datacollection/po/EndowmentInsurancePO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -41,6 +42,12 @@ public class EndowmentInsurancePO { @ElogTransform(name = "涓◣鎵g即涔夊姟浜篒D") private Long taxAgentId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "鐢虫姤鎵i櫎鏈堜唤") private Date deductionMonth; diff --git a/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java b/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java index 085b7f751..96c39dfc6 100644 --- a/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java +++ b/src/com/engine/salary/entity/datacollection/po/FreeIncomePO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -52,6 +53,12 @@ public class FreeIncomePO { @ElogTransform(name = "褰掓。鐘舵 0鏈綊妗 1宸插綊妗") private Integer fileStatus; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + /** * 浜哄憳绫诲瀷 * diff --git a/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java b/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java index f65f73caa..6cce0fb66 100644 --- a/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java +++ b/src/com/engine/salary/entity/datacollection/po/GrantDonationPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -38,6 +39,12 @@ public class GrantDonationPO { @ElogTransform(name = "涓◣鎵g即涔夊姟浜") private Long taxAgentId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "鍙楄禒鍗曚綅鍚嶇О") private String recipientName; diff --git a/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java b/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java index 86152ffef..7ecad5ab7 100644 --- a/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java +++ b/src/com/engine/salary/entity/datacollection/po/HealthInsurancePO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -40,6 +41,12 @@ public class HealthInsurancePO { @ElogTransform(name = "涓◣鎵g即涔夊姟浜") private Long taxAgentId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "绋庝紭璇嗗埆鐮") private String identificationNumber; diff --git a/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java index c7b19d239..f4dabce21 100644 --- a/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/OtherDeductionPO.java @@ -138,6 +138,7 @@ public class OtherDeductionPO { private List employeeIds; private Collection taxAgentIds; + private Integer incomeCategory; private List freeIncomeList; diff --git a/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java index 74f403bab..c0ff75f42 100644 --- a/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/OtherDerateDeductionPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -40,6 +41,12 @@ public class OtherDerateDeductionPO { @ElogTransform(name = "涓◣鎵g即涔夊姟浜") private Long taxAgentId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "鍑忓厤绋庨") private String otherDeduction; diff --git a/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java b/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java index 766ad4783..b60bda6fd 100644 --- a/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/PersonalPensionPO.java @@ -3,6 +3,7 @@ package com.engine.salary.entity.datacollection.po; import com.engine.hrmelog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.datacollection.EnumDeductionDataSource; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -45,6 +46,12 @@ public class PersonalPensionPO{ @ElogTransform(name = "涓◣鎵g即涔夊姟浜") private Long taxAgentId; + /** + * 鎵寰楅」鐩 + * @see IncomeCategoryEnum + */ + private Integer incomeCategory; + @ElogTransform(name = "鍑瘉绫诲埆") private Integer voucherType; diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index b1360b808..a1f9c65ef 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -850,7 +850,7 @@ public class SalaryBillBO { if ("text".equals(wmClassify)) { wmTextFieldIds = (List) salaryBillWatermark.getWmSetting().getOrDefault("wmSelectedFieldIds", Collections.emptyList()); - List empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department); + List empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department, HRM_SecondDepartment); if (wmTextFieldIds.contains(HRM_SecondDepartment)) { // 闇瑕佹煡鍒嗛儴 salaryBillWatermark.getWmSetting().put("needQuerySubDepart", true); diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java index 3dab288f0..8be3d2ed9 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTax.java @@ -122,6 +122,9 @@ public class SalaryCalcTax { // 缁煎悎鎵寰 requestParam.put("zhsd", buildZHSDRequestParam(salaryAcctTaxAgents, salaryAcctEmployees, salaryAcctResultValueMap, taxReportColumnMap, salarySobTaxReportRuleMap, employeeDeclares)); + // 缁煎悎鎵寰 + requestParam.put("flsd", buildFLSDRequestParam(salaryAcctTaxAgents, salaryAcctEmployees, + salaryAcctResultValueMap, taxReportColumnMap, salarySobTaxReportRuleMap, employeeDeclares)); resultMap.put(taxAgent.getId(), requestParam); } @@ -196,4 +199,43 @@ public class SalaryCalcTax { } return requestParam; } + + private Map buildFLSDRequestParam(List salaryAcctTaxAgents, + List salaryAcctEmployees, + Map> salaryAcctResultValueMap, + Map> taxReportColumnMap, + Map salarySobTaxReportRuleMap, + List employeeDeclares) { + Map> incomeCategoryKeySalaryAcctEmployeeMap = SalaryEntityUtil + .group2Map(salaryAcctEmployees, SalaryAcctEmployeePO::getIncomeCategory); + + Map requestParam = new HashMap<>(); + + for (SalaryAcctTaxAgentPO salaryAcctTaxAgent : salaryAcctTaxAgents) { + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum + .parseByValue(salaryAcctTaxAgent.getIncomeCategory()); + List taxReportColumns = taxReportColumnMap.get(incomeCategoryEnum.getValue().toString()); + List subSalaryAcctEmployees = incomeCategoryKeySalaryAcctEmployeeMap.get(incomeCategoryEnum.getValue().toString()); + Map salaryAcctEmployeeMap = SalaryEntityUtil.convert2Map(subSalaryAcctEmployees, SalaryAcctEmployeePO::getEmployeeId); + + SalaryCalcTaxRequest salaryCalcTaxRequest = new SalaryCalcTaxRequest(salaryAcctEmployeeMap, + salaryAcctResultValueMap, taxReportColumns, salarySobTaxReportRuleMap, employeeDeclares); + + switch (incomeCategoryEnum) { + case CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES: + List> ssgsgxhllb = salaryCalcTaxRequest.buildRequestParams(IncomeCategoryEnum.CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES, + employeeDeclares, salaryAcctEmployeeMap, salaryAcctResultValueMap); + requestParam.put("ssgsgxhllb", ssgsgxhllb); + break; + case CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES: + List> lxgxhllb = salaryCalcTaxRequest.buildRequestParams(IncomeCategoryEnum.CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES, + employeeDeclares, salaryAcctEmployeeMap, salaryAcctResultValueMap); + requestParam.put("lxgxhllb", lxgxhllb); + break; + default: + break; + } + } + return requestParam; + } } diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java index 7e836152a..39eb225c0 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryCalcTaxRequest.java @@ -200,7 +200,7 @@ public class SalaryCalcTaxRequest { employeeDeclares, salaryAcctEmployeeMap, salaryAcctResultValueMap); } - private List> buildRequestParams(IncomeCategoryEnum incomeCategoryEnum, + public List> buildRequestParams(IncomeCategoryEnum incomeCategoryEnum, List employeeDeclares, Map salaryAcctEmployeeMap, Map> salaryAcctResultValueMap) { diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java index b1a76a4a4..2daccbec2 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java @@ -144,7 +144,7 @@ public class SalarySobItemAggregateBO { .canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1)) .canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1)) .width(salaryItemPO.getWidth()) - .defaultValue(salaryItemPO.getDefaultValue()) + .defaultValue(salarySobItemPO.getDefaultValue()) .build()); } } diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java index 495e4635b..5bcad824f 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.taxdeclaration.bo; +import cn.hutool.core.util.NumberUtil; import com.engine.salary.entity.datacollection.po.*; import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO; import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO; @@ -20,6 +21,7 @@ import weaver.general.Util; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; +import java.util.stream.Collectors; /** * 涓◣鐢虫姤 @@ -35,7 +37,7 @@ public class TaxDeclarationRequest { List taxDeclarations, List taxDeclarationValues, List employeeDeclares, - Map> taxFreeMap) { + Map> taxFreeMap) { Map> objRequestParam = Maps.newHashMap(); Map>> listRequestParam = Maps.newHashMap(); Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); @@ -75,7 +77,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.COMPENSATION_FOR_DISMISS) { // 瑙i櫎鍔冲姩鍚堝悓涓娆℃цˉ鍋块噾 List> employeeRequestParams = listRequestParam.computeIfAbsent("jcldhtycxbcjlb", k -> Lists.newArrayList()); - employeeRequestParam.put("sfzdscmsfb","鏄"); + employeeRequestParam.put("sfzdscmsfb", "鏄"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.INCOME_FOR_INDIVIDUAL_EQUITY_INCENTIVE) { // 涓汉鑲℃潈婵鍔辨敹鍏 @@ -126,7 +128,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.REMUNERATION_FOR_AUTHOR) { // 绋块叕鎵寰 List> employeeRequestParams = listRequestParam.computeIfAbsent("gcsdlb", k -> Lists.newArrayList()); - employeeRequestParam.put("sfzdscmsfb","鏄"); + employeeRequestParam.put("sfzdscmsfb", "鏄"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.ROYALTIES) { // 鐗硅鏉冧娇鐢ㄨ垂鎵寰 @@ -145,11 +147,13 @@ public class TaxDeclarationRequest { } private static void buildOtherDeductionDetailParams(Map> taxFreeMap, Map>> listRequestParam, EmployeeDeclarePO employeeDeclare, IncomeCategoryEnum incomeCategoryEnum, Map employeeRequestParam) { - if (new BigDecimal(employeeRequestParam.getOrDefault("mssd", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String mssd = employeeRequestParam.getOrDefault("mssd", "0").toString(); + if (NumberUtil.isNumber(mssd) && new BigDecimal(mssd).compareTo(new BigDecimal("0")) > 0) { Map freeIncomeMap = taxFreeMap.get(TaxFreeTypeEnum.FREE_INCOME); List poList = (List) freeIncomeMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(poList)) { - List> paramMaps = new ArrayList<>(); + poList = poList.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("msfblb",new ArrayList<>()); for (FreeIncomePO po : poList) { Map map = new HashMap<>(); // 濮撳悕 @@ -169,11 +173,13 @@ public class TaxDeclarationRequest { } } - if (new BigDecimal(employeeRequestParam.getOrDefault("syjkbx", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String syjkbx = employeeRequestParam.getOrDefault("syjkbx", "0").toString(); + if (NumberUtil.isNumber(syjkbx) && new BigDecimal(syjkbx).compareTo(new BigDecimal("0")) > 0) { Map healthInsuranceMap = taxFreeMap.get(TaxFreeTypeEnum.HEALTH_INSURANCE); List pos = (List) healthInsuranceMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("syjkbxfblb",new ArrayList<>()); for (HealthInsurancePO healthInsurancePO : pos) { Map map = new HashMap<>(); // 濮撳悕 @@ -184,7 +190,7 @@ public class TaxDeclarationRequest { map.put("zzhm", employeeDeclare.getCardNum()); // 鎵寰楅」鐩 map.put("sdxm", incomeCategoryEnum.getDefaultLabel()); - map.put("bdsxrq",SalaryDateUtil.getFormatLocalDate(healthInsurancePO.getEffectiveDate()) ); + map.put("bdsxrq", SalaryDateUtil.getFormatLocalDate(healthInsurancePO.getEffectiveDate())); map.put("sysbm", healthInsurancePO.getIdentificationNumber()); map.put("ndbf", healthInsurancePO.getYearPremium()); map.put("ydbf", healthInsurancePO.getMonthPremium()); @@ -194,11 +200,14 @@ public class TaxDeclarationRequest { listRequestParam.put("syjkbxfblb", paramMaps); } } - if (new BigDecimal(employeeRequestParam.getOrDefault("syylbx", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + + String syylbx = employeeRequestParam.getOrDefault("syylbx", "0").toString(); + if (NumberUtil.isNumber(syylbx) && new BigDecimal(syylbx).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.ENDOWMENT_INSURANCE); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("syylbxfblb",new ArrayList<>()); for (EndowmentInsurancePO po : pos) { Map map = new HashMap<>(); // 濮撳悕 @@ -217,14 +226,17 @@ public class TaxDeclarationRequest { map.put("sjkcje", po.getCurrentDeduction()); paramMaps.add(map); } - listRequestParam.put("syjkbxfblb", paramMaps); + listRequestParam.put("syylbxfblb", paramMaps); } } - if (new BigDecimal(employeeRequestParam.getOrDefault("zykcjze", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + + String zykcjze = employeeRequestParam.getOrDefault("zykcjze", "0").toString(); + if (NumberUtil.isNumber(zykcjze) && new BigDecimal(zykcjze).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.GRANT_DONATION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("zykcjzefb",new ArrayList<>()); for (GrantDonationPO po : pos) { Map map = new HashMap<>(); // 濮撳悕 @@ -250,11 +262,13 @@ public class TaxDeclarationRequest { } } - if (new BigDecimal(employeeRequestParam.getOrDefault("jmse", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String jmse = employeeRequestParam.getOrDefault("jmse", "0").toString(); + if (NumberUtil.isNumber(jmse) && new BigDecimal(jmse).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.DERATE_DEDUCTION); List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { - List> paramMaps = new ArrayList<>(); + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); + List> paramMaps = listRequestParam.getOrDefault("jmfblb",new ArrayList<>()); for (DerateDeductionPO po : pos) { Map map = new HashMap<>(); // 濮撳悕 @@ -274,10 +288,12 @@ public class TaxDeclarationRequest { } } - if (new BigDecimal(employeeRequestParam.getOrDefault("qt", "0").toString()).compareTo(new BigDecimal("0")) > 0) { + String qt = employeeRequestParam.getOrDefault("qt", "0").toString(); + if (NumberUtil.isNumber(qt) && new BigDecimal(qt).compareTo(new BigDecimal("0")) > 0) { Map posMap = taxFreeMap.get(TaxFreeTypeEnum.OTHER_DERATE_DEDUCTION); - List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); + List pos = (List) posMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); if (CollectionUtils.isNotEmpty(pos)) { + pos = pos.stream().filter(po -> Objects.equals(po.getIncomeCategory(), incomeCategoryEnum.getValue())).collect(Collectors.toList()); employeeRequestParam.put("bz", pos.get(0).getRemark()); } } @@ -312,10 +328,53 @@ public class TaxDeclarationRequest { } + public static Map convert2flsdRequestParam(List taxReportColumns, + List taxDeclarations, + List taxDeclarationValues, + List employeeDeclares, + Map> taxFreeMap) { + Map> objRequestParam = Maps.newHashMap(); + Map>> listRequestParam = Maps.newHashMap(); + Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); + Map employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId); + Map> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId); + for (TaxDeclarationPO taxDeclaration : taxDeclarations) { + List values = taxDeclarationValueMap.get(taxDeclaration.getId()); + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()); + for (TaxDeclarationValuePO taxDeclarationValue : values) { + EmployeeDeclarePO employeeDeclare = employeeDeclareMap.get(taxDeclarationValue.getEmployeeId()); + if (employeeDeclare == null || incomeCategoryEnum == null) { + continue; + } + List taxReportColumnList = taxReportColumnMap.get(Util.null2String(incomeCategoryEnum.getValue())); + Map employeeRequestParam = convert2RequestParam(incomeCategoryEnum, taxReportColumnList, taxDeclarationValue, employeeDeclare); + if (incomeCategoryEnum == IncomeCategoryEnum.CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES) { + // 涓婂競鍏徃鑲℃伅绾㈠埄鎵寰楋紙娌競銆佹繁甯傘佸垱涓氭澘锛 + List> employeeRequestParams = listRequestParam.computeIfAbsent("ssgsgxhllb", k -> Lists.newArrayList()); + employeeRequestParams.add(employeeRequestParam); + } + if (incomeCategoryEnum == IncomeCategoryEnum.CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES) { + // 鍏朵粬鍒╂伅鑲℃伅绾㈠埄鎵寰 + List> employeeRequestParams = listRequestParam.computeIfAbsent("lxgxhllb", k -> Lists.newArrayList()); + employeeRequestParams.add(employeeRequestParam); + } + // 鍏朵粬鍏嶇◣鎵i櫎闄勮〃 + buildOtherDeductionDetailParams(taxFreeMap, listRequestParam, employeeDeclare, incomeCategoryEnum, employeeRequestParam); + } + } + + Map requestParam = Maps.newHashMap(); + requestParam.putAll(objRequestParam); + requestParam.putAll(listRequestParam); + return requestParam; + } + + public static Map convert2fjmsdRequestParam(List taxReportColumns, List taxDeclarations, List taxDeclarationValues, - List employeeDeclares) { + List employeeDeclares, + Map> taxFreeMap) { Map> objRequestParam = Maps.newHashMap(); Map>> listRequestParam = Maps.newHashMap(); Map> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory); diff --git a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java index 504e7d3d7..0fec5bc83 100644 --- a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java +++ b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java @@ -1,5 +1,6 @@ package com.engine.salary.enums.salarysob; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import com.engine.salary.constant.SzyhApiConstant; import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO; @@ -673,6 +674,88 @@ public enum IncomeCategoryEnum implements BaseEnum { return resultMap; } + }, + CLASSIFIED_INCOME_LISTED_COMPANY_DIVIDENDS_BONUSES(810, "0810", "涓婂競鍏徃鑲℃伅绾㈠埄鎵寰(娌競銆佹繁甯傘佸垱涓氭澘)", DeclareReportTypeEnum.CLASSIFIED_INCOME, 181945) { + @Override + public void parseGetDeclareTaxResultFeedbackResponse(Map>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) { + List flsd = declareTaxResultFeedbackResponse.getBody().getFlsd().getSsgsgxhllb().getSscglb(); + List> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.flsd.flsdssjgdx.flsdscbw.class, flsd); + result.put(this.getDefaultLabel(), sheetData); + } + + @Override + public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) { + checkGetASynIndividualIncomeTaxFeedbackResponse(declareTaxResultFeedbackResponse); + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx ssgsgxhllb = declareTaxResultFeedbackResponse.getBody().getFlsd().getSsgsgxhllb(); + checkSSSBYYLBResponse(ssgsgxhllb.getSssbyylb()); + + Gson gs = new Gson(); + List taxRules = taxRuleDTO.getTaxRules(); + + List sscglb = ssgsgxhllb.getSscglb(); + Map idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result::getZzhm); + Map resultMap = new HashMap<>(); + for (EmployeeDeclarePO employeeDeclare : employeeDeclares) { + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum()); + if (result == null) { + continue; + } + taxRules.forEach(rule -> { + String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1); + try { + Method method = result.getClass().getMethod(getter); + Object invoke = method.invoke(result); + rule.setValue(Util.null2String(invoke)); + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + log.error("getTaxErr no such method {}", getter, ex); + } + }); + resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class)); + } + return resultMap; + } + + }, + CLASSIFIED_INCOME_OTHER_INTEREST_DIVIDENDS_BONUSES(800, "0800", "鍏朵粬鍒╂伅鑲℃伅绾㈠埄鎵寰", DeclareReportTypeEnum.CLASSIFIED_INCOME, 181945) { + @Override + public void parseGetDeclareTaxResultFeedbackResponse(Map>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse) { + List flsd = declareTaxResultFeedbackResponse.getBody().getFlsd().getLxgxhllb().getSscglb(); + List> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.flsd.flsdssjgdx.flsdscbw.class, flsd); + result.put(this.getDefaultLabel(), sheetData); + } + + @Override + public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) { + checkGetASynIndividualIncomeTaxFeedbackResponse(declareTaxResultFeedbackResponse); + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx ssgsgxhllb = declareTaxResultFeedbackResponse.getBody().getFlsd().getLxgxhllb(); + checkSSSBYYLBResponse(ssgsgxhllb.getSssbyylb()); + + Gson gs = new Gson(); + List taxRules = taxRuleDTO.getTaxRules(); + + List sscglb = ssgsgxhllb.getSscglb(); + Map idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result::getZzhm); + Map resultMap = new HashMap<>(); + for (EmployeeDeclarePO employeeDeclare : employeeDeclares) { + GetASynIndividualIncomeTaxFeedbackResponse.Body.flsd.flsdssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum()); + if (result == null) { + continue; + } + taxRules.forEach(rule -> { + String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1); + try { + Method method = result.getClass().getMethod(getter); + Object invoke = method.invoke(result); + rule.setValue(Util.null2String(invoke)); + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + log.error("getTaxErr no such method {}", getter, ex); + } + }); + resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class)); + } + return resultMap; + } + }; @@ -716,6 +799,14 @@ public enum IncomeCategoryEnum implements BaseEnum { } } + private static void checkSSSBYYLBResponse(List sssbyylb) { + if (CollUtil.isNotEmpty(sssbyylb)) { + String err = sssbyylb.stream().map(sssbyy -> sssbyy.getXm() + sssbyy.getCwxx()).collect(Collectors.joining(",")); + throw new OnlineCalculateTaxException(err); + } + } + + public Map>> parseGetCompanyIncomesResponse(Map>> result, GetCompanyIncomesResponse response) { List sfmx = Optional.ofNullable(response.getBody().getSfmx()) .orElse(new ArrayList<>()) @@ -761,6 +852,15 @@ public enum IncomeCategoryEnum implements BaseEnum { return null; } + public static IncomeCategoryEnum parseByDefaultLabel(String defaultLabel) { + for (IncomeCategoryEnum incomeCategoryEnum : IncomeCategoryEnum.values()) { + if (incomeCategoryEnum.getDefaultLabel().equals(defaultLabel)) { + return incomeCategoryEnum; + } + } + return null; + } + public static List parseByValue(Collection values) { if (CollectionUtils.isEmpty(values)) { return Collections.emptyList(); diff --git a/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml index e3585c01f..824c2466e 100644 --- a/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/DerateDeductionMapper.xml @@ -17,6 +17,7 @@ + @@ -38,6 +39,7 @@ , t.tax_year_month , t.tenant_key , t.update_time + , t.income_category @@ -108,6 +110,9 @@ AND update_time = #{updateTime} + + AND income_category = #{incomeCategory} + AND id IN @@ -168,6 +173,9 @@ update_time, + + income_category, + @@ -215,6 +223,9 @@ #{updateTime}, + + #{incomeCategory}, + @@ -237,6 +248,7 @@ tax_year_month=#{taxYearMonth}, tenant_key=#{tenantKey}, update_time=#{updateTime}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -288,6 +300,9 @@ update_time=#{updateTime}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index fc349782c..cfb6a45de 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -11,6 +11,7 @@ e.workcode, e.certificatenum as idNo, e.accounttype as accountType, + e.sex as sex, 'false' as extEmp from hrmresource e left join hrmdepartment d on e.departmentid = d.id @@ -21,6 +22,7 @@ + SELECT t.id + , t.employee_id + , t.tax_agent_id + , t.declare_month + , t.business_healthy_insurance + , t.tax_delay_endowment_insurance + , t.other_deduction + , t.deduction_allowed_donation + , t.create_time + , t.update_time + , t.creator + , t.delete_type + , t.tenant_key + , t.private_pension + , t.free_income + , t.derate_deduction + ,a.id as free_id, a.free_amount + ,b.id as derate_id, b.derate_amount + ,c.id as endowment_id, c.current_deduction as endowment_current_deduction + ,d.id as grant_id, d.actual_deduction + ,e.id as health_id, e.current_deduction as health_current_deduction + ,f.id as other_id, f.other_deduction + ,g.id as personal_id, g.pay_amount + FROM hrsa_other_deduction t + left join hrsa_free_income a on t.id=a.main_id and a.delete_type=0 and a.income_category=#{param.incomeCategory} + left join hrsa_derate_deduction b on t.id=b.main_id and b.delete_type=0 and b.income_category=#{param.incomeCategory} + left join hrsa_endowment_insurance c on t.id=c.main_id and c.delete_type=0 and c.income_category=#{param.incomeCategory} + left join hrsa_grant_donation d on t.id=d.main_id and d.delete_type=0 and d.income_category=#{param.incomeCategory} + left join hrsa_health_insurance e on t.id=e.main_id and e.delete_type=0 and e.income_category=#{param.incomeCategory} + left join hrsa_other_derate_deduction f on t.id=f.main_id and f.delete_type=0 and f.income_category=#{param.incomeCategory} + left join hrsa_personal_pension g on t.id=g.main_id and g.delete_type=0 and g.income_category=#{param.incomeCategory} + where t.delete_type=0 + and t.declare_month = #{param.declareMonth} + + and t.tax_agent_id = #{param.taxAgentId} + + + AND t.employee_id IN + + #{employeeId} + + + + AND t.tax_agent_id IN + + #{taxAgentId} + + + \ No newline at end of file diff --git a/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml index 330fb74f8..397b091c0 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDerateDeductionMapper.xml @@ -16,6 +16,7 @@ + @@ -36,6 +37,7 @@ , t.tax_year_month , t.tenant_key , t.update_time + , t.income_category @@ -103,6 +105,9 @@ AND update_time = #{updateTime} + + AND income_category = #{incomeCategory} + AND id IN @@ -160,6 +165,9 @@ update_time, + + income_category, + @@ -204,6 +212,9 @@ #{updateTime}, + + #{incomeCategory}, + @@ -225,6 +236,7 @@ tax_year_month=#{taxYearMonth}, tenant_key=#{tenantKey}, update_time=#{updateTime}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -273,6 +285,9 @@ update_time=#{updateTime}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml b/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml index da3185d56..1db068c24 100644 --- a/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/PersonalPensionMapper.xml @@ -22,6 +22,7 @@ + @@ -48,6 +49,7 @@ , t.voucher_no , t.voucher_type , t.voucher_type_name + , t.income_category @@ -133,6 +135,9 @@ AND voucher_type_name = #{voucherTypeName} + + AND income_category = #{incomeCategory} + AND id IN @@ -208,6 +213,9 @@ voucher_type_name, + + income_category, + @@ -270,6 +278,9 @@ #{voucherTypeName}, + + #{incomeCategory}, + @@ -297,6 +308,7 @@ voucher_no=#{voucherNo}, voucher_type=#{voucherType}, voucher_type_name=#{voucherTypeName}, + income_category=#{incomeCategory}, WHERE id = #{id} AND delete_type = 0 @@ -363,6 +375,9 @@ voucher_type_name=#{voucherTypeName}, + + income_category=#{incomeCategory}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java b/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java index ff4fb6484..ad6d5ed8a 100644 --- a/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java +++ b/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java @@ -46,10 +46,10 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse { * 缁煎悎鎵寰 蹇呭~锛氭槸 瑙佺患鍚堟墍寰楄绠楃粨鏋 */ private zhsd zhsd; -// /** -// * 鍒嗙被鎵寰 蹇呭~锛氭槸 瑙佸垎绫绘墍寰楄绠楃粨鏋 -// */ -// private flsd flsd; + /** + * 鍒嗙被鎵寰 蹇呭~锛氭槸 瑙佸垎绫绘墍寰楄绠楃粨鏋 + */ + private flsd flsd; /** * 闈炲眳姘戞墍寰 蹇呭~锛氭槸 瑙侀潪灞呮皯鎵寰楄绠楃粨鏋 */ @@ -543,6 +543,193 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse { } + /** + * 鍒嗙被鎵寰 + */ + @Data + public static class flsd { + + /** + * 鍒╂伅鑲℃伅绾㈠埄鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx lxgxhllb; + /** + * 鑲℃潈杞鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx ggzrlb; + /** + * 鍏朵粬璐骇杞鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx qtcczrlb; + /** + * 鍋剁劧鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx orsdlb; + /** + * 鍏朵粬璐骇绉熻祦鍒楄〃 蹇呭~锛歯ull + */ + private flsdssjgdx qtcczllb; + /** + * 涓婂競鍏徃鑲℃伅绾㈠埄 蹇呭~锛歯ull + */ + private flsdssjgdx ssgsgxhllb; + /** + * 涓汉鎴垮眿鍑虹鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx grfwczsdlb; + /** + * 闅忔満璧犻佺ぜ鍝佸垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx sjzslplb; + /** + * 涓夋澘甯傚満鑲℃伅绾㈠埄鎵寰 蹇呭~锛歯ull + */ + private flsdssjgdx sbscgxhllb; + /** + * 璇佸姷璧勯噾鍒╂伅鎵寰 蹇呭~锛歯ull + */ + private flsdssjgdx zjzjlxlb; + + + /** + * 鍒嗙被鎵寰楃畻绋庣粨鏋滃璞 + */ + @Data + public static class flsdssjgdx { + /** + * 绠楃◣鎴愬姛鍒楄〃 鍙傝冭緭鍏ユ姤鏂囬潪灞呮皯鎵寰楄緭鍑虹粨鏋滄姤鏂 + */ + private List sscglb; + /** + * 绠楃◣澶辫触鍒楄〃 鍙傝冭緭鍏ユ姤鏂囬潪灞呮皯鎵寰楄緭鍑虹粨鏋滄姤鏂 + */ + private List sssblb; + /** + * 绠楃◣澶辫触鍘熷洜鍒楄〃 鍙傝冪畻绋庡け璐ュ師鍥犲璞 + */ + private List sssbyylb; + /** + * 绠楃◣鎬讳汉鏁 + */ + private int sszrs; + /** + * 绠楃◣澶辫触鎬讳汉鏁 + */ + private int sssbrs; + + /** + * 鎵寰楄緭鍑虹粨鏋滄姤鏂 + */ + @Data + public static class result { + /** + * 鏄惁鏄庣粏鐢虫姤 蹇呭~锛氬惁 鏄垨鑰呭惁 + */ + private String sfmxsb; + /** + * 濮撳悕 蹇呭~锛歯ull 姹囨荤敵鎶ヨ繑鍥炵┖ + */ + private String xm; + /** + * 璇佷欢绫诲瀷鍚嶇О 蹇呭~锛歯ull 姹囨荤敵鎶ヨ繑鍥炵┖ + */ + private String zzlx; + /** + * 璇佷欢鍙风爜 蹇呭~锛歯ull 姹囨荤敵鎶ヨ繑鍥炵┖ + */ + private String zzhm; + /** + * 鏀跺叆棰 蹇呭~锛氭槸 + */ + private String sre; + /** + * 鍏嶇◣鏀跺叆 蹇呭~锛氭槸 + */ + private String mssd; + /** + * 璐骇鍘熷 蹇呭~锛氭槸 + */ + private String ccyz; + /** + * 鍏佽鎵i櫎鐨勭◣璐 蹇呭~锛氭槸 + */ + private String yxkcsf; + /** + * 鎶曡祫鎶垫墸 蹇呭~锛氭槸 + */ + private String tzdk; + /** + * 鍏朵粬 蹇呭~锛氭槸 + */ + private String qt; + /** + * 澶囨敞 蹇呭~锛氭槸 + */ + private String bz; + /** + * 鍑忛櫎璐圭敤 蹇呭~锛氭槸 + */ + private String jcfy; + /** + * 鍑忚姣斾緥 蹇呭~锛氭槸 + */ + private String jjbl; + /** + * 鍑嗕簣鎵i櫎鐨勬崘璧犻 蹇呭~锛氭槸 + */ + private String zykcjze; + /** + * 绋庡墠鎵i櫎椤圭洰鍚堣 蹇呭~锛氭槸 + */ + private String sqkcxmhj; + /** + * 搴旂撼绋庢墍寰楅 蹇呭~锛氭槸 + */ + private String ynssde; + /** + * 搴旂撼绋庨 蹇呭~锛氭槸 + */ + private String ynse; + /** + * 鍑忓厤绋庨 蹇呭~锛氭槸 + */ + private String jmse; + /** + * 宸茬即绋庨 蹇呭~锛氭槸 鏃犻渶濉啓璇ュ硷紝鎸0澶勭悊 + */ + private String ykjse; + /** + * 搴旀墸缂寸◣棰 蹇呭~锛氭槸 + */ + private String yingkjse; + /** + * 绋庣巼 蹇呭~锛氭槸 + */ + private String sl; + /** + * 閫熺畻鎵i櫎鏁 蹇呭~锛氭槸 + */ + private String sskcs; + /** + * 搴旇ˉ閫绋庨 蹇呭~锛氭槸 + */ + private String ybtse; + /** + * 鍒嗙被鎵寰楀悕瀛 蹇呭~锛氭槸 鍒嗙被鎵寰楄柂閲戠被鍒-鍒╂伅鑲℃伅绾㈠埄鎵寰楋紝鑲℃潈杞鎵寰楋紝鍏朵粬璐骇杞鎵寰楋紝鍋剁劧鎵寰楋紝鍏朵粬鎵寰" + */ + private String sdxm; + /** + * 鎵寰楁湡闂磋捣 蹇呭~锛氭槸 YYYY-MM + */ + private String sdqjq; + /** + * 鎵寰楁湡闂存 蹇呭~锛氭槸 YYYY-MM + */ + private String sdqjz; + } + } + } + @Data public static class fjmsd { diff --git a/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java b/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java index 6691cdb96..137d849ae 100644 --- a/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java +++ b/src/com/engine/salary/remote/tax/response/declare/GetDeclareTaxResultFeedbackResponse.java @@ -47,10 +47,10 @@ public class GetDeclareTaxResultFeedbackResponse extends BaseResponse { * 缁煎悎鎵寰 蹇呭~锛氭槸 瑙佺患鍚堟墍寰楄绠楃粨鏋 */ private zhsd zhsd; -// /** -// * 鍒嗙被鎵寰 蹇呭~锛氭槸 瑙佸垎绫绘墍寰楄绠楃粨鏋 -// */ -// private 瀵硅薄 flsd; + /** + * 鍒嗙被鎵寰 蹇呭~锛氭槸 瑙佸垎绫绘墍寰楄绠楃粨鏋 + */ + private flsd flsd; /** * 闈炲眳姘戞墍寰 蹇呭~锛氭槸 瑙侀潪灞呮皯鎵寰楄绠楃粨鏋 */ @@ -657,6 +657,236 @@ public class GetDeclareTaxResultFeedbackResponse extends BaseResponse { } + /** + * 鍒嗙被鎵寰 + */ + @Data + public static class flsd { + + /** + * 鍒╂伅鑲℃伅绾㈠埄鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx lxgxhllb; + /** + * 鑲℃潈杞鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx ggzrlb; + /** + * 鍏朵粬璐骇杞鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx qtcczrlb; + /** + * 鍋剁劧鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx orsdlb; + /** + * 鍏朵粬璐骇绉熻祦鍒楄〃 蹇呭~锛歯ull + */ + private flsdssjgdx qtcczllb; + /** + * 涓婂競鍏徃鑲℃伅绾㈠埄 蹇呭~锛歯ull + */ + private flsdssjgdx ssgsgxhllb; + /** + * 涓汉鎴垮眿鍑虹鎵寰楀垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx grfwczsdlb; + /** + * 闅忔満璧犻佺ぜ鍝佸垪琛 蹇呭~锛歯ull + */ + private flsdssjgdx sjzslplb; + /** + * 涓夋澘甯傚満鑲℃伅绾㈠埄鎵寰 蹇呭~锛歯ull + */ + private flsdssjgdx sbscgxhllb; + /** + * 璇佸姷璧勯噾鍒╂伅鎵寰 蹇呭~锛歯ull + */ + private flsdssjgdx zjzjlxlb; + + + /** + * 4.3.1.3.3.1鍒嗙被鎵寰楃畻绋庣粨鏋滃璞 + */ + @Data + public static class flsdssjgdx { + /** + * 绠楃◣鎴愬姛鍒楄〃 鍙傝冭緭鍏ユ姤鏂囬潪灞呮皯鎵寰楄緭鍑虹粨鏋滄姤鏂 + */ + private List sscglb; + /** + * 绠楃◣澶辫触鍒楄〃 鍙傝冭緭鍏ユ姤鏂囬潪灞呮皯鎵寰楄緭鍑虹粨鏋滄姤鏂 + */ + private List sssblb; + /** + * 澶辫触鍘熷洜鍒楄〃 鍙傝冪畻绋庡け璐ュ師鍥犲璞 + */ + private List sssbyylb; + /** + * 绠楃◣鎬讳汉鏁 + */ + private int sszrs; + /** + * 澶辫触鎬讳汉鏁 + */ + private int sssbrs; + + /** + * 鎵寰楄緭鍑虹粨鏋滄姤鏂 + */ + @Data + public static class flsdscbw { + /** + * 鏄惁鏄庣粏鐢虫姤 蹇呭~锛氬惁 鏄垨鑰呭惁 + */ + private String sfmxsb; + /** + * 濮撳悕 蹇呭~锛歯ull 姹囨荤敵鎶ヨ繑鍥炵┖ + */ + @SalaryTableColumn(text = "濮撳悕", width = "10%", column = "xm") + @ExcelHead(title = "濮撳悕", dataIndex = "xm") + private String xm; + /** + * 璇佷欢绫诲瀷鍚嶇О 蹇呭~锛歯ull 姹囨荤敵鎶ヨ繑鍥炵┖ + */ + @SalaryTableColumn(text = "璇佷欢绫诲瀷", width = "10%", column = "zzlx") + @ExcelHead(title = "璇佷欢绫诲瀷", dataIndex = "zzlx") + private String zzlx; + /** + * 璇佷欢鍙风爜 蹇呭~锛歯ull 姹囨荤敵鎶ヨ繑鍥炵┖ + */ + @SalaryTableColumn(text = "璇佷欢鍙风爜", width = "10%", column = "zzhm") + @ExcelHead(title = "璇佷欢鍙风爜", dataIndex = "zzhm") + private String zzhm; + /** + * 鏀跺叆棰 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鏈湡鏀跺叆", width = "10%", column = "sre") + @ExcelHead(title = "鏈湡鏀跺叆", dataIndex = "sre") + private String sre; + /** + * 鍏嶇◣鏀跺叆 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鏈湡鍏嶇◣鏀跺叆", width = "10%", column = "mssd") + @ExcelHead(title = "鏈湡鍏嶇◣鏀跺叆", dataIndex = "mssd") + private String mssd; + /** + * 璐骇鍘熷 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "璐骇鍘熷", width = "10%", column = "ccyz") + @ExcelHead(title = "璐骇鍘熷", dataIndex = "ccyz") + private String ccyz; + /** + * 鍏佽鎵i櫎鐨勭◣璐 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鍏佽鎵i櫎鐨勭◣璐", width = "10%", column = "yxkcsf") + @ExcelHead(title = "鍏佽鎵i櫎鐨勭◣璐", dataIndex = "yxkcsf") + private String yxkcsf; + /** + * 鎶曡祫鎶垫墸 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鎶曡祫鎶垫墸", width = "10%", column = "tzdk") + @ExcelHead(title = "鎶曡祫鎶垫墸", dataIndex = "tzdk") + private String tzdk; + /** + * 鍏朵粬 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鍏朵粬", width = "10%", column = "qt") + @ExcelHead(title = "鍏朵粬", dataIndex = "qt") + private String qt; + /** + * 澶囨敞 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "澶囨敞", width = "10%", column = "bz") + @ExcelHead(title = "澶囨敞", dataIndex = "bz") + private String bz; + /** + * 鍑忛櫎璐圭敤 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鍑忛櫎璐圭敤", width = "10%", column = "jcfy") + @ExcelHead(title = "鍑忛櫎璐圭敤", dataIndex = "jcfy") + private String jcfy; + /** + * 鍑忚姣斾緥 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鍑忚姣斾緥", width = "10%", column = "jjbl") + @ExcelHead(title = "鍑忚姣斾緥", dataIndex = "jjbl") + private String jjbl; + /** + * 鍑嗕簣鎵i櫎鐨勬崘璧犻 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鍑嗕簣鎵i櫎鐨勬崘璧犻", width = "10%", column = "zykcjze") + @ExcelHead(title = "鍑嗕簣鎵i櫎鐨勬崘璧犻", dataIndex = "zykcjze") + private String zykcjze; + /** + * 绋庡墠鎵i櫎椤圭洰鍚堣 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "绋庡墠鎵i櫎椤圭洰鍚堣", width = "10%", column = "sqkcxmhj") + @ExcelHead(title = "绋庡墠鎵i櫎椤圭洰鍚堣", dataIndex = "sqkcxmhj") + private String sqkcxmhj; + /** + * 搴旂撼绋庢墍寰楅 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "搴旂撼绋庢墍寰楅", width = "10%", column = "ynssde") + @ExcelHead(title = "搴旂撼绋庢墍寰楅", dataIndex = "ynssde") + private String ynssde; + /** + * 搴旂撼绋庨 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "搴旂撼绋庨", width = "10%", column = "ynse") + @ExcelHead(title = "搴旂撼绋庨", dataIndex = "ynse") + private String ynse; + /** + * 鍑忓厤绋庨 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "鍑忓厤绋庨", width = "10%", column = "jmse") + @ExcelHead(title = "鍑忓厤绋庨", dataIndex = "jmse") + private String jmse; + /** + * 宸茬即绋庨 蹇呭~锛氭槸 鏃犻渶濉啓璇ュ硷紝鎸0澶勭悊 + */ + @SalaryTableColumn(text = "宸茬即绋庨", width = "10%", column = "ykjse") + @ExcelHead(title = "宸茬即绋庨", dataIndex = "ykjse") + private String ykjse; + /** + * 搴旀墸缂寸◣棰 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "搴旀墸缂寸◣棰", width = "10%", column = "yingkjse") + @ExcelHead(title = "搴旀墸缂寸◣棰", dataIndex = "yingkjse") + private String yingkjse; + /** + * 绋庣巼 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "绋庣巼", width = "10%", column = "sl") + @ExcelHead(title = "绋庣巼", dataIndex = "sl") + private String sl; + /** + * 閫熺畻鎵i櫎鏁 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "閫熺畻鎵i櫎鏁", width = "10%", column = "sskcs") + @ExcelHead(title = "閫熺畻鎵i櫎鏁", dataIndex = "sskcs") + private String sskcs; + /** + * 搴旇ˉ閫绋庨 蹇呭~锛氭槸 + */ + @SalaryTableColumn(text = "搴旇ˉ閫绋庨", width = "10%", column = "ybtse") + @ExcelHead(title = "搴旇ˉ閫绋庨", dataIndex = "ybtse") + private String ybtse; + /** + * 鍒嗙被鎵寰楀悕瀛 蹇呭~锛氭槸 鍒嗙被鎵寰楄柂閲戠被鍒-鍒╂伅鑲℃伅绾㈠埄鎵寰楋紝鑲℃潈杞鎵寰楋紝鍏朵粬璐骇杞鎵寰楋紝鍋剁劧鎵寰楋紝鍏朵粬鎵寰" + */ + private String sdxm; + /** + * 鎵寰楁湡闂磋捣 蹇呭~锛氭槸 YYYY-MM + */ + private String sdqjq; + /** + * 鎵寰楁湡闂存 蹇呭~锛氭槸 YYYY-MM + */ + private String sdqjz; + } + } + } @Data public static class fjmsd { diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 481d61425..a894213bb 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -508,7 +508,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary List finalSalaryAcctEmpIds = getSalaryAcctResultService(user).listAcctEmpIdByAcctEmpId(salaryAcctEmployeeIds); Map> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId); salaryAcctEmpResultMap.forEach((k, v) -> { - Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), SalaryAcctResultPO::getResultValue, (key1, key2) -> key2)); + Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2String(p.getResultValue()), (key1, key2) -> key2)); resultMap.put(k, collect); }); salaryAcctEmployeeIds.stream().forEach(id -> { diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java index 0b1922313..727f8b2f4 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java @@ -334,7 +334,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service { sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn()))); } } else { - sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn()))); + sumRow.add(""); } } rowList.add(sumRow); diff --git a/src/com/engine/salary/service/OtherDeductionService.java b/src/com/engine/salary/service/OtherDeductionService.java index 8108e971d..c2fd7f1e0 100644 --- a/src/com/engine/salary/service/OtherDeductionService.java +++ b/src/com/engine/salary/service/OtherDeductionService.java @@ -98,6 +98,16 @@ public interface OtherDeductionService { */ List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds); + /** + * 鎸夌収鐢虫姤琛ㄧ被鍨嬶紝鑾峰彇鍏朵粬鍏嶇◣鎵i櫎鏁版嵁 + * @param declareMonth + * @param employeeIds + * @param taxAgentIds + * @param incomeCategory + * @return + */ + List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds, Integer incomeCategory); + /** * 缂栬緫鏁版嵁 */ diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 9cf9adb13..b192459e7 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.NumberUtil; import com.alibaba.fastjson.JSONObject; import com.api.formmode.mybatis.util.SqlProxyHandle; @@ -23,6 +24,7 @@ import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.datacollection.TaxFreeTypeEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.enums.auth.AuthFilterTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -448,7 +450,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List errorData = new ArrayList<>(); //鍏嶇◣鏀跺叆 - List freeIncomeList = ExcelParseHelper.parse2Map(fileInputStream, FreeIncomeListDTO.class, 0, 1, 9, "OtherDeductionTemplate.xlsx"); + List freeIncomeList = ExcelParseHelper.parse2Map(fileInputStream, FreeIncomeListDTO.class, 0, 1, 10, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < freeIncomeList.size(); i++) { FreeIncomeListDTO dto = freeIncomeList.get(i); @@ -557,6 +559,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + freeIncomePO.setIncomeCategory(incomeCategoryEnum.getValue()); + } + //鍏嶇◣鏀跺叆 String freeIncome = dto.getFreeItem(); String freeProperty = dto.getFreeProperty(); @@ -602,7 +614,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 閿欒excel鍐呭 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, HealthInsuranceListDTO.class, 1, 1, 11, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, HealthInsuranceListDTO.class, 1, 1, 12, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { HealthInsuranceListDTO dto = dtoList.get(i); @@ -711,6 +723,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setIdentificationNumber(dto.getIdentificationNumber()); po.setEffectiveDate(dto.getEffectiveDate()); po.setYearPremium(dto.getYearPremium()); @@ -752,7 +774,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 閿欒excel鍐呭 List errorData = new ArrayList<>(); - List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, EndowmentInsuranceListDTO.class, 2, 1, 11, "OtherDeductionTemplate.xlsx"); + List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, EndowmentInsuranceListDTO.class, 2, 1, 13, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < derateDeductionList.size(); i++) { EndowmentInsuranceListDTO dto = derateDeductionList.get(i); @@ -861,6 +883,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setAccountNumber(dto.getAccountNumber()); po.setCheckCode(dto.getCheckCode()); po.setYearPremium(dto.getYearPremium()); @@ -904,7 +936,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 閿欒excel鍐呭 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, GrantDonationListDTO.class, 3, 1, 13, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, GrantDonationListDTO.class, 3, 1, 14, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { GrantDonationListDTO dto = dtoList.get(i); @@ -1013,6 +1045,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setRecipientName(dto.getRecipientName()); po.setTaxCode(dto.getTaxCode()); po.setDonationNumber(dto.getDonationNumber()); @@ -1057,7 +1099,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 閿欒excel鍐呭 List errorData = new ArrayList<>(); - List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, DerateDeductionListDTO.class, 4, 1, 9, "OtherDeductionTemplate.xlsx"); + List derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, DerateDeductionListDTO.class, 4, 1, 10, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < derateDeductionList.size(); i++) { DerateDeductionListDTO dto = derateDeductionList.get(i); @@ -1166,6 +1208,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setDerateAmount(dto.getDerateAmount()); po.setDerateItem(dto.getDerateItem()); po.setDerateProperty(dto.getDerateProperty()); @@ -1206,7 +1258,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 閿欒excel鍐呭 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, OtherDerateDeductionListDTO.class, 5, 1, 8, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, OtherDerateDeductionListDTO.class, 5, 1, 9, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { OtherDerateDeductionListDTO dto = dtoList.get(i); @@ -1315,6 +1367,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setOtherDeduction(dto.getOtherDeduction()); po.setRemark(dto.getRemark()); @@ -1355,7 +1417,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 閿欒excel鍐呭 List errorData = new ArrayList<>(); - List dtoList = ExcelParseHelper.parse2Map(fileInputStream, PersonalPensionListDTO.class, 6, 1, 9, "OtherDeductionTemplate.xlsx"); + List dtoList = ExcelParseHelper.parse2Map(fileInputStream, PersonalPensionListDTO.class, 6, 1, 10, "OtherDeductionTemplate.xlsx"); for (int i = 0; i < dtoList.size(); i++) { PersonalPensionListDTO dto = dtoList.get(i); @@ -1464,6 +1526,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByDefaultLabel(dto.getIncomeCategoryName()); + if (incomeCategoryEnum == null) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + "鎵寰楅」鐩笉瀛樺湪锛"); + errorData.add(errorMessageMap); + errorSum += 1; + } else { + po.setIncomeCategory(incomeCategoryEnum.getValue()); + } + po.setVoucherTypeName(dto.getVoucherTypeName()); po.setVoucherNo(dto.getVoucherNo()); po.setPayAmount(dto.getPayAmount()); @@ -1821,6 +1893,42 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction return OtherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentIds(taxAgentIds).build()); } + @Override + public List getOtherDeductionList(YearMonth declareMonth, List employeeIds, List taxAgentIds, Integer incomeCategory) { + if (declareMonth == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "鍙傛暟鏈夎锛氱敵鎶ユ湀浠藉繀浼")); + } + if (CollUtil.isEmpty(taxAgentIds)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "鍙傛暟鏈夎锛氭墸缂翠箟鍔′汉蹇呬紶")); + } + if (incomeCategory == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "鍙傛暟鏈夎锛氭墍寰楅」鐩繀浼")); + } + + List otherDeductionPOS = listDetails(OtherDeductionPO.builder().incomeCategory(incomeCategory).declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentIds(taxAgentIds).build()); + if (CollUtil.isEmpty(otherDeductionPOS)) { + return new ArrayList<>(); + } + otherDeductionPOS.forEach(OtherDeductionPO::handleList); + return otherDeductionPOS; + } + + private List listDetails(OtherDeductionPO param) { + if (CollectionUtils.isNotEmpty(param.getEmployeeIds())) { + List> partition = Lists.partition(param.getEmployeeIds(), 500); + List otherDeductionPOS = new ArrayList<>(); + partition.forEach(l -> { + param.setEmployeeIds(l); + otherDeductionPOS.addAll(getOtherDeductionMapper().listDetails(param)); + }); + return encryptUtil.decryptList(otherDeductionPOS, OtherDeductionPO.class); + } else { + List otherDeductionPOS = getOtherDeductionMapper().listDetails(param); + return encryptUtil.decryptList(otherDeductionPOS, OtherDeductionPO.class); + } + } + + @Override public void editData(OtherDeductionParam otherDeductionParam) { String declareMonthStr = otherDeductionParam.getDeclareMonth(); @@ -2257,7 +2365,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction Map>> map = new LinkedHashMap<>(); List> freeIncomeRowList = new ArrayList<>(); - List freeIncomeTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鍏嶇◣浜嬮」", "鍏嶇◣鎬ц川", "鍏嶇◣閲戦"); + List freeIncomeTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "鍏嶇◣浜嬮」", "鍏嶇◣鎬ц川", "鍏嶇◣閲戦"); freeIncomeRowList.add(freeIncomeTitle); freeIncomeList.forEach(dto -> { List row = new ArrayList<>(); @@ -2267,6 +2375,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getFreeItem()); row.add(dto.getFreeProperty()); row.add(dto.getFreeAmount()); @@ -2275,7 +2384,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("鍏嶇◣鏀跺叆", freeIncomeRowList); List> healthInsuranceRowList = new ArrayList<>(); - List healthInsuranceTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "绋庝紭璇嗗埆鐮", "淇濆崟鐢熸晥鏃ユ湡", "骞村害淇濊垂", "鏈堝害淇濊垂", "鏈湡鎵i櫎閲戦"); + List healthInsuranceTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "绋庝紭璇嗗埆鐮", "淇濆崟鐢熸晥鏃ユ湡", "骞村害淇濊垂", "鏈堝害淇濊垂", "鏈湡鎵i櫎閲戦"); healthInsuranceRowList.add(healthInsuranceTitle); healthInsuranceList.forEach(dto -> { List row = new ArrayList<>(); @@ -2285,6 +2394,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getIdentificationNumber()); row.add(dto.getEffectiveDate()); row.add(dto.getYearPremium()); @@ -2296,7 +2406,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List> endowmentInsuranceRowList = new ArrayList<>(); - List endowmentInsuranceTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "绋庡欢鍏昏佽处鎴风紪鍙", "鎶ョ◣鏍¢獙鐮", "骞村害淇濊垂", "鏈堝害淇濊垂", "鏈湡鎵i櫎閲戦"); + List endowmentInsuranceTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "鐢虫姤鎵i櫎鏈堜唤", "绋庡欢鍏昏佽处鎴风紪鍙", "鎶ョ◣鏍¢獙鐮", "骞村害淇濊垂", "鏈堝害淇濊垂", "鏈湡鎵i櫎閲戦"); endowmentInsuranceRowList.add(endowmentInsuranceTitle); endowmentInsuranceList.forEach(dto -> { List row = new ArrayList<>(); @@ -2306,6 +2416,8 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); + row.add(dto.getDeductionMonth()); row.add(dto.getAccountNumber()); row.add(dto.getCheckCode()); row.add(dto.getYearPremium()); @@ -2316,7 +2428,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("绋庡欢鍏昏佷繚闄", endowmentInsuranceRowList); List> grantDonationRowList = new ArrayList<>(); - List grantDonationTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鍙楄禒鍗曚綅鍚嶇О", "鍙楄禒鍗曚綅绾崇◣浜鸿瘑鍒彿", "鍑瘉鍙", "鎹愯禒鏃ユ湡", "鎹愯禒閲戦", "鎵i櫎姣斾緥", "瀹為檯鎵i櫎閲戦"); + List grantDonationTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "鍙楄禒鍗曚綅鍚嶇О", "鍙楄禒鍗曚綅绾崇◣浜鸿瘑鍒彿", "鍑瘉鍙", "鎹愯禒鏃ユ湡", "鎹愯禒閲戦", "鎵i櫎姣斾緥", "瀹為檯鎵i櫎閲戦"); grantDonationRowList.add(grantDonationTitle); grantDonationList.forEach(dto -> { List row = new ArrayList<>(); @@ -2326,6 +2438,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getRecipientName()); row.add(dto.getTaxCode()); row.add(dto.getDonationNumber()); @@ -2338,7 +2451,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("鍑嗕簣鎵i櫎鐨勬崘璧犻", grantDonationRowList); List> derateDeductionRowList = new ArrayList<>(); - List derateDeductionTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鍑忓厤浜嬮」", "鍑忓厤鎬ц川", "鍑忓厤閲戦"); + List derateDeductionTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "鍑忓厤浜嬮」", "鍑忓厤鎬ц川", "鍑忓厤閲戦"); derateDeductionRowList.add(derateDeductionTitle); derateDeductionList.forEach(dto -> { List row = new ArrayList<>(); @@ -2348,6 +2461,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getDerateItem()); row.add(dto.getDerateProperty()); row.add(dto.getDerateAmount()); @@ -2356,7 +2470,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("鍑忓厤绋庨", derateDeductionRowList); List> otherDerateDeductionRowList = new ArrayList<>(); - List otherDerateDeductionTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鍏朵粬鍏嶇◣鎵i櫎閲戦", "澶囨敞"); + List otherDerateDeductionTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "鍏朵粬鍏嶇◣鎵i櫎閲戦", "澶囨敞"); otherDerateDeductionRowList.add(otherDerateDeductionTitle); otherDerateDeductionList.forEach(dto -> { List row = new ArrayList<>(); @@ -2366,6 +2480,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getOtherDeduction()); row.add(dto.getRemark()); otherDerateDeductionRowList.add(row); @@ -2373,7 +2488,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction map.put("鍏朵粬", otherDerateDeductionRowList); List> personalPensionRowList = new ArrayList<>(); - List personalPensionTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鍑瘉绫诲瀷", "鍑瘉缂栫爜", "缂磋垂閲戦"); + List personalPensionTitle = Arrays.asList("濮撳悕", "涓◣鎵g即涔夊姟浜", "閮ㄩ棬", "鎵嬫満鍙", "宸ュ彿", "璇佷欢鍙风爜", "鎵寰楅」鐩", "鍑瘉绫诲瀷", "鍑瘉缂栫爜", "缂磋垂閲戦"); personalPensionRowList.add(personalPensionTitle); personalPensionList.forEach(dto -> { List row = new ArrayList<>(); @@ -2383,6 +2498,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction row.add(dto.getMobile()); row.add(dto.getJobNum()); row.add(dto.getIdNo()); + row.add(dto.getIncomeCategoryName()); row.add(dto.getVoucherTypeName()); row.add(dto.getVoucherNo()); row.add(dto.getPayAmount()); @@ -2427,6 +2543,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction dto.setMobile(employee.getMobile()); dto.setJobNum(employee.getWorkcode()); dto.setIdNo(employee.getIdNo()); + dto.setIncomeCategoryName(IncomeCategoryEnum.parseByValue(po.getIncomeCategory()).getDefaultLabel()); return dto; }).collect(Collectors.toList()); return listDTOS; @@ -2715,6 +2832,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .freeItem(param.getFreeItem()) .freeProperty(param.getFreeProperty()) .freeAmount(param.getFreeAmount()) @@ -2734,6 +2852,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setFreeItem(param.getFreeItem()); po.setFreeProperty(param.getFreeProperty()); po.setFreeAmount(param.getFreeAmount()); @@ -2762,6 +2881,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .deductionMonth(param.getDeductionMonth()) .accountNumber(param.getAccountNumber()) .checkCode(param.getCheckCode()) @@ -2784,6 +2904,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setDeductionMonth(param.getDeductionMonth()); po.setAccountNumber(param.getAccountNumber()); po.setCheckCode(param.getCheckCode()); @@ -2815,6 +2936,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .recipientName(param.getRecipientName()) .taxCode(param.getTaxCode()) .donationNumber(param.getDonationNumber()) @@ -2838,6 +2960,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setRecipientName(param.getRecipientName()); po.setTaxCode(param.getTaxCode()); po.setDonationNumber(param.getDonationNumber()); @@ -2870,6 +2993,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .identificationNumber(param.getIdentificationNumber()) .effectiveDate(param.getEffectiveDate()) .yearPremium(param.getYearPremium()) @@ -2891,6 +3015,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setIdentificationNumber(param.getIdentificationNumber()); po.setEffectiveDate(param.getEffectiveDate()); po.setYearPremium(param.getYearPremium()); @@ -2921,6 +3046,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .otherDeduction(param.getOtherDeduction()) .remark(param.getRemark()) .fileStatus(1) @@ -2939,6 +3065,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setOtherDeduction(param.getOtherDeduction()); po.setRemark(param.getRemark()); @@ -2966,6 +3093,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .derateAmount(param.getDerateAmount()) .derateItem(param.getDerateItem()) .derateProperty(param.getDerateProperty()) @@ -2985,6 +3113,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setDerateAmount(param.getDerateAmount()); po.setDerateItem(param.getDerateItem()); po.setDerateProperty(param.getDerateProperty()); @@ -3013,6 +3142,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .taxYearMonth(deductionPO.getDeclareMonth()) .employeeId(deductionPO.getEmployeeId()) .taxAgentId(deductionPO.getTaxAgentId()) + .incomeCategory(param.getIncomeCategory()) .voucherTypeName(param.getVoucherTypeName()) .voucherNo(param.getVoucherNo()) .payAmount(param.getPayAmount()) @@ -3032,6 +3162,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } po.setUpdateTime(now); + po.setIncomeCategory(param.getIncomeCategory()); po.setVoucherTypeName(param.getVoucherTypeName()); po.setVoucherNo(param.getVoucherNo()); po.setPayAmount(param.getPayAmount()); diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 27b2ed6fc..c13d4da61 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -2768,12 +2768,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (otherPaymentBaseString != null) { updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); } + if (!welBaseDiffSign) { + otherPaymentBaseString = adaptWelBaseLimit(updateOtherInfo.getOtherSchemeId(), updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (otherPaymentBaseString != null) { + updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏朵粬绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); combineErrorMsg = "鍏朵粬绂忓埄涓汉锛 " + errorMsg; } + if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏朵粬绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); + combineErrorMsg = "鍏朵粬绂忓埄鍏徃锛 " + errorMsg; + } } //闇瑕佹媶鍒嗕釜浜哄拰鍏徃绂忓埄鍩烘暟鏃 if (welBaseDiffSign) { @@ -2839,12 +2849,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (otherPaymentBaseString != null) { insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); } + if (!welBaseDiffSign) { + otherPaymentBaseString = adaptWelBaseLimit(insertOtherInfo.getOtherSchemeId(), insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (otherPaymentBaseString != null) { + insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏朵粬绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); combineErrorMsg = "鍏朵粬绂忓埄涓汉锛" + errorMsg; } + if ( (!welBaseDiffSign) && (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏朵粬绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); + combineErrorMsg = "鍏朵粬绂忓埄鍏徃锛" + errorMsg; + } } //闇瑕佹媶鍒嗕釜浜哄拰鍏徃绂忓埄鍩烘暟鏃 if (welBaseDiffSign) { @@ -2979,12 +2999,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (fundPaymentBaseString != null) { updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString); } + if (!welBaseDiffSign) { + fundPaymentBaseString = adaptWelBaseLimit(updateFundInfo.getFundSchemeId(), updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (fundPaymentBaseString != null) { + updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏Н閲戠鍒╂槑缁嗕腑鐨勫熀鏁版洿鏂板唴瀹逛笉绗﹀悎鐩稿叧鍩烘暟涓婁笅闄愯姹傦紝璇锋鏌ュ悗閲嶈瘯锛")); combineErrorMsg = "鍏Н閲戜釜浜" + errorMsg; } + if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏Н閲戠鍒╂槑缁嗕腑鐨勫熀鏁版洿鏂板唴瀹逛笉绗﹀悎鐩稿叧鍩烘暟涓婁笅闄愯姹傦紝璇锋鏌ュ悗閲嶈瘯锛")); + combineErrorMsg = "鍏Н閲戝叕鍙" + errorMsg; + } } //闇瑕佹媶鍒嗕釜浜哄拰鍏徃绂忓埄鍩烘暟鏃 @@ -3055,12 +3085,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (fundPaymentBaseString != null) { insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString); } + if (!welBaseDiffSign) { + fundPaymentBaseString = adaptWelBaseLimit(insertFundInfo.getFundSchemeId(), insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (fundPaymentBaseString != null) { + insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏Н閲戠鍒╂槑缁嗕腑鐨勫熀鏁版洿鏂板唴瀹逛笉绗﹀悎鐩稿叧鍩烘暟涓婁笅闄愯姹傦紝璇锋鏌ュ悗閲嶈瘯锛")); combineErrorMsg = "鍏Н閲戜釜浜猴細" + errorMsg; } + if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"鍏Н閲戠鍒╂槑缁嗕腑鐨勫熀鏁版洿鏂板唴瀹逛笉绗﹀悎鐩稿叧鍩烘暟涓婁笅闄愯姹傦紝璇锋鏌ュ悗閲嶈瘯锛")); + combineErrorMsg = "鍏Н閲戝叕鍙革細" + errorMsg; + } } //闇瑕佹媶鍒嗕釜浜哄拰鍏徃绂忓埄鍩烘暟鏃 @@ -3202,12 +3242,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (socialPaymentBaseString != null) { updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); } + if (!welBaseDiffSign) { + socialPaymentBaseString = adaptWelBaseLimit(updateSocialInfo.getSocialSchemeId(), updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (socialPaymentBaseString != null) { + updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"绀句繚绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); combineErrorMsg = "绀句繚涓汉锛" + errorMsg; } + if ((!welBaseDiffSign) && (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"绀句繚绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); + combineErrorMsg = "绀句繚鍏徃锛" + errorMsg; + } } //闇瑕佹媶鍒嗕釜浜哄拰鍏徃绂忓埄鍩烘暟鏃 @@ -3277,12 +3327,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (socialPaymentBaseString != null) { insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); } + if (!welBaseDiffSign) { + socialPaymentBaseString = adaptWelBaseLimit(insertSocialInfo.getSocialSchemeId(), insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + if (socialPaymentBaseString != null) { + insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString); + } + } } else { StringBuilder errorMsg = new StringBuilder(""); if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"绀句繚绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); combineErrorMsg = "绀句繚涓汉锛" + errorMsg; } + if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) { + // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"绀句繚绂忓埄鏄庣粏涓殑鍩烘暟鏇存柊鍐呭涓嶇鍚堢浉鍏冲熀鏁颁笂涓嬮檺瑕佹眰锛岃妫鏌ュ悗閲嶈瘯锛")); + combineErrorMsg = "绀句繚鍏徃锛" + errorMsg; + } } //闇瑕佹媶鍒嗕釜浜哄拰鍏徃绂忓埄鍩烘暟鏃 if (welBaseDiffSign) { @@ -4026,7 +4086,12 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (org.apache.commons.collections.CollectionUtils.isEmpty(employeeIds)) { return Collections.emptyList(); } - return getInsuranceBaseInfoMapper().listEndDateIsNull(employeeIds); + List resultList = new ArrayList<>(); + List> partition = Lists.partition(employeeIds, 500); + partition.forEach(part -> { + resultList.addAll(getInsuranceBaseInfoMapper().listEndDateIsNull(part)); + }); + return resultList; } /** diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index cef8f80b8..0484a1079 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -1409,6 +1409,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg); + Boolean socialCheckBase2 = true; + Boolean fundCheckBase2 = true; + Boolean otherCheckBase2 = true; + if (!welBaseDiffSign) { + socialCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); + fundCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); + otherCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); + } Boolean socialCheckComBase = true; Boolean fundCheckComBase = true; Boolean otherCheckComBase = true; @@ -1417,17 +1425,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg); } - if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) { + if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckBase2 && fundCheckBase2 && otherCheckBase2 && socialCheckComBase && fundCheckComBase && otherCheckComBase) { insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO); } else { String checkMessage = "璇ユ潯鏁版嵁涓"; - if (!socialCheckBase || !socialCheckComBase) { + if (!socialCheckBase || !socialCheckBase2 || !socialCheckComBase) { checkMessage = checkMessage + "绀句繚绂忓埄鍩烘暟銆"; } - if (!fundCheckBase || !fundCheckComBase) { + if (!fundCheckBase || !fundCheckBase2 || !fundCheckComBase) { checkMessage = checkMessage + "鍏Н閲戠鍒╁熀鏁般"; } - if (!otherCheckBase || !otherCheckComBase) { + if (!otherCheckBase || !otherCheckBase2 || !otherCheckComBase) { checkMessage = checkMessage + "鍏朵粬绂忓埄鍩烘暟銆"; } checkMessage = checkMessage.substring(0, checkMessage.length() - 1); @@ -1447,6 +1455,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString); insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString); insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString); + if (!welBaseDiffSign) { + newSocialPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + newFundPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + newOtherPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString); + insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString); + insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString); + } if (welBaseDiffSign) { String newSocialPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); diff --git a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java index f2af3a029..5b64f9b1c 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java @@ -26,6 +26,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.enums.SalaryCycleTypeEnum; +import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum; import com.engine.salary.formlua.entity.standard.ExcelResult; import com.engine.salary.service.*; @@ -136,6 +137,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc List employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList()); List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds); SalarySobCycleDTO salarySobCycleDTO = salaryAcctCalculateBO.getSalarySobCycleDTO(); + SalarySobPO salarySobPO = salaryAcctCalculateBO.getSalarySobPO(); List taxAgentIds = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentIds(); sw.stop(); // 2銆佹煡璇㈣柂璧勬。妗堢殑鏁版嵁 @@ -164,7 +166,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc sw.stop(); // 5銆佹煡璇㈠叾浠栧厤绋庢墸闄 sw.start("鏌ヨ鍏朵粬鍏嶇◣鎵i櫎"); - List otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentIds); + List otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentIds,salarySobPO.getIncomeCategory()); sw.stop(); //6銆佹煡璇㈢ぞ淇濈鍒 sw.start("鏌ヨ绀句繚绂忓埄"); diff --git a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java index 55f6e6a1b..904424876 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java @@ -248,7 +248,14 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration .replace("{1}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth()))); } // 鏌ヨ钖祫鎵灞炴湀鐨勮柂璧勬牳绠楄褰 - salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).taxAgentId(taxAgentId).build()); + salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).build()); + List salarySobPOS = getSalarySobService(user).listByTaxAgentId(saveParam.getTaxAgentId()); + if (CollectionUtils.isEmpty(salarySobPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98874, "{0}璇ヤ箟鍔′汉涓嬫棤璐﹀鏁版嵁").replace("{0}", saveParam.getSalaryMonth().toString())); + } + List salarySobIds = salarySobPOS.stream().map(SalarySobPO::getId).collect(Collectors.toList()); + + salaryAcctRecordPOS.stream().filter(record -> salarySobIds.contains(record.getSalarySobId())).collect(Collectors.toList()); // 鏃犺柂璧勬牳绠楄褰曪紝涓嶅厑璁哥敓鎴愪釜绋庣敵鎶ヨ〃 if (CollectionUtils.isEmpty(salaryAcctRecordPOS)) { diff --git a/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java index f0f5f9a38..5d75c8efa 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationValueServiceImpl.java @@ -25,6 +25,7 @@ import com.engine.salary.entity.taxdeclaration.po.*; import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; +import com.engine.salary.enums.salarysob.DeclareReportTypeEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.enums.taxdeclaration.SourceEnum; @@ -365,7 +366,12 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar Map>> onlineDataMap = new HashMap<>(); List list = getTaxDeclarationService(user).listByTaxDeclareRecordId(taxDeclareRecordPO.getId()); - list.stream().map(TaxDeclarationPO::getIncomeCategory).map(IncomeCategoryEnum::parseByValue).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(onlineDataMap, declareTaxResultFeedbackResponse)); + list.stream() + .map(TaxDeclarationPO::getIncomeCategory) + .map(IncomeCategoryEnum::parseByValue) + .filter(Objects::nonNull) + .filter(e -> e.getReportType() == DeclareReportTypeEnum.parseByValue(reportType)) + .forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(onlineDataMap, declareTaxResultFeedbackResponse)); Map resultList = new HashMap<>(); List taxDeclarationValues = listByTaxDeclarationId(taxDeclaration.getId()); @@ -446,7 +452,7 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar onlyShowColumns.add(col); hasDiff.set(true); } - } else if ((StrUtil.isBlank(localValue) && "0.00".equals(onlineValue)) || (StrUtil.isBlank(onlineValue) && "0.00".equals(localValue))) { + } else if ((StrUtil.isBlank(localValue) && ("0.00".equals(onlineValue) || "0".equals(onlineValue))) || (StrUtil.isBlank(onlineValue) && ("0.00".equals(localValue) || "0".equals(localValue)))) { //鐭矾 } else { if (!Objects.equals(localValue, onlineValue)) { @@ -504,7 +510,7 @@ public class TaxDeclarationValueServiceImpl extends Service implements TaxDeclar // 鑾峰彇绾夸笅瀵规瘮缁撴灉 Map contrastMap = contrast(param); List header = ((List) contrastMap.get("columns")); - PageInfo> pageInfo = (PageInfo>)contrastMap.get("pageInfo"); + PageInfo> pageInfo = (PageInfo>) contrastMap.get("pageInfo"); List> list = pageInfo.getList(); List empInfoColumns = new ArrayList<>(); diff --git a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java index 20392f904..91b162cb4 100644 --- a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java @@ -739,9 +739,15 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe requestParam.put("zhsd", taxDeclarationParam); } + if (declareReportType == DeclareReportTypeEnum.CLASSIFIED_INCOME) { + //鍒嗙被鎵寰 + Map flsdRequestParam = TaxDeclarationRequest.convert2flsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares, taxFreeMap); + requestParam.put("flsd", flsdRequestParam); + } + if (declareReportType == DeclareReportTypeEnum.NONRESIDENT_INCOME) { //闈炲眳姘戞墍寰椾唬鎵d唬缂 fjmsd - Map fjmsdRequestParam = TaxDeclarationRequest.convert2fjmsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares); + Map fjmsdRequestParam = TaxDeclarationRequest.convert2fjmsdRequestParam(taxReportColumns, taxDeclarations, taxDeclarationValues, employeeDeclares, taxFreeMap); requestParam.put("fjmsd", fjmsdRequestParam); } @@ -750,7 +756,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe Map params = new HashMap<>(1); Map header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret()); String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE); - log.info("涓◣鐢虫姤杩斿洖鏁版嵁: {} , taxDeclareRecord: {}", res, taxDeclareRecord); + log.info("涓◣鐢虫姤鏁版嵁:params {} ,res {}, taxDeclareRecord: {}",reqJson, res, taxDeclareRecord); DeclareTaxResponse declareTaxResponse = JsonUtil.parseObject(res, DeclareTaxResponse.class); if (Objects.isNull(declareTaxResponse) || Objects.isNull(declareTaxResponse.getHead())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156449, "鏈嶅姟寮傚父")); diff --git a/src/com/engine/salary/wrapper/SalarySobWrapper.java b/src/com/engine/salary/wrapper/SalarySobWrapper.java index 29731d629..7a4296775 100644 --- a/src/com/engine/salary/wrapper/SalarySobWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySobWrapper.java @@ -300,7 +300,8 @@ public class SalarySobWrapper extends Service { public List> incomeCategoryList() { List> list = new ArrayList<>(); Arrays.stream(IncomeCategoryEnum.values()) - .filter(incomeCategory -> incomeCategory.getReportType() == DeclareReportTypeEnum.COMPREHENSIVE_INCOME) + .filter(incomeCategory -> incomeCategory.getReportType() == DeclareReportTypeEnum.COMPREHENSIVE_INCOME + || incomeCategory.getReportType() == DeclareReportTypeEnum.CLASSIFIED_INCOME) .forEach(incomeCategory -> { Map map = new HashMap(); map.put("enum", incomeCategory);