Merge remote-tracking branch 'origin/release/个税版本' into release/个税版本

This commit is contained in:
Harryxzy 2024-03-08 09:26:57 +08:00
commit d890ab5a84
15 changed files with 46 additions and 590 deletions

View File

@ -157,77 +157,6 @@ alter table hrsa_salary_stats_dim modify dim_type varchar2(30);
alter table hrsa_salary_stats_report modify income_category_setting varchar2(1000);
/
create table hrsa_statreportlogs_detail
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
mainid varchar2(36) not null,
dataid varchar2(50) not null,
belongdataid varchar2(50) not null,
tablename varchar2(200) not null,
tablenamelabelid varchar2(50) default '-1' not null,
tablenamedesc varchar2(50) not null,
fieldname varchar2(200) not null,
fieldnamelabelid varchar2(50) default '-1' not null,
newvalue clob not null,
oldvalue clob not null,
newrealvalue clob not null,
oldrealvalue clob not null,
fielddesc varchar2(200) not null,
showorder int not null,
isdetail int default 0 not null
);
/
create table hrsa_statreportlogs
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
log_date date not null,
device varchar2(500) not null,
log_operator number not null,
operatorname varchar2(100),
targetid number default '-1' not null,
targetname clob not null,
modulename varchar2(100) not null,
functionname varchar2(100) not null,
interfacename varchar2(100) not null,
requesturl varchar2(200) not null,
requesturi varchar2(200) not null,
operatetype varchar2(50) not null,
operatetypename varchar2(100) not null,
operatedesc varchar2(3000) not null,
params clob not null,
belongmainid varchar2(36) not null,
clientip varchar2(50) not null,
groupid varchar2(50) not null,
groupnamelabel varchar2(1000) not null,
redoservice varchar2(200) not null,
redocontext clob not null,
cancelservice varchar2(200) not null,
cancelcontext clob not null,
totalruntime number default '0' not null,
mainruntime number default '0' not null,
log_result varchar2(100) not null,
fromterminal varchar2(100) not null,
resultdesc clob not null,
old_content varchar2(3000) not null,
link_type varchar2(20) not null,
link_id number default '0' not null,
old_link_id number default '0' not null
);
/
alter table hrsa_salary_stats_report add remark varchar2(100);
/
@ -241,4 +170,5 @@ alter table hrsa_salary_stats_report add sort_type varchar2(100);
/
alter table hrsa_salary_stats_dim add label_id int;
/
/

View File

@ -157,77 +157,6 @@ alter table hrsa_salary_stats_dim modify dim_type varchar2(30);
alter table hrsa_salary_stats_report modify income_category_setting varchar2(1000);
/
create table hrsa_statreportlogs_detail
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
mainid varchar2(36) not null,
dataid varchar2(50) not null,
belongdataid varchar2(50) not null,
tablename varchar2(200) not null,
tablenamelabelid varchar2(50) default '-1' not null,
tablenamedesc varchar2(50) not null,
fieldname varchar2(200) not null,
fieldnamelabelid varchar2(50) default '-1' not null,
newvalue clob not null,
oldvalue clob not null,
newrealvalue clob not null,
oldrealvalue clob not null,
fielddesc varchar2(200) not null,
showorder int not null,
isdetail int default 0 not null
);
/
create table hrsa_statreportlogs
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
log_date date not null,
device varchar2(500) not null,
log_operator number not null,
operatorname varchar2(100),
targetid number default '-1' not null,
targetname clob not null,
modulename varchar2(100) not null,
functionname varchar2(100) not null,
interfacename varchar2(100) not null,
requesturl varchar2(200) not null,
requesturi varchar2(200) not null,
operatetype varchar2(50) not null,
operatetypename varchar2(100) not null,
operatedesc varchar2(3000) not null,
params clob not null,
belongmainid varchar2(36) not null,
clientip varchar2(50) not null,
groupid varchar2(50) not null,
groupnamelabel varchar2(1000) not null,
redoservice varchar2(200) not null,
redocontext clob not null,
cancelservice varchar2(200) not null,
cancelcontext clob not null,
totalruntime number default '0' not null,
mainruntime number default '0' not null,
log_result varchar2(100) not null,
fromterminal varchar2(100) not null,
resultdesc clob not null,
old_content varchar2(3000) not null,
link_type varchar2(20) not null,
link_id number default '0' not null,
old_link_id number default '0' not null
);
/
alter table hrsa_salary_stats_report add remark varchar2(100);
/
@ -241,4 +170,5 @@ alter table hrsa_salary_stats_report add sort_type varchar2(100);
/
alter table hrsa_salary_stats_dim add label_id int;
/
/

View File

@ -157,77 +157,6 @@ alter table hrsa_salary_stats_dim modify dim_type varchar2(30);
alter table hrsa_salary_stats_report modify income_category_setting varchar2(1000);
/
create table hrsa_statreportlogs_detail
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
mainid varchar2(36) not null,
dataid varchar2(50) not null,
belongdataid varchar2(50) not null,
tablename varchar2(200) not null,
tablenamelabelid varchar2(50) default '-1' not null,
tablenamedesc varchar2(50) not null,
fieldname varchar2(200) not null,
fieldnamelabelid varchar2(50) default '-1' not null,
newvalue clob not null,
oldvalue clob not null,
newrealvalue clob not null,
oldrealvalue clob not null,
fielddesc varchar2(200) not null,
showorder int not null,
isdetail int default 0 not null
);
/
create table hrsa_statreportlogs
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
log_date date not null,
device varchar2(500) not null,
log_operator number not null,
operatorname varchar2(100),
targetid number default '-1' not null,
targetname clob not null,
modulename varchar2(100) not null,
functionname varchar2(100) not null,
interfacename varchar2(100) not null,
requesturl varchar2(200) not null,
requesturi varchar2(200) not null,
operatetype varchar2(50) not null,
operatetypename varchar2(100) not null,
operatedesc varchar2(3000) not null,
params clob not null,
belongmainid varchar2(36) not null,
clientip varchar2(50) not null,
groupid varchar2(50) not null,
groupnamelabel varchar2(1000) not null,
redoservice varchar2(200) not null,
redocontext clob not null,
cancelservice varchar2(200) not null,
cancelcontext clob not null,
totalruntime number default '0' not null,
mainruntime number default '0' not null,
log_result varchar2(100) not null,
fromterminal varchar2(100) not null,
resultdesc clob not null,
old_content varchar2(3000) not null,
link_type varchar2(20) not null,
link_id number default '0' not null,
old_link_id number default '0' not null
);
/
alter table hrsa_salary_stats_report add remark varchar2(100);
/
@ -241,4 +170,5 @@ alter table hrsa_salary_stats_report add sort_type varchar2(100);
/
alter table hrsa_salary_stats_dim add label_id int;
/
/

View File

@ -157,76 +157,6 @@ alter table hrsa_salary_stats_dim modify column dim_type varchar(30)
alter table hrsa_salary_stats_report modify column income_category_setting varchar(1000)
;
create table hrsa_statreportlogs_detail
(
id bigint primary key comment 'ID' ,
create_time datetime comment '创建时间' ,
update_time datetime comment '修改时间' ,
creator bigint comment '创建人id' ,
delete_type int default 0 comment '是否删除' ,
tenant_key varchar(10) comment '租户KEY' ,
uuid varchar(36) not null comment '日志UUID' ,
mainid varchar(36) not null comment '主表id' ,
dataid varchar(50) not null comment '数据id' ,
belongdataid varchar(50) not null comment '主表数据id' ,
tablename varchar(200) not null comment '表名' ,
tablenamelabelid varchar(50) default '-1' not null comment '表名labelid' ,
tablenamedesc varchar(50) not null comment '对应数据库的表' ,
fieldname varchar(200) not null comment '字段名' ,
fieldnamelabelid varchar(50) default '-1' not null comment '字段名labelid' ,
newvalue text not null comment '更新后的值' ,
oldvalue text not null comment '更新前的值' ,
newrealvalue text not null comment '更新后的显示值' ,
oldrealvalue text not null comment '更新前的显示值' ,
fielddesc varchar(200) not null comment '字段名' ,
showorder int(11) not null comment '字段名' ,
isdetail int(11) default 0 not null comment '是否明细字段'
)
;
create table hrsa_statreportlogs
(
id bigint primary key comment 'ID' ,
create_time datetime comment '创建时间' ,
update_time datetime comment '修改时间' ,
creator bigint comment '创建人id' ,
delete_type int default 0 comment '是否删除' ,
tenant_key varchar(10) comment '租户KEY' ,
uuid varchar(36) not null comment '日志UUID' ,
log_date datetime not null comment '记录时间' ,
device varchar(500) not null comment '终端信息' ,
log_operator bigint not null comment '操作者' ,
operatorname varchar(100) comment '操作人姓名' ,
targetid bigint default '-1' not null comment '操作目标id' ,
targetname text not null comment '操作目标名称' ,
modulename varchar(100) not null comment '模块' ,
functionname varchar(100) not null comment '服务(方法)' ,
interfacename varchar(100) not null comment '访问接口名' ,
requesturl varchar(200) not null comment '请求全路径' ,
requesturi varchar(200) not null comment '请求地址' ,
operatetype varchar(50) not null comment '操作类型' ,
operatetypename varchar(100) not null comment '操作类型名称' ,
operatedesc varchar(3000) not null comment '操作详细说明' ,
params text not null comment '涉及的相关参数' ,
belongmainid varchar(36) not null comment '所属主表uuid' ,
clientip varchar(50) not null comment '操作IP' ,
groupid varchar(50) not null comment '分组' ,
groupnamelabel varchar(1000) not null comment '分组标题' ,
redoservice varchar(200) not null comment '重做业务接口' ,
redocontext text not null comment '重做参数' ,
cancelservice varchar(200) not null comment '撤销业务接口' ,
cancelcontext text not null comment '撤销参数' ,
totalruntime bigint default '0' not null comment '总运行时长' ,
mainruntime bigint default '0' not null comment '主方法运行时长' ,
log_result varchar(100) not null comment '日志结果' ,
fromterminal varchar(100) not null comment '来自pc web' ,
resultdesc text not null comment '运行结果描述' ,
old_content varchar(3000) not null comment '原先内容' ,
link_type varchar(20) not null comment '链接类型' ,
link_id bigint default '0' not null comment '链接id' ,
old_link_id bigint default '0' not null comment '原先链接id'
)
;
alter table hrsa_salary_stats_report add remark varchar(100)
;

View File

@ -157,76 +157,6 @@ alter table hrsa_salary_stats_dim modify dim_type varchar2(30)
alter table hrsa_salary_stats_report modify income_category_setting varchar2(1000)
/
create table hrsa_statreportlogs_detail
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
mainid varchar2(36) not null,
dataid varchar2(50) not null,
belongdataid varchar2(50) not null,
tablename varchar2(200) not null,
tablenamelabelid varchar2(50) default '-1' not null,
tablenamedesc varchar2(50) not null,
fieldname varchar2(200) not null,
fieldnamelabelid varchar2(50) default '-1' not null,
newvalue clob not null,
oldvalue clob not null,
newrealvalue clob not null,
oldrealvalue clob not null,
fielddesc varchar2(200) not null,
showorder int not null,
isdetail int default 0 not null
)
/
create table hrsa_statreportlogs
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
log_date date not null,
device varchar2(500) not null,
log_operator number not null,
operatorname varchar2(100),
targetid number default '-1' not null,
targetname clob not null,
modulename varchar2(100) not null,
functionname varchar2(100) not null,
interfacename varchar2(100) not null,
requesturl varchar2(200) not null,
requesturi varchar2(200) not null,
operatetype varchar2(50) not null,
operatetypename varchar2(100) not null,
operatedesc varchar2(3000) not null,
params clob not null,
belongmainid varchar2(36) not null,
clientip varchar2(50) not null,
groupid varchar2(50) not null,
groupnamelabel varchar2(1000) not null,
redoservice varchar2(200) not null,
redocontext clob not null,
cancelservice varchar2(200) not null,
cancelcontext clob not null,
totalruntime number default '0' not null,
mainruntime number default '0' not null,
log_result varchar2(100) not null,
fromterminal varchar2(100) not null,
resultdesc clob not null,
old_content varchar2(3000) not null,
link_type varchar2(20) not null,
link_id number default '0' not null,
old_link_id number default '0' not null
)
/
alter table hrsa_salary_stats_report add remark varchar2(100)
/

View File

@ -162,77 +162,6 @@ alter table hrsa_salary_stats_dim alter dim_type TYPE varchar(30)
alter table hrsa_salary_stats_report alter income_category_setting TYPE varchar(1000)
;
create table hrsa_statreportlogs_detail
(
id bigint primary key ,
create_time timestamp ,
update_time timestamp ,
creator bigint ,
delete_type int default 0 ,
tenant_key varchar(10) ,
uuid varchar(36) not null ,
mainid varchar(36) not null ,
dataid varchar(50) not null ,
belongdataid varchar(50) not null ,
tablename varchar(200) not null ,
tablenamelabelid varchar(50) default '-1' not null ,
tablenamedesc varchar(50) not null ,
fieldname varchar(200) not null ,
fieldnamelabelid varchar(50) default '-1' not null ,
newvalue text not null ,
oldvalue text not null ,
newrealvalue text not null ,
oldrealvalue text not null ,
fielddesc varchar(200) not null ,
showorder int not null ,
isdetail int NOT NULL DEFAULT 0
)
;
create table hrsa_statreportlogs
(
id bigint primary key ,
create_time timestamp ,
update_time timestamp ,
creator bigint ,
delete_type int default 0 ,
tenant_key varchar(10) ,
uuid varchar(36) not null ,
log_date timestamp not null ,
device varchar(500) not null ,
log_operator bigint not null ,
operatorname varchar(100) ,
targetid bigint NOT NULL DEFAULT -1 ,
targetname text not null ,
modulename varchar(100) not null ,
functionname varchar(100) not null ,
interfacename varchar(100) not null ,
requesturl varchar(200) not null ,
requesturi varchar(200) not null ,
operatetype varchar(50) not null ,
operatetypename varchar(100) not null ,
operatedesc varchar(3000) not null ,
params text not null ,
belongmainid varchar(36) not null ,
clientip varchar(50) not null ,
groupid varchar(50) not null ,
groupnamelabel varchar(1000) not null ,
redoservice varchar(200) not null ,
redocontext text not null ,
cancelservice varchar(200) not null ,
cancelcontext text not null ,
totalruntime bigint NOT NULL DEFAULT 0 ,
mainruntime bigint NOT NULL DEFAULT 0 ,
log_result varchar(100) not null ,
fromterminal varchar(100) not null ,
resultdesc text not null ,
old_content varchar(3000) not null ,
link_type varchar(20) not null ,
link_id bigint NOT NULL DEFAULT 0 ,
old_link_id bigint NOT NULL DEFAULT 0
)
;
alter table hrsa_salary_stats_report add remark varchar(100)
;

View File

@ -157,77 +157,6 @@ GO
alter table hrsa_salary_stats_report alter column income_category_setting nvarchar(1000)
GO
create table hrsa_statreportlogs_detail
(
id bigint primary key ,
create_time datetime,
update_time datetime,
creator bigint,
delete_type int default 0,
tenant_key nvarchar(10),
uuid nvarchar(36) not null,
mainid nvarchar(36) not null,
dataid nvarchar(50) not null,
belongdataid nvarchar(50) not null,
tablename nvarchar(200) not null,
tablenamelabelid nvarchar(50) default '-1' not null,
tablenamedesc nvarchar(50) not null,
fieldname nvarchar(200) not null,
fieldnamelabelid nvarchar(50) default '-1' not null,
newvalue nvarchar(max) not null,
oldvalue nvarchar(max) not null,
newrealvalue nvarchar(max) not null,
oldrealvalue nvarchar(max) not null,
fielddesc nvarchar(200) not null,
showorder int not null,
isdetail int default 0 not null
)
GO
create table hrsa_statreportlogs
(
id bigint primary key ,
create_time datetime,
update_time datetime,
creator bigint,
delete_type int default 0,
tenant_key nvarchar(10),
uuid nvarchar(36) not null,
log_date datetime not null,
device nvarchar(500) not null,
log_operator bigint not null,
operatorname nvarchar(100),
targetid bigint default '-1' not null,
targetname nvarchar(max) not null,
modulename nvarchar(100) not null,
functionname nvarchar(100) not null,
interfacename nvarchar(100) not null,
requesturl nvarchar(200) not null,
requesturi nvarchar(200) not null,
operatetype nvarchar(50) not null,
operatetypename nvarchar(100) not null,
operatedesc nvarchar(3000) not null,
params nvarchar(max) not null,
belongmainid nvarchar(36) not null,
clientip nvarchar(50) not null,
groupid nvarchar(50) not null,
groupnamelabel nvarchar(1000) not null,
redoservice nvarchar(200) not null,
redocontext nvarchar(max) not null,
cancelservice nvarchar(200) not null,
cancelcontext nvarchar(max) not null,
totalruntime bigint default '0' not null,
mainruntime bigint default '0' not null,
log_result nvarchar(100) not null,
fromterminal nvarchar(100) not null,
resultdesc nvarchar(max) not null,
old_content nvarchar(3000) not null,
link_type nvarchar(20) not null,
link_id bigint default '0' not null,
old_link_id bigint default '0' not null
)
GO
alter table hrsa_salary_stats_report add remark nvarchar(100)
GO

View File

@ -157,77 +157,6 @@ alter table hrsa_salary_stats_dim modify dim_type varchar2(30);
alter table hrsa_salary_stats_report modify income_category_setting varchar2(1000);
/
create table hrsa_statreportlogs_detail
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
mainid varchar2(36) not null,
dataid varchar2(50) not null,
belongdataid varchar2(50) not null,
tablename varchar2(200) not null,
tablenamelabelid varchar2(50) default '-1' not null,
tablenamedesc varchar2(50) not null,
fieldname varchar2(200) not null,
fieldnamelabelid varchar2(50) default '-1' not null,
newvalue clob not null,
oldvalue clob not null,
newrealvalue clob not null,
oldrealvalue clob not null,
fielddesc varchar2(200) not null,
showorder int not null,
isdetail int default 0 not null
);
/
create table hrsa_statreportlogs
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
uuid varchar2(36) not null,
log_date date not null,
device varchar2(500) not null,
log_operator number not null,
operatorname varchar2(100),
targetid number default '-1' not null,
targetname clob not null,
modulename varchar2(100) not null,
functionname varchar2(100) not null,
interfacename varchar2(100) not null,
requesturl varchar2(200) not null,
requesturi varchar2(200) not null,
operatetype varchar2(50) not null,
operatetypename varchar2(100) not null,
operatedesc varchar2(3000) not null,
params clob not null,
belongmainid varchar2(36) not null,
clientip varchar2(50) not null,
groupid varchar2(50) not null,
groupnamelabel varchar2(1000) not null,
redoservice varchar2(200) not null,
redocontext clob not null,
cancelservice varchar2(200) not null,
cancelcontext clob not null,
totalruntime number default '0' not null,
mainruntime number default '0' not null,
log_result varchar2(100) not null,
fromterminal varchar2(100) not null,
resultdesc clob not null,
old_content varchar2(3000) not null,
link_type varchar2(20) not null,
link_id number default '0' not null,
old_link_id number default '0' not null
);
/
alter table hrsa_salary_stats_report add remark varchar2(100);
/

View File

@ -167,12 +167,6 @@ delete from hrsa_charts_setting where 1=1
delete from hrsa_salary_echarts_setting where 1=1
;
delete from hrsa_statreportlogs_detail where 1=1
;
delete from hrsa_statreportlogs where 1=1
;
delete from hrsa_salary_bill_watermark where 1=1
;

View File

@ -40,9 +40,9 @@ public class EmployeeDeclareRefresh {
// 对已有人员处理人员状态离职日期任职受雇从业类型
for (EmployeeDeclarePO employeeDeclare : dto.getEmployeeDeclares()) {
SalaryArchivePO salaryArchive = salaryArchiveMap.get(employeeDeclare.getEmployeeId());
if (salaryArchive != null &&
(Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())
|| Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()))) {
if (salaryArchive != null
&& (Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())
|| Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()))) {
if (Objects.equals(employeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue())
|| Objects.equals(Util.null2String(employeeDeclare.getDismissDate()), Util.null2String(salaryArchive.getPayEndDate()))) {
employeeDeclare.setEmploymentStatus(EmploymentStatusEnum.ABNORMAL.getValue());

View File

@ -55,6 +55,8 @@ public class EmployeeDeclareAddListQueryParam extends BaseQueryParam {
// 员工姓名/编号
private String keyword;
private Long employeeId;
// 部门
private Collection<Long> departmentIds;

View File

@ -11,6 +11,7 @@ import com.engine.salary.util.SalaryI18nUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.Util;
import java.util.*;
import java.util.stream.Collectors;
@ -165,9 +166,9 @@ public class TaxDeclarationDetailBO {
.setAnnualTaxSavings(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.ANNUAL_TAX_SAVINGS))
.setAnnualRemark(fieldCodeKeyFieldValueMap.get(TaxDeclarationDataIndexConstant.ANNUAL_REMARK));
if (dto.getEmployeeType() == null || Objects.equals(dto.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(dto.getEmployeeId());
taxDeclarationLaborListDTO.setJobNum(simpleEmployee.getWorkcode())
.setUsername(simpleEmployee.getUsername())
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.getOrDefault(dto.getEmployeeId(),new DataCollectionEmployee());
taxDeclarationLaborListDTO.setJobNum(Util.null2String(simpleEmployee.getWorkcode()))
.setUsername(Util.null2String(simpleEmployee.getUsername()))
.setCardNum(Optional.ofNullable(simpleEmployee).map(DataCollectionEmployee::getIdNo).orElse(StringUtils.EMPTY));
} else {

View File

@ -445,12 +445,13 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
public void refresh(EmployeeDeclareRefreshParam refreshParam, Long employeeId) {
// 查询本月已有的需要报送的人员
List<EmployeeDeclarePO> employeeDeclares = listByTaxCycleAndTaxAgentId(refreshParam.getTaxCycle(), refreshParam.getTaxAgentId());
// 查询上月已有的需要报送的人员(只需要正常的)
List<EmployeeDeclarePO> preTaxCycleEmployeeDeclares = listByTaxCycleAndTaxAgentId(SalaryDateUtil.plusMonths(refreshParam.getTaxCycle(), -1), refreshParam.getTaxAgentId())
.stream()
.filter(e -> Objects.equals(e.getEmploymentStatus(), EmploymentStatusEnum.NORMAL.getValue())
&& Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.DECLARE_SUCCESS.getValue()))
.collect(Collectors.toList());
// 查询上月已有报送的人员
List<EmployeeDeclarePO> preTaxCycleEmployeeDeclares = listByTaxCycleAndTaxAgentId(SalaryDateUtil.plusMonths(refreshParam.getTaxCycle(), -1), refreshParam.getTaxAgentId());
//只需要正常的
// .stream()
// .filter(e -> Objects.equals(e.getEmploymentStatus(), EmploymentStatusEnum.NORMAL.getValue())
// && Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.DECLARE_SUCCESS.getValue()))
// .collect(Collectors.toList());
// 查询个税扣缴义务人
TaxAgentPO taxAgent = getTaxAgentService(user).getById(refreshParam.getTaxAgentId());
// 根据税款所属期计算出薪资周期

View File

@ -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;
@ -692,9 +693,11 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
@Override
public SpecialAddDeductionRecordDTO getRecordById(Long id) {
return getSpecialAddDeductionBiz()
.listDTOByParam(SpecialAddDeductionQueryParam.builder().specialAddDeductionId(id).build())
.stream().findFirst().orElse(null);
List<SpecialAddDeductionRecordDTO> specialAddDeductionRecordDTOList = getSpecialAddDeductionBiz().listDTOByParam(SpecialAddDeductionQueryParam.builder().specialAddDeductionId(id).build());
if(CollUtil.isNotEmpty(specialAddDeductionRecordDTOList)){
return specialAddDeductionRecordDTOList.get(0);
}
return null;
}
private List<List<String>> queryInfoForExcel(SpecialAddDeductionQueryParam param, List<List<String>> rowList) {

View File

@ -464,6 +464,15 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
.build();
getTaxAgentExtRangeMapper().insertIgnoreNull(po);
// 记录日志
String name = taxAgent.getName() + "_" + saveParam.getTaxAgentId();
SalaryLoggerUtil.recordAddSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
taxAgent.getId(),
name,
SalaryI18nUtil.getI18nLabel(0, "新增非系统人员范围"),
SalaryI18nUtil.getI18nLabel(0, "新增非系统人员范围") + name,
po,
user);
});
List<DataCollectionEmployee> oldEmpList = getExtEmpService(user).getEmployeeByIds(oldIds);
employees.addAll(oldEmpList);
@ -481,6 +490,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
syncLocalExtEmp(taxAgentId, finalEmployees);
});
}
}
private List<TaxAgentExtRangePO> listAllExtBytaxAgentId(Long taxAgentId) {
@ -510,6 +520,14 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
}
// 删除管理范围
getTaxAgentExtRangeMapper().deleteByIds(ids);
// 记录日志
SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.taxAgentLoggerTemplate,
taxAgentManageRanges.get(0).getTaxAgentId(),
ids.toString(),
SalaryI18nUtil.getI18nLabel(0, "删除非系统人员范围"),
SalaryI18nUtil.getI18nLabel(0, "删除非系统人员范围") + ids.toString(),
null,
user);
}
private void syncLocalExtEmp(Long taxAgentId, List<DataCollectionEmployee> allSalaryEmployees) {