Merge branch 'release/3.0.2.2504.01' into release/个税&业务线
This commit is contained in:
commit
47ba860cc6
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=3.0.0.2503.01
|
||||
version=3.0.1.2503.01
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -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),
|
||||
execute CLOB,
|
||||
execute_time date,
|
||||
status number,
|
||||
creator NUMBER(38,0),
|
||||
create_time date,
|
||||
update_time date,
|
||||
delete_type number,
|
||||
tenant_key varchar2(10)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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),
|
||||
execute CLOB,
|
||||
execute_time date,
|
||||
status number,
|
||||
creator NUMBER(38,0),
|
||||
create_time date,
|
||||
update_time date,
|
||||
delete_type number,
|
||||
tenant_key varchar2(10)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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),
|
||||
execute CLOB,
|
||||
execute_time date,
|
||||
status number,
|
||||
creator NUMBER(38,0),
|
||||
create_time date,
|
||||
update_time date,
|
||||
delete_type number,
|
||||
tenant_key varchar2(10)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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),
|
||||
execute 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
|
||||
);
|
||||
|
|
@ -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) ;
|
||||
|
|
@ -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);
|
||||
|
|
@ -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),
|
||||
execute CLOB,
|
||||
execute_time date,
|
||||
status number,
|
||||
creator NUMBER(38,0),
|
||||
create_time date,
|
||||
update_time date,
|
||||
delete_type number,
|
||||
tenant_key varchar2(10)
|
||||
)
|
||||
/
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
|
@ -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,
|
||||
execute text,
|
||||
execute_time timestamp,
|
||||
status int,
|
||||
creator bigint,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
delete_type int,
|
||||
tenant_key varchar(10),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
|
@ -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) ;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
alter table hrsa_push_setting_item add sorted_index int ;
|
||||
|
||||
alter table hrsa_push_record_detail add data_id bigint ;
|
||||
|
|
@ -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,
|
||||
execute 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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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),
|
||||
execute CLOB,
|
||||
execute_time date,
|
||||
status number,
|
||||
creator NUMBER(38,0),
|
||||
create_time date,
|
||||
update_time date,
|
||||
delete_type number,
|
||||
tenant_key varchar2(10)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -13,6 +13,8 @@ import lombok.NoArgsConstructor;
|
|||
public class PushParam {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long salaryAcctRecordId;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ public class PushSettingItemSaveParam {
|
|||
@DataCheck(require = true, message = "字段类型为空")
|
||||
private PushItemFieldEnum fieldType;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sortedIndex;
|
||||
|
||||
|
||||
//主键id集合
|
||||
private Collection<Long> ids;
|
||||
|
|
|
|||
|
|
@ -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,7 +50,7 @@ public class PushRecordDetailPO {
|
|||
* 失败原因
|
||||
*/
|
||||
@ElogTransform(name = "失败原因")
|
||||
private String fail_reason;
|
||||
private String failReason;
|
||||
|
||||
/**
|
||||
* 执行sql
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class PushRecordPO {
|
|||
* 失败原因
|
||||
*/
|
||||
@ElogTransform(name = "失败原因")
|
||||
private String fail_reason;
|
||||
private String failReason;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
|
|
|
|||
|
|
@ -62,6 +62,10 @@ public class PushSettingItemPO {
|
|||
@ElogTransform(name = "字段类型")
|
||||
private Integer fieldType;
|
||||
|
||||
|
||||
@ElogTransform(name = "排序")
|
||||
private Integer sortedIndex;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
<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>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -28,6 +30,8 @@
|
|||
, t.status
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
, t.fail_reason
|
||||
, t.data_id
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
|
|
@ -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.execute
|
||||
, 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>
|
||||
|
||||
|
|
@ -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">
|
||||
|
|
@ -159,6 +217,12 @@
|
|||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="failReason != null">
|
||||
#{failReason},
|
||||
</if>
|
||||
<if test="dataId != null">
|
||||
#{dataId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -175,6 +239,8 @@
|
|||
status=#{status},
|
||||
tenant_key=#{tenantKey},
|
||||
update_time=#{updateTime},
|
||||
fail_reason=#{failReason},
|
||||
data_id=#{dataId},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -190,6 +191,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());
|
||||
|
||||
|
|
@ -211,6 +213,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)
|
||||
|
|
@ -231,6 +234,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);
|
||||
|
|
@ -245,120 +249,6 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
getPushSettingItemMapper().delete(PushSettingItemPO.builder().id(id).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pushOneRecord(Long salaryAcctRecordId) {
|
||||
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salaryAcctRecordId);
|
||||
|
||||
if (salaryAcctRecordPO == null) {
|
||||
throw new SalaryRunTimeException("核算记录不存在!");
|
||||
}
|
||||
|
||||
//查询核算人员
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordPO.getId());
|
||||
|
||||
//薪资项目
|
||||
List<SalaryItemPO> salaryItemPOS = getSalaryItemService(user).listAll();
|
||||
//查询薪资核算记录的薪资周期、考勤周期等
|
||||
SalarySobCycleDTO salarySobCycleDTO = getSalaryAcctRecordService(user).getSalarySobCycleById(salaryAcctRecordPO.getId());
|
||||
|
||||
SalaryAcctCalculateBO salaryAcctCalculateBO = new SalaryAcctCalculateBO()
|
||||
.setSalaryAcctRecordPO(salaryAcctRecordPO)
|
||||
.setSalarySobPO(new SalarySobPO())
|
||||
.setSalarySobCycleDTO(salarySobCycleDTO)
|
||||
.setOtherSalaryAcctRecordPOS(new ArrayList<>())
|
||||
.setSalarySobItemPOS(new ArrayList<>())
|
||||
.setSalaryItemIdWithPriorityList(new ArrayList<>())
|
||||
.setExpressFormulas(new ArrayList<>())
|
||||
.setSalaryItemPOS(salaryItemPOS)
|
||||
.setSalarySobAdjustRulePOS(new ArrayList<>())
|
||||
.setWelfareColumns(new HashMap<>())
|
||||
.setAttendQuoteFieldListDTOS(new ArrayList<>())
|
||||
.setSalaryAcctEmployeePOS(salaryAcctEmployeePOS)
|
||||
.setIssuedFieldIds(new HashSet<>())
|
||||
.setChildMonitor(null)
|
||||
.setResults(null)
|
||||
.setCalculateKey(null)
|
||||
.setVariableItems(new ArrayList<>())
|
||||
.setTaxDeclarationFunction(TaxDeclarationFunctionEnum.OPEN);
|
||||
|
||||
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
|
||||
List<Long> salaryAcctEmployeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getId, Collectors.toList());
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
|
||||
|
||||
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), salaryAcctResultPOS, new ArrayList<>(),new ArrayList<>());
|
||||
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO);
|
||||
|
||||
|
||||
List<PushSettingPO> pushSettingPOS = getPushSettingMapper().listSome(PushSettingPO.builder().able(1).build());
|
||||
pushSettingPOS.stream()
|
||||
.filter(po -> po.getSalarySobIds().contains(salaryAcctRecordPO.getSalarySobId()))
|
||||
.forEach(setting -> {
|
||||
|
||||
Long id = setting.getId();
|
||||
List<PushSettingItemPO> pushSettingItemPOS = getPushSettingItemMapper().listSome(PushSettingItemPO.builder().settingId(id).build());
|
||||
|
||||
|
||||
//每个人插入一条
|
||||
for (SalaryAcctEmployeePO emp : salaryAcctEmployeePOS) {
|
||||
//1 获取当前薪资核算人员的公式中的变量的值
|
||||
List<CalculateFormulaVarBO.FormulaVarValue> formulaVarValues = formulaVarMap.get(emp.getEmployeeId() + "_" + emp.getTaxAgentId());
|
||||
//2 人员信息
|
||||
List<CalculateFormulaVarBO.FormulaVarValue> empInfo = formulaVarMap.get(emp.getEmployeeId() + "");
|
||||
formulaVarValues.addAll(empInfo);
|
||||
Map<String, String> formulaVarValueMap = SalaryEntityUtil.convert2Map(formulaVarValues, CalculateFormulaVarBO.FormulaVarValue::getFieldId, CalculateFormulaVarBO.FormulaVarValue::getFieldValue);
|
||||
|
||||
Integer modeId = setting.getModeId();
|
||||
|
||||
List<String> fields = new ArrayList<String>() {{
|
||||
add("formmodeid");
|
||||
add("modedatacreater");
|
||||
add("modedatacreatertype");
|
||||
add("modedatacreatedate");
|
||||
add("modedatacreatetime");
|
||||
}};
|
||||
String currDate = TimeUtil.getCurrentDateString();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||
String currTime = sdf.format(new Date());
|
||||
List<Object> values = new ArrayList<Object>() {{
|
||||
add(modeId);
|
||||
add(1);
|
||||
add(0);
|
||||
add(String.format("'%s'", currDate));
|
||||
add(String.format("'%s'", currTime));
|
||||
}};
|
||||
for (PushSettingItemPO item : pushSettingItemPOS) {
|
||||
//数据库字段
|
||||
String fieldName = item.getFieldName();
|
||||
fields.add(fieldName);
|
||||
// 公式变量的值
|
||||
String field = item.getItem();
|
||||
String value = formulaVarValueMap.getOrDefault(field, StringUtils.EMPTY);
|
||||
PushItemFieldEnum pushItemFieldEnum = PushItemFieldEnum.parseByValue(item.getFieldType());
|
||||
values.add(pushItemFieldEnum.convertValue(value));
|
||||
}
|
||||
String tableName = setting.getTableName();
|
||||
String sql = String.format("insert into %s (%s) values (%s)", tableName, String.join(",", fields), values.stream().map(Object::toString).collect(Collectors.joining(",")));
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.execute(sql);
|
||||
|
||||
if (modeId != null) {
|
||||
rs.executeQuery("select max(id) from " + tableName);
|
||||
int mainId = 0;
|
||||
if (rs.next()) {
|
||||
mainId = rs.getInt(1);
|
||||
}
|
||||
ModeRightInfo ModeRightInfo = new ModeRightInfo();
|
||||
ModeRightInfo.setNewRight(true);
|
||||
ModeRightInfo.editModeDataShare(1, modeId, mainId);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createPushRecord(Long salaryAcctRecordId) {
|
||||
Date now = new Date();
|
||||
|
|
@ -368,6 +258,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());
|
||||
|
||||
|
|
@ -406,8 +302,6 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), salaryAcctResultPOS, new ArrayList<>(), new ArrayList<>());
|
||||
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO);
|
||||
|
||||
List<PushSettingPO> pushSettingPOS = getPushSettingMapper().listSome(PushSettingPO.builder().able(1).build());
|
||||
|
||||
//推送记录id
|
||||
List<Long> recordIds = new ArrayList<>();
|
||||
|
||||
|
|
@ -501,40 +395,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 execute = pushRecordDetailPO.getExecute();
|
||||
RecordSet rs = new RecordSet();
|
||||
boolean success = rs.execute(execute);
|
||||
if (success) {
|
||||
//建模需要权限重构
|
||||
Integer modeId = pushRecordPO.getModeId();
|
||||
if (modeId != null) {
|
||||
|
|
@ -547,23 +444,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);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -593,6 +537,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())
|
||||
|
|
@ -607,22 +552,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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
||||
// // 查询税款所在年的该个税扣缴义务人所有薪资核算记录
|
||||
// // 获取账套所属个税扣缴义务人的核算记录
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue