diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index 24be7d7cc..c4b7713cc 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.01 +version=3.0.2.2504.03 openFormulaForcedEditing=false \ 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/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/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/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/Oracle/sql202504020203.sql b/resource/sqlupgrade/Oracle/sql202504020203.sql index 2246611d0..b6737d61f 100644 --- a/resource/sqlupgrade/Oracle/sql202504020203.sql +++ b/resource/sqlupgrade/Oracle/sql202504020203.sql @@ -34,8 +34,8 @@ CREATE TABLE hrsa_push_record_detail ) / -ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000); +ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000) / -ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000); +ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000) / \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202504030103.sql b/resource/sqlupgrade/Oracle/sql202504030103.sql index 8c2ab620f..37869d261 100644 --- a/resource/sqlupgrade/Oracle/sql202504030103.sql +++ b/resource/sqlupgrade/Oracle/sql202504030103.sql @@ -1,5 +1,5 @@ -ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER; +ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER / -ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0); +ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0) / \ 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/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/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/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/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java b/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java index 5527df49e..d45c35b79 100644 --- a/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java +++ b/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java @@ -62,6 +62,11 @@ public class EmployeeDeclareRequest { // *浠昏亴鍙楅泧绫诲瀷 EmploymentTypeEnum employmentTypeEnum = SalaryEnumUtil.enumMatchByValue(employeeDeclare.getEmploymentType(), EmploymentTypeEnum.class); employeeInfoMap.put("sfgy", employmentTypeEnum == null ? "" : employmentTypeEnum.getDefaultLabel()); + //鍏朵粬鎯呭喌璇存槑鈥渜tqksm鈥濓紝鏈3涓夋嫨鐨勫硷紝鍙夋嫨"鎵g即鐢虫姤鍒╂伅鑲℃伅绾㈠埄鎵寰椻濄佲滄墸缂寸敵鎶ュ伓鐒舵墍寰椻濄佲濈敵鎶ュ叾浠栨墍寰椻 + //涓鑸姵鍔℃墍寰楀鐞嗭紝鍙互缁熶竴鐢ㄢ濈敵鎶ュ叾浠栨墍寰椻濅綔涓洪粯璁ゅ氨濂 + if (employmentTypeEnum == EmploymentTypeEnum.OTHER) { + employeeInfoMap.put("qtqksm", "鐢虫姤鍏朵粬鎵寰"); + } // 鍏ヨ亴骞村害灏变笟鎯呭舰 employeeInfoMap.put("rzndjyqk", employeeDeclare.getEmploymentFirstYear()); // *鎵嬫満鍙风爜 diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 23a021dbd..b1360b808 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -630,7 +630,8 @@ public class SalaryBillBO { } else { for (Object keyName : e.keySet()) { if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) { - boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString())) + String itemValue = Util.null2String(e.get(keyName.toString())); + boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue)) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0); @@ -641,7 +642,7 @@ public class SalaryBillBO { emailContent.append(""); emailContent.append(""); - emailContent.append(e.get(keyName.toString())); + emailContent.append(itemValue.replaceAll("null", "")); emailContent.append(""); } break; @@ -710,7 +711,8 @@ public class SalaryBillBO { SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i); for (Object keyName : e.keySet()) { if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) { - boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString())) + String itemValue = Util.null2String(e.get(keyName.toString())); + boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue)) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0); @@ -721,7 +723,7 @@ public class SalaryBillBO { emailContent.append(""); emailContent.append(""); - emailContent.append(e.get(keyName.toString())); + emailContent.append(itemValue.replaceAll("null", "")); emailContent.append(""); } break; 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 8432faa61..1dbb8de4b 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; @@ -35,7 +36,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,6 +76,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.COMPENSATION_FOR_DISMISS) { // 瑙i櫎鍔冲姩鍚堝悓涓娆℃цˉ鍋块噾 List> employeeRequestParams = listRequestParam.computeIfAbsent("jcldhtycxbcjlb", k -> Lists.newArrayList()); + employeeRequestParam.put("sfzdscmsfb", "鏄"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.INCOME_FOR_INDIVIDUAL_EQUITY_INCENTIVE) { // 涓汉鑲℃潈婵鍔辨敹鍏 @@ -125,6 +127,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.REMUNERATION_FOR_AUTHOR) { // 绋块叕鎵寰 List> employeeRequestParams = listRequestParam.computeIfAbsent("gcsdlb", k -> Lists.newArrayList()); + employeeRequestParam.put("sfzdscmsfb", "鏄"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.ROYALTIES) { // 鐗硅鏉冧娇鐢ㄨ垂鎵寰 @@ -143,7 +146,8 @@ 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)) { @@ -167,10 +171,8 @@ public class TaxDeclarationRequest { } } - String string = employeeRequestParam.getOrDefault("syjkbx", "0").toString(); - System.out.println(); - - 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)) { @@ -185,7 +187,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()); @@ -195,7 +197,9 @@ 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)) { @@ -221,7 +225,9 @@ public class TaxDeclarationRequest { listRequestParam.put("syjkbxfblb", 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)) { @@ -251,7 +257,8 @@ 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)) { @@ -275,9 +282,10 @@ 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)) { employeeRequestParam.put("bz", pos.get(0).getRemark()); } @@ -313,6 +321,45 @@ public class TaxDeclarationRequest { } + public static Map convert2flsdRequestParam(List taxReportColumns, + List taxDeclarations, + List taxDeclarationValues, + List employeeDeclares) { + 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()); + for (TaxDeclarationValuePO taxDeclarationValue : values) { + EmployeeDeclarePO employeeDeclare = employeeDeclareMap.get(taxDeclarationValue.getEmployeeId()); + IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()); + 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); + } + } + } + + Map requestParam = Maps.newHashMap(); + requestParam.putAll(objRequestParam); + requestParam.putAll(listRequestParam); + return requestParam; + } + + public static Map convert2fjmsdRequestParam(List taxReportColumns, List taxDeclarations, List taxDeclarationValues, diff --git a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java index 5104871b5..94e015dd6 100644 --- a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java +++ b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java @@ -38,6 +38,10 @@ public class TaxDeclarationListDTO { @TableTitle(title = "钖祫绫诲瀷", dataIndex = "incomeCategory", key = "incomeCategory") private String incomeCategory; + @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") + @TableTitle(title = "绋庢鎵灞炴湡", dataIndex = "taxCycle", key = "taxCycle") + private Date taxCycle; + @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") @TableTitle(title = "钖祫鎵灞炴湀", dataIndex = "salaryMonth", key = "salaryMonth") private Date salaryMonth; @@ -48,10 +52,6 @@ public class TaxDeclarationListDTO { @TableTitle(title = "涓◣鎵g即涔夊姟浜", dataIndex = "taxAgentName", key = "taxAgentName") private String taxAgentName; - @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") - @TableTitle(title = "绋庢鎵灞炴湡", dataIndex = "taxCycle", key = "taxCycle") - private Date taxCycle; - //@TableTitle(title = "鎿嶄綔浜篿d", dataIndex = "operateEmployeeId", key = "operateEmployeeId") private Long operateEmployeeId; diff --git a/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java b/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java index 83f65672c..a7de714a9 100644 --- a/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java +++ b/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java @@ -7,6 +7,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; + import java.util.Date; /** diff --git a/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java b/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java index 6cf891cb3..6de2b37df 100644 --- a/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java +++ b/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java @@ -110,6 +110,13 @@ public class TaxDeclarationPO { LocalDateRange taxMonths; + //"寮濮嬫棩鏈 + private Date taxCycleFromDate; + + //缁撴潫鏃ユ湡 + private Date taxCycleEndDate; + + private Collection taxAgentIds; private Set opts; diff --git a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java index 83892cf9a..b2476e6b8 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; + } + }; @@ -711,11 +794,19 @@ public enum IncomeCategoryEnum implements BaseEnum { } List rysbsblb = feedbackResponse.getBody().getRysbsblb(); if (CollectionUtil.isNotEmpty(rysbsblb)) { - String err = rysbsblb.stream().map(GetASynIndividualIncomeTaxFeedbackResponse.Body.rysbsb::getSbyy).collect(Collectors.joining(";")); + String err = rysbsblb.stream().map(sb -> Util.null2String(sb.getXm()) + Util.null2String(sb.getSbyy())).collect(Collectors.joining(";")); throw new OnlineCalculateTaxException(err); } } + 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<>()) diff --git a/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java b/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java index 5f2ffedd0..d081615e5 100644 --- a/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java +++ b/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java @@ -571,7 +571,6 @@ public class DateTimeServiceImpl implements DateTimeService { cale.set(cale.get(Calendar.YEAR), month, 1); String lastday = formatTemp.format(cale.getTime()); - System.out.println(lastday); return new DataType(DataType.STRING, lastday); } 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 @@