Merge branch 'release/个税&业务线' into custom/联特

# Conflicts:
#	src/com/engine/salary/service/impl/PushServiceImpl.java
This commit is contained in:
钱涛 2025-04-14 15:50:15 +08:00
commit 709ec2f3ce
84 changed files with 3557 additions and 146 deletions

View File

@ -1,5 +1,5 @@
log=false
defaultCloseNonStandard149=true
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
version=3.0.0.2503.01
version=3.0.1.2503.01
openFormulaForcedEditing=false

View File

@ -0,0 +1,70 @@
CREATE TABLE hrsa_push_setting
(
id NUMBER(38,0) primary key NOT NULL,
name varchar2(200),
able number,
salary_sob_ids varchar2(2000),
mode_id number,
mode_name varchar2(200),
table_name varchar2(200),
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_setting_item
(
id NUMBER(38,0) NOT NULL,
setting_id NUMBER(38,0),
source varchar2(100),
item varchar2(200),
item_name varchar2(200),
field_name varchar2(200),
field_type number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record
(
id NUMBER(38,0) NOT NULL,
name varchar2(200),
setting_id NUMBER(38,0),
mode_id number,
table_name varchar2(100),
acct_record_id NUMBER(38,0),
type number,
status number,
start_time date,
end_time date,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record_detail
(
id NUMBER(38,0) NOT NULL,
record_id NUMBER(38,0),
acct_emp_id NUMBER(38,0),
formula CLOB,
execute_time date,
status number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/

View File

@ -0,0 +1,38 @@
create table hrsa_deduction_amount
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
employee_id number,
employee_type number,
employee_name varchar2(100),
job_num varchar2(100),
card_type number,
card_num varchar2(100),
nationality varchar2(200),
deduct_flag number,
successfully_declared number,
declare_status number,
declare_error_msg varchar2(1000)
);
/
create table hrsa_deduction_amount_record
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
request_id varchar2(100)
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000);
/
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER;
/
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0);
/

View File

@ -0,0 +1,70 @@
CREATE TABLE hrsa_push_setting
(
id NUMBER(38,0) primary key NOT NULL,
name varchar2(200),
able number,
salary_sob_ids varchar2(2000),
mode_id number,
mode_name varchar2(200),
table_name varchar2(200),
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_setting_item
(
id NUMBER(38,0) NOT NULL,
setting_id NUMBER(38,0),
source varchar2(100),
item varchar2(200),
item_name varchar2(200),
field_name varchar2(200),
field_type number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record
(
id NUMBER(38,0) NOT NULL,
name varchar2(200),
setting_id NUMBER(38,0),
mode_id number,
table_name varchar2(100),
acct_record_id NUMBER(38,0),
type number,
status number,
start_time date,
end_time date,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record_detail
(
id NUMBER(38,0) NOT NULL,
record_id NUMBER(38,0),
acct_emp_id NUMBER(38,0),
formula CLOB,
execute_time date,
status number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/

View File

@ -0,0 +1,38 @@
create table hrsa_deduction_amount
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
employee_id number,
employee_type number,
employee_name varchar2(100),
job_num varchar2(100),
card_type number,
card_num varchar2(100),
nationality varchar2(200),
deduct_flag number,
successfully_declared number,
declare_status number,
declare_error_msg varchar2(1000)
);
/
create table hrsa_deduction_amount_record
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
request_id varchar2(100)
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000);
/
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER;
/
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0);
/

View File

@ -0,0 +1,70 @@
CREATE TABLE hrsa_push_setting
(
id NUMBER(38,0) primary key NOT NULL,
name varchar2(200),
able number,
salary_sob_ids varchar2(2000),
mode_id number,
mode_name varchar2(200),
table_name varchar2(200),
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_setting_item
(
id NUMBER(38,0) NOT NULL,
setting_id NUMBER(38,0),
source varchar2(100),
item varchar2(200),
item_name varchar2(200),
field_name varchar2(200),
field_type number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record
(
id NUMBER(38,0) NOT NULL,
name varchar2(200),
setting_id NUMBER(38,0),
mode_id number,
table_name varchar2(100),
acct_record_id NUMBER(38,0),
type number,
status number,
start_time date,
end_time date,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record_detail
(
id NUMBER(38,0) NOT NULL,
record_id NUMBER(38,0),
acct_emp_id NUMBER(38,0),
formula CLOB,
execute_time date,
status number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/

View File

@ -0,0 +1,38 @@
create table hrsa_deduction_amount
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
employee_id number,
employee_type number,
employee_name varchar2(100),
job_num varchar2(100),
card_type number,
card_num varchar2(100),
nationality varchar2(200),
deduct_flag number,
successfully_declared number,
declare_status number,
declare_error_msg varchar2(1000)
);
/
create table hrsa_deduction_amount_record
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
request_id varchar2(100)
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000);
/
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER;
/
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0);
/

View File

@ -33,3 +33,39 @@ CREATE TABLE hrsa_push_setting_item
PRIMARY KEY (id) USING BTREE
);
CREATE TABLE hrsa_push_record
(
id bigint(0) NOT NULL,
name varchar(200),
setting_id bigint(0),
mode_id int(0),
table_name varchar(100),
acct_record_id bigint(0),
type int(0),
status int(0),
start_time datetime(0),
end_time datetime(0),
creator bigint(0),
create_time datetime(0),
update_time datetime(0),
delete_type int(0),
tenant_key varchar(10),
PRIMARY KEY (id) USING BTREE
);
CREATE TABLE hrsa_push_record_detail
(
id bigint(0) NOT NULL,
record_id bigint(0),
acct_emp_id bigint(0),
formula text,
execute_time datetime(0),
status int(0),
creator bigint(0),
create_time datetime(0),
update_time datetime(0),
delete_type int(0),
tenant_key varchar(10),
PRIMARY KEY (id) USING BTREE
);

View File

@ -0,0 +1,37 @@
CREATE TABLE hrsa_deduction_amount
(
id bigint(0),
create_time datetime(0),
update_time datetime(0),
creator bigint(0),
delete_type int(0),
tenant_key varchar(10),
tax_agent_id bigint(0),
year varchar(100),
employee_id bigint(0),
employee_type tinyint(0),
employee_name varchar(100),
job_num varchar(100),
card_type tinyint(0),
card_num varchar(100),
nationality varchar(200),
deduct_flag tinyint(0),
successfully_declared tinyint(0),
declare_status tinyint(0),
declare_error_msg varchar(3000),
PRIMARY KEY (id) USING BTREE
);
CREATE TABLE hrsa_deduction_amount_record
(
id bigint(0),
create_time datetime(0),
update_time datetime(0),
creator bigint(0),
delete_type int(0),
tenant_key varchar(10),
tax_agent_id bigint(0),
year varchar(255),
request_id varchar(100),
PRIMARY KEY (id) USING BTREE
);

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_push_record ADD COLUMN fail_reason varchar(4000);
ALTER TABLE hrsa_push_record_detail ADD COLUMN fail_reason varchar(4000) ;

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_push_setting_item ADD COLUMN sorted_index int(0);
ALTER TABLE hrsa_push_record_detail ADD COLUMN data_id bigint(0);

View File

@ -0,0 +1,71 @@
CREATE TABLE hrsa_push_setting
(
id NUMBER(38,0) primary key NOT NULL,
name varchar2(200),
able number,
salary_sob_ids varchar2(2000),
mode_id number,
mode_name varchar2(200),
table_name varchar2(200),
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
)
/
CREATE TABLE hrsa_push_setting_item
(
id NUMBER(38,0) NOT NULL,
setting_id NUMBER(38,0),
source varchar2(100),
item varchar2(200),
item_name varchar2(200),
field_name varchar2(200),
field_type number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
)
/
CREATE TABLE hrsa_push_record
(
id NUMBER(38,0) NOT NULL,
name varchar2(200),
setting_id NUMBER(38,0),
mode_id number,
table_name varchar2(100),
acct_record_id NUMBER(38,0),
type number,
status number,
start_time date,
end_time date,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
)
/
CREATE TABLE hrsa_push_record_detail
(
id NUMBER(38,0) NOT NULL,
record_id NUMBER(38,0),
acct_emp_id NUMBER(38,0),
formula CLOB,
execute_time date,
status number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
)
/

View File

@ -0,0 +1,37 @@
create table hrsa_deduction_amount
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
employee_id number,
employee_type number,
employee_name varchar2(100),
job_num varchar2(100),
card_type number,
card_num varchar2(100),
nationality varchar2(200),
deduct_flag number,
successfully_declared number,
declare_status number,
declare_error_msg varchar2(1000)
)
/
create table hrsa_deduction_amount_record
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
request_id varchar2(100)
)
/

View File

@ -0,0 +1,5 @@
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000);
/
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000);
/

View File

@ -0,0 +1,5 @@
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER;
/
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0);
/

View File

@ -0,0 +1,71 @@
CREATE TABLE hrsa_push_setting
(
id bigint NOT NULL,
name varchar(200),
able int,
salary_sob_ids varchar(2000),
mode_id int,
mode_name varchar(200),
table_name varchar(200),
creator bigint,
create_time timestamp,
update_time timestamp,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
);
CREATE TABLE hrsa_push_setting_item
(
id bigint NOT NULL,
setting_id bigint,
source varchar(100),
item varchar(200),
item_name varchar(200),
field_name varchar(200),
field_type int,
creator bigint,
create_time timestamp,
update_time timestamp,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
);
CREATE TABLE hrsa_push_record
(
id bigint NOT NULL,
name varchar(200),
setting_id bigint,
mode_id int,
table_name varchar(100),
acct_record_id bigint,
type int,
status int,
start_time timestamp,
end_time timestamp,
creator bigint,
create_time timestamp,
update_time timestamp,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
);
CREATE TABLE hrsa_push_record_detail
(
id bigint NOT NULL,
record_id bigint,
acct_emp_id bigint,
formula text,
execute_time timestamp,
status int,
creator bigint,
create_time timestamp,
update_time timestamp,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
);

View File

@ -0,0 +1,37 @@
create table hrsa_deduction_amount
(
id bigint primary key ,
create_time timestamp,
update_time timestamp,
creator bigint,
delete_type int,
tenant_key varchar(10),
tax_agent_id bigint,
year varchar(100),
employee_id bigint,
employee_type smallint,
employee_name varchar(100),
job_num varchar(100),
card_type smallint,
card_num varchar(100),
nationality varchar(200),
deduct_flag smallint,
successfully_declared smallint,
declare_status smallint,
declare_error_msg varchar(3000)
);
/
create table hrsa_deduction_amount_record
(
id bigint primary key ,
create_time timestamp,
update_time timestamp,
creator bigint,
delete_type int default 0,
tenant_key varchar(10),
tax_agent_id bigint,
year varchar(100),
request_id varchar(100)
);
/

View File

@ -0,0 +1,3 @@
alter table hrsa_push_record add fail_reason VARCHAR(4000) ;
alter table hrsa_push_record_detail add fail_reason VARCHAR(4000) ;

View File

@ -0,0 +1,3 @@
alter table hrsa_push_setting_item add sorted_index int ;
alter table hrsa_push_record_detail add data_id bigint ;

View File

@ -0,0 +1,75 @@
CREATE TABLE hrsa_push_setting
(
id bigint NOT NULL,
name varchar(200),
able int,
salary_sob_ids varchar(2000),
mode_id int,
mode_name varchar(200),
table_name varchar(200),
creator bigint,
create_time datetime,
update_time datetime,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
)
GO
CREATE TABLE hrsa_push_setting_item
(
id bigint NOT NULL,
setting_id bigint,
source varchar(100),
item varchar(200),
item_name varchar(200),
field_name varchar(200),
field_type int,
creator bigint,
create_time datetime,
update_time datetime,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
)
GO
CREATE TABLE hrsa_push_record
(
id bigint NOT NULL,
name varchar(200),
setting_id bigint,
mode_id int,
table_name varchar(100),
acct_record_id bigint,
type int,
status int,
start_time datetime,
end_time datetime,
creator bigint,
create_time datetime,
update_time datetime,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
)
GO
CREATE TABLE hrsa_push_record_detail
(
id bigint NOT NULL,
record_id bigint,
acct_emp_id bigint,
formula text,
execute_time datetime,
status int,
creator bigint,
create_time datetime,
update_time datetime,
delete_type int,
tenant_key varchar(10),
PRIMARY KEY (id)
)
GO

View File

@ -0,0 +1,37 @@
create table hrsa_deduction_amount
(
id bigint primary key ,
create_time datetime,
update_time datetime,
creator bigint,
delete_type int,
tenant_key nvarchar(10),
tax_agent_id bigint,
year nvarchar(100),
employee_id bigint,
employee_type tinyint,
employee_name nvarchar(100),
job_num nvarchar(100),
card_type tinyint,
card_num nvarchar(100),
nationality nvarchar(255),
deduct_flag tinyint,
successfully_declared tinyint,
declare_status tinyint,
declare_error_msg nvarchar(3000)
)
GO
create table hrsa_deduction_amount_record
(
id bigint primary key ,
create_time datetime,
update_time datetime,
creator bigint,
delete_type int,
tenant_key nvarchar(10),
tax_agent_id bigint,
year nvarchar(100),
request_id nvarchar(100)
)
GO

View File

@ -0,0 +1,5 @@
alter table hrsa_push_record add fail_reason VARCHAR(4000)
go
alter table hrsa_push_record_detail add fail_reason VARCHAR(4000)
go

View File

@ -0,0 +1,5 @@
alter table hrsa_push_setting_item add sorted_index int
go
alter table hrsa_push_record_detail add data_id bigint
go

View File

@ -0,0 +1,70 @@
CREATE TABLE hrsa_push_setting
(
id NUMBER(38,0) primary key NOT NULL,
name varchar2(200),
able number,
salary_sob_ids varchar2(2000),
mode_id number,
mode_name varchar2(200),
table_name varchar2(200),
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_setting_item
(
id NUMBER(38,0) NOT NULL,
setting_id NUMBER(38,0),
source varchar2(100),
item varchar2(200),
item_name varchar2(200),
field_name varchar2(200),
field_type number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record
(
id NUMBER(38,0) NOT NULL,
name varchar2(200),
setting_id NUMBER(38,0),
mode_id number,
table_name varchar2(100),
acct_record_id NUMBER(38,0),
type number,
status number,
start_time date,
end_time date,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/
CREATE TABLE hrsa_push_record_detail
(
id NUMBER(38,0) NOT NULL,
record_id NUMBER(38,0),
acct_emp_id NUMBER(38,0),
formula CLOB,
execute_time date,
status number,
creator NUMBER(38,0),
create_time date,
update_time date,
delete_type number,
tenant_key varchar2(10)
);
/

View File

@ -0,0 +1,38 @@
create table hrsa_deduction_amount
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
employee_id number,
employee_type number,
employee_name varchar2(100),
job_num varchar2(100),
card_type number,
card_num varchar2(100),
nationality varchar2(200),
deduct_flag number,
successfully_declared number,
declare_status number,
declare_error_msg varchar2(1000)
);
/
create table hrsa_deduction_amount_record
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int,
tenant_key varchar2(10),
tax_agent_id number,
year varchar2(100),
request_id varchar2(100)
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000);
/
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER;
/
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0);
/

View File

@ -0,0 +1,15 @@
package com.api.salary.web;
import javax.ws.rs.Path;
/**
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Path("/bs/hrmsalary/deductionAmount")
public class DeductionAmountController extends com.engine.salary.web.DeductionAmountController {
}

View File

@ -0,0 +1,126 @@
package com.engine.salary.entity.deductionamount.dto;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* 人员报送记录
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//hrsa_deduction_amount
public class DeductionAmountDTO {
/**
* ID
*/
private Long id;
/**
* 个税扣缴义务人ID
*/
private Long taxAgentId;
/**
* 税款所属年度
*/
@TableTitle(title = "税款所属年度", dataIndex = "year", key = "year")
private String year;
/**
* 人员id
*/
private Long employeeId;
/**
* 姓名
*/
@TableTitle(title = "姓名", dataIndex = "employeeName", key = "employeeName")
private String employeeName;
/**
* 人员类型
*/
private Integer employeeType;
/**
* 工号
*/
@TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum")
private String jobNum;
/**
* 证件号码
*/
@TableTitle(title = "证件号码", dataIndex = "cardNum", key = "cardNum")
private String cardNum;
/**
* 证件类型
*/
private Integer cardType;
/**
* 国籍
*/
@TableTitle(title = "国籍", dataIndex = "nationality", key = "nationality")
private String nationality;
/**
* 是否扣除
*/
@TableTitle(title = "是否扣除", dataIndex = "deductFlag", key = "deductFlag")
private Integer deductFlag;
/**
* 报送状态
*/
@TableTitle(title = "报送状态", dataIndex = "declareStatusName", key = "declareStatusName")
private String declareStatusName;
private Integer declareStatus;
private String declareErrorMsg;
/**
* 是否成功报送过
*/
private Integer successfullyDeclared;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 租户KEY
*/
private String tenantKey;
//主键id集合
private Collection<Long> ids;
}

View File

@ -0,0 +1,45 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountAddParam {
/**
* ID
*/
private Long id;
/**
* 个税扣缴义务人id
*/
@DataCheck(require = true, message = "参数错误个税扣缴义务人id不能为空")
private Long taxAgentId;
/**
* 税款所属年度
*/
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
private String year;
/**
* 报送人员ids
*/
private List<Long> employeeDeclareIds;
}

View File

@ -0,0 +1,31 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountConfirmParam {
// 个税扣缴义务人id
@DataCheck(require = true, message = "参数错误个税扣缴义务人id不能为空")
private Long taxAgentId;
// 税款所属年度
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
private String year;
}

View File

@ -0,0 +1,27 @@
package com.engine.salary.entity.deductionamount.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountDeleteParam {
/**
* ID
*/
private List<Long> ids;
}

View File

@ -0,0 +1,30 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountEditParam {
/**
* ID
*/
@DataCheck(require = true, message = "参数错误id不能为空")
private Long id;
@DataCheck(require = true, message = "请选择是否扣除")
private Integer deductFlag;
}

View File

@ -0,0 +1,30 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountFeedBackParam {
// 个税扣缴义务人id
@DataCheck(require = true, message = "参数错误个税扣缴义务人id不能为空")
private Long taxAgentId;
// 税款所属年度
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
private String year;
}

View File

@ -0,0 +1,36 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.common.BaseQueryParam;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountListParam extends BaseQueryParam {
/**
* 个税扣缴义务人id
*/
@DataCheck(require = true, message = "参数错误个税扣缴义务人id不能为空")
private Long taxAgentId;
/**
* 税款所属年度
*/
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
private String year;
}

View File

@ -0,0 +1,31 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountOnlineQueryParam {
// 个税扣缴义务人id
@DataCheck(require = true, message = "参数错误个税扣缴义务人id不能为空")
private Long taxAgentId;
// 税款所属年度
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
private String year;
}

View File

@ -0,0 +1,31 @@
package com.engine.salary.entity.deductionamount.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 扣除名单查询参数
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeductionAmountQueryParam {
// 个税扣缴义务人id
@DataCheck(require = true, message = "参数错误个税扣缴义务人id不能为空")
private Long taxAgentId;
// 税款所属年度
@DataCheck(require = true, message = "参数错误,税款所属年度参数格式错误")
private String year;
}

View File

@ -0,0 +1,140 @@
package com.engine.salary.entity.deductionamount.po;
import com.engine.hrmelog.annotation.ElogTransform;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* 扣除名单
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//hrsa_deduction_amount
public class DeductionAmountPO {
/**
* ID
*/
@ElogTransform(name = "ID")
private Long id;
/**
* 个税扣缴义务人ID
*/
@ElogTransform(name = "个税扣缴义务人ID")
private Long taxAgentId;
/**
* 税款所属年度
*/
@ElogTransform(name = "税款所属年度")
private String year;
/**
* 人员id
*/
@ElogTransform(name = "人员id")
private Long employeeId;
/**
* 姓名
*/
@ElogTransform(name = "姓名")
private String employeeName;
/**
* 人员类型
*/
@ElogTransform(name = "人员类型")
private Integer employeeType;
/**
* 工号
*/
@ElogTransform(name = "工号")
private String jobNum;
/**
* 国籍
*/
@ElogTransform(name = "国籍")
private String nationality;
/**
* 证件号码
*/
@ElogTransform(name = "证件号码")
private String cardNum;
/**
* 证件类型
*/
@ElogTransform(name = "证件类型")
private Integer cardType;
/**
* 是否扣除
*/
@ElogTransform(name = "是否扣除")
private Integer deductFlag;
/**
* 是否成功报送过
*/
@ElogTransform(name = "是否成功报送过")
private Integer successfullyDeclared;
/**
* 报送状态
*/
@ElogTransform(name = "报送状态")
private Integer declareStatus;
/**
* 申报失败的错误信息
*/
@ElogTransform(name = "失败的错误信息")
private String declareErrorMsg;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
private Date createTime;
/**
* 修改时间
*/
@ElogTransform(name = "修改时间")
private Date updateTime;
/**
* 创建人id
*/
@ElogTransform(name = "创建人id")
private Long creator;
/**
* 是否删除
*/
@ElogTransform(name = "是否删除")
private Integer deleteType;
/**
* 租户KEY
*/
@ElogTransform(name = "租户KEY")
private String tenantKey;
//主键id集合
private Collection<Long> ids;
}

View File

@ -0,0 +1,66 @@
package com.engine.salary.entity.deductionamount.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Collection;
import java.util.Date;
/**
* 扣减报送记录
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
//"hrsa_employee_declare_record")
public class DeductionAmountRecordPO {
/**
* 主键id
*/
private Long id;
/**
* 个税扣缴义务人
*/
private Long taxAgentId;
/**
* 税款所属年
*/
private String year;
/**
* 请求的requestId
*/
private String requestId;
/**
* 租户key
*/
private String tenantKey;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private Collection<Long> ids;
}

View File

@ -3,6 +3,7 @@ package com.engine.salary.entity.push.dto;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.annotation.TableTitle;
import com.engine.salary.enums.push.PushRecordStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -50,7 +51,7 @@ public class PushRecordDTO {
/**
* 数据库表名
*/
@TableTitle(title = "记录名", dataIndex = "name", key = "name")
@TableTitle(title = "数据表名", dataIndex = "tableName", key = "tableName")
private String tableName;
@ -59,56 +60,53 @@ public class PushRecordDTO {
*
* @see PushRecordStatusEnum
*/
@TableTitle(title = "推送状态", dataIndex = "status", key = "status")
@TableTitle(title = "推送状态", dataIndex = "statusName", key = "statusName")
private String statusName;
private Integer status;
/**
* 执行时间
*/
@TableTitle(title = "执行时间", dataIndex = "startTime", key = "startTime")
@TableTitle(title = "执行开始时间", dataIndex = "startTime", key = "startTime")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime;
/**
* 结束时间
*/
@ElogTransform(name = "结束时间")
@TableTitle(title = "执行结束时间", dataIndex = "endTime", key = "endTime")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime;
/**
* 推送类型0推送1撤回
*/
@ElogTransform(name = "推送类型")
private Integer type;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
private Date createTime;
/**
* 创建人
*/
@ElogTransform(name = "创建人")
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
@ElogTransform(name = "是否已删除。0未删除、1已删除")
private Integer deleteType;
/**
* 租户ID
*/
@ElogTransform(name = "租户ID")
private String tenantKey;
/**
* 更新时间
*/
@ElogTransform(name = "更新时间")
private Date updateTime;

View File

@ -33,18 +33,22 @@ public class PushRecordDetailDTO {
*/
private Long acctEmpId;
@TableTitle(title = "人员", dataIndex = "username",key = "username")
private String username;
/**
* 执行状态
* @see com.engine.salary.enums.push.PushRecordDetailStatusEnum
*/
@TableTitle(title = "执行状态", dataIndex = "status",key = "status")
@TableTitle(title = "执行状态", dataIndex = "statusName",key = "statusName")
private String statusName;
private Integer status;
/**
* 失败原因
*/
@TableTitle(title = "失败原因", dataIndex = "fail_reason",key = "status")
private String fail_reason;
private String failReason;
/**
* 执行sql

View File

@ -59,4 +59,7 @@ public class PushSettingItemDTO {
@TableTitle(title = "字段类型", dataIndex = "fieldTypeName", key = "fieldTypeName")
private String fieldTypeName;
@TableTitle(title = "排序", dataIndex = "sortedIndex", key = "sortedIndex")
private Integer sortedIndex;
}

View File

@ -0,0 +1,29 @@
package com.engine.salary.entity.push.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 创建推送记录
* <p>Copyright: Copyright (c) 2024</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreatePushParam {
private List<Long> salaryAcctRecordIds;
}

View File

@ -13,6 +13,8 @@ import lombok.NoArgsConstructor;
public class PushParam {
private Long id;
private Long salaryAcctRecordId;

View File

@ -59,6 +59,11 @@ public class PushSettingItemSaveParam {
@DataCheck(require = true, message = "字段类型为空")
private PushItemFieldEnum fieldType;
/**
* 排序
*/
private Integer sortedIndex;
//主键id集合
private Collection<Long> ids;

View File

@ -34,6 +34,11 @@ public class PushRecordDetailPO {
@ElogTransform(name = "核算人员id")
private Long acctEmpId;
/**
* 核算人员id
*/
private Long dataId;
/**
* 执行状态
* @see com.engine.salary.enums.push.PushRecordDetailStatusEnum
@ -45,13 +50,13 @@ public class PushRecordDetailPO {
* 失败原因
*/
@ElogTransform(name = "失败原因")
private String fail_reason;
private String failReason;
/**
* 执行sql
*/
@ElogTransform(name = "执行sql")
private String execute;
private String formula;
/**
* 创建时间

View File

@ -64,7 +64,7 @@ public class PushRecordPO {
* 失败原因
*/
@ElogTransform(name = "失败原因")
private String fail_reason;
private String failReason;
/**
* 开始时间

View File

@ -62,6 +62,10 @@ public class PushSettingItemPO {
@ElogTransform(name = "字段类型")
private Integer fieldType;
@ElogTransform(name = "排序")
private Integer sortedIndex;
/**
* 租户ID
*/

View File

@ -1,5 +1,7 @@
package com.engine.salary.entity.taxdeclaration.bo;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.entity.datacollection.AddUpSituation;
@ -20,7 +22,6 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.IdGenerator;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import java.lang.reflect.Field;
import java.math.BigDecimal;
@ -49,29 +50,116 @@ public class TaxDeclarationCommon implements TaxDeclarationStrategy {
List<TaxDeclarationValuePO> taxDeclarationValues = Lists.newArrayListWithExpectedSize(employeeIdKeyMap.size());
for (Map.Entry<Long, List<SalaryAcctEmployeePO>> employeeIdEntry : employeeIdKeyMap.entrySet()) {
// 取最后一次薪资核算记录的核算结果作为个税申报表的数据来源
SalaryAcctEmployeePO lastSalaryAcctEmployee = SalaryEntityUtil.findFirst(employeeIdEntry.getValue());
for (SalaryAcctEmployeePO salaryAcctEmployee : employeeIdEntry.getValue()) {
SalaryAcctRecordPO salaryAcctRecord = taxDeclareContext.getSalaryAcctRecordMap().get(salaryAcctEmployee.getSalaryAcctRecordId());
SalaryAcctRecordPO lastSalaryAcctRecord = taxDeclareContext.getSalaryAcctRecordMap().get(lastSalaryAcctEmployee.getSalaryAcctRecordId());
if (salaryAcctRecord.getCreateTime().compareTo(lastSalaryAcctRecord.getCreateTime()) > 0) {
lastSalaryAcctEmployee = salaryAcctEmployee;
}
}
Map<String, String> valueMap = Maps.newHashMap();
for (TaxReportColumnPO taxReportColumn : taxDeclareContext.getTaxReportColumns()) {
SalarySobTaxReportRulePO salarySobTaxReportRule = taxDeclareContext.getSalarySobTaxReportRuleMap()
.get(lastSalaryAcctEmployee.getSalarySobId() + "-" + taxReportColumn.getReportColumnDataIndex());
List<SalaryAcctResultPO> salaryAcctResultValue = salaryAcctResultValueMap.get(lastSalaryAcctEmployee.getId());
String value = "";
if (salarySobTaxReportRule != null && salaryAcctResultValue != null) {
value = salaryAcctResultValue.stream()
.filter(result -> result.getSalaryItemId().equals(salarySobTaxReportRule.getSalaryItemId()))
.findFirst()
.orElse(new SalaryAcctResultPO())
.getResultValue();
List<String> firstValueList = Lists.newArrayList(
"taxFreeIncome",
"endowmentInsurance",
"medicalInsurance",
"unemploymentInsurance",
"housingProvidentFund",
"addUpChildEducation",
"addUpHousingLoanInterest",
"addUpHousingRent",
"addUpSupportElderly",
"addUpContinuingEducation",
"addUpInfantCare",
"annuity",
"commercialHealthInsurance",
"taxDeferredEndowmentInsurance",
"other",
"allowedDonation",
"taxDeduction",
"description",
"addUpAdvanceTax");
List<String> lastValueList = Lists.newArrayList(
"addUpIncome",
"addUpTaxFreeIncome",
"addUpSubtraction",
"addUpSpecialDeduction",
"addUpOtherDeduction",
"addUpAllowedDonation",
"addUpTaxableIncome",
"taxRate",
"quickDeductionFactor",
"addUpTaxPayable",
"addUpTaxDeduction"
);
List<String> mergeValueList = Lists.newArrayList(
"income",
"refundedOrSupplementedTax"
);
//取第一次值
if (firstValueList.contains(taxReportColumn.getReportColumnDataIndex())) {
SalaryAcctEmployeePO lastSalaryAcctEmployee = SalaryEntityUtil.findFirst(employeeIdEntry.getValue());
for (SalaryAcctEmployeePO salaryAcctEmployee : employeeIdEntry.getValue()) {
SalaryAcctRecordPO salaryAcctRecord = taxDeclareContext.getSalaryAcctRecordMap().get(salaryAcctEmployee.getSalaryAcctRecordId());
SalaryAcctRecordPO lastSalaryAcctRecord = taxDeclareContext.getSalaryAcctRecordMap().get(lastSalaryAcctEmployee.getSalaryAcctRecordId());
if (salaryAcctRecord.getCreateTime().compareTo(lastSalaryAcctRecord.getCreateTime()) < 0) {
lastSalaryAcctEmployee = salaryAcctEmployee;
}
}
SalarySobTaxReportRulePO salarySobTaxReportRule = taxDeclareContext.getSalarySobTaxReportRuleMap()
.get(lastSalaryAcctEmployee.getSalarySobId() + "-" + taxReportColumn.getReportColumnDataIndex());
List<SalaryAcctResultPO> salaryAcctResultValue = salaryAcctResultValueMap.get(lastSalaryAcctEmployee.getId());
if (salarySobTaxReportRule != null && salaryAcctResultValue != null) {
value = salaryAcctResultValue.stream()
.filter(result -> result.getSalaryItemId().equals(salarySobTaxReportRule.getSalaryItemId()))
.findFirst()
.orElse(new SalaryAcctResultPO())
.getResultValue();
}
value = StrUtil.isNotBlank(value) ? value : Objects.equals(taxReportColumn.getDataType(), SalaryDataTypeEnum.NUMBER.getValue()) ? "0.00" : "";
}
//取多次累计值
else if (mergeValueList.contains(taxReportColumn.getReportColumnDataIndex()) && Objects.equals(taxReportColumn.getDataType(), SalaryDataTypeEnum.NUMBER.getValue())) {
List<SalaryAcctEmployeePO> employeePOS = employeeIdEntry.getValue();
BigDecimal income = new BigDecimal("0.00");
for (SalaryAcctEmployeePO salaryAcctEmployeePO : employeePOS) {
SalarySobTaxReportRulePO incomeRule = taxDeclareContext.getSalarySobTaxReportRuleMap()
.get(salaryAcctEmployeePO.getSalarySobId() + "-" + taxReportColumn.getReportColumnDataIndex());
List<SalaryAcctResultPO> salaryAcctResultValue = salaryAcctResultValueMap.get(salaryAcctEmployeePO.getId());
if (incomeRule != null && salaryAcctResultValue != null) {
String incomeValue = salaryAcctResultValue.stream()
.filter(result -> result.getSalaryItemId().equals(incomeRule.getSalaryItemId()))
.findFirst()
.orElse(new SalaryAcctResultPO())
.getResultValue();
if (StrUtil.isNotBlank(incomeValue) && NumberUtil.isNumber(incomeValue)) {
income = income.add(new BigDecimal(incomeValue));
}
}
}
value = income.toPlainString();
}
//取最后一次值
else {
SalaryAcctEmployeePO lastSalaryAcctEmployee = SalaryEntityUtil.findFirst(employeeIdEntry.getValue());
for (SalaryAcctEmployeePO salaryAcctEmployee : employeeIdEntry.getValue()) {
SalaryAcctRecordPO salaryAcctRecord = taxDeclareContext.getSalaryAcctRecordMap().get(salaryAcctEmployee.getSalaryAcctRecordId());
SalaryAcctRecordPO lastSalaryAcctRecord = taxDeclareContext.getSalaryAcctRecordMap().get(lastSalaryAcctEmployee.getSalaryAcctRecordId());
if (salaryAcctRecord.getCreateTime().compareTo(lastSalaryAcctRecord.getCreateTime()) > 0) {
lastSalaryAcctEmployee = salaryAcctEmployee;
}
}
SalarySobTaxReportRulePO salarySobTaxReportRule = taxDeclareContext.getSalarySobTaxReportRuleMap()
.get(lastSalaryAcctEmployee.getSalarySobId() + "-" + taxReportColumn.getReportColumnDataIndex());
List<SalaryAcctResultPO> salaryAcctResultValue = salaryAcctResultValueMap.get(lastSalaryAcctEmployee.getId());
if (salarySobTaxReportRule != null && salaryAcctResultValue != null) {
value = salaryAcctResultValue.stream()
.filter(result -> result.getSalaryItemId().equals(salarySobTaxReportRule.getSalaryItemId()))
.findFirst()
.orElse(new SalaryAcctResultPO())
.getResultValue();
}
value = StrUtil.isNotBlank(value) ? value : Objects.equals(taxReportColumn.getDataType(), SalaryDataTypeEnum.NUMBER.getValue()) ? "0.00" : "";
}
value = StringUtils.isNotBlank(value) ? value : Objects.equals(taxReportColumn.getDataType(), SalaryDataTypeEnum.NUMBER.getValue()) ? "0.00" : "";
valueMap.put(taxReportColumn.getReportColumnDataIndex(), value);
}
TaxDeclarationValuePO taxDeclarationValue = TaxDeclarationValuePO.builder()

View File

@ -2,6 +2,8 @@ package com.engine.salary.enums.employeedeclare;
import com.engine.salary.enums.BaseEnum;
import java.util.Objects;
/**
* 人员报送状态
* <p>Copyright: Copyright (c) 2023</p>
@ -43,4 +45,13 @@ public enum DeclareStatusEnum implements BaseEnum<Integer> {
public Integer getLabelId() {
return labelId;
}
public static DeclareStatusEnum getByValue(Integer value) {
for (DeclareStatusEnum e : DeclareStatusEnum.values()) {
if (Objects.equals(e.getValue(), value)) {
return e;
}
}
return NOT_DECLARE;
}
}

View File

@ -17,7 +17,8 @@ public enum PushRecordDetailStatusEnum implements BaseEnum<Integer> {
PREPARE(0, "待推送", 87625),
SUCCESS(1, "推送成功", 85393),
FAIL(2, "推送失败", 85393),
WITHDRAW(3, "已撤回", 85393);
WITHDRAW_SUCCESS(3, "已撤回", 85393),
WITHDRAW_FAIL(4, "撤回失败", 85393);
private int value;
@ -52,7 +53,7 @@ public enum PushRecordDetailStatusEnum implements BaseEnum<Integer> {
return salaryDataSourceEnum;
}
}
return null;
return PREPARE;
}
public static String getDefaultLabelByValue(Integer value) {

View File

@ -14,13 +14,14 @@ import java.util.Objects;
* @version 1.0
**/
public enum PushRecordStatusEnum implements BaseEnum<Integer> {
DATA_PREPARE(0, "数据构建", 87625),
DATA_FINISH(1, "构建完毕", 87625),
RUN_WAITING(2, "等待执行", 87625),
RUN_PROGRESS(3, "执行中", 85393),
RUN_COMPLETE(4, "执行完毕", 85393),
RUN_SUCCESS(5, "执行成功", 85393),
RUN_FAIL(6, "执行失败", 85393);
DATA_PREPARE(0, "准备中", 87625),
DATA_FINISH(1, "准备完毕", 87625),
RUN_PROGRESS(2, "推送中", 85393),
RUN_SUCCESS(3, "推送成功", 85393),
RUN_FAIL(4, "推送失败", 85393),
WITHDRAW(5, "撤回中", 85393),
WITHDRAW_SUCCESS(6, "已撤回", 85393),
WITHDRAW_FAIL(7, "撤回失败", 85393);
private int value;
@ -55,7 +56,7 @@ public enum PushRecordStatusEnum implements BaseEnum<Integer> {
return salaryDataSourceEnum;
}
}
return null;
return DATA_PREPARE;
}
public static String getDefaultLabelByValue(Integer value) {

View File

@ -0,0 +1,74 @@
package com.engine.salary.mapper.deductionamount;
import com.engine.salary.entity.deductionamount.po.DeductionAmountPO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
public interface DeductionAmountMapper {
/**
* 查询所有记录
*
* @return 返回集合没有返回空List
*/
List<DeductionAmountPO> listAll();
/**
* 条件查询
*
* @return 返回集合没有返回空List
*/
List<DeductionAmountPO> listSome(DeductionAmountPO deductionAmount);
/**
* 根据主键查询
*
* @param id 主键
* @return 返回记录没有返回null
*/
DeductionAmountPO getById(Long id);
/**
* 新增忽略null字段
*
* @param deductionAmount 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(DeductionAmountPO deductionAmount);
/**
* 修改修改所有字段
*
* @param deductionAmount 修改的记录
* @return 返回影响行数
*/
int update(DeductionAmountPO deductionAmount);
/**
* 修改忽略null字段
*
* @param deductionAmount 修改的记录
* @return 返回影响行数
*/
int updateIgnoreNull(DeductionAmountPO deductionAmount);
/**
* 删除记录
*
* @param deductionAmount 待删除的记录
* @return 返回影响行数
*/
int delete(DeductionAmountPO deductionAmount);
/**
* 批量删除记录
*
* @param ids 主键id集合
*/
void deleteByIds(@Param("ids") Collection<Long> ids);
}

View File

@ -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.deductionamount.DeductionAmountMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
<result column="card_num" property="cardNum"/>
<result column="card_type" property="cardType"/>
<result column="create_time" property="createTime"/>
<result column="creator" property="creator"/>
<result column="declare_status" property="declareStatus"/>
<result column="deduct_flag" property="deductFlag"/>
<result column="delete_type" property="deleteType"/>
<result column="employee_id" property="employeeId"/>
<result column="employee_name" property="employeeName"/>
<result column="employee_type" property="employeeType"/>
<result column="id" property="id"/>
<result column="job_num" property="jobNum"/>
<result column="successfully_declared" property="successfullyDeclared"/>
<result column="declare_error_msg" property="declareErrorMsg"/>
<result column="tax_agent_id" property="taxAgentId"/>
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
<result column="year" property="year"/>
<result column="nationality" property="nationality"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t
.
card_num
, t.card_type
, t.create_time
, t.creator
, t.declare_status
, t.deduct_flag
, t.delete_type
, t.employee_id
, t.employee_name
, t.employee_type
, t.id
, t.job_num
, t.successfully_declared
, t.declare_error_msg
, t.tax_agent_id
, t.tenant_key
, t.update_time
, t.year
, t.nationality
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount t
WHERE delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount t
WHERE id = #{id} AND delete_type = 0
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap"
parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount t
WHERE delete_type = 0
<if test="cardNum != null">
AND card_num = #{cardNum}
</if>
<if test="cardType != null">
AND card_type = #{cardType}
</if>
<if test="createTime != null">
AND create_time = #{createTime}
</if>
<if test="creator != null">
AND creator = #{creator}
</if>
<if test="declareStatus != null">
AND declare_status = #{declareStatus}
</if>
<if test="deductFlag != null">
AND deduct_flag = #{deductFlag}
</if>
<if test="deleteType != null">
AND delete_type = #{deleteType}
</if>
<if test="employeeId != null">
AND employee_id = #{employeeId}
</if>
<if test="employeeName != null">
AND employee_name = #{employeeName}
</if>
<if test="employeeType != null">
AND employee_type = #{employeeType}
</if>
<if test="id != null">
AND id = #{id}
</if>
<if test="jobNum != null">
AND job_num = #{jobNum}
</if>
<if test="successfullyDeclared != null">
AND successfully_declared = #{successfullyDeclared}
</if>
<if test="declareErrorMsg != null">
AND declare_error_msg = #{declareErrorMsg}
</if>
<if test="taxAgentId != null">
AND tax_agent_id = #{taxAgentId}
</if>
<if test="tenantKey != null">
AND tenant_key = #{tenantKey}
</if>
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="year != null">
AND year = #{year}
</if>
<if test="nationality != null">
AND nationality = #{nationality}
</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.deductionamount.po.DeductionAmountPO">
INSERT INTO hrsa_deduction_amount
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardNum != null">
card_num,
</if>
<if test="cardType != null">
card_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="declareStatus != null">
declare_status,
</if>
<if test="deductFlag != null">
deduct_flag,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="employeeId != null">
employee_id,
</if>
<if test="employeeName != null">
employee_name,
</if>
<if test="employeeType != null">
employee_type,
</if>
<if test="id != null">
id,
</if>
<if test="jobNum != null">
job_num,
</if>
<if test="successfullyDeclared != null">
successfully_declared,
</if>
<if test="declareErrorMsg != null">
declare_error_msg,
</if>
<if test="taxAgentId != null">
tax_agent_id,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="year != null">
year,
</if>
<if test="nationality != null">
nationality,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="cardNum != null">
#{cardNum},
</if>
<if test="cardType != null">
#{cardType},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="declareStatus != null">
#{declareStatus},
</if>
<if test="deductFlag != null">
#{deductFlag},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="employeeId != null">
#{employeeId},
</if>
<if test="employeeName != null">
#{employeeName},
</if>
<if test="employeeType != null">
#{employeeType},
</if>
<if test="id != null">
#{id},
</if>
<if test="jobNum != null">
#{jobNum},
</if>
<if test="successfullyDeclared != null">
#{successfullyDeclared},
</if>
<if test="declareErrorMsg != null">
#{declareErrorMsg},
</if>
<if test="taxAgentId != null">
#{taxAgentId},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="year != null">
#{year},
</if>
<if test="nationality != null">
#{nationality},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
UPDATE hrsa_deduction_amount
<set>
card_num=#{cardNum},
card_type=#{cardType},
create_time=#{createTime},
creator=#{creator},
declare_status=#{declareStatus},
deduct_flag=#{deductFlag},
delete_type=#{deleteType},
employee_id=#{employeeId},
employee_name=#{employeeName},
employee_type=#{employeeType},
job_num=#{jobNum},
successfully_declared=#{successfullyDeclared},
declare_error_msg=#{declareErrorMsg},
tax_agent_id=#{taxAgentId},
tenant_key=#{tenantKey},
update_time=#{updateTime},
year=#{year},
nationality=#{nationality},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountPO">
UPDATE hrsa_deduction_amount
<set>
<if test="cardNum != null">
card_num=#{cardNum},
</if>
<if test="cardType != null">
card_type=#{cardType},
</if>
<if test="createTime != null">
create_time=#{createTime},
</if>
<if test="creator != null">
creator=#{creator},
</if>
<if test="declareStatus != null">
declare_status=#{declareStatus},
</if>
<if test="deductFlag != null">
deduct_flag=#{deductFlag},
</if>
<if test="deleteType != null">
delete_type=#{deleteType},
</if>
<if test="employeeId != null">
employee_id=#{employeeId},
</if>
<if test="employeeName != null">
employee_name=#{employeeName},
</if>
<if test="employeeType != null">
employee_type=#{employeeType},
</if>
<if test="jobNum != null">
job_num=#{jobNum},
</if>
<if test="successfullyDeclared != null">
successfully_declared=#{successfullyDeclared},
</if>
<if test="declareErrorMsg != null">
declare_error_msg=#{declareErrorMsg},
</if>
<if test="taxAgentId != null">
tax_agent_id=#{taxAgentId},
</if>
<if test="tenantKey != null">
tenant_key=#{tenantKey},
</if>
<if test="updateTime != null">
update_time=#{updateTime},
</if>
<if test="year != null">
year=#{year},
</if>
<if test="nationality != null">
nationality=#{nationality},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 根据主键删除记录 -->
<delete id="delete">
UPDATE hrsa_deduction_amount
SET delete_type=1
WHERE id = #{id}
AND delete_type = 0
</delete>
<delete id="deleteByIds">
UPDATE hrsa_deduction_amount
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,77 @@
package com.engine.salary.mapper.deductionamount;
import com.engine.salary.entity.deductionamount.po.DeductionAmountRecordPO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
public interface DeductionAmountRecordMapper {
/**
* 查询所有记录
*
* @return 返回集合没有返回空List
*/
List<DeductionAmountRecordPO> listAll();
/**
* 条件查询
*
* @return 返回集合没有返回空List
*/
List<DeductionAmountRecordPO> listSome(DeductionAmountRecordPO deductionAmountRecord);
/**
* 根据主键查询
*
* @param id 主键
* @return 返回记录没有返回null
*/
DeductionAmountRecordPO getById(Long id);
DeductionAmountRecordPO getByTaxAgentIdAndYear(@Param("taxAgentId")Long taxAgentId,@Param("year") String year);
/**
* 新增忽略null字段
*
* @param deductionAmountRecord 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(DeductionAmountRecordPO deductionAmountRecord);
/**
* 修改修改所有字段
*
* @param deductionAmountRecord 修改的记录
* @return 返回影响行数
*/
int update(DeductionAmountRecordPO deductionAmountRecord);
/**
* 修改忽略null字段
*
* @param deductionAmountRecord 修改的记录
* @return 返回影响行数
*/
int updateIgnoreNull(DeductionAmountRecordPO deductionAmountRecord);
/**
* 删除记录
*
* @param deductionAmountRecord 待删除的记录
* @return 返回影响行数
*/
int delete(DeductionAmountRecordPO deductionAmountRecord);
/**
* 批量删除记录
* @param ids 主键id集合
*/
void deleteByIds(@Param("ids") Collection<Long> ids);
void deleteByTaxAgentIdAndYear(@Param("taxAgentId")Long taxAgentId,@Param("year") String year);
}

View File

@ -0,0 +1,239 @@
<?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.deductionamount.DeductionAmountRecordMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.deductionamount.po.DeductionAmountRecordPO">
<result column="create_time" property="createTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="id" property="id"/>
<result column="request_id" property="requestId"/>
<result column="tax_agent_id" property="taxAgentId"/>
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
<result column="year" property="year"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t
.
create_time
, t.creator
, t.delete_type
, t.id
, t.request_id
, t.tax_agent_id
, t.tenant_key
, t.update_time
, t.year
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount_record t
WHERE delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount_record t
WHERE id = #{id} AND delete_type = 0
</select>
<select id="getByTaxAgentIdAndYear" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount_record t
WHERE delete_type = 0
AND tax_agent_id=#{taxAgentId}
AND year=#{year}
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap"
parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountRecordPO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_deduction_amount_record 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="id != null">
AND id = #{id}
</if>
<if test="requestId != null">
AND request_id = #{requestId}
</if>
<if test="taxAgentId != null">
AND tax_agent_id = #{taxAgentId}
</if>
<if test="tenantKey != null">
AND tenant_key = #{tenantKey}
</if>
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="year != null">
AND year = #{year}
</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.deductionamount.po.DeductionAmountRecordPO">
INSERT INTO hrsa_deduction_amount_record
<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="id != null">
id,
</if>
<if test="requestId != null">
request_id,
</if>
<if test="taxAgentId != null">
tax_agent_id,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="year != null">
year,
</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="id != null">
#{id},
</if>
<if test="requestId != null">
#{requestId},
</if>
<if test="taxAgentId != null">
#{taxAgentId},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="year != null">
#{year},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountRecordPO">
UPDATE hrsa_deduction_amount_record
<set>
create_time=#{createTime},
creator=#{creator},
delete_type=#{deleteType},
request_id=#{requestId},
tax_agent_id=#{taxAgentId},
tenant_key=#{tenantKey},
update_time=#{updateTime},
year=#{year},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.deductionamount.po.DeductionAmountRecordPO">
UPDATE hrsa_deduction_amount_record
<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="requestId != null">
request_id=#{requestId},
</if>
<if test="taxAgentId != null">
tax_agent_id=#{taxAgentId},
</if>
<if test="tenantKey != null">
tenant_key=#{tenantKey},
</if>
<if test="updateTime != null">
update_time=#{updateTime},
</if>
<if test="year != null">
year=#{year},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 根据主键删除记录 -->
<delete id="delete">
UPDATE hrsa_deduction_amount_record
SET delete_type=1
WHERE id = #{id}
AND delete_type = 0
</delete>
<delete id="deleteByIds">
UPDATE hrsa_deduction_amount_record
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteByTaxAgentIdAndYear">
UPDATE hrsa_deduction_amount_record
SET delete_type = 1
WHERE delete_type = 0
AND tax_agent_id=#{taxAgentId}
AND year=#{year}
</delete>
</mapper>

View File

@ -1,5 +1,6 @@
package com.engine.salary.mapper.push;
import com.engine.salary.entity.push.dto.PushRecordDetailDTO;
import com.engine.salary.entity.push.po.PushRecordDetailPO;
import org.apache.ibatis.annotations.Param;
@ -21,7 +22,9 @@ public interface PushRecordDetailMapper {
* @return 返回集合没有返回空List
*/
List<PushRecordDetailPO> listSome(PushRecordDetailPO pushRecordDetail);
List<PushRecordDetailDTO> listDTO(PushRecordDetailDTO dto);
/**
* 根据主键查询

View File

@ -6,12 +6,14 @@
<result column="create_time" property="createTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="execute" property="execute"/>
<result column="formula" property="formula"/>
<result column="id" property="id"/>
<result column="record_id" property="recordId"/>
<result column="status" property="status"/>
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
<result column="fail_reason" property="failReason"/>
<result column="data_id" property="dataId"/>
</resultMap>
<!-- 表字段 -->
@ -22,12 +24,14 @@
, t.create_time
, t.creator
, t.delete_type
, t.execute
, t.formula
, t.id
, t.record_id
, t.status
, t.tenant_key
, t.update_time
, t.fail_reason
, t.data_id
</sql>
<!-- 查询全部 -->
@ -64,8 +68,8 @@
<if test="deleteType != null">
AND delete_type = #{deleteType}
</if>
<if test="execute != null">
AND execute = #{execute}
<if test="formula != null">
AND formula = #{formula}
</if>
<if test="id != null">
AND id = #{id}
@ -88,6 +92,54 @@
#{id}
</foreach>
</if>
ORDER BY id DESC
</select>
<select id="listDTO" resultType="com.engine.salary.entity.push.dto.PushRecordDetailDTO" parameterType="com.engine.salary.entity.push.dto.PushRecordDetailDTO">
SELECT
t.acct_emp_id
, t.create_time
, t.creator
, t.delete_type
, t.formula
, t.id
, t.record_id
, t.status
, t.tenant_key
, t.update_time
, t.fail_reason as failReason
, t.data_id as dataId
, e.LASTNAME as username
FROM hrsa_push_record_detail t
left join hrsa_salary_acct_emp emp
on t.acct_emp_id=emp.id
left join hrsa_salary_sob sob
on emp.salary_sob_id = sob.id
left join hrmresource e
on emp.employee_id=e.id
WHERE t.delete_type = 0
and emp.delete_type = 0
and sob.delete_type = 0
<if test="acctEmpId != null">
AND t.acct_emp_id = #{acctEmpId}
</if>
<if test="id != null">
AND t.id = #{id}
</if>
<if test="recordId != null">
AND t.record_id = #{recordId}
</if>
<if test="status != null">
AND t.status = #{status}
</if>
ORDER BY id DESC
</select>
@ -109,8 +161,8 @@
<if test="deleteType != null">
delete_type,
</if>
<if test="execute != null">
execute,
<if test="formula != null">
formula,
</if>
<if test="id != null">
id,
@ -127,6 +179,12 @@
<if test="updateTime != null">
update_time,
</if>
<if test="failReason != null">
fail_reason,
</if>
<if test="dataId != null">
data_id,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="acctEmpId != null">
@ -141,8 +199,8 @@
<if test="deleteType != null">
#{deleteType},
</if>
<if test="execute != null">
#{execute},
<if test="formula != null">
#{formula},
</if>
<if test="id != null">
#{id},
@ -159,6 +217,12 @@
<if test="updateTime != null">
#{updateTime},
</if>
<if test="failReason != null">
#{failReason},
</if>
<if test="dataId != null">
#{dataId},
</if>
</trim>
</insert>
@ -170,11 +234,13 @@
create_time=#{createTime},
creator=#{creator},
delete_type=#{deleteType},
execute=#{execute},
formula=#{formula},
record_id=#{recordId},
status=#{status},
tenant_key=#{tenantKey},
update_time=#{updateTime},
fail_reason=#{failReason},
data_id=#{dataId},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -196,8 +262,8 @@
<if test="deleteType != null">
delete_type=#{deleteType},
</if>
<if test="execute != null">
execute=#{execute},
<if test="formula != null">
formula=#{formula},
</if>
<if test="recordId != null">
record_id=#{recordId},
@ -211,6 +277,12 @@
<if test="updateTime != null">
update_time=#{updateTime},
</if>
<if test="failReason != null">
fail_reason=#{failReason},
</if>
<if test="dataId != null">
data_id=#{dataId},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>

View File

@ -3,18 +3,21 @@
<mapper namespace="com.engine.salary.mapper.push.PushRecordMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.push.po.PushRecordPO">
<result column="id" property="id"/>
<result column="name" property="name"/>
<result column="acct_record_id" property="acctRecordId"/>
<result column="setting_id" property="settingId"/>
<result column="mode_id" property="modeId"/>
<result column="table_name" property="tableName"/>
<result column="name" property="name"/>
<result column="type" property="type"/>
<result column="status" property="status"/>
<result column="setting_id" property="settingId"/>
<result column="acct_record_id" property="acctRecordId"/>
<result column="type" property="type"/>
<result column="create_time" property="createTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
<result column="fail_reason" property="failReason"/>
<result column="start_time" property="startTime"/>
<result column="end_time" property="endTime"/>
</resultMap>
<!-- 表字段 -->
@ -34,6 +37,9 @@
, t.tenant_key
, t.type
, t.update_time
, t.fail_reason
, t.start_time
, t.end_time
</sql>
<!-- 查询全部 -->
@ -98,6 +104,15 @@
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="failReason != null">
AND fail_reason = #{failReason}
</if>
<if test="startTime != null">
AND start_time = #{startTime}
</if>
<if test="endTime != null">
AND end_time = #{endTime}
</if>
<if test="ids != null and ids.size()>0">
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
@ -152,6 +167,15 @@
<if test="updateTime != null">
update_time,
</if>
<if test="failReason != null">
fail_reason,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="modeId != null">
@ -193,6 +217,15 @@
<if test="updateTime != null">
#{updateTime},
</if>
<if test="failReason != null">
#{failReason},
</if>
<if test="startTime != null">
#{startTime},
</if>
<if test="endTime != null">
#{endTime},
</if>
</trim>
</insert>
@ -212,6 +245,9 @@
tenant_key=#{tenantKey},
type=#{type},
update_time=#{updateTime},
fail_reason=#{failReason},
start_time=#{startTime},
end_time=#{endTime},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -257,6 +293,15 @@
<if test="updateTime != null">
update_time=#{updateTime},
</if>
<if test="failReason != null">
fail_reason=#{failReason},
</if>
<if test="startTime != null">
start_time=#{startTime},
</if>
<if test="endTime != null">
end_time=#{endTime},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>

View File

@ -12,6 +12,7 @@
<result column="item_name" property="itemName"/>
<result column="source" property="source"/>
<result column="setting_id" property="settingId"/>
<result column="sorted_index" property="sortedIndex"/>
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
</resultMap>
@ -32,6 +33,7 @@
, t.setting_id
, t.tenant_key
, t.update_time
, t.sorted_index
</sql>
<!-- 查询全部 -->
@ -40,6 +42,7 @@
<include refid="baseColumns"/>
FROM hrsa_push_setting_item t
WHERE delete_type = 0
ORDER BY sorted_index DESC
</select>
<!-- 根据主键获取单条记录 -->
@ -85,6 +88,9 @@
</if>
<if test="settingId != null">
AND setting_id = #{settingId}
</if>
<if test="sortedIndex != null">
AND sorted_index = #{sortedIndex}
</if>
<if test="tenantKey != null">
AND tenant_key = #{tenantKey}
@ -98,7 +104,7 @@
#{id}
</foreach>
</if>
ORDER BY id DESC
ORDER BY sorted_index DESC
</select>
@ -137,6 +143,9 @@
<if test="settingId != null">
setting_id,
</if>
<if test="sortedIndex != null">
sorted_index,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
@ -175,6 +184,9 @@
<if test="settingId != null">
#{settingId},
</if>
<if test="sortedIndex != null">
#{sortedIndex},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
@ -197,6 +209,7 @@
item_name=#{itemName},
source=#{source},
setting_id=#{settingId},
sorted_index=#{sortedIndex},
tenant_key=#{tenantKey},
update_time=#{updateTime},
</set>
@ -235,6 +248,9 @@
<if test="settingId != null">
setting_id=#{settingId},
</if>
<if test="sortedIndex != null">
sorted_index=#{sortedIndex},
</if>
<if test="tenantKey != null">
tenant_key=#{tenantKey},
</if>

View File

@ -143,6 +143,9 @@
<if test="taxCycleDateRange != null and taxCycleDateRange.endDate != null">
AND t.tax_cycle <![CDATA[ <= ]]> #{taxCycleDateRange.endDate}
</if>
<if test="taxAgentId != null">
AND sob.tax_agent_id = #{taxAgentId}
</if>
ORDER BY t.id DESC
</select>
<select id="listByCreateDate" resultType="com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO">

View File

@ -0,0 +1,101 @@
package com.engine.salary.remote.tax.client;
import com.engine.salary.enums.taxagent.TaxAgentTaxReturnPasswordTypeEnum;
import com.engine.salary.remote.tax.request.deductionAmount.ConfirmPreDeductRequest;
import com.engine.salary.remote.tax.request.deductionAmount.QueryDeductionAmountRequest;
import com.engine.salary.remote.tax.response.deductionAmount.ConfirmFeedbackResponse;
import com.engine.salary.util.HttpUtil;
import com.engine.salary.util.JsonUtil;
import com.engine.salary.util.SingnatureData;
import com.engine.salary.util.TaskUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import weaver.general.Util;
import java.util.*;
/**
* 申报扣减客户端
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Slf4j
public class DeductionAmountClient extends TaxBaseClient {
public DeductionAmountClient(Long taxAgentId) {
super(taxAgentId);
}
public String query(String taxYear) {
String url = super.apiConfig.getHost() + "gateway/iit/deductionAmount/queryPreDeduct";
QueryDeductionAmountRequest queryDeductionAmountRequest = new QueryDeductionAmountRequest();
queryDeductionAmountRequest.setNsrsbh(returnPO.getTaxCode());
queryDeductionAmountRequest.setBizNo(UUID.randomUUID().toString().replace("-", ""));
queryDeductionAmountRequest.setQymc(returnPO.getTaxAgentName());
queryDeductionAmountRequest.setDjxhid(StringUtils.isNotEmpty(returnPO.getTaxRegistrationNumber()) ? returnPO.getTaxRegistrationNumber() : null);
queryDeductionAmountRequest.setAreaid(returnPO.getAreaCode());
queryDeductionAmountRequest.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
queryDeductionAmountRequest.setSbmm(realNamePwd ? null : returnPO.getPwd());
queryDeductionAmountRequest.setJmsbmm("1");
queryDeductionAmountRequest.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
queryDeductionAmountRequest.setSmmm(realNamePwd ? returnPO.getPwd() : null);
queryDeductionAmountRequest.setJmsmmm("1");
queryDeductionAmountRequest.setMmlx("" + returnPO.getPasswordType());
queryDeductionAmountRequest.setSkssnd(taxYear);
String reqJson = JsonUtil.toJsonString(queryDeductionAmountRequest);
log.info("queryDeductionAmountRequest params --- \n{}\n", reqJson);
Map<String, String> params = new HashMap<>(1);
Map<String, String> header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret());
// 开始请求
String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE);
log.info("queryDeductionAmountRequest res --- {}", res);
return res;
}
public String confirm(String year, List<ConfirmPreDeductRequest.kczg> kczglb) {
String url = super.apiConfig.getHost() + "gateway/iit/deductionAmount/confirmPreDeduct";
ConfirmPreDeductRequest request = new ConfirmPreDeductRequest();
request.setNsrsbh(returnPO.getTaxCode());
request.setBizNo(UUID.randomUUID().toString().replace("-", ""));
request.setQymc(returnPO.getTaxAgentName());
request.setDjxhid(StringUtils.isNotEmpty(returnPO.getTaxRegistrationNumber()) ? returnPO.getTaxRegistrationNumber() : null);
request.setAreaid(returnPO.getAreaCode());
request.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
request.setSbmm(realNamePwd ? null : returnPO.getPwd());
request.setJmsbmm("1");
request.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
request.setSmmm(realNamePwd ? returnPO.getPwd() : null);
request.setJmsmmm("1");
request.setMmlx("" + returnPO.getPasswordType());
request.setSkssnd(year);
request.setKczglb(kczglb);
String requestId = request(url, JsonUtil.parseMap(request, Object.class));
return requestId;
}
public ConfirmFeedbackResponse feedback(String requestId) {
TaskUtil taskUtil = new TaskUtil();
String url = super.apiConfig.getHost() + "gateway/iit/deductionAmount/getPreDeductConfirmFeedback";
Map<String, String> param = new HashMap<>(1);
param.put("requestId", requestId);
Map<String, String> header = SingnatureData.initHeader(new HashMap<>(1), apiConfig.getAppKey(), apiConfig.getAppSecret());
String res = HttpUtil.getRequest(url, header, param);
taskUtil.writeApiTaskRecord(Util.null2String(taxAgentId), url, JsonUtil.toJsonString(param), res);
ConfirmFeedbackResponse response = JsonUtil.parseBean(res, ConfirmFeedbackResponse.class);
return response;
}
}

View File

@ -39,10 +39,10 @@ public class EmployeeClient extends TaxBaseClient {
mergedEmployeeArchivesRequest.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
mergedEmployeeArchivesRequest.setSbmm(realNamePwd ? null : returnPO.getPwd());
mergedEmployeeArchivesRequest.setJmsbmm("0");
mergedEmployeeArchivesRequest.setJmsbmm("1");
mergedEmployeeArchivesRequest.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
mergedEmployeeArchivesRequest.setSmmm(realNamePwd ? returnPO.getPwd() : null);
mergedEmployeeArchivesRequest.setJmsmmm("0");
mergedEmployeeArchivesRequest.setJmsmmm("1");
mergedEmployeeArchivesRequest.setMmlx("" + returnPO.getPasswordType());

View File

@ -0,0 +1,96 @@
package com.engine.salary.remote.tax.request.deductionAmount;
import lombok.Data;
import java.util.List;
@Data
public class ConfirmPreDeductRequest {
/**
* 外部业务编号 必填 外部业务编号唯一幂等需要最长64位,建议使用UUID
*/
private String bizNo;
/**
* 企业名称 必填 代报企业全称
*/
private String qymc;
/**
* 密码类型 必填 默认不传则设置为0 0表示申报密码2表示实名账号实名密码
*/
private String mmlx;
/**
* 实名账号 必填选择必填 当mmlx=2时必填
*/
private String smzh;
/**
* 实名密码 必填选择必填 当mmlx=2时必填
*/
private String smmm;
/**
* 加密实名密码 必填 默认不传则设置为00表示不加密1表示加密 参考3.4代报实名密码加密说明
*/
private String jmsmmm;
/**
* 登记序号 必填 存在多个登记序号时需要指定传入一个.10117440105249764755
*/
private String djxhid;
/**
* 税号 必填 扣缴单位纳税人识别号
*/
private String nsrsbh;
/**
* 地区编号 必填 6位行政区划代码,精确到市级例如440100,参考省市区编码
*/
private String areaid;
/**
* 部门编号 必填 分部门代报时必传
*/
private String bmbh;
/**
* 部门名称 必填
*/
private String bmmc;
/**
* 申报密码 必填条件必填 当mmlx=0时必填
*/
private String sbmm;
/**
* 加密申报密码 必填 默认不传则设置为00表示不加密1表示加密
*/
private String jmsbmm;
/**
* 税款所属年度 必填必填 yyyy
*/
private String skssnd;
/**
* 扣除资格列表
*/
private List<kczg> kczglb;
@Data
public static class kczg {
/**
* 姓名
*/
private String xm;
/**
* 证件类型 见证件类型字典
*/
private String zzlx;
/**
* 证件号码 证件号码
*/
private String zzhm;
/**
* 国籍
*/
private String gj;
/**
* 扣除标识 /
*/
private String kcbs;
}
}

View File

@ -0,0 +1,64 @@
package com.engine.salary.remote.tax.request.deductionAmount;
import lombok.Data;
@Data
public class QueryDeductionAmountRequest {
/**
* 外部业务编号 必填 外部业务编号唯一幂等需要最长64位,建议使用UUID
*/
private String bizNo;
/**
* 企业名称 必填 代报企业全称
*/
private String qymc;
/**
* 密码类型 必填 默认不传则设置为0 0表示申报密码2表示实名账号实名密码
*/
private String mmlx;
/**
* 实名账号 必填选择必填 当mmlx=2时必填
*/
private String smzh;
/**
* 实名密码 必填选择必填 当mmlx=2时必填
*/
private String smmm;
/**
* 加密实名密码 必填 默认不传则设置为00表示不加密1表示加密 参考3.4代报实名密码加密说明
*/
private String jmsmmm;
/**
* 登记序号 必填 存在多个登记序号时需要指定传入一个.10117440105249764755
*/
private String djxhid;
/**
* 税号 必填 扣缴单位纳税人识别号
*/
private String nsrsbh;
/**
* 地区编号 必填 6位行政区划代码,精确到市级例如440100,参考省市区编码
*/
private String areaid;
/**
* 部门编号 必填 分部门代报时必传
*/
private String bmbh;
/**
* 部门名称 必填
*/
private String bmmc;
/**
* 申报密码 必填条件必填 当mmlx=0时必填
*/
private String sbmm;
/**
* 加密申报密码 必填 默认不传则设置为00表示不加密1表示加密
*/
private String jmsbmm;
/**
* 税款所属年度 必填必填 yyyy
*/
private String skssnd;
}

View File

@ -0,0 +1,75 @@
package com.engine.salary.remote.tax.response.deductionAmount;
import com.engine.salary.entity.taxpayment.response.BaseResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 扣除名单确认反馈
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class ConfirmFeedbackResponse extends BaseResponse {
/**
* 返回数据
*/
private Body body;
/**
* 神州云合接口返回状态实体类
**/
@Data
public static class Body {
/**
* 总人数
*/
private String zrs;
/**
* 成功人数
*/
private String cgrs;
/**
* 失败人数
*/
private String sbrs;
/**
* 扣除确认失败列表
*/
private List<kcqrsb> kcqrsblb;
@Data
public static class kcqrsb {
/**
* 姓名
*/
private String xm;
/**
* 证件类型 见证件类型字典
*/
private String zzlx;
/**
* 证件号码 证件号码
*/
private String zzhm;
/**
* 国籍
*/
private String gj;
/**
* 失败原因
*/
private String sbyy;
}
}
}

View File

@ -0,0 +1,30 @@
package com.engine.salary.service;
import com.engine.salary.component.PageInfo;
import com.engine.salary.entity.deductionamount.dto.DeductionAmountDTO;
import com.engine.salary.entity.deductionamount.param.*;
/**
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public interface DeductionAmountService {
PageInfo<DeductionAmountDTO> list(DeductionAmountListParam param);
void add(DeductionAmountAddParam param);
void edit(DeductionAmountEditParam param);
void delete(DeductionAmountDeleteParam param);
Object query(DeductionAmountOnlineQueryParam param);
String confirm(DeductionAmountConfirmParam param);
String feedback(DeductionAmountFeedBackParam param);
}

View File

@ -58,19 +58,18 @@ public interface PushService {
*/
void deleteItem(Long id);
/**
* 推送一条核算记录下的所有数据
*
* @param salaryAcctRecordId
* @return
*/
void pushOneRecord(Long salaryAcctRecordId);
void createPushRecord(Long salaryAcctRecordId);
void withdrawPushRecord(Long salaryAcctRecordId);
void push(Long id);
void withdraw(Long id);
void removeRecords(List<Long> records);
PageInfo<PushRecordDTO> recordList(RecordListQueryParam param);
PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param);
}

View File

@ -0,0 +1,255 @@
package com.engine.salary.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.engine.core.impl.Service;
import com.engine.salary.component.PageInfo;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.constant.SzyhApiConstant;
import com.engine.salary.entity.deductionamount.dto.DeductionAmountDTO;
import com.engine.salary.entity.deductionamount.param.*;
import com.engine.salary.entity.deductionamount.po.DeductionAmountPO;
import com.engine.salary.entity.deductionamount.po.DeductionAmountRecordPO;
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
import com.engine.salary.enums.SalaryOnOffEnum;
import com.engine.salary.enums.employeedeclare.CardTypeEnum;
import com.engine.salary.enums.employeedeclare.DeclareStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.deductionamount.DeductionAmountMapper;
import com.engine.salary.mapper.deductionamount.DeductionAmountRecordMapper;
import com.engine.salary.mapper.employeedeclare.EmployeeDeclareMapper;
import com.engine.salary.remote.tax.client.DeductionAmountClient;
import com.engine.salary.remote.tax.request.deductionAmount.ConfirmPreDeductRequest;
import com.engine.salary.remote.tax.response.deductionAmount.ConfirmFeedbackResponse;
import com.engine.salary.service.DeductionAmountService;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.SalaryPageUtil;
import com.engine.salary.util.valid.ValidUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.math.NumberUtils;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Slf4j
public class DeductionAmountServiceImpl extends Service implements DeductionAmountService {
private DeductionAmountRecordMapper getDeductionAmountRecordMapper() {
return MapperProxyFactory.getProxy(DeductionAmountRecordMapper.class);
}
private DeductionAmountMapper getDeductionAmountMapper() {
return MapperProxyFactory.getProxy(DeductionAmountMapper.class);
}
private EmployeeDeclareMapper getEmployeeDeclareMapper() {
return MapperProxyFactory.getProxy(EmployeeDeclareMapper.class);
}
@Override
public PageInfo<DeductionAmountDTO> list(DeductionAmountListParam param) {
ValidUtil.doValidator(param);
List<DeductionAmountPO> deductionAmountPOS = getDeductionAmountMapper().listSome(DeductionAmountPO.builder().year(param.getYear()).taxAgentId(param.getTaxAgentId()).build());
List<DeductionAmountDTO> list = deductionAmountPOS.stream()
.map(deductionAmountPO -> DeductionAmountDTO.builder()
.id(deductionAmountPO.getId())
.taxAgentId(deductionAmountPO.getEmployeeId())
.year(deductionAmountPO.getYear())
.employeeId(deductionAmountPO.getEmployeeId())
.employeeName(deductionAmountPO.getEmployeeName())
.employeeType(deductionAmountPO.getEmployeeType())
.jobNum(deductionAmountPO.getJobNum())
.nationality(deductionAmountPO.getNationality())
.cardNum(deductionAmountPO.getCardNum())
.cardType(deductionAmountPO.getCardType())
.declareStatus(deductionAmountPO.getDeclareStatus())
.declareStatusName(DeclareStatusEnum.getByValue(deductionAmountPO.getDeclareStatus()).getDefaultLabel())
.declareErrorMsg(deductionAmountPO.getDeclareErrorMsg())
.deductFlag(deductionAmountPO.getDeductFlag())
.successfullyDeclared(deductionAmountPO.getSuccessfullyDeclared())
.creator(deductionAmountPO.getCreator())
.createTime(deductionAmountPO.getCreateTime())
.updateTime(deductionAmountPO.getUpdateTime())
.build())
.collect(Collectors.toList());
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), list, DeductionAmountDTO.class);
}
@Override
public void add(DeductionAmountAddParam param) {
ValidUtil.doValidator(param);
//已存在
List<DeductionAmountPO> deductionAmountPOS = getDeductionAmountMapper().listSome(DeductionAmountPO.builder().taxAgentId(param.getTaxAgentId()).year(param.getYear()).build());
List<Long> oldIds = SalaryEntityUtil.properties(deductionAmountPOS, DeductionAmountPO::getEmployeeId, Collectors.toList());
//本次新增
List<Long> employeeDeclareIds = param.getEmployeeDeclareIds();
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder().ids(employeeDeclareIds).build());
Date now = new Date();
employeeDeclarePOS.stream()
.filter(employeeDeclarePO -> !oldIds.contains(employeeDeclarePO.getEmployeeId()))
.map(employeeDeclarePO -> DeductionAmountPO.builder()
.id(IdGenerator.generate())
.taxAgentId(employeeDeclarePO.getTaxAgentId())
.year(param.getYear())
.employeeId(employeeDeclarePO.getEmployeeId())
.employeeName(employeeDeclarePO.getEmployeeName())
.employeeType(employeeDeclarePO.getEmployeeType())
.jobNum(employeeDeclarePO.getJobNum())
.cardNum(employeeDeclarePO.getCardNum())
.cardType(employeeDeclarePO.getCardType())
.nationality(employeeDeclarePO.getNationality())
.declareStatus(DeclareStatusEnum.NOT_DECLARE.getValue())
.deductFlag(SalaryOnOffEnum.ON.getValue())
.successfullyDeclared(SalaryOnOffEnum.OFF.getValue())
.creator((long) user.getUID())
.createTime(now)
.updateTime(now)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.deleteType(NumberUtils.INTEGER_ZERO)
.build())
.forEach(deductionAmountPO -> getDeductionAmountMapper().insertIgnoreNull(deductionAmountPO));
}
@Override
public void edit(DeductionAmountEditParam param) {
ValidUtil.doValidator(param);
DeductionAmountPO po = getDeductionAmountMapper().getById(param.getId());
if (po == null) {
throw new SalaryRunTimeException("扣除名单不存在");
}
po.setDeductFlag(param.getDeductFlag());
getDeductionAmountMapper().updateIgnoreNull(po);
}
@Override
public void delete(DeductionAmountDeleteParam param) {
if (CollUtil.isEmpty(param.getIds())) {
return;
}
param.getIds().forEach(id -> {
getDeductionAmountMapper().delete(DeductionAmountPO.builder().id(id).build());
});
}
@Override
public Object query(DeductionAmountOnlineQueryParam param) {
Long taxAgentId = param.getTaxAgentId();
DeductionAmountClient deductionAmountClient = new DeductionAmountClient(taxAgentId);
return deductionAmountClient.query(param.getYear());
}
@Override
public String confirm(DeductionAmountConfirmParam param) {
ValidUtil.doValidator(param);
Long taxAgentId = param.getTaxAgentId();
String year = param.getYear();
List<DeductionAmountPO> deductionAmountPOS = getDeductionAmountMapper().listSome(DeductionAmountPO.builder().taxAgentId(taxAgentId).year(year).build());
List<ConfirmPreDeductRequest.kczg> kczglb = deductionAmountPOS.stream()
.map(deductionAmountPO -> {
ConfirmPreDeductRequest.kczg kczg = new ConfirmPreDeductRequest.kczg();
kczg.setXm(deductionAmountPO.getEmployeeName());
kczg.setZzhm(deductionAmountPO.getCardNum());
kczg.setZzlx(CardTypeEnum.getByValue(deductionAmountPO.getCardType()).getDefaultLabel());
kczg.setGj(deductionAmountPO.getNationality());
kczg.setKcbs(SalaryOnOffEnum.parseByValue(deductionAmountPO.getDeductFlag()).getDefaultLabel());
return kczg;
}).collect(Collectors.toList());
DeductionAmountClient deductionAmountClient = new DeductionAmountClient(taxAgentId);
String requestId = deductionAmountClient.confirm(year, kczglb);
//更新状态
deductionAmountPOS.forEach(deductionAmountPO -> {
deductionAmountPO.setDeclareStatus(DeclareStatusEnum.DECLARING.getValue());
getDeductionAmountMapper().updateIgnoreNull(deductionAmountPO);
});
//插入记录
getDeductionAmountRecordMapper().deleteByTaxAgentIdAndYear(taxAgentId, year);
DeductionAmountRecordPO recordPO = DeductionAmountRecordPO.builder()
.id(IdGenerator.generate())
.taxAgentId(taxAgentId)
.year(year)
.requestId(requestId)
.creator((long) user.getUID())
.createTime(new Date())
.updateTime(new Date())
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build();
getDeductionAmountRecordMapper().insertIgnoreNull(recordPO);
return requestId;
}
@Override
public String feedback(DeductionAmountFeedBackParam param) {
Long taxAgentId = param.getTaxAgentId();
String year = param.getYear();
DeductionAmountRecordPO recordPO = getDeductionAmountRecordMapper().getByTaxAgentIdAndYear(taxAgentId, year);
if (recordPO == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(175337, "请先点击报送扣除名单,再点击反馈"));
}
String requestId = recordPO.getRequestId();
DeductionAmountClient deductionAmountClient = new DeductionAmountClient(taxAgentId);
ConfirmFeedbackResponse feedback = deductionAmountClient.feedback(requestId);
if (feedback == null || feedback.getHead() == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(95828, "服务异常,请稍后重试"));
}
// 如果税友返回错误信息
String code = feedback.getHead().getCode();
if (SzyhApiConstant.HANDLING_CODE.equals(code) || SzyhApiConstant.TASK_HANDLING_CODE.equals(code)) {
//进行中的任务重试
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(175337, "任务还在处理中,请稍后点击反馈"));
}
if (!SzyhApiConstant.SUCCESS_CODE.equals(code)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(95828, feedback.getHead().getMsg()));
}
List<DeductionAmountPO> deductionAmountPOS = getDeductionAmountMapper().listSome(DeductionAmountPO.builder().taxAgentId(taxAgentId).year(year).build());
List<ConfirmFeedbackResponse.Body.kcqrsb> kcqrsblb = feedback.getBody().getKcqrsblb();
Map<String, String> failMap = SalaryEntityUtil.convert2Map(kcqrsblb, ConfirmFeedbackResponse.Body.kcqrsb::getZzhm, ConfirmFeedbackResponse.Body.kcqrsb::getSbyy);
deductionAmountPOS.forEach(deductionAmountPO -> {
String cardNum = deductionAmountPO.getCardNum();
if (failMap.containsKey(cardNum)) {
deductionAmountPO.setDeclareStatus(DeclareStatusEnum.DECLARE_FAIL.getValue());
deductionAmountPO.setDeclareErrorMsg(failMap.get(cardNum));
} else {
deductionAmountPO.setDeclareStatus(DeclareStatusEnum.DECLARE_SUCCESS.getValue());
deductionAmountPO.setSuccessfullyDeclared(SalaryOnOffEnum.ON.getValue());
}
getDeductionAmountMapper().updateIgnoreNull(deductionAmountPO);
});
return String.format("成功%s条失败%s条", feedback.getBody().getCgrs(), feedback.getBody().getSbrs());
}
}

View File

@ -706,9 +706,7 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
}
// 更新员工的报送状态
if (CollectionUtils.isNotEmpty(needUpdateEmployeeDeclares)) {
//todo
needUpdateEmployeeDeclares.forEach(getEmployeeDeclareMapper()::updateIgnoreNull);
// updateBatchById(needUpdateEmployeeDeclares);
}
// 删除原来的人员报送记录
getEmployeeDeclareRecordService(user).deleteByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());

View File

@ -1,5 +1,6 @@
package com.engine.salary.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
@ -199,6 +200,7 @@ public class PushServiceImpl extends Service implements PushService {
.fieldName(po.getFieldName())
.fieldType(PushItemFieldEnum.parseByValue(po.getFieldType()))
.fieldTypeName(PushItemFieldEnum.parseByValue(po.getFieldType()).getDefaultLabel())
.sortedIndex(po.getSortedIndex())
.build()
).collect(Collectors.toList());
@ -220,6 +222,7 @@ public class PushServiceImpl extends Service implements PushService {
.source(param.getSource())
.fieldName(param.getFieldName())
.fieldType(param.getFieldType().getValue())
.sortedIndex(param.getSortedIndex())
.creator((long) user.getUID())
.createTime(now)
.updateTime(now)
@ -240,6 +243,7 @@ public class PushServiceImpl extends Service implements PushService {
po.setSource(param.getSource());
po.setFieldName(param.getFieldName());
po.setFieldType(param.getFieldType().getValue());
po.setSortedIndex(param.getSortedIndex());
po.setUpdateTime(now);
getPushSettingItemMapper().update(po);
@ -378,6 +382,12 @@ public class PushServiceImpl extends Service implements PushService {
throw new SalaryRunTimeException("核算记录不存在!");
}
//查询推送配置
List<PushSettingPO> pushSettingPOS = getPushSettingMapper().listSome(PushSettingPO.builder().able(1).build());
if (CollUtil.isEmpty(pushSettingPOS)) {
return;
}
//查询核算人员
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordPO.getId());
@ -417,8 +427,6 @@ public class PushServiceImpl extends Service implements PushService {
KQGroupService kqGroupService = getKQGroupService();
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO, kqGroupService);
List<PushSettingPO> pushSettingPOS = getPushSettingMapper().listSome(PushSettingPO.builder().able(1).build());
//推送记录id
List<Long> recordIds = new ArrayList<>();
@ -495,7 +503,7 @@ public class PushServiceImpl extends Service implements PushService {
.acctEmpId(emp.getId())
.recordId(record.getId())
.status(PushRecordDetailStatusEnum.PREPARE.getValue())
.execute(sql)
.formula(sql)
.createTime(now)
.updateTime(now)
.creator((long) user.getUID())
@ -512,40 +520,43 @@ public class PushServiceImpl extends Service implements PushService {
}
);
} catch (Exception e) {
log.error("推送失败", e);
log.error("创建推送记录失败", e);
removeRecords(recordIds);
throw new SalaryRunTimeException("推送失败");
throw new SalaryRunTimeException("创建推送记录失败");
}
//开始
startBatchPush(recordIds);
recordIds.forEach(this::push);
}
/**
* 启动推送
*
* @param recordIds
*/
private void startBatchPush(List<Long> recordIds) {
@Override
public void withdrawPushRecord(Long salaryAcctRecordId) {
List<PushRecordPO> pushRecordPOS = getPushRecordMapper().listSome(PushRecordPO.builder().acctRecordId(salaryAcctRecordId).status(PushRecordStatusEnum.RUN_SUCCESS.getValue()).build());
if (CollUtil.isEmpty(pushRecordPOS)) {
return;
}
pushRecordPOS.stream().map(PushRecordPO::getId).forEach(this::withdraw);
}
recordIds.forEach(recordId -> {
//待推送
PushRecordPO pushRecordPO = getPushRecordMapper().getById(recordId);
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_WAITING.getValue());
@Override
public void push(Long id) {
//待推送
PushRecordPO pushRecordPO = getPushRecordMapper().getById(id);
try {
pushRecordPO.setStartTime(new Date());
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_PROGRESS.getValue());
getPushRecordMapper().updateIgnoreNull(pushRecordPO);
try {
pushRecordPO.setStartTime(new Date());
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_PROGRESS.getValue());
getPushRecordMapper().updateIgnoreNull(pushRecordPO);
List<PushRecordDetailPO> pushRecordDetailPOS = getPushRecordDetailMapper().listSome(PushRecordDetailPO.builder().recordId(pushRecordPO.getId()).build());
pushRecordDetailPOS.forEach(pushRecordDetailPO -> {
List<PushRecordDetailPO> pushRecordDetailPOS = getPushRecordDetailMapper().listSome(PushRecordDetailPO.builder().recordId(pushRecordPO.getId()).build());
pushRecordDetailPOS.forEach(pushRecordDetailPO -> {
try {
String execute = pushRecordDetailPO.getExecute();
RecordSet rs = new RecordSet();
rs.execute(execute);
try {
String formula = pushRecordDetailPO.getFormula();
RecordSet rs = new RecordSet();
boolean success = rs.execute(formula);
if (success) {
//建模需要权限重构
Integer modeId = pushRecordPO.getModeId();
if (modeId != null) {
@ -558,23 +569,70 @@ public class PushServiceImpl extends Service implements PushService {
ModeRightInfo ModeRightInfo = new ModeRightInfo();
ModeRightInfo.setNewRight(true);
ModeRightInfo.editModeDataShare(1, modeId, mainId);
}
//记录数据id
pushRecordDetailPO.setDataId((long) mainId);
}
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.SUCCESS.getValue());
} catch (Exception e) {
pushRecordDetailPO.setFail_reason(e.getMessage());
} else {
pushRecordDetailPO.setFailReason("sql执行失败");
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.FAIL.getValue());
}
});
} catch (Exception e) {
pushRecordDetailPO.setFailReason(e.getMessage());
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.FAIL.getValue());
}
getPushRecordDetailMapper().updateIgnoreNull(pushRecordDetailPO);
});
pushRecordPO.setEndTime(new Date());
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_SUCCESS.getValue());
} catch (Exception e) {
pushRecordPO.setFail_reason(e.getMessage());
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_FAIL.getValue());
}
pushRecordPO.setEndTime(new Date());
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_SUCCESS.getValue());
} catch (Exception e) {
pushRecordPO.setFailReason(e.getMessage());
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_FAIL.getValue());
}
getPushRecordMapper().updateIgnoreNull(pushRecordPO);
}
@Override
public void withdraw(Long id) {
//待撤回
PushRecordPO pushRecordPO = getPushRecordMapper().getById(id);
try {
pushRecordPO.setStartTime(new Date());
pushRecordPO.setStatus(PushRecordStatusEnum.WITHDRAW.getValue());
getPushRecordMapper().updateIgnoreNull(pushRecordPO);
});
PushSettingPO pushSettingPO = getPushSettingMapper().getById(pushRecordPO.getSettingId());
String tableName = pushSettingPO.getTableName();
List<PushRecordDetailPO> pushRecordDetailPOS = getPushRecordDetailMapper().listSome(PushRecordDetailPO.builder().recordId(pushRecordPO.getId()).build());
pushRecordDetailPOS.forEach(pushRecordDetailPO -> {
try {
RecordSet rs = new RecordSet();
String sql = String.format("delete from %s where id = %s", tableName, pushRecordDetailPO.getDataId());
boolean execute = rs.execute(sql);
if (execute) {
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.WITHDRAW_SUCCESS.getValue());
} else {
pushRecordDetailPO.setFailReason("sql执行失败");
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.WITHDRAW_FAIL.getValue());
}
} catch (Exception e) {
pushRecordDetailPO.setFailReason(e.getMessage());
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.WITHDRAW_FAIL.getValue());
}
getPushRecordDetailMapper().updateIgnoreNull(pushRecordDetailPO);
});
pushRecordPO.setEndTime(new Date());
pushRecordPO.setStatus(PushRecordStatusEnum.WITHDRAW_SUCCESS.getValue());
} catch (Exception e) {
pushRecordPO.setFailReason(e.getMessage());
pushRecordPO.setStatus(PushRecordStatusEnum.WITHDRAW_FAIL.getValue());
}
getPushRecordMapper().updateIgnoreNull(pushRecordPO);
}
@ -604,6 +662,7 @@ public class PushServiceImpl extends Service implements PushService {
.acctRecordId(po.getAcctRecordId())
.type(po.getType())
.status(po.getStatus())
.statusName(PushRecordStatusEnum.parseByValue(po.getStatus()).getDefaultLabel())
.startTime(po.getStartTime())
.endTime(po.getEndTime())
.build())
@ -618,22 +677,13 @@ public class PushServiceImpl extends Service implements PushService {
public PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param) {
ValidUtil.doValidator(param);
List<PushRecordDetailPO> pushRecordDetailPOS = getPushRecordDetailMapper().listSome(PushRecordDetailPO.builder().recordId(param.getRecordId()).build());
List<PushRecordDetailDTO> listDTOS = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), pushRecordDetailPOS)
.stream()
.map(po -> PushRecordDetailDTO.builder()
.id(po.getId())
.recordId(po.getRecordId())
.acctEmpId(po.getAcctEmpId())
.status(po.getStatus())
.fail_reason(po.getFail_reason())
.execute(po.getExecute())
.createTime(po.getCreateTime())
.creator(po.getCreator())
.build())
.collect(Collectors.toList());
PageInfo<PushRecordDetailDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PushRecordDetailDTO.class);
pageInfo.setTotal(pushRecordDetailPOS.size());
List<PushRecordDetailDTO> list = getPushRecordDetailMapper().listDTO(PushRecordDetailDTO.builder().recordId(param.getRecordId()).build());
List<PushRecordDetailDTO> listDTOS = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), list);
listDTOS.forEach(dto -> dto.setStatusName(PushRecordDetailStatusEnum.parseByValue(dto.getStatus()).getDefaultLabel()));
PageInfo<PushRecordDetailDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), PushRecordDetailDTO.class);
pageInfo.setList(listDTOS);
pageInfo.setTotal(list.size());
return pageInfo;
}
}

View File

@ -709,8 +709,8 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
getSalaryStatisticsReportService(user).removeReportCache();
//获取推送配置
// getPushService(user).initPushConfig(salaryAcctRecordId);
//开始推送数据
getPushService(user).createPushRecord(salaryAcctRecordId);
// 记录日志
@ -736,6 +736,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
// 重新核算
reCalcOrBackCalc(salaryAcctRecordPO, true);
//开始推送数据
getPushService(user).withdrawPushRecord(salaryAcctRecordId);
// // 查询税款所在年的该个税扣缴义务人所有薪资核算记录
// // 获取账套所属个税扣缴义务人的核算记录

View File

@ -243,7 +243,7 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
.replace("{1}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
}
// 查询薪资所属月的薪资核算记录
salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).build());
salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).taxAgentId(taxAgentId).build());
// 无薪资核算记录不允许生成个税申报表
if (CollectionUtils.isEmpty(salaryAcctRecordPOS)) {

View File

@ -0,0 +1,94 @@
package com.engine.salary.web;
import com.engine.common.util.ServiceUtil;
import com.engine.salary.component.PageInfo;
import com.engine.salary.entity.deductionamount.dto.DeductionAmountDTO;
import com.engine.salary.entity.deductionamount.param.*;
import com.engine.salary.util.ResponseResult;
import com.engine.salary.wrapper.DeductionAmountWrapper;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import lombok.extern.slf4j.Slf4j;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
/**
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Slf4j
public class DeductionAmountController {
private DeductionAmountWrapper getDeductionAmountWrapper(User user) {
return ServiceUtil.getService(DeductionAmountWrapper.class, user);
}
@POST
@Path("/list")
@Produces(MediaType.APPLICATION_JSON)
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountListParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountListParam, PageInfo<DeductionAmountDTO>>(user).run(getDeductionAmountWrapper(user)::list, param);
}
@POST
@Path("/add")
@Produces(MediaType.APPLICATION_JSON)
public String add(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountAddParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountAddParam, Object>(user).run(getDeductionAmountWrapper(user)::add, param);
}
@POST
@Path("/edit")
@Produces(MediaType.APPLICATION_JSON)
public String edit(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountEditParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountEditParam, Object>(user).run(getDeductionAmountWrapper(user)::edit, param);
}
@POST
@Path("/delete")
@Produces(MediaType.APPLICATION_JSON)
public String delete(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountDeleteParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountDeleteParam, Object>(user).run(getDeductionAmountWrapper(user)::delete, param);
}
@POST
@Path("/query")
@Produces(MediaType.APPLICATION_JSON)
public String query(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountOnlineQueryParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountOnlineQueryParam, Object>(user).run(getDeductionAmountWrapper(user)::query, param);
}
@POST
@Path("/confirm")
@Produces(MediaType.APPLICATION_JSON)
public String confirm(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountConfirmParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountConfirmParam, String>(user).run(getDeductionAmountWrapper(user)::confirm, param);
}
@POST
@Path("/feedback")
@Produces(MediaType.APPLICATION_JSON)
public String feedback(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeductionAmountFeedBackParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<DeductionAmountFeedBackParam, String>(user).run(getDeductionAmountWrapper(user)::feedback, param);
}
}

View File

@ -92,14 +92,6 @@ public class PushController {
return new ResponseResult<Long, String>(user).run(getPushWrapper(user)::deleteItem, id);
}
@POST
@Path("/push")
@Produces(MediaType.APPLICATION_JSON)
public String push(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PushParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<PushParam, String>(user).run(getPushWrapper(user)::push, param);
}
@POST
@Path("/record/list")
@Produces(MediaType.APPLICATION_JSON)
@ -115,4 +107,20 @@ public class PushController {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<RecordDetailListQueryParam, PageInfo<PushRecordDetailDTO>>(user).run(getPushWrapper(user)::recordDetailList, param);
}
@POST
@Path("/record/create")
@Produces(MediaType.APPLICATION_JSON)
public String createPushRecord(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody CreatePushParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<CreatePushParam, String>(user).run(getPushWrapper(user)::createPushRecord, param);
}
@POST
@Path("/record/push")
@Produces(MediaType.APPLICATION_JSON)
public String push(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PushParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<PushParam, String>(user).run(getPushWrapper(user)::push, param);
}
}

View File

@ -0,0 +1,55 @@
package com.engine.salary.wrapper;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.component.PageInfo;
import com.engine.salary.entity.deductionamount.dto.DeductionAmountDTO;
import com.engine.salary.entity.deductionamount.param.*;
import com.engine.salary.service.DeductionAmountService;
import com.engine.salary.service.impl.DeductionAmountServiceImpl;
import lombok.extern.slf4j.Slf4j;
import weaver.hrm.User;
/**
* 年收入不足6万元的纳税人暂不预扣预缴税款扣除名单
* <p>Copyright: Copyright (c) 2023</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Slf4j
public class DeductionAmountWrapper extends Service {
private DeductionAmountService getDeductionAmountService(User user) {
return ServiceUtil.getService(DeductionAmountServiceImpl.class, user);
}
public PageInfo<DeductionAmountDTO> list(DeductionAmountListParam param) {
return getDeductionAmountService(user).list(param);
}
public void add(DeductionAmountAddParam param) {
getDeductionAmountService(user).add(param);
}
public void edit(DeductionAmountEditParam param) {
getDeductionAmountService(user).edit(param);
}
public void delete(DeductionAmountDeleteParam param) {
getDeductionAmountService(user).delete(param);
}
public Object query(DeductionAmountOnlineQueryParam param) {
return getDeductionAmountService(user).query(param);
}
public String confirm(DeductionAmountConfirmParam param) {
return getDeductionAmountService(user).confirm(param);
}
public String feedback(DeductionAmountFeedBackParam param) {
return getDeductionAmountService(user).feedback(param);
}
}

View File

@ -35,6 +35,7 @@ public class PushWrapper extends Service {
return execute;
}
public PageInfo<PushSettingDTO> settingList(PushSettingQueryParam param) {
return getPushService(user).settingList(param);
}
@ -60,14 +61,20 @@ public class PushWrapper extends Service {
getPushService(user).deleteItem(id);
}
public void push(PushParam pushParam) {
// getPushService(user).pushOneRecord(pushParam.getSalaryAcctRecordId());
getPushService(user).createPushRecord(pushParam.getSalaryAcctRecordId());
public void createPushRecord(CreatePushParam param) {
param.getSalaryAcctRecordIds().forEach(id -> {
getPushService(user).createPushRecord(id);
});
}
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
public void push(PushParam pushParam) {
getPushService(user).push(pushParam.getId());
}
return getPushService(user).recordList(param);
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
return getPushService(user).recordList(param);
}
public PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param) {

View File

@ -7,9 +7,9 @@ import java.util.List;
public class ParseTaxApi {
public static void main(String[] args) {
// readExcel("H:\\code\\salary\\test\\ApiDes.xlsx");
readExcel("H:\\code\\salary\\test\\ApiDes.xlsx");
readExcel2("H:\\code\\salary\\test\\ApiDes.xlsx");
// readExcel2("H:\\code\\salary\\test\\ApiDes.xlsx");
}