Merge branch 'release/2.15.2.2409.01' into custom/京贵投资

# Conflicts:
#	src/com/engine/salary/service/impl/VariableArchiveServiceImpl.java
This commit is contained in:
钱涛 2024-10-09 18:12:10 +08:00
commit ae75315ce8
152 changed files with 4239 additions and 950 deletions

Binary file not shown.

View File

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

View File

@ -1,14 +0,0 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,24 @@
delete from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/

View File

@ -0,0 +1,15 @@
Delete from LeftMenuInfo where id=100219;
/
Delete from LeftMenuConfig where infoid=100219;
/
call LMConfig_U_ByInfoInsert (2,100126,0);
/
call LMInfo_Insert (100219,548025,'','',2,100126,7,2);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219;
/

View File

@ -1,14 +0,0 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,24 @@
delete from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/

View File

@ -0,0 +1,15 @@
Delete from LeftMenuInfo where id=100219;
/
Delete from LeftMenuConfig where infoid=100219;
/
call LMConfig_U_ByInfoInsert (2,100126,0);
/
call LMInfo_Insert (100219,548025,'','',2,100126,7,2);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219;
/

View File

@ -1,14 +0,0 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,24 @@
delete from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/

View File

@ -0,0 +1,15 @@
Delete from LeftMenuInfo where id=100219;
/
Delete from LeftMenuConfig where infoid=100219;
/
call LMConfig_U_ByInfoInsert (2,100126,0);
/
call LMInfo_Insert (100219,548025,'','',2,100126,7,2);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219;
/

View File

@ -1,10 +0,0 @@
Delete from LeftMenuInfo where id=100186
;
Delete from LeftMenuConfig where infoid=100186
;
call LMConfig_U_ByInfoInsert (2,100118,9)
;
call LMInfo_Insert (100186,541290,'','',2,100118,9,18)
;
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186
;

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 548025 and ( indexdesc is null or indexdesc = '' )
;
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( indexdesc is not null and indexdesc <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=char_length(labelname) )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=char_length(labelname) )) limit 1
;
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1
;

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100219
;
Delete from LeftMenuConfig where infoid=100219
;
call LMConfig_U_ByInfoInsert (2,100126,0)
;
call LMInfo_Insert (100219,548025,'','',2,100126,7,2)
;
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219
;

View File

@ -1,10 +0,0 @@
Delete from LeftMenuInfo where id=100186
/
Delete from LeftMenuConfig where infoid=100186
/
call LMConfig_U_ByInfoInsert (2,100118,9)
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18)
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186
/

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is null )
/
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1
/

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100219
/
Delete from LeftMenuConfig where infoid=100219
/
call LMConfig_U_ByInfoInsert (2,100126,0)
/
call LMInfo_Insert (100219,548025,'','',2,100126,7,2)
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219
/

View File

@ -1,10 +0,0 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
select LMConfig_U_ByInfoInsert (2,100118,9);
/
select LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 548025 and ( indexdesc is null or indexdesc = '' ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
/

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100219
;
Delete from LeftMenuConfig where infoid=100219
;
select LMConfig_U_ByInfoInsert (2,100126,0)
;
select LMInfo_Insert (100219,548025,'','',2,100126,7,2)
;
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219
;

View File

@ -1,10 +0,0 @@
Delete from LeftMenuInfo where id=100186
GO
Delete from LeftMenuConfig where infoid=100186
GO
EXECUTE LMConfig_U_ByInfoInsert 2,100118,9
GO
EXECUTE LMInfo_Insert 100186,541290,'','',2,100118,9,18
GO
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186
GO

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 548025 and ( indexdesc is null or indexdesc = '' )
GO
insert into HtmlLabelIndex(id,indexdesc) select top 1 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( indexdesc is not null and indexdesc <> '' ))
GO
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( labelname is not null and labelname <> '' ))
GO
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( labelname is null or labelname = '' or labelname like '%[吖-座]%' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( labelname is not null and labelname <> '' and labelname not like '%[吖-座]%' ))
GO
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( labelname is not null and labelname <> '' ))
GO

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100219
GO
Delete from LeftMenuConfig where infoid=100219
GO
EXECUTE LMConfig_U_ByInfoInsert 2,100126,0
GO
EXECUTE LMInfo_Insert 100219,548025,'','',2,100126,7,2
GO
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219
GO

View File

@ -1,14 +0,0 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,24 @@
delete from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 548025,'浮动数据' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 548025 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮动数据' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'Floating Data' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 548025 as indexid ,'浮動數據' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 548025 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/

View File

@ -0,0 +1,15 @@
Delete from LeftMenuInfo where id=100219;
/
Delete from LeftMenuConfig where infoid=100219;
/
call LMConfig_U_ByInfoInsert (2,100126,0);
/
call LMInfo_Insert (100219,548025,'','',2,100126,7,2);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/variableSalary' where id = 100219;
/

View File

@ -20,6 +20,9 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人
二、删除停薪员工档案
update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
二、删除停薪员工社保档案
update hrsa_insurance_base_info set delete_type=3 where run_status in ('4','5')
三、删除指定人员档案

View File

@ -10,6 +10,14 @@ left join hrsa_tax_agent agent on agent.id=sob.tax_agent_id and agent.delete_typ
left join hrmresource e on e.id= result.employee_id
select e.lastname, record.salary_month as 薪资月, item.name as 薪资项 ,result.result_value as 值
from hrsa_salary_acct_record record
left join hrsa_salary_acct_result result on record.id = result.salary_acct_record_id and result.delete_type = 0 and record.delete_type = 0
left join hrsa_salary_item item on result.salary_item_id = item.id and item.delete_type = 0
left join hrmresource e on e.id= result.employee_id
where item.name = '工资薪金合计'
# 获取档案信息
select i.item_value from hrsa_salary_archive_item i

View File

@ -1 +1,2 @@
formulaRunOvertimeThreshold=
formulaRunOvertimeThreshold=100
personNumberInOneThread = 100

View File

@ -107,7 +107,7 @@ public class RehireAction implements Action {
Long taxAgentId = taxAgentPOS.get(0).getId();
Long employeeId = Long.valueOf(empIdStr);
List<SalaryArchivePO> salaryArchivePOS = getSalaryArchiveService(user).listSome(SalaryArchivePO.builder().taxAgentId(taxAgentId).employeeId(employeeId).build());
if (CollectionUtils.isEmpty(salaryArchivePOS)){
if (CollectionUtils.isEmpty(salaryArchivePOS) || salaryArchivePOS.get(0).getRunStatus().equals(SalaryArchiveStatusEnum.PENDING.getValue())){
// 直接走定薪action生成档案
InitSalaryAction initSalaryAction = new InitSalaryAction();
return initSalaryAction.doSalaryArchiveInit(requestInfo, salaryFieldMap);

View File

@ -70,4 +70,7 @@ public class SalaryCacheKey {
public final static String SALARY_REPORT_DATA = "SALARY_REPORT_DATA_";
public final static String UPLOAD_SALARY_CONFIG = "UPLOAD_SALARY_CONFIG";
}

View File

@ -0,0 +1,49 @@
package com.engine.salary.entity.config;
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
import com.engine.salary.entity.salaryitem.config.SalaryItemAllConfig;
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
import com.engine.salary.entity.taxagent.po.TaxAgentBasePO;
import com.engine.salary.sys.config.SysConfig;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("SalaryConfig")
public class SalaryConfig {
// //版本
// @XStreamAlias("version")
// @XStreamAsAttribute
// private String version;
//
@XStreamAlias("SysConfig")
private SysConfig sysConfig;
//社保方案
//薪资项目
@XStreamAlias("SalaryItemConfig")
private SalaryItemAllConfig salaryItemConfig;
//字段管理
@XStreamAlias("ArchiveFieldConfig")
private ArchiveFieldConfig archiveFieldConfig;
//分权基础设置
@XStreamAlias("TaxAgentBaseConfig")
private TaxAgentBasePO taxAgentBaseConfig;
//扣缴义务人
@XStreamImplicit
private List<TaxAgentConfig> taxAgentConfigs;
}

View File

@ -36,6 +36,10 @@ public class AttendQuoteDataBO {
continue;
}
String key = field.getCode();
//兼容出勤班次的key
if(key.startsWith("attendanceSerial_")){
key = key.replace("attendanceSerial_", "");
}
if (m.containsKey(key)) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("employeeId", m.get("resourceId"));

View File

@ -44,7 +44,7 @@ public class VariableArchiveListDTO {
/**
* 个税扣缴义务人id
*/
private String taxAgentId;
private Long taxAgentId;
/**
* 姓名

View File

@ -59,8 +59,8 @@ public class SalaryAcctConsolidatedTaxBO {
|| TaxDeclarationDataIndexConstant.ADD_UP_SPE_ADDI_DEDUCTION.equals(salaryItem.getCode())) {
return salaryAcctResults.stream()
.filter(e -> Objects.equals(e.getSalaryItemId(), salaryItem.getId()))
.map(SalaryAcctResultPO::getResultValue)
.findFirst()
.map(SalaryAcctResultPO::getResultValue)
.orElse("");
}
// 当前累计收入 = 累计值 + 本次收入 + 上几次收入

View File

@ -63,9 +63,9 @@ public class SalaryAcctEmployeeBO {
.employeeName(simpleEmployee.getUsername())
.taxAgentId(e.getTaxAgentId())
.taxAgentName(taxAgentNameMap.getOrDefault(e.getTaxAgentId(), StringUtils.EMPTY))
.departmentId(simpleEmployee.getDepartmentId())
.departmentName(simpleEmployee.getDepartmentName())
.status(UserStatusEnum.getDefaultLabelByValue(NumberUtils.toInt(simpleEmployee.getStatus())))
.departmentId(e.getDepartmentId())
.departmentName(e.getDepartmentName())
.status(UserStatusEnum.getDefaultLabelByValue(NumberUtils.toInt(e.getStatus())))
.mobile(simpleEmployee.getMobile())
.jobNum(simpleEmployee.getWorkcode())
.hireDate(simpleEmployee.getCompanystartdate())

View File

@ -1,6 +1,5 @@
package com.engine.salary.entity.salaryacct.param;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -8,7 +7,6 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Map;
/**
* 薪资核算的参数
@ -29,9 +27,4 @@ public class SalaryAcctCalculateParam {
@DataCheck(require = true,message = "参数错误薪资核算记录ID不能为空")
private Long salaryAcctRecordId;
/**
* 人员信息报表使用
*/
private Map<Long, DataCollectionEmployee> emps;
}

View File

@ -7,7 +7,9 @@ import com.engine.salary.util.valid.DataCheck;
import lombok.*;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* 薪资核算人员列表查询条件
@ -48,7 +50,6 @@ public class SalaryAcctEmployeeQueryParam extends BaseQueryParam {
* 状态
* @see SalaryEmployeeStatusEnum
*/
private SalaryEmployeeStatusEnum status;
//状态(多选)
private List<String> statuses;
@ -60,4 +61,7 @@ public class SalaryAcctEmployeeQueryParam extends BaseQueryParam {
private List<Long> ids;
private String workcode;
private List<Long> taxAgentIds;
private Set<Date> salaryMonths;
}

View File

@ -0,0 +1,24 @@
package com.engine.salary.entity.salaryarchive.config;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("ArchiveFieldConfig")
public class ArchiveFieldConfig {
@XStreamImplicit
List<SalaryItemPO> salaryItems;
}

View File

@ -0,0 +1,27 @@
package com.engine.salary.entity.salaryformula.config;
import com.engine.salary.entity.salaryformula.po.FormulaPO;
import com.engine.salary.entity.salaryformula.po.FormulaVar;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("FormluaConfig")
public class FormluaConfig {
@XStreamImplicit
private List<FormulaPO> formulas;
@XStreamImplicit
private List<FormulaVar> formulaVars;
}

View File

@ -1,5 +1,8 @@
package com.engine.salary.entity.salaryformula.po;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -7,75 +10,111 @@ import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("Formula")
public class FormulaPO {
/**
* id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 名称
*/
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 备注
*/
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 模块
*/
@XStreamAlias("module")
@XStreamAsAttribute
private String module;
/**
* 用途
*/
@XStreamAlias("useFor")
@XStreamAsAttribute
private String useFor;
/**
* 引用类型
*/
@XStreamAlias("referenceType")
@XStreamAsAttribute
private String referenceType;
/**
* 返回类型
*/
@XStreamAlias("returnType")
@XStreamAsAttribute
private String returnType;
/**
* 校验类型
*/
@XStreamAlias("validateType")
@XStreamAsAttribute
private String validateType;
/**
* 扩展参数
*/
@XStreamAlias("extendParam")
@XStreamAsAttribute
private String extendParam;
/**
* 公式内容
*/
@XStreamAlias("formula")
@XStreamAsAttribute
private String formula;
/**
* 公式实际运行脚本
*/
@XStreamAlias("formulaRunScript")
@XStreamAsAttribute
private String formulaRunScript;
/**
* 创建人
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除0否1是
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 修改时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
//主键id集合
private Collection<Long> ids;
@XStreamImplicit
private List<FormulaVar> formulaVars;
}

View File

@ -1,5 +1,8 @@
package com.engine.salary.entity.salaryformula.po;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -12,58 +15,84 @@ import java.util.Date;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("FormulaVar")
public class FormulaVar {
/**
* id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 名称
*/
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 公式id
*/
@XStreamAlias("formulaId")
@XStreamAsAttribute
private Long formulaId;
/**
* 字段id
*/
@XStreamAlias("fieldId")
@XStreamAsAttribute
private String fieldId;
/**
* 字段名称
*/
@XStreamAlias("fieldName")
@XStreamAsAttribute
private String fieldName;
/**
* 字段类型number,string
*/
@XStreamAlias("fieldType")
@XStreamAsAttribute
private String fieldType;
/**
* 来源
*/
@XStreamAlias("source")
@XStreamAsAttribute
private String source;
/**
* 排序
*/
@XStreamAlias("orderIndex")
@XStreamAsAttribute
private Integer orderIndex;
/**
* 创建人
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除,0否1是
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 修改时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
//
@XStreamOmitField
private String content;

View File

@ -0,0 +1,92 @@
package com.engine.salary.entity.salaryitem.config;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("FormulaConfig")
public class FormulaConfig {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 名称
*/
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 备注
*/
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 模块
*/
@XStreamAlias("module")
@XStreamAsAttribute
private String module;
/**
* 用途
*/
@XStreamAlias("useFor")
@XStreamAsAttribute
private String useFor;
/**
* 引用类型
*/
@XStreamAlias("referenceType")
@XStreamAsAttribute
private String referenceType;
/**
* 返回类型
*/
@XStreamAlias("returnType")
@XStreamAsAttribute
private String returnType;
/**
* 校验类型
*/
@XStreamAlias("validateType")
@XStreamAsAttribute
private String validateType;
/**
* 扩展参数
*/
@XStreamAlias("extendParam")
@XStreamAsAttribute
private String extendParam;
/**
* 公式内容
*/
@XStreamAlias("formula")
@XStreamAsAttribute
private String formula;
/**
* 公式实际运行脚本
*/
@XStreamAlias("formulaRunScript")
@XStreamAsAttribute
private String formulaRunScript;
@XStreamImplicit
private List<FormulaVarConfig> varConfigs;
}

View File

@ -0,0 +1,74 @@
package com.engine.salary.entity.salaryitem.config;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("FormulaVarConfig")
public class FormulaVarConfig {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 名称
*/
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 公式id
*/
@XStreamAlias("formulaId")
@XStreamAsAttribute
private Long formulaId;
/**
* 字段id
*/
@XStreamAlias("fieldId")
@XStreamAsAttribute
private String fieldId;
/**
* 字段名称
*/
@XStreamAlias("fieldName")
@XStreamAsAttribute
private String fieldName;
/**
* 字段类型number,string
*/
@XStreamAlias("fieldType")
@XStreamAsAttribute
private String fieldType;
/**
* 来源
*/
@XStreamAlias("source")
@XStreamAsAttribute
private String source;
/**
* 排序
*/
@XStreamAlias("orderIndex")
@XStreamAsAttribute
private Integer orderIndex;
}

View File

@ -0,0 +1,23 @@
package com.engine.salary.entity.salaryitem.config;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("SalaryItemConfig")
public class SalaryItemAllConfig {
@XStreamImplicit
List<SalaryItemPO> salaryItems;
}

View File

@ -0,0 +1,179 @@
package com.engine.salary.entity.salaryitem.config;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalarySystemTypeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("SalaryItemConfig")
public class SalaryItemConfig {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 名称
*/
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 编号
*/
@XStreamAlias("code")
@XStreamAsAttribute
private String code;
/**
* 是否是系统项目
*
* @see SalarySystemTypeEnum
*/
@XStreamAlias("systemType")
@XStreamAsAttribute
private Integer systemType;
/**
* 系统薪资项目的id是从哪个系统薪资项目复制过来的
*/
@XStreamAlias("sysSalaryItemId")
@XStreamAsAttribute
private Long sysSalaryItemId;
/**
* 默认使用0默认不适用1默认使用
*/
@XStreamAlias("useDefault")
@XStreamAsAttribute
private Integer useDefault;
/**
* 薪资档案引用0薪资档案未引用1薪资档案引用
*/
@XStreamAlias("useInEmployeeSalary")
@XStreamAsAttribute
private Integer useInEmployeeSalary;
/**
* 核算时隐藏
*/
@XStreamAlias("hideDefault")
@XStreamAsAttribute
private Integer hideDefault;
/**
* 进位规则
*
* @see SalaryRoundingModeEnum
*/
@XStreamAlias("roundingMode")
@XStreamAsAttribute
private Integer roundingMode;
/**
* 保留的小数位数
*/
@XStreamAlias("pattern")
@XStreamAsAttribute
private Integer pattern;
/**
* 取值方式
*
* @see SalaryValueTypeEnum
*/
@XStreamAlias("valueType")
@XStreamAsAttribute
private Integer valueType;
/**
* 字段类型
*
* @see SalaryDataTypeEnum
*/
@XStreamAlias("dataType")
@XStreamAsAttribute
private String dataType;
/**
* 公式
*/
@XStreamAlias("formulaId")
@XStreamAsAttribute
private Long formulaId;
/**
* 备注
*/
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 是否可以编辑0不可编辑1可编辑
*/
@XStreamAlias("canEdit")
@XStreamAsAttribute
private Integer canEdit;
/**
* 可见性
*/
@XStreamAlias("sharedType")
@XStreamAsAttribute
private Integer sharedType;
/**
* 可见范围
*/
@XStreamAlias("taxAgentIds")
@XStreamAsAttribute
private String taxAgentIds;
/**
* 0不可删除1可删除
*/
@XStreamAlias("canDelete")
@XStreamAsAttribute
private Integer canDelete;
/**
* 排序
*/
@XStreamAlias("sortedIndex")
@XStreamAsAttribute
private Integer sortedIndex;
/**
* 宽度
*/
@XStreamAlias("width")
@XStreamAsAttribute
private Integer width;
/**
* 默认值
*/
@XStreamAlias("defaultValue")
@XStreamAsAttribute
private String defaultValue;
@XStreamAlias("FormulaConfig")
private FormulaConfig formulaConfig;
}

View File

@ -0,0 +1,114 @@
package com.engine.salary.entity.salaryitem.config;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.engine.salary.util.excel.ExcelHead;
import com.engine.salary.util.excel.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SalaryItemExcelConfig {
/**
* 名称
*/
@ExcelHead(title="名称",dataIndex = "name")
@ExcelProperty(index = 0)
private String name;
/**
* 默认使用0默认不适用1默认使用
*/
@ExcelHead(title="是否默认使用",dataIndex = "useDefault")
@ExcelProperty(index = 1)
private String useDefault;
/**
* 核算是否隐藏
*/
@ExcelHead(title="核算是否隐藏",dataIndex = "hideDefault")
@ExcelProperty(index = 2)
private String hideDefault;
/**
* 字段类型
*
* @see SalaryDataTypeEnum
*/
@ExcelHead(title="字段类型",dataIndex = "dataType")
@ExcelProperty(index = 3)
private String dataType;
/**
* 进位规则
*
* @see SalaryRoundingModeEnum
*/
@ExcelHead(title="进位规则",dataIndex = "roundingMode")
@ExcelProperty(index = 4)
private String roundingMode;
/**
* 保留的小数位数
*/
@ExcelHead(title="保留的小数位数",dataIndex = "pattern")
@ExcelProperty(index = 5)
private String pattern;
/**
* 取值方式
*
* @see SalaryValueTypeEnum
*/
@ExcelHead(title="取值方式",dataIndex = "valueType")
@ExcelProperty(index = 6)
private String valueType;
/**
* 公式
*/
@ExcelHead(title="公式",dataIndex = "formula")
@ExcelProperty(index = 7)
private String formula;
@ExcelHead(title="sql返回字段",dataIndex = "sqlReturnKey")
@ExcelProperty(index = 8)
private String extendParam;
/**
* 排序
*/
@ExcelHead(title="排序",dataIndex = "sortedIndex")
@ExcelProperty(index = 9)
private String sortedIndex;
/**
* 宽度
*/
@ExcelHead(title="宽度",dataIndex = "width")
@ExcelProperty(index = 10)
private String width;
/**
* 默认值
*/
@ExcelHead(title="默认值",dataIndex = "defaultValue")
@ExcelProperty(index = 11)
private String defaultValue;
/**
* 备注
*/
@ExcelHead(title="备注",dataIndex = "description")
@ExcelProperty(index = 12)
private String description;
}

View File

@ -0,0 +1,24 @@
package com.engine.salary.entity.salaryitem.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 薪资项目查询参数
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryItemDownloadTemplateParam {
//下载模板是否带数据
private boolean hasData;
}

View File

@ -0,0 +1,27 @@
package com.engine.salary.entity.salaryitem.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 导出参数
* <p>Copyright: Copyright (c) 2024</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryItemExportParam {
private List<Long> ids;
}

View File

@ -0,0 +1,26 @@
package com.engine.salary.entity.salaryitem.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 SalaryItemImportParam {
/**
* 上传文件id
*/
String imageId;
}

View File

@ -1,10 +1,13 @@
package com.engine.salary.entity.salaryitem.po;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.entity.salaryformula.po.FormulaPO;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalarySystemTypeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -27,24 +30,31 @@ import java.util.Date;
@AllArgsConstructor
//hrsa_salary_item
@ElogTransform(name = "薪资项目")
@XStreamAlias("SalaryItem")
public class SalaryItemPO {
/**
* 主键id
*/
@ElogTransform(name = "主键id")
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 名称
*/
@ElogTransform(name = "名称")
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 编号
*/
@ElogTransform(name = "编号")
@XStreamAlias("code")
@XStreamAsAttribute
private String code;
/**
@ -53,30 +63,40 @@ public class SalaryItemPO {
* @see SalarySystemTypeEnum
*/
@ElogTransform(name = "是否是系统项目")
@XStreamAlias("systemType")
@XStreamAsAttribute
private Integer systemType;
/**
* 系统薪资项目的id是从哪个系统薪资项目复制过来的
*/
@ElogTransform(name = "系统薪资项目的id")
@XStreamAlias("sysSalaryItemId")
@XStreamAsAttribute
private Long sysSalaryItemId;
/**
* 默认使用0默认不适用1默认使用
*/
@ElogTransform(name = "默认使用")
@XStreamAlias("useDefault")
@XStreamAsAttribute
private Integer useDefault;
/**
* 薪资档案引用0薪资档案未引用1薪资档案引用
*/
@ElogTransform(name = "薪资档案引用")
@XStreamAlias("useInEmployeeSalary")
@XStreamAsAttribute
private Integer useInEmployeeSalary;
/**
* 核算时隐藏
*/
@ElogTransform(name = "核算时隐藏")
@XStreamAlias("hideDefault")
@XStreamAsAttribute
private Integer hideDefault;
/**
@ -85,12 +105,16 @@ public class SalaryItemPO {
* @see SalaryRoundingModeEnum
*/
@ElogTransform(name = "进位规则")
@XStreamAlias("roundingMode")
@XStreamAsAttribute
private Integer roundingMode;
/**
* 保留的小数位数
*/
@ElogTransform(name = "保留的小数位数")
@XStreamAlias("pattern")
@XStreamAsAttribute
private Integer pattern;
/**
@ -99,6 +123,8 @@ public class SalaryItemPO {
* @see SalaryValueTypeEnum
*/
@ElogTransform(name = "取值方式")
@XStreamAlias("valueType")
@XStreamAsAttribute
private Integer valueType;
/**
@ -107,54 +133,72 @@ public class SalaryItemPO {
* @see SalaryDataTypeEnum
*/
@ElogTransform(name = "字段类型")
@XStreamAlias("dataType")
@XStreamAsAttribute
private String dataType;
/**
* 公式
*/
@ElogTransform(name = "公式")
@XStreamAlias("formulaId")
@XStreamAsAttribute
private Long formulaId;
/**
* 备注
*/
@ElogTransform(name = "备注")
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 是否可以编辑0不可编辑1可编辑
*/
@ElogTransform(name = "是否可以编辑")
@XStreamAlias("canEdit")
@XStreamAsAttribute
private Integer canEdit;
/**
* 租户key
*/
@ElogTransform(name = "租户key")
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@ElogTransform(name = "创建人id")
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@ElogTransform(name = "是否删除")
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@ElogTransform(name = "更新时间")
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
//查询条件
@ -166,35 +210,50 @@ public class SalaryItemPO {
* 可见性
*/
@ElogTransform(name = "可见性")
@XStreamAlias("sharedType")
@XStreamAsAttribute
private Integer sharedType;
/**
* 可见范围
*/
@ElogTransform(name = "可见范围")
@XStreamAlias("taxAgentIds")
@XStreamAsAttribute
private String taxAgentIds;
/**
* 0不可删除1可删除
*/
@ElogTransform(name = "是否已经删除")
@XStreamAlias("canDelete")
@XStreamAsAttribute
private Integer canDelete;
/**
* 排序
*/
@ElogTransform(name = "排序")
@XStreamAlias("sortedIndex")
@XStreamAsAttribute
private Integer sortedIndex;
/**
* 宽度
*/
@ElogTransform(name = "宽度")
@XStreamAlias("width")
@XStreamAsAttribute
private Integer width;
/**
* 默认值
*/
@ElogTransform(name = "默认值")
@XStreamAlias("defaultValue")
@XStreamAsAttribute
private String defaultValue;
@XStreamAlias("Formula")
FormulaPO formula;
}

View File

@ -0,0 +1,38 @@
package com.engine.salary.entity.salarysob.config;
import com.engine.salary.entity.salarysob.po.*;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("SalarySobConfig")
public class SalarySobConfig {
@XStreamAlias("SalarySob")
private SalarySobPO salarySob;
@XStreamImplicit
private List<SalarySobEmpFieldPO> salarySobEmpFields;
@XStreamImplicit
private List<SalarySobItemGroupPO> salarySobItemGroups;
@XStreamImplicit
private List<SalarySobItemPO> salarySobItems;
@XStreamImplicit
private List<SalarySobBackItemPO> salarySobBackItems;
@XStreamImplicit
private List<SalarySobAdjustRulePO> salarySobAdjustRules;
}

View File

@ -1,6 +1,8 @@
package com.engine.salary.entity.salarysob.po;
import com.engine.salary.enums.salarysob.SalarySobAdjustRuleTypeEnum;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -24,26 +26,35 @@ import java.util.Date;
@AllArgsConstructor
@Builder
//hrsa_salary_sob_adjust_rule
@XStreamAlias("SalarySobAdjustRule")
public class SalarySobAdjustRulePO {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 薪资账套id
*/
@XStreamAlias("salarySobId")
@XStreamAsAttribute
private Long salarySobId;
/**
* 薪资项目id
*/
@XStreamAlias("salaryItemId")
@XStreamAsAttribute
private Long salaryItemId;
/**
* 生效日期
*/
@XStreamAlias("dayOfMonth")
@XStreamAsAttribute
private Integer dayOfMonth;
/**
@ -51,6 +62,8 @@ public class SalarySobAdjustRulePO {
*
* @see SalarySobAdjustRuleTypeEnum
*/
@XStreamAlias("beforeAdjustmentType")
@XStreamAsAttribute
private Integer beforeAdjustmentType;
/**
@ -58,31 +71,43 @@ public class SalarySobAdjustRulePO {
*
* @see SalarySobAdjustRuleTypeEnum
*/
@XStreamAlias("afterAdjustmentType")
@XStreamAsAttribute
private Integer afterAdjustmentType;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
Collection<Long> ids;

View File

@ -1,9 +1,13 @@
package com.engine.salary.entity.salarysob.po;
import com.engine.salary.entity.salaryformula.po.FormulaPO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -26,26 +30,35 @@ import java.util.stream.Collectors;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("SalarySobBackItem")
public class SalarySobBackItemPO{
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 薪资账套id
*/
@XStreamAlias("salarySobId")
@XStreamAsAttribute
private Long salarySobId;
/**
* 薪资项目id
*/
@XStreamAlias("salaryItemId")
@XStreamAsAttribute
private Long salaryItemId;
/**
* 薪资项目code
*/
@XStreamAlias("salaryItemCode")
@XStreamAsAttribute
private String salaryItemCode;
/**
@ -53,6 +66,8 @@ public class SalarySobBackItemPO{
*
* @see SalaryDataTypeEnum
*/
@XStreamAlias("dataType")
@XStreamAsAttribute
private String dataType;
/**
@ -60,11 +75,15 @@ public class SalarySobBackItemPO{
*
* @see SalaryRoundingModeEnum
*/
@XStreamAlias("roundingMode")
@XStreamAsAttribute
private Integer roundingMode;
/**
* 保留的小数位数
*/
@XStreamAlias("pattern")
@XStreamAsAttribute
private Integer pattern;
/**
@ -72,54 +91,79 @@ public class SalarySobBackItemPO{
*
* @see SalaryValueTypeEnum
*/
@XStreamAlias("valueType")
@XStreamAsAttribute
private Integer valueType;
/**
* 公式id
*/
@XStreamAlias("formulaId")
@XStreamAsAttribute
private Long formulaId;
/**
* 0:已发项目1:补发薪资项目
*/
@XStreamAlias("backCalcType")
@XStreamAsAttribute
private Integer backCalcType;
/**
* 默认值
*/
@XStreamAlias("defaultValue")
@XStreamAsAttribute
private String defaultValue;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
@JsonIgnore
private String tenantKey;
/**
* 创建人id
*/
@XStreamAlias("creator")
@XStreamAsAttribute
@JsonIgnore
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
@JsonIgnore
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
@JsonIgnore
private Date createTime;
/**
* 更新时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
@JsonIgnore
private Date updateTime;
/**
* 默认值
*/
private String defaultValue;
@XStreamAlias("SalaryItem")
private SalaryItemPO salaryItem;
@XStreamAlias("Formula")
FormulaPO formula;
/**
* 薪资项目id

View File

@ -1,5 +1,7 @@
package com.engine.salary.entity.salarysob.po;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -27,56 +29,77 @@ import java.util.stream.Collectors;
@NoArgsConstructor
@AllArgsConstructor
//hrsa_salary_sob_emp_field
@XStreamAlias("SalarySobEmpField")
public class SalarySobEmpFieldPO {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 薪资账套id
*/
@XStreamAlias("salarySobId")
@XStreamAsAttribute
private Long salarySobId;
/**
* 字段code
*/
@XStreamAlias("fieldCode")
@XStreamAsAttribute
private String fieldCode;
/**
* 排序字段
*/
@XStreamAlias("sortedIndex")
@XStreamAsAttribute
private Integer sortedIndex;
/**
* 是否可以删除
*/
@XStreamAlias("canDelete")
@XStreamAsAttribute
private Integer canDelete;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
Collection<Long> ids;

View File

@ -1,5 +1,8 @@
package com.engine.salary.entity.salarysob.po;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -25,60 +28,88 @@ import java.util.stream.Collectors;
@NoArgsConstructor
@AllArgsConstructor
//hrsa_salary_sob_item_group
@XStreamAlias("SalarySobItemGroup")
public class SalarySobItemGroupPO {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 薪资账套的id
*/
@XStreamAlias("salarySobId")
@XStreamAsAttribute
private Long salarySobId;
/**
* 薪资账套中薪资项目分组的名称
*/
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 排序字段
*/
@XStreamAlias("sortedIndex")
@XStreamAsAttribute
private Integer sortedIndex;
/**
* 备注
*/
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
//该分类是否隐藏0不隐藏1隐藏
@XStreamAlias("itemHide")
@XStreamAsAttribute
private Long itemHide;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
//该分类是否隐藏0不隐藏1隐藏
private Long itemHide;
@XStreamImplicit
private List<SalarySobItemPO> salarySobItems;
Collection<Long> ids;

View File

@ -1,8 +1,12 @@
package com.engine.salary.entity.salarysob.po;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.entity.salaryformula.po.FormulaPO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -29,83 +33,73 @@ import java.util.stream.Collectors;
@AllArgsConstructor
//hrsa_salary_sob_item
@ElogTransform( name="薪资账套薪资项目" )
@XStreamAlias("SalarySobItem")
public class SalarySobItemPO {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 薪资账套的id
*/
@XStreamAlias("salarySobId")
@XStreamAsAttribute
private Long salarySobId;
/**
* 薪资项目的id
*/
@XStreamAlias("salaryItemId")
@XStreamAsAttribute
private Long salaryItemId;
/**
* 薪资账套薪资项目分组id
*/
@XStreamAlias("salarySobItemGroupId")
@XStreamAsAttribute
private Long salarySobItemGroupId;
/**
* 公式
*/
@XStreamAlias("formulaId")
@XStreamAsAttribute
private Long formulaId;
/**
* 排序字段
*/
@XStreamAlias("sortedIndex")
@XStreamAsAttribute
private Integer sortedIndex;
/**
* 备注
*/
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 是否可以删除0不可删除1可以删除
*/
private Integer canDelete;
/**
* 租户key
*/
private String tenantKey;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 进位规则
*
* @see SalaryRoundingModeEnum
*/
@XStreamAlias("roundingMode")
@XStreamAsAttribute
private Integer roundingMode;
/**
* 保留的小数位数
*/
@XStreamAlias("pattern")
@XStreamAsAttribute
private Integer pattern;
/**
@ -113,17 +107,71 @@ public class SalarySobItemPO {
*
* @see SalaryValueTypeEnum
*/
@XStreamAlias("valueType")
@XStreamAsAttribute
private Integer valueType;
//该分类是否隐藏0不隐藏1隐藏
@XStreamAlias("itemHide")
@XStreamAsAttribute
private Long itemHide;
/**
* 默认值
*/
@XStreamAlias("defaultValue")
@XStreamAsAttribute
private String defaultValue;
/**
* 是否可以删除0不可删除1可以删除
*/
@XStreamAlias("canDelete")
@XStreamAsAttribute
private Integer canDelete;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
@XStreamAlias("SalaryItem")
private SalaryItemPO salaryItem;
@XStreamAlias("Formula")
private FormulaPO formula;
//in
Collection<Long> ids;
Collection<Long> salarySobIds;

View File

@ -2,6 +2,9 @@ package com.engine.salary.entity.salarysob.po;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.util.valid.Compare;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,6 +24,7 @@ import java.util.Date;
@AllArgsConstructor
@ElogTransform( name="薪资账套" )
//hrsa_salary_sob
@XStreamAlias("SalarySob")
public class SalarySobPO {
/**
@ -28,6 +32,7 @@ public class SalarySobPO {
*/
@ElogTransform( name="主键" )
@Compare
@XStreamOmitField
private Long id;
/**
@ -35,12 +40,16 @@ public class SalarySobPO {
*/
@ElogTransform( name="名称" )
@Compare
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 个税扣缴义务人的主键id
*/
@ElogTransform( name="个税扣缴义务人id" )
@XStreamAlias("taxAgentId")
@XStreamAsAttribute
private Long taxAgentId;
/**
@ -48,6 +57,8 @@ public class SalarySobPO {
*/
@ElogTransform( name="薪资类型" )
@Compare
@XStreamAlias("incomeCategory")
@XStreamAsAttribute
private Integer incomeCategory;
/**
@ -55,6 +66,8 @@ public class SalarySobPO {
*/
@ElogTransform( name="薪资周期" )
@Compare
@XStreamAlias("salaryCycleType")
@XStreamAsAttribute
private Integer salaryCycleType;
/**
@ -62,6 +75,8 @@ public class SalarySobPO {
*/
@ElogTransform( name="薪资周期起始日期" )
@Compare
@XStreamAlias("salaryCycleFromDay")
@XStreamAsAttribute
private Integer salaryCycleFromDay;
/**
@ -69,6 +84,8 @@ public class SalarySobPO {
*/
@ElogTransform( name="税款所属期" )
@Compare
@XStreamAlias("taxCycleType")
@XStreamAsAttribute
private Integer taxCycleType;
/**
@ -76,6 +93,8 @@ public class SalarySobPO {
*/
@ElogTransform( name="考勤周期" )
@Compare
@XStreamAlias("attendCycleType")
@XStreamAsAttribute
private Integer attendCycleType;
/**
@ -83,6 +102,8 @@ public class SalarySobPO {
*/
@ElogTransform( name="考勤周期起始日期" )
@Compare
@XStreamAlias("attendCycleFromDay")
@XStreamAsAttribute
private Integer attendCycleFromDay;
/**
@ -90,48 +111,64 @@ public class SalarySobPO {
*/
@ElogTransform( name="社保福利所属期" )
@Compare
@XStreamAlias("socialSecurityCycleType")
@XStreamAsAttribute
private Integer socialSecurityCycleType;
/**
* 是否禁用0正常使用1禁用
*/
@ElogTransform( name="是否禁用" )
@XStreamAlias("disable")
@XStreamAsAttribute
private Integer disable;
/**
* 描述
*/
@ElogTransform( name="描述" )
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 创建人
*/
@ElogTransform( name="创建人" )
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 创建时间
*/
@ElogTransform( name="创建时间" )
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@ElogTransform( name="更新时间" )
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
/**
* 是否已删除0未删除1已删除
*/
@ElogTransform( name="是否已删除" )
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 租户ID
*/
@ElogTransform( name="租户" )
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
Collection<Long> ids;

View File

@ -2,6 +2,7 @@ package com.engine.salary.entity.siarchives.po;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import com.engine.salary.enums.siaccount.EmployeeStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -90,6 +91,7 @@ public class InsuranceArchivesBaseInfoPO {
/**
* 福利执行状态
* @see EmployeeStatusEnum
*/
@ElogTransform(name = "福利执行状态")
private String runStatus;

View File

@ -41,4 +41,14 @@ public class InsuranceSchemeReqParam {
private WelfareTypeEnum welfareTypeEnum;
private List<Long> ids;
/**
* 是否修改档案数据为上限或下限
*/
private Boolean changeData;
/**
* 校验是否有档案不满足上下限
*/
private Boolean validate;
}

View File

@ -0,0 +1,28 @@
package com.engine.salary.entity.taxagent.config;
import com.engine.salary.entity.salarysob.config.SalarySobConfig;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("TaxAgentConfig")
public class TaxAgentConfig {
@XStreamAlias("TaxAgent")
private TaxAgentPO taxAgent;
//薪资账套
@XStreamImplicit
private List<SalarySobConfig> salarySobConfigs;
}

View File

@ -1,5 +1,7 @@
package com.engine.salary.entity.taxagent.po;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,41 +23,57 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
//hrsa_tax_agent_base")
@XStreamAlias("TaxAgentBase")
public class TaxAgentBasePO {
/**
* 主键id
*/
@XStreamAlias("id")
@XStreamAsAttribute
private Long id;
/**
* 分权开关
*/
@XStreamAlias("devolutionStatus")
@XStreamAsAttribute
private Integer devolutionStatus;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
private Collection<Long> ids;
}

View File

@ -1,6 +1,9 @@
package com.engine.salary.entity.taxagent.po;
import com.engine.hrmelog.annotation.ElogTransform;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -24,64 +27,86 @@ import java.util.Date;
//hrsa_tax_agent")
//个税扣缴义务人表")
@ElogTransform(name = "个税扣缴义务人")
@XStreamAlias("TaxAgent")
public class TaxAgentPO {
/**
* 主键id
*/
@ElogTransform(name = "主键id")
@XStreamOmitField
private Long id;
/**
* 名称
*/
@ElogTransform(name = "名称")
@XStreamAlias("name")
@XStreamAsAttribute
private String name;
/**
* 代缴机构
*/
// @ElogTransform(name = "代缴机构")
@XStreamAlias("paymentAgency")
@XStreamAsAttribute
private String paymentAgency;
/**
* 排序
*/
@XStreamAlias("sortedIndex")
@XStreamAsAttribute
private Integer sortedIndex;
/**
* 备注
*/
@ElogTransform(name = "备注")
@XStreamAlias("description")
@XStreamAsAttribute
private String description;
/**
* 租户key
*/
@XStreamAlias("tenantKey")
@XStreamAsAttribute
private String tenantKey;
/**
* 创建人id
*/
@ElogTransform(name = "创建人id")
@XStreamAlias("creator")
@XStreamAsAttribute
private Long creator;
/**
* 是否删除
*/
@XStreamAlias("deleteType")
@XStreamAsAttribute
private Integer deleteType;
/**
* 创建时间
*/
@ElogTransform(name = "创建时间")
@XStreamAlias("createTime")
@XStreamAsAttribute
private Date createTime;
/**
* 更新时间
*/
@ElogTransform(name = "更新时间")
@ElogTransform(name = "updateTime")
@XStreamAlias("updateTime")
@XStreamAsAttribute
private Date updateTime;
/**
* 排序
*/
private Integer sortedIndex;
private Collection<Long> ids;
}

View File

@ -3,12 +3,13 @@ package com.engine.salary.enums;
/**
* @description:
* @author: xiajun
* @modified By: xiajun
* @date: Created in 10/28/21 5:50 PM
* @version:v1.0
*/
* 开关枚举
* <p>Copyright: Copyright (c) 2024</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public enum SalaryOnOffEnum implements BaseEnum<Integer> {
ON(1, "", 84967),
@ -40,4 +41,22 @@ public enum SalaryOnOffEnum implements BaseEnum<Integer> {
public Integer getLabelId() {
return labelId;
}
public static SalaryOnOffEnum parseByValue(int value) {
for (SalaryOnOffEnum item : values()) {
if (item.getValue().equals(value)) {
return item;
}
}
return OFF;
}
public static SalaryOnOffEnum parseByDefaultLabel(String defaultLabel) {
for (SalaryOnOffEnum item : values()) {
if (item.getDefaultLabel().equals(defaultLabel)) {
return item;
}
}
return OFF;
}
}

View File

@ -67,6 +67,15 @@ public enum SalaryRoundingModeEnum implements BaseEnum<Integer> {
return modeEnum;
}
}
return null;
return ROUNDING;
}
public static SalaryRoundingModeEnum parseByDefaultLabel(String defaultLabel) {
for (SalaryRoundingModeEnum modeEnum : SalaryRoundingModeEnum.values()) {
if (Objects.equals(modeEnum.getDefaultLabel(), defaultLabel)) {
return modeEnum;
}
}
return ROUNDING;
}
}

View File

@ -51,7 +51,16 @@ public enum SalaryValueTypeEnum implements BaseEnum<Integer> {
return salaryValueTypeEnum;
}
}
return null;
return INPUT;
}
public static SalaryValueTypeEnum parseByDefaultLabel(String defaultLabel) {
for (SalaryValueTypeEnum salaryValueTypeEnum : SalaryValueTypeEnum.values()) {
if (Objects.equals(salaryValueTypeEnum.getDefaultLabel(), defaultLabel)) {
return salaryValueTypeEnum;
}
}
return INPUT;
}
@ -65,6 +74,6 @@ public enum SalaryValueTypeEnum implements BaseEnum<Integer> {
return enumAry[i].getDefaultLabel();
}
}
return "";
return INPUT.getDefaultLabel();
}
}

View File

@ -1,6 +1,7 @@
package com.engine.salary.enums.salaryitem;
import com.engine.salary.enums.BaseEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import java.util.Arrays;
import java.util.Objects;
@ -51,7 +52,7 @@ public enum SalaryDataTypeEnum implements BaseEnum<String> {
return salaryDataTypeEnum;
}
}
return null;
return STRING;
}
public static String getDefaultLabelByValue(String value) {
@ -66,4 +67,13 @@ public enum SalaryDataTypeEnum implements BaseEnum<String> {
}
return "";
}
public static SalaryDataTypeEnum parseByDefaultLabel(String defaultLabel) {
for (SalaryDataTypeEnum typeEnum : SalaryDataTypeEnum.values()) {
if (Objects.equals(typeEnum.getDefaultLabel(), defaultLabel)) {
return typeEnum;
}
}
return STRING;
}
}

View File

@ -8,12 +8,6 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Author weaver_cl
*
* @Date 2022/4/18
* @Version V1.0
**/
public interface InsuranceExportMapper {
List<ExcelAccountExportPO> exportExcelAccount(@Param("param") InsuranceComparisonResultQueryParam param);

View File

@ -0,0 +1,18 @@
package com.engine.salary.mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* SQLMapper
* <p>Copyright: Copyright (c) 2024</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public interface SQLMapper {
List<Map> runSQL(@Param("sql") String sql);
}

View File

@ -0,0 +1,7 @@
<?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.SQLMapper">
<select id="runSQL" resultType="java.util.Map">
${sql}
</select>
</mapper>

View File

@ -4,7 +4,6 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveItemQueryParam;
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustRecordQueryParam;
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -97,4 +96,5 @@ public interface SalaryArchiveItemMapper {
void batchDeleteHistoryData(SalaryArchiveItemPO build);
int batchUpdate(@Param("collection") List<SalaryArchiveItemPO> pos);
}

View File

@ -1137,4 +1137,61 @@
#{item.id}
</foreach>
</update>
<resultMap id="configResultMap" type="com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig">
<result column="item_id" property="id"/>
<result column="item_name" property="name"/>
<result column="item_code" property="code"/>
<result column="item_system_type" property="systemType"/>
<result column="item_sys_salary_item_id" property="sysSalaryItemId"/>
<result column="item_use_default" property="useDefault"/>
<result column="item_use_in_employee_salary" property="useInEmployeeSalary"/>
<result column="item_rounding_mode" property="roundingMode"/>
<result column="item_pattern" property="pattern"/>
<result column="item_value_type" property="valueType"/>
<result column="item_formula_id" property="formulaId"/>
<result column="item_description" property="description"/>
<result column="item_can_edit" property="canEdit"/>
<result column="item_data_type" property="dataType"/>
<result column="item_shared_type" property="sharedType"/>
<result column="item_tax_agent_ids" property="taxAgentIds"/>
<result column="item_sorted_index" property="sortedIndex"/>
<result column="item_hide_default" property="hideDefault"/>
<result column="item_width" property="width"/>
<result column="item_default_value" property="defaultValue"/>
</resultMap>
<sql id="itemColumns">
item.id as item_id
,item.name as item_name
, item.code as item_code
, item.system_type as item_system_type
, item.sys_salary_item_id as item_sys_salary_item_id
, item.use_default as item_use_default
, item.use_in_employee_salary as item_use_in_employee_salary
, item.rounding_mode as item_rounding_mode
, item.pattern as item_pattern
, item.value_type as item_value_type
, item.formula_id as item_formula_id
, item.description as item_description
, item.can_edit as item_can_edit
, item.can_delete as item_can_delete
, item.data_type as item_data_type
, item.shared_type as item_shared_type
, item.tax_agent_ids as item_tax_agent_ids
, item.sorted_index as item_sorted_index
, item.hide_default as item_hide_default
, item.width as item_width
, item.default_value as item_default_value
</sql>
</mapper>

View File

@ -104,4 +104,10 @@ public interface AttendQuoteFieldMapper {
* @return
*/
List<AttendQuoteFieldPO> listSome(@Param("param") AttendQuoteFieldPO param);
/**
* 获取出勤班次
* @return
*/
List<String> getAttendanceSerials();
}

View File

@ -486,4 +486,8 @@
</delete>
<select id="getAttendanceSerials" resultType="string">
select id from kq_ShiftManagement where isdelete is null or isdelete <![CDATA[ <> ]]> '1'
</select>
</mapper>

View File

@ -15,7 +15,9 @@ public interface FormulaMapper {
* @return 返回集合没有返回空List
*/
List<FormulaPO> listAll();
List<FormulaPO> list2All();
/**
* 条件查询
*

View File

@ -48,6 +48,12 @@
WHERE delete_type = 0
</select>
<select id="list2All" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_formula t
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT

View File

@ -521,7 +521,6 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
WHERE delete_type = 0
AND salary_acct_record_id = #{param.salaryAcctRecordId}
<include refid="SalaryAcctEmployeeParamSql"/>
<!-- 排序 -->
<if test="param.orderRule != null">
@ -538,7 +537,6 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
WHERE delete_type = 0
AND salary_acct_record_id = #{param.salaryAcctRecordId}
<include refid="SalaryAcctEmployeeParamSql"/>
<!-- 排序 -->
<if test="param.orderRule != null">
@ -555,7 +553,6 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
WHERE delete_type = 0
AND salary_acct_record_id = #{param.salaryAcctRecordId}
<include refid="SalaryAcctEmployeeParamSql"/>
<!-- 排序 -->
<if test="param.orderRule != null">
@ -564,6 +561,9 @@
</select>
<sql id="SalaryAcctEmployeeParamSql">
<if test="param.salaryAcctRecordId != null">
AND t.salary_acct_record_id = #{param.salaryAcctRecordId}
</if>
<if test="param.ids != null and param.ids.size()>0">
AND t.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
@ -573,13 +573,46 @@
<if test="param.taxAgentId != null">
AND t.tax_agent_id = #{param.taxAgentId}
</if>
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<if test="param.salaryMonths != null and param.salaryMonths.size()>0">
AND t.salary_month IN
<foreach collection="param.salaryMonths" open="(" item="salaryMonth" separator="," close=")">
#{salaryMonth}
</foreach>
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND t.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
-- 部门
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND t.department_id IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND t.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND t.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
<if test="(param.employeeName != null and param.employeeName != '')
or (param.workcode != null and param.workcode != '')
or (param.subcompanyIds != null and param.subcompanyIds.size()>0)
or (param.departmentIds != null and param.departmentIds.size()>0)
or (param.positionIds != null and param.positionIds.size()>0)
or (param.statuses != null and param.statuses.size()>0)
or (param.status != null and param.status.toString != 'ALL')">
or (param.workcode != null and param.workcode != '')">
AND t.employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
@ -590,68 +623,6 @@
<if test="param.workcode != null and param.workcode != ''">
AND em.workcode like CONCAT('%',#{param.workcode},'%')
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND em.subcompanyid1 IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
-- 部门
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND em.departmentid IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND em.jobtitle IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND em.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
-- 在职
<if test="param.status != null and param.status.toString == 'NORMAL'">
AND em.status in (0,1,2,3)
</if>
-- 离职(解雇,离职,退休)
<if test="param.status != null and param.status.toString == 'UNAVAILABLE'">
AND em.status in (4,5,6)
</if>
-- 试用
<if test="param.status != null and param.status.toString == 'TRIAL'">
AND em.status in (0)
</if>
-- 正式
<if test="param.status != null and param.status.toString == 'FORMAL'">
AND em.status in (1)
</if>
-- 临时
<if test="param.status != null and param.status.toString == 'TEMPORARY'">
AND em.status in (2)
</if>
-- 试用延期
<if test="param.status != null and param.status.toString == 'DELAY'">
AND em.status in (3)
</if>
-- 解雇
<if test="param.status != null and param.status.toString == 'FIRE'">
AND em.status in (4)
</if>
-- 离职
<if test="param.status != null and param.status.toString == 'DEPARTURE'">
AND em.status in (5)
</if>
-- 退休
<if test="param.status != null and param.status.toString == 'RETIRED'">
AND em.status in (6)
</if>
union all
@ -662,72 +633,13 @@
<if test="param.workcode != null and param.workcode != ''">
AND extem.workcode like CONCAT('%',#{param.workcode},'%')
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND extem.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
-- 部门
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND extem.department_id IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND extem.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND extem.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
-- 在职
<if test="param.status != null and param.status.toString == 'NORMAL'">
AND extem.status in (0,1,2,3)
</if>
-- 离职(解雇,离职,退休)
<if test="param.status != null and param.status.toString == 'UNAVAILABLE'">
AND extem.status in (4,5,6)
</if>
-- 试用
<if test="param.status != null and param.status.toString == 'TRIAL'">
AND extem.status in (0)
</if>
-- 正式
<if test="param.status != null and param.status.toString == 'FORMAL'">
AND extem.status in (1)
</if>
-- 临时
<if test="param.status != null and param.status.toString == 'TEMPORARY'">
AND extem.status in (2)
</if>
-- 试用延期
<if test="param.status != null and param.status.toString == 'DELAY'">
AND extem.status in (3)
</if>
-- 解雇
<if test="param.status != null and param.status.toString == 'FIRE'">
AND extem.status in (4)
</if>
-- 离职
<if test="param.status != null and param.status.toString == 'DEPARTURE'">
AND extem.status in (5)
</if>
-- 退休
<if test="param.status != null and param.status.toString == 'RETIRED'">
AND extem.status in (6)
</if>
)
</if>
</sql>
<sql id="SalaryAcctEmployeeParamSql" databaseId="oracle">
<if test="param.salaryAcctRecordId != null">
AND t.salary_acct_record_id = #{param.salaryAcctRecordId}
</if>
<if test="param.ids != null and param.ids.size()>0">
AND t.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
@ -737,13 +649,46 @@
<if test="param.taxAgentId != null">
AND t.tax_agent_id = #{param.taxAgentId}
</if>
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<if test="param.salaryMonths != null and param.salaryMonths.size()>0">
AND t.salary_month IN
<foreach collection="param.salaryMonths" open="(" item="salaryMonth" separator="," close=")">
#{salaryMonth}
</foreach>
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND t.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
-- 部门
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND t.department_id IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND t.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND t.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
<if test="(param.employeeName != null and param.employeeName != '')
or (param.workcode != null and param.workcode != '')
or (param.subcompanyIds != null and param.subcompanyIds.size()>0)
or (param.departmentIds != null and param.departmentIds.size()>0)
or (param.positionIds != null and param.positionIds.size()>0)
or (param.statuses != null and param.statuses.size()>0)
or (param.status != null and param.status.toString != 'ALL')">
or (param.workcode != null and param.workcode != '')">
AND t.employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
@ -754,69 +699,7 @@
<if test="param.workcode != null and param.workcode != ''">
AND em.workcode like '%'||#{param.workcode}||'%'
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND em.subcompanyid1 IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND em.departmentid IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND em.jobtitle IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND em.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
-- 在职
<if test="param.status != null and param.status.toString == 'NORMAL'">
AND em.status in (0,1,2,3)
</if>
-- 离职(解雇,离职,退休)
<if test="param.status != null and param.status.toString == 'UNAVAILABLE'">
AND em.status in (4,5,6)
</if>
-- 试用
<if test="param.status != null and param.status.toString == 'TRIAL'">
AND em.status in (0)
</if>
-- 正式
<if test="param.status != null and param.status.toString == 'FORMAL'">
AND em.status in (1)
</if>
-- 临时
<if test="param.status != null and param.status.toString == 'TEMPORARY'">
AND em.status in (2)
</if>
-- 试用延期
<if test="param.status != null and param.status.toString == 'DELAY'">
AND em.status in (3)
</if>
-- 解雇
<if test="param.status != null and param.status.toString == 'FIRE'">
AND em.status in (4)
</if>
-- 离职
<if test="param.status != null and param.status.toString == 'DEPARTURE'">
AND em.status in (5)
</if>
-- 退休
<if test="param.status != null and param.status.toString == 'RETIRED'">
AND em.status in (6)
</if>
union all
SELECT id FROM hrsa_external_employee extem WHERE extem.status not in (7)
<if test="param.employeeName != null and param.employeeName != ''">
AND extem.username LIKE '%'||#{param.employeeName}||'%'
@ -824,70 +707,13 @@
<if test="param.workcode != null and param.workcode != ''">
AND extem.workcode like '%'||#{param.workcode}||'%'
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND extem.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND extem.department_id IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND extem.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND extem.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
-- 在职
<if test="param.status != null and param.status.toString == 'NORMAL'">
AND extem.status in (0,1,2,3)
</if>
-- 离职(解雇,离职,退休)
<if test="param.status != null and param.status.toString == 'UNAVAILABLE'">
AND extem.status in (4,5,6)
</if>
-- 试用
<if test="param.status != null and param.status.toString == 'TRIAL'">
AND extem.status in (0)
</if>
-- 正式
<if test="param.status != null and param.status.toString == 'FORMAL'">
AND extem.status in (1)
</if>
-- 临时
<if test="param.status != null and param.status.toString == 'TEMPORARY'">
AND extem.status in (2)
</if>
-- 试用延期
<if test="param.status != null and param.status.toString == 'DELAY'">
AND extem.status in (3)
</if>
-- 解雇
<if test="param.status != null and param.status.toString == 'FIRE'">
AND extem.status in (4)
</if>
-- 离职
<if test="param.status != null and param.status.toString == 'DEPARTURE'">
AND extem.status in (5)
</if>
-- 退休
<if test="param.status != null and param.status.toString == 'RETIRED'">
AND extem.status in (6)
</if>
)
</if>
</sql>
<sql id="SalaryAcctEmployeeParamSql" databaseId="sqlserver">
<if test="param.salaryAcctRecordId != null">
AND t.salary_acct_record_id = #{param.salaryAcctRecordId}
</if>
<if test="param.ids != null and param.ids.size()>0">
AND t.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
@ -897,13 +723,46 @@
<if test="param.taxAgentId != null">
AND t.tax_agent_id = #{param.taxAgentId}
</if>
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
AND t.tax_agent_id IN
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
#{taxAgentId}
</foreach>
</if>
<if test="param.salaryMonths != null and param.salaryMonths.size()>0">
AND t.salary_month IN
<foreach collection="param.salaryMonths" open="(" item="salaryMonth" separator="," close=")">
#{salaryMonth}
</foreach>
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND t.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
-- 部门
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND t.department_id IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND t.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND t.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
<if test="(param.employeeName != null and param.employeeName != '')
or (param.workcode != null and param.workcode != '')
or (param.subcompanyIds != null and param.subcompanyIds.size()>0)
or (param.departmentIds != null and param.departmentIds.size()>0)
or (param.positionIds != null and param.positionIds.size()>0)
or (param.statuses != null and param.statuses.size()>0)
or (param.status != null and param.status.toString != 'ALL')">
or (param.workcode != null and param.workcode != '')">
AND t.employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
@ -914,68 +773,6 @@
<if test="param.workcode != null and param.workcode != ''">
AND em.workcode like '%'+#{param.workcode}+'%'
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND em.subcompanyid1 IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND em.departmentid IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND em.jobtitle IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND em.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
-- 在职
<if test="param.status != null and param.status.toString == 'NORMAL'">
AND em.status in (0,1,2,3)
</if>
-- 离职(解雇,离职,退休)
<if test="param.status != null and param.status.toString == 'UNAVAILABLE'">
AND em.status in (4,5,6)
</if>
-- 试用
<if test="param.status != null and param.status.toString == 'TRIAL'">
AND em.status in (0)
</if>
-- 正式
<if test="param.status != null and param.status.toString == 'FORMAL'">
AND em.status in (1)
</if>
-- 临时
<if test="param.status != null and param.status.toString == 'TEMPORARY'">
AND em.status in (2)
</if>
-- 试用延期
<if test="param.status != null and param.status.toString == 'POSTPONE'">
AND em.status in (3)
</if>
-- 解雇
<if test="param.status != null and param.status.toString == 'FIRE'">
AND em.status in (4)
</if>
-- 离职
<if test="param.status != null and param.status.toString == 'DEPARTURE'">
AND em.status in (5)
</if>
-- 退休
<if test="param.status != null and param.status.toString == 'RETIRED'">
AND em.status in (6)
</if>
union all
SELECT id FROM hrsa_external_employee extem WHERE extem.status not in (7)
@ -985,67 +782,6 @@
<if test="param.workcode != null and param.workcode != ''">
AND extem.workcode like '%'+#{param.workcode}+'%'
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND extem.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND extem.department_id IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
#{departmentId}
</foreach>
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND extem.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="positionId" separator="," close=")">
#{positionId}
</foreach>
</if>
<if test="param.statuses != null and param.statuses.size()>0">
AND extem.status IN
<foreach collection="param.statuses" open="(" item="userStatus" separator="," close=")">
#{userStatus}
</foreach>
</if>
-- 在职
<if test="param.status != null and param.status.toString == 'NORMAL'">
AND extem.status in (0,1,2,3)
</if>
-- 离职(解雇,离职,退休)
<if test="param.status != null and param.status.toString == 'UNAVAILABLE'">
AND extem.status in (4,5,6)
</if>
-- 试用
<if test="param.status != null and param.status.toString == 'TRIAL'">
AND extem.status in (0)
</if>
-- 正式
<if test="param.status != null and param.status.toString == 'FORMAL'">
AND extem.status in (1)
</if>
-- 临时
<if test="param.status != null and param.status.toString == 'TEMPORARY'">
AND extem.status in (2)
</if>
-- 试用延期
<if test="param.status != null and param.status.toString == 'POSTPONE'">
AND extem.status in (3)
</if>
-- 解雇
<if test="param.status != null and param.status.toString == 'FIRE'">
AND extem.status in (4)
</if>
-- 离职
<if test="param.status != null and param.status.toString == 'DEPARTURE'">
AND extem.status in (5)
</if>
-- 退休
<if test="param.status != null and param.status.toString == 'RETIRED'">
AND extem.status in (6)
</if>
)
</if>
</sql>

View File

@ -1,5 +1,6 @@
package com.engine.salary.mapper.salaryitem;
import com.engine.salary.entity.salaryitem.config.SalaryItemExcelConfig;
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import org.apache.ibatis.annotations.Param;
@ -67,5 +68,11 @@ public interface SalaryItemMapper {
void batchUpdateSortedIndex(@Param("collection")List<SalaryItemPO> salaryItemPOS);
SalaryItemPO getByName(String name);
SalaryItemPO getByCode(String code);
List<SalaryItemExcelConfig> getConfig(@Param("ids") Collection<Long> ids);
}

View File

@ -31,7 +31,10 @@
<!-- 表字段 -->
<sql id="baseColumns">
t.id,
t
.
id
,
t.name,
t.code,
t.system_type,
@ -582,5 +585,71 @@
</if>
</sql>
<select id="getByName" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_salary_item t
WHERE name = #{name} AND delete_type = 0
</select>
<select id="getByCode" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_salary_item t
WHERE code = #{code} AND delete_type = 0
</select>
<resultMap id="configResultMap" type="com.engine.salary.entity.salaryitem.config.SalaryItemExcelConfig">
<result column="name" property="name"/>
<result column="use_default" property="useDefault"/>
<result column="hide_default" property="hideDefault"/>
<result column="data_type" property="dataType"/>
<result column="rounding_mode" property="roundingMode"/>
<result column="pattern" property="pattern"/>
<result column="value_type" property="valueType"/>
<result column="formula" property="formula"/>
<result column="extend_param" property="extendParam"/>
<result column="sorted_index" property="sortedIndex"/>
<result column="width" property="width"/>
<result column="default_value" property="defaultValue"/>
<result column="description" property="description"/>
</resultMap>
<sql id="itemColumns">
item.name as name
, item.use_default as use_default
, item.hide_default as hide_default
, item.data_type as data_type
, item.rounding_mode as rounding_mode
, item.pattern as pattern
, item.value_type as value_type
, f.formula as formula
, f.extend_param as extend_param
, item.sorted_index as sorted_index
, item.width as width
, item.default_value as default_value
, item.description as description
</sql>
<select id="getConfig" resultMap="configResultMap">
select
<include refid="itemColumns"/>
from hrsa_salary_item item
left join hrsa_formula f on item.formula_id = f.id
where item.delete_type=0
and item.use_in_employee_salary = 0
and item.system_type = 0
<if test="ids != null and ids.size()>0">
AND item.id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</select>
</mapper>

View File

@ -53,4 +53,5 @@ public interface SalarySobMapper {
List<SalarySobPO> listByParam(@Param("param") SalarySobPO SalarySobPO);
List<SalarySobPO> listByName(SalarySobPO build);
}

View File

@ -248,7 +248,7 @@
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobPO" databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select hrsa_salary_sob_id.currval from dual
</selectKey>
@ -446,7 +446,7 @@
<update id="deleteByIds">
UPDATE hrsa_salary_sob
SET delete_type = 1
WHERE delete_type = 0
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
@ -454,7 +454,6 @@
</update>
<select id="listByParam" resultType="com.engine.salary.entity.salarysob.po.SalarySobPO">
SELECT
<include refid="baseColumns"/>

View File

@ -106,4 +106,6 @@ public interface FundSchemeMapper {
* @param endTime
*/
void updateEndTime(@Param("id")Long id, @Param("endTime")String endTime);
List<InsuranceArchivesFundSchemePO> listBySchemeId(@Param("fundSchemeId")Long id, @Param("runStatuses")List<String> runStatus);
}

View File

@ -275,6 +275,22 @@
WHERE delete_type = 0
</select>
<select id="listBySchemeId"
resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_fund_archives t
left join hrsa_insurance_base_info i on i.fund_archives_id = t.id
WHERE t.delete_type = 0
AND fund_scheme_id = #{fundSchemeId}
<if test="runStatuses != null and runStatuses.size()>0">
AND i.run_status IN
<foreach collection="runStatuses" open="(" item="runStatus" separator="," close=")">
#{runStatus}
</foreach>
</if>
</select>
<update id="batchUpdate" parameterType="java.util.List">
update hrsa_fund_archives
<trim prefix="set" suffixOverrides=",">

View File

@ -105,4 +105,6 @@ public interface OtherSchemeMapper {
* @param endTime
*/
void updateEndTime(@Param("id")Long id, @Param("endTime")String endTime);
List<InsuranceArchivesOtherSchemePO> listBySchemeId(@Param("schemeId") Long schemeId, @Param("runStatuses") List<String> runStatuses);
}

View File

@ -258,6 +258,22 @@
WHERE delete_type = 0
</select>
<select id="listBySchemeId"
resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_other_archives t
left join hrsa_insurance_base_info i on i.other_archives_id = t.id
WHERE t.delete_type = 0
AND other_scheme_id = #{schemeId}
<if test="runStatuses != null and runStatuses.size()>0">
AND i.run_status IN
<foreach collection="runStatuses" open="(" item="runStatus" separator="," close=")">
#{runStatus}
</foreach>
</if>
</select>
<update id="batchUpdate" parameterType="java.util.List">
update hrsa_other_archives
<trim prefix="set" suffixOverrides=",">

View File

@ -136,4 +136,6 @@ public interface SocialSchemeMapper {
* @param endTime
*/
void updateEndTime(@Param("id")Long id, @Param("endTime")String endTime);
List<InsuranceArchivesSocialSchemePO> listBySchemeId(@Param("schemeId")Long schemeId, @Param("runStatuses")List<String> runStatus);
}

View File

@ -919,6 +919,22 @@
WHERE delete_type = 0
</select>
<select id="listBySchemeId"
resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_social_archives t
left join hrsa_insurance_base_info i on i.social_archives_id = t.id
WHERE t.delete_type = 0
AND t.social_scheme_id = #{schemeId}
<if test="runStatuses != null and runStatuses.size()>0">
AND i.run_status IN
<foreach collection="runStatuses" open="(" item="runStatus" separator="," close=")">
#{runStatus}
</foreach>
</if>
</select>
<update id="batchUpdate" parameterType="java.util.List">
update hrsa_social_archives
<trim prefix="set" suffixOverrides=",">

View File

@ -1,5 +1,6 @@
package com.engine.salary.mapper.taxagent;
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
import com.engine.salary.entity.taxagent.po.TaxAgentEmployeePO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
@ -69,4 +70,6 @@ public interface TaxAgentMapper {
List<TaxAgentEmployeePO> listEmployee();
List<TaxAgentConfig> getAllConfig();
}

View File

@ -263,5 +263,19 @@
where e.status not in (7)
</select>
<resultMap id="configResultMap" type="com.engine.salary.entity.taxagent.config.TaxAgentConfig">
<result column="description" property="description"/>
<result column="id" property="id"/>
<result column="name" property="name"/>
<result column="sorted_index" property="sortedIndex"/>
</resultMap>
<select id="getAllConfig" resultMap="configResultMap">
select
<include refid="baseColumns"/>
from hrsa_tax_agent t
where t.delete_type=0
</select>
</mapper>

View File

@ -26,4 +26,9 @@ public class Attend4Salary {
private List<Long> onlyEmpIds;
private Map<String, Object> extendParam;
/**
* 出勤班次
*/
private String attendanceSerial;
}

View File

@ -4,12 +4,15 @@ import com.alibaba.druid.support.json.JSONUtils;
import com.alibaba.fastjson.JSONObject;
import com.engine.core.impl.Service;
import com.engine.kq.cmd.report.GetKQReportCmd;
import com.engine.salary.mapper.datacollection.AttendQuoteFieldMapper;
import com.engine.salary.remote.attend.cmd.GetSearchListCmd;
import com.engine.salary.remote.attend.entity.Attend4Salary;
import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.valid.ValidUtil;
import com.google.common.base.Joiner;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@ -26,15 +29,22 @@ import java.util.stream.Collectors;
public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAttend4SalaryService {
private final Boolean isLog = "true".equals(new BaseBean().getPropValue("hrmSalary", "log"));
private AttendQuoteFieldMapper getAttendQuoteFieldMapper() {
return MapperProxyFactory.getProxy(AttendQuoteFieldMapper.class);
}
@Override
public List<Map<String, String>> getColumns() {
//兼容获取班次信息字段
List<String> attendanceSerials = getAttendQuoteFieldMapper().getAttendanceSerials();
String attendanceSerial = Joiner.on(",").join((Iterable<?>) attendanceSerials);
Map<String, Object> paramsMap = new HashMap<String, Object>();
// paramsMap.put("pageIndex", 1);
// paramsMap.put("pageSize", 10);
paramsMap.put("typeselect", "3");
paramsMap.put("viewScope", "0");
paramsMap.put("isNoAccount", "1");
paramsMap.put("attendanceSerial", "");
paramsMap.put("attendanceSerial", attendanceSerial);
paramsMap.put("isFromMyAttendance", "1");
Map<String, Object> temp = new HashMap<String, Object>();
temp.put("data", JSONObject.toJSONString(paramsMap));
@ -60,6 +70,21 @@ public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAtt
});
}
}
//出勤班次
else if (dataIndex.equals("attendanceSerial") && column.get("children") != null) {
List<Map> list = (List<Map>) column.get("children");
if (CollectionUtils.isNotEmpty(list)) {
list.stream()
.filter(leave -> leave.get("dataIndex") != null && StringUtils.isNotBlank(leave.get("dataIndex").toString()))
.forEach(leave -> {
Map<String, String> map = Maps.newHashMapWithExpectedSize(2);
map.put("code", "attendanceSerial_" + leave.get("dataIndex").toString());
String unit = "".equals(leave.get("unit").toString()) ? "" : "(" + leave.get("unit").toString() + ")";
map.put("name", Util.null2String(column.get("title")) + "-" + leave.get("title") + unit);
columns.add(map);
});
}
}
//加班
else if (dataIndex.equals("overtime") && column.get("children") != null) {
List<Map> list = (List<Map>) column.get("children");
@ -121,7 +146,8 @@ public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAtt
List<String> resourceIds = attend4Salary.getOnlyEmpIds().stream().map(String::valueOf).collect(Collectors.toList());
paramsMap.put("resourceId", String.join(",", resourceIds));
paramsMap.put("isNoAccount", "1");
paramsMap.put("attendanceSerial", "");
//班次
paramsMap.put("attendanceSerial", attend4Salary.getAttendanceSerial());
paramsMap.put("isFromMyAttendance", "1");
Map<String, Object> temp = new HashMap<String, Object>();
temp.put("data", JSONObject.toJSONString(paramsMap));

View File

@ -129,7 +129,9 @@ public class SalaryStatisticsReportBO {
param.setDepart(((List<Map>) JSON.parseArray(po.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
}
// param.setGrade(((List<Map>) JSON.parseArray(po.getGradeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
// param.setPosition(((List<Map>) JSON.parseArray(po.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
if (po.getPositionSetting() != null) {
param.setPosition(((List<Map>) JSON.parseArray(po.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
}
if (po.getStatusSetting() != null) {
param.setStatus(((List<Map>) JSON.parseArray(po.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
}

View File

@ -4,6 +4,7 @@ import cn.hutool.core.util.NumberUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeQueryParam;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
@ -33,7 +34,6 @@ 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 com.google.common.collect.Sets;
import com.wbi.util.Util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@ -108,7 +108,8 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
.collect(Collectors.toSet());
// 查询薪资核算人员
List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByTaxAgentAndSalaryMonth(taxAgentIds, salaryMonths);
SalaryAcctEmployeeQueryParam salaryAcctEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().salaryMonths(salaryMonths).taxAgentIds(taxAgentIds).build();
List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByParam(salaryAcctEmployeeQueryParam);
if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
return page;
}
@ -119,15 +120,8 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
// // 外部人员id
// Set<Long> extEmployeeIds = Sets.newHashSet();
// 内部人员id
Set<Long> innerEmployeeIds = Sets.newHashSet();
for (SalaryAcctEmployeePO sae : salaryAcctEmployeeList) {
// if (EmployeeTypeEnum.EXT_EMPLOYEE.getValue().equals(sae.getEmployeeType())) {
// extEmployeeIds.add(sae.getEmployeeId());
// } else if (EmployeeTypeEnum.ORGANIZATION.getValue().equals(sae.getEmployeeType())) {
// innerEmployeeIds.add(sae.getEmployeeId());
// }
innerEmployeeIds.add(sae.getEmployeeId());
}
Set<Long> innerEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toCollection(LinkedHashSet::new));
// 3.关键字搜索参数
if (StringUtils.isNotEmpty(queryParam.getKeyword())) {
// if (CollectionUtils.isNotEmpty(extEmployeeIds)) {
@ -158,10 +152,9 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
}
}
List<Long> innerEmployeeIdList = innerEmployeeIds.stream().sorted(Comparator.comparing(e -> e)).collect(Collectors.toList());
// List<Long> extEmployeeIdList = extEmployeeIds.stream().sorted(Comparator.comparing(e -> e)).collect(Collectors.toList());
// 排序内部员工优先
list = innerEmployeeIdList.stream().map(e -> SalaryStatisticsEmployeeListDTO.builder()
list = innerEmployeeIds.stream().map(e -> SalaryStatisticsEmployeeListDTO.builder()
.id(e)
// .employeeType(EmployeeTypeEnum.ORGANIZATION.getValue())
.build()).collect(Collectors.toList());
@ -285,6 +278,7 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
map.put("jobTitle", Util.null2String(emp.getJobtitleName()));
map.put("status", Util.null2String(NumberUtil.isNumber(emp.getStatus()) ? SalaryEmployeeStatusEnum.parseByValue(Integer.valueOf(emp.getStatus())).getDefaultLabel() : null));
map.put("workCode", Util.null2String(emp.getWorkcode()));
map.put("companystartdate", Util.null2String(emp.getCompanystartdate()));
// IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(Integer.parseInt(se.getIncomeCategory()));
// map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
@ -295,9 +289,6 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
@Override
public PageInfo<SalaryAcctEmployeePO> listSalaryAcctEmp(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
List<SalaryStatisticsEmployeeListDTO> list = Collections.emptyList();
PageInfo<SalaryStatisticsEmployeeListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, SalaryStatisticsEmployeeListDTO.class);
// 1.分权处理, 首先获取个税扣缴义务人参数
Collection<TaxAgentPO> taxAgentViews = getTaxAgentService(user).listAllTaxAgents((long) user.getUID());
List<Long> taxAgentIds = Objects.isNull(taxAgentViews) ? Lists.newArrayList() : taxAgentViews.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
@ -322,7 +313,8 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
.collect(Collectors.toSet());
// 查询薪资核算人员
List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByTaxAgentAndSalaryMonth(taxAgentIds, salaryMonths);
SalaryAcctEmployeeQueryParam salaryAcctEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().salaryMonths(salaryMonths).taxAgentIds(taxAgentIds).build();
List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByParam(salaryAcctEmployeeQueryParam);
if (CollectionUtils.isNotEmpty(queryParam.getSubCompanyIds()) || CollectionUtils.isNotEmpty(queryParam.getDepartmentIds()) || StringUtils.isNotBlank(queryParam.getKeyword())) {
// 根据分部部门筛选
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listBySubCompanyOrDepartment(queryParam.getSubCompanyIds(), queryParam.getDepartmentIds());
@ -343,8 +335,7 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
if (CollectionUtils.isNotEmpty(queryParam.getIds())) {
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(emp -> queryParam.getIds().contains(emp.getId())).collect(Collectors.toList());
}
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getSalaryMonth)).collect(Collectors.toList());
Collections.reverse(salaryAcctEmployeeList);
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getSalaryMonth).reversed()).collect(Collectors.toList());
PageInfo<SalaryAcctEmployeePO> SalaryAcctEmployeePageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), salaryAcctEmployeeList);
if (queryParam.isExport()) {
SalaryAcctEmployeePageInfo.setList(salaryAcctEmployeeList);

View File

@ -33,6 +33,8 @@ import com.engine.salary.report.service.SalaryStatisticsReportService;
import com.engine.salary.report.util.ReportTimeUtil;
import com.engine.salary.service.*;
import com.engine.salary.service.impl.*;
import com.engine.salary.sys.service.SalarySysConfService;
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
import com.engine.salary.util.*;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
@ -54,6 +56,8 @@ import weaver.wechat.util.Utils;
import java.util.*;
import java.util.stream.Collectors;
import static com.engine.salary.sys.constant.SalarySysConstant.REPORT_ORGANIZATIN_TYPE;
/**
* 薪酬统计报表
* <p>Copyright: Copyright (c) 2022</p>
@ -71,6 +75,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
public static final String LAST_INFO = "lastInfoList";
public static final String SAME_INFO = "sameInfoList";
private final boolean isRealOrg = "1".equals(getSalarySysConfService(user).getValueByCode(REPORT_ORGANIZATIN_TYPE));
private SalaryStatisticsReportMapper getSalaryStatisticsReportMapper() {
return MapperProxyFactory.getProxy(SalaryStatisticsReportMapper.class);
@ -112,6 +117,9 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
return ServiceUtil.getService(SalaryCacheServiceImpl.class, user);
}
private SalarySysConfService getSalarySysConfService(User user) {
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
}
// private ExtEmployeeService extEmployeeService;
//
// private HrmCommonEmployeeService hrmCommonEmployeeService;
@ -197,16 +205,16 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
this.getSalaryStatisticsReportMapper().updateIgnoreNull(poNew);
// 记录日志
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(poNew.getId()));
loggerContext.setTargetName(poNew.getReportName());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "更新报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "更新报表"));
loggerContext.setOldValues(po);
loggerContext.setNewValues(poNew);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(poNew.getId()));
loggerContext.setTargetName(poNew.getReportName());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新报表"));
loggerContext.setOldValues(po);
loggerContext.setNewValues(poNew);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
} else {
List<SalaryStatisticsReportPO> list = listByName(saveParam.getReportName());
if (CollectionUtils.isNotEmpty(list)) {
@ -217,15 +225,15 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
getSalaryStatisticsReportMapper().insertIgnoreNull(poNew);
// 记录日志
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(poNew.getId()));
loggerContext.setTargetName(poNew.getReportName());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
loggerContext.setNewValues(poNew);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(poNew.getId()));
loggerContext.setTargetName(poNew.getReportName());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增报表"));
loggerContext.setNewValues(poNew);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
}
return StringUtils.EMPTY;
}
@ -305,16 +313,16 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
getSalaryStatisticsItemService(user).saveOrUpdateBatch(salaryStatisticsItemList);
//记录日志
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(po.getId()));
loggerContext.setTargetName(po.getReportName());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "更新报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新报表"));
loggerContext.setOldValues(oldPO);
loggerContext.setNewValues(po);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(po.getId()));
loggerContext.setTargetName(po.getReportName());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新报表"));
loggerContext.setOldValues(oldPO);
loggerContext.setNewValues(po);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
return StringUtils.EMPTY;
}
@ -333,17 +341,17 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
getSalaryStatisticsReportMapper().deleteByIds(deleteIds);
//删除薪资项
getSalaryStatisticsItemService(user).deleteByReportIds(deleteIds);
list.forEach(e -> {
// 记录日志
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(e.getId()));
loggerContext.setTargetName(e.getReportName());
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "删除报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "删除报表") + e.getReportName());
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
});
list.forEach(e -> {
// 记录日志
LoggerContext<SalaryStatisticsReportPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId(String.valueOf(e.getId()));
loggerContext.setTargetName(e.getReportName());
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除报表") + e.getReportName());
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
});
}
Map<String, Object> resultMap = new HashMap<>(2);
@ -396,8 +404,8 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
loggerContext.setTargetId(String.valueOf(po.getId()));
loggerContext.setTargetName(po.getReportName());
loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增报表"));
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增报表"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增报表"));
loggerContext.setNewValues(po);
SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext);
}
@ -445,8 +453,18 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
// 获取报表统计薪资项目
List<Long> salaryItemIds = salaryStatisticsItemPOS.stream().filter(item -> StringUtils.isNotBlank(item.getItemValue())).map(p -> p.getItemValue().split(",")).flatMap(Arrays::stream).map(Long::valueOf).collect(Collectors.toList());
// 参数转换
param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryStartMonth()));
param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryEndMonth()));
String salaryStartMonth = param.getSalaryStartMonth();
if (salaryStartMonth == null) {
param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryStartMonth()));
} else {
param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(SalaryDateUtil.dateStrToLocalDate(salaryStartMonth)));
}
String salaryEndMonth = param.getSalaryEndMonth();
if (salaryEndMonth == null) {
param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryEndMonth()));
} else {
param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(SalaryDateUtil.dateStrToLocalDate(salaryEndMonth)));
}
String key = "id";
if (reportPO.getTaxAgentSetting() != null) {
param.setTaxAgent(((List<Map>) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
@ -469,7 +487,15 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listBySalaryStatisticsReportParam(queryParam);
// 设置dimensionValue为维度值
SalaryStatisticsReportDataDTO salaryStatisticsReportData = SalaryStatisticsReportDataDTO.builder().list(salaryAcctEmployeeList).lastList(Collections.emptyList()).sameList(Collections.emptyList()).salaryStatisticsItemList(salaryStatisticsItemPOS).employeeId((long) user.getUID()).tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY).dimensionValue(param.getDimensionValue()).build();
SalaryStatisticsReportDataDTO salaryStatisticsReportData = SalaryStatisticsReportDataDTO.builder()
.list(salaryAcctEmployeeList)
.lastList(Collections.emptyList())
.sameList(Collections.emptyList())
.salaryStatisticsItemList(salaryStatisticsItemPOS)
.employeeId((long) user.getUID())
.dimensionValue(param.getDimensionValue())
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build();
Map<Long, Map<String, String>> resultMap = new HashMap<>();
List<Long> salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
@ -606,7 +632,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
DataCollectionEmployee emp = employeeMap.get(se.getEmployeeId());
resultMap.put("id", se.getId().toString());
resultMap.put("userName", emp == null ? "" : emp.getUsername());
resultMap.put("departmentName", emp == null ? "" : emp.getDepartmentName());
resultMap.put("departmentName", se.getDepartmentName());
resultMap.put("salaryMonth", SalaryDateUtil.getFormatYearMonth(se.getSalaryMonth()));
resultMap.put("taxAgent", taxAgentMap.get(se.getTaxAgentId()));
resultMap.put("salarySob", SalarySobMap.get(se.getSalarySobId()));
@ -775,38 +801,74 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
Map<Long, String> subComIdNameMap = new HashMap<>();
Map<Long, Long> lastEmpIdSubComMap = new HashMap<>();
Map<Long, Long> sameEmpIdSubComMap = new HashMap<>();
comInfoMap.forEach((k, v) -> {
subComIdNameMap.put(v.getSubcompanyid(), v.getSubcompanyName());
empIdSubComMap.put(k, v.getSubcompanyid());
subComIds.add(v.getSubcompanyid());
});
lastComInfoMap.forEach((k, v) -> {
lastEmpIdSubComMap.put(k, v.getSubcompanyid());
});
sameComInfoMap.forEach((k, v) -> {
sameEmpIdSubComMap.put(k, v.getSubcompanyid());
});
if (isRealOrg) {
comInfoMap.forEach((k, v) -> {
subComIdNameMap.put(v.getSubcompanyid(), v.getSubcompanyName());
empIdSubComMap.put(k, v.getSubcompanyid());
subComIds.add(v.getSubcompanyid());
});
lastComInfoMap.forEach((k, v) -> {
lastEmpIdSubComMap.put(k, v.getSubcompanyid());
});
sameComInfoMap.forEach((k, v) -> {
sameEmpIdSubComMap.put(k, v.getSubcompanyid());
});
} else {
data.getList().forEach(employee -> {
if (employee.getSubcompanyId() != null && employee.getSubcompanyId() != null) {
subComIdNameMap.put(employee.getSubcompanyId(), employee.getSubcompanyName());
subComIds.add(employee.getDepartmentId());
empIdSubComMap.put(employee.getEmployeeId(), employee.getSubcompanyId());
}
});
data.getLastList().forEach(employee -> {
if (employee.getSubcompanyId() != null && employee.getSubcompanyId() != null) {
lastEmpIdSubComMap.put(employee.getEmployeeId(), employee.getSubcompanyId());
}
});
data.getSameList().forEach(employee -> {
if (employee.getSubcompanyId() != null && employee.getSubcompanyId() != null) {
sameEmpIdSubComMap.put(employee.getEmployeeId(), employee.getSubcompanyId());
}
});
}
String dimensionValue = data.getDimensionValue();
subComIds.forEach(subComId -> {
if (dimensionValue == null) {
List<SalaryAcctEmployeePO> subComEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastSubComEmployeePOS = data.getLastList().stream().filter(po -> Objects.equals(lastEmpIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameSubComEmployeePOS = data.getSameList().stream().filter(po -> Objects.equals(sameEmpIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> subComEmployeePOS = data.getList().stream().filter(po -> Objects.equals(po.getSubcompanyId(), subComId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastSubComEmployeePOS = data.getLastList().stream().filter(po -> Objects.equals(po.getSubcompanyId(), subComId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameSubComEmployeePOS = data.getSameList().stream().filter(po -> Objects.equals(po.getSubcompanyId(), subComId)).collect(Collectors.toList());
if (isRealOrg) {
subComEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
lastSubComEmployeePOS = data.getLastList().stream().filter(po -> Objects.equals(lastEmpIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
sameSubComEmployeePOS = data.getSameList().stream().filter(po -> Objects.equals(sameEmpIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
}
Map<String, Object> temp = new HashMap<>();
temp.put(DM, subComIdNameMap.get(subComId));
temp.putAll(SalaryStatisticsReportBO.calculateItem(subComEmployeePOS, lastSubComEmployeePOS, sameSubComEmployeePOS, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()));
records.add(temp);
} else if (StringUtils.equals(dimensionValue, subComIdNameMap.get(subComId))) {
List<SalaryAcctEmployeePO> subComEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> subComEmployeePOS = data.getList().stream().filter(po -> Objects.equals(po.getSubcompanyId(), subComId)).collect(Collectors.toList());
if (isRealOrg) {
subComEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdSubComMap.get(po.getEmployeeId()), subComId)).collect(Collectors.toList());
}
data.setListByDimensionValue(subComEmployeePOS);
}
});
if (dimensionValue == null) {
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> empIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastNoGroupingList = data.getLastList().stream().filter(po -> lastEmpIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameNoGroupingList = data.getSameList().stream().filter(po -> sameEmpIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> po.getSubcompanyId() == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastNoGroupingList = data.getLastList().stream().filter(po -> po.getSubcompanyId() == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameNoGroupingList = data.getSameList().stream().filter(po -> po.getSubcompanyId() == null).collect(Collectors.toList());
if (isRealOrg) {
noGroupingList = data.getList().stream().filter(po -> empIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
lastNoGroupingList = data.getLastList().stream().filter(po -> lastEmpIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
sameNoGroupingList = data.getSameList().stream().filter(po -> sameEmpIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
}
if (CollectionUtils.isNotEmpty(noGroupingList)) {
Map<String, Object> noGrouping = new HashMap<>();
noGrouping.put(DM, SalaryI18nUtil.getI18nLabel(153462, "无分组"));
@ -815,6 +877,9 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
}
} else if (StringUtils.equals(dimensionValue, "无分组")) {
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> empIdSubComMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
if (isRealOrg) {
noGroupingList = data.getList().stream().filter(po -> po.getSubcompanyId() == null).collect(Collectors.toList());
}
data.setListByDimensionValue(noGroupingList);
}
@ -838,44 +903,78 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
Map<Long, Long> lastEmpIdDepartIdMap = new HashMap<>();
Map<Long, Long> sameEmpIdDepartIdMap = new HashMap<>();
Map<Long, String> departIdNameMap = new HashMap<>();
simpleEmployeeList.forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
departIdNameMap.put(employee.getDepartmentId(), employee.getDepartmentName());
departIds.add(employee.getDepartmentId());
empIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
lastSimpleEmployeeList.forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
lastEmpIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
sameSimpleEmployeeList.forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
sameEmpIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
if (isRealOrg) {
simpleEmployeeList.forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
departIdNameMap.put(employee.getDepartmentId(), employee.getDepartmentName());
departIds.add(employee.getDepartmentId());
empIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
lastSimpleEmployeeList.forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
lastEmpIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
sameSimpleEmployeeList.forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
sameEmpIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
} else {
data.getList().forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
departIdNameMap.put(employee.getDepartmentId(), employee.getDepartmentName());
departIds.add(employee.getDepartmentId());
empIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
data.getLastList().forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
lastEmpIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
data.getSameList().forEach(employee -> {
if (employee.getDepartmentName() != null && employee.getDepartmentId() != null) {
sameEmpIdDepartIdMap.put(employee.getEmployeeId(), employee.getDepartmentId());
}
});
}
String dimensionValue = data.getDimensionValue();
departIds.forEach(departId -> {
if (dimensionValue == null) {
List<SalaryAcctEmployeePO> departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastDepartEmployeePOS = data.getLastList().stream().filter(po -> Objects.equals(lastEmpIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameDepartEmployeePOS = data.getSameList().stream().filter(po -> Objects.equals(sameEmpIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(po.getDepartmentId(), departId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastDepartEmployeePOS = data.getLastList().stream().filter(po -> Objects.equals(po.getDepartmentId(), departId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameDepartEmployeePOS = data.getSameList().stream().filter(po -> Objects.equals(po.getDepartmentId(), departId)).collect(Collectors.toList());
if (isRealOrg) {
departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
lastDepartEmployeePOS = data.getLastList().stream().filter(po -> Objects.equals(lastEmpIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
sameDepartEmployeePOS = data.getSameList().stream().filter(po -> Objects.equals(sameEmpIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
}
Map<String, Object> temp = new HashMap<>();
temp.put(DM, departIdNameMap.get(departId));
temp.putAll(SalaryStatisticsReportBO.calculateItem(departEmployeePOS, lastDepartEmployeePOS, sameDepartEmployeePOS, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()));
records.add(temp);
} else if (StringUtils.equals(dimensionValue, departIdNameMap.get(departId))) {
List<SalaryAcctEmployeePO> departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
List<SalaryAcctEmployeePO> departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(po.getDepartmentId(), departId)).collect(Collectors.toList());
if (isRealOrg) {
departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
}
data.setListByDimensionValue(departEmployeePOS);
}
});
if (dimensionValue == null) {
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> empIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastNoGroupingList = data.getLastList().stream().filter(po -> lastEmpIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameNoGroupingList = data.getSameList().stream().filter(po -> lastEmpIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> po.getDepartmentId() == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> lastNoGroupingList = data.getLastList().stream().filter(po -> po.getDepartmentId() == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> sameNoGroupingList = data.getSameList().stream().filter(po -> po.getDepartmentId() == null).collect(Collectors.toList());
if (isRealOrg) {
noGroupingList = data.getList().stream().filter(po -> empIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
lastNoGroupingList = data.getLastList().stream().filter(po -> lastEmpIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
sameNoGroupingList = data.getSameList().stream().filter(po -> lastEmpIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
}
if (CollectionUtils.isNotEmpty(noGroupingList)) {
Map<String, Object> noGrouping = new HashMap<>();
noGrouping.put(DM, SalaryI18nUtil.getI18nLabel(153462, "无分组"));
@ -883,7 +982,10 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
records.add(noGrouping);
}
} else if (StringUtils.equals(dimensionValue, "无分组")) {
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> empIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
List<SalaryAcctEmployeePO> noGroupingList = data.getList().stream().filter(po -> po.getDepartmentId() == null).collect(Collectors.toList());
if (isRealOrg) {
noGroupingList = data.getList().stream().filter(po -> empIdDepartIdMap.get(po.getEmployeeId()) == null).collect(Collectors.toList());
}
data.setListByDimensionValue(noGroupingList);
}

View File

@ -136,6 +136,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "岗位"), "jobTitle"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "工号"), "workCode"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate"));
}
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "次数"), "acctTimes").setDisplay(WeaBoolAttr.FALSE));
// columns.add(new WeaTableColumn("100px",SalaryI18nUtil.getI18nLabel( 121908, "收入所得项目"), "incomeCategory"));

View File

@ -27,7 +27,7 @@ public interface SISchemeService {
Map<String, Object> insertScheme(Map<String, Object> params);
Map<String, Object> update(Map<String, Object> params);
String update(Map<String, Object> params);
Map<String, Object> delete(Map<String, Object> params);

View File

@ -4,6 +4,7 @@ import com.engine.salary.component.WeaTableColumnGroup;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctImportFieldDTO;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.util.excel.ExcelPreviewDTO;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.util.List;
@ -113,7 +114,7 @@ public interface SalaryAcctExcelService {
Map<String, Object> preview(SalaryAcctImportParam param);
Map<String, Object> previewImportSalaryAcctResult(SalaryAcctImportParam param);
ExcelPreviewDTO previewImportSalaryAcctResult(SalaryAcctImportParam param);
void cacheImportField(List<Long> salaryItems);

View File

@ -1,11 +1,13 @@
package com.engine.salary.service;
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveItemSaveParam;
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustBeforeParam;
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustRecordQueryParam;
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.sys.entity.vo.UploadConfigResponse;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -156,4 +158,9 @@ public interface SalaryArchiveItemService {
* @date 2022/11/14 13:38
*/
String editSingleSalaryItem(SalaryArchiveItemSaveParam salaryArchiveItemSaveParam);
ArchiveFieldConfig getConfig();
UploadConfigResponse.Result parseConfig(ArchiveFieldConfig config);
}

View File

@ -1,6 +1,7 @@
package com.engine.salary.service;
import com.engine.salary.entity.salaryformula.ExpressFormula;
import com.engine.salary.entity.salaryformula.config.FormluaConfig;
import com.engine.salary.entity.salaryformula.param.SalaryFormulaMockParam;
import com.engine.salary.entity.salaryformula.param.SalaryFormulaSaveParam;
import com.engine.salary.entity.salaryformula.po.FormulaPO;
@ -55,5 +56,13 @@ public interface SalaryFormulaService {
List<FormulaPO> listByIds(List<Long> formulaIds);
List<FormulaPO> listAll();
List<FormulaVar> listAllVar();
void update(FormulaPO formulaPO);
FormluaConfig getConfig();
Long add(FormulaPO formula);
}

View File

@ -1,12 +1,15 @@
package com.engine.salary.service;
import com.engine.salary.entity.salaryitem.param.SalaryItemSaveParam;
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
import com.engine.salary.entity.salaryitem.param.SyncSalaryItemParam;
import com.engine.salary.entity.salaryitem.config.SalaryItemAllConfig;
import com.engine.salary.entity.salaryitem.config.SalaryItemExcelConfig;
import com.engine.salary.entity.salaryitem.param.*;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.enums.SalarySystemTypeEnum;
import com.engine.salary.service.impl.SalaryItemServiceImpl;
import com.engine.salary.sys.entity.vo.UploadConfigResponse;
import com.engine.salary.util.excel.ImportExcelResponse;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.util.Collection;
import java.util.List;
@ -61,6 +64,8 @@ public interface SalaryItemService {
* @return
*/
List<SalaryItemPO> listByName(String name);
SalaryItemPO getByName(String name);
/**
* 根据自定义薪资项目/系统薪资项目查询薪资项目
@ -147,4 +152,22 @@ public interface SalaryItemService {
* @param syncSalaryItemParam
*/
void syncSalaryItemToSalarySobItem(SyncSalaryItemParam syncSalaryItemParam);
SalaryItemAllConfig getConfig();
UploadConfigResponse.Result parseConfig(SalaryItemAllConfig salaryItemConfig);
SalaryItemPO getItem(SalaryItemPO salaryItemPO);
List<SalaryItemExcelConfig> getConfig(SalaryItemExportParam param);
Map<String, Object> preview(SalaryItemImportParam param);
ImportExcelResponse importSalaryItem(SalaryItemImportParam param);
XSSFWorkbook export(SalaryItemExportParam param);
XSSFWorkbook downloadTemplate(SalaryItemDownloadTemplateParam param);
}

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