Merge branch 'release/2.14.4.2406.02' into feature/240502_薪资项目增加默认值设置
# Conflicts: # src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml # src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java
This commit is contained in:
commit
f0fce26e8a
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=2.14.1.2405.01
|
||||
version=2.14.3.2406.01
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -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
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
|
||||
/
|
||||
|
||||
|
|
@ -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
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
|
||||
/
|
||||
|
||||
|
|
@ -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
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
|
||||
/
|
||||
|
||||
|
|
@ -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>'
|
||||
)
|
||||
;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int(0) NULL ;
|
||||
|
|
@ -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
|
||||
)
|
||||
/
|
||||
|
|
@ -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)
|
||||
/
|
||||
|
|
@ -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)
|
||||
/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0)
|
||||
/
|
||||
|
|
@ -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
|
||||
);
|
||||
/
|
||||
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int NULL ;
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD lock_status int NULL
|
||||
GO
|
||||
|
|
@ -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
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -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);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
|
||||
/
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
@ -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 effective_time <= now() and c.name='基本工资' order by effective_time desc
|
||||
and a.employee_id=人员id and t.name=扣缴义务人名称
|
||||
c.name='基本工资' order by effective_time desc
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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": [
|
||||
"*身份证号码*(必选)",
|
||||
|
|
@ -980,7 +980,31 @@
|
|||
"infinite": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DAYSINMONTH",
|
||||
"chineseName": "返回指定月的天数",
|
||||
"description": "返回指定月的天数。",
|
||||
"example": "DAYSINMONTH('2024-01-01')",
|
||||
"result": "31",
|
||||
"paramDescs": [
|
||||
"*日期*(必选)"
|
||||
],
|
||||
"formatString": "DAYSINMONTH(日期)",
|
||||
"paramArray": [],
|
||||
"paramData": [],
|
||||
"returnType": "number",
|
||||
"type": "function",
|
||||
"validForm": "days_in_month",
|
||||
"paramCount": -1,
|
||||
"paramStatuses": [
|
||||
{
|
||||
"dataType": "date",
|
||||
"must": true,
|
||||
"infinite": true
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
"dataType": "date",
|
||||
"name": "日期函数",
|
||||
|
|
|
|||
|
|
@ -53,4 +53,9 @@ public class AttendQuoteDataBaseDTO {
|
|||
* 工号
|
||||
*/
|
||||
private String jobNum;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String idNo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ public class SalaryBillBO {
|
|||
}
|
||||
Util_Message.store(messageBean);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("消息发送失败",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 {
|
||||
|
|
|
|||
|
|
@ -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.员工信息
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.entity.salaryBill.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 工资单预览参数
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryPreviewParam {
|
||||
|
||||
/**
|
||||
* 工资单id
|
||||
*/
|
||||
private Long salaryInfoId;
|
||||
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
private Long recipient;
|
||||
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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<>();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 员工状态
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ public class SalaryItemBO {
|
|||
|
||||
private static final BaseBean baseBean = new BaseBean();
|
||||
|
||||
//强制开启账套的公式配置
|
||||
private static final Boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing"));
|
||||
|
||||
|
||||
|
||||
|
|
@ -86,6 +84,10 @@ public class SalaryItemBO {
|
|||
if (CollectionUtils.isEmpty(salaryItems)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
//强制开启账套的公式配置
|
||||
boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing"));
|
||||
|
||||
Map<Long, String> formulaMap = SalaryEntityUtil.convert2Map(expressFormulas, ExpressFormula::getId, ExpressFormula::getFormula);
|
||||
Map<Long, String> sysSalaryItemNameMap = SalaryEntityUtil.convert2Map(sysSalaryItemPOS, SysSalaryItemPO::getId, SysSalaryItemPO::getName);
|
||||
return salaryItems.stream().map(salaryItemPO -> {
|
||||
|
|
@ -134,6 +136,9 @@ public class SalaryItemBO {
|
|||
if (CollectionUtils.isEmpty(salaryItems)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
//强制开启账套的公式配置
|
||||
boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing"));
|
||||
|
||||
Map<Long, String> formulaMap = SalaryEntityUtil.convert2Map(expressFormulas, ExpressFormula::getId, ExpressFormula::getFormula);
|
||||
Map<Long, String> sysSalaryItemNameMap = SalaryEntityUtil.convert2Map(sysSalaryItemPOS, SysSalaryItemPO::getId, SysSalaryItemPO::getName);
|
||||
return salaryItems.stream().map(salaryItemPO -> {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class SalaryItemSaveParam {
|
|||
private Integer roundingMode;
|
||||
|
||||
//保留小数位
|
||||
@DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 8, message = "小数位最多为8")
|
||||
@DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 10, message = "小数位最多为10")
|
||||
private Integer pattern;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class SalarySobItemFormDTO {
|
|||
private Integer roundingMode;
|
||||
|
||||
//保留小数位")
|
||||
@DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 8, message = "小数位最多为8")
|
||||
@DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 10, message = "小数位最多为10")
|
||||
private Integer pattern;
|
||||
|
||||
//取值方式")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -121,4 +125,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(","));
|
||||
}
|
||||
}
|
||||
|
|
@ -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(","));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(","));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 薪资账套薪资项目
|
||||
|
|
@ -129,4 +133,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(","));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,4 +25,9 @@ public class InsuranceArchivesSaveParam {
|
|||
private String paymentForm;
|
||||
|
||||
private String paymentComForm;
|
||||
|
||||
/**
|
||||
* 是否修改数据为上限或下限
|
||||
*/
|
||||
private Boolean changeData;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ public class InsuranceArchivesEmployeePO {
|
|||
|
||||
private String telephone;
|
||||
|
||||
private String idNo;
|
||||
|
||||
@I18n
|
||||
private String departmentName;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public enum FilterEnum implements BaseEnum<String> {
|
|||
return StringUtils::isEmpty;
|
||||
}
|
||||
},
|
||||
ISNOTEMPTY("ISNOTEMPTY", "包含", 1) {
|
||||
ISNOTEMPTY("ISNOTEMPTY", "不为空", 1) {
|
||||
@Override
|
||||
public Predicate<String> filter(List<String> params) {
|
||||
return StringUtils::isNotEmpty;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" +
|
||||
|
|
@ -985,7 +985,31 @@ public class FormluaConstant {
|
|||
" \"infinite\": true\n" +
|
||||
" }\n" +
|
||||
" ]\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" {\n" +
|
||||
" \"name\": \"DAYSINMONTH\",\n" +
|
||||
" \"chineseName\": \"返回指定月的天数\",\n" +
|
||||
" \"description\": \"返回指定月的天数。\",\n" +
|
||||
" \"example\": \"DAYSINMONTH('2024-01-01')\",\n" +
|
||||
" \"result\": \"31\",\n" +
|
||||
" \"paramDescs\": [\n" +
|
||||
" \"*日期*(必选)\"\n" +
|
||||
" ],\n" +
|
||||
" \"formatString\": \"DAYSINMONTH(日期)\",\n" +
|
||||
" \"paramArray\": [],\n" +
|
||||
" \"paramData\": [],\n" +
|
||||
" \"returnType\": \"number\",\n" +
|
||||
" \"type\": \"function\",\n" +
|
||||
" \"validForm\": \"days_in_month\",\n" +
|
||||
" \"paramCount\": -1,\n" +
|
||||
" \"paramStatuses\": [\n" +
|
||||
" {\n" +
|
||||
" \"dataType\": \"date\",\n" +
|
||||
" \"must\": true,\n" +
|
||||
" \"infinite\": true\n" +
|
||||
" }\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
" ],\n" +
|
||||
" \"dataType\": \"date\",\n" +
|
||||
" \"name\": \"日期函数\",\n" +
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ public class QlExpress {
|
|||
runner.addFunctionOfServiceMethod("CURRSECOND", dateTimeService, "currSecond", new Class[]{Object[].class}, "");
|
||||
runner.addFunctionOfServiceMethod("MAXDATE", dateTimeService, "maxDate", new Class[]{Object[].class}, "");
|
||||
runner.addFunctionOfServiceMethod("MINDATE", dateTimeService, "minDate", new Class[]{Object[].class}, "");
|
||||
runner.addFunctionOfServiceMethod("DAYSINMONTH", dateTimeService, "daysInMonth", new Class[]{Object[].class}, "");
|
||||
// runner.addFunctionOfServiceMethod("DAYOFMONTH", dateTimeService, "dayOfMonth", new Class[]{Object[].class}, "");
|
||||
|
||||
//聚合函数
|
||||
|
|
|
|||
|
|
@ -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',2,3) <br>结果:bc"));
|
||||
funcMap.put("SUBSTITUE", SalaryI18nUtil.getI18nLabel(97746, "字符查找替换函数,替换字符中的所有关键词为新字符。<br>示例:SUBSTITUE('泛微移动办公','泛微','eteams') <br>结果:eteams移动办公"));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.formlua.func.compare;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.salary.formlua.core.exception.ErrorType;
|
||||
import com.engine.salary.formlua.entity.parameter.DataType;
|
||||
import com.engine.salary.formlua.util.CompareUtil;
|
||||
|
|
@ -37,7 +36,6 @@ public class EqOperator extends OperatorEqualsLessMore {
|
|||
public Object executeInner(Object... list) throws Exception {
|
||||
DataType result=new DataType();
|
||||
result.setDataType(DataType.BOOL);
|
||||
logger.info("等于号参数:"+JSON.toJSONString(list));
|
||||
String oper="=";
|
||||
if(list.length!=2){
|
||||
throw new RuntimeException("[=]"+ ErrorType.MAX_VAR_COUNT.name());
|
||||
|
|
@ -75,7 +73,6 @@ public class EqOperator extends OperatorEqualsLessMore {
|
|||
int i=0;
|
||||
for (;i<firstOptions.length;i++){
|
||||
boolean loopresult=OperatorEqualsLessMore.executeInner("=",firstOptions[i],secondOptions[i]);
|
||||
logger.info("比较选项结果"+loopresult);
|
||||
if(!loopresult){
|
||||
result.setContent(false);
|
||||
break;
|
||||
|
|
@ -138,7 +135,6 @@ public class EqOperator extends OperatorEqualsLessMore {
|
|||
}else {
|
||||
Object firstParam=ExcelParamUtil.getParamContent(dataList.get(0),"");
|
||||
Object secondParam=ExcelParamUtil.getParamContent(dataList.get(1),"");
|
||||
logger.info("等于号比较:"+firstParam+"-->"+secondParam);
|
||||
if((firstParam instanceof String || firstParam instanceof Character) && (secondParam instanceof String || secondParam instanceof Character)){
|
||||
if(firstParam.toString().length()==1&&secondParam.toString().length()==1){
|
||||
boolean r=firstParam.toString().equals(secondParam.toString());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.formlua.func.compare;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.salary.formlua.entity.parameter.DataType;
|
||||
import com.engine.salary.formlua.util.CompareUtil;
|
||||
import com.engine.salary.formlua.util.DateUtil;
|
||||
|
|
@ -22,7 +21,6 @@ public class GreaterOperator extends OperatorEqualsLessMore {
|
|||
result.setDataType(DataType.BOOL);
|
||||
// IgnoreParamFilter.filterCompareFunc(op1,op2,">");
|
||||
String datatype = ExcelParamUtil.checkParamType(op1);
|
||||
logger.info("大于号比较:" + JSON.toJSONString(op1) + "-->" + JSON.toJSONString(op2));
|
||||
//对option的特殊处理,获取option的字符串后根据逗号分割,然后排序数组,数组长度不一致返回false,一致则循环对比直到同样下标的数据不一致返回false,否则为true
|
||||
try {
|
||||
if (datatype.equals(DataType.OPTION)) {
|
||||
|
|
@ -77,8 +75,6 @@ public class GreaterOperator extends OperatorEqualsLessMore {
|
|||
}
|
||||
result.setContent(dateResult);
|
||||
} else {
|
||||
logger.info("参数1:" + ExcelParamUtil.convertParamValToNumber(op1) + "");
|
||||
logger.info("参数2:" + ExcelParamUtil.convertParamValToNumber(op2) + "");
|
||||
boolean r;
|
||||
if (ExcelParamUtil.getParamType(op1).toLowerCase().equals("double") || ExcelParamUtil.getParamType(op2).toLowerCase().equals("double")) {
|
||||
r = OperatorEqualsLessMore.executeInner(">", ExcelParamUtil.convertParamValToNumber(op1), ExcelParamUtil.convertParamValToNumber(op2));
|
||||
|
|
|
|||
|
|
@ -52,10 +52,9 @@ public class WOperatorDiv extends OperatorMultiDiv {
|
|||
newList[1] = secondParam;
|
||||
try {
|
||||
Object r = super.executeInner(newList);
|
||||
logger.info("乘法运算:" + r.toString());
|
||||
result.setContent(new BigDecimal(r + ""));
|
||||
} catch (Exception e) {
|
||||
logger.info("除法计算异常返回0:" + e.getMessage());
|
||||
logger.error("除法计算异常返回0:" + e.getMessage());
|
||||
result.setContent(0);
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -89,4 +89,11 @@ import com.engine.salary.formlua.entity.parameter.DataType;
|
|||
*/
|
||||
DataType currSecond(Object... objects);
|
||||
|
||||
/**
|
||||
* 获取月有多少天
|
||||
* @param objects
|
||||
* @return
|
||||
*/
|
||||
DataType daysInMonth(Object... objects);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.YearMonth;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
|
@ -549,7 +550,6 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
date = lastday;
|
||||
break;
|
||||
}
|
||||
logger.info("firstday:" + firstday + " lastday:" + lastday);
|
||||
return new DataType(DataType.STRING, date);
|
||||
}
|
||||
|
||||
|
|
@ -998,6 +998,37 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
int year = cal.get(Calendar.SECOND);
|
||||
return new DataType(DataType.NUMBER, year);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType daysInMonth(Object... objects) {
|
||||
Class[] typeObjects = new Class[]{DateAndString.class};
|
||||
IgnoreParamFilter.commonFilter("YEAR", 1, 1, typeObjects, objects);
|
||||
Object obj = objects[0];
|
||||
Object date = DateUtil.getContent(obj, formatter);
|
||||
if (ExcelParamUtil.checkIsNull(date, ExcelParamUtil.CHECKLEVEL_STRING)) {
|
||||
return new DataType(DataType.NUMBER, 0);
|
||||
}
|
||||
int year = 0;
|
||||
try {
|
||||
year = getDateTimeValue(date, "Y", "YEAR");
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
IgnoreParamFilter.commonFilter("MONTH", 1, 1, typeObjects, objects);
|
||||
int month = 0;
|
||||
try {
|
||||
month = getDateTimeValue(date, "M", "MONTH") + 1;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
YearMonth yearMonth = YearMonth.of(year, month);
|
||||
int daysInMonth = yearMonth.lengthOfMonth();
|
||||
return new DataType(DataType.NUMBER, daysInMonth);
|
||||
}
|
||||
/*******以下为日期函数的一些公共逻辑********/
|
||||
|
||||
|
||||
|
|
@ -1256,7 +1287,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
r = true;
|
||||
break;
|
||||
} catch (ParseException e) {
|
||||
logger.info(e.getMessage());
|
||||
logger.error(e.getMessage());
|
||||
r = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ public class FinanceServiceImpl implements FinanceService{
|
|||
int intLen = integerNum.length();
|
||||
for (int i = 0; i < intLen; i++) {
|
||||
String n = integerNum.substring(i, i+1);
|
||||
logger.info("转换中文:"+n);
|
||||
int p = intLen - i - 1;
|
||||
int q = p / 4;
|
||||
int m = p % 4;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.formlua.func.logic;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.salary.formlua.core.exception.ExcelRunTimeException;
|
||||
import com.engine.salary.formlua.entity.parameter.DataType;
|
||||
|
|
@ -26,7 +25,6 @@ public class IfOperator extends OperatorIf {
|
|||
throw new ExcelRunTimeException("IF函数只允许三个参数");
|
||||
}
|
||||
Object obj = list.get(0).getObject(parent);
|
||||
logger.info("IF参数:" + JSON.toJSONString(obj));
|
||||
boolean isDataTypeBool = false;
|
||||
DataType boolDtaType = null;
|
||||
if (obj != null && obj instanceof DataType) {
|
||||
|
|
|
|||
|
|
@ -477,7 +477,6 @@ public class LogicServiceImpl implements LogicService {
|
|||
Object obj = objects[i - 1];
|
||||
String typeStr = ExcelParamUtil.getParamType(obj);
|
||||
typeStr = ExcelParamUtil.checkParamType(typeStr);
|
||||
logger.info(typeStr);
|
||||
if (type == null) {
|
||||
type = typeStr;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -236,7 +236,6 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
int replaceLength=(repIdx-1)+repLenth;
|
||||
if(replaceLength>sourceStr.length()){
|
||||
// throw new RunTimeException(errorJson.getString("msg"));
|
||||
logger.info("REPLACE函数替换位置超过了字符长度");
|
||||
replaceLength=sourceStr.length();
|
||||
}
|
||||
String cutStr=sourceStr.substring(repIdx-1,replaceLength);
|
||||
|
|
@ -463,7 +462,6 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
sex = "男";
|
||||
}
|
||||
}
|
||||
logger.info(sex);
|
||||
return new DataType(DataType.STRING,sex);
|
||||
}
|
||||
|
||||
|
|
@ -471,7 +469,6 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
public DataType nativePlace(String idCard){
|
||||
int nativePlaceCode=Integer.parseInt(idCard.substring(0, 6));
|
||||
String nativePlace= NativePlace.getNativePlace(nativePlaceCode);
|
||||
logger.info("您所在的地区为:\n" + nativePlace);
|
||||
return new DataType(DataType.STRING,nativePlace);
|
||||
}
|
||||
|
||||
|
|
@ -489,7 +486,6 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
if(dataType!=null && dataType.getContent()!=null){
|
||||
age=dataType.getContent();
|
||||
}
|
||||
logger.info("年龄:"+age);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
logger.error("err",e);
|
||||
|
|
@ -526,7 +522,6 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
}
|
||||
|
||||
String birth=year+"-"+month+"-"+day;
|
||||
logger.info("生日为:"+birth);
|
||||
result=birth;
|
||||
break;
|
||||
|
||||
|
|
@ -756,12 +751,10 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
if(fieldType.equalsIgnoreCase("string")){
|
||||
if(content!=null){
|
||||
try {
|
||||
logger.info("isJson函数的JSON字符转换:"+content+"");
|
||||
JSON.parseObject(content+"");
|
||||
resultDataType=new DataType(DataType.BOOL,true);
|
||||
} catch (Exception e) {
|
||||
logger.info("err",e);
|
||||
logger.info("不是正常的JSON字符");
|
||||
logger.error("err",e);
|
||||
resultDataType=new DataType(DataType.BOOL,false);
|
||||
}
|
||||
}else{
|
||||
|
|
@ -800,13 +793,11 @@ public class StringFormulaServiceImpl implements StringFormulaService {
|
|||
if(fieldType.equalsIgnoreCase("string")){
|
||||
if(content!=null){
|
||||
try {
|
||||
logger.info("isJson函数的JSON字符转换:"+content+"");
|
||||
JSONObject jsonObject=JSON.parseObject(content+"");
|
||||
Object jsonValue=jsonObject.get(objectKey+"");
|
||||
resultDataType=new DataType(DataType.STRING,jsonValue==null?"":jsonValue.toString());
|
||||
} catch (Exception e) {
|
||||
logger.info("err",e);
|
||||
logger.info("不是正常的JSON字符");
|
||||
resultDataType=new DataType(DataType.STRING,"");
|
||||
}
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ public class DateUtil {
|
|||
try {
|
||||
format.setLenient(false);
|
||||
format.parse(dateString);
|
||||
logger.info(dateString);
|
||||
} catch (ParseException e) {
|
||||
// logger.error("err",e);
|
||||
convertSuccess=false;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.formlua.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.salary.formlua.core.exception.ErrorType;
|
||||
import com.engine.salary.formlua.entity.parameter.DataType;
|
||||
|
|
@ -39,7 +38,6 @@ public class IgnoreParamFilter {
|
|||
* @return
|
||||
*/
|
||||
public static boolean isEmployee(Object object) {
|
||||
logger.info("校验人员参数" + JSON.toJSONString(object));
|
||||
// if (object instanceof DataType) {
|
||||
// DataType dataType = (DataType) object;
|
||||
// if (dataType.getComponentKey() != null && dataType.getComponentKey().equalsIgnoreCase(ComponentType.Employee.toString())) {
|
||||
|
|
@ -227,7 +225,6 @@ public class IgnoreParamFilter {
|
|||
* @throws RuntimeException
|
||||
*/
|
||||
public static void filterAggFunc(String func, Object... objects) throws RuntimeException {
|
||||
logger.info("聚合参数:" + JSON.toJSONString(objects));
|
||||
Integer number = getSetFuncNumber(func);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
boolean mustNumber = false;
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
@ -22,8 +22,6 @@ public interface SalarySobItemGroupMapper {
|
|||
*/
|
||||
List<SalarySobItemGroupPO> listSome(SalarySobItemGroupPO salarySobItemGroup);
|
||||
|
||||
List<SalarySobItemGroupPO> listSomeWithItemHide(SalarySobItemGroupPO build);
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
, t.pattern
|
||||
, t.value_type
|
||||
, t.default_value
|
||||
, t.item_hide
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
|
|
@ -148,122 +150,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
|
||||
|
|
@ -283,6 +169,7 @@
|
|||
rounding_mode=#{roundingMode},
|
||||
pattern=#{pattern},
|
||||
value_type=#{valueType},
|
||||
item_hide=#{itemHide},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
|
@ -340,6 +227,9 @@
|
|||
<if test="defaultValue != null">
|
||||
default_value=#{defaultValue},
|
||||
</if>
|
||||
<if test="itemHide != null">
|
||||
item_hide=#{itemHide},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
|
@ -386,7 +276,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=",">
|
||||
(
|
||||
|
|
@ -404,13 +294,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
|
||||
|
|
@ -428,14 +319,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},
|
||||
|
|
@ -452,77 +344,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
|
||||
|
|
|
|||
|
|
@ -116,6 +116,14 @@ public interface InsuranceAccountDetailMapper {
|
|||
*/
|
||||
List<InsuranceAccountDetailPO> querySupplementListByBillMonth(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
/**
|
||||
* 查询补差数据
|
||||
* @param billMonth 账单月份
|
||||
* @param paymentOrganization 个税扣缴义务人
|
||||
* @return
|
||||
*/
|
||||
List<InsuranceAccountDetailPO> queryBalanceListByBillMonth(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization);
|
||||
|
||||
/**
|
||||
* 查询正常缴纳数据
|
||||
* @param billMonth 账单月份
|
||||
|
|
|
|||
|
|
@ -497,6 +497,7 @@
|
|||
<select id="queryNormalList" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
t.id,t.employee_id,t.social_per_json,t.social_com_json,
|
||||
t.social_scheme_id,t.fund_scheme_id,t.other_scheme_id,
|
||||
t.fund_per_json,t.fund_com_json,t.other_per_json,
|
||||
t.other_com_json,t.social_per_sum,t.social_com_sum,
|
||||
t.fund_per_sum,t.fund_com_sum,t.other_per_sum,
|
||||
|
|
@ -541,6 +542,17 @@
|
|||
AND t.payment_organization = #{paymentOrganization}
|
||||
</select>
|
||||
|
||||
<select id="queryBalanceListByBillMonth" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
t.id,t.employee_id,t.supplementary_month,t.supplementary_projects
|
||||
FROM
|
||||
hrsa_bill_detail t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.payment_status = 4
|
||||
AND t.bill_month = #{billMonth}
|
||||
AND t.payment_organization = #{paymentOrganization}
|
||||
</select>
|
||||
|
||||
<select id="queryNormalListByBillMonth" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
t.id,t.employee_id
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import org.apache.commons.lang3.math.NumberUtils;
|
|||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -172,7 +173,7 @@ public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAtt
|
|||
public List<Map<String, String>> getBalanceOfLeaveColumns() {
|
||||
Map<String, Object> paramsMap = new HashMap<String, Object>();
|
||||
paramsMap.put("dateScope", "6");
|
||||
paramsMap.put("selectedYear", 2023);
|
||||
paramsMap.put("selectedYear", LocalDate.now().getYear());
|
||||
paramsMap.put("dataScope", "3");
|
||||
paramsMap.put("resourceId", 92);
|
||||
paramsMap.put("status", "9");
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
|
|||
// 报表分享时间校验
|
||||
String formatLocalDateTime = SalaryDateUtil.getFormatLocalDate(LocalDateTime.now());
|
||||
List<SalaryStatisticsPushPO> result = pushList.stream().filter(pushPO -> {
|
||||
if (pushPO.getStartTime().compareTo(formatLocalDateTime) > 0 || (StringUtils.isNotEmpty(pushPO.getEndTime()) && pushPO.getEndTime().compareTo(formatLocalDateTime) < 0)) {
|
||||
if ((StringUtils.isNotBlank(pushPO.getStartTime()) && pushPO.getStartTime().compareTo(formatLocalDateTime) > 0) || (StringUtils.isNotEmpty(pushPO.getEndTime()) && pushPO.getEndTime().compareTo(formatLocalDateTime) < 0)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import com.engine.salary.util.SalaryI18nUtil;
|
|||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -137,6 +138,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
|
||||
/**
|
||||
* 获取员工发薪明细列表
|
||||
*
|
||||
* @param queryParam
|
||||
*/
|
||||
public Map<String, Object> salaryList(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
|
|
@ -147,7 +149,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
// 获取发薪人员
|
||||
PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePageInfo = getSalaryStatisticsEmployeeService(user).listSalaryAcctEmp(queryParam);
|
||||
// 获取薪资核算结果
|
||||
SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult = getSalaryStatisticsEmployeeService(user).getDetailSalaryAcctResultByAcctEmp(salaryAcctEmployeePageInfo.getList());
|
||||
SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult = getSalaryStatisticsEmployeeService(user).getDetailSalaryAcctResultByAcctEmp(salaryAcctEmployeePageInfo.getList());
|
||||
List<Map<String, Object>> records = getSalaryStatisticsEmployeeService(user).listDetailPage(salaryStatisticsEmployeeDetailResult, null);
|
||||
|
||||
Map<String, Object> countResultMap = Maps.newHashMap();
|
||||
|
|
@ -183,7 +185,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
// 结果
|
||||
if (queryParam.isExport()) {
|
||||
resultMap.put("columns", weaTableColumns);
|
||||
resultMap.put("salaryItems",salaryStatisticsEmployeeDetailResult.getSalaryItemList());
|
||||
resultMap.put("salaryItems", salaryStatisticsEmployeeDetailResult.getSalaryItemList());
|
||||
resultMap.put("countResult", countResultMap);
|
||||
} else {
|
||||
WeaTable table = new WeaTable();
|
||||
|
|
@ -205,6 +207,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
|
||||
/**
|
||||
* 获取员工发薪明细列表
|
||||
*
|
||||
* @param queryParam
|
||||
*/
|
||||
public Map<String, Object> salaryListSum(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
|
|
@ -215,25 +218,37 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
queryParam.setExport(true);
|
||||
// 获取发薪人员
|
||||
PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePageInfo = getSalaryStatisticsEmployeeService(user).listSalaryAcctEmp(queryParam);
|
||||
// 获取薪资核算结果
|
||||
SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult = getSalaryStatisticsEmployeeService(user).getDetailSalaryAcctResultByAcctEmp(salaryAcctEmployeePageInfo.getList());
|
||||
List<Map<String, Object>> records = getSalaryStatisticsEmployeeService(user).listDetailPage(salaryStatisticsEmployeeDetailResult, null);
|
||||
List<SalaryAcctEmployeePO> employeePOS = salaryAcctEmployeePageInfo.getList();
|
||||
|
||||
Map<String, Object> sumResultMap = Maps.newHashMap();
|
||||
if (CollectionUtils.isNotEmpty(records)) {
|
||||
List<SalaryItemPO> salaryItems = salaryStatisticsEmployeeDetailResult.getSalaryItemList();
|
||||
for (SalaryItemPO item : salaryItems) {
|
||||
BigDecimal sumBigDecimal = new BigDecimal(SalaryStatisticsReportBO.ZERO);
|
||||
String itemKey = item.getId() + SalaryConstant.DYNAMIC_SUFFIX;
|
||||
for (Map<String, Object> record : records) {
|
||||
if (record.containsKey(itemKey)) {
|
||||
if (Objects.nonNull(record.get(itemKey)) && StringUtils.isNotEmpty(record.get(itemKey).toString()) && NumberUtils.isCreatable(record.get(itemKey).toString())) {
|
||||
sumBigDecimal = sumBigDecimal.add(new BigDecimal(record.get(itemKey).toString()));
|
||||
|
||||
List<List<SalaryAcctEmployeePO>> empParts = Lists.partition(employeePOS, 500);
|
||||
|
||||
for (int i = 0; i < empParts.size(); i++) {
|
||||
// 获取薪资核算结果
|
||||
SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult = getSalaryStatisticsEmployeeService(user).getDetailSalaryAcctResultByAcctEmp(empParts.get(i));
|
||||
List<Map<String, Object>> records = getSalaryStatisticsEmployeeService(user).listDetailPage(salaryStatisticsEmployeeDetailResult, null);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(records)) {
|
||||
List<SalaryItemPO> salaryItems = salaryStatisticsEmployeeDetailResult.getSalaryItemList();
|
||||
for (SalaryItemPO item : salaryItems) {
|
||||
BigDecimal sumBigDecimal = new BigDecimal(SalaryStatisticsReportBO.ZERO);
|
||||
String itemKey = item.getId() + SalaryConstant.DYNAMIC_SUFFIX;
|
||||
for (Map<String, Object> record : records) {
|
||||
if (record.containsKey(itemKey)) {
|
||||
if (Objects.nonNull(record.get(itemKey)) && StringUtils.isNotEmpty(record.get(itemKey).toString()) && NumberUtils.isCreatable(record.get(itemKey).toString())) {
|
||||
sumBigDecimal = sumBigDecimal.add(new BigDecimal(record.get(itemKey).toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Object o = sumResultMap.get(itemKey + "_n");
|
||||
if (o != null) {
|
||||
sumBigDecimal = sumBigDecimal.add((BigDecimal) o);
|
||||
}
|
||||
sumResultMap.put(itemKey + "_n", sumBigDecimal);
|
||||
// 薪资项目合计
|
||||
sumResultMap.put(itemKey, ReportDataUtil.thousandthConvert(sumBigDecimal.toString()));
|
||||
}
|
||||
// 薪资项目合计
|
||||
sumResultMap.put(itemKey, ReportDataUtil.thousandthConvert(sumBigDecimal.toString()));
|
||||
}
|
||||
}
|
||||
resultMap.put("sumRow", sumResultMap);
|
||||
|
|
@ -263,12 +278,12 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
// 合计
|
||||
List<Object> sumRow = new ArrayList<>();
|
||||
sumRow.add("总计");
|
||||
for (int i=1; i<columns.size(); i++) {
|
||||
for (int i = 1; i < columns.size(); i++) {
|
||||
sumRow.add(Util.null2String(countResult.get(columns.get(i).getColumn())));
|
||||
}
|
||||
rowList.add(sumRow);
|
||||
|
||||
return ExcelUtilPlus.genWorkbookV2(rowList,"薪资明细",true);
|
||||
return ExcelUtilPlus.genWorkbookV2(rowList, "薪资明细", true);
|
||||
}
|
||||
|
||||
// public Map<String, Object> exportDetailList(SalaryStatisticsEmployeeDetailQueryParam queryParam) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue