Merge branch 'release/3.0.2.2504.01'
This commit is contained in:
commit
adda52f7b9
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=3.0.0.2503.01
|
||||
version=3.0.2.2504.01
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
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,34 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
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,34 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
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,39 @@
|
|||
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
|
||||
);
|
||||
|
||||
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,34 @@
|
|||
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)
|
||||
)
|
||||
/
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
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)
|
||||
)
|
||||
/
|
||||
|
||||
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,34 @@
|
|||
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)
|
||||
);
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
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)
|
||||
);
|
||||
|
||||
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,36 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
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
|
||||
|
||||
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,34 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
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)
|
||||
);
|
||||
/
|
||||
|
||||
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);
|
||||
/
|
||||
|
||||
|
|
@ -7,6 +7,8 @@ import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO;
|
|||
import com.engine.salary.mapper.salarybill.SalarySendRangeObjMapper;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
|
@ -23,6 +25,10 @@ public class SalarySendRangeObjBiz {
|
|||
return ServiceUtil.getService(TaxAgentServiceImpl.class);
|
||||
}
|
||||
|
||||
private SalarySendRangeObjMapper getSalarySendRangeObjMapper() {
|
||||
return MapperProxyFactory.getProxy(SalarySendRangeObjMapper.class);
|
||||
}
|
||||
|
||||
public <R> R applyMapper(Function<SalarySendRangeObjMapper, R> mapper) {
|
||||
try (SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession()) {
|
||||
final SalarySendRangeObjMapper salarySendRangeObjMapper = sqlSession.getMapper(SalarySendRangeObjMapper.class);
|
||||
|
|
@ -41,7 +47,13 @@ public class SalarySendRangeObjBiz {
|
|||
}
|
||||
|
||||
public List<SalarySendUserInfoDTO> getSalarySendUserInfoDTOs(List<Long> employees) {
|
||||
List<SalarySendUserInfoDTO> userDTOs = applyMapper(mapper -> mapper.getUserInfoByEmployeeIds(employees));
|
||||
List<SalarySendUserInfoDTO> userDTOs = new ArrayList<>();
|
||||
List<List<Long>> partition = Lists.partition(employees, 500);
|
||||
partition.forEach(l->{
|
||||
List<SalarySendUserInfoDTO> userInfos = getSalarySendRangeObjMapper().getUserInfoByEmployeeIds(l);
|
||||
userDTOs.addAll(userInfos);
|
||||
});
|
||||
|
||||
Map<Long, SalarySendUserInfoDTO> userMap = userDTOs.stream()
|
||||
.collect(Collectors.toMap(SalarySendUserInfoDTO::getResourceId, Function.identity()));
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
package com.engine.salary.entity.extemp.dto;
|
||||
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 外部人员
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_external_employee
|
||||
@ElogTransform( name = "非系统人员")
|
||||
public class ExtEmpDTO {
|
||||
|
||||
@ElogTransform(name = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName")
|
||||
private String departmentName;
|
||||
|
||||
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
@TableTitle(title = "分部", dataIndex = "subcompanyName", key = "subcompanyName")
|
||||
private String subcompanyName;
|
||||
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
@TableTitle(title = "入职日期", dataIndex = "companystartdate", key = "companystartdate")
|
||||
private String companystartdate;
|
||||
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
|
||||
private String workcode;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import lombok.Builder;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
|
|
@ -13,7 +15,6 @@ import lombok.NoArgsConstructor;
|
|||
public class PushParam {
|
||||
|
||||
|
||||
private Long salaryAcctRecordId;
|
||||
|
||||
private List<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -59,6 +59,11 @@ public class PushSettingItemSaveParam {
|
|||
@DataCheck(require = true, message = "字段类型为空")
|
||||
private PushItemFieldEnum fieldType;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sortedIndex;
|
||||
|
||||
|
||||
//主键id集合
|
||||
private Collection<Long> ids;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.engine.salary.entity.push.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WithdrawParam {
|
||||
|
||||
|
||||
private List<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -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 WithdrawPushParam {
|
||||
|
||||
|
||||
private List<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,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;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资核算列表查询参数
|
||||
|
|
@ -31,6 +32,11 @@ public class SalaryAcctRecordQueryParam extends BaseQueryParam {
|
|||
//账套名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 扣缴义务人id集合
|
||||
*/
|
||||
private List<Long> taxAgentIds;
|
||||
|
||||
private String startMonthStr;
|
||||
private String endMonthStr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -22,6 +23,8 @@ public interface PushRecordDetailMapper {
|
|||
*/
|
||||
List<PushRecordDetailPO> listSome(PushRecordDetailPO pushRecordDetail);
|
||||
|
||||
List<PushRecordDetailDTO> listDTO(PushRecordDetailDTO dto);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||
|
|
@ -17,7 +18,7 @@ public interface ExtEmpService {
|
|||
|
||||
List<ExtEmpPO> list(ExtEmpQueryParam param);
|
||||
|
||||
PageInfo<ExtEmpPO> listPage (ExtEmpQueryParam param);
|
||||
PageInfo<ExtEmpDTO> listPage (ExtEmpQueryParam param);
|
||||
|
||||
void save(ExtEmpSaveParam po);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||
|
|
@ -78,9 +79,21 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<ExtEmpPO> listPage(ExtEmpQueryParam param) {
|
||||
public PageInfo<ExtEmpDTO> listPage(ExtEmpQueryParam param) {
|
||||
List<ExtEmpPO> extEmpPOS = list(param);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), extEmpPOS, ExtEmpPO.class);
|
||||
|
||||
List<ExtEmpDTO> list = extEmpPOS.stream().map(po -> {
|
||||
return ExtEmpDTO.builder()
|
||||
.id(po.getId())
|
||||
.username(po.getUsername())
|
||||
.departmentName(po.getDepartmentName())
|
||||
.subcompanyName(po.getSubcompanyName())
|
||||
.companystartdate(po.getCompanystartdate())
|
||||
.workcode(po.getWorkcode())
|
||||
.build();
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), list, ExtEmpDTO.class);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<>();
|
||||
|
||||
|
|
@ -484,7 +378,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())
|
||||
|
|
@ -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 -> {
|
||||
@Override
|
||||
public void push(Long id) {
|
||||
//待推送
|
||||
PushRecordPO pushRecordPO = getPushRecordMapper().getById(recordId);
|
||||
pushRecordPO.setStatus(PushRecordStatusEnum.RUN_WAITING.getValue());
|
||||
getPushRecordMapper().updateIgnoreNull(pushRecordPO);
|
||||
PushRecordPO pushRecordPO = getPushRecordMapper().getById(id);
|
||||
|
||||
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 -> {
|
||||
|
||||
try {
|
||||
String execute = pushRecordDetailPO.getExecute();
|
||||
String formula = pushRecordDetailPO.getFormula();
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.execute(execute);
|
||||
boolean success = rs.execute(formula);
|
||||
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.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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
|
|
@ -187,6 +188,21 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
Set<Long> salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId);
|
||||
po.setSalarySobIds(salarySobIds);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(queryParam.getTaxAgentIds())) {
|
||||
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByTaxAgentIds(queryParam.getTaxAgentIds());
|
||||
if (CollectionUtils.isEmpty(salarySobPOS)) {
|
||||
return page;
|
||||
}
|
||||
Set<Long> salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId);
|
||||
|
||||
Collection<Long> existIds = po.getSalarySobIds();
|
||||
if (CollectionUtils.isNotEmpty(existIds)) {
|
||||
existIds = SalaryEntityUtil.intersectionForList(existIds, salarySobIds);
|
||||
po.setSalarySobIds(existIds);
|
||||
} else {
|
||||
po.setSalarySobIds(salarySobIds);
|
||||
}
|
||||
}
|
||||
LocalDateRange localDateRange = new LocalDateRange();
|
||||
if (Objects.nonNull(queryParam.getStartMonth())) {
|
||||
localDateRange.setFromDate(SalaryDateUtil.localDateToDate(queryParam.getStartMonth().atDay(1)));
|
||||
|
|
@ -543,8 +559,8 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
getSalaryStatisticsReportService(user).removeReportCache();
|
||||
|
||||
|
||||
//获取推送配置
|
||||
// getPushService(user).initPushConfig(salaryAcctRecordId);
|
||||
//开始推送数据
|
||||
getPushService(user).createPushRecord(salaryAcctRecordId);
|
||||
|
||||
|
||||
// 记录日志
|
||||
|
|
@ -570,6 +586,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
// 重新核算
|
||||
reCalcOrBackCalc(salaryAcctRecordPO, true);
|
||||
|
||||
//开始推送数据
|
||||
getPushService(user).withdrawPushRecord(salaryAcctRecordId);
|
||||
|
||||
|
||||
// // 查询税款所在年的该个税扣缴义务人所有薪资核算记录
|
||||
// // 获取账套所属个税扣缴义务人的核算记录
|
||||
|
|
@ -801,6 +820,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
|
||||
@Override
|
||||
public void updateDate(Long id, Date updateTime) {
|
||||
getSalaryAcctRecordMapper().updateDate(id,updateTime);
|
||||
getSalaryAcctRecordMapper().updateDate(id, updateTime);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1357,7 +1357,12 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
if (CollectionUtils.isEmpty(employeeIds)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return getSalaryArchiveMapper().listPayEndDateIsNull(employeeIds);
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, 500);
|
||||
List<SalaryArchivePO> resultList = new ArrayList<>();
|
||||
partition.forEach(part -> {
|
||||
resultList.addAll(getSalaryArchiveMapper().listPayEndDateIsNull(part));
|
||||
});
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -166,16 +166,6 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
&& Optional.ofNullable(salaryBillProgress.getProgress()).orElse(BigDecimal.ZERO).compareTo(BigDecimal.ONE) < 0) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(136104, "有其他人员正在发送中,请等待其他人员发送结束后再操作"));
|
||||
}
|
||||
// 初始化进度
|
||||
ProgressDTO initProgress = ProgressDTO.builder()
|
||||
.title(SalaryI18nUtil.getI18nLabel(136097, "发送中"))
|
||||
.totalQuantity(NumberUtils.INTEGER_ZERO)
|
||||
.calculatedQuantity(NumberUtils.INTEGER_ZERO)
|
||||
.progress(BigDecimal.ZERO)
|
||||
.status(true)
|
||||
.message("")
|
||||
.build();
|
||||
getProgressService(user).initProgress(SalaryCacheKey.SALARY_GRANT_PROGRESS + "_" + salarySend.getId(), initProgress);
|
||||
|
||||
List<Long> ids = param.getIds();
|
||||
|
||||
|
|
@ -187,6 +177,17 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
throw new SalaryRunTimeException("工资发放范围内没有匹配员工");
|
||||
}
|
||||
}
|
||||
// 初始化进度
|
||||
ProgressDTO initProgress = ProgressDTO.builder()
|
||||
.title(SalaryI18nUtil.getI18nLabel(136097, "发送中"))
|
||||
.totalQuantity(NumberUtils.INTEGER_ZERO)
|
||||
.calculatedQuantity(NumberUtils.INTEGER_ZERO)
|
||||
.progress(BigDecimal.ZERO)
|
||||
.status(true)
|
||||
.message("")
|
||||
.build();
|
||||
getProgressService(user).initProgress(SalaryCacheKey.SALARY_GRANT_PROGRESS + "_" + salarySend.getId(), initProgress);
|
||||
|
||||
// 异步执行
|
||||
List<Long> finalIds = ids;
|
||||
LocalRunnable localRunnable = new LocalRunnable() {
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
}
|
||||
if (queryParam.getTaxAgentId() != null) {
|
||||
List<SobTaxLinkPO> sobTaxLinkPOS = getSobTaxLinkMapper().listSome(SobTaxLinkPO.builder().taxAgentId(queryParam.getTaxAgentId()).build());
|
||||
build.setIds(sobTaxLinkPOS.stream().map(SobTaxLinkPO::getTaxAgentId).collect(Collectors.toList()));
|
||||
build.setIds(sobTaxLinkPOS.stream().map(SobTaxLinkPO::getSobId).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
List<SalarySobPO> list = getSalarySobMapper().listSome(build);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,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)) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||
|
|
@ -48,7 +49,7 @@ public class ExtEmpController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExtEmpQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<ExtEmpQueryParam, PageInfo<ExtEmpPO>>(user).run(getExtEmpWrapper(user)::listPage, param);
|
||||
return new ResponseResult<ExtEmpQueryParam, PageInfo<ExtEmpDTO>>(user).run(getExtEmpWrapper(user)::listPage, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
|
|
|
|||
|
|
@ -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,28 @@ 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);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/record/withdraw")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String push(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody WithdrawParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<WithdrawParam, String>(user).run(getPushWrapper(user)::withdraw, param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.extemp.dto.ExtEmpDTO;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpImportParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
|
||||
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
|
||||
|
|
@ -30,7 +31,7 @@ public class ExtEmpWrapper extends Service {
|
|||
}
|
||||
|
||||
|
||||
public PageInfo<ExtEmpPO> listPage(ExtEmpQueryParam param) {
|
||||
public PageInfo<ExtEmpDTO> listPage(ExtEmpQueryParam param) {
|
||||
return getExtEmpService(user).listPage(param);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDTO;
|
||||
|
|
@ -16,6 +17,7 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
|
@ -35,6 +37,7 @@ public class PushWrapper extends Service {
|
|||
|
||||
return execute;
|
||||
}
|
||||
|
||||
public PageInfo<PushSettingDTO> settingList(PushSettingQueryParam param) {
|
||||
return getPushService(user).settingList(param);
|
||||
}
|
||||
|
|
@ -60,13 +63,34 @@ 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 param) {
|
||||
List<Long> ids = param.getIds();
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
ids.forEach(id -> {
|
||||
getPushService(user).push(id);
|
||||
});
|
||||
}
|
||||
|
||||
public void withdraw(WithdrawParam param) {
|
||||
List<Long> ids = param.getIds();
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
ids.forEach(id -> {
|
||||
getPushService(user).withdraw(id);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
|
||||
return getPushService(user).recordList(param);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue