Merge branch 'release/2.14.3.2406.01' into custom/宁波精华

# Conflicts:
#	resource/WEB-INF/prop/hrmSalary.properties
#	src/com/engine/salary/service/SalaryAcctEmployeeService.java
#	src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java
This commit is contained in:
钱涛 2024-05-30 17:14:37 +08:00
commit 07f08336d6
127 changed files with 2355 additions and 1177 deletions

View File

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

View File

@ -0,0 +1,19 @@
create table hrsa_salary_acct_sob_config
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
salary_acct_record_id number,
basic_config clob,
employee_field_config clob,
item_config clob,
item_group_config clob,
back_item_config clob,
adjust_rule_config clob,
check_rule_config clob
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_salary_sob_item ADD item_hide NUMBER(20,0);
/
ALTER TABLE hrsa_salary_sob_item_group ADD item_hide NUMBER(20,0);
/

View File

@ -0,0 +1,12 @@
update hrsa_salary_sob_item set item_hide = 0;
/
update hrsa_salary_sob_item_group set item_hide = 0;
/
UPDATE hrsa_salary_sob_item a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/
UPDATE hrsa_salary_sob_item_group a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -0,0 +1,19 @@
create table hrsa_salary_acct_sob_config
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
salary_acct_record_id number,
basic_config clob,
employee_field_config clob,
item_config clob,
item_group_config clob,
back_item_config clob,
adjust_rule_config clob,
check_rule_config clob
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_salary_sob_item ADD item_hide NUMBER(20,0);
/
ALTER TABLE hrsa_salary_sob_item_group ADD item_hide NUMBER(20,0);
/

View File

@ -0,0 +1,12 @@
update hrsa_salary_sob_item set item_hide = 0;
/
update hrsa_salary_sob_item_group set item_hide = 0;
/
UPDATE hrsa_salary_sob_item a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/
UPDATE hrsa_salary_sob_item_group a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -0,0 +1,19 @@
create table hrsa_salary_acct_sob_config
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
salary_acct_record_id number,
basic_config clob,
employee_field_config clob,
item_config clob,
item_group_config clob,
back_item_config clob,
adjust_rule_config clob,
check_rule_config clob
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_salary_sob_item ADD item_hide NUMBER(20,0);
/
ALTER TABLE hrsa_salary_sob_item_group ADD item_hide NUMBER(20,0);
/

View File

@ -0,0 +1,12 @@
update hrsa_salary_sob_item set item_hide = 0;
/
update hrsa_salary_sob_item_group set item_hide = 0;
/
UPDATE hrsa_salary_sob_item a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/
UPDATE hrsa_salary_sob_item_group a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -0,0 +1,18 @@
create table hrsa_salary_acct_sob_config
(
id bigint primary key comment 'ID' ,
create_time datetime comment '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>' ,
update_time datetime comment '<EFBFBD>޸<EFBFBD>ʱ<EFBFBD><EFBFBD>' ,
creator bigint comment '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id' ,
delete_type int default 0 comment '<EFBFBD>Ƿ<EFBFBD>ɾ<EFBFBD><EFBFBD>' ,
tenant_key varchar(10) comment '<EFBFBD>⻧KEY' ,
salary_acct_record_id bigint comment 'н<EFBFBD>ʺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>id' ,
basic_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׵Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ' ,
employee_field_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׵<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ֶ<EFBFBD>' ,
item_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׵<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ' ,
item_group_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׵<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>' ,
back_item_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ' ,
adjust_rule_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>ĵ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>' ,
check_rule_config text comment 'н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
)
;

View File

@ -0,0 +1,3 @@
alter table hrsa_salary_sob_item add item_hide bigint;
alter table hrsa_salary_sob_item_group add item_hide bigint;

View File

@ -0,0 +1,7 @@
update hrsa_salary_sob_item set item_hide = 0;
update hrsa_salary_sob_item_group set item_hide = 0;
update hrsa_salary_sob_item a INNER JOIN hrsa_salary_item_hide b on a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id set a.item_hide = b.item_hide where a.delete_type=0 and b.delete_type=0 and b.is_group=0 and b.item_hide is not null;
update hrsa_salary_sob_item_group a INNER JOIN hrsa_salary_item_hide b on a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id set a.item_hide = b.item_hide where a.delete_type=0 and b.delete_type=0 and b.is_group=1 and b.item_hide is not null;

View File

@ -0,0 +1 @@
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int(0) NULL ;

View File

@ -0,0 +1,18 @@
create table hrsa_salary_acct_sob_config
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
salary_acct_record_id number,
basic_config clob,
employee_field_config clob,
item_config clob,
item_group_config clob,
back_item_config clob,
adjust_rule_config clob,
check_rule_config clob
)
/

View File

@ -0,0 +1,5 @@
ALTER TABLE hrsa_salary_sob_item ADD item_hide NUMBER(20,0)
/
ALTER TABLE hrsa_salary_sob_item_group ADD item_hide NUMBER(20,0)
/

View File

@ -0,0 +1,9 @@
update hrsa_salary_sob_item set item_hide = 0
/
update hrsa_salary_sob_item_group set item_hide = 0
/
UPDATE hrsa_salary_sob_item a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide)
/
UPDATE hrsa_salary_sob_item_group a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide)
/

View File

@ -0,0 +1,2 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0)
/

View File

@ -0,0 +1,18 @@
create table hrsa_salary_acct_sob_config
(
id bigint primary key ,
create_time timestamp,
update_time timestamp,
creator bigint,
delete_type int default 0,
tenant_key varchar(10),
salary_acct_record_id bigint,
basic_config text,
employee_field_config text,
item_config text,
item_group_config text,
back_item_config text,
adjust_rule_config text,
check_rule_config text
);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_sob_item ADD COLUMN item_hide bigint;
ALTER TABLE hrsa_salary_sob_item_group ADD COLUMN item_hide bigint;

View File

@ -0,0 +1,7 @@
update hrsa_salary_sob_item set item_hide = 0;
update hrsa_salary_sob_item_group set item_hide = 0;
UPDATE hrsa_salary_sob_item a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
UPDATE hrsa_salary_sob_item_group a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);

View File

@ -0,0 +1 @@
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int NULL ;

View File

@ -0,0 +1,18 @@
create table hrsa_salary_acct_sob_config
(
id bigint primary key ,
create_time datetime,
update_time datetime,
creator bigint,
delete_type int default 0,
tenant_key nvarchar(10),
salary_acct_record_id bigint,
basic_config ntext,
employee_field_config ntext,
item_config ntext,
item_group_config ntext,
back_item_config ntext,
adjust_rule_config ntext,
check_rule_config ntext
)
GO

View File

@ -0,0 +1,5 @@
alter table hrsa_salary_sob_item add item_hide bigint
GO
alter table hrsa_salary_sob_item_group add item_hide bigint
GO

View File

@ -0,0 +1,14 @@
update hrsa_salary_sob_item set item_hide = 0
GO
update hrsa_salary_sob_item_group set item_hide = 0
GO
UPDATE hrsa_salary_sob_item SET item_hide = b.item_hide FROM hrsa_salary_sob_item a INNER JOIN hrsa_salary_item_hide b ON a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id
WHERE a.delete_type=0 and b.delete_type=0 and b.is_group=0 and b.item_hide is not null
GO
UPDATE hrsa_salary_sob_item_group SET item_hide = b.item_hide FROM hrsa_salary_sob_item_group a INNER JOIN hrsa_salary_item_hide b ON a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id
WHERE a.delete_type=0 and b.delete_type=0 and b.is_group=1 and b.item_hide is not null
GO

View File

@ -0,0 +1,2 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status int NULL
GO

View File

@ -0,0 +1,19 @@
create table hrsa_salary_acct_sob_config
(
id number primary key ,
create_time date,
update_time date,
creator number,
delete_type int default 0,
tenant_key varchar2(10),
salary_acct_record_id number,
basic_config clob,
employee_field_config clob,
item_config clob,
item_group_config clob,
back_item_config clob,
adjust_rule_config clob,
check_rule_config clob
);
/

View File

@ -0,0 +1,6 @@
ALTER TABLE hrsa_salary_sob_item ADD item_hide NUMBER(20,0);
/
ALTER TABLE hrsa_salary_sob_item_group ADD item_hide NUMBER(20,0);
/

View File

@ -0,0 +1,12 @@
update hrsa_salary_sob_item set item_hide = 0;
/
update hrsa_salary_sob_item_group set item_hide = 0;
/
UPDATE hrsa_salary_sob_item a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.salary_item_id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/
UPDATE hrsa_salary_sob_item_group a SET item_hide = (SELECT b.item_hide FROM hrsa_salary_item_hide b WHERE a.id = b.salary_item_id and a.salary_sob_id = b.salary_sob_id and a.delete_type=0 and b.delete_type=0 ) WHERE EXISTS (SELECT 1 FROM hrsa_salary_item_hide b WHERE b.item_hide = a.item_hide);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -1,7 +1,6 @@
select id from hrsa_tax_agent_emp
where tax_agent_id =id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =id and delete_type = 0)
update hrsa_tax_agent_emp set delete_type = 3
where id in(
select id from hrsa_tax_agent_emp
where tax_agent_id =27 and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =27 and delete_type = 0)
)
where tax_agent_id=id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =id and delete_type = 0)

View File

@ -17,5 +17,5 @@ left join hrmresource e on e.id= result.employee_id
left join hrsa_salary_item c on c.id=i.salary_item_id
left join hrsa_tax_agent t on a.tax_agent_id=t.id
where a.delete_type=0 and i.delete_type=0 and t.delete_type=0 and c.delete_type=0
and a.employee_id=$main.ygid$ and t.name='$main.dzqgskjywr$'
and a.employee_id=人员id and t.name=扣缴义务人名称
and effective_time <= now() and c.name='基本工资' order by effective_time desc

View File

@ -813,6 +813,7 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build();
StringBuilder errorMsg = new StringBuilder("");
if (oldOtherInfoList.size() == 1) {
InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0);
//设置福利档案基数调整记录数据
@ -839,15 +840,17 @@ public class SIArchivesBiz {
.otherPaymentBaseString(paramReq.getPaymentForm())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("其他福利个人:" + errorMsg.toString());
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("其他福利公司:" + errorMsg.toString());
}
}
encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class);
@ -884,15 +887,17 @@ public class SIArchivesBiz {
.otherPaymentBaseString(paramReq.getPaymentForm())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("其他福利个人:" + errorMsg.toString());
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("其他福利公司:" + errorMsg.toString());
}
}
encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class);
@ -959,6 +964,7 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build();
StringBuilder errorMsg = new StringBuilder("");
if (oldFundInfoList.size() == 1) {
InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0);
//设置福利档案基数调整记录数据
@ -986,15 +992,17 @@ public class SIArchivesBiz {
.employeeId(param.getEmployeeId())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("公积金个人:" + errorMsg.toString());
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("公积金公司:" + errorMsg.toString());
}
}
encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class);
@ -1033,15 +1041,17 @@ public class SIArchivesBiz {
.employeeId(param.getEmployeeId())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("公积金个人:" + errorMsg.toString());
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("公积金公司:" + errorMsg.toString());
}
}
encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class);
@ -1115,6 +1125,7 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build();
StringBuilder errorMsg = new StringBuilder();
//组装新数据
if (oldSocialInfoList.size() == 1) {
//老数据
@ -1144,15 +1155,17 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("社保个人:" + errorMsg.toString());
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("社保公司:" + errorMsg.toString());
}
}
encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class);
@ -1191,15 +1204,17 @@ public class SIArchivesBiz {
.paymentOrganization(param.getPaymentOrganization())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("社保个人:" + errorMsg.toString());
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
throw new SalaryRunTimeException("社保公司:" + errorMsg.toString());
}
}
encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class);
@ -1239,7 +1254,7 @@ public class SIArchivesBiz {
* @param paymentBaseString
* @return
*/
public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope) {
public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope, StringBuilder errorMsg) {
if (primaryId ==null || paymentBaseString == null) {
return true;
@ -1255,6 +1270,7 @@ public class SIArchivesBiz {
if (entry.getValue() == null || entry.getValue().length() == 0) {
continue;
} else if (!isNumeric(entry.getValue())) {
errorMsg.append("福利值非数字");
log.info("福利值非数字!");
return false;
}
@ -1263,6 +1279,7 @@ public class SIArchivesBiz {
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey()));
log.info("福利方案id: {},, 福利明细项id{}", primaryId, Long.valueOf(entry.getKey()));
if (insuranceSchemeDetailPOList.size() == 0) {
errorMsg.append("根据福利方案id、险种id、缴纳对象查询明细为null福利方案id: " + primaryId + ", 福利明细项id" + Long.valueOf(entry.getKey()));
log.info("根据福利方案id、险种id、缴纳对象查询明细为null福利方案id: {}, 福利明细项id{}", primaryId, Long.valueOf(entry.getKey()));
return false;
}
@ -1276,11 +1293,13 @@ public class SIArchivesBiz {
String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
//数值低于对应福利明细下限
errorMsg.append("基数:"+ entry.getKey() + " 数值:" + entry.getValue() +"低于对应福利明细下限:" + lowerLimit);
log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}", entry.getKey(), entry.getValue(), lowerLimit);
return false;
}
if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) {
//数值高于对应福利明细上限
errorMsg.append("基数:"+ entry.getKey() + " 数值:" + entry.getValue() +"高于对应福利明细上限:" + upperLimit);
log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} ", entry.getKey(), entry.getValue(), upperLimit);
return false;
}

View File

@ -1,6 +1,5 @@
package com.engine.salary.biz;
import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import com.engine.salary.mapper.salarysob.SalarySobItemMapper;
import com.google.common.collect.Lists;
@ -34,16 +33,6 @@ public class SalarySobItemBiz {
}
}
public List<SalarySobItemPO> listBySalarySobIdWithHideItem(SalarySobItemPO build) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
return mapper.listBySalarySobIdWithHideItem(build);
} finally {
sqlSession.close();
}
}
public void batchInsert(Collection<SalarySobItemPO> salarySobItemPOS) {
if (CollectionUtils.isEmpty(salarySobItemPOS)) {
@ -83,19 +72,7 @@ public class SalarySobItemBiz {
}
}
public void InsertItemShow(SalarySobItemHidePO salarySobItemHidePO) {
if (salarySobItemHidePO == null) {
return;
}
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
mapper.insertItemShow(salarySobItemHidePO);
sqlSession.commit();
} finally {
sqlSession.close();
}
}
public List<SalarySobItemPO> listBySalarySobIdAndGroupId(Long salarySobId, Collection<Long> salarySobItemGroupIds) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
@ -141,21 +118,6 @@ public class SalarySobItemBiz {
}
public void batchInsertItemShow(List<SalarySobItemHidePO> list) {
if (CollectionUtils.isEmpty(list)) {
return;
}
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
List<List<SalarySobItemHidePO>> partition = Lists.partition( list, 100);
partition.forEach(mapper::batchInsertItemShow);
sqlSession.commit();
} finally {
sqlSession.close();
}
}
public void update(SalarySobItemPO salarySobItemPO) {
if (Objects.isNull(salarySobItemPO)) {
return;

View File

@ -64,15 +64,6 @@ public class SalarySobItemGroupBiz {
}
}
public List<SalarySobItemGroupPO> listSomeWithItemHide(SalarySobItemGroupPO build) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemGroupMapper mapper = sqlSession.getMapper(SalarySobItemGroupMapper.class);
return mapper.listSomeWithItemHide(build);
} finally {
sqlSession.close();
}
}
public void deleteByIds(List<Long> ids) {

View File

@ -399,7 +399,7 @@
"name": "IDCARD",
"chineseName": "身份证函数",
"description": "从身份证号码中获取相关信息比如生日BD、年龄AGE、籍贯NA、性别GENDER。",
"example": "IDCARD( 43070319980706334X , BD )",
"example": "IDCARD( ******19980706**** , BD )",
"result": "'1998-07-06'",
"paramDescs": [
"*身份证号码*(必选)",

View File

@ -53,4 +53,9 @@ public class AttendQuoteDataBaseDTO {
* 工号
*/
private String jobNum;
/**
* 证件号码
*/
private String idNo;
}

View File

@ -172,7 +172,7 @@ public class SalaryBillBO {
try {
Method method = salaryFormulaEmployeeDTO.getClass().getMethod(getter);
Object invoke = method.invoke(salaryFormulaEmployeeDTO);
e.setSalaryItemValue((String) invoke);
e.setSalaryItemValue(Util.null2String(invoke));
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
log.error("no such method", e);
}
@ -386,7 +386,6 @@ public class SalaryBillBO {
}
try {
log.info("发送短信内容, {}", content);
if (e.get("mobile") != null) {
MessageUtil.sendSMS(e.get("mobile").toString(), content);
} else {

View File

@ -88,7 +88,7 @@ public class SalaryTemplateBO {
.build();
}
public static List<SalaryTemplateSalaryItemSetListDTO> convertSalarySobItemAggregateToSalaryItemSet(SalarySobItemAggregateDTO salarySobItemAggregateDTO, Long currentEmployeeId, boolean isReplenish) {
public static List<SalaryTemplateSalaryItemSetListDTO> convertSalarySobItemAggregateToSalaryItemSet(SalarySobItemAggregateDTO salarySobItemAggregateDTO, boolean isReplenish) {
List<SalaryTemplateSalaryItemSetListDTO> groups = new LinkedList<>();
if (salarySobItemAggregateDTO!=null) {
// 1.员工信息

View File

@ -0,0 +1,84 @@
package com.engine.salary.entity.salaryacct.bo;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
import com.engine.salary.entity.salarysob.po.*;
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
import com.engine.salary.util.JsonUtil;
import com.engine.salary.util.db.IdGenerator;
import lombok.Builder;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
@Builder
public class SalaryAcctConfig {
private SalaryAcctRecordPO salaryAcctRecord;
private SalarySobPO salarySob;
private List<SalarySobEmpFieldPO> salarySobEmpFields;
private List<SalarySobItemPO> salarySobItems;
private List<SalarySobItemGroupPO> salarySobItemGroups;
private List<SalarySobBackItemPO> salarySobBackItems;
@Deprecated
private List<SalarySobAdjustRulePO> salarySobAdjustRules;
@Deprecated
private List<SalarySobCheckRulePO> salarySobCheckRules;
public SalaryAcctConfig(SalaryAcctRecordPO salaryAcctRecord,
SalarySobPO salarySob,
List<SalarySobEmpFieldPO> salarySobEmpFields,
List<SalarySobItemPO> salarySobItems,
List<SalarySobItemGroupPO> salarySobItemGroups,
List<SalarySobBackItemPO> salarySobBackItems,
List<SalarySobAdjustRulePO> salarySobAdjustRules,
List<SalarySobCheckRulePO> salarySobCheckRules) {
this.salaryAcctRecord = salaryAcctRecord;
this.salarySob = salarySob;
this.salarySobEmpFields = salarySobEmpFields;
this.salarySobItems = salarySobItems;
this.salarySobItemGroups = salarySobItemGroups;
this.salarySobBackItems = salarySobBackItems;
this.salarySobAdjustRules = salarySobAdjustRules;
this.salarySobCheckRules = salarySobCheckRules;
}
public SalaryAcctSobConfigPO buildAcctSobConfig() {
Date now = new Date();
return SalaryAcctSobConfigPO.builder()
.id(IdGenerator.generate())
.salaryAcctRecordId(salaryAcctRecord.getId())
.basicConfig(JsonUtil.toJsonString(salarySob))
.employeeFieldConfig(JsonUtil.toJsonString(salarySobEmpFields))
.itemConfig(JsonUtil.toJsonString(salarySobItems))
.itemGroupConfig(JsonUtil.toJsonString(salarySobItemGroups))
.backItemConfig(JsonUtil.toJsonString(salarySobBackItems))
.adjustRuleConfig(JsonUtil.toJsonString(salarySobAdjustRules))
.checkRuleConfig(JsonUtil.toJsonString(salarySobCheckRules))
.tenantKey(salaryAcctRecord.getTenantKey())
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.creator(salaryAcctRecord.getCreator())
.createTime(now)
.updateTime(now)
.build();
}
public static SalaryAcctConfig parse(SalaryAcctSobConfigPO po) {
return SalaryAcctConfig.builder()
.salarySob(JsonUtil.parseObject(po.getBasicConfig(), SalarySobPO.class))
.salarySobEmpFields(JsonUtil.parseList(po.getEmployeeFieldConfig(), SalarySobEmpFieldPO.class))
.salarySobItemGroups(JsonUtil.parseList(po.getItemGroupConfig(), SalarySobItemGroupPO.class))
.salarySobItems(JsonUtil.parseList(po.getItemConfig(), SalarySobItemPO.class))
.salarySobBackItems(JsonUtil.parseList(po.getBackItemConfig(), SalarySobBackItemPO.class))
.build();
}
}

View File

@ -181,9 +181,9 @@ public class SalaryAcctResultBO {
List<WeaTableColumnGroup> childrenColumns = Lists.newArrayList();
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
} else {
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
}
}
WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName(), 0), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns);
@ -192,18 +192,18 @@ public class SalaryAcctResultBO {
// 没有分类的薪资项目
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) {
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
} else {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
}
}
// 回算的薪资项目
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) {
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
} else {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
}
}
@ -288,6 +288,8 @@ public class SalaryAcctResultBO {
}
// 主键id
map.put("id", e.getId());
//锁定状态
map.put("lockStatus", LockStatusEnum.getByValue(e.getLockStatus()).getDefaultLabel());
//人员id
map.put("employeeId", e.getEmployeeId());
// 个税扣缴义务人
@ -552,7 +554,7 @@ public class SalaryAcctResultBO {
// .canEdit(Objects.equals(Optional.ofNullable(salaryItemPO).map(SalaryItemPO::getUseInEmployeeSalary).orElse(0), 0))
.canEdit(true)
.pattern(salarySobItemPO.getPattern())
.lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getValue() : LockStatusEnum.UNLOCK.getValue())
.lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getDefaultLabel() : LockStatusEnum.UNLOCK.getDefaultLabel())
.build();
}

View File

@ -21,19 +21,19 @@ import java.util.Set;
@AllArgsConstructor
@NoArgsConstructor
public class SalaryAcctResultUpdateLockStatusParam {
//锁定状态
private LockStatusEnum lockStatus;
//薪资项目的Id")
private Long salaryItemId;
//薪资核算人员的id")
// private Set<String> idStrSet;
//薪资核算记录的id
private Long salaryAcctRecordId;
//薪资项目的Id
private Long salaryItemId;
//薪资项目的IdList
private Set<Long> salaryItemIds;
//薪资核算记录的id")
private Long salaryAcctRecordId;
//薪资核算人员的id
private Set<Long> acctEmpIds;
}

View File

@ -1,7 +1,7 @@
package com.engine.salary.entity.salaryacct.po;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -108,6 +108,11 @@ public class SalaryAcctEmployeePO {
@ElogTransform(name = "更新时间")
private Date updateTime;
@ElogTransform(name = "锁定状态")
private Integer lockStatus;
//--------条件----------
//主键id集合
private Collection<Long> ids;

View File

@ -0,0 +1,100 @@
package com.engine.salary.entity.salaryacct.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* 账套快照
* <p>Copyright: Copyright (c) 2024</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//hrsa_salary_acct_sob_config
public class SalaryAcctSobConfigPO {
/**
* 主键id
*/
private Long id;
/**
* 薪资核算记录id
*/
private Long salaryAcctRecordId;
/**
* 薪资账套基本信息
*/
private String basicConfig;
/**
* 员工信息字段
*/
private String employeeFieldConfig;
/**
* 薪资项目
*/
private String itemConfig;
/**
* 薪资项目分类
*/
private String itemGroupConfig;
/**
* 回算薪资项目
*/
private String backItemConfig;
/**
* 调薪规则
*/
@Deprecated
private String adjustRuleConfig;
/**
* 校验规则
*/
@Deprecated
private String checkRuleConfig;
/**
* 租户key
*/
private String tenantKey;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
//主键id集合
private Collection<Long> ids;
}

View File

@ -78,6 +78,7 @@ public class SalaryArchiveBO {
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "部门"), "departmentName"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "工号"), "workcode"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86186, "证件号码"), "idNo"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "起始发薪日期"), "payStartDate"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "最后发薪日期"), "payEndDate"));

View File

@ -349,6 +349,7 @@ public class SalaryArchiveExcelBO extends Service {
String deparmentName = Optional.ofNullable(map.get(departmentI18n)).orElse("").toString();
String mobileName = Optional.ofNullable(map.get("手机号")).orElse("").toString();
String workcode = Optional.ofNullable(map.get("工号")).orElse("").toString();
String idNo = Optional.ofNullable(map.get("证件号码")).orElse("").toString();
String validType = importHandleParam.getEmpValidType();
List<DataCollectionEmployee> emps = new ArrayList<>();
@ -369,6 +370,10 @@ public class SalaryArchiveExcelBO extends Service {
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode)))
.collect(Collectors.toList());
}
else if ("2".equals(validType)) {
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(idNo) || Objects.equals(e.getIdNo(), idNo)))
.collect(Collectors.toList());
}
}
List<Long> employeeSameIds = new ArrayList<>();

View File

@ -89,6 +89,12 @@ public class SalaryArchiveListDTO {
@TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
private String workcode;
/**
* 证件号码
*/
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
private String idNo;
/**
* 员工状态
*/

View File

@ -67,8 +67,6 @@ public class SalarySobItemBO {
List<SalaryItemPO> defaultSalaryItemPOS,
Long employeeId, String tenantKey) {
Date now = new Date();
// 需要保存的隐藏项目
List<SalarySobItemHidePO> needInsertItemHides = new ArrayList<>();
// 处理薪资账套默认的薪资项目分类
Map<Long, Long> salarySobItemGroupIdMap = Maps.newHashMapWithExpectedSize(salarySobDefaultItemGroupPOS.size());
List<SalarySobItemGroupPO> salarySobItemGroups = Lists.newArrayListWithExpectedSize(salarySobDefaultItemGroupPOS.size());
@ -87,20 +85,6 @@ public class SalarySobItemBO {
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
salarySobItemGroupIdMap.put(salarySobDefaultItemGroupPO.getId(), salarySobItemGroupId);
// 保存薪资项目分类隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salarySobItemGroupId)
.isGroup(1)
.itemHide(0L)
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
@ -127,20 +111,6 @@ public class SalarySobItemBO {
.tenantKey(tenantKey)
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
// 保存薪资项目隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salaryItemPO.getId())
.isGroup(0)
.itemHide(Long.valueOf(salaryItemPO.getHideDefault()== null ? 0 : salaryItemPO.getHideDefault()))
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
// 处理薪资账套默认的自定义薪资项目开启了"默认使用"
for (int i = 0; i < defaultSalaryItemPOS.size(); i++) {
@ -167,19 +137,6 @@ public class SalarySobItemBO {
.tenantKey(tenantKey)
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
// 保存薪资项目隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salaryItemPO.getId())
.isGroup(0)
.itemHide(Long.valueOf(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault()))
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
// 薪资账套默认的回算薪资项目
@ -207,7 +164,7 @@ public class SalarySobItemBO {
}
return new Result().setNeedInsertSalarySobItems(salarySobItems).setNeedInsertSalarySobItemGroups(salarySobItemGroups)
.setNeedInsertSalarySobBackItems(salarySobBackItems).setNeedInsertItemHides(needInsertItemHides);
.setNeedInsertSalarySobBackItems(salarySobBackItems);
}
@Data
@ -228,10 +185,5 @@ public class SalarySobItemBO {
* 需要保存的回算薪资项目
*/
List<SalarySobBackItemPO> needInsertSalarySobBackItems;
/**
* 需要保存的薪资项目隐藏信息
*/
List<SalarySobItemHidePO> needInsertItemHides;
}
}

View File

@ -54,10 +54,16 @@ public class SalarySobRangeImportListDTO {
@ExcelProperty(index = 3)
private String jobNum;
//证件号码
@SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo")
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
@ExcelProperty(index = 4)
private String idNo;
//人员状态
@SalaryTableColumn(text = "员工状态", width = "10%", column = "employeeStatus")
@TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus")
@ExcelProperty(index = 4)
@ExcelProperty(index = 5)
private String employeeStatus;
}

View File

@ -8,9 +8,13 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import java.util.Collection;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Harryxzy
@ -116,4 +120,28 @@ public class SalarySobBackItemPO{
* 薪资项目id
*/
private Collection<Long> salaryItemIds;
public String toCompareString() {
return "SalarySobBackItemPO{" +
"salarySobId=" + salarySobId +
", salaryItemId=" + salaryItemId +
", salaryItemCode='" + salaryItemCode + '\'' +
", dataType='" + dataType + '\'' +
", roundingMode=" + roundingMode +
", pattern=" + pattern +
", valueType=" + valueType +
", formulaId=" + formulaId +
", backCalcType=" + backCalcType +
'}';
}
public static String toCompareString(List<SalarySobBackItemPO> salarySobBackItems) {
if (CollectionUtils.isEmpty(salarySobBackItems)) {
return "";
}
return salarySobBackItems.stream()
.sorted(Comparator.comparingLong(SalarySobBackItemPO::getSalaryItemId))
.map(SalarySobBackItemPO::toCompareString)
.collect(Collectors.joining(","));
}
}

View File

@ -5,9 +5,13 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.collections4.CollectionUtils;
import java.util.Collection;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 薪资账套-薪资项目-员工基本信息
@ -76,4 +80,23 @@ public class SalarySobEmpFieldPO {
private Date updateTime;
Collection<Long> ids;
public String toCompareString() {
return "SalarySobEmpFieldPO{" +
"salarySobId=" + salarySobId +
", fieldCode='" + fieldCode + '\'' +
", sortedIndex=" + sortedIndex +
", canDelete=" + canDelete +
'}';
}
public static String toCompareString(List<SalarySobEmpFieldPO> salarySobEmpFields) {
if (CollectionUtils.isEmpty(salarySobEmpFields)) {
return "";
}
return salarySobEmpFields.stream()
.sorted(Comparator.comparingInt(SalarySobEmpFieldPO::getSortedIndex))
.map(SalarySobEmpFieldPO::toCompareString)
.collect(Collectors.joining(","));
}
}

View File

@ -4,9 +4,13 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import java.util.Collection;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 薪资账套薪资项目分组
@ -77,4 +81,22 @@ public class SalarySobItemGroupPO {
private Long itemHide;
Collection<Long> ids;
public String toCompareString() {
return "SalarySobItemGroupPO{" +
"name='" + name + '\'' +
", sortedIndex=" + sortedIndex +
", itemHide=" + itemHide +
'}';
}
public static String toCompareString(List<SalarySobItemGroupPO> salarySobItemGroups) {
if (CollectionUtils.isEmpty(salarySobItemGroups)) {
return "";
}
return salarySobItemGroups.stream()
.sorted(Comparator.comparing(SalarySobItemGroupPO::getSortedIndex))
.map(SalarySobItemGroupPO::toCompareString)
.collect(Collectors.joining(","));
}
}

View File

@ -7,9 +7,13 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import java.util.Collection;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 薪资账套薪资项目
@ -124,4 +128,30 @@ public class SalarySobItemPO {
Collection<Long> notInSalaryItemIds;
public String toCompareString() {
return "SalarySobItemPO{" +
"salarySobId=" + salarySobId +
", salaryItemId=" + salaryItemId +
", salarySobItemGroupId=" + salarySobItemGroupId +
", formulaId=" + formulaId +
", sortedIndex=" + sortedIndex +
", canDelete=" + canDelete +
", roundingMode=" + roundingMode +
", pattern=" + pattern +
", valueType=" + valueType +
", itemHide=" + itemHide +
'}';
}
public static String toCompareString(List<SalarySobItemPO> salarySobItems) {
if (CollectionUtils.isEmpty(salarySobItems)) {
return "";
}
return salarySobItems.stream()
.sorted(Comparator.comparingLong(SalarySobItemPO::getSalaryItemId))
.map(SalarySobItemPO::toCompareString)
.collect(Collectors.joining(","));
}
}

View File

@ -1,6 +1,7 @@
package com.engine.salary.entity.salarysob.po;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.util.valid.Compare;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -26,12 +27,14 @@ public class SalarySobPO {
* 主键id
*/
@ElogTransform( name="主键" )
@Compare
private Long id;
/**
* 名称
*/
@ElogTransform( name="名称" )
@Compare
private String name;
/**
@ -44,42 +47,49 @@ public class SalarySobPO {
* 应税项目1:正常工资薪金所得
*/
@ElogTransform( name="薪资类型" )
@Compare
private Integer incomeCategory;
/**
* 薪资周期1:上上月2:上月3:本月4:下月
*/
@ElogTransform( name="薪资周期" )
@Compare
private Integer salaryCycleType;
/**
* 薪资周期的起始日期
*/
@ElogTransform( name="薪资周期起始日期" )
@Compare
private Integer salaryCycleFromDay;
/**
* 税款所属期1:上上月2:上月3:本月4:下月
*/
@ElogTransform( name="税款所属期" )
@Compare
private Integer taxCycleType;
/**
* 考勤周期1:上上月2:上月3:本月4:下月
*/
@ElogTransform( name="考勤周期" )
@Compare
private Integer attendCycleType;
/**
* 考勤周期的起始日期
*/
@ElogTransform( name="考勤周期起始日期" )
@Compare
private Integer attendCycleFromDay;
/**
* 社保福利所属期1:上上月2:上月3:本月4:下月
*/
@ElogTransform( name="社保福利所属期" )
@Compare
private Integer socialSecurityCycleType;
/**

View File

@ -25,4 +25,9 @@ public class InsuranceArchivesSaveParam {
private String paymentForm;
private String paymentComForm;
/**
* 是否修改数据为上限或下限
*/
private Boolean changeData;
}

View File

@ -36,6 +36,8 @@ public class InsuranceArchivesEmployeePO {
private String telephone;
private String idNo;
@I18n
private String departmentName;

View File

@ -2,6 +2,7 @@ package com.engine.salary.entity.siexport.po;
import com.engine.salary.annotation.I18n;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import lombok.Data;
/**
* @Author weaver_cl
@ -9,6 +10,7 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
* @Date 2022/3/7
* @Version V1.0
**/
@Data
public class AccountExportPO extends InsuranceAccountDetailPO {
@I18n
@ -16,58 +18,12 @@ public class AccountExportPO extends InsuranceAccountDetailPO {
private String telephone;
private String idNo;
@I18n
private String departmentName;
private Integer userStatus;
private String workcode;
public void setWorkcode(String workcode) {
this.workcode = workcode;
}
public String getWorkcode() {
return workcode;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
// public UserStatusEnum getUserStatus() {
// return userStatus;
// }
//
// public void setUserStatus(UserStatusEnum userStatus) {
// this.userStatus = userStatus;
// }
}

View File

@ -62,10 +62,16 @@ public class TaxAgentManageRangeEmployeeListDTO {
@ExcelProperty(index = 3)
private String jobNum;
//
@SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo")
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
@ExcelProperty(index = 4)
private String idNo;
//人员状态
@SalaryTableColumn(text = "员工状态", width = "10%", column = "employeeStatus")
@TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus")
@ExcelProperty(index = 4)
@ExcelProperty(index = 5)
private String employeeStatus;

View File

@ -3,25 +3,25 @@ package com.engine.salary.enums.salaryaccounting;
import com.engine.salary.enums.BaseEnum;
public enum LockStatusEnum implements BaseEnum<String> {
DEFAULT("DEFAULT", "默认", 0),
LOCK("LOCK", "锁定", 0),
UNLOCK("UNLOCK", "未锁定", 0);
public enum LockStatusEnum implements BaseEnum<Integer> {
LOCK(1, "LOCK", 0),
UNLOCK(0, "UNLOCK", 0);
private String value;
private Integer value;
private String defaultLabel;
private int labelId;
LockStatusEnum(String value, String defaultLabel, int labelId) {
LockStatusEnum(Integer value, String defaultLabel, int labelId) {
this.value = value;
this.defaultLabel = defaultLabel;
this.labelId = labelId;
}
@Override
public String getValue() {
public Integer getValue() {
return value;
}
@ -34,4 +34,13 @@ public enum LockStatusEnum implements BaseEnum<String> {
public String getDefaultLabel() {
return defaultLabel;
}
public static LockStatusEnum getByValue(Integer value) {
for (LockStatusEnum lockStatusEnum : LockStatusEnum.values()) {
if (lockStatusEnum.getValue().equals(value)) {
return lockStatusEnum;
}
}
return UNLOCK;
}
}

View File

@ -404,7 +404,7 @@ public class FormluaConstant {
" \"name\": \"IDCARD\",\n" +
" \"chineseName\": \"身份证函数\",\n" +
" \"description\": \"从身份证号码中获取相关信息比如生日BD、年龄AGE、籍贯NA、性别GENDER\",\n" +
" \"example\": \"IDCARD( 43070319980706334X , BD )\",\n" +
" \"example\": \"IDCARD( ******19980706**** , BD )\",\n" +
" \"result\": \"'1998-07-06'\",\n" +
" \"paramDescs\": [\n" +
" \"*身份证号码*(必选)\",\n" +

View File

@ -3,7 +3,6 @@ package com.engine.salary.formlua.entity.parameter;
import com.engine.salary.util.SalaryI18nUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@ -74,7 +73,7 @@ public class FuncDescUtil {
funcMap.put("RIGHT", SalaryI18nUtil.getI18nLabel(97740, "从文本右侧开始,返回指定字符数的文字。示例:<br> RIGHT('大家好', 2) 结果: '家好'"));
funcMap.put("MID", SalaryI18nUtil.getI18nLabel(97741, "从文本指定位置之后开始,返回指定字符数的文字。示例:<br> MID('大家好', 2, 1) 结果: '家'"));
funcMap.put("ISEMPTY", SalaryI18nUtil.getI18nLabel(97742, "变量为空或未填写,则返回真。示例:<br> ISEMPTY({员工表.电话})"));
funcMap.put("IDCARD", SalaryI18nUtil.getI18nLabel(97743, "从身份证号码中获取相关信息比如生日BD、年龄AGE、籍贯NA、性别GENDER。示例<br> IDCARD( 43070319980706334X , BD ) 结果: '1998-07-06'"));
funcMap.put("IDCARD", SalaryI18nUtil.getI18nLabel(97743, "从身份证号码中获取相关信息比如生日BD、年龄AGE、籍贯NA、性别GENDER。示例<br> IDCARD( ******19980706**** , BD ) 结果: '1998-07-06'"));
funcMap.put("SCORE", SalaryI18nUtil.getI18nLabel(97744, "获取选项型控件单选框、复选框、下拉菜单分数。示例SCORE({当前数据.单选框}) 结果:选项分数<br>注未设置选项分数时结果为0"));
funcMap.put("SUBSTRING", SalaryI18nUtil.getI18nLabel(97745, "字符截取函数,用于按起始位置截取字符。<br>示例SUBSTRING('abcdefg'23) <br>结果bc"));
funcMap.put("SUBSTITUE", SalaryI18nUtil.getI18nLabel(97746, "字符查找替换函数,替换字符中的所有关键词为新字符。<br>示例SUBSTITUE('泛微移动办公','泛微','eteams') <br>结果eteams移动办公"));

View File

@ -7,6 +7,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -32,6 +33,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -57,6 +59,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -121,6 +124,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -147,6 +151,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -173,6 +178,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *

View File

@ -94,11 +94,13 @@
, t.employee_type
, e.mobile
, e.workcode
, e.certificatenum as idNo
, e.lastname as username
, e.status AS employeeStatus
, e.companystartdate as companystartdate
, e.enddate as dismissdate
, e.status AS employeeStatus
,e.certificatenum as idNo
, d.departmentname AS departmentName
, c.subcompanyname AS subcompanyName
</sql>

View File

@ -163,7 +163,8 @@
e.lastname as username,
d.departmentname AS departmentName,
e.mobile,
e.workcode as job_num
e.workcode as job_num,
e.certificatenum as idNo
</sql>
<sql id="paramSql">

View File

@ -9,6 +9,7 @@
e.status,
e.mobile,
e.workcode,
e.certificatenum as idNo,
'false' as extEmp
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id

View File

@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
import java.util.Set;
/**
* 薪资核算人员
@ -16,7 +17,7 @@ import java.util.List;
* @author qiantao
* @version 1.0
**/
public interface SalaryAcctEmployeeMapper {
public interface SalaryAcctEmployeeMapper {
/**
* 批量插入
@ -117,4 +118,8 @@ public interface SalaryAcctEmployeeMapper {
* @return 返回记录没有返回null
*/
SalaryAcctEmployeePO getById(Long id);
void lockByAcctEmpIds(@Param("lockStatus") Integer lockStatus, @Param("acctEmpIds") Set<Long> acctEmpIds);
void lockByRecordId(@Param("lockStatus") Integer lockStatus, @Param("recordId") Long recordId);
}

View File

@ -15,6 +15,7 @@
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="employee_type" property="employeeType"/>
<result column="lock_status" property="lockStatus"/>
</resultMap>
<resultMap id="SalaryAccEmployeeCountMap"
@ -38,7 +39,8 @@
t.update_time,
t.delete_type,
t.tenant_key,
t.employee_type
t.employee_type,
t.lock_status
</sql>
<sql id="emp1Column">
@ -52,7 +54,7 @@
<insert id="batchInsert">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key,employee_type)
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
VALUES
<foreach collection="collection" item="emp" separator=",">
(
@ -66,14 +68,15 @@
#{emp.updateTime},
#{emp.deleteType},
#{emp.tenantKey},
#{emp.employeeType}
#{emp.employeeType},
#{emp.lockStatus}
)
</foreach>
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key,employee_type)
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
<foreach collection="collection" item="emp" separator="union all">
select
@ -87,7 +90,8 @@
#{emp.updateTime,jdbcType=DATE},
#{emp.deleteType,jdbcType=INTEGER},
#{emp.tenantKey,jdbcType=VARCHAR},
#{emp.employeeType,jdbcType=INTEGER}
#{emp.employeeType,jdbcType=INTEGER},
#{emp.lockStatus,jdbcType=INTEGER}
from dual
</foreach>
</insert>
@ -95,7 +99,7 @@
<foreach collection="collection" item="emp" separator=";">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key,employee_type)
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
VALUES
(
#{emp.salaryAcctRecordId},
@ -108,7 +112,8 @@
#{emp.updateTime},
#{emp.deleteType},
#{emp.tenantKey},
#{emp.employeeType}
#{emp.employeeType},
#{emp.lockStatus}
)
</foreach>
</insert>
@ -1144,6 +1149,7 @@
<result column="update_time" property="updateTime"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="lock_status" property="lockStatus"/>
</resultMap>
<!-- 表字段 -->
@ -1162,6 +1168,7 @@
, t.delete_type
, t.tenant_key
, t.employee_type
, t.lock_status
</sql>
@ -1252,4 +1259,22 @@
FROM hrsa_salary_acct_emp t
WHERE id = #{id} AND delete_type = 0
</select>
<update id="lockByAcctEmpIds">
UPDATE hrsa_salary_acct_emp
SET lock_status = #{lockStatus}
WHERE delete_type = 0
AND id IN
<foreach collection="acctEmpIds" open="(" item="acctEmpId" separator="," close=")">
#{acctEmpId}
</foreach>
</update>
<update id="lockByRecordId">
UPDATE hrsa_salary_acct_emp
SET lock_status = #{lockStatus}
WHERE delete_type = 0
AND salary_acct_record_id =#{recordId}
</update>
</mapper>

View File

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

View File

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.salaryacct.SalaryAcctSobConfigMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO">
<result column="adjust_rule_config" property="adjustRuleConfig"/>
<result column="back_item_config" property="backItemConfig"/>
<result column="basic_config" property="basicConfig"/>
<result column="check_rule_config" property="checkRuleConfig"/>
<result column="create_time" property="createTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="employee_field_config" property="employeeFieldConfig"/>
<result column="id" property="id"/>
<result column="item_config" property="itemConfig"/>
<result column="item_group_config" property="itemGroupConfig"/>
<result column="salary_acct_record_id" property="salaryAcctRecordId"/>
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t
.
adjust_rule_config
, t.back_item_config
, t.basic_config
, t.check_rule_config
, t.create_time
, t.creator
, t.delete_type
, t.employee_field_config
, t.id
, t.item_config
, t.item_group_config
, t.salary_acct_record_id
, t.tenant_key
, t.update_time
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_salary_acct_sob_config t
WHERE delete_type = 0
</select>
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns"/>
FROM hrsa_salary_acct_sob_config t
WHERE id = #{id} AND delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getBySalaryAcctRecordId" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns"/>
FROM hrsa_salary_acct_sob_config t
WHERE salary_acct_record_id = #{salaryAcctRecordId} AND delete_type = 0
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap"
parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_salary_acct_sob_config t
WHERE delete_type = 0
<if test="adjustRuleConfig != null">
AND adjust_rule_config = #{adjustRuleConfig}
</if>
<if test="backItemConfig != null">
AND back_item_config = #{backItemConfig}
</if>
<if test="basicConfig != null">
AND basic_config = #{basicConfig}
</if>
<if test="checkRuleConfig != null">
AND check_rule_config = #{checkRuleConfig}
</if>
<if test="createTime != null">
AND create_time = #{createTime}
</if>
<if test="creator != null">
AND creator = #{creator}
</if>
<if test="deleteType != null">
AND delete_type = #{deleteType}
</if>
<if test="employeeFieldConfig != null">
AND employee_field_config = #{employeeFieldConfig}
</if>
<if test="id != null">
AND id = #{id}
</if>
<if test="itemConfig != null">
AND item_config = #{itemConfig}
</if>
<if test="itemGroupConfig != null">
AND item_group_config = #{itemGroupConfig}
</if>
<if test="salaryAcctRecordId != null">
AND salary_acct_record_id = #{salaryAcctRecordId}
</if>
<if test="tenantKey != null">
AND tenant_key = #{tenantKey}
</if>
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="ids != null and ids.size()>0">
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO">
INSERT INTO hrsa_salary_acct_sob_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="adjustRuleConfig != null">
adjust_rule_config,
</if>
<if test="backItemConfig != null">
back_item_config,
</if>
<if test="basicConfig != null">
basic_config,
</if>
<if test="checkRuleConfig != null">
check_rule_config,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="employeeFieldConfig != null">
employee_field_config,
</if>
<if test="id != null">
id,
</if>
<if test="itemConfig != null">
item_config,
</if>
<if test="itemGroupConfig != null">
item_group_config,
</if>
<if test="salaryAcctRecordId != null">
salary_acct_record_id,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="adjustRuleConfig != null">
#{adjustRuleConfig},
</if>
<if test="backItemConfig != null">
#{backItemConfig},
</if>
<if test="basicConfig != null">
#{basicConfig},
</if>
<if test="checkRuleConfig != null">
#{checkRuleConfig},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="employeeFieldConfig != null">
#{employeeFieldConfig},
</if>
<if test="id != null">
#{id},
</if>
<if test="itemConfig != null">
#{itemConfig},
</if>
<if test="itemGroupConfig != null">
#{itemGroupConfig},
</if>
<if test="salaryAcctRecordId != null">
#{salaryAcctRecordId},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO">
UPDATE hrsa_salary_acct_sob_config
<set>
adjust_rule_config=#{adjustRuleConfig},
back_item_config=#{backItemConfig},
basic_config=#{basicConfig},
check_rule_config=#{checkRuleConfig},
create_time=#{createTime},
creator=#{creator},
delete_type=#{deleteType},
employee_field_config=#{employeeFieldConfig},
item_config=#{itemConfig},
item_group_config=#{itemGroupConfig},
salary_acct_record_id=#{salaryAcctRecordId},
tenant_key=#{tenantKey},
update_time=#{updateTime},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO">
UPDATE hrsa_salary_acct_sob_config
<set>
<if test="adjustRuleConfig != null">
adjust_rule_config=#{adjustRuleConfig},
</if>
<if test="backItemConfig != null">
back_item_config=#{backItemConfig},
</if>
<if test="basicConfig != null">
basic_config=#{basicConfig},
</if>
<if test="checkRuleConfig != null">
check_rule_config=#{checkRuleConfig},
</if>
<if test="createTime != null">
create_time=#{createTime},
</if>
<if test="creator != null">
creator=#{creator},
</if>
<if test="deleteType != null">
delete_type=#{deleteType},
</if>
<if test="employeeFieldConfig != null">
employee_field_config=#{employeeFieldConfig},
</if>
<if test="itemConfig != null">
item_config=#{itemConfig},
</if>
<if test="itemGroupConfig != null">
item_group_config=#{itemGroupConfig},
</if>
<if test="salaryAcctRecordId != null">
salary_acct_record_id=#{salaryAcctRecordId},
</if>
<if test="tenantKey != null">
tenant_key=#{tenantKey},
</if>
<if test="updateTime != null">
update_time=#{updateTime},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 根据主键删除记录 -->
<delete id="delete">
UPDATE hrsa_salary_acct_sob_config
SET delete_type=1
WHERE id = #{id}
AND delete_type = 0
</delete>
<delete id="deleteByIds">
UPDATE hrsa_salary_acct_sob_config
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteBySalaryAcctRecordIds">
UPDATE hrsa_salary_acct_sob_config
SET delete_type = 1
WHERE delete_type = 0
AND salary_acct_record_id IN
<foreach collection="salaryAcctRecordIds" open="(" item="salaryAcctRecordId" separator="," close=")">
#{salaryAcctRecordId}
</foreach>
</delete>
</mapper>

View File

@ -22,8 +22,6 @@ public interface SalarySobItemGroupMapper {
*/
List<SalarySobItemGroupPO> listSome(SalarySobItemGroupPO salarySobItemGroup);
List<SalarySobItemGroupPO> listSomeWithItemHide(SalarySobItemGroupPO build);
/**
* 根据主键查询
*

View File

@ -29,6 +29,7 @@
, t.creator
, t.delete_type
, t.tenant_key
, t.item_hide
</sql>
<!-- 查询全部 -->
@ -95,33 +96,6 @@
<select id="listSomeWithItemHide" resultMap="BaseResultMap"
parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO">
SELECT
t
.
id
, t.salary_sob_id
, t.name
, t.sorted_index
, t.description
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
, h.item_hide
from hrsa_salary_sob_item_group t LEFT JOIN hrsa_salary_item_hide h ON t.id=h.salary_item_id
where t.delete_type=0
<if test="id != null">
AND t.id = #{id}
</if>
<if test="salarySobId != null">
AND t.salary_sob_id = #{salarySobId}
</if>
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO">
@ -158,6 +132,9 @@
<if test="tenantKey != null">
tenant_key,
</if>
<if test="itemHide != null">
item_hide,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -190,6 +167,9 @@
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="itemHide != null">
#{itemHide},
</if>
</trim>
</insert>
@ -206,6 +186,7 @@
creator=#{creator},
delete_type=#{deleteType},
tenant_key=#{tenantKey},
item_hide=#{itemHide},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -242,6 +223,9 @@
<if test="tenantKey != null">
tenant_key=#{tenantKey},
</if>
<if test="itemHide != null">
item_hide=#{itemHide},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -278,7 +262,7 @@
<insert id="batchInsert">
INSERT INTO hrsa_salary_sob_item_group(id, salary_sob_id, name, sorted_index, description, create_time,
update_time, creator, tenant_key)
update_time, creator, tenant_key,item_hide)
VALUES
<foreach collection="collection" item="item" separator=",">
(
@ -290,13 +274,14 @@
#{item.createTime},
#{item.updateTime},
#{item.creator},
#{item.tenantKey}
#{item.tenantKey},
#{item.itemHide}
)
</foreach>
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_sob_item_group(id, salary_sob_id, name, sorted_index, description, create_time,
update_time, creator, tenant_key)
update_time, creator, tenant_key,item_hide)
<foreach collection="collection" item="item" separator="union all">
select
@ -308,14 +293,15 @@
#{item.createTime,jdbcType=DATE},
#{item.updateTime,jdbcType=DATE},
#{item.creator,jdbcType=DOUBLE},
#{item.tenantKey,jdbcType=VARCHAR}
#{item.tenantKey,jdbcType=VARCHAR},
#{item.itemHide,jdbcType=VARCHAR}
from dual
</foreach>
</insert>
<insert id="batchInsert" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";">
INSERT INTO hrsa_salary_sob_item_group(id, salary_sob_id, name, sorted_index, description, create_time,
update_time, creator, tenant_key)
update_time, creator, tenant_key,item_hide)
VALUES
(
#{item.id},
@ -326,7 +312,8 @@
#{item.createTime},
#{item.updateTime},
#{item.creator},
#{item.tenantKey}
#{item.tenantKey},
#{item.itemHide}
)
</foreach>
</insert>

View File

@ -1,6 +1,5 @@
package com.engine.salary.mapper.salarysob;
import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import org.apache.ibatis.annotations.Param;
@ -24,7 +23,6 @@ public interface SalarySobItemMapper {
*/
List<SalarySobItemPO> listSome(SalarySobItemPO salarySobItemPO);
List<SalarySobItemPO> listBySalarySobIdWithHideItem(SalarySobItemPO salarySobItemPO);
/**
@ -35,14 +33,7 @@ public interface SalarySobItemMapper {
*/
SalarySobItemPO getById(Long id);
/**
* 新增忽略null字段
*
* @param salarySobItemPO 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(SalarySobItemPO salarySobItemPO);
/**
* 修改修改所有字段
*
@ -50,7 +41,7 @@ public interface SalarySobItemMapper {
* @return 返回影响行数
*/
int update(SalarySobItemPO salarySobItemPO);
/**
* 修改忽略null字段
*
@ -97,12 +88,6 @@ public interface SalarySobItemMapper {
*/
void deleteItemShowBySalarySobId(@Param("salarySobIds")Collection<Long> salarySobIds);
/**
* 插入薪资项目分组是否显示
* @param salarySobItemHidePO
*/
void insertItemShow(SalarySobItemHidePO salarySobItemHidePO);
/**
* 根据账套id以及薪资项目分组获取
* @param
@ -112,9 +97,4 @@ public interface SalarySobItemMapper {
void deleteByGroupIds(@Param("groupIds") List<Long> needDeleteGroupIds);
/**
* 批量插入薪资项目分组是否显示
* @param list
*/
void batchInsertItemShow(@Param("collection")List<SalarySobItemHidePO> list);
}

View File

@ -15,6 +15,7 @@
<result column="tenant_key" property="tenantKey"/>
<result column="update_time" property="updateTime"/>
<result column="can_delete" property="canDelete"/>
<result column="item_hide" property="itemHide"/>
</resultMap>
<!-- 表字段 -->
@ -37,6 +38,7 @@
, t.rounding_mode
, t.pattern
, t.value_type
, t.item_hide
</sql>
<!-- 查询全部 -->
@ -147,122 +149,6 @@
</select>
<select id="listBySalarySobIdWithHideItem"
resultType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
SELECT
t.create_time
, t.creator
, t.delete_type
, t.description
, t.formula_id
, t.id
, t.salary_item_id
, t.salary_sob_id
, t.salary_sob_item_group_id
, t.sorted_index
, t.tenant_key
, t.update_time
, t.rounding_mode
, t.pattern
, t.value_type
,t.can_delete
,h.item_hide
FROM hrsa_salary_sob_item t
LEFT JOIN hrsa_salary_item_hide h ON t.salary_item_id=h.salary_item_id and t.salary_sob_id = h.salary_sob_id
WHERE t.delete_type = 0
and t.salary_sob_id=#{salarySobId}
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
INSERT INTO hrsa_salary_sob_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="description != null">
description,
</if>
<if test="formulaId != null">
formula_id,
</if>
<if test="id != null">
id,
</if>
<if test="salaryItemId != null">
salary_item_id,
</if>
<if test="salarySobId != null">
salary_sob_id,
</if>
<if test="salarySobItemGroupId != null">
salary_sob_item_group_id,
</if>
<if test="sortedIndex != null">
sorted_index,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="canDelete != null">
can_delete,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="createTime != null">
#{createTime},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="description != null">
#{description},
</if>
<if test="formulaId != null">
#{formulaId},
</if>
<if test="id != null">
#{id},
</if>
<if test="salaryItemId != null">
#{salaryItemId},
</if>
<if test="salarySobId != null">
#{salarySobId},
</if>
<if test="salarySobItemGroupId != null">
#{salarySobItemGroupId},
</if>
<if test="sortedIndex != null">
#{sortedIndex},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="canDelete != null">
can_delete,
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
UPDATE hrsa_salary_sob_item
@ -282,6 +168,7 @@
rounding_mode=#{roundingMode},
pattern=#{pattern},
value_type=#{valueType},
item_hide=#{itemHide},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -336,6 +223,9 @@
<if test="valueType != null">
value_type=#{valueType},
</if>
<if test="itemHide != null">
item_hide=#{itemHide},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
@ -382,7 +272,7 @@
<insert id="batchInsert">
INSERT INTO hrsa_salary_sob_item(salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type)
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type,item_hide)
VALUES
<foreach collection="collection" item="item" separator=",">
(
@ -400,13 +290,14 @@
#{item.canDelete},
#{item.roundingMode},
#{item.pattern},
#{item.valueType}
#{item.valueType},
#{item.itemHide}
)
</foreach>
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type)
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type,item_hide)
<foreach collection="collection" item="item" separator="union all">
select
@ -424,14 +315,15 @@
#{item.canDelete,jdbcType=INTEGER},
#{item.roundingMode,jdbcType=INTEGER},
#{item.pattern,jdbcType=INTEGER},
#{item.valueType,jdbcType=INTEGER}
#{item.valueType,jdbcType=INTEGER},
#{item.itemHide,jdbcType=DOUBLE}
from dual
</foreach>
</insert>
<insert id="batchInsert" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";">
INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type)
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type,item_hide)
VALUES
(
#{item.salarySobId},
@ -448,77 +340,12 @@
#{item.canDelete},
#{item.roundingMode},
#{item.pattern},
#{item.valueType}
#{item.valueType},
#{item.itemHide}
)
</foreach>
</insert>
<insert id="insertItemShow">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
VALUES (#{id},#{salarySobId},#{salaryItemId},
#{isGroup},#{itemHide},#{creator},
#{tenantKey},#{createTime},#{updateTime},0)
</insert>
<insert id="batchInsertItemShow">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
VALUES
<foreach collection="collection" item="item" separator=",">
(
#{item.id},
#{item.salarySobId},
#{item.salaryItemId},
#{item.isGroup},
#{item.itemHide},
#{item.creator},
#{item.tenantKey},
#{item.createTime},
#{item.updateTime},
0
)
</foreach>
</insert>
<insert id="batchInsertItemShow" databaseId="oracle">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
<foreach collection="collection" item="item" separator="union all">
select
#{item.id,jdbcType=DOUBLE},
#{item.salarySobId,jdbcType=DOUBLE},
#{item.salaryItemId,jdbcType=DOUBLE},
#{item.isGroup,jdbcType=INTEGER},
#{item.itemHide,jdbcType=INTEGER},
#{item.creator,jdbcType=DOUBLE},
#{item.tenantKey,jdbcType=VARCHAR},
#{item.createTime,jdbcType=DATE},
#{item.updateTime,jdbcType=DATE},
0
from dual
</foreach>
</insert>
<insert id="batchInsertItemShow" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
VALUES
(
#{item.id},
#{item.salarySobId},
#{item.salaryItemId},
#{item.isGroup},
#{item.itemHide},
#{item.creator},
#{item.tenantKey},
#{item.createTime},
#{item.updateTime},
0
)
</foreach>
</insert>
<update id="deleteByGroupIds">
UPDATE hrsa_salary_sob_item
SET delete_type = 1

View File

@ -355,7 +355,7 @@
<select id="queryEmployeeList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO">
SELECT base.id AS baseInfoId, e.ID AS employeeId, e.lastname AS userName, e.departmentid AS departmentId, e.workcode AS jobNum, e.MOBILE AS telephone,
d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,
d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,e.certificatenum as idNo,
e.enddate as dimissionDate,
social.siSchemeId,
base.payment_organization AS paymentOrganization,

View File

@ -1,5 +1,6 @@
package com.engine.salary.report.entity.bo;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
@ -259,8 +260,8 @@ public class SalaryStatisticsReportBO {
String[] itemValues = item.getItemValue().split(COMMA);
for (String itemId : itemValues) {
for (Map<String, String> x : nowDetail) {
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId))) {
sumDecimal = sumDecimal.add(new BigDecimal(x.get(itemId)));
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId)) && NumberUtil.isNumber(x.get(itemId).trim())) {
sumDecimal = sumDecimal.add(new BigDecimal(x.get(itemId).trim()));
}
}
}
@ -274,8 +275,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : lastDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
lastSumDecimal = lastSumDecimal.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
lastSumDecimal = lastSumDecimal.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -289,8 +290,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : sameDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
sameSumDecimal = sameSumDecimal.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
sameSumDecimal = sameSumDecimal.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -311,8 +312,8 @@ public class SalaryStatisticsReportBO {
String[] itemValues = item.getItemValue().split(COMMA);
for (String itemId : itemValues) {
for (Map<String, String> x : nowDetail) {
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId))) {
avgDecimal = avgDecimal.add(new BigDecimal(x.get(itemId)));
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId)) && NumberUtil.isNumber(x.get(itemId).trim())) {
avgDecimal = avgDecimal.add(new BigDecimal(x.get(itemId).trim()));
}
}
}
@ -327,8 +328,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : lastDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
lastAvgDecimal = lastAvgDecimal.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
lastAvgDecimal = lastAvgDecimal.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -343,8 +344,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : sameDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
sameAvgDecimal = sameAvgDecimal.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
sameAvgDecimal = sameAvgDecimal.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -367,8 +368,8 @@ public class SalaryStatisticsReportBO {
String[] itemValues = item.getItemValue().split(COMMA);
for (String itemId : itemValues) {
for (Map<String, String> x : nowDetail) {
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId))) {
decimalList.add(new BigDecimal(x.get(itemId)));
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId)) && NumberUtil.isNumber(x.get(itemId).trim())) {
decimalList.add(new BigDecimal(x.get(itemId).trim()));
}
}
}
@ -384,8 +385,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : lastDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
decimalList.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
decimalList.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -400,8 +401,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : sameDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
decimalList.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
decimalList.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -424,8 +425,8 @@ public class SalaryStatisticsReportBO {
String[] itemValues = item.getItemValue().split(COMMA);
for (String itemId : itemValues) {
for (Map<String, String> x : nowDetail) {
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId))) {
decimalList.add(new BigDecimal(x.get(itemId)));
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId)) && NumberUtil.isNumber(x.get(itemId).trim())) {
decimalList.add(new BigDecimal(x.get(itemId).trim()));
}
}
}
@ -441,8 +442,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : lastDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
decimalList.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim()) ) {
decimalList.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -457,8 +458,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : sameDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
decimalList.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
decimalList.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -481,8 +482,8 @@ public class SalaryStatisticsReportBO {
String[] itemValues = item.getItemValue().split(COMMA);
for (String itemId : itemValues) {
for (Map<String, String> x : nowDetail) {
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId))) {
decimalList.add(new BigDecimal(x.get(itemId)));
if (MapUtils.isNotEmpty(x) && StringUtils.isNotBlank(x.get(itemId)) && NumberUtil.isNumber(x.get(itemId).trim())) {
decimalList.add(new BigDecimal(x.get(itemId).trim()));
}
}
}
@ -498,8 +499,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : lastDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
decimalList.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
decimalList.add(new BigDecimal(y.get(itemId).trim()));
}
}
}
@ -514,8 +515,8 @@ public class SalaryStatisticsReportBO {
String[] lastItemValues = item.getItemValue().split(COMMA);
for (String itemId : lastItemValues) {
for (Map<String, String> y : sameDetail) {
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId))) {
decimalList.add(new BigDecimal(y.get(itemId)));
if (MapUtils.isNotEmpty(y) && StringUtils.isNotBlank(y.get(itemId)) && NumberUtil.isNumber(y.get(itemId).trim())) {
decimalList.add(new BigDecimal(y.get(itemId).trim()));
}
}
}

View File

@ -7,11 +7,11 @@ import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam;
import com.engine.salary.entity.siarchives.param.SIArchiveBaseHistoryListParam;
import com.engine.salary.entity.siarchives.po.*;
import com.engine.salary.util.page.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.util.*;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* @Author weaver_cl
@ -141,7 +141,9 @@ public interface SIArchivesService {
Map<Long, InsuranceArchivesAccountPO> buildBatchAccount(List<Long> ids, Long paymentOrganization);
Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope);
Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope, StringBuilder errorMsg);
String adaptWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope);
String checkAndBuildWelBaseWithLimit(Long primaryId, String paymentBaseString, Integer paymentScope);

View File

@ -256,6 +256,12 @@ public interface SalaryAcctEmployeeService {
*/
List<SalaryAcctEmployeePO> listByTaxAgentAndSalaryMonth(List<Long> taxAgentIds, Set<Date> salaryMonths);
/**
* 锁定人员
* @param updateParam
*/
void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam);
/**
* 宁波精华二开 - 删除离职账套中包含的人员
* @param salaryAcctRecordId

View File

@ -158,7 +158,7 @@ public interface SalaryAcctResultService {
List<SalaryAcctResultPO> listBySalaryAcctRecordIdsAndTaxAgentIds(Collection<Long> salaryAcctRecordIds, Collection<Long> taxAgentIds);
/**
* 更新锁定状态
* 锁定项目
*
* @param updateParam
*/

View File

@ -0,0 +1,86 @@
package com.engine.salary.service;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctConfig;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO;
import java.util.Collection;
/**
* 薪资核算的账套副本配置
* <p>Copyright: Copyright (c) 2024</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public interface SalaryAcctSobConfigService{
/**
* 根据薪资核算记录id查询薪资核算的账套配置
*
* @param salaryAcctRecordId
* @return
*/
SalaryAcctSobConfigPO getBySalaryAcctRecordId(Long salaryAcctRecordId);
/**
* 获取账套快照
* @param salaryAcctRecordId
* @return
*/
SalaryAcctConfig getSalaryAcctConfig(Long salaryAcctRecordId);
/**
* 根据薪资核算记录id查询薪资核算的账套配置
*
* @param needInit 倘若当前薪资核算还没有保存账套配置是否需要初始化一个此处初始化不会入库
* @param salaryAcctRecordId
* @return
*/
SalaryAcctSobConfigPO getBySalaryAcctRecordId(boolean needInit, Long salaryAcctRecordId);
/**
* 薪资核算的账套配置转换成薪资账套的聚合对象
*
* @param salaryAcctRecordId
* @return
*/
SalarySobItemAggregateDTO getSalarySobItemAggregate(Long salaryAcctRecordId);
/**
* 薪资核算的账套配置转换成薪资账套的聚合对象
*
* @param salaryAcctRecordId
* @return
*/
SalarySobItemAggregateDTO getSalarySobItemAggregateNoFormula(Long salaryAcctRecordId);
/**
* 初始化薪资核算的账套配置
*
* @param salaryAcctRecord
*/
SalaryAcctSobConfigPO initBySalaryAcctRecord(SalaryAcctRecordPO salaryAcctRecord);
/**
*
* @param salaryAcctSobConfig
*/
void save(SalaryAcctSobConfigPO salaryAcctSobConfig);
/**
* 更新薪资核算的账套配置
*
* @param salaryAcctRecordId
*/
void updateBySalaryAcctRecordId(Long salaryAcctRecordId);
/**
* 删除薪资核算的账套配置
*
* @param salaryAcctRecordIds
*/
void deleteBySalaryAcctRecordIds(Collection<Long> salaryAcctRecordIds);
}

View File

@ -85,9 +85,10 @@ public interface SalaryEmployeeService {
* @param deparmentName 部门
* @param mobile 手机号
* @param workcode 工号
* @param idNo 身份证号
* @param uid 人员id
*/
List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, String idNo, Long uid);
String empValidType();

View File

@ -31,14 +31,6 @@ public interface SalarySobItemGroupService {
*/
List<SalarySobItemGroupPO> listBySalarySobId(Long salarySobId);
/**
* 根据薪资账套id查询薪资账套的薪资项目分类带上隐藏信息
*
* @param salarySobId 薪资账套id
* @return
*/
List<SalarySobItemGroupPO> listBySalarySobIdWithItemHide(Long salarySobId);
/**
* 批量保存
*

View File

@ -4,6 +4,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO;
import java.util.List;
@Deprecated
public interface SalarySobItemHideService {
/**

View File

@ -33,14 +33,6 @@ public interface SalarySobItemService {
*/
List<SalarySobItemPO> listBySalarySobId(Long salarySobId);
/**
* 根据薪资账套id查询薪资账套的薪资项目副本(不包括已隐藏的薪资项目列)
*
* @param salarySobId 薪资账套的id
* @return
*/
List<SalarySobItemPO> listBySalarySobIdWithHideItem(Long salarySobId);
/**
* 根据薪资账套id和薪资项目分类查询薪资账套的薪资项目副本
*
@ -89,11 +81,18 @@ public interface SalarySobItemService {
SalarySobItemAggregateDTO getAggregateBySalarySobId(Long salarySobId);
/**
* 根据薪资账套id获取薪资账套的薪资项目聚合员工信息薪资项目副本薪资项目分类(不包含已设置为隐藏的)
* @param salarySobId
* 根据薪资核算id获取薪资账套的薪资项目聚合员工信息薪资项目副本薪资项目分类
* @param salaryAcctRecordId 核算记录id
* @param hideItem true过滤隐藏项目false显示隐藏项目
* @return
*/
SalarySobItemAggregateDTO getAggregateWithItemHideBySalarySobId(Long salarySobId, boolean isBackCalc);
SalarySobItemAggregateDTO getAggregateByRecordId(Long salaryAcctRecordId, boolean hideItem);
/**
* 根据薪资账套id获取薪资账套的薪资项目聚合员工信息薪资项目副本薪资项目分类(不包含已设置为隐藏的)
* @return
*/
SalarySobItemAggregateDTO getAggregateWithItemHideBySalarySobId(Long salaryAcctRecordId,Long salarySobId, boolean isBackCalc);
/**
* 保存

View File

@ -235,9 +235,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null);
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {
//姓名 不能为空

View File

@ -606,9 +606,10 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null);
//当人员信息导入筛选的全局配置为"0"姓名才是必填项
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {

View File

@ -32,6 +32,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.datacollection.AttendQuoteSourceTypeEnum;
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.AttendQuoteDataMapper;
import com.engine.salary.mapper.salarysob.SalarySobMapper;
@ -177,6 +178,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
map.put("departmentName", m.getDepartmentName());
map.put("mobile", m.getMobile());
map.put("jobNum", m.getJobNum());
map.put("idNo", m.getIdNo());
// 考勤数据
attendQuoteDataValues.stream().filter(a -> a.getAttendQuoteDataId().equals(m.getId())).collect(Collectors.toList()).forEach(e -> {
map.put(e.getAttendQuoteFieldId() + "_attendQuoteData", e.getDataValue());
@ -551,6 +553,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
header.add(SalaryI18nUtil.getI18nLabel(86185, "部门"));
header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
header.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
// 动态列
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
header.add(attendQuoteField.getFieldName());
@ -630,7 +633,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL);
// 获取已设置的可同步的考勤字段
List<AttendQuoteFieldPO> attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.IMPORT);
// 生成获取考勤引用
@ -702,10 +705,11 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
String deparmentName = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86185, "部门"))).orElse("").toString();
String mobile = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"))).orElse("").toString();
String workcode = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "工号"))).orElse("").toString();
String idNo = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"))).orElse("").toString();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null);
//含在职和离职选在职数据
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
employeeSameIds = emps.stream()

View File

@ -64,6 +64,7 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 1933, "工号"), "workcode"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom"));
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth"));

View File

@ -251,10 +251,11 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
String deparmentName = dto.getDepartmentName();
String mobile = dto.getMobile();
String workcode = dto.getJobNum();
String idNo = dto.getIdNo();
List<Long> employeeSameIds = new ArrayList<>();
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null);
//含在职和离职选在职数据
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
employeeSameIds = emps.stream()

View File

@ -30,6 +30,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.Util;
import weaver.hrm.User;
import java.text.ParseException;
@ -104,6 +105,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())) : "");
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
record.put("workcode", StringUtils.isBlank(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode());
record.put("idNo", Util.null2String(simpleEmployee.getIdNo()));
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
record.put("socialAccount", item.getSocialAccount());

View File

@ -1592,10 +1592,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
"部门",
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
"账单月份");
// List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth");
List<String> dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode", "socialPayOrg", "billMonth");
List<String> dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode","idNo", "socialPayOrg", "billMonth");
// 查询福利核算项目
List<String> welfareNames = (List<String>) param.getWelfareNames();
headerList.addAll(welfareNames);
@ -1758,6 +1759,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
String deparmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
@ -1770,7 +1772,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;
@ -1985,10 +1987,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
"部门",
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
"账单月份",
"补缴月份");
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth", "supplementaryMonth");
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName", "billMonth", "supplementaryMonth");
// 查询福利核算项目
List<String> welfareNames = (List<String>) param.getWelfareNames();
headerList.addAll(welfareNames);
@ -2043,6 +2046,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
resultMap.put("departmentName", employee.getDepartmentName());
resultMap.put("mobile", employee.getMobile());
resultMap.put("workcode", employee.getWorkcode());
resultMap.put("idNo", employee.getIdNo());
resultMap.put("taxAgentName", taxAgentPO.getName());
resultMap.put("billMonth", billMonth);
resultMap.put("supplementaryMonth", po.getSupplementaryMonth());
@ -3036,6 +3040,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
String deparmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
@ -3048,7 +3053,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, idNo,null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;
@ -3759,28 +3764,26 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
"部门",
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人")
);
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName");
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName");
// 查询福利核算项目
List<String> welfareNames = (List<String>) param.getWelfareNames();
headerList.addAll(welfareNames);
// //查询当前已有的补缴数据
// List<Map<String, Object>> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
// // excel导出的数据
// List<List<Object>> rows = Lists.newArrayListWithExpectedSize(resultMapList.size());
// rows.add(headerList);
// for (Map<String, Object> map : resultMapList) {
// List<Object> row = Lists.newArrayListWithExpectedSize(headerList.size());
// for (String dataIndex : dataIndexList) {
// row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY));
// }
// rows.add(row);
// }
List<List<Object>> rows = new ArrayList<>();
//查询当前已有的补差数据
List<Map<String, Object>> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
// excel导出的数据
rows.add(headerList);
for (Map<String, Object> map : resultMapList) {
List<Object> row = Lists.newArrayListWithExpectedSize(headerList.size());
for (String dataIndex : dataIndexList) {
row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY));
}
rows.add(row);
}
String sheetName = "福利核算-补差导入模板";
return ExcelUtil.genWorkbookV2(rows, sheetName);
@ -3898,6 +3901,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
String departmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
@ -3910,7 +3914,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;

View File

@ -16,11 +16,11 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.cmd.siarchives.SIArchivesTipsCmd;
import com.engine.salary.common.SalaryContext;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO;
@ -169,6 +169,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
return MapperProxyFactory.getProxy(InsuranceBaseAdjustHistoryMapper.class);
}
private ICategoryMapper getICategoryMapper() {
return MapperProxyFactory.getProxy(ICategoryMapper.class);
}
@Override
public Map<String, Object> getTips(Map<String, Object> params) {
@ -768,9 +772,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
if (insuranceArchivesEmployeePOS == null) {
insuranceArchivesEmployeePOS = new ArrayList<>();
}
// List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
List<Map<String, Object>> records = buildTableData(insuranceArchivesEmployeePOS);
// List<WeaTableColumn> columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID());
List<WeaTableColumn> columns = buildWeaTableColumns(insuranceArchivesEmployeePOS);
//工作簿list
@ -1697,6 +1699,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
map.put("subcompanyName", item.getSubcompanyName());
map.put("departmentId", item.getDepartmentId());
map.put("jobNum", item.getJobNum());
map.put("idNo", item.getIdNo());
map.put("companystartdate", item.getCompanystartdate());
map.put("dismissdate", item.getDimissionDate());
map.put("mobile", item.getTelephone());
@ -1924,10 +1927,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate"));
// list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "合同到期日期"), "dismissdate"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保账号"), "socialAccount"));
@ -2843,6 +2844,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.paymentOrganization(param.getPaymentOrganization())
.build();
String combineErrorMsg = "";
if (oldOtherInfoList.size() == 1) {
InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0);
//设置福利档案基数调整记录数据
@ -2870,17 +2872,40 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.otherPaymentBaseString(paramReq.getPaymentForm())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String otherPaymentBaseString = adaptWelBaseLimit(updateOtherInfo.getOtherSchemeId(), updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
if (otherPaymentBaseString != null) {
updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg = "其他福利个人: " + errorMsg;
}
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String otherPaymentComBaseString = adaptWelBaseLimit(updateOtherInfo.getOtherSchemeId(), updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
if (otherPaymentComBaseString != null) {
updateOtherInfo.setOtherPaymentComBaseString(otherPaymentComBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg += "其他福利公司:" + errorMsg;
}
}
}
if (StringUtils.isNotBlank(combineErrorMsg)) {
throw new SalaryRunTimeException(combineErrorMsg);
}
encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class);
getOtherSchemeMapper().updateById(updateOtherInfo);
//更新base_info表状态
@ -2918,17 +2943,40 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.otherPaymentBaseString(paramReq.getPaymentForm())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String otherPaymentBaseString = adaptWelBaseLimit(insertOtherInfo.getOtherSchemeId(), insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
if (otherPaymentBaseString != null) {
insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg = "其他福利个人:" + errorMsg;
}
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String otherPaymentComBaseString = adaptWelBaseLimit(insertOtherInfo.getOtherSchemeId(), insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
if (otherPaymentComBaseString != null) {
insertOtherInfo.setOtherPaymentComBaseString(otherPaymentComBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg += "其他福利公司:" + errorMsg;
}
}
}
if (StringUtils.isNotBlank(combineErrorMsg)) {
throw new SalaryRunTimeException(combineErrorMsg);
}
encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class);
getOtherSchemeMapper().insert(insertOtherInfo);
@ -3006,6 +3054,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.paymentOrganization(param.getPaymentOrganization())
.build();
String combineErrorMsg = "";
if (oldFundInfoList.size() == 1) {
InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0);
//设置福利档案基数调整记录数据
@ -3034,17 +3083,43 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.employeeId(param.getEmployeeId())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String fundPaymentBaseString = adaptWelBaseLimit(updateFundInfo.getFundSchemeId(), updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
if (fundPaymentBaseString != null) {
updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg = "公积金个人" + errorMsg;
}
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String fundPaymentComBaseString = adaptWelBaseLimit(updateFundInfo.getFundSchemeId(), updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
if (fundPaymentComBaseString != null) {
updateFundInfo.setFundPaymentComBaseString(fundPaymentComBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg += "公积金公司:" + errorMsg;
}
}
}
if (StringUtils.isNotBlank(combineErrorMsg)) {
throw new SalaryRunTimeException(combineErrorMsg);
}
encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class);
getFundSchemeMapper().updateById(updateFundInfo);
//更新base_info表状态
@ -3084,17 +3159,41 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.employeeId(param.getEmployeeId())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String fundPaymentBaseString = adaptWelBaseLimit(insertFundInfo.getFundSchemeId(), insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
if (fundPaymentBaseString != null) {
insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg = "公积金个人:" + errorMsg;
}
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String fundPaymentComBaseString = adaptWelBaseLimit(insertFundInfo.getFundSchemeId(), insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
if (fundPaymentComBaseString != null) {
insertFundInfo.setFundPaymentComBaseString(fundPaymentComBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg += "公积金公司:" + errorMsg;
}
}
}
if (StringUtils.isNotBlank(combineErrorMsg)) {
throw new SalaryRunTimeException(combineErrorMsg);
}
encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class);
getFundSchemeMapper().insert(insertFundInfo);
@ -3174,6 +3273,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build();
String combineErrorMsg = "";
//组装新数据
if (oldSocialInfoList.size() == 1) {
//老数据
@ -3204,17 +3305,42 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.paymentOrganization(param.getPaymentOrganization())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String socialPaymentBaseString = adaptWelBaseLimit(updateSocialInfo.getSocialSchemeId(), updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
if (socialPaymentBaseString != null) {
updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg = "社保个人:" + errorMsg;
}
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String socialPaymentComBaseString = adaptWelBaseLimit(updateSocialInfo.getSocialSchemeId(), updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
if (socialPaymentComBaseString != null) {
updateSocialInfo.setSocialPaymentComBaseString(socialPaymentComBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg += "社保公司:" + errorMsg;
}
}
}
if (StringUtils.isNotBlank(combineErrorMsg)) {
throw new SalaryRunTimeException(combineErrorMsg);
}
encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class);
getSocialSchemeMapper().updateById(updateSocialInfo);
//更新base_info表状态
@ -3254,17 +3380,40 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
.paymentOrganization(param.getPaymentOrganization())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String socialPaymentBaseString = adaptWelBaseLimit(insertSocialInfo.getSocialSchemeId(), insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
if (socialPaymentBaseString != null) {
insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
combineErrorMsg = "社保个人:" + errorMsg;
}
}
//需要拆分个人和公司福利基数时
if (welBaseDiffSign) {
insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm());
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
if (paramReq.getChangeData() != null && paramReq.getChangeData()) {
// 将不满足上下限基数修改为上限或下限
String socialPaymentComBaseString = adaptWelBaseLimit(insertSocialInfo.getSocialSchemeId(), insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
if (socialPaymentComBaseString != null) {
insertSocialInfo.setSocialPaymentComBaseString(socialPaymentComBaseString);
}
} else {
StringBuilder errorMsg = new StringBuilder("");
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg)) {
combineErrorMsg += "社保公司:" + errorMsg;
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
}
}
}
if (StringUtils.isNotBlank(combineErrorMsg)) {
throw new SalaryRunTimeException(combineErrorMsg);
}
encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class);
getSocialSchemeMapper().insert(insertSocialInfo);
@ -3316,7 +3465,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
* @return
*/
@Override
public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope) {
public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope, StringBuilder errorMsg) {
if (primaryId ==null || paymentBaseString == null) {
return true;
@ -3325,23 +3474,28 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
if (paymentBaseJson == null) {
return true;
}
List<ICategoryPO> iCategoryPOS = getICategoryMapper().listAll();
Map<String, String> categoryMap = SalaryEntityUtil.convert2Map(iCategoryPOS, po -> po.getId().toString(), ICategoryPO::getInsuranceName);
Boolean flag = true;
for (Map.Entry<String, String> entry : paymentBaseJson.entrySet()) {
//判断福利值是否为空/数字
if (entry.getValue() == null || entry.getValue().length() == 0) {
continue;
} else if (!isNumeric(entry.getValue())) {
errorMsg.append("福利值非数字");
log.info("福利值非数字!");
return false;
flag = false;
}
//根据福利方案id险种id缴纳对象缴费状态查询明细
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey()));
log.info("福利方案id: {},, 福利明细项id{}", primaryId, Long.valueOf(entry.getKey()));
if (insuranceSchemeDetailPOList.size() == 0) {
errorMsg.append("根据福利方案id、险种id、缴纳对象查询明细为null福利方案id: " + primaryId + ", 福利明细项id" + Long.valueOf(entry.getKey()) + "");
log.info("根据福利方案id、险种id、缴纳对象查询明细为null福利方案id: {}, 福利明细项id{}", primaryId, Long.valueOf(entry.getKey()));
return false;
flag = false;
}
List<InsuranceSchemeDetailPO> isPaymentList = insuranceSchemeDetailPOList.stream()
.filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList());
@ -3353,13 +3507,15 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
//数值低于对应福利明细下限
errorMsg.append(""+ categoryMap.getOrDefault(entry.getKey(), "") + "】数值: " + entry.getValue() +",低于对应福利明细下限: " + lowerLimit+ "\n");
log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}", entry.getKey(), entry.getValue(), lowerLimit);
return false;
flag = false;
}
if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) {
//数值高于对应福利明细上限
errorMsg.append(""+ categoryMap.getOrDefault(entry.getKey(), "") + "】数值: " + entry.getValue() +",高于对应福利明细上限: " + upperLimit+ "\n");
log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} ", entry.getKey(), entry.getValue(), upperLimit);
return false;
flag = false;
}
} else {
log.info("福利明细项属于未缴费状态,不对上下限进行约束");
@ -3367,7 +3523,67 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
}
return true;
return flag;
}
/**
* 校验福利基数是否符合上下限要求
* @param primaryId
* @param paymentBaseString
* @return
*/
@Override
public String adaptWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope) {
if (primaryId ==null || paymentBaseString == null) {
return null;
}
Map<String, String> paymentBaseJson = JSON.parseObject(paymentBaseString, new HashMap<String, String>().getClass());
if (paymentBaseJson == null) {
return null;
}
for (Map.Entry<String, String> entry : paymentBaseJson.entrySet()) {
//判断福利值是否为空/数字
if (entry.getValue() == null || entry.getValue().length() == 0) {
continue;
} else if (!isNumeric(entry.getValue())) {
log.info("福利值非数字!");
throw new SalaryRunTimeException("福利值非数字");
}
//根据福利方案id险种id缴纳对象缴费状态查询明细
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey()));
log.info("福利方案id: {},, 福利明细项id{}", primaryId, Long.valueOf(entry.getKey()));
if (insuranceSchemeDetailPOList.size() == 0) {
log.info("根据福利方案id、险种id、缴纳对象查询明细为null福利方案id: {}, 福利明细项id{}", primaryId, Long.valueOf(entry.getKey()));
throw new SalaryRunTimeException("根据福利方案id、险种id、缴纳对象查询明细为null福利方案id: "+primaryId+", 福利明细项id{}"+ Long.valueOf(entry.getKey()));
}
List<InsuranceSchemeDetailPO> isPaymentList = insuranceSchemeDetailPOList.stream()
.filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList());
if (isPaymentList.size() > 0) {
InsuranceSchemeDetailPO insuranceSchemeDetailPO = isPaymentList.get(0);
encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class);
String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit();
String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
//数值低于对应福利明细下限
entry.setValue(lowerLimit);
}
if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) {
//数值高于对应福利明细上限
entry.setValue(upperLimit);
}
} else {
log.info("福利明细项属于未缴费状态,不对上下限进行约束");
return null;
}
}
return JSON.toJSONString(paymentBaseJson);
}

View File

@ -289,6 +289,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
record.put("supplementaryMonth", item.getSupplementaryMonth());
record.put("mobile", item.getTelephone());
record.put("workcode", item.getWorkcode());
record.put("idNo", item.getIdNo());
record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus()));
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
@ -671,6 +672,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86317, "工号"), "workcode"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100377, "数据来源"), "sourceFrom"));
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100379, "补缴月份"), "supplementaryMonth"));

View File

@ -178,8 +178,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
// 4.注释
List<ExcelComment> excelComments = Lists.newArrayList();
excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
excelComments.add(new ExcelComment(6, 0, 7, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
excelComments.add(new ExcelComment(7, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
excelComments.add(new ExcelComment(8, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
//工作簿数据
@ -203,6 +202,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
result.add(SalaryI18nUtil.getI18nLabel( 86186, "手机号"));
result.add(SalaryI18nUtil.getI18nLabel( 86187, "员工状态"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
result.add(SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"));
// result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"));
//社保福利基数

View File

@ -420,6 +420,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
map.put("departmentName", item.getDepartmentName());
map.put("departmentId", item.getDepartmentId());
map.put("jobNum", item.getJobNum());
map.put("idNo", item.getIdNo());
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
map.put("mobile", item.getTelephone());
map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
@ -700,6 +701,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "status"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount"));
@ -1093,6 +1095,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
Map<String, Object> mobileMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86186, "手机号"));
Map<String, Object> userStatusMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
Map<String, Object> workcodeMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "工号"));
Map<String, Object> idNoMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
Map<String, Object> employeeIdMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工id"));
@ -1101,6 +1104,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String mobile = (String) mobileMap.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
String userStatus = (String) userStatusMap.get(SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
String workcode = (String) workcodeMap.get(SalaryI18nUtil.getI18nLabel(86317, "工号"));
String idNo = (String) idNoMap.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
String toAddEmployeeId;
if (employeeIdMap.isEmpty()) {
toAddEmployeeId = null;
@ -1126,7 +1130,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
isError = true;
}
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode, null);
employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode,idNo, null);
} else {
employees = employeeByIds.stream().filter(f -> f.getEmployeeId().equals(addEmployeeId)).collect(Collectors.toList());
}
@ -1407,24 +1411,25 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
boolean welBaseAutoAdjustSign = welBaseAutoAdjust != null && welBaseAutoAdjust.getConfValue().equals(OpenEnum.OPEN.getValue());
if (!isError && !welBaseAutoAdjustSign) {
StringBuilder errorMsg = new StringBuilder("");
insuranceArchivesAccountPO.setSocial(insuranceArchivesSocialSchemePO);
insuranceArchivesAccountPO.setFund(insuranceArchivesFundSchemePO);
insuranceArchivesAccountPO.setOther(insuranceArchivesOtherSchemePO);
insuranceArchivesAccountPO.setBaseInfo(insuranceArchivesBaseInfoPO);
//校验福利基数是否符合上下限要求
Boolean socialCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
Boolean socialCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg);
Boolean fundCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
Boolean fundCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg);
Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg);
Boolean socialCheckComBase = true;
Boolean fundCheckComBase = true;
Boolean otherCheckComBase = true;
if (welBaseDiffSign) {
socialCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
socialCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
}
if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) {
insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO);

View File

@ -30,7 +30,6 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
@ -167,7 +166,6 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
}
//核算锁定的值
Map<String, SalaryAcctResultPO> salaryAcctLockResultPOS = MapUtils.emptyIfNull(salaryAcctCalculateBO.getSalaryAcctLockResultPOS());
List<Long> lockSalaryItemIds = ListUtils.emptyIfNull(salaryAcctCalculateBO.getLockSalaryItemIds());
sw.stop();
// 9查询相同税款所属期内涉及合并计税的其他薪资核算结果
sw.start("查询相同税款所属期内涉及合并计税的其他薪资核算结果");
@ -258,7 +256,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 处理小数点
resultValue = SalaryAcctFormulaBO.roundResultValue(resultValue, salaryItemPO, salarySobBackItems, salarySobBackItemMap, salaryItemIdKeySalarySobItemPOMap);
//是否锁定
if (lockSalaryItemIds.contains(salaryItemId) && salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId) != null) {
if (salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId) != null) {
resultValue = salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId).getResultValue();
}
// 将已经计算过的薪资项目的值转换成公式变量的值添加到集合中

View File

@ -20,6 +20,7 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO;
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.salaryaccounting.LockStatusEnum;
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper;
@ -217,7 +218,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
@Override
public List<SalaryAcctEmployeePO> listByParam(SalaryAcctEmployeeQueryParam queryParam) {
ValidUtil.doValidator(queryParam);
// ValidUtil.doValidator(queryParam);
//排序配置
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
@ -706,19 +707,19 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
// }
// list = list.stream().filter(po -> employeeIdsByPostionFilter.contains(po.getEmployeeId())).collect(Collectors.toList());
// }
// 人事状态过滤
if (CollectionUtils.isNotEmpty(param.getStatus())) {
Set<Long> employeeIdsByStatus = new HashSet<>();
employeeList.forEach(simpleEmployee -> {
if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) {
employeeIdsByStatus.add(simpleEmployee.getEmployeeId());
}
});
if (CollectionUtils.isEmpty(employeeIdsByStatus)) {
return Lists.newArrayList();
}
list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList());
}
// 人事状态过滤
if (CollectionUtils.isNotEmpty(param.getStatus())) {
Set<Long> employeeIdsByStatus = new HashSet<>();
employeeList.forEach(simpleEmployee -> {
if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) {
employeeIdsByStatus.add(simpleEmployee.getEmployeeId());
}
});
if (CollectionUtils.isEmpty(employeeIdsByStatus)) {
return Lists.newArrayList();
}
list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList());
}
// 入职日期
if (CollectionUtils.isNotEmpty(param.getHiredate())) {
Set<Long> employeeIdsByHiredate = new HashSet<>();
@ -763,6 +764,34 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
return getSalaryAcctEmployeeMapper().listSome(SalaryAcctEmployeePO.builder().taxAgentIds(taxAgentIds).salaryMonths(salaryMonths).build());
}
@Override
public void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam) {
// 查询薪资核算记录
SalaryAcctRecordPO salaryAcctRecord = getSalaryAcctRecordService(user).getById(updateParam.getSalaryAcctRecordId());
if (CollectionUtils.isEmpty(salaryAcctRecord.getLockSalaryItemIds())) {
salaryAcctRecord.setLockSalaryItemIds(new ArrayList<>());
}
List<SalaryAcctEmployeePO> salaryAcctEmployees = listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
return;
}
LockStatusEnum lockStatus = updateParam.getLockStatus();
if (lockStatus == null) {
throw new SalaryRunTimeException("锁定状态异常!");
}
Set<Long> acctEmpIds = updateParam.getAcctEmpIds();
if (CollUtil.isNotEmpty(acctEmpIds)) {
//锁定指定人员
getSalaryAcctEmployeeMapper().lockByAcctEmpIds(lockStatus.getValue(), acctEmpIds);
} else {
//锁定全部
getSalaryAcctEmployeeMapper().lockByRecordId(lockStatus.getValue(), updateParam.getSalaryAcctRecordId());
}
}
@Override
public void deleteResignationEmp(Long salaryAcctRecordId) {
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salaryAcctRecordId);

View File

@ -12,6 +12,7 @@ import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.constant.SalaryItemConstant;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctConfig;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultBO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultLogBO;
@ -158,13 +159,17 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
return ServiceUtil.getService(SalaryAcctResultTemplateServiceImpl.class, user);
}
private SalaryAcctSobConfigService getSalaryAcctSobConfigService(User user) {
return ServiceUtil.getService(SalaryAcctSobConfigServiceImpl.class, user);
}
@Override
public XSSFWorkbook exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam) {
ValidUtil.doValidator(queryParam);
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId());
if (salaryAcctRecordPO == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"薪资核算记录不存在或已被删除"));
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "薪资核算记录不存在或已被删除"));
}
// 1.工作簿名称
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "核算人员范围");
@ -431,7 +436,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
SalaryI18nUtil.getI18nLabel(0, "导出薪资核算结果"),
SalaryI18nUtil.getI18nLabel(0, "导出薪资核算结果") + ":" + targetName,
user
);
);
String sheetName = "薪资核算结果";
@ -451,7 +456,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
SalaryAcctRecordPO byId = getSalaryAcctRecordService(user).getById(salaryAcctRecordPO.getId());
boolean isBackCalc = Objects.equals(byId.getBackCalcStatus(), 1);
// 查询薪资账套下的薪资项目+员工信息字段
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getSalarySobId(), isBackCalc);
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getId(),salaryAcctRecordPO.getSalarySobId(), isBackCalc);
// 构建薪资核算结果列表表头
List<WeaTableColumnGroup> columnList = SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO, ListUtils.emptyIfNull(salaryAcctRecordPO.getLockSalaryItemIds()));
// 获取固定列头数
@ -504,8 +509,11 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
if (Objects.isNull(salaryAcctRecordPO)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资核算记录不存在或已被删除"));
}
SalaryAcctConfig config = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId);
// 查询薪资核算记录所用的薪资账套的薪资项目副本
List<SalarySobItemPO> salarySobItems = getSalarySobItemService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
List<SalarySobItemPO> salarySobItems = config.getSalarySobItems();
Set<Long> salaryItemIds = SalaryEntityUtil.properties(salarySobItems, SalarySobItemPO::getSalaryItemId);
// 查询薪资项目
List<SalaryItemPO> salaryItems = getSalaryItemService(user).listByIds(salaryItemIds);
@ -514,7 +522,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
Map<Long, List<SalarySobItemPO>> salarySobItemPOMap = SalaryEntityUtil.group2Map(salarySobItems, SalarySobItemPO::getSalarySobItemGroupId);
// 查询薪资账套的薪资项目分类
List<SalarySobItemGroupPO> salarySobItemGroupPOS = getSalarySobItemGroupService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
List<SalarySobItemGroupPO> salarySobItemGroupPOS = config.getSalarySobItemGroups();
// 对分组进行排序
salarySobItemGroupPOS = SalaryAcctResultBO.sortGroup(salarySobItemGroupPOS);
// 对分组内薪资项目排序
@ -595,8 +603,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
if (Objects.isNull(salaryAcctRecordPO)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资核算记录不存在或已被删除"));
}
SalaryAcctConfig salaryAcctConfig = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId);
// 查询薪资核算记录所用的薪资账套的薪资项目副本
List<SalarySobItemPO> salarySobItems = getSalarySobItemService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
List<SalarySobItemPO> salarySobItems = salaryAcctConfig.getSalarySobItems();
Set<Long> salaryItemIds = SalaryEntityUtil.properties(salarySobItems, SalarySobItemPO::getSalaryItemId);
// 查询薪资项目
List<SalaryItemPO> salaryItems = getSalaryItemService(user).listByIds(salaryItemIds);
@ -605,7 +615,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
Map<Long, List<SalarySobItemPO>> salarySobItemPOMap = SalaryEntityUtil.group2Map(salarySobItems, SalarySobItemPO::getSalarySobItemGroupId);
// 查询薪资账套的薪资项目分类
List<SalarySobItemGroupPO> salarySobItemGroupPOS = getSalarySobItemGroupService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
List<SalarySobItemGroupPO> salarySobItemGroupPOS = salaryAcctConfig.getSalarySobItemGroups();
// 对分组进行排序
salarySobItemGroupPOS = SalaryAcctResultBO.sortGroup(salarySobItemGroupPOS);
// 对分组内薪资项目排序
@ -717,6 +727,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
headerRangeList.add("username");
headerRangeList.add("mobile");
headerRangeList.add("workcode");
headerRangeList.add("idNo");
headerRangeList.add("taxAgentName");
headerRangeList.add("departmentName");
// 查询列表的表头
@ -875,7 +886,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
// headerList.add("手机号");
// headerList.add("工号");
// 查询薪资账套下的薪资项目
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateBySalarySobId(salaryAcctRecordPO.getSalarySobId());
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateByRecordId(exportParam.getSalaryAcctRecordId(),true);
// // 员工信息
// for (SalarySobEmpFieldDTO item : salarySobItemAggregateDTO.getEmpFields()) {
@ -1115,6 +1126,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
String deparmentName = (String) map.getOrDefault("部门", "");
String mobile = (String) map.getOrDefault("手机号", "");
String workcode = (String) map.getOrDefault("工号", "");
String idNo = (String) map.getOrDefault("证件号码", "");
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
usernameIndex = j;
@ -1126,7 +1138,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
//salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"), i, i, j, j);
} else {
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null);
if (CollectionUtils.isEmpty(employeeSameIds)) {
isError = true;
@ -1352,7 +1364,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
List<SalaryAcctResultPO> list4log = new ArrayList<>();
salaryAcctResults.stream().forEach(source -> {
SalaryAcctResultPO target = new SalaryAcctResultPO();
BeanUtils.copyProperties(source,target);
BeanUtils.copyProperties(source, target);
list4log.add(target);
});
getSalaryAcctResultService(user).batchSave(salaryAcctResults);
@ -1365,17 +1377,11 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
loggerContext.setTargetId(param.getSalaryAcctRecordId().toString());
loggerContext.setTargetName(targetName);
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "导入薪资核算数据"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "导入薪资核算数据 ") + targetName);
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据 ") + targetName);
loggerContext.setOldValueList(list4log);
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
// 存储薪资核算结果数据来源日志
new Thread() {
public void run() {
handleSalaryAcctResultLog(salaryAcctResults);
}
}.start();
//报表
getSalaryAcctReportService(user).batchSave(salaryAcctReports);
}
@ -1442,6 +1448,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
/**
* 保存导出模板
*
* @param saveParam
*/
@Override
@ -1508,7 +1515,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
@Override
public Map<String, Object> exportTemplateList(SalaryAcctResultTemplateSaveParam param) {
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId());
if (salaryAcctRecordPO == null){
if (salaryAcctRecordPO == null) {
throw new SalaryRunTimeException("薪资核算记录为空");
}
List<SalaryAcctResultTemplatePO> salaryAcctResultTemplatePOS = getSalaryAcctResultTemplateService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());

Some files were not shown because too many files have changed in this diff Show More