劳务申报表列表
This commit is contained in:
parent
1d676365c7
commit
ab87e5cf08
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +0,0 @@
|
|||
ALTER TABLE hrsa_add_up_situation ADD (
|
||||
add_up_illness_medical varchar2(255) NULL ,
|
||||
add_up_tax_savings varchar2(255) NULL ,
|
||||
add_up_infant_care varchar2(255) NULL
|
||||
)
|
||||
/
|
||||
ALTER TABLE hrsa_add_up_deduction add (
|
||||
add_up_illness_medical varchar2(255) NULL,
|
||||
add_up_infant_care varchar2(255) NULL
|
||||
)
|
||||
/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,21 +0,0 @@
|
|||
DROP TABLE hrsa_tax_agent_manage_range
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_manage_range
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) DEFAULT 0,
|
||||
tax_agent_sub_admin_id NUMBER(38,0) DEFAULT 0,
|
||||
target_type number DEFAULT 1,
|
||||
target_id NUMBER(38,0) NOT NULL,
|
||||
employee_status varchar2(100) NOT NULL,
|
||||
include_type number DEFAULT 1,
|
||||
creator NUMBER(38,0) DEFAULT '0',
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT '',
|
||||
range_type number DEFAULT 0
|
||||
)
|
||||
/
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
DROP TABLE IF EXISTS hrsa_tax_agent_emp;
|
||||
CREATE TABLE hrsa_tax_agent_emp
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT 'ID',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
creator bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
|
||||
delete_type int(11) NULL DEFAULT 0,
|
||||
tenant_key varchar(10) NULL DEFAULT NULL COMMENT '租户KEY',
|
||||
tax_agent_id bigint(20) NULL DEFAULT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NULL DEFAULT NULL COMMENT '人员信息表的主键id',
|
||||
employee_name varchar(255) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent(tax_agent_id) USING BTREE
|
||||
) ;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_emp_change;
|
||||
CREATE TABLE hrsa_tax_agent_emp_change
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT 'ID',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
creator bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
|
||||
delete_type int(11) NULL DEFAULT 0 COMMENT '是否删除',
|
||||
tenant_key varchar(10) NULL DEFAULT NULL COMMENT '租户KEY',
|
||||
tax_agent_id bigint(20) NOT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NOT NULL COMMENT '人员信息表的主键id',
|
||||
change_type int(11) NOT NULL DEFAULT 0 COMMENT '增量类型。1:新增、2:删除',
|
||||
employee_name varchar(255) NULL DEFAULT NULL,
|
||||
module_type int(4) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent(tax_agent_id) USING BTREE
|
||||
) ;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_admin;
|
||||
CREATE TABLE hrsa_tax_agent_admin
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键',
|
||||
tax_agent_id bigint(20) NOT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NOT NULL COMMENT '人员信息表的主键id',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_employee_id(employee_id) USING BTREE
|
||||
) ;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_manage_range;
|
||||
CREATE TABLE hrsa_tax_agent_manage_range
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键id',
|
||||
tax_agent_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的id',
|
||||
employee_id bigint(20) NOT NULL DEFAULT 0 COMMENT '人员表的主键id',
|
||||
tax_agent_sub_admin_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的分管理员的id',
|
||||
target_type tinyint(4) NOT NULL DEFAULT 1 COMMENT '对象类型。1:人员、2:部门、3:岗位',
|
||||
target_id bigint(20) NOT NULL DEFAULT 0 COMMENT '对象id',
|
||||
employee_status varchar(100) NOT NULL,
|
||||
include_type int(4) NOT NULL DEFAULT 1,
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
range_type int(4) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent_sub_admin_id(tax_agent_sub_admin_id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE
|
||||
) ;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_base;
|
||||
CREATE TABLE hrsa_tax_agent_base
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键',
|
||||
devolution_status int(11) NOT NULL DEFAULT 0 COMMENT '分权开启状态。0:关、1:开',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE
|
||||
) ;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_sub_admin;
|
||||
CREATE TABLE hrsa_tax_agent_sub_admin
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键',
|
||||
tax_agent_id bigint(20) NOT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NOT NULL COMMENT '人员信息表的主键id',
|
||||
description varchar(100) NULL DEFAULT NULL COMMENT '描述',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
remark text NULL,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent_id(tax_agent_id) USING BTREE,
|
||||
INDEX idx_employee_id(employee_id) USING BTREE
|
||||
) ;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_sub_admin_emp;
|
||||
CREATE TABLE hrsa_tax_agent_sub_admin_emp
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT 'ID',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
creator bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
|
||||
delete_type int(11) NULL DEFAULT 0 COMMENT '是否删除',
|
||||
tenant_key varchar(10) NULL DEFAULT NULL COMMENT '租户KEY',
|
||||
tax_agent_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的主键id',
|
||||
tax_agent_sub_admin_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的分管理员的id',
|
||||
employee_id bigint(20) NOT NULL DEFAULT 0 COMMENT '人员信息表的主键id',
|
||||
employee_name varchar(255) NULL DEFAULT NULL COMMENT '人员姓名',
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent(tax_agent_id) USING BTREE
|
||||
) ;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE hrsa_tax_agent ADD COLUMN payment_agency varchar(255) NULL COMMENT '代缴机构' ;
|
||||
|
||||
|
||||
ALTER TABLE hrsa_salary_sob ADD COLUMN tax_agent_id bigint(0) NULL COMMENT '个税扣缴义务人的主键id' ;
|
||||
|
||||
|
||||
INSERT INTO hrsa_tax_agent_base(id, devolution_status, create_time, update_time, creator, delete_type, tenant_key) VALUES (1653303537239, 1, '2022-05-23 18:58:53', '2022-05-23 19:12:12', 1, 0, 'all_teams');
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN payment_organization bigint(0) NULL COMMENT '个税扣缴义务人id' ;
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN payment_organization bigint(0) NULL COMMENT '个税扣缴义务人id' ;
|
||||
|
||||
ALTER TABLE hrsa_bill_batch ADD COLUMN payment_organization bigint(0) NULL COMMENT '个税扣缴义务人id' ;
|
||||
|
|
@ -1,134 +0,0 @@
|
|||
CREATE TABLE hrsa_tax_agent_emp
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
creator NUMBER(38,0) DEFAULT 0,
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT '',
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) NOT NULL,
|
||||
employee_name varchar2(255)
|
||||
)
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_emp_change
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
creator NUMBER(38,0) DEFAULT 0,
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT '',
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) NOT NULL,
|
||||
change_type number DEFAULT 0 ,
|
||||
employee_name varchar2(255) DEFAULT NULL,
|
||||
module_type NUMBER(4,0) DEFAULT 0
|
||||
)
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_admin
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) NOT NULL,
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
creator NUMBER(38,0) DEFAULT 0,
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT ''
|
||||
)
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_manage_range
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) DEFAULT 0,
|
||||
tax_agent_sub_admin_id NUMBER(38,0) DEFAULT 0,
|
||||
target_type number DEFAULT 1,
|
||||
target_id NUMBER(38,0) NOT NULL,
|
||||
employee_status varchar2(100) NOT NULL,
|
||||
include_type number DEFAULT 1,
|
||||
creator NUMBER(38,0) DEFAULT '0',
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT '',
|
||||
range_type number DEFAULT 0
|
||||
)
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_base
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
devolution_status NUMBER(11,0) DEFAULT 0 ,
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
creator NUMBER(38,0) DEFAULT '0',
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT ''
|
||||
)
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_sub_admin
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) NOT NULL,
|
||||
description varchar2(100) ,
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
creator NUMBER(38,0) DEFAULT '0',
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT '',
|
||||
remark clob
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
CREATE TABLE hrsa_tax_agent_sub_admin_emp
|
||||
(
|
||||
id NUMBER(38,0) primary key NOT NULL,
|
||||
create_time date DEFAULT sysdate,
|
||||
update_time date DEFAULT sysdate,
|
||||
creator NUMBER(38,0) DEFAULT '0',
|
||||
delete_type number DEFAULT 0 ,
|
||||
tenant_key varchar2(10) DEFAULT '',
|
||||
tax_agent_id NUMBER(38,0) NOT NULL,
|
||||
tax_agent_sub_admin_id NUMBER(38,0) NOT NULL,
|
||||
employee_id NUMBER(38,0) NOT NULL,
|
||||
employee_name varchar2(255)
|
||||
)
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_tax_agent add (
|
||||
payment_agency varchar2(255)
|
||||
)
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_salary_sob add (
|
||||
tax_agent_id NUMBER(38,0)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
|
||||
INSERT INTO hrsa_tax_agent_base(id, devolution_status, create_time, update_time, creator, delete_type, tenant_key) VALUES (1653303537239, 1, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 1, 0, 'all_teams')
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp add (
|
||||
payment_organization NUMBER(38,0)
|
||||
)
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail add (
|
||||
payment_organization NUMBER(38,0)
|
||||
)
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_batch add (
|
||||
payment_organization NUMBER(38,0)
|
||||
)
|
||||
/
|
||||
|
|
@ -1,333 +0,0 @@
|
|||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_emp]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_emp]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_emp] (
|
||||
[id] bigint NOT NULL,
|
||||
[create_time] datetime NULL,
|
||||
[update_time] datetime NULL,
|
||||
[creator] bigint NULL,
|
||||
[delete_type] int DEFAULT 0,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[tax_agent_id] bigint NULL,
|
||||
[employee_id] bigint NULL,
|
||||
[employee_name] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_emp] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_emp] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tax_agent]
|
||||
ON [hrsa_tax_agent_emp] (
|
||||
[tax_agent_id] ASC
|
||||
)
|
||||
GO
|
||||
ALTER TABLE [hrsa_tax_agent_emp] ADD CONSTRAINT [PK__hrsa_tax__3213E83F1A221DC1] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_base]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_base]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_base] (
|
||||
[id] bigint NOT NULL,
|
||||
[devolution_status] int DEFAULT 0,
|
||||
[create_time] datetime DEFAULT getdate(),
|
||||
[update_time] datetime DEFAULT getdate(),
|
||||
[creator] bigint DEFAULT 0,
|
||||
[delete_type] int DEFAULT 0,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_base] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_base] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_base] ADD CONSTRAINT [PK__hrsa_tax__3213E83FE121B302] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_manage_range]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_manage_range]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_manage_range] (
|
||||
[id] bigint NOT NULL,
|
||||
[tax_agent_id] bigint DEFAULT 0,
|
||||
[employee_id] bigint DEFAULT 0,
|
||||
[tax_agent_sub_admin_id] bigint DEFAULT 0,
|
||||
[target_type] tinyint DEFAULT 1,
|
||||
[target_id] bigint DEFAULT 0,
|
||||
[employee_status] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[include_type] int DEFAULT 1,
|
||||
[creator] bigint DEFAULT 0,
|
||||
[create_time] datetime DEFAULT getdate(),
|
||||
[update_time] datetime DEFAULT getdate(),
|
||||
[delete_type] int DEFAULT 0,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[range_type] int DEFAULT 0
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_manage_range] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tax_agent_sub_admin_id]
|
||||
ON [hrsa_tax_agent_manage_range] (
|
||||
[tax_agent_sub_admin_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_manage_range] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_manage_range] ADD CONSTRAINT [PK__hrsa_tax__3213E83F877A395F] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_emp_change]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_emp_change]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_emp_change] (
|
||||
[id] bigint NOT NULL,
|
||||
[create_time] datetime NULL,
|
||||
[update_time] datetime NULL,
|
||||
[creator] bigint NULL,
|
||||
[delete_type] int DEFAULT 0,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[tax_agent_id] bigint NULL,
|
||||
[employee_id] bigint NULL,
|
||||
[change_type] int DEFAULT 0,
|
||||
[employee_name] varchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[module_type] int DEFAULT 0
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_emp_change] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_emp_change] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tax_agent]
|
||||
ON [hrsa_tax_agent_emp_change] (
|
||||
[tax_agent_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_emp_change] ADD CONSTRAINT [PK__hrsa_tax__3213E83F2DC37AA6] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_sub_admin_emp]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_sub_admin_emp]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_sub_admin_emp] (
|
||||
[id] bigint NOT NULL,
|
||||
[create_time] datetime NULL,
|
||||
[update_time] datetime NULL,
|
||||
[creator] bigint NULL,
|
||||
[delete_type] int DEFAULT 0,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[tax_agent_id] bigint DEFAULT 0,
|
||||
[tax_agent_sub_admin_id] bigint DEFAULT 0,
|
||||
[employee_id] bigint DEFAULT 0,
|
||||
[employee_name] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_sub_admin_emp] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_sub_admin_emp] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tax_agent]
|
||||
ON [hrsa_tax_agent_sub_admin_emp] (
|
||||
[tax_agent_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_sub_admin_emp] ADD CONSTRAINT [PK__hrsa_tax__3213E83F2F2EE404] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_sub_admin]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_sub_admin]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_sub_admin] (
|
||||
[id] bigint NOT NULL,
|
||||
[tax_agent_id] bigint NULL,
|
||||
[employee_id] bigint NULL,
|
||||
[description] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[create_time] datetime NULL,
|
||||
[update_time] datetime NULL,
|
||||
[creator] bigint NULL,
|
||||
[delete_type] int NULL,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[remark] text COLLATE Chinese_PRC_CI_AS NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_sub_admin] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_sub_admin] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tax_agent_id]
|
||||
ON [hrsa_tax_agent_sub_admin] (
|
||||
[tax_agent_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_employee_id]
|
||||
ON [hrsa_tax_agent_sub_admin] (
|
||||
[employee_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_sub_admin] ADD CONSTRAINT [PK__hrsa_tax__3213E83F26DE578A] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_sub_admin]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_sub_admin]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_sub_admin] (
|
||||
[id] bigint NOT NULL,
|
||||
[tax_agent_id] bigint NULL,
|
||||
[employee_id] bigint NULL,
|
||||
[description] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[create_time] datetime NULL,
|
||||
[update_time] datetime NULL,
|
||||
[creator] bigint NULL,
|
||||
[delete_type] int NULL,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[remark] text COLLATE Chinese_PRC_CI_AS NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_sub_admin] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_sub_admin] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tax_agent_id]
|
||||
ON [hrsa_tax_agent_sub_admin] (
|
||||
[tax_agent_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_employee_id]
|
||||
ON [hrsa_tax_agent_sub_admin] (
|
||||
[employee_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_sub_admin] ADD CONSTRAINT [PK__hrsa_tax__3213E83F26DE578A] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[hrsa_tax_agent_admin]') AND type IN ('U'))
|
||||
DROP TABLE [hrsa_tax_agent_admin]
|
||||
GO
|
||||
|
||||
CREATE TABLE [hrsa_tax_agent_admin] (
|
||||
[id] bigint NOT NULL,
|
||||
[tax_agent_id] bigint NULL,
|
||||
[employee_id] bigint NULL,
|
||||
[create_time] datetime DEFAULT getdate(),
|
||||
[update_time] datetime DEFAULT getdate(),
|
||||
[creator] bigint DEFAULT 0,
|
||||
[delete_type] int DEFAULT 0,
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_admin] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_tenant_key]
|
||||
ON [hrsa_tax_agent_admin] (
|
||||
[tenant_key] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [idx_employee_id]
|
||||
ON [hrsa_tax_agent_admin] (
|
||||
[employee_id] ASC
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [hrsa_tax_agent_admin] ADD CONSTRAINT [PK__hrsa_tax__3213E83F01D6FDC9] PRIMARY KEY CLUSTERED ([id])
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE hrsa_tax_agent ADD payment_agency varchar(255) NULL
|
||||
GO
|
||||
|
||||
ALTER TABLE hrsa_salary_sob ADD tax_agent_id bigint NULL
|
||||
GO
|
||||
|
||||
INSERT INTO hrsa_tax_agent_base(id, devolution_status, create_time, update_time, creator, delete_type, tenant_key) VALUES (1653303537239, 0, '2022-05-23 18:58:53', '2022-05-23 19:12:12', 1, 0, 'all_teams');
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD payment_organization bigint NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_detail ADD payment_organization bigint NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_batch ADD payment_organization bigint NULL
|
||||
GO
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--过滤入职日期大于薪资周期的
|
||||
|
||||
|
||||
select e.companystartdate
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
WHERE e.status in (0,1,2,3) and (e.accounttype is null or e.accounttype = 0)
|
||||
and e.subcompanyid1 IN (1)
|
||||
ORDER BY e.companystartdate desc
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (700599184238075904, '社保个人合计', 'socialSecurityTotal', 1, 7, 1, 1, 0, 2, 2, 2, 7, 1659339100298, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:56', '2022-08-01 17:01:24', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (700599446244319233, '公积金个人合计', 'accumulationFundTotal', 1, 7, 1, 1, 0, 2, 2, 2, 7, 1659339063868, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:56', '2022-08-01 17:01:26', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (703458434280095745, '劳务收入', 'laborIncome', 1, 7, 4, 1, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-06-17 09:01:56', '2022-08-01 16:55:45', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (703458558739300353, '劳务免税收入', 'laborTaxFreeIncome', 1, 7, 4, 1, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-06-17 09:01:57', '2022-08-01 16:55:54', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (703459151591383041, '备注', 'description', 1, 7, 1, 1, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-06-17 09:01:57', '2022-06-17 09:01:57', 'string');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (703459464954929153, '所得项目', 'incomeItems', 1, 7, 1, 1, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-06-17 09:01:57', '2022-06-17 09:01:57', 'string');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (704467747234045953, '劳务税减除费用', 'laborSubtraction', 1, 7, 4, 1, 0, 2, 2, 2, 1, 1659340673739, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:57', '2022-08-01 17:03:47', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (704468391612751873, '劳务税应纳税所得额', 'laborTaxableIncome', 1, 7, 4, 1, 0, 2, 2, 2, 1, 1659340916981, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:58', '2022-08-01 17:03:51', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (704468443048992769, '劳务税税率', 'laborTaxRate', 1, 7, 4, 1, 0, 2, 2, 2, 1, 1659341397524, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:58', '2022-08-01 17:03:53', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (704468490269204481, '劳务税速算扣除数', 'laborQuickDeductionFactor', 1, 7, 4, 1, 0, 2, 2, 2, 1, 1659341564390, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:58', '2022-08-01 17:03:54', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (704468528928063488, '劳务税应纳税额', 'laborTaxPayable', 1, 7, 4, 1, 0, 2, 2, 2, 1, 1659341811881, '', 0, 1, 0, 0, 'all_teams', '2022-06-17 09:01:59', '2022-08-01 17:03:55', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (733975748932845568, '个税调差', 'taxAdjustment', 1, 7, 1, 1, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-06-17 09:01:59', '2022-06-17 09:01:59', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629570, '商业健康保险[劳务]', 'commercialHealthInsurance4', 1, 7, 4, 0, 0, 2, 2, 2, 8, 1659341909423, '', 0, 1, 0, 0, 'all_teams', '2022-07-21 14:00:00', '2022-08-01 17:00:38', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629571, '税延养老保险[劳务]', 'taxDeferredEndowmentInsurance4', 1, 7, 4, 0, 0, 2, 2, 2, 8, 1659341966905, '', 0, 1, 0, 0, 'all_teams', '2022-07-21 14:00:00', '2022-08-01 17:00:40', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629572, '其他[劳务]', 'other4', 1, 7, 4, 0, 0, 2, 2, 2, 8, 1659341993723, '', 0, 1, 0, 0, 'all_teams', '2022-07-21 14:00:00', '2022-08-01 17:00:41', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629573, '本月(次)准予扣除的捐赠额[劳务]', 'allowedDonation4', 1, 7, 4, 0, 0, 2, 2, 2, 8, 1659342041963, '', 0, 1, 0, 0, 'all_teams', '2022-07-21 14:00:00', '2022-08-01 17:00:42', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629574, '备注[劳务]', 'description4', 1, 7, 4, 1, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-07-21 14:00:00', '2022-08-01 16:56:25', 'string');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629575, '已发薪资合计', 'issuedTotal', 1, 7, 1, 0, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-07-28 17:26:52', '2022-08-01 16:59:28', 'number');
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (746777981115629576, '补发薪资合计', 'ressueTotal', 1, 7, 1, 0, 0, 2, 2, 1, 0, 0, '', 1, 1, 0, 0, 'all_teams', '2022-07-28 17:26:52', '2022-08-01 16:59:40', 'number');
|
||||
|
||||
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659339063868, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{社保福利.公积金个人合计}', 'welfare_fundPerSum', 92, 0, '2022-08-01 15:31:04', '2022-08-01 15:31:04');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659339100298, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{社保福利.社保个人合计}', 'welfare_socialPerSum', 92, 0, '2022-08-01 15:31:40', '2022-08-01 15:31:40');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659340673739, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', 'if({薪资项目.劳务收入}-{薪资项目.劳务免税收入}<=4000){800;}else{0.2*({薪资项目.劳务收入}-{薪资项目.劳务免税收入})}', 'if(salaryItem_laborIncome-salaryItem_laborTaxFreeIncome<=4000){800;}else{0.2*(salaryItem_laborIncome-salaryItem_laborTaxFreeIncome)}', 92, 0, '2022-08-01 15:57:54', '2022-08-01 15:57:54');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659340916981, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{薪资项目.劳务收入}-{薪资项目.劳务免税收入}-{薪资项目.劳务税减除费用}', 'salaryItem_laborIncome-salaryItem_laborTaxFreeIncome-salaryItem_laborSubtraction', 92, 0, '2022-08-01 16:01:57', '2022-08-01 16:01:57');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659341397524, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', 'if({薪资项目.劳务税应纳税所得额}<=20000){0.2;}else if({薪资项目.劳务税应纳税所得额}<=50000){0.3;}else{0.4;}', 'if(salaryItem_laborTaxableIncome<=20000){0.2;}else if(salaryItem_laborTaxableIncome<=50000){0.3;}else{0.4;}', 92, 0, '2022-08-01 16:09:57', '2022-08-01 16:09:57');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659341564390, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', 'if({薪资项目.劳务税应纳税所得额}<=20000){0;}else if({薪资项目.劳务税应纳税所得额}<=50000){2000;}else{7000;}', 'if(salaryItem_laborTaxableIncome<=20000){0;}else if(salaryItem_laborTaxableIncome<=50000){2000;}else{7000;}', 92, 0, '2022-08-01 16:12:44', '2022-08-01 16:12:44');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659341811881, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', 'if({薪资项目.劳务税应纳税所得额}<=0){0;}else{{薪资项目.劳务税应纳税所得额}*{薪资项目.劳务税税率}-{薪资项目.劳务税速算扣除数}}', 'if(salaryItem_laborTaxableIncome<=0){0;}else{salaryItem_laborTaxableIncome*salaryItem_laborTaxRate-salaryItem_laborQuickDeductionFactor}', 92, 0, '2022-08-01 16:16:52', '2022-08-01 16:16:52');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659341909423, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{其他免税扣除.商业健康保险}', 'otherDeduction_businessHealthyInsurance', 92, 0, '2022-08-01 16:18:29', '2022-08-01 16:18:29');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659341966905, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{其他免税扣除.税延养老保险}', 'otherDeduction_taxDelayEndowmentInsurance', 92, 0, '2022-08-01 16:19:27', '2022-08-01 16:19:27');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659341993723, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{其他免税扣除.其他}', 'otherDeduction_otherDeduction', 92, 0, '2022-08-01 16:19:54', '2022-08-01 16:19:54');
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1659342041963, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{其他免税扣除.准予扣除的捐赠额}', 'otherDeduction_deductionAllowedDonation', 92, 0, '2022-08-01 16:20:42', '2022-08-01 16:20:42');
|
||||
|
||||
|
||||
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659339063886, '公积金个人合计', 1659339063868, 'welfare_fundPerSum', '{社保福利.公积金个人合计}', 'number', 'welfare', 1, 92, 0, '2022-08-01 15:31:04', '2022-08-01 15:31:04');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659339100354, '社保个人合计', 1659339100298, 'welfare_socialPerSum', '{社保福利.社保个人合计}', 'number', 'welfare', 2, 92, 0, '2022-08-01 15:31:40', '2022-08-01 15:31:40');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659340673751, '劳务收入', 1659340673739, 'salaryItem_laborIncome', '{薪资项目.劳务收入}', 'number', 'salaryItem', 0, 92, 0, '2022-08-01 15:57:54', '2022-08-01 15:57:54');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659340673754, '劳务免税收入', 1659340673739, 'salaryItem_laborTaxFreeIncome', '{薪资项目.劳务免税收入}', 'number', 'salaryItem', 1, 92, 0, '2022-08-01 15:57:54', '2022-08-01 15:57:54');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659340917032, '劳务收入', 1659340916981, 'salaryItem_laborIncome', '{薪资项目.劳务收入}', 'number', 'salaryItem', 0, 92, 0, '2022-08-01 16:01:57', '2022-08-01 16:01:57');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659340917035, '劳务免税收入', 1659340916981, 'salaryItem_laborTaxFreeIncome', '{薪资项目.劳务免税收入}', 'number', 'salaryItem', 1, 92, 0, '2022-08-01 16:01:57', '2022-08-01 16:01:57');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659340917039, '劳务税减除费用', 1659340916981, 'salaryItem_laborSubtraction', '{薪资项目.劳务税减除费用}', 'number', 'salaryItem', 2, 92, 0, '2022-08-01 16:01:57', '2022-08-01 16:01:57');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341397539, '劳务税应纳税所得额', 1659341397524, 'salaryItem_laborTaxableIncome', '{薪资项目.劳务税应纳税所得额}', 'number', 'salaryItem', 0, 92, 0, '2022-08-01 16:09:57', '2022-08-01 16:09:57');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341564447, '劳务税应纳税所得额', 1659341564390, 'salaryItem_laborTaxableIncome', '{薪资项目.劳务税应纳税所得额}', 'number', 'salaryItem', 0, 92, 0, '2022-08-01 16:12:44', '2022-08-01 16:12:44');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341811897, '劳务税应纳税所得额', 1659341811881, 'salaryItem_laborTaxableIncome', '{薪资项目.劳务税应纳税所得额}', 'number', 'salaryItem', 0, 92, 0, '2022-08-01 16:16:52', '2022-08-01 16:16:52');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341811901, '劳务税税率', 1659341811881, 'salaryItem_laborTaxRate', '{薪资项目.劳务税税率}', 'number', 'salaryItem', 3, 92, 0, '2022-08-01 16:16:52', '2022-08-01 16:16:52');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341811904, '劳务税速算扣除数', 1659341811881, 'salaryItem_laborQuickDeductionFactor', '{薪资项目.劳务税速算扣除数}', 'number', 'salaryItem', 4, 92, 0, '2022-08-01 16:16:52', '2022-08-01 16:16:52');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341909473, '商业健康保险', 1659341909423, 'otherDeduction_businessHealthyInsurance', '{其他免税扣除.商业健康保险}', 'number', 'otherDeduction', 0, 92, 0, '2022-08-01 16:18:29', '2022-08-01 16:18:29');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341966920, '税延养老保险', 1659341966905, 'otherDeduction_taxDelayEndowmentInsurance', '{其他免税扣除.税延养老保险}', 'number', 'otherDeduction', 0, 92, 0, '2022-08-01 16:19:27', '2022-08-01 16:19:27');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659341993736, '其他', 1659341993723, 'otherDeduction_otherDeduction', '{其他免税扣除.其他}', 'number', 'otherDeduction', 0, 92, 0, '2022-08-01 16:19:54', '2022-08-01 16:19:54');
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1659342041967, '准予扣除的捐赠额', 1659342041963, 'otherDeduction_deductionAllowedDonation', '{其他免税扣除.准予扣除的捐赠额}', 'number', 'otherDeduction', 0, 92, 0, '2022-08-01 16:20:42', '2022-08-01 16:20:42');
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (705641858303836162, '累计婴幼儿照护', 'addUpInfantCare', 1, 7, 1, 1, 0, 2, 2, 2, 0, 1655196897860, '', 0, 1, 0, 0, 'all_teams', to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 'number')
|
||||
/
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (703419929857687552, '当前累计免税收入', 'addUpTaxFreeIncome', 1, 7, 1, 1, 0, 2, 2, 2, 0, 1655197296054, '', 0, 1, 0, 0, 'all_teams', to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 'number')
|
||||
/
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (705641858303836161, '累计大病医疗', 'addUpIllnessMedical', 1, 7, 1, 1, 0, 2, 2, 2, 0, 1655197430967, '', 0, 1, 0, 0, 'all_teams', to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 'number')
|
||||
/
|
||||
|
||||
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1655196897860, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{累计专项附加扣除.累计婴幼儿照护}', 'addUpDeductions_addUpInfantCare', 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1655197296054, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{薪资项目.本月(次)免税收入}+{往期累计情况.累计免税收入}', 'salaryItem_taxFreeIncome+addUpSituation_addUpTaxExemptIncome', 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1655197430967, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{累计专项附加扣除.累计大病医疗}', 'addUpDeductions_addUpIllnessMedical', 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
|
||||
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655196897869, '累计婴幼儿照护', 1655196897860, 'addUpDeductions_addUpInfantCare', '{累计专项附加扣除.累计婴幼儿照护}', 'number', 'addUpDeductions', 0, 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655197296059, '本月(次)免税收入', 1655197296054, 'salaryItem_taxFreeIncome', '{薪资项目.本月(次)免税收入}', 'number', 'salaryItem', 0, 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655197296063, '累计免税收入', 1655197296054, 'addUpSituation_addUpTaxExemptIncome', '{往期累计情况.累计免税收入}', 'number', 'addUpSituation', 1, 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655197430986, '累计大病医疗', 1655197430967, 'addUpDeductions_addUpIllnessMedical', '{累计专项附加扣除.累计大病医疗}', 'number', 'addUpDeductions', 0, 92, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'))
|
||||
/
|
||||
|
||||
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (728615865977528321, 1, 705641858303836162, 1, 0, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614103, 7)
|
||||
/
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845569, 1, 674853617092214787, 1, 1, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614083, 8)
|
||||
/
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845572, 1, 674853617092214788, 1, 1, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614083, 9)
|
||||
/
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845578, 1, 674853617092214789, 1, 1, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614083, 10)
|
||||
/
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845567, 1, 733975748932845568, 1, 1, 0, to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-10 16:03:02','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614083, 11)
|
||||
/
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (705641858303836162, '累计婴幼儿照护', 'addUpInfantCare', 1, 7, 1, 1, 0, 2, 2, 2, 0, 1655196897860, '', 0, 1, 0, 0, 'all_teams', '2022-05-31 17:36:04', '2022-05-31 17:36:04', 'number')
|
||||
GO
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (703419929857687552, '当前累计免税收入', 'addUpTaxFreeIncome', 1, 7, 1, 1, 0, 2, 2, 2, 0, 1655197296054, '', 0, 1, 0, 0, 'all_teams', '2022-03-11 13:50:17', '2022-03-17 16:13:27', 'number')
|
||||
GO
|
||||
INSERT INTO hrsa_sys_salary_item(id, name, code, system_type, category, item_type, use_default, use_in_employee_salary, rounding_mode, pattern, value_type, datasource, formula_id, description, can_edit, can_delete, creator, delete_type, tenant_key, create_time, update_time, data_type) VALUES (705641858303836161, '累计大病医疗', 'addUpIllnessMedical', 1, 7, 1, 1, 0, 2, 2, 2, 0, 1655197430967, '', 0, 1, 0, 0, 'all_teams', '2022-03-17 13:30:57', '2022-03-18 17:06:46', 'number')
|
||||
GO
|
||||
|
||||
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1655196897860, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{累计专项附加扣除.累计婴幼儿照护}', 'addUpDeductions_addUpInfantCare', 92, 0, '2022-06-14 16:54:58', '2022-06-14 16:54:58')
|
||||
GO
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1655197296054, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{薪资项目.本月(次)免税收入}+{往期累计情况.累计免税收入}', 'salaryItem_taxFreeIncome+addUpSituation_addUpTaxExemptIncome', 92, 0, '2022-06-14 17:01:36', '2022-06-14 17:01:36')
|
||||
GO
|
||||
INSERT INTO hrsa_formula(id, name, description, module, use_for, reference_type, return_type, validate_type, extend_param, formula, formulaRunScript, creator, delete_type, create_time, update_time) VALUES (1655197430967, '公式1', '备注', 'salary', 'salaryitem', 'formula', 'number', 'number', '{}', '{累计专项附加扣除.累计大病医疗}', 'addUpDeductions_addUpIllnessMedical', 92, 0, '2022-06-14 17:03:51', '2022-06-14 17:03:51')
|
||||
GO
|
||||
|
||||
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655196897869, '累计婴幼儿照护', 1655196897860, 'addUpDeductions_addUpInfantCare', '{累计专项附加扣除.累计婴幼儿照护}', 'number', 'addUpDeductions', 0, 92, 0, '2022-06-14 16:54:58', '2022-06-14 16:54:58')
|
||||
GO
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655197296059, '本月(次)免税收入', 1655197296054, 'salaryItem_taxFreeIncome', '{薪资项目.本月(次)免税收入}', 'number', 'salaryItem', 0, 92, 0, '2022-06-14 17:01:36', '2022-06-14 17:01:36')
|
||||
GO
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655197296063, '累计免税收入', 1655197296054, 'addUpSituation_addUpTaxExemptIncome', '{往期累计情况.累计免税收入}', 'number', 'addUpSituation', 1, 92, 0, '2022-06-14 17:01:36', '2022-06-14 17:01:36')
|
||||
GO
|
||||
INSERT INTO hrsa_formula_var(id, name, formula_id, field_id, field_name, field_type, source, order_index, creator, delete_type, create_time, update_time) VALUES (1655197430986, '累计大病医疗', 1655197430967, 'addUpDeductions_addUpIllnessMedical', '{累计专项附加扣除.累计大病医疗}', 'number', 'addUpDeductions', 0, 92, 0, '2022-06-14 17:03:51', '2022-06-14 17:03:51')
|
||||
GO
|
||||
|
||||
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (728615865977528321, 1, 705641858303836162, 1, 0, 0, '2022-05-31 17:36:04', '2022-05-31 17:36:04', 0, 'all_teams', 703433961629614103, 7)
|
||||
GO
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845569, 1, 674853617092214787, 1, 1, 0, '2022-06-14 14:52:53', '2022-06-14 14:52:53', 0, 'all_teams', 703433961629614083, 8)
|
||||
GO
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845572, 1, 674853617092214788, 1, 1, 0, '2022-06-14 14:52:53', '2022-06-14 14:52:53', 0, 'all_teams', 703433961629614083, 9)
|
||||
GO
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845578, 1, 674853617092214789, 1, 1, 0, '2022-06-14 14:52:53', '2022-06-14 14:52:53', 0, 'all_teams', 703433961629614083, 10)
|
||||
GO
|
||||
INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (733975748932845567, 1, 733975748932845568, 1, 1, 0, '2022-06-14 14:52:53', '2022-06-14 14:52:53', 0, 'all_teams', 703433961629614083, 11)
|
||||
GO
|
||||
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
ALTER TABLE hrsa_salary_archive
|
||||
ADD COLUMN tax_agent_id bigint(0) NULL COMMENT '个税扣缴义务人id',
|
||||
ADD COLUMN pay_start_date datetime(0) NULL DEFAULT NULL COMMENT '起始发薪日期' ,
|
||||
ADD COLUMN pay_end_date datetime(0) NULL DEFAULT NULL COMMENT '最后发薪日期' ;
|
||||
|
||||
|
||||
ALTER TABLE hrsa_salary_archive
|
||||
ADD tax_agent_id bigint NULL ,
|
||||
pay_start_date datetime NULL ,
|
||||
pay_end_date datetime NULL
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER TABLE hrsa_salary_archive ADD (
|
||||
tax_agent_id NUMBER(38,0) NULL ,
|
||||
pay_start_date date NULL ,
|
||||
pay_end_date date NULL
|
||||
)
|
||||
/
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
ALTER TABLE hrsa_add_up_situation
|
||||
ADD COLUMN add_up_illness_medical varchar(255) NULL COMMENT '累计大病医疗' AFTER tenant_key,
|
||||
ADD COLUMN add_up_tax_savings varchar(255) NULL COMMENT '累计减免税额' AFTER add_up_illness_medical,
|
||||
ADD COLUMN add_up_infant_care varchar(255) NULL COMMENT '累计婴幼儿照护' AFTER add_up_tax_savings;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE hrsa_add_up_situation
|
||||
ADD add_up_illness_medical varchar(255) NULL ,
|
||||
add_up_tax_savings varchar(255) NULL ,
|
||||
add_up_infant_care varchar(255) NULL
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER TABLE hrsa_add_up_deduction
|
||||
ADD COLUMN add_up_illness_medical varchar(255) NULL COMMENT '累计大病医疗' AFTER tenant_key,
|
||||
ADD COLUMN add_up_infant_care varchar(255) NULL COMMENT '累计婴幼儿照护' AFTER add_up_illness_medical;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE hrsa_add_up_deduction
|
||||
ADD add_up_illness_medical varchar(255) NULL,
|
||||
add_up_infant_care varchar(255) NULL
|
||||
GO
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
delete from hrsa_acct_result_temp where 1=1
|
||||
;
|
||||
delete from hrsa_excel_acct_result where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_emp where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_record where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_result where 1=1
|
||||
;
|
||||
delete from hrsa_salary_send where 1=1
|
||||
;
|
||||
delete from hrsa_salary_send_info where 1=1
|
||||
;
|
||||
delete from hrsa_tax_declaration where 1=1
|
||||
;
|
||||
delete from hrsa_tax_declaration_detail where 1=1
|
||||
;
|
||||
|
||||
|
|
@ -6,10 +6,13 @@ import com.engine.salary.entity.hrm.PositionInfo;
|
|||
import com.engine.salary.entity.hrm.SubCompanyInfo;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
import com.engine.salary.mapper.datacollection.EmployMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EmployBiz extends BaseBean {
|
||||
|
|
@ -30,6 +33,9 @@ public class EmployBiz extends BaseBean {
|
|||
}
|
||||
|
||||
public List<DataCollectionEmployee> getEmployeeByIds(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
|
|
@ -41,16 +47,28 @@ public class EmployBiz extends BaseBean {
|
|||
|
||||
|
||||
public List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
List<DataCollectionEmployee> employeeList = new ArrayList<>();
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.getEmployeeByIdsAll(list);
|
||||
List<List<Long>> partition = Lists.partition(list, 1000);
|
||||
partition.forEach(e->{
|
||||
List<DataCollectionEmployee> employeeByIdsAll = mapper.getEmployeeByIdsAll(e);
|
||||
employeeList.addAll(employeeByIdsAll);
|
||||
});
|
||||
return employeeList;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
public List<DataCollectionEmployee> getAdminEmployeeByIds(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
|
|
@ -63,10 +81,14 @@ public class EmployBiz extends BaseBean {
|
|||
|
||||
/**
|
||||
* 岗位信息
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public List<PositionInfo> listPositionInfo(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
|
|
@ -96,23 +118,27 @@ public class EmployBiz extends BaseBean {
|
|||
}
|
||||
}
|
||||
|
||||
public List<DeptInfo> getDeptInfoList(List<Long> departmentIds) {
|
||||
|
||||
public List<DeptInfo> getDeptInfoList(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.getDeptInfoList(departmentIds);
|
||||
return mapper.getDeptInfoList(list);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds) {
|
||||
public List<SubCompanyInfo> getSubCompanyInfoList(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.getSubCompanyInfoList(subDepartmentIds);
|
||||
return mapper.getSubCompanyInfoList(list);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.entity.taxdeclaration.bo;
|
|||
import com.engine.salary.constant.TaxDeclarationDataIndexConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationEmployeeDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationWageListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
|
||||
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
|
||||
|
|
@ -86,59 +87,49 @@ public class TaxDeclarationDetailBO {
|
|||
return taxDeclarationWageListDTOS;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 转换成个税申报表详情列表(劳务报酬所得)
|
||||
// *
|
||||
// * @param taxDeclarationDetailPOS
|
||||
// * @param simpleEmployees
|
||||
// * @return
|
||||
// */
|
||||
// public static List<TaxDeclarationLaborListDTO> convert2ListDTO4Labor(List<TaxDeclarationDetailPO> taxDeclarationDetailPOS,
|
||||
// List<TaxDeclarationEmployeeDTO> taxDeclarationEmployeeDTOS,
|
||||
// List<SimpleEmployee> simpleEmployees,
|
||||
// List<SimpleUserInfo> simpleUserInfos,
|
||||
// List<ExtEmployeePO> extEmployees) {
|
||||
// if (CollectionUtils.isEmpty(taxDeclarationDetailPOS)) {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
// List<TaxDeclarationLaborListDTO> taxDeclarationLaborListDTOS = Lists.newArrayListWithExpectedSize(taxDeclarationEmployeeDTOS.size());
|
||||
// Map<String, List<TaxDeclarationDetailPO>> employeeIdKeyTaxDeclarationDetailPOMap = SalaryEntityUtil.group2Map(taxDeclarationDetailPOS,
|
||||
// taxDeclarationDetailPO -> taxDeclarationDetailPO.getEmployeeType() + "_" + taxDeclarationDetailPO.getEmployeeId());
|
||||
// Map<Long, SimpleEmployee> simpleEmployeeMap = SalaryEntityUtil.convert2Map(simpleEmployees, SimpleEmployee::getEmployeeId);
|
||||
// Map<Long, SimpleUserInfo> simpleUserInfoMap = simpleUserInfos.stream()
|
||||
// .filter(simpleUserInfo -> Objects.nonNull(simpleUserInfo) && Objects.nonNull(simpleUserInfo.getUser()))
|
||||
// .collect(Collectors.toMap(simpleUserInfo -> simpleUserInfo.getUser().getId(), Function.identity(), (a, b) -> a));
|
||||
// Map<Long, ExtEmployeePO> extEmployeePOMap = SalaryEntityUtil.convert2Map(extEmployees, ExtEmployeePO::getId);
|
||||
// for (TaxDeclarationEmployeeDTO dto : taxDeclarationEmployeeDTOS) {
|
||||
// Map<String, String> fieldCodeKeyFieldValueMap = SalaryEntityUtil.convert2Map(employeeIdKeyTaxDeclarationDetailPOMap.get(dto.getEmployeeType() + "_" + dto.getEmployeeId()),
|
||||
// TaxDeclarationDetailPO::getFieldCode, TaxDeclarationDetailPO::getFieldValue);
|
||||
// TaxDeclarationLaborListDTO taxDeclarationLaborListDTO = new TaxDeclarationLaborListDTO()
|
||||
// .setId(dto.getEmployeeId())
|
||||
// .setEmployeeId(dto.getEmployeeId())
|
||||
// .setCardType(SalaryI18nUtil.getI18nLabel(105564, "居民身份证"))
|
||||
// .setIncomeItems(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.INCOME_ITEMS))
|
||||
// .setLaborIncome(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.LABOR_INCOME))
|
||||
// .setLaborTaxFreeIncome(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.LABOR_TAX_FREE_INCOME))
|
||||
// .setCommercialHealthInsurance(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.COMMERCIAL_HEALTH_INSURANCE))
|
||||
// .setTaxDeferredEndowmentInsurance(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.TAX_DEFERRED_ENDOWMENT_INSURANCE))
|
||||
// .setOther(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.OTHER))
|
||||
// .setAllowedDonation(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.ALLOWED_DONATION))
|
||||
// .setTaxDeduction(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.TAX_DEDUCTION))
|
||||
// .setDescription(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.DESCRIPTION));
|
||||
// if (Objects.equals(dto.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
|
||||
// SimpleEmployee simpleEmployee = simpleEmployeeMap.get(dto.getEmployeeId());
|
||||
// SimpleUserInfo simpleUserInfo = simpleUserInfoMap.get(dto.getEmployeeId());
|
||||
// taxDeclarationLaborListDTO.setJobNum(simpleEmployee.getJobNum())
|
||||
// .setUsername(simpleEmployee.getUsername())
|
||||
// .setCardNum(Optional.ofNullable(simpleUserInfo).map(SimpleUserInfo::getIdNo).orElse(StringUtils.EMPTY));
|
||||
// } else {
|
||||
// ExtEmployeePO extEmployeePO = extEmployeePOMap.get(dto.getEmployeeId());
|
||||
// taxDeclarationLaborListDTO.setJobNum(StringUtils.EMPTY)
|
||||
// .setUsername(extEmployeePO.getUsername())
|
||||
// .setCardNum(extEmployeePO.getCardNum());
|
||||
// }
|
||||
// taxDeclarationLaborListDTOS.add(taxDeclarationLaborListDTO);
|
||||
// }
|
||||
// return taxDeclarationLaborListDTOS;
|
||||
// }
|
||||
/**
|
||||
* 转换成个税申报表详情列表(劳务报酬所得)
|
||||
*
|
||||
* @param taxDeclarationDetailPOS
|
||||
* @param simpleEmployees
|
||||
* @return
|
||||
*/
|
||||
public static List<TaxDeclarationLaborListDTO> convert2ListDTO4Labor(List<TaxDeclarationDetailPO> taxDeclarationDetailPOS,
|
||||
List<TaxDeclarationEmployeeDTO> taxDeclarationEmployeeDTOS,
|
||||
List<DataCollectionEmployee> simpleEmployees) {
|
||||
if (CollectionUtils.isEmpty(taxDeclarationDetailPOS)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<TaxDeclarationLaborListDTO> taxDeclarationLaborListDTOS = Lists.newArrayListWithExpectedSize(taxDeclarationEmployeeDTOS.size());
|
||||
Map<String, List<TaxDeclarationDetailPO>> employeeIdKeyTaxDeclarationDetailPOMap = SalaryEntityUtil.group2Map(taxDeclarationDetailPOS,
|
||||
taxDeclarationDetailPO -> taxDeclarationDetailPO.getEmployeeType() + "_" + taxDeclarationDetailPO.getEmployeeId());
|
||||
Map<Long, DataCollectionEmployee> simpleEmployeeMap = SalaryEntityUtil.convert2Map(simpleEmployees, DataCollectionEmployee::getEmployeeId);
|
||||
for (TaxDeclarationEmployeeDTO dto : taxDeclarationEmployeeDTOS) {
|
||||
Map<String, String> fieldCodeKeyFieldValueMap = SalaryEntityUtil.convert2Map(employeeIdKeyTaxDeclarationDetailPOMap.get(dto.getEmployeeType() + "_" + dto.getEmployeeId()),
|
||||
TaxDeclarationDetailPO::getFieldCode, TaxDeclarationDetailPO::getFieldValue);
|
||||
TaxDeclarationLaborListDTO taxDeclarationLaborListDTO = new TaxDeclarationLaborListDTO()
|
||||
.setId(dto.getEmployeeId())
|
||||
.setEmployeeId(dto.getEmployeeId())
|
||||
.setCardType(SalaryI18nUtil.getI18nLabel(105564, "居民身份证"))
|
||||
.setIncomeItems(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.INCOME_ITEMS))
|
||||
.setLaborIncome(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.LABOR_INCOME))
|
||||
.setLaborTaxFreeIncome(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.LABOR_TAX_FREE_INCOME))
|
||||
.setCommercialHealthInsurance(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.COMMERCIAL_HEALTH_INSURANCE))
|
||||
.setTaxDeferredEndowmentInsurance(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.TAX_DEFERRED_ENDOWMENT_INSURANCE))
|
||||
.setOther(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.OTHER))
|
||||
.setAllowedDonation(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.ALLOWED_DONATION))
|
||||
.setTaxDeduction(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.TAX_DEDUCTION))
|
||||
.setDescription(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.DESCRIPTION));
|
||||
if (dto.getEmployeeType() == null || Objects.equals(dto.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
|
||||
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(dto.getEmployeeId());
|
||||
taxDeclarationLaborListDTO.setJobNum(simpleEmployee.getWorkcode())
|
||||
.setUsername(simpleEmployee.getUsername())
|
||||
.setCardNum(Optional.ofNullable(simpleEmployee).map(DataCollectionEmployee::getIdNo).orElse(StringUtils.EMPTY));
|
||||
} else {
|
||||
|
||||
}
|
||||
taxDeclarationLaborListDTOS.add(taxDeclarationLaborListDTO);
|
||||
}
|
||||
return taxDeclarationLaborListDTOS;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,61 +1,107 @@
|
|||
package com.engine.salary.entity.taxdeclaration.dto;
|
||||
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @description: 个税申报表详情列表(劳务报酬所得)
|
||||
* @author: xiajun
|
||||
* @modified By: xiajun
|
||||
* @date: 2022/3/11 10:05
|
||||
* @version:v1.0
|
||||
*/
|
||||
* 个税申报表详情列表(劳务报酬所得)
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class TaxDeclarationLaborListDTO {
|
||||
|
||||
//主键id")
|
||||
//主键id
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
//人员id")
|
||||
//人员id
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long employeeId;
|
||||
|
||||
//工号")
|
||||
@SalaryTableColumn(
|
||||
text = "工号", width = "10%", column = "jobNum"
|
||||
)
|
||||
@TableTitle(title ="工号",dataIndex = "jobNum",key = "jobNum")
|
||||
private String jobNum;
|
||||
|
||||
//姓名")
|
||||
@SalaryTableColumn(
|
||||
text = "姓名", width = "10%", column = "username"
|
||||
)
|
||||
@TableTitle(title ="姓名",dataIndex = "username",key = "username")
|
||||
private String username;
|
||||
|
||||
//证件类型")
|
||||
@SalaryTableColumn(
|
||||
text = "证件类型", width = "10%", column = "cardType"
|
||||
)
|
||||
@TableTitle(title ="证件类型",dataIndex = "cardType",key = "cardType")
|
||||
private String cardType;
|
||||
|
||||
//证件号码")
|
||||
@SalaryTableColumn(
|
||||
text = "证件号码", width = "10%", column = "cardNum"
|
||||
)
|
||||
@TableTitle(title ="证件号码",dataIndex = "cardNum",key = "cardNum")
|
||||
private String cardNum;
|
||||
|
||||
//"所得项目")
|
||||
@SalaryTableColumn(
|
||||
text = "所得项目", width = "10%", column = "incomeItems"
|
||||
)
|
||||
@TableTitle(title ="所得项目",dataIndex = "incomeItems",key = "incomeItems")
|
||||
private String incomeItems;
|
||||
|
||||
//"劳务收入")
|
||||
@SalaryTableColumn(
|
||||
text = "劳务收入", width = "10%", column = "laborIncome"
|
||||
)
|
||||
@TableTitle(title ="劳务收入",dataIndex = "laborIncome",key = "laborIncome")
|
||||
private String laborIncome;
|
||||
|
||||
//"劳务免税收入")
|
||||
@SalaryTableColumn(
|
||||
text = "劳务免税收入", width = "10%", column = "laborTaxFreeIncome"
|
||||
)
|
||||
@TableTitle(title ="劳务免税收入",dataIndex = "laborTaxFreeIncome",key = "laborTaxFreeIncome")
|
||||
private String laborTaxFreeIncome;
|
||||
|
||||
//"商业健康保险")
|
||||
@SalaryTableColumn(
|
||||
text = "商业健康保险", width = "10%", column = "commercialHealthInsurance"
|
||||
)
|
||||
@TableTitle(title ="商业健康保险",dataIndex = "commercialHealthInsurance",key = "commercialHealthInsurance")
|
||||
private String commercialHealthInsurance;
|
||||
|
||||
//"税延养老保险")
|
||||
@SalaryTableColumn(
|
||||
text = "税延养老保险", width = "10%", column = "taxDeferredEndowmentInsurance"
|
||||
)
|
||||
@TableTitle(title ="税延养老保险",dataIndex = "taxDeferredEndowmentInsurance",key = "taxDeferredEndowmentInsurance")
|
||||
private String taxDeferredEndowmentInsurance;
|
||||
|
||||
//"其他")
|
||||
@SalaryTableColumn(
|
||||
text = "其他", width = "10%", column = "other"
|
||||
)
|
||||
@TableTitle(title ="其他",dataIndex = "other",key = "other")
|
||||
private String other;
|
||||
|
||||
//"准允扣除的捐赠额")
|
||||
@SalaryTableColumn(
|
||||
text = "准予扣除的捐赠额", width = "10%", column = "allowedDonation"
|
||||
)
|
||||
@TableTitle(title ="准予扣除的捐赠额",dataIndex = "allowedDonation",key = "allowedDonation")
|
||||
private String allowedDonation;
|
||||
|
||||
//"减免税额")
|
||||
@SalaryTableColumn(
|
||||
text = "减免税额", width = "10%", column = "taxDeduction"
|
||||
)
|
||||
@TableTitle(title ="减免税额",dataIndex = "taxDeduction",key = "taxDeduction")
|
||||
private String taxDeduction;
|
||||
|
||||
//备注")
|
||||
@SalaryTableColumn(
|
||||
text = "备注", width = "10%", column = "description"
|
||||
)
|
||||
@TableTitle(title ="备注",dataIndex = "description",key = "description")
|
||||
private String description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,15 @@ public interface TaxDeclarationDetailService {
|
|||
*/
|
||||
PageInfo<TaxDeclarationLaborListDTO> listDtoPageByParam4Labor(TaxDeclarationDetailListQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 查询个税申报列表明细(劳务报酬所得)
|
||||
*
|
||||
* @param taxDeclarationId
|
||||
* @param taxDeclarationEmployees
|
||||
* @return
|
||||
*/
|
||||
List<TaxDeclarationLaborListDTO> listDto4Labor(Long taxDeclarationId, List<TaxDeclarationEmployeeDTO> taxDeclarationEmployees);
|
||||
|
||||
/**
|
||||
* 根据列表查询条件查询个税申报列表明细(正常工资薪金所得)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,4 +26,13 @@ public interface TaxDeclarationService {
|
|||
*/
|
||||
void deleteBySalaryMonth(SalaryAcctRecordPO salaryAcctRecordPO);
|
||||
|
||||
/**
|
||||
* 判断是否有权限可查看个税申报表
|
||||
*
|
||||
* @param taxDeclarationPO
|
||||
* @param employeeId
|
||||
* @return
|
||||
*/
|
||||
boolean checkByAuthority(TaxDeclarationPO taxDeclarationPO, Long employeeId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQue
|
|||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
|
|
@ -103,7 +104,45 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
|
|||
@Override
|
||||
public PageInfo<TaxDeclarationLaborListDTO> listDtoPageByParam4Labor(TaxDeclarationDetailListQueryParam queryParam) {
|
||||
|
||||
return null;
|
||||
// 查询个税申报主表
|
||||
TaxDeclarationPO taxDeclarationPO = getTaxDeclarationService(user).getById(queryParam.getTaxDeclarationId());
|
||||
// 判断是否有权限查看
|
||||
boolean canSee = getTaxDeclarationService(user).checkByAuthority(taxDeclarationPO, (long) user.getUID());
|
||||
if (!canSee) {
|
||||
throw new SalaryRunTimeException("对不起,您暂时没有权限查看");
|
||||
}
|
||||
// 查询个税申报表明细的人员
|
||||
PageInfo<TaxDeclarationEmployeeDTO> employeeIdPage = listPage4EmployeeIdByParam(queryParam);
|
||||
PageInfo<TaxDeclarationLaborListDTO> dtoPage = new PageInfo<>(TaxDeclarationLaborListDTO.class);
|
||||
dtoPage.setPageSize(employeeIdPage.getPageSize());
|
||||
dtoPage.setPageNum(employeeIdPage.getPageNum());
|
||||
dtoPage.setTotal(employeeIdPage.getTotal());
|
||||
List list = employeeIdPage.getList();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
// 转换成列表dto
|
||||
List<TaxDeclarationLaborListDTO> taxDeclarationLaborListDTOS = listDto4Labor(queryParam.getTaxDeclarationId(), list);
|
||||
dtoPage.setList(taxDeclarationLaborListDTOS);
|
||||
}
|
||||
return dtoPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaxDeclarationLaborListDTO> listDto4Labor(Long taxDeclarationId, List<TaxDeclarationEmployeeDTO> taxDeclarationEmployees) {
|
||||
long employeeId = (long) user.getUID();
|
||||
// 查询个税申报主表
|
||||
TaxDeclarationPO taxDeclarationPO = getTaxDeclarationService(user).getById(taxDeclarationId);
|
||||
// 判断是否有权限查看
|
||||
boolean canSee = getTaxDeclarationService(user).checkByAuthority(taxDeclarationPO, employeeId);
|
||||
if (!canSee) {
|
||||
throw new SalaryRunTimeException("对不起,您暂时没有权限查看");
|
||||
}
|
||||
// 查询个税申报表明细
|
||||
List<Long> employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
|
||||
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
|
||||
// 查询人员信息
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
|
||||
// 转换成列表dto
|
||||
return TaxDeclarationDetailBO.convert2ListDTO4Labor(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -166,7 +205,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
|
|||
} else {
|
||||
employeeIdPage = listPage4EmployeeIdByParam(queryParam);
|
||||
}
|
||||
PageInfo<TaxDeclarationWageListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),TaxDeclarationWageListDTO.class);
|
||||
PageInfo<TaxDeclarationWageListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxDeclarationWageListDTO.class);
|
||||
dtoPage.setTotal(employeeIdPage.getTotal());
|
||||
if (CollectionUtils.isNotEmpty(employeeIdPage.getList())) {
|
||||
List<TaxDeclarationEmployeeDTO> list = employeeIdPage.getList();
|
||||
|
|
|
|||
|
|
@ -256,4 +256,23 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
return getSalaryAcctRecordMapper().listSome(po);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkByAuthority(TaxDeclarationPO taxDeclarationPO, Long employeeId) {
|
||||
// 判断是否开启了分权
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
// 判断是否是总管理员
|
||||
Boolean isChief = getTaxAgentService(user).isChief(employeeId);
|
||||
if (openDevolution && !isChief) {
|
||||
// 查询负责管理的个税扣缴义务人
|
||||
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId);
|
||||
if (CollectionUtils.isEmpty(taxAgentPOS)) {
|
||||
return false;
|
||||
}
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId);
|
||||
return taxAgentIds.contains(taxDeclarationPO.getTaxAgentId());
|
||||
}
|
||||
// 查询个税申报表
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ package com.engine.salary.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationWageListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.service.TaxDeclarationDetailService;
|
||||
import com.engine.salary.service.TaxDeclarationService;
|
||||
import com.engine.salary.service.impl.TaxDeclarationDetailServiceImpl;
|
||||
|
|
@ -13,16 +14,17 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 个税申报表明细
|
||||
* @author: xiajun
|
||||
* @modified By: xiajun
|
||||
* @date: Created in 1/23/22 6:07 PM
|
||||
* @version:v1.0
|
||||
*/
|
||||
|
||||
|
||||
* 个税申报表明细
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Slf4j
|
||||
public class TaxDeclarationDetailWrapper extends Service {
|
||||
|
||||
|
|
@ -40,25 +42,21 @@ public class TaxDeclarationDetailWrapper extends Service {
|
|||
* @param queryParam 列表查询条件
|
||||
* @return
|
||||
*/
|
||||
|
||||
|
||||
public PageInfo listPage(TaxDeclarationDetailListQueryParam queryParam) {
|
||||
|
||||
TaxDeclarationPO taxDeclarationPO = getTaxDeclarationService(user).getById(queryParam.getTaxDeclarationId());
|
||||
|
||||
|
||||
// 正常工资薪金所得
|
||||
// if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.WAGES_AND_SALARIES.getValue())) {
|
||||
PageInfo<TaxDeclarationWageListDTO> dtoPage = getTaxDeclarationDetailService(user).listDtoPageByParam4Wage(queryParam);
|
||||
// weaTable = SalaryFormatUtil.<TaxDeclarationWageListDTO>getInstance().buildTable(TaxDeclarationWageListDTO.class, dtoPage);
|
||||
// }
|
||||
// // 劳务报酬所得
|
||||
// if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.REMUNERATION_FOR_LABOR.getValue())) {
|
||||
// Page<TaxDeclarationLaborListDTO> dtoPage = taxDeclarationDetailService.listDtoPageByParam4Labor(queryParam, employeeId, tenantKey);
|
||||
// weaTable = SalaryFormatUtil.<TaxDeclarationLaborListDTO>getInstance().buildTable(TaxDeclarationLaborListDTO.class, dtoPage);
|
||||
// }
|
||||
if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.WAGES_AND_SALARIES.getValue())) {
|
||||
return getTaxDeclarationDetailService(user).listDtoPageByParam4Wage(queryParam);
|
||||
}
|
||||
// 劳务报酬所得
|
||||
if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.REMUNERATION_FOR_LABOR.getValue())) {
|
||||
PageInfo<TaxDeclarationLaborListDTO> taxDeclarationLaborListDTOPageInfo = getTaxDeclarationDetailService(user).listDtoPageByParam4Labor(queryParam);
|
||||
return taxDeclarationLaborListDTOPageInfo;
|
||||
}
|
||||
|
||||
|
||||
return dtoPage;
|
||||
return new PageInfo();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue