港湾薪酬二开

This commit is contained in:
Harryxzy 2024-07-09 14:57:06 +08:00
parent ff33397326
commit 490cc4f224
39 changed files with 823 additions and 42 deletions

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801) ;
/

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804) ;
/

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801) ;
/

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804) ;
/

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801) ;
/

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804) ;
/

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547801 and ( indexdesc is null or indexdesc = '' )
;
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( indexdesc is not null and indexdesc <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=char_length(labelname) )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=char_length(labelname) )) limit 1
;
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1
;
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label'
;
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801)
;

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547804 and ( indexdesc is null or indexdesc = '' )
;
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( indexdesc is not null and indexdesc <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=char_length(labelname) )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=char_length(labelname) )) limit 1
;
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1
;
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label'
;
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804)
;

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is null )
/
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1
/
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label'
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801)
/

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is null )
/
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1
/
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label'
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804)
/

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547801 and ( indexdesc is null or indexdesc = '' ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
/
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801) ;
/

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547804 and ( indexdesc is null or indexdesc = '' ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
/
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804) ;
/

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547801 and ( indexdesc is null or indexdesc = '' )
GO
insert into HtmlLabelIndex(id,indexdesc) select top 1 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( indexdesc is not null and indexdesc <> '' ))
GO
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( labelname is not null and labelname <> '' ))
GO
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( labelname is null or labelname = '' or labelname like '%[吖-座]%' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( labelname is not null and labelname <> '' and labelname not like '%[吖-座]%' ))
GO
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( labelname is not null and labelname <> '' ))
GO
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label'
GO
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801)
GO

View File

@ -0,0 +1,20 @@
delete from HtmlLabelIndex where id = 547804 and ( indexdesc is null or indexdesc = '' )
GO
insert into HtmlLabelIndex(id,indexdesc) select top 1 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( indexdesc is not null and indexdesc <> '' ))
GO
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( labelname is not null and labelname <> '' ))
GO
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( labelname is null or labelname = '' or labelname like '%[吖-座]%' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( labelname is not null and labelname <> '' and labelname not like '%[吖-座]%' ))
GO
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( labelname is not null and labelname <> '' ))
GO
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label'
GO
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804)
GO

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547801,'用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547801 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'Employment Relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547801 as indexid ,'用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547801 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547801 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547801) ;
/

View File

@ -0,0 +1,30 @@
delete from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 547804,'请选择用工关系' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547804 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'请选择用工关系' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'Please select employment relationship' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547804 as indexid ,'請選擇用工關係' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547804 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlModuleLabel where indexId = 547804 and moduleCode = 'COMMON' and type = 'label' ;
/
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','COMMON',547804) ;
/

View File

@ -22,7 +22,9 @@ public class EmployBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
return mapper.listAll();
BaseBean baseBean = new BaseBean();
int yggxId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "yggx_field_id")).intValue();
return mapper.listAll(yggxId);
} finally {
sqlSession.close();
}
@ -104,6 +106,10 @@ public class EmployBiz extends BaseBean {
public List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
BaseBean baseBean = new BaseBean();
int yggxId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "yggx_field_id")).intValue();
includeQueryParams.stream().forEach(param -> param.setYggxfeildId(yggxId));
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
List<DataCollectionEmployee> emps = new ArrayList<>();
List<List<SalarySobRangeEmpQueryParam>> partition = Lists.partition(includeQueryParams, 100);

View File

@ -131,4 +131,10 @@ public class DataCollectionEmployee {
private Map<String,String> extendData;
/**
* 港湾二开 - 用工关系
*/
private Integer yggx;
}

View File

@ -14,6 +14,7 @@ import com.engine.salary.util.SalaryI18nUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean;
import weaver.hrm.User;
import java.util.*;
@ -40,6 +41,8 @@ public class SalarySobRangeBO {
return Collections.emptyList();
}
List<SalarySobRangeEmpQueryParam> resultParams = Lists.newArrayListWithExpectedSize(salarySobRanges.size());
BaseBean baseBean = new BaseBean();
int yggxId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "yggx_field_id")).intValue();
salarySobRanges.stream().forEach( item -> {
List<String> employeeStatus= new ArrayList<>();
String[] split = item.getEmployeeStatuses().split(",");
@ -53,6 +56,7 @@ public class SalarySobRangeBO {
.targetType(Optional.ofNullable(targetTypeEnum).map(TargetTypeEnum::name).orElse(StringUtils.EMPTY))
.targetIds(Arrays.asList(item.getTargetId()))
.employeeStatus(employeeStatus)
.yggxfeildId(yggxId)
.build();
resultParams.add(queryParam);
});
@ -104,6 +108,7 @@ public class SalarySobRangeBO {
List<DeptInfo> departmentComInfos,
List<SubCompanyInfo> subCompanyInfos,
List<PositionInfo> positionComInfos,
Map<String, String> yggxMap,
User user) {
if (CollectionUtils.isEmpty(salarySobRanges)) {
return Collections.emptyList();
@ -125,7 +130,7 @@ public class SalarySobRangeBO {
.map(e -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY))
.targetId(salarySobRangePO.getTargetId())
.targetName(buildTargetName(salarySobRangePO, employeeComInfoMap, departmentComInfoMap, subCompanyComInfoMap,positionComInfoMap))
.targetName(buildTargetName(salarySobRangePO, employeeComInfoMap, departmentComInfoMap, subCompanyComInfoMap,positionComInfoMap,yggxMap))
.employeeStatus(employeeStatusesStr)
.build();
})
@ -165,7 +170,8 @@ public class SalarySobRangeBO {
Map<Long, String> employeeComInfoMap,
Map<Long, String> departmentComInfoMap,
Map<Long, String> subCompanyComInfoMap,
Map<Long, String> positionComInfoMap) {
Map<Long, String> positionComInfoMap,
Map<String, String> yggxMap) {
TargetTypeEnum targetTypeEnum = TargetTypeEnum.parseByValue(salarySobRange.getTargetType());
if (Objects.isNull(targetTypeEnum)) {
return StringUtils.EMPTY;
@ -179,6 +185,8 @@ public class SalarySobRangeBO {
return subCompanyComInfoMap.getOrDefault(salarySobRange.getTargetId(), StringUtils.EMPTY);
case POSITION:
return positionComInfoMap.getOrDefault(salarySobRange.getTargetId(), StringUtils.EMPTY);
case YGGX:
return yggxMap.getOrDefault(salarySobRange.getTargetId().toString(), StringUtils.EMPTY);
default:
return StringUtils.EMPTY;
}

View File

@ -28,4 +28,6 @@ public class SalarySobRangeEmpQueryParam {
//人员状态")
private Collection<String> employeeStatus;
private int yggxfeildId;
}

View File

@ -278,7 +278,7 @@ public class TaxAgentBO {
*/
public static List<TaxAgentManageRangeListDTO> convert2ListDTO(List<TaxAgentManageRangePO> taxAgentManageRanges, List<DataCollectionEmployee> employeeComInfos,
List<DeptInfo> departmentComInfos, List<SubCompanyInfo> subDepartmentComInfos,
List<PositionInfo> positionComInfos, List<HrmStatus> hrmStatusList, User user) {
List<PositionInfo> positionComInfos, List<HrmStatus> hrmStatusList, Map<String, String> yggxMap, User user) {
if (CollectionUtils.isEmpty(taxAgentManageRanges)) {
return Collections.emptyList();
}
@ -299,7 +299,7 @@ public class TaxAgentBO {
.map(e -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY))
.targetId(taxAgentManageRange.getTargetId())
.targetName(buildTargetName(taxAgentManageRange, employeeComInfoMap, departmentComInfoMap, subDepartmentComInfoMap, positionComInfoMap))
.targetName(buildTargetName(taxAgentManageRange, employeeComInfoMap, departmentComInfoMap, subDepartmentComInfoMap, positionComInfoMap, yggxMap))
.employeeStatus(buildEmployeeStatus(hrmStatusNameMap, taxAgentManageRange.getEmployeeStatus()))
.build();
})
@ -327,7 +327,7 @@ public class TaxAgentBO {
* @return
*/
private static String buildTargetName(TaxAgentManageRangePO taxAgentManageRange, Map<Long, String> employeeComInfoMap, Map<Long, String> departmentComInfoMap,
Map<Long, String> subDepartmentComInfoMap, Map<Long, String> positionComInfoMap) {
Map<Long, String> subDepartmentComInfoMap, Map<Long, String> positionComInfoMap, Map<String, String> yggxMap) {
TargetTypeEnum targetTypeEnum = TargetTypeEnum.parseByValue(taxAgentManageRange.getTargetType());
if (Objects.isNull(targetTypeEnum)) {
return StringUtils.EMPTY;
@ -341,6 +341,8 @@ public class TaxAgentBO {
return subDepartmentComInfoMap.getOrDefault(taxAgentManageRange.getTargetId(), StringUtils.EMPTY);
case POSITION:
return positionComInfoMap.getOrDefault(taxAgentManageRange.getTargetId(), StringUtils.EMPTY);
case YGGX:
return yggxMap.getOrDefault(taxAgentManageRange.getTargetId().toString(), StringUtils.EMPTY);
default:
return StringUtils.EMPTY;
}

View File

@ -21,7 +21,8 @@ public enum TargetTypeEnum implements BaseEnum<Integer> {
DEPT(2, SalaryI18nUtil.getI18nLabel(27511, "部门"), 27511),
SUBCOMPANY(3, SalaryI18nUtil.getI18nLabel(33553, "分部"), 33553),
POSITION(4, SalaryI18nUtil.getI18nLabel(6086, "岗位"), 6086),
ALL(5, SalaryI18nUtil.getI18nLabel(1340, "所有人"), 1340);
ALL(5, SalaryI18nUtil.getI18nLabel(1340, "所有人"), 1340),
YGGX(6, SalaryI18nUtil.getI18nLabel(547801, "用工关系"), 547801);
// SECLEVE(6, "安全级别", 90382),;
// EXT_EMPLOYEE(100, "外部人员", 0);

View File

@ -19,7 +19,7 @@ public interface EmployMapper {
* 只查人力资源表
* @return
*/
List<DataCollectionEmployee> listAll();
List<DataCollectionEmployee> listAll(int yggx);
/**
* 获取所有员工关联部门

View File

@ -101,6 +101,7 @@
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join cus_fielddata f on f.id = e.id and f.SCOPEID=3
WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
<if test="params != null and params.size() > 0">
AND ( 1=2
@ -113,6 +114,14 @@
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'YGGX'">
f.field#{param.yggxfeildId} IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'DEPT'">
d.id IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
@ -284,9 +293,11 @@
e.departmentid as departmentId,
d.DEPARTMENTNAME as departmentName,
e.jobtitle as jobtitleId,
e.managerid as managerid
e.managerid as managerid,
f.field#{yggx} as yggx
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join cus_fielddata f on f.id = e.id and f.SCOPEID=3
where e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
</select>

View File

@ -408,7 +408,8 @@
</update>
<select id="listEmployeeIds" resultType="long">
SELECT id FROM hrmresource em
SELECT em.id FROM hrmresource em
left join cus_fielddata f on f.id = em.id and f.SCOPEID=3
WHERE em.status not in (7)
and (em.accounttype is null or em.accounttype = 0)
<if test="params != null and params.size() > 0">
@ -422,6 +423,12 @@
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'YGGX'">
f.field#{param.yggxfeildId} IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'DEPT'">
em.departmentid IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">

View File

@ -164,6 +164,8 @@ public interface SalaryAcctExcelService {
*/
Map<String, Object> exportTemplateList(SalaryAcctResultTemplateSaveParam param);
XSSFWorkbook exportFygsdReport(SalaryAcctRecordQueryParam queryParam);
//
// /**
// * 薪资核算结果校验异常导出

View File

@ -258,4 +258,6 @@ public interface TaxAgentService {
* @return
*/
Collection<Long> listEmployeeIdsInTaxAgent(Long taxAgentId);
List<Map<String, String>> getYggxList();
}

View File

@ -42,6 +42,7 @@ import com.engine.salary.util.page.Column;
import com.google.common.collect.Lists;
import com.engine.salary.util.db.IdGenerator;
import org.springframework.beans.BeanUtils;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
@ -673,7 +674,9 @@ public class SICompensationServiceImpl extends Service implements SICompensation
List<InsuranceAccountDetailPO> detailPOList = getInsuranceAccountDetailMapper().queryNormalListByBillMonth(billMonth, paymentOrganization);
Map<Long, InsuranceAccountDetailPO> detailPOMap = detailPOList.stream().collect(Collectors.toMap(InsuranceAccountDetailPO::getEmployeeId, Function.identity()));
List<DataCollectionEmployee> allEmployees = getEmployMapper().listAll();
BaseBean baseBean = new BaseBean();
int yggxId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "yggx_field_id")).intValue();
List<DataCollectionEmployee> allEmployees = getEmployMapper().listAll(yggxId);
Map<Long, String> usernameMap = SalaryEntityUtil.convert2Map(allEmployees, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
List<ICategoryPO> allCategoryList = getICategoryMapper().listAll();

View File

@ -2,6 +2,7 @@ package com.engine.salary.service.impl;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.cloudstore.dev.api.util.Util_DataCache;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
@ -14,11 +15,7 @@ import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultBO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultLogBO;
import com.engine.salary.entity.salaryacct.dto.SalaryAccEmployeeListDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctImportFieldDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultTemplateDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryComparisonResultListDTO;
import com.engine.salary.entity.salaryacct.dto.pltxEmployeeDTO;
import com.engine.salary.entity.salaryacct.dto.*;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.*;
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
@ -30,8 +27,8 @@ import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO;
import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO;
import com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.UserStatusEnum;
@ -1914,4 +1911,49 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
.hjgz(jbgz+gwgz+jxgz)
.build();
}
@Override
public XSSFWorkbook exportFygsdReport(SalaryAcctRecordQueryParam queryParam) {
Map<String, Object> resultMap = getSalaryAcctResultService(user).fygsdReport(queryParam);
List<Object> columns = (List<Object>) resultMap.get("column");
List<Map<String, String>> dataList = (List<Map<String, String>>) resultMap.get("dataList");
// List<Object> finalColumns = columns.stream().filter(column -> !"fylx2".equals(((WeaTableColumn)column).getColumn())).collect(Collectors.toList());
List<List<Object>> rows = new ArrayList<>();
rows.add(columns);
for (Map<String, String> dataMap : dataList) {
List<Object> datas = new ArrayList<>();
for (Object column : columns) {
WeaTableColumn weaTableColumn = (WeaTableColumn)column;
datas.add(dataMap.getOrDefault(weaTableColumn.getColumn(), ""));
}
rows.add(datas);
}
// // 无分类薪资项目id
// List<String> noGroupItemIds = salarySobItemAggregateDTO.getItems().stream().map(dto -> String.valueOf(dto.getSalaryItemId())).collect(Collectors.toList());
// // 查询列表的表头
// List<WeaTableColumnGroup> weaTableColumns = listWeaTableColumn(salaryAcctRecordPO);
// List<Object> finalWeaTableColumns = new ArrayList<>();
// // 查询薪资核算所用的薪资账套的员工信息字段
// List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
// List<SalarySobEmpFieldDTO> salarySobEmpFieldDTOS = new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS, user);
// salarySobEmpFieldDTOS.stream().forEach(empField -> finalWeaTableColumns.add(new WeaTableColumnGroup("150", SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()), SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()))));
// for (WeaTableColumnGroup tableColumn : weaTableColumns) {
// WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) tableColumn;
// if (columnGroupItem.getChildren() != null) {
// columnGroupItem.setChildren(columnGroupItem.getChildren());
// finalWeaTableColumns.add(columnGroupItem);
// } else if (noGroupItemIds.contains(columnGroupItem.getColumn())) {
// // 无分类
// finalWeaTableColumns.add(columnGroupItem);
// }
// }
String sheetName = SalaryI18nUtil.getI18nLabel(user.getLanguage(),0, "费用归属地");
return ExcelUtilPlus.genFygsdWorkbook(rows, sheetName, false);
}
}

View File

@ -1290,7 +1290,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
List<WeaTableColumn> columns = new ArrayList<>();
columns.add(new WeaTableColumn("100px", "国家", "gj"));
columns.add(new WeaTableColumn("100px", "费用类型", "fylx1"));
columns.add(new WeaTableColumn("100px", "费用类型2", "fylx2"));
columns.add(new WeaTableColumn("100px", "费用类型", "fylx2"));
columns.add(new WeaTableColumn("100px", "人数", "empNums"));
for (GwSalaryItemRelation itemRelation : itemRelationList) {
columns.add(new WeaTableColumn("100px", itemRelation.getSalaryItemShowName(), itemRelation.getSalaryItemId().toString()));
@ -1324,7 +1324,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
// 获取办公室费用其他关系对应的id
BaseBean baseBean = new BaseBean();
int bgsfySelectId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "fylx_bgsfy_select_id")).intValue();
int qtgxSelectId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "fylx_bgsfy_select_id")).intValue();
int qtgxSelectId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "fylx_qtgx_select_id")).intValue();
for (Map.Entry<Long, Set<Long>> entry : acctEmpGroupBySob.entrySet()){
// 该账套下的结果用于计算小计
List<Map<String, String>> resultListBySob = new ArrayList<>();
@ -1338,6 +1338,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
}
});
// 计算每一个费用类型的合计值
double threshold = 1e-10;
for (Integer fylxId : fylxIds) {
String fylxName = fylxMap.getOrDefault(fylxId, "");
// 获取该账套下 该费用类型下所有报表结果
@ -1351,7 +1352,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
.filter(NumberUtils::isCreatable)
.map(BigDecimal::new)
.reduce(BigDecimal.ZERO, BigDecimal::add);
if (!empNums.equals(BigDecimal.ZERO)) {
if ( empNums.doubleValue() > threshold ) {
Map<String, String> fylxSumMap = new HashMap<>();
// 薪资项目值
itemIdList.stream().forEach(itemId -> {
@ -1369,26 +1370,32 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
// 2个费用类型
if (fylxId.equals(bgsfySelectId)) {
fylxSumMap.put("fylx1","办公室费用");
fylxSumMap.put("fylx2", "办公室费用");
} else if (fylxId.equals(qtgxSelectId)) {
fylxSumMap.put("fylx1", "其他费用");
fylxSumMap.put("fylx2", fylxName);
} else {
fylxSumMap.put("fylx1", "项目费用");
fylxSumMap.put("fylx2", fylxName);
}
fylxSumMap.put("fylx2", fylxName);
resultListBySob.add(fylxSumMap);
}
}
// 该账套下的小计
Map<String, String> xjMap = new HashMap<>();
// 薪资项目值
List<Map<String, String>> finalResultListBySob = resultListBySob;
itemIdList.stream().forEach(itemId -> {
BigDecimal xjSum = resultListBySob.stream()
BigDecimal xjSum = finalResultListBySob.stream()
.map(map -> map.get(itemId))
.filter(NumberUtils::isCreatable)
.map(BigDecimal::new)
.reduce(BigDecimal.ZERO, BigDecimal::add);
xjMap.put(itemId.toString(), xjSum.toPlainString());
});
// 排序
resultListBySob = resultListBySob.stream().sorted(Comparator.comparing(map -> map.get("gj") + "-" + map.get("fylx1"))).collect(Collectors.toList());
// 人数
BigDecimal xjEmpNums = resultListBySob.stream()
.map(map -> map.get("empNums"))
@ -1513,19 +1520,24 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
BigDecimal totalXmDays = new BigDecimal(0);
BigDecimal baseDay = new BigDecimal(1).divide(totalDays, 15, RoundingMode.HALF_UP);
for (GwFylbItemDataDTO fylbItemData : fylbItemValues) {
// 获取此费用类别中有多少天有项目经历这里不能取计算出来的办公室天数
Map<String, Integer> xmDaysMap = gwGetDaysInRange(fylbItemData.getEffectiveDateRange().getFromDate(), fylbItemData.getEffectiveDateRange().getEndDate(), empXmjlList);
BigDecimal xmDays = new BigDecimal(xmDaysMap.get("xmDays"));
totalXmDays = totalXmDays.add(xmDays);
// 封装各个项目的天数和薪资分段计算
Map<String, String> empXmSalaryMap = new HashMap<String, String>();
empXmSalaryMap.put("empNums", baseDay.multiply(xmDays).setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
for (Long salaryItemId : salaryItemIds) {
BigDecimal itemValue = NumberUtils.isCreatable(acctResultValueMap.getOrDefault(salaryItemId, "")) ? new BigDecimal(acctResultValueMap.getOrDefault(salaryItemId, ""))
: new BigDecimal("0");
empXmSalaryMap.put(salaryItemId.toString(), itemValue.divide(totalDays, 15, RoundingMode.HALF_UP).multiply(xmDays).setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
if (fylbItemData.getValue() == bgsfySelectId) {
// 费用类别就是 办公室则不获取是否有项目经历该周期内都是办公室
} else {
// 获取此费用类别中有多少天有项目经历这里不能取计算出来的办公室天数
Map<String, Integer> xmDaysMap = gwGetDaysInRange(fylbItemData.getEffectiveDateRange().getFromDate(), fylbItemData.getEffectiveDateRange().getEndDate(), empXmjlList);
BigDecimal xmDays = new BigDecimal(xmDaysMap.get("xmDays"));
totalXmDays = totalXmDays.add(xmDays);
// 封装各个项目的天数和薪资分段计算
Map<String, String> empXmSalaryMap = new HashMap<String, String>();
empXmSalaryMap.put("empNums", baseDay.multiply(xmDays).setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
for (Long salaryItemId : salaryItemIds) {
BigDecimal itemValue = NumberUtils.isCreatable(acctResultValueMap.getOrDefault(salaryItemId, "")) ? new BigDecimal(acctResultValueMap.getOrDefault(salaryItemId, ""))
: new BigDecimal("0");
empXmSalaryMap.put(salaryItemId.toString(), itemValue.divide(totalDays, 15, RoundingMode.HALF_UP).multiply(xmDays).setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
}
empFylbMap.put(fylbItemData.getValue(), empXmSalaryMap);
}
empFylbMap.put(fylbItemData.getValue(), empXmSalaryMap);
}
// 封装计算办公室类型
BigDecimal officeDays = totalDays.subtract(totalXmDays);

View File

@ -314,7 +314,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
List<DataCollectionEmployee> result = employBiz.listByParams(includeQueryParams);
if (openExtEmp) {
result.addAll(getExtEmpService(user).listByParams(includeQueryParams));
// 非系统人员没有用工关系字段需要进行过滤
List<SalarySobRangeEmpQueryParam> extIncludeQueryParams = includeQueryParams.stream().filter(param -> !param.getTargetType().equals(TargetTypeEnum.YGGX.name())).collect(Collectors.toList());
result.addAll(getExtEmpService(user).listByParams(extIncludeQueryParams));
}
// 查询虚拟部门分部人员信息
List<SalarySobRangeEmpQueryParam> virtualParams = includeQueryParams.stream().filter(param ->

View File

@ -29,10 +29,7 @@ import com.engine.salary.enums.salarysob.TargetTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.salarysob.SalarySobExtRangeMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.SalarySobRangeService;
import com.engine.salary.service.SalarySobService;
import com.engine.salary.service.TaxAgentService;
import com.engine.salary.service.*;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
@ -90,6 +87,11 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
private SalarySobExtRangeMapper getSalarySobExtRangeMapper() {
return SqlProxyHandle.getProxy(SalarySobExtRangeMapper.class);
}
public TaxAgentManageRangeService getTaxAgentManageRangeService(User user) {
return ServiceUtil.getService(TaxAgentManageRangeServiceImpl.class, user);
}
@Override
public List<SalarySobRangePO> listByIds(Collection<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
@ -146,8 +148,10 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
.collect(Collectors.toList());
List<PositionInfo> positionInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds);
List<Map<String, String>> yggxList = getTaxAgentService(user).getYggxList();
Map<String, String> yggxMap = SalaryEntityUtil.convert2Map(yggxList, m -> m.get("id"), m -> m.get("name"));
// 薪资账套的人员范围po转换成列表dto
List<SalarySobRangeListDTO> salarySobRangeListDTOS = SalarySobRangeBO.convert2ListDTO(salarySobRangePOS, empInfos, deptInfos, subCompanyInfos, positionInfos, user);
List<SalarySobRangeListDTO> salarySobRangeListDTOS = SalarySobRangeBO.convert2ListDTO(salarySobRangePOS, empInfos, deptInfos, subCompanyInfos, positionInfos, yggxMap, user);
// 根据对象名称过滤
if (StringUtils.isNotEmpty(queryParam.getTargetName())) {
salarySobRangeListDTOS = salarySobRangeListDTOS.stream()

View File

@ -201,6 +201,9 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getEmployeeId())) {
return true;
}
if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.YGGX.getValue()) && salaryEmployee.getYggx() != null && Objects.equals(manageRange.getTargetId().intValue(), salaryEmployee.getYggx().intValue())) {
return true;
}
if (isVirtual) {
if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.DEPT.getValue())) {
Set<Long> empIds = virtualDepMap.get(manageRange.getTargetId());
@ -302,8 +305,11 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// userStatusEnumList.forEach(f -> {
// hrmStatusList.add(HrmStatus.builder().id(f.getValue().toString()).name(SalaryI18nUtil.getI18nLabel(user.getLanguage(),f.getLabelId(), f.getDefaultLabel())).build());
// });
// 查询用工关系信息
Map<String, String> yggxMap = SalaryEntityUtil.convert2Map(getTaxAgentService(user).getYggxList(), m -> m.get("id"), m -> m.get("name"));
// 薪资账套的人员范围po转换成列表dto
List<TaxAgentManageRangeListDTO> taxAgentManageRangeList = TaxAgentBO.convert2ListDTO(taxAgentManageRanges, employeeComInfos, departmentComInfos, subDepartmentComInfos, positionComInfos, hrmStatusList, user);
List<TaxAgentManageRangeListDTO> taxAgentManageRangeList = TaxAgentBO.convert2ListDTO(taxAgentManageRanges, employeeComInfos, departmentComInfos, subDepartmentComInfos, positionComInfos, hrmStatusList, yggxMap, user);
// 根据对象名称过滤
if (StringUtils.isNotEmpty(queryParam.getTargetName())) {
taxAgentManageRangeList = taxAgentManageRangeList.stream().filter(f -> f.getTargetName().contains(queryParam.getTargetName())).collect(Collectors.toList());

View File

@ -53,6 +53,9 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.systeminfo.setting.HrmUserSettingComInfo;
import weaver.systeminfo.systemright.CheckUserRight;
@ -842,5 +845,20 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
return SalaryEntityUtil.properties(taxAgentEmpPOS, TaxAgentEmpPO::getEmployeeId);
}
@Override
public List<Map<String, String>> getYggxList() {
BaseBean baseBean = new BaseBean();
RecordSet rs = new RecordSet();
int yggxId = Integer.valueOf(baseBean.getPropValue("shgwSalaryReport", "yggx_field_id")).intValue();
rs.execute("select selectvalue,selectname from cus_selectitem where fieldid = " + yggxId);
List<Map<String, String>> resultList = new ArrayList<>();
while (rs.next()) {
Map<String, String> resultMap = new HashMap<>();
resultMap.put("id", String.valueOf(rs.getInt(1)));
String name = Util.formatMultiLang(rs.getString(2), String.valueOf(user.getLanguage()));
resultMap.put("name", name);
resultList.add(resultMap);
}
return resultList;
}
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.util.excel;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.salary.component.WeaTableColumnGroup;
import com.engine.salary.util.SalaryDateUtil;
import org.apache.commons.collections4.CollectionUtils;
@ -731,4 +732,191 @@ public class ExcelUtilPlus {
return strLength;
}
public static XSSFWorkbook genFygsdWorkbook(List<List<Object>> rowList, String sheetName, boolean lastRowRed) {
XSSFWorkbook workbook = new XSSFWorkbook();
// 设置title样式
XSSFCellStyle titleCellStyle = workbook.createCellStyle();
XSSFFont titleFont = workbook.createFont();
titleFont.setBold(true);
titleFont.setFontName("仿宋");
titleFont.setFontHeightInPoints((short) 15);
titleCellStyle.setFont(titleFont);
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);
titleCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景色
titleCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
titleCellStyle.setBorderLeft(BorderStyle.THIN);
titleCellStyle.setBorderRight(BorderStyle.THIN);
titleCellStyle.setBorderTop(BorderStyle.THIN);
titleCellStyle.setBorderBottom(BorderStyle.THIN);
XSSFCellStyle childTitleCellStyle = workbook.createCellStyle();
childTitleCellStyle.setFont(titleFont);
childTitleCellStyle.setAlignment(HorizontalAlignment.CENTER);
childTitleCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景色
childTitleCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
childTitleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
childTitleCellStyle.setBorderLeft(BorderStyle.THIN);
childTitleCellStyle.setBorderRight(BorderStyle.THIN);
childTitleCellStyle.setBorderTop(BorderStyle.THIN);
childTitleCellStyle.setBorderBottom(BorderStyle.THIN);
// 设置主体样式
XSSFCellStyle cellStyle = workbook.createCellStyle();
XSSFFont font = workbook.createFont();
font.setFontName("宋体");
font.setFontHeightInPoints((short) 10);// 设置字体大小
cellStyle.setFont(font);// 选择需要用到的字体格式
cellStyle.setWrapText(true);
cellStyle.setBorderLeft(BorderStyle.THIN);
cellStyle.setBorderRight(BorderStyle.THIN);
cellStyle.setBorderTop(BorderStyle.THIN);
cellStyle.setBorderBottom(BorderStyle.THIN);
cellStyle.setAlignment(HorizontalAlignment.CENTER);
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
XSSFCellStyle redCellStyle = workbook.createCellStyle();
XSSFFont redFont = workbook.createFont();
redFont.setFontName("宋体");
redFont.setFontHeightInPoints((short) 10);// 设置字体大小
// redFont.setColor(new XSSFColor(new Color(0xFF3333), null));
redFont.setBold(true);
redCellStyle.setWrapText(true);
redCellStyle.setFont(redFont);// 选择需要用到的字体格式
redCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景色
redCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
redCellStyle.setBorderLeft(BorderStyle.THIN);
redCellStyle.setBorderRight(BorderStyle.THIN);
redCellStyle.setBorderTop(BorderStyle.THIN);
redCellStyle.setBorderBottom(BorderStyle.THIN);
redCellStyle.setAlignment(HorizontalAlignment.CENTER);
redCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
XSSFSheet sheet = workbook.createSheet(sheetName);
//自适应宽度
sheet.autoSizeColumn(0, true);
//默认列宽
sheet.setDefaultColumnWidth(20);
//默认行高
sheet.setDefaultRowHeightInPoints(18);
//处理合并单元格
XSSFRow row0 = sheet.createRow(0);
List<Object> header = rowList.get(0);
int startIndex = 0;
for (int i = 0; i < header.size(); i++) {
WeaTableColumn columnGroupItem = (WeaTableColumn) header.get(i);
if (i == 1) {
sheet.addMergedRegion(new CellRangeAddress(0, 0, startIndex, startIndex + 1));
}
XSSFCell rowZeroCell = row0.createCell(startIndex, CellType.STRING);
rowZeroCell.setCellValue(columnGroupItem.getText().toString());
rowZeroCell.setCellStyle(titleCellStyle);
//设置列宽
sheet.setColumnWidth(startIndex,Math.min(40 * 256, Math.max(12, getStrlength(columnGroupItem.getText())*4)*256));
startIndex++;
}
String lastGjValue ="";
boolean isXj = false;
for (int rowIndex = 1; rowIndex < rowList.size(); rowIndex++) {
List<Object> infoList = rowList.get(rowIndex);
XSSFRow row = sheet.createRow(rowIndex);
float height = 18;
float finalHeight = 18;
isXj = (infoList.get(1) == null ? "" : infoList.get(1).toString()).equals("小计");
for (int cellIndex = 0; cellIndex < infoList.size(); cellIndex++) {
XSSFCell cell = row.createCell(cellIndex);
if (rowIndex == 0) {
cell.setCellStyle(titleCellStyle);
} else {
if (lastRowRed && rowIndex == rowList.size() - 1) {
cell.setCellStyle(redCellStyle);
} else {
cell.setCellStyle(cellStyle);
}
}
if (isXj) {
cell.setCellStyle(redCellStyle);
}
Object o = infoList.get(cellIndex);
if (o instanceof String) {
cell.setCellType(CellType.STRING);
cell.setCellValue(String.valueOf(o));
} else if (o instanceof Boolean) {
cell.setCellType(CellType.BOOLEAN);
cell.setCellValue(String.valueOf(o));
} else if (o instanceof Date) {
cell.setCellType(CellType.STRING);
cell.setCellValue(SalaryDateUtil.getFormatLocalDate((Date) o));
} else {
cell.setCellType(CellType.STRING);
cell.setCellValue(o == null ? "" : o.toString());
}
//判断是否要调整高度
int width = sheet.getColumnWidth(cellIndex) / 256;
finalHeight = getFinalHeight(o, width, finalHeight, height);
if (cellIndex == 0) {
String thisGjValue = o == null ? "" : o.toString();
if (!lastGjValue.equals(thisGjValue)) {
// 合并国家列
int startRow = rowIndex;
int endRow = rowIndex;
for (int gjIndex = rowIndex + 1; gjIndex < rowList.size(); gjIndex++) {
List<Object> gjInfoList = rowList.get(gjIndex);
String gj = gjInfoList.get(0) == null ? "" : gjInfoList.get(0).toString();
if (gj.equals(o == null ? "" : o.toString())) {
endRow++;
} else {
break;
}
}
if (endRow > startRow) {
sheet.addMergedRegion(new CellRangeAddress(startRow, endRow, cellIndex, cellIndex));
}
}
lastGjValue = thisGjValue;
}
if (cellIndex == 1) {
// 合并费用裂隙
int startRow = rowIndex;
int endRow = rowIndex;
for (int gjIndex = rowIndex + 1; gjIndex < rowList.size(); gjIndex++) {
List<Object> gjInfoList = rowList.get(gjIndex);
String fylx = gjInfoList.get(1) == null ? "" : gjInfoList.get(1).toString();
if (fylx.equals(o == null ? "" : o.toString())) {
endRow++;
} else {
break;
}
}
if (endRow > startRow) {
try {
sheet.addMergedRegion(new CellRangeAddress(startRow, endRow, cellIndex, cellIndex));
} catch (Exception e) {
}
}
}
if (cellIndex == 1 && "小计".equals(o == null ? "" : o.toString())) {
// 合并小计
sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 1, 2));
}
}
row.setHeightInPoints(finalHeight);
}
return workbook;
}
}

View File

@ -975,5 +975,42 @@ public class SalaryAcctController {
queryParam.setEndMonth(SalaryDateUtil.String2YearMonth(queryParam.getEndMonthStr()));
return new ResponseResult<SalaryAcctRecordQueryParam, Map<String, Object>>(user).run(getSalaryAcctResultWrapper(user)::fygsdReport, queryParam);
}
@GET
@Path("/exportFygsdReport")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response exportFygsdReport(@Context HttpServletRequest request, @Context HttpServletResponse response) {
try {
User user = HrmUserVarify.getUser(request, response);
SalaryAcctRecordQueryParam queryParam = SalaryAcctRecordQueryParam.builder().build();
String startMonthStr = request.getParameter("startMonthStr");
if (StringUtils.isNotBlank(startMonthStr)) {
queryParam.setStartMonth(SalaryDateUtil.String2YearMonth(startMonthStr));
}
String endMonthStr = request.getParameter("endMonthStr");
if (StringUtils.isNotBlank(endMonthStr)) {
queryParam.setEndMonth(SalaryDateUtil.String2YearMonth(endMonthStr));
}
XSSFWorkbook workbook = getSalaryAcctExcelWrapper(user).exportFygsdReport(queryParam);
String time = LocalDate.now().toString();
String fileName = SalaryI18nUtil.getI18nLabel(user.getLanguage(),0, "费用归属地") + time;
try {
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8").replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
StreamingOutput output = outputStream -> {
workbook.write(outputStream);
outputStream.flush();
};
response.setContentType("application/octet-stream");
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
} catch (Exception e) {
log.error("线下对比结果导入模板导出异常", e);
throw e;
}
}
/**********************************上海港湾 薪酬报表 end*********************************/
}

View File

@ -251,6 +251,15 @@ public class TaxAgentController {
return new ResponseResult<String, TaxAgentManageRangeFormDTO>(user).run(getTaxAgentWrapper(user)::getRangeFrom);
}
// 港湾二开 - 获取用工关系信息
@GET
@Path("/range/yggxList")
@Produces(MediaType.APPLICATION_JSON)
public String getYggxList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, List<Map<String, String>>>(user).run(getTaxAgentWrapper(user)::getYggxList);
}
//保存人员范围
@POST
@Path("/range/save")

View File

@ -92,6 +92,10 @@ public class SalaryAcctExcelWrapper extends Service {
return getSalaryAcctExcelService(user).exportComparisonResultTemplate(exportParam);
}
public XSSFWorkbook exportFygsdReport(SalaryAcctRecordQueryParam queryParam) {
return getSalaryAcctExcelService(user).exportFygsdReport(queryParam);
}
// /**
// * 薪资核算结果校验异常导出
// *

View File

@ -26,6 +26,8 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
@ -468,4 +470,11 @@ public class TaxAgentWrapper extends Service {
}
/**
* 港湾二开 - 获取用工关系信息
* @return
*/
public List<Map<String, String>> getYggxList() {
return getTaxAgentService(user).getYggxList();
}
}