新增免税收入、商业健康保险、税延养老保险、准予扣除的捐赠额、减免税额、其他附表
This commit is contained in:
parent
7243eece3d
commit
8c83e8ed6c
|
|
@ -0,0 +1,122 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
other_deduction varchar2(50),
|
||||
remark varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
identification_number varchar2(255),
|
||||
effective_date date,
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
recipient_name varchar2(255),
|
||||
tax_code varchar2(255),
|
||||
donation_number varchar2(255),
|
||||
donate_date date,
|
||||
donate_amount varchar2(50),
|
||||
deduction_proportion varchar2(10),
|
||||
actual_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
account_number varchar2(255),
|
||||
check_code varchar2(255),
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50),
|
||||
deduction_month date
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
derate_item varchar2(255),
|
||||
derate_property varchar2(255),
|
||||
derate_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
free_item varchar2(255),
|
||||
free_property varchar2(255),
|
||||
free_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
alter table hrsa_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_endowment_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_free_income add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_grant_donation add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_health_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_other_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
other_deduction varchar2(50),
|
||||
remark varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
identification_number varchar2(255),
|
||||
effective_date date,
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
recipient_name varchar2(255),
|
||||
tax_code varchar2(255),
|
||||
donation_number varchar2(255),
|
||||
donate_date date,
|
||||
donate_amount varchar2(50),
|
||||
deduction_proportion varchar2(10),
|
||||
actual_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
account_number varchar2(255),
|
||||
check_code varchar2(255),
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50),
|
||||
deduction_month date
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
derate_item varchar2(255),
|
||||
derate_property varchar2(255),
|
||||
derate_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
free_item varchar2(255),
|
||||
free_property varchar2(255),
|
||||
free_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
alter table hrsa_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_endowment_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_free_income add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_grant_donation add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_health_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_other_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
other_deduction varchar2(50),
|
||||
remark varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
identification_number varchar2(255),
|
||||
effective_date date,
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
recipient_name varchar2(255),
|
||||
tax_code varchar2(255),
|
||||
donation_number varchar2(255),
|
||||
donate_date date,
|
||||
donate_amount varchar2(50),
|
||||
deduction_proportion varchar2(10),
|
||||
actual_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
account_number varchar2(255),
|
||||
check_code varchar2(255),
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50),
|
||||
deduction_month date
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
derate_item varchar2(255),
|
||||
derate_property varchar2(255),
|
||||
derate_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
free_item varchar2(255),
|
||||
free_property varchar2(255),
|
||||
free_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
alter table hrsa_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_endowment_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_free_income add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_grant_donation add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_health_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_other_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id bigint primary key comment 'ID' ,
|
||||
create_time datetime comment '创建时间' ,
|
||||
update_time datetime comment '修改时间' ,
|
||||
creator bigint comment '创建人id' ,
|
||||
delete_type int default 0 comment '是否删除' ,
|
||||
tenant_key varchar(10) comment '租户KEY' ,
|
||||
main_id bigint comment '主表数据id' ,
|
||||
tax_year_month date comment '税款所属期' ,
|
||||
employee_id bigint comment '人员id' ,
|
||||
tax_agent_id bigint comment '个税扣缴义务人id' ,
|
||||
file_status int comment '归档状态 0未归档 1已归档' ,
|
||||
other_deduction varchar(50) comment '其他减免税额' ,
|
||||
remark varchar(255) comment '备注'
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id bigint primary key comment 'ID' ,
|
||||
create_time datetime comment '创建时间' ,
|
||||
update_time datetime comment '修改时间' ,
|
||||
creator bigint comment '创建人id' ,
|
||||
delete_type int default 0 comment '是否删除' ,
|
||||
tenant_key varchar(10) comment '租户KEY' ,
|
||||
main_id bigint comment '主表数据id' ,
|
||||
tax_year_month date comment '税款所属期' ,
|
||||
employee_id bigint comment '人员id' ,
|
||||
tax_agent_id bigint comment '个税扣缴义务人id' ,
|
||||
file_status int comment '归档状态 0未归档 1已归档' ,
|
||||
identification_number varchar(255) comment '税优识别码' ,
|
||||
effective_date date comment '保单生效日期' ,
|
||||
year_premium varchar(50) comment '年度保费' ,
|
||||
month_premium varchar(50) comment '月度保费' ,
|
||||
current_deduction varchar(50) comment '本期扣除金额'
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id bigint primary key comment 'ID' ,
|
||||
create_time datetime comment '创建时间' ,
|
||||
update_time datetime comment '修改时间' ,
|
||||
creator bigint comment '创建人id' ,
|
||||
delete_type int default 0 comment '是否删除' ,
|
||||
tenant_key varchar(10) comment '租户KEY' ,
|
||||
main_id bigint comment '主表数据id' ,
|
||||
tax_year_month date comment '税款所属期' ,
|
||||
employee_id bigint comment '人员id' ,
|
||||
tax_agent_id bigint comment '个税扣缴义务人id' ,
|
||||
file_status int comment '归档状态 0未归档 1已归档' ,
|
||||
recipient_name varchar(255) comment '受赠单位名称' ,
|
||||
tax_code varchar(255) comment '受赠单位纳税人识别号' ,
|
||||
donation_number varchar(255) comment '捐赠凭证号' ,
|
||||
donate_date date comment '捐赠日期' ,
|
||||
donate_amount varchar(50) comment '捐赠金额' ,
|
||||
deduction_proportion varchar(10) comment '扣除比例' ,
|
||||
actual_deduction varchar(50) comment '实际扣除金额'
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id bigint primary key comment 'ID' ,
|
||||
create_time datetime comment '创建时间' ,
|
||||
update_time datetime comment '修改时间' ,
|
||||
creator bigint comment '创建人id' ,
|
||||
delete_type int default 0 comment '是否删除' ,
|
||||
tenant_key varchar(10) comment '租户KEY' ,
|
||||
main_id bigint comment '主表数据id' ,
|
||||
tax_year_month date comment '税款所属期' ,
|
||||
employee_id bigint comment '人员id' ,
|
||||
tax_agent_id bigint comment '个税扣缴义务人id' ,
|
||||
file_status int comment '归档状态 0未归档 1已归档' ,
|
||||
account_number varchar(255) comment '税延养老账户编号' ,
|
||||
check_code varchar(255) comment '报税校验码' ,
|
||||
year_premium varchar(50) comment '年度保费' ,
|
||||
month_premium varchar(50) comment '月度保费' ,
|
||||
current_deduction varchar(50) comment '本期扣除金额' ,
|
||||
deduction_month date comment '申请扣除月份'
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id bigint primary key comment 'ID' ,
|
||||
create_time datetime comment '创建时间' ,
|
||||
update_time datetime comment '修改时间' ,
|
||||
creator bigint comment '创建人id' ,
|
||||
delete_type int default 0 comment '是否删除' ,
|
||||
tenant_key varchar(10) comment '租户KEY' ,
|
||||
main_id bigint comment '主表数据id' ,
|
||||
tax_year_month date comment '税款所属期' ,
|
||||
employee_id bigint comment '人员id' ,
|
||||
tax_agent_id bigint comment '个税扣缴义务人id' ,
|
||||
file_status int comment '归档状态 0未归档 1已归档' ,
|
||||
derate_item varchar(255) comment '减免事项' ,
|
||||
derate_property varchar(255) comment '减免性质' ,
|
||||
derate_amount varchar(255) comment '减免税额'
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id bigint primary key comment 'ID' ,
|
||||
create_time datetime comment '创建时间' ,
|
||||
update_time datetime comment '修改时间' ,
|
||||
creator bigint comment '创建人id' ,
|
||||
delete_type int default 0 comment '是否删除' ,
|
||||
tenant_key varchar(10) comment '租户KEY' ,
|
||||
main_id bigint comment '主表数据id' ,
|
||||
tax_year_month date comment '税款所属期' ,
|
||||
employee_id bigint comment '人员id' ,
|
||||
tax_agent_id bigint comment '个税扣缴义务人id' ,
|
||||
file_status int comment '归档状态 0未归档 1已归档' ,
|
||||
free_item varchar(255) comment '免税事项' ,
|
||||
free_property varchar(255) comment '免税性质' ,
|
||||
free_amount varchar(255) comment '免税金额'
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
alter table hrsa_derate_deduction add employee_type int
|
||||
;
|
||||
alter table hrsa_endowment_insurance add employee_type int
|
||||
;
|
||||
alter table hrsa_free_income add employee_type int
|
||||
;
|
||||
alter table hrsa_grant_donation add employee_type int
|
||||
;
|
||||
alter table hrsa_health_insurance add employee_type int
|
||||
;
|
||||
alter table hrsa_other_derate_deduction add employee_type int
|
||||
;
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
other_deduction varchar2(50),
|
||||
remark varchar2(255)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
identification_number varchar2(255),
|
||||
effective_date date,
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
recipient_name varchar2(255),
|
||||
tax_code varchar2(255),
|
||||
donation_number varchar2(255),
|
||||
donate_date date,
|
||||
donate_amount varchar2(50),
|
||||
deduction_proportion varchar2(10),
|
||||
actual_deduction varchar2(50)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
account_number varchar2(255),
|
||||
check_code varchar2(255),
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50),
|
||||
deduction_month date
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
derate_item varchar2(255),
|
||||
derate_property varchar2(255),
|
||||
derate_amount varchar2(255)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
free_item varchar2(255),
|
||||
free_property varchar2(255),
|
||||
free_amount varchar2(255)
|
||||
)
|
||||
/
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
alter table hrsa_derate_deduction add employee_type int
|
||||
/
|
||||
alter table hrsa_endowment_insurance add employee_type int
|
||||
/
|
||||
alter table hrsa_free_income add employee_type int
|
||||
/
|
||||
alter table hrsa_grant_donation add employee_type int
|
||||
/
|
||||
alter table hrsa_health_insurance add employee_type int
|
||||
/
|
||||
alter table hrsa_other_derate_deduction add employee_type int
|
||||
/
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month date,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
other_deduction varchar(50),
|
||||
remark varchar(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month date,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
identification_number varchar(255),
|
||||
effective_date date,
|
||||
year_premium varchar(50),
|
||||
month_premium varchar(50),
|
||||
current_deduction varchar(50)
|
||||
);
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month date,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
recipient_name varchar(255),
|
||||
tax_code varchar(255),
|
||||
donation_number varchar(255),
|
||||
donate_date date,
|
||||
donate_amount varchar(50),
|
||||
deduction_proportion varchar(10),
|
||||
actual_deduction varchar(50)
|
||||
);
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month date,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
account_number varchar(255),
|
||||
check_code varchar(255),
|
||||
year_premium varchar(50),
|
||||
month_premium varchar(50),
|
||||
current_deduction varchar(50),
|
||||
deduction_month date
|
||||
);
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month date,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
derate_item varchar(255),
|
||||
derate_property varchar(255),
|
||||
derate_amount varchar(255)
|
||||
);
|
||||
/
|
||||
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month date,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
free_item varchar(255),
|
||||
free_property varchar(255),
|
||||
free_amount varchar(255)
|
||||
);
|
||||
/
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
alter table hrsa_derate_deduction add employee_type int;
|
||||
/
|
||||
alter table hrsa_endowment_insurance add employee_type int;
|
||||
/
|
||||
alter table hrsa_free_income add employee_type int;
|
||||
/
|
||||
alter table hrsa_grant_donation add employee_type int;
|
||||
/
|
||||
alter table hrsa_health_insurance add employee_type int;
|
||||
/
|
||||
alter table hrsa_other_derate_deduction add employee_type int;
|
||||
/
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time datetime,
|
||||
update_time datetime,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key nvarchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month datetime,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
other_deduction nvarchar(50),
|
||||
remark nvarchar(255)
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time datetime,
|
||||
update_time datetime,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key nvarchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month datetime,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
identification_number nvarchar(255),
|
||||
effective_date datetime,
|
||||
year_premium nvarchar(50),
|
||||
month_premium nvarchar(50),
|
||||
current_deduction nvarchar(50)
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time datetime,
|
||||
update_time datetime,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key nvarchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month datetime,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
recipient_name nvarchar(255),
|
||||
tax_code nvarchar(255),
|
||||
donation_number nvarchar(255),
|
||||
donate_date datetime,
|
||||
donate_amount nvarchar(50),
|
||||
deduction_proportion nvarchar(10),
|
||||
actual_deduction nvarchar(50)
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time datetime,
|
||||
update_time datetime,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key nvarchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month datetime,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
account_number nvarchar(255),
|
||||
check_code nvarchar(255),
|
||||
year_premium nvarchar(50),
|
||||
month_premium nvarchar(50),
|
||||
current_deduction nvarchar(50),
|
||||
deduction_month datetime
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time datetime,
|
||||
update_time datetime,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key nvarchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month datetime,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
derate_item nvarchar(255),
|
||||
derate_property nvarchar(255),
|
||||
derate_amount nvarchar(255)
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id bigint primary key ,
|
||||
create_time datetime,
|
||||
update_time datetime,
|
||||
creator bigint,
|
||||
delete_type int default 0,
|
||||
tenant_key nvarchar(10),
|
||||
main_id bigint,
|
||||
tax_year_month datetime,
|
||||
employee_id bigint,
|
||||
tax_agent_id bigint,
|
||||
file_status int,
|
||||
free_item nvarchar(255),
|
||||
free_property nvarchar(255),
|
||||
free_amount nvarchar(255)
|
||||
)
|
||||
GO
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
alter table hrsa_derate_deduction add employee_type int
|
||||
GO
|
||||
alter table hrsa_endowment_insurance add employee_type int
|
||||
GO
|
||||
alter table hrsa_free_income add employee_type int
|
||||
GO
|
||||
alter table hrsa_grant_donation add employee_type int
|
||||
GO
|
||||
alter table hrsa_health_insurance add employee_type int
|
||||
GO
|
||||
alter table hrsa_other_derate_deduction add employee_type int
|
||||
GO
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
create table hrsa_other_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
other_deduction varchar2(50),
|
||||
remark varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_health_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
identification_number varchar2(255),
|
||||
effective_date date,
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_grant_donation
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
recipient_name varchar2(255),
|
||||
tax_code varchar2(255),
|
||||
donation_number varchar2(255),
|
||||
donate_date date,
|
||||
donate_amount varchar2(50),
|
||||
deduction_proportion varchar2(10),
|
||||
actual_deduction varchar2(50)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_endowment_insurance
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
account_number varchar2(255),
|
||||
check_code varchar2(255),
|
||||
year_premium varchar2(50),
|
||||
month_premium varchar2(50),
|
||||
current_deduction varchar2(50),
|
||||
deduction_month date
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_derate_deduction
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
derate_item varchar2(255),
|
||||
derate_property varchar2(255),
|
||||
derate_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
create table hrsa_free_income
|
||||
(
|
||||
id number primary key ,
|
||||
create_time date,
|
||||
update_time date,
|
||||
creator number,
|
||||
delete_type int default 0,
|
||||
tenant_key varchar2(10),
|
||||
main_id number,
|
||||
tax_year_month date,
|
||||
employee_id number,
|
||||
tax_agent_id number,
|
||||
file_status int,
|
||||
free_item varchar2(255),
|
||||
free_property varchar2(255),
|
||||
free_amount varchar2(255)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
alter table hrsa_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_endowment_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_free_income add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_grant_donation add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_health_insurance add employee_type int;
|
||||
/
|
||||
|
||||
alter table hrsa_other_derate_deduction add employee_type int;
|
||||
/
|
||||
|
||||
|
|
@ -47,6 +47,7 @@ public class OtherDeductionRecordDTO {
|
|||
@SalaryTableColumn(text = "个税扣缴义务人", width = "10%", column = "taxAgentName")
|
||||
@TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName")
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-减免税额
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("其他免税扣除-减免税额")
|
||||
//hrsa_derate_deduction
|
||||
@ElogTransform(name = "其他免税扣除-减免税额")
|
||||
public class DerateDeductionPO{
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "人员")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "减免事项")
|
||||
private String derateItem;
|
||||
|
||||
@ElogTransform(name = "减免性质")
|
||||
private String derateProperty;
|
||||
|
||||
@ElogTransform(name = "减免金额")
|
||||
private String derateAmount;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-税延养老保险
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_endowment_insurance")
|
||||
@ElogTransform(name = "其他免税扣除-税延养老保险")
|
||||
public class EndowmentInsurancePO {
|
||||
|
||||
@ElogTransform(name = "主键")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "人员id")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人ID")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "申报扣除月份")
|
||||
private Date deductionMonth;
|
||||
|
||||
@ElogTransform(name = "税延养老账户编号")
|
||||
private String accountNumber;
|
||||
|
||||
@ElogTransform(name = "报税校验码")
|
||||
private String checkCode;
|
||||
|
||||
@ElogTransform(name = "年度保费")
|
||||
private String yearPremium;
|
||||
|
||||
@ElogTransform(name = "月度保费")
|
||||
private String monthPremium;
|
||||
|
||||
@ElogTransform(name = "本期扣除金额")
|
||||
private String currentDeduction;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-免税收入表单
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_free_income
|
||||
@ElogTransform(name = "其他免税扣除-免税收入")
|
||||
public class FreeIncomePO {
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "人员")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "免税事项")
|
||||
private String freeItem;
|
||||
|
||||
@ElogTransform(name = "免税性质")
|
||||
private String freeProperty;
|
||||
|
||||
@ElogTransform(name = "免税金额")
|
||||
private String freeAmount;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-准予扣除的捐赠额
|
||||
*
|
||||
* @author chengliming
|
||||
* @date 2023-06-09 15:03:45
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_grant_donation")
|
||||
@ElogTransform(name = "其他免税扣除-准予扣除的捐赠额")
|
||||
public class GrantDonationPO {
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "人员")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "受赠单位名称")
|
||||
private String recipientName;
|
||||
|
||||
@ElogTransform(name = "受赠单位纳税人识别号")
|
||||
private String taxCode;
|
||||
|
||||
@ElogTransform(name = "捐赠凭证号")
|
||||
private String donationNumber;
|
||||
|
||||
@ElogTransform(name = "捐赠日期")
|
||||
private Date donateDate;
|
||||
|
||||
@ElogTransform(name = "捐赠金额")
|
||||
private String donateAmount;
|
||||
|
||||
@ElogTransform(name = "扣除比例")
|
||||
private String deductionProportion;
|
||||
|
||||
@ElogTransform(name = "实际扣除金额")
|
||||
private String actualDeduction;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
*
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-商业健康保险表单
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_health_insurance")
|
||||
@ElogTransform(name = "其他免税扣除-商业健康保险表单")
|
||||
public class HealthInsurancePO {
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "人员")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "税优识别码")
|
||||
private String identificationNumber;
|
||||
|
||||
@ElogTransform(name = "保单生效日期")
|
||||
private Date effectiveDate;
|
||||
|
||||
@ElogTransform(name = "年度保费")
|
||||
private String yearPremium;
|
||||
|
||||
@ElogTransform(name = "月度保费")
|
||||
private String monthPremium;
|
||||
|
||||
@ElogTransform(name = "本期扣除金额")
|
||||
private String currentDeduction;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -46,6 +46,15 @@ public class OtherDeductionPO {
|
|||
@ElogTransform( name ="税款所属期")
|
||||
private Date declareMonth;
|
||||
|
||||
/**
|
||||
* 免税收入
|
||||
*/
|
||||
@ElogTransform(name = "免税收入")
|
||||
@SalaryFormulaVar(defaultLabel = "免税收入", labelId = 91238, dataType = "number")
|
||||
@Encrypt
|
||||
private String freeIncome;
|
||||
|
||||
|
||||
/**
|
||||
* 商业健康保险
|
||||
*/
|
||||
|
|
@ -62,6 +71,14 @@ public class OtherDeductionPO {
|
|||
@Encrypt
|
||||
private String taxDelayEndowmentInsurance;
|
||||
|
||||
/**
|
||||
* 减免税额
|
||||
*/
|
||||
@ElogTransform(name = "减免税额")
|
||||
@SalaryFormulaVar(defaultLabel = "减免税额", labelId = 102810, dataType = "number")
|
||||
@Encrypt
|
||||
private String derateDeduction;
|
||||
|
||||
/**
|
||||
* 其他
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-减免税额
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_other_derate_deduction
|
||||
@ElogTransform(name = "其他免税扣除-减免税额")
|
||||
public class OtherDerateDeductionPO {
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "人员")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "减免税额")
|
||||
private String otherDeduction;
|
||||
|
||||
@ElogTransform(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
*
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
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 lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 其他免税扣除-个人养老金
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_personal_pension")
|
||||
@ElogTransform(name = "其他免税扣除-个人养老金")
|
||||
public class PersonalPensionPO{
|
||||
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ElogTransform(name = "主表数据Id")
|
||||
private Long mainId;
|
||||
|
||||
@ElogTransform(name = "税款所属期")
|
||||
private Date taxYearMonth;
|
||||
|
||||
@ElogTransform(name = "缴费月度")
|
||||
private Date payMonth;
|
||||
|
||||
@ElogTransform(name = "人员")
|
||||
private Long employeeId;
|
||||
|
||||
@ElogTransform(name = "个税扣缴义务人")
|
||||
private Long taxAgentId;
|
||||
|
||||
@ElogTransform(name = "凭证类别")
|
||||
private Integer voucherType;
|
||||
|
||||
@ElogTransform(name = "凭证类别名称")
|
||||
private String voucherTypeName;
|
||||
|
||||
@ElogTransform(name = "凭证编码")
|
||||
private String voucherNo;
|
||||
|
||||
@ElogTransform(name = "缴费金额")
|
||||
private String payAmount;
|
||||
|
||||
@ElogTransform(name = "归档状态 0未归档 1已归档")
|
||||
private Integer fileStatus;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
* @see DataCollectionEmployeeTypeEnum
|
||||
*/
|
||||
@ElogTransform(name = "人员类型")
|
||||
private Integer employeeType;
|
||||
|
||||
/**
|
||||
* @see EnumDeductionDataSource
|
||||
*/
|
||||
@ElogTransform(name = "数据来源")
|
||||
private Integer dataSource;
|
||||
|
||||
@ElogTransform(name = "采集来源")
|
||||
private String collectSource;
|
||||
|
||||
@ElogTransform(name = "创建时间", ignore = true)
|
||||
private Date createTime;
|
||||
|
||||
@ElogTransform(name = "更新时间", ignore = true)
|
||||
private Date updateTime;
|
||||
|
||||
@ElogTransform(name = "创建人", ignore = true)
|
||||
private Long creator;
|
||||
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除", ignore = true)
|
||||
private Integer deleteType;
|
||||
|
||||
@ElogTransform(name = "租户key", ignore = true)
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -126,6 +126,8 @@ public class TaxDeclarationRequest {
|
|||
List<Map<String, Object>> employeeRequestParams = listRequestParam.computeIfAbsent("txq", k -> Lists.newArrayList());
|
||||
employeeRequestParams.add(employeeRequestParam);
|
||||
}
|
||||
// 其他免税扣除附表
|
||||
// buildOtherDeductionDetailParams(taxFreeMap, listRequestParam, employeeDeclare, incomeCategoryEnum, employeeRequestParam);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
package com.engine.salary.enums.datacollection;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 各类专项扣除数据来源
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public enum EnumDeductionDataSource {
|
||||
/**
|
||||
* 人工输入
|
||||
*/
|
||||
MANUAL(1, "人工输入", 153339),
|
||||
/**
|
||||
* 在线获取
|
||||
*/
|
||||
ONLINE(2, "在线获取", 153340),
|
||||
/**
|
||||
* 自动计算
|
||||
*/
|
||||
AUTO_CALC(3, "自动计算", 233727),
|
||||
;
|
||||
|
||||
private int value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
private int labelId;
|
||||
|
||||
EnumDeductionDataSource(int value, String defaultLabel, int labelId) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
private static final Map<Integer, EnumDeductionDataSource> VALUE_NAME_MAP;
|
||||
|
||||
static {
|
||||
final EnumDeductionDataSource[] values = EnumDeductionDataSource.values();
|
||||
VALUE_NAME_MAP = new HashMap<>(values.length);
|
||||
for (EnumDeductionDataSource value : values) {
|
||||
VALUE_NAME_MAP.put(value.getValue(), value);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Integer getLabelId() {
|
||||
return labelId;
|
||||
}
|
||||
|
||||
public static EnumDeductionDataSource parseByValue(Integer index) {
|
||||
if (index == null) {
|
||||
return null;
|
||||
}
|
||||
return VALUE_NAME_MAP.get(index);
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.po.EndowmentInsurancePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface EndowmentInsuranceMapper {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<EndowmentInsurancePO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<EndowmentInsurancePO> listSome(EndowmentInsurancePO endowmentInsurance);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
EndowmentInsurancePO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param endowmentInsurance 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(EndowmentInsurancePO endowmentInsurance);
|
||||
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param endowmentInsurance 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(EndowmentInsurancePO endowmentInsurance);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param endowmentInsurance 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(EndowmentInsurancePO endowmentInsurance);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param endowmentInsurance 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(EndowmentInsurancePO endowmentInsurance);
|
||||
|
||||
/**
|
||||
* 批量删除记录
|
||||
* @param ids 主键id集合
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.datacollection.EndowmentInsuranceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.datacollection.po.EndowmentInsurancePO">
|
||||
<result column="account_number" property="accountNumber"/>
|
||||
<result column="check_code" property="checkCode"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="current_deduction" property="currentDeduction"/>
|
||||
<result column="deduction_month" property="deductionMonth"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="file_status" property="fileStatus"/>
|
||||
<result column="id" property="id"/>
|
||||
<result column="main_id" property="mainId"/>
|
||||
<result column="month_premium" property="monthPremium"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="tax_year_month" property="taxYearMonth"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="year_premium" property="yearPremium"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
account_number
|
||||
, t.check_code
|
||||
, t.create_time
|
||||
, t.creator
|
||||
, t.current_deduction
|
||||
, t.deduction_month
|
||||
, t.delete_type
|
||||
, t.employee_id
|
||||
, t.employee_type
|
||||
, t.file_status
|
||||
, t.id
|
||||
, t.main_id
|
||||
, t.month_premium
|
||||
, t.tax_agent_id
|
||||
, t.tax_year_month
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
, t.year_premium
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_endowment_insurance t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_endowment_insurance t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap"
|
||||
parameterType="com.engine.salary.entity.datacollection.po.EndowmentInsurancePO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_endowment_insurance t
|
||||
WHERE delete_type = 0
|
||||
<if test="accountNumber != null">
|
||||
AND account_number = #{accountNumber}
|
||||
</if>
|
||||
<if test="checkCode != null">
|
||||
AND check_code = #{checkCode}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
AND current_deduction = #{currentDeduction}
|
||||
</if>
|
||||
<if test="deductionMonth != null">
|
||||
AND deduction_month = #{deductionMonth}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
AND month_premium = #{monthPremium}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
AND year_premium = #{yearPremium}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.EndowmentInsurancePO">
|
||||
INSERT INTO hrsa_endowment_insurance
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="accountNumber != null">
|
||||
account_number,
|
||||
</if>
|
||||
<if test="checkCode != null">
|
||||
check_code,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
current_deduction,
|
||||
</if>
|
||||
<if test="deductionMonth != null">
|
||||
deduction_month,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
month_premium,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
year_premium,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="accountNumber != null">
|
||||
#{accountNumber},
|
||||
</if>
|
||||
<if test="checkCode != null">
|
||||
#{checkCode},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
#{currentDeduction},
|
||||
</if>
|
||||
<if test="deductionMonth != null">
|
||||
#{deductionMonth},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
#{monthPremium},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
#{yearPremium},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.datacollection.po.EndowmentInsurancePO">
|
||||
UPDATE hrsa_endowment_insurance
|
||||
<set>
|
||||
account_number=#{accountNumber},
|
||||
check_code=#{checkCode},
|
||||
create_time=#{createTime},
|
||||
creator=#{creator},
|
||||
current_deduction=#{currentDeduction},
|
||||
deduction_month=#{deductionMonth},
|
||||
delete_type=#{deleteType},
|
||||
employee_id=#{employeeId},
|
||||
employee_type=#{employeeType},
|
||||
file_status=#{fileStatus},
|
||||
main_id=#{mainId},
|
||||
month_premium=#{monthPremium},
|
||||
tax_agent_id=#{taxAgentId},
|
||||
tax_year_month=#{taxYearMonth},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
year_premium=#{yearPremium},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.EndowmentInsurancePO">
|
||||
UPDATE hrsa_endowment_insurance
|
||||
<set>
|
||||
<if test="accountNumber != null">
|
||||
account_number=#{accountNumber},
|
||||
</if>
|
||||
<if test="checkCode != null">
|
||||
check_code=#{checkCode},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
current_deduction=#{currentDeduction},
|
||||
</if>
|
||||
<if test="deductionMonth != null">
|
||||
deduction_month=#{deductionMonth},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
month_premium=#{monthPremium},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
year_premium=#{yearPremium},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_endowment_insurance
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_endowment_insurance
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.po.FreeIncomePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface FreeIncomeMapper {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<FreeIncomePO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<FreeIncomePO> listSome(FreeIncomePO freeIncome);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
FreeIncomePO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param freeIncome 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(FreeIncomePO freeIncome);
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param freeIncome 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(FreeIncomePO freeIncome);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param freeIncome 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(FreeIncomePO freeIncome);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param freeIncome 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(FreeIncomePO freeIncome);
|
||||
|
||||
/**
|
||||
* 批量删除记录
|
||||
* @param ids 主键id集合
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,315 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.datacollection.FreeIncomeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.datacollection.po.FreeIncomePO">
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="file_status" property="fileStatus"/>
|
||||
<result column="free_amount" property="freeAmount"/>
|
||||
<result column="free_item" property="freeItem"/>
|
||||
<result column="free_property" property="freeProperty"/>
|
||||
<result column="id" property="id"/>
|
||||
<result column="main_id" property="mainId"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="tax_year_month" property="taxYearMonth"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
create_time
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.employee_id
|
||||
, t.employee_type
|
||||
, t.file_status
|
||||
, t.free_amount
|
||||
, t.free_item
|
||||
, t.free_property
|
||||
, t.id
|
||||
, t.main_id
|
||||
, t.tax_agent_id
|
||||
, t.tax_year_month
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_free_income t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_free_income t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap"
|
||||
parameterType="com.engine.salary.entity.datacollection.po.FreeIncomePO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_free_income t
|
||||
WHERE delete_type = 0
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="freeAmount != null">
|
||||
AND free_amount = #{freeAmount}
|
||||
</if>
|
||||
<if test="freeItem != null">
|
||||
AND free_item = #{freeItem}
|
||||
</if>
|
||||
<if test="freeProperty != null">
|
||||
AND free_property = #{freeProperty}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.FreeIncomePO">
|
||||
INSERT INTO hrsa_free_income
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="freeAmount != null">
|
||||
free_amount,
|
||||
</if>
|
||||
<if test="freeItem != null">
|
||||
free_item,
|
||||
</if>
|
||||
<if test="freeProperty != null">
|
||||
free_property,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="freeAmount != null">
|
||||
#{freeAmount},
|
||||
</if>
|
||||
<if test="freeItem != null">
|
||||
#{freeItem},
|
||||
</if>
|
||||
<if test="freeProperty != null">
|
||||
#{freeProperty},
|
||||
</if>
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.datacollection.po.FreeIncomePO">
|
||||
UPDATE hrsa_free_income
|
||||
<set>
|
||||
create_time=#{createTime},
|
||||
creator=#{creator},
|
||||
delete_type=#{deleteType},
|
||||
employee_id=#{employeeId},
|
||||
employee_type=#{employeeType},
|
||||
file_status=#{fileStatus},
|
||||
free_amount=#{freeAmount},
|
||||
free_item=#{freeItem},
|
||||
free_property=#{freeProperty},
|
||||
main_id=#{mainId},
|
||||
tax_agent_id=#{taxAgentId},
|
||||
tax_year_month=#{taxYearMonth},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.FreeIncomePO">
|
||||
UPDATE hrsa_free_income
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="freeAmount != null">
|
||||
free_amount=#{freeAmount},
|
||||
</if>
|
||||
<if test="freeItem != null">
|
||||
free_item=#{freeItem},
|
||||
</if>
|
||||
<if test="freeProperty != null">
|
||||
free_property=#{freeProperty},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_free_income
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_free_income
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.po.GrantDonationPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface GrantDonationMapper {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<GrantDonationPO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<GrantDonationPO> listSome(GrantDonationPO grantDonation);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
GrantDonationPO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param grantDonation 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(GrantDonationPO grantDonation);
|
||||
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param grantDonation 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(GrantDonationPO grantDonation);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param grantDonation 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(GrantDonationPO grantDonation);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param grantDonation 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(GrantDonationPO grantDonation);
|
||||
|
||||
/**
|
||||
* 批量删除记录
|
||||
* @param ids 主键id集合
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,375 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.datacollection.GrantDonationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.datacollection.po.GrantDonationPO">
|
||||
<result column="actual_deduction" property="actualDeduction"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="deduction_proportion" property="deductionProportion"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="donate_amount" property="donateAmount"/>
|
||||
<result column="donate_date" property="donateDate"/>
|
||||
<result column="donation_number" property="donationNumber"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="file_status" property="fileStatus"/>
|
||||
<result column="id" property="id"/>
|
||||
<result column="main_id" property="mainId"/>
|
||||
<result column="recipient_name" property="recipientName"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="tax_code" property="taxCode"/>
|
||||
<result column="tax_year_month" property="taxYearMonth"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
actual_deduction
|
||||
, t.create_time
|
||||
, t.creator
|
||||
, t.deduction_proportion
|
||||
, t.delete_type
|
||||
, t.donate_amount
|
||||
, t.donate_date
|
||||
, t.donation_number
|
||||
, t.employee_id
|
||||
, t.employee_type
|
||||
, t.file_status
|
||||
, t.id
|
||||
, t.main_id
|
||||
, t.recipient_name
|
||||
, t.tax_agent_id
|
||||
, t.tax_code
|
||||
, t.tax_year_month
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_grant_donation t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_grant_donation t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap"
|
||||
parameterType="com.engine.salary.entity.datacollection.po.GrantDonationPO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_grant_donation t
|
||||
WHERE delete_type = 0
|
||||
<if test="actualDeduction != null">
|
||||
AND actual_deduction = #{actualDeduction}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deductionProportion != null">
|
||||
AND deduction_proportion = #{deductionProportion}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="donateAmount != null">
|
||||
AND donate_amount = #{donateAmount}
|
||||
</if>
|
||||
<if test="donateDate != null">
|
||||
AND donate_date = #{donateDate}
|
||||
</if>
|
||||
<if test="donationNumber != null">
|
||||
AND donation_number = #{donationNumber}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="recipientName != null">
|
||||
AND recipient_name = #{recipientName}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxCode != null">
|
||||
AND tax_code = #{taxCode}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.GrantDonationPO">
|
||||
INSERT INTO hrsa_grant_donation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="actualDeduction != null">
|
||||
actual_deduction,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deductionProportion != null">
|
||||
deduction_proportion,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="donateAmount != null">
|
||||
donate_amount,
|
||||
</if>
|
||||
<if test="donateDate != null">
|
||||
donate_date,
|
||||
</if>
|
||||
<if test="donationNumber != null">
|
||||
donation_number,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="recipientName != null">
|
||||
recipient_name,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxCode != null">
|
||||
tax_code,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="actualDeduction != null">
|
||||
#{actualDeduction},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deductionProportion != null">
|
||||
#{deductionProportion},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="donateAmount != null">
|
||||
#{donateAmount},
|
||||
</if>
|
||||
<if test="donateDate != null">
|
||||
#{donateDate},
|
||||
</if>
|
||||
<if test="donationNumber != null">
|
||||
#{donationNumber},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="recipientName != null">
|
||||
#{recipientName},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxCode != null">
|
||||
#{taxCode},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.datacollection.po.GrantDonationPO">
|
||||
UPDATE hrsa_grant_donation
|
||||
<set>
|
||||
actual_deduction=#{actualDeduction},
|
||||
create_time=#{createTime},
|
||||
creator=#{creator},
|
||||
deduction_proportion=#{deductionProportion},
|
||||
delete_type=#{deleteType},
|
||||
donate_amount=#{donateAmount},
|
||||
donate_date=#{donateDate},
|
||||
donation_number=#{donationNumber},
|
||||
employee_id=#{employeeId},
|
||||
employee_type=#{employeeType},
|
||||
file_status=#{fileStatus},
|
||||
main_id=#{mainId},
|
||||
recipient_name=#{recipientName},
|
||||
tax_agent_id=#{taxAgentId},
|
||||
tax_code=#{taxCode},
|
||||
tax_year_month=#{taxYearMonth},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.GrantDonationPO">
|
||||
UPDATE hrsa_grant_donation
|
||||
<set>
|
||||
<if test="actualDeduction != null">
|
||||
actual_deduction=#{actualDeduction},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deductionProportion != null">
|
||||
deduction_proportion=#{deductionProportion},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="donateAmount != null">
|
||||
donate_amount=#{donateAmount},
|
||||
</if>
|
||||
<if test="donateDate != null">
|
||||
donate_date=#{donateDate},
|
||||
</if>
|
||||
<if test="donationNumber != null">
|
||||
donation_number=#{donationNumber},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="recipientName != null">
|
||||
recipient_name=#{recipientName},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxCode != null">
|
||||
tax_code=#{taxCode},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_grant_donation
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_grant_donation
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.po.HealthInsurancePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface HealthInsuranceMapper {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<HealthInsurancePO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<HealthInsurancePO> listSome(HealthInsurancePO healthInsurance);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
HealthInsurancePO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param healthInsurance 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(HealthInsurancePO healthInsurance);
|
||||
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param healthInsurance 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(HealthInsurancePO healthInsurance);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param healthInsurance 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(HealthInsurancePO healthInsurance);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param healthInsurance 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(HealthInsurancePO healthInsurance);
|
||||
|
||||
/**
|
||||
* 批量删除记录
|
||||
* @param ids 主键id集合
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,345 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.datacollection.HealthInsuranceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.datacollection.po.HealthInsurancePO">
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="current_deduction" property="currentDeduction"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="effective_date" property="effectiveDate"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="file_status" property="fileStatus"/>
|
||||
<result column="id" property="id"/>
|
||||
<result column="identification_number" property="identificationNumber"/>
|
||||
<result column="main_id" property="mainId"/>
|
||||
<result column="month_premium" property="monthPremium"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<result column="tax_year_month" property="taxYearMonth"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="year_premium" property="yearPremium"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
create_time
|
||||
, t.creator
|
||||
, t.current_deduction
|
||||
, t.delete_type
|
||||
, t.effective_date
|
||||
, t.employee_id
|
||||
, t.employee_type
|
||||
, t.file_status
|
||||
, t.id
|
||||
, t.identification_number
|
||||
, t.main_id
|
||||
, t.month_premium
|
||||
, t.tax_agent_id
|
||||
, t.tax_year_month
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
, t.year_premium
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_health_insurance t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_health_insurance t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap"
|
||||
parameterType="com.engine.salary.entity.datacollection.po.HealthInsurancePO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_health_insurance t
|
||||
WHERE delete_type = 0
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
AND current_deduction = #{currentDeduction}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="effectiveDate != null">
|
||||
AND effective_date = #{effectiveDate}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="identificationNumber != null">
|
||||
AND identification_number = #{identificationNumber}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
AND month_premium = #{monthPremium}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
AND year_premium = #{yearPremium}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.HealthInsurancePO">
|
||||
INSERT INTO hrsa_health_insurance
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
current_deduction,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="effectiveDate != null">
|
||||
effective_date,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="identificationNumber != null">
|
||||
identification_number,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
month_premium,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
year_premium,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
#{currentDeduction},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="effectiveDate != null">
|
||||
#{effectiveDate},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="identificationNumber != null">
|
||||
#{identificationNumber},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
#{monthPremium},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
#{yearPremium},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.datacollection.po.HealthInsurancePO">
|
||||
UPDATE hrsa_health_insurance
|
||||
<set>
|
||||
create_time=#{createTime},
|
||||
creator=#{creator},
|
||||
current_deduction=#{currentDeduction},
|
||||
delete_type=#{deleteType},
|
||||
effective_date=#{effectiveDate},
|
||||
employee_id=#{employeeId},
|
||||
employee_type=#{employeeType},
|
||||
file_status=#{fileStatus},
|
||||
identification_number=#{identificationNumber},
|
||||
main_id=#{mainId},
|
||||
month_premium=#{monthPremium},
|
||||
tax_agent_id=#{taxAgentId},
|
||||
tax_year_month=#{taxYearMonth},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
year_premium=#{yearPremium},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.datacollection.po.HealthInsurancePO">
|
||||
UPDATE hrsa_health_insurance
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="currentDeduction != null">
|
||||
current_deduction=#{currentDeduction},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="effectiveDate != null">
|
||||
effective_date=#{effectiveDate},
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="identificationNumber != null">
|
||||
identification_number=#{identificationNumber},
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="monthPremium != null">
|
||||
month_premium=#{monthPremium},
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="yearPremium != null">
|
||||
year_premium=#{yearPremium},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_health_insurance
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_health_insurance
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.po.OtherDerateDeductionPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface OtherDerateDeductionMapper {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<OtherDerateDeductionPO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<OtherDerateDeductionPO> listSome(OtherDerateDeductionPO otherDerateDeduction);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
OtherDerateDeductionPO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param otherDerateDeduction 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(OtherDerateDeductionPO otherDerateDeduction);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*
|
||||
* @param otherDerateDeduction
|
||||
*/
|
||||
void batchInsert(@Param("collection") List<OtherDerateDeductionPO> otherDerateDeduction);
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param otherDerateDeduction 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(OtherDerateDeductionPO otherDerateDeduction);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param otherDerateDeduction 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(OtherDerateDeductionPO otherDerateDeduction);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param otherDerateDeduction 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(OtherDerateDeductionPO otherDerateDeduction);
|
||||
|
||||
/**
|
||||
* 批量删除记录
|
||||
* @param ids 主键id集合
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,417 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.OtherDerateDeductionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.OtherDerateDeduction">
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="delete_type" property="deleteType" />
|
||||
<result column="employee_id" property="employeeId" />
|
||||
<result column="employee_type" property="employeeType" />
|
||||
<result column="file_status" property="fileStatus" />
|
||||
<result column="id" property="id" />
|
||||
<result column="main_id" property="mainId" />
|
||||
<result column="other_deduction" property="otherDeduction" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="tax_agent_id" property="taxAgentId" />
|
||||
<result column="tax_year_month" property="taxYearMonth" />
|
||||
<result column="tenant_key" property="tenantKey" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t.create_time
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.employee_id
|
||||
, t.employee_type
|
||||
, t.file_status
|
||||
, t.id
|
||||
, t.main_id
|
||||
, t.other_deduction
|
||||
, t.remark
|
||||
, t.tax_agent_id
|
||||
, t.tax_year_month
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
SELECT
|
||||
<include refid="baseColumns" />
|
||||
FROM hrsa_other_derate_deduction t
|
||||
WHERE delete_type = 0
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
AND employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
AND employee_type = #{employeeType}
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
AND file_status = #{fileStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
AND main_id = #{mainId}
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
AND other_deduction = #{otherDeduction}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
AND remark = #{remark}
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
AND tax_year_month = #{taxYearMonth}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
INSERT INTO hrsa_other_derate_deduction
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="employeeId != null">
|
||||
employee_id,
|
||||
</if>
|
||||
<if test="employeeType != null">
|
||||
employee_type,
|
||||
</if>
|
||||
<if test="fileStatus != null">
|
||||
file_status,
|
||||
</if>
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="mainId != null">
|
||||
main_id,
|
||||
</if>
|
||||
<if test="otherDeduction != null">
|
||||
other_deduction,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
tax_agent_id,
|
||||
</if>
|
||||
<if test="taxYearMonth != null">
|
||||
tax_year_month,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null" >
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null" >
|
||||
#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null" >
|
||||
#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null" >
|
||||
#{fileStatus},
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
#{id},
|
||||
</if>
|
||||
<if test="mainId != null" >
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="otherDeduction != null" >
|
||||
#{otherDeduction},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="taxAgentId != null" >
|
||||
#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null" >
|
||||
#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
|
||||
INSERT INTO hrsa_other_derate_deduction
|
||||
(
|
||||
create_time,
|
||||
creator,
|
||||
delete_type,
|
||||
employee_id,
|
||||
employee_type,
|
||||
file_status,
|
||||
id,
|
||||
main_id,
|
||||
other_deduction,
|
||||
remark,
|
||||
tax_agent_id,
|
||||
tax_year_month,
|
||||
tenant_key,
|
||||
update_time,
|
||||
)
|
||||
VALUES
|
||||
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.createTime},
|
||||
#{item.creator},
|
||||
#{item.deleteType},
|
||||
#{item.employeeId},
|
||||
#{item.employeeType},
|
||||
#{item.fileStatus},
|
||||
#{item.id},
|
||||
#{item.mainId},
|
||||
#{item.otherDeduction},
|
||||
#{item.remark},
|
||||
#{item.taxAgentId},
|
||||
#{item.taxYearMonth},
|
||||
#{item.tenantKey},
|
||||
#{item.updateTime},
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
INSERT INTO hrsa_other_derate_deduction (
|
||||
create_time,
|
||||
creator,
|
||||
delete_type,
|
||||
employee_id,
|
||||
employee_type,
|
||||
file_status,
|
||||
id,
|
||||
main_id,
|
||||
other_deduction,
|
||||
remark,
|
||||
tax_agent_id,
|
||||
tax_year_month,
|
||||
tenant_key,
|
||||
update_time,
|
||||
)
|
||||
|
||||
<foreach collection="collection" item="item" separator="union all">
|
||||
select
|
||||
#{item.createTime,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.creator,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.deleteType,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.employeeId,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.employeeType,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.fileStatus,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.id,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.mainId,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.otherDeduction,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.remark,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.taxAgentId,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.taxYearMonth,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.tenantKey,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
#{item.updateTime,jdbcType=DOUBLE、DATE、VARCHAR、INTEGER},
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_other_derate_deduction (
|
||||
create_time,
|
||||
creator,
|
||||
delete_type,
|
||||
employee_id,
|
||||
employee_type,
|
||||
file_status,
|
||||
id,
|
||||
main_id,
|
||||
other_deduction,
|
||||
remark,
|
||||
tax_agent_id,
|
||||
tax_year_month,
|
||||
tenant_key,
|
||||
update_time,
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{item.createTime},
|
||||
#{item.creator},
|
||||
#{item.deleteType},
|
||||
#{item.employeeId},
|
||||
#{item.employeeType},
|
||||
#{item.fileStatus},
|
||||
#{item.id},
|
||||
#{item.mainId},
|
||||
#{item.otherDeduction},
|
||||
#{item.remark},
|
||||
#{item.taxAgentId},
|
||||
#{item.taxYearMonth},
|
||||
#{item.tenantKey},
|
||||
#{item.updateTime},
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
<set>
|
||||
create_time=#{createTime},
|
||||
creator=#{creator},
|
||||
delete_type=#{deleteType},
|
||||
employee_id=#{employeeId},
|
||||
employee_type=#{employeeType},
|
||||
file_status=#{fileStatus},
|
||||
main_id=#{mainId},
|
||||
other_deduction=#{otherDeduction},
|
||||
remark=#{remark},
|
||||
tax_agent_id=#{taxAgentId},
|
||||
tax_year_month=#{taxYearMonth},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.OtherDerateDeduction">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
<set>
|
||||
<if test="createTime != null" >
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="creator != null" >
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null" >
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="employeeId != null" >
|
||||
employee_id=#{employeeId},
|
||||
</if>
|
||||
<if test="employeeType != null" >
|
||||
employee_type=#{employeeType},
|
||||
</if>
|
||||
<if test="fileStatus != null" >
|
||||
file_status=#{fileStatus},
|
||||
</if>
|
||||
<if test="mainId != null" >
|
||||
main_id=#{mainId},
|
||||
</if>
|
||||
<if test="otherDeduction != null" >
|
||||
other_deduction=#{otherDeduction},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark=#{remark},
|
||||
</if>
|
||||
<if test="taxAgentId != null" >
|
||||
tax_agent_id=#{taxAgentId},
|
||||
</if>
|
||||
<if test="taxYearMonth != null" >
|
||||
tax_year_month=#{taxYearMonth},
|
||||
</if>
|
||||
<if test="tenantKey != null" >
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="updateTime != null" >
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
SET delete_type=1
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_other_derate_deduction
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue