Merge branch 'release/2.14.5.2406.03' into release/个税版本
# Conflicts: # src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java # src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java
This commit is contained in:
commit
7db62ab647
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=2.14.4.2406.02
|
||||
version=2.14.5.2406.03
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add subcompany_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add status varchar2(200) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
update hrsa_salary_acct_emp a
|
||||
set
|
||||
(
|
||||
department_id ,
|
||||
department_name,
|
||||
subcompany_id ,
|
||||
subcompany_name,
|
||||
jobtitle_id ,
|
||||
jobtitle_name ,
|
||||
jobcall_id,
|
||||
jobcall,
|
||||
status
|
||||
)
|
||||
=
|
||||
(
|
||||
select
|
||||
b.departmentId,
|
||||
b.departmentName,
|
||||
b.subcompanyid,
|
||||
b.subcompanyName,
|
||||
b.jobtitleId,
|
||||
b.jobtitleName,
|
||||
b.jobcallId,
|
||||
b.jobcall,
|
||||
b.status from
|
||||
(
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
where a.delete_type=0 and
|
||||
exists (select 1 from (
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add subcompany_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add status varchar2(200) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
update hrsa_salary_acct_emp a
|
||||
set
|
||||
(
|
||||
department_id ,
|
||||
department_name,
|
||||
subcompany_id ,
|
||||
subcompany_name,
|
||||
jobtitle_id ,
|
||||
jobtitle_name ,
|
||||
jobcall_id,
|
||||
jobcall,
|
||||
status
|
||||
)
|
||||
=
|
||||
(
|
||||
select
|
||||
b.departmentId,
|
||||
b.departmentName,
|
||||
b.subcompanyid,
|
||||
b.subcompanyName,
|
||||
b.jobtitleId,
|
||||
b.jobtitleName,
|
||||
b.jobcallId,
|
||||
b.jobcall,
|
||||
b.status from
|
||||
(
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
where a.delete_type=0 and
|
||||
exists (select 1 from (
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add subcompany_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add status varchar2(200) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
update hrsa_salary_acct_emp a
|
||||
set
|
||||
(
|
||||
department_id ,
|
||||
department_name,
|
||||
subcompany_id ,
|
||||
subcompany_name,
|
||||
jobtitle_id ,
|
||||
jobtitle_name ,
|
||||
jobcall_id,
|
||||
jobcall,
|
||||
status
|
||||
)
|
||||
=
|
||||
(
|
||||
select
|
||||
b.departmentId,
|
||||
b.departmentName,
|
||||
b.subcompanyid,
|
||||
b.subcompanyName,
|
||||
b.jobtitleId,
|
||||
b.jobtitleName,
|
||||
b.jobcallId,
|
||||
b.jobcall,
|
||||
b.status from
|
||||
(
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
where a.delete_type=0 and
|
||||
exists (select 1 from (
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp
|
||||
ADD COLUMN subcompany_name varchar(200) ,
|
||||
ADD COLUMN subcompany_id bigint(0),
|
||||
ADD COLUMN department_name varchar(200),
|
||||
ADD COLUMN department_id bigint(0),
|
||||
ADD COLUMN jobtitle_name varchar(200) ,
|
||||
ADD COLUMN jobtitle_id bigint(0) ,
|
||||
ADD COLUMN jobcall varchar(200),
|
||||
ADD COLUMN jobcall_id bigint(0),
|
||||
ADD COLUMN status varchar(200);
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
update hrsa_salary_acct_emp a INNER JOIN (
|
||||
select e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) as b
|
||||
on a.employee_id = b.employeeId
|
||||
set a.department_id = b.departmentId,
|
||||
a.department_name = b.departmentName,
|
||||
a.subcompany_id = b.subcompanyid,
|
||||
a.subcompany_name = b.subcompanyName,
|
||||
a.jobtitle_id = b.jobtitleId,
|
||||
a.jobtitle_name = b.jobtitleName,
|
||||
a.jobcall_id = b.jobcallId,
|
||||
a.jobcall = b.jobcall,
|
||||
a.status = b.status
|
||||
where a.delete_type=0;
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add subcompany_id NUMBER null
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add department_id NUMBER null
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL
|
||||
/
|
||||
alter table hrsa_salary_acct_emp add status varchar2(200) NULL
|
||||
/
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
update hrsa_salary_acct_emp a
|
||||
set
|
||||
(
|
||||
department_id ,
|
||||
department_name,
|
||||
subcompany_id ,
|
||||
subcompany_name,
|
||||
jobtitle_id ,
|
||||
jobtitle_name ,
|
||||
jobcall_id,
|
||||
jobcall,
|
||||
status
|
||||
)
|
||||
=
|
||||
(
|
||||
select
|
||||
b.departmentId,
|
||||
b.departmentName,
|
||||
b.subcompanyid,
|
||||
b.subcompanyName,
|
||||
b.jobtitleId,
|
||||
b.jobtitleName,
|
||||
b.jobcallId,
|
||||
b.jobcall,
|
||||
b.status from
|
||||
(
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
where a.delete_type=0 and
|
||||
exists (select 1 from (
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
/
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
alter table hrsa_salary_acct_emp add subcompany_name varchar(200);
|
||||
alter table hrsa_salary_acct_emp add subcompany_id bigint;
|
||||
alter table hrsa_salary_acct_emp add department_name varchar(200);
|
||||
alter table hrsa_salary_acct_emp add department_id bigint;
|
||||
alter table hrsa_salary_acct_emp add jobtitle_name varchar(200);
|
||||
alter table hrsa_salary_acct_emp add jobtitle_id bigint;
|
||||
alter table hrsa_salary_acct_emp add jobcall varchar(200);
|
||||
alter table hrsa_salary_acct_emp add jobcall_id bigint;
|
||||
alter table hrsa_salary_acct_emp add status varchar(200);
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
update hrsa_salary_acct_emp a
|
||||
set
|
||||
(
|
||||
department_id ,
|
||||
department_name,
|
||||
subcompany_id ,
|
||||
subcompany_name,
|
||||
jobtitle_id ,
|
||||
jobtitle_name ,
|
||||
jobcall_id,
|
||||
jobcall,
|
||||
status
|
||||
)
|
||||
=
|
||||
(
|
||||
select
|
||||
b.departmentId,
|
||||
b.departmentName,
|
||||
b.subcompanyid,
|
||||
b.subcompanyName,
|
||||
b.jobtitleId,
|
||||
b.jobtitleName,
|
||||
b.jobcallId,
|
||||
b.jobcall,
|
||||
b.status from
|
||||
(
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
where a.delete_type=0 and
|
||||
exists (select 1 from (
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
);
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
ALTER TABLE hrsa_salary_acct_emp
|
||||
ADD subcompany_name varchar(200),
|
||||
subcompany_id bigint,
|
||||
department_name varchar(200),
|
||||
department_id bigint,
|
||||
jobtitle_name varchar(200),
|
||||
jobtitle_id bigint,
|
||||
jobcall varchar(200),
|
||||
jobcall_id bigint,
|
||||
status varchar(200)
|
||||
GO
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
UPDATE hrsa_salary_acct_emp
|
||||
set department_id = b.departmentId,
|
||||
department_name = b.departmentName,
|
||||
subcompany_id = b.subcompanyid,
|
||||
subcompany_name = b.subcompanyName,
|
||||
jobtitle_id = b.jobtitleId,
|
||||
jobtitle_name = b.jobtitleName,
|
||||
jobcall_id = b.jobcallId,
|
||||
jobcall = b.jobcall,
|
||||
status = b.status
|
||||
FROM hrsa_salary_acct_emp a INNER JOIN (
|
||||
select e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) as b
|
||||
on a.employee_id = b.employeeId
|
||||
WHERE a.delete_type=0
|
||||
GO
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add subcompany_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add department_id NUMBER null;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL;
|
||||
/
|
||||
|
||||
alter table hrsa_salary_acct_emp add status varchar2(200) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
update hrsa_salary_acct_emp a
|
||||
set
|
||||
(
|
||||
department_id ,
|
||||
department_name,
|
||||
subcompany_id ,
|
||||
subcompany_name,
|
||||
jobtitle_id ,
|
||||
jobtitle_name ,
|
||||
jobcall_id,
|
||||
jobcall,
|
||||
status
|
||||
)
|
||||
=
|
||||
(
|
||||
select
|
||||
b.departmentId,
|
||||
b.departmentName,
|
||||
b.subcompanyid,
|
||||
b.subcompanyName,
|
||||
b.jobtitleId,
|
||||
b.jobtitleName,
|
||||
b.jobcallId,
|
||||
b.jobcall,
|
||||
b.status from
|
||||
(
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
)
|
||||
where a.delete_type=0 and
|
||||
exists (select 1 from (
|
||||
select
|
||||
e.id as employeeId,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.status as status,
|
||||
e.jobcall as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
) b
|
||||
where a.employee_id = b.employeeId
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
del sql202205100201.sql sql202205100402.sql sql202205130903.sql sql202205200203.sql sql202205310203.sql sql202206071403.sql sql202206090403.sql sql202206141003.sql sql202206160500.sql sql202206230403.sql sql202207110803.sql sql202207120303.sql sql202207210203.sql sql202208051103.sql sql202208080403.sql sql202208240403.sql sql202208240503.sql sql202210080203.sql sql202210080403.sql sql202210170203.sql sql202210170303.sql sql202211090103.sql sql202211090301.sql sql202211090402.sql sql202211170503.sql sql202212080903.sql sql202212081003.sql sql202212230103.sql sql202301310403.sql sql202302060801.sql sql202302060902.sql sql202302090303.sql sql202302200403.sql sql202303130101.sql sql202303130202.sql sql202303150403.sql sql202304040503.sql sql202304260103.sql sql202304270203.sql sql202304270303.sql sql202304270501.sql sql202305050302.sql sql202305170903.sql sql202306020403.sql sql202306020603.sql sql202306080103.sql sql202306200203.sql sql202306260103.sql sql202307170403.sql sql202307180603.sql sql202307200603.sql sql202308080403.sql sql202308080503.sql sql202308090203.sql sql202308170403.sql sql202309210203.sql sql202310130403.sql sql202310250103.sql sql202311070403.sql sql202311080603.sql sql202311150103.sql sql202312130203.sql sql202401080103.sql sql202401230403.sql sql202401300303.sql sql202402190103.sql sql202402280703.sql sql202403150103.sql sql202404010103.sql
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/**
|
||||
* 返回指定日志范围内的工作日天数
|
||||
* @param beginDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @param userid 人员ID
|
||||
* @return
|
||||
*/
|
||||
public String getWorkDays(String beginDate, String endDate, int userid) {
|
||||
BaseBean bean = new BaseBean();
|
||||
//设置日期格式
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
//起始日期
|
||||
if (beginDate == null || beginDate.length() == 0) {
|
||||
beginDate = bean.getPropValue("scheduleWorkDayForFormula", "fromDate");
|
||||
beginDate = beginDate == null ? "" : beginDate.trim();
|
||||
if (beginDate.length() == 0) {
|
||||
beginDate = df.format(new Date());
|
||||
}
|
||||
}
|
||||
|
||||
//截止日期
|
||||
if (endDate == null || endDate.length() == 0) {
|
||||
endDate = bean.getPropValue("scheduleWorkDayForFormula", "endDate");
|
||||
endDate = endDate == null ? "" : endDate.trim();
|
||||
if (endDate.length() == 0) {
|
||||
endDate = df.format(new Date());
|
||||
}
|
||||
}
|
||||
|
||||
boolean isBig = false;
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date begin = sdf.parse(beginDate);
|
||||
Date end = sdf.parse(endDate);
|
||||
if (begin.compareTo(end) > 0) {
|
||||
String temp = beginDate;
|
||||
beginDate = endDate;
|
||||
endDate = temp;
|
||||
isBig = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
bean.writeLog("ExcelFormulaWorkday解析日期报错", e);
|
||||
}
|
||||
|
||||
int workDayCount = 0;
|
||||
User user = new User(userid);
|
||||
HrmScheduleManager manager = new HrmScheduleManager(user);
|
||||
Map<String, Boolean> mapWorkday = manager.isWorkday(beginDate, endDate, manager.getSubCompanyId());
|
||||
if (mapWorkday != null && mapWorkday.size() > 0) {
|
||||
Iterator<String> itr = mapWorkday.keySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
String tempDate = itr.next();
|
||||
Boolean isWorkDay = mapWorkday.get(tempDate);
|
||||
if (isWorkDay) {
|
||||
if (isBig) {
|
||||
workDayCount--;
|
||||
} else {
|
||||
workDayCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return workDayCount+"";
|
||||
}
|
||||
|
|
@ -61,6 +61,23 @@ public class EmployBiz extends BaseBean {
|
|||
}
|
||||
}
|
||||
|
||||
public List<DataCollectionEmployee> getEmployeeByIdsIncludeAccountType(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
List<DataCollectionEmployee> dataList = new ArrayList<>();
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
List<List<Long>> partition = Lists.partition(list, 1000);
|
||||
for (List<Long> longs : partition) {
|
||||
dataList.addAll(mapper.getEmployeeByIdsIncludeAccountType(longs));
|
||||
}
|
||||
return dataList;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
public List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import lombok.experimental.Accessors;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -173,11 +174,7 @@ public class CalculateFormulaVarBO {
|
|||
String fieldValue = map.getOrDefault(fieldName, StringUtils.EMPTY);
|
||||
//日期值取yyyy-MM-dd
|
||||
if (StringUtils.isNotBlank(fieldValue) && fieldValue.length() > 10 && SalaryDateUtil.parse(fieldValue, DATE_TIME_FORMATTER_PATTERN) != null) {
|
||||
if (StringUtils.isNotBlank(salaryDateFormat)) {
|
||||
fieldValue = fieldValue.substring(0, salaryDateFormat.length());
|
||||
} else {
|
||||
fieldValue = fieldValue.substring(0, 10);
|
||||
}
|
||||
fieldValue = fieldValue.substring(0, 10);
|
||||
}
|
||||
formulaVarValues.add(new FormulaVarValue().setFieldId(fieldId).setFieldValue(fieldValue));
|
||||
}
|
||||
|
|
@ -529,11 +526,7 @@ public class CalculateFormulaVarBO {
|
|||
String fieldValue = map.getOrDefault(fieldName, StringUtils.EMPTY);
|
||||
//判断是否是日期,日期值取yyyy-MM-dd
|
||||
if (StringUtils.isNotBlank(fieldValue) && fieldValue.length() > 10 && SalaryDateUtil.parse(fieldValue, DATE_TIME_FORMATTER_PATTERN) != null) {
|
||||
if (StringUtils.isNotBlank(salaryDateFormat)) {
|
||||
fieldValue = fieldValue.substring(0, salaryDateFormat.length());
|
||||
} else {
|
||||
fieldValue = fieldValue.substring(0, 10);
|
||||
}
|
||||
fieldValue = fieldValue.substring(0, 10);
|
||||
}
|
||||
return new FormulaVarValue().setFieldId(fieldId).setFieldValue(fieldValue);
|
||||
}).collect(Collectors.toList()));
|
||||
|
|
@ -566,7 +559,7 @@ public class CalculateFormulaVarBO {
|
|||
employeeMap.forEach((key, po) -> {
|
||||
// 获取po的状态
|
||||
if(po.getStatus() != null && NumberUtil.isNumber(po.getStatus())) {
|
||||
po.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(po.getStatus())));
|
||||
po.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(po.getStatus(),"1"))));
|
||||
}
|
||||
List<FormulaVarValue> formulaVarValues = resultMap.computeIfAbsent(key, k -> Lists.newArrayList());
|
||||
Map<String, String> map = JsonUtil.parseMap(po, String.class);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import com.google.common.collect.Sets;
|
|||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -121,9 +122,9 @@ public class SalaryAcctEmployeeBO {
|
|||
}
|
||||
|
||||
public static List<SalaryAcctEmployeePO> convert2Employee(Collection<DataCollectionEmployee> employee,
|
||||
SalaryAcctRecordPO salaryAcctRecord,
|
||||
List<SalaryArchiveDataDTO> salaryArchiveTaxAgentData,
|
||||
Long employeeId) {
|
||||
SalaryAcctRecordPO salaryAcctRecord,
|
||||
List<SalaryArchiveDataDTO> salaryArchiveTaxAgentData,
|
||||
Long employeeId) {
|
||||
if (CollectionUtils.isEmpty(employee)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
@ -147,6 +148,15 @@ public class SalaryAcctEmployeeBO {
|
|||
.employeeId(emp.getEmployeeId())
|
||||
.employeeType(emp.isExtEmp() ? 1 : 0)
|
||||
.taxAgentId(taxAgentId)
|
||||
.departmentId(emp.getDepartmentId())
|
||||
.departmentName(emp.getDepartmentName())
|
||||
.jobcall(emp.getJobcall())
|
||||
.jobcallId(emp.getJobcallId())
|
||||
.jobtitleId(emp.getJobtitleId())
|
||||
.jobtitleName(emp.getJobtitleName())
|
||||
.subcompanyId(emp.getSubcompanyid())
|
||||
.subcompanyName(emp.getSubcompanyName())
|
||||
.status(emp.getStatus())
|
||||
.creator(employeeId)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
|
|
@ -159,6 +169,24 @@ public class SalaryAcctEmployeeBO {
|
|||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 核算人员信息替换实时信息
|
||||
* @param simpleEmployee
|
||||
* @param acctEmployeePO
|
||||
*/
|
||||
public static void copyAcctEmp(DataCollectionEmployee simpleEmployee, SalaryAcctEmployeePO acctEmployeePO) {
|
||||
simpleEmployee.setDepartmentId(acctEmployeePO.getDepartmentId());
|
||||
simpleEmployee.setDepartmentName(acctEmployeePO.getDepartmentName());
|
||||
simpleEmployee.setSubcompanyid(acctEmployeePO.getSubcompanyId());
|
||||
simpleEmployee.setSubcompanyName(acctEmployeePO.getSubcompanyName());
|
||||
simpleEmployee.setJobcallId(acctEmployeePO.getJobcallId());
|
||||
simpleEmployee.setJobcall(acctEmployeePO.getJobcall());
|
||||
simpleEmployee.setJobtitleId(acctEmployeePO.getJobtitleId());
|
||||
simpleEmployee.setJobtitleName(acctEmployeePO.getJobtitleName());
|
||||
simpleEmployee.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(acctEmployeePO.getStatus(), "1"))));
|
||||
simpleEmployee.setStatus(acctEmployeePO.getStatus());
|
||||
}
|
||||
|
||||
|
||||
public static List<List<SalaryAcctEmployeePO>> partitionByEmployeeId(List<SalaryAcctEmployeePO> salaryAcctEmployees) {
|
||||
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class SalaryAcctFormulaBO {
|
|||
salaryItemPattern = salarySobBackItemMap.get(salaryItem.getId()).getPattern();
|
||||
}
|
||||
BigDecimal bigDecimalValue = SalaryEntityUtil.empty2Zero(value);
|
||||
return SalaryEntityUtil.carryRule(salaryItemPattern, salaryItemRoundingMode, bigDecimalValue).toString();
|
||||
return SalaryEntityUtil.carryRule(salaryItemPattern, salaryItemRoundingMode, bigDecimalValue).toPlainString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO;
|
|||
import com.engine.salary.entity.salarysob.po.*;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.salaryaccounting.LockStatusEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -31,6 +32,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
|
@ -251,7 +253,7 @@ public class SalaryAcctResultBO {
|
|||
* @param taxAgents
|
||||
* @param consolidatedTaxSalaryAcctEmpIds
|
||||
* @param customBackCalcParameters
|
||||
* @param isBackCalc
|
||||
* @param dynamicEmpInfo
|
||||
* @return
|
||||
*/
|
||||
public static List<Map<String, Object>> buildTableData(List<SalaryItemPO> salaryItems,
|
||||
|
|
@ -263,10 +265,11 @@ public class SalaryAcctResultBO {
|
|||
Set<Long> consolidatedTaxSalaryAcctEmpIds,
|
||||
Map<Long, String> customParameters,
|
||||
Map<Long, String> customBackCalcParameters,
|
||||
boolean isBackCalc) {
|
||||
boolean dynamicEmpInfo) {
|
||||
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
SalaryI18nUtil.i18nList(salaryAcctEmployees);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(simpleEmployees, DataCollectionEmployee::getEmployeeId);
|
||||
Map<Long, List<SalaryAcctResultPO>> acctResultMap = SalaryEntityUtil.group2Map(salaryAccountingResults, SalaryAcctResultPO::getEmployeeId);
|
||||
Map<Long, String> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName);
|
||||
|
|
@ -278,12 +281,35 @@ public class SalaryAcctResultBO {
|
|||
// 薪资项目的字段类型(前端依据这个判断是否需要展示千分位)
|
||||
Map<String, String> dataTypeMap = SalaryEntityUtil.convert2Map(salaryItems, salaryItemPO -> salaryItemPO.getId() + DATA_TYPE_SUFFIX, SalaryItemPO::getDataType);
|
||||
map.putAll(dataTypeMap);
|
||||
// TODO ?看一下如果不是回算这会不会有回算的东西?
|
||||
// 人员信息字段的值
|
||||
Map<String, String> fieldValueMap = SalaryAcctFormulaBO.convert2FormulaEmployee(employeeMap.get(e.getEmployeeId()));
|
||||
for (SalarySobEmpFieldPO salarySobEmpField : salarySobEmpFields) {
|
||||
map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode()));
|
||||
// 员工信息字段的字段类型
|
||||
if (dynamicEmpInfo) {
|
||||
map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode()));
|
||||
} else {
|
||||
if ("departmentName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("departmentName", e.getDepartmentName());
|
||||
} else if ("departmentId".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("departmentId", e.getDepartmentId());
|
||||
} else if ("subcompanyName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("subcompanyName", e.getSubcompanyName());
|
||||
} else if ("jobcall".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobcall", e.getJobcall());
|
||||
} else if ("jobcallId".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobcallId", e.getJobcallId());
|
||||
} else if ("jobtitleName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobtitleName", e.getJobtitleName());
|
||||
} else if ("jobtitleId".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobtitleId", e.getJobtitleId());
|
||||
} else if ("status".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("status", e.getStatus());
|
||||
} else if ("statusName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("statusName", UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(e.getStatus(),"1"))));
|
||||
} else {
|
||||
map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode()));
|
||||
}
|
||||
}
|
||||
map.put(salarySobEmpField.getFieldCode() + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
}
|
||||
// 主键id
|
||||
|
|
@ -328,7 +354,8 @@ public class SalaryAcctResultBO {
|
|||
List<TaxAgentPO> taxAgents,
|
||||
Map<Long, String> customParameters,
|
||||
Set<Long> consolidatedTaxSalaryAcctEmpIds,
|
||||
Set<Long> includeSalaryItemIds) {
|
||||
Set<Long> includeSalaryItemIds,
|
||||
boolean dynamicEmpInfo) {
|
||||
if (CollectionUtils.isEmpty(simpleEmployees)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
@ -344,8 +371,32 @@ public class SalaryAcctResultBO {
|
|||
// 员工信息字段的值
|
||||
Map<String, String> fieldValueMap = SalaryAcctFormulaBO.convert2FormulaEmployee(employeeMap.get(salaryAcctEmployee.getEmployeeId()));
|
||||
for (SalarySobEmpFieldPO salarySobEmpField : salarySobEmpFields) {
|
||||
map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode()));
|
||||
// 员工信息字段的字段类型
|
||||
if (dynamicEmpInfo) {
|
||||
map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode()));
|
||||
} else {
|
||||
if ("departmentName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("departmentName", salaryAcctEmployee.getDepartmentName());
|
||||
} else if ("departmentId".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("departmentId", salaryAcctEmployee.getDepartmentId());
|
||||
} else if ("subcompanyName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("subcompanyName", salaryAcctEmployee.getSubcompanyName());
|
||||
} else if ("jobcall".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobcall", salaryAcctEmployee.getJobcall());
|
||||
} else if ("jobcallId".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobcallId", salaryAcctEmployee.getJobcallId());
|
||||
} else if ("jobtitleName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobtitleName", salaryAcctEmployee.getJobtitleName());
|
||||
} else if ("jobtitleId".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("jobtitleId", salaryAcctEmployee.getJobtitleId());
|
||||
} else if ("status".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("status", salaryAcctEmployee.getStatus());
|
||||
} else if ("statusName".equals(salarySobEmpField.getFieldCode())) {
|
||||
map.put("statusName", UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(salaryAcctEmployee.getStatus(), "1"))));
|
||||
} else {
|
||||
map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode()));
|
||||
}
|
||||
}
|
||||
map.put(salarySobEmpField.getFieldCode() + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
}
|
||||
// 系统值
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ public class SalaryAcctResultQueryParam extends BaseQueryParam {
|
|||
//薪资项目id
|
||||
private Collection<Long> salaryItemIds;
|
||||
|
||||
/**
|
||||
* 是否需要实时人员信息
|
||||
*/
|
||||
private boolean dynamicEmpInfo;
|
||||
|
||||
//其他条件
|
||||
private List<OtherCondition> otherConditions;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.entity.salaryacct.po;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.annotation.I18n;
|
||||
import com.engine.salary.annotation.SalaryFormulaVar;
|
||||
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -123,6 +124,35 @@ public class SalaryAcctEmployeePO {
|
|||
@ElogTransform(name = "锁定状态")
|
||||
private Integer lockStatus;
|
||||
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
@I18n
|
||||
private String subcompanyName;
|
||||
private Long subcompanyId;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@I18n
|
||||
private String departmentName;
|
||||
private Long departmentId;
|
||||
/**
|
||||
* 岗位
|
||||
*/
|
||||
@I18n
|
||||
private String jobtitleName;
|
||||
private Long jobtitleId;
|
||||
/**
|
||||
* 职称
|
||||
*/
|
||||
@I18n
|
||||
private String jobcall;
|
||||
private Long jobcallId;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
//--------条件----------
|
||||
//主键id集合
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ public class SalaryArchiveQueryParam extends BaseQueryParam {
|
|||
|
||||
//个税扣缴义务人id
|
||||
private Long taxAgentId;
|
||||
|
||||
private List<Long> taxAgentIds;
|
||||
private String taxAgentName;
|
||||
|
||||
//分部id
|
||||
|
|
|
|||
|
|
@ -145,6 +145,18 @@ public class ExcelResult implements Serializable {
|
|||
this.runTime = runTime;
|
||||
}
|
||||
|
||||
public String getData2String() {
|
||||
if (data == null) {
|
||||
return "";
|
||||
} else {
|
||||
if (data instanceof BigDecimal) {
|
||||
return ((BigDecimal) data).toPlainString();
|
||||
} else {
|
||||
return data.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExcelResult{" +
|
||||
|
|
|
|||
|
|
@ -136,6 +136,13 @@
|
|||
<if test="param.workcode != null and param.workcode != ''">
|
||||
AND e.workcode like CONCAT('%',#{param.workcode},'%')
|
||||
</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.subcompanyIds != null and param.subcompanyIds.size()>0">
|
||||
AND c.id IN
|
||||
|
|
@ -232,6 +239,13 @@
|
|||
<if test="param.workcode != null and param.workcode != ''">
|
||||
AND e.workcode like '%'||#{param.workcode}||'%'
|
||||
</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.subcompanyIds != null and param.subcompanyIds.size()>0">
|
||||
AND c.id IN
|
||||
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
|
||||
|
|
@ -326,6 +340,13 @@
|
|||
<if test="param.workcode != null and param.workcode != ''">
|
||||
AND e.workcode like '%'+#{param.workcode}+'%'
|
||||
</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.subcompanyIds != null and param.subcompanyIds.size()>0">
|
||||
AND c.id IN
|
||||
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
|
||||
|
|
@ -430,6 +451,12 @@
|
|||
<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.username != null and param.username != ''">
|
||||
AND e.username like CONCAT('%',#{param.username},'%')
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@ public interface EmployMapper {
|
|||
*/
|
||||
List<DataCollectionEmployee> getEmployeeByIds(@Param("collection") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 单表查询 包括次账号
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> getEmployeeByIdsIncludeAccountType(@Param("collection") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 多表联查
|
||||
* @param ids
|
||||
|
|
|
|||
|
|
@ -36,6 +36,25 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeByIdsIncludeAccountType" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.certificatenum as idNo,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.workyear as workYear
|
||||
from hrmresource e
|
||||
where e.status not in (7)
|
||||
<if test="collection != null and collection.size()>0">
|
||||
AND e.id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getEmployeeByIdsAll" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
|
|
@ -99,10 +118,16 @@
|
|||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile
|
||||
e.mobile as mobile,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
sc.id as subcompanyid,
|
||||
job.id as jobcallId,
|
||||
job.name as jobcall
|
||||
from hrmresource e
|
||||
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join hrmjobcall job on e.jobcall=job.id
|
||||
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
|
||||
|
|
@ -139,14 +164,6 @@
|
|||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- -- 在职-->
|
||||
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'normal'">-->
|
||||
<!-- AND em.status in (0,1,2,3)-->
|
||||
<!-- </if>-->
|
||||
<!-- -- 离职-->
|
||||
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'unavailable'">-->
|
||||
<!-- AND em.status in (4,5,6)-->
|
||||
<!-- </if>-->
|
||||
)
|
||||
</foreach>
|
||||
)
|
||||
|
|
@ -187,14 +204,6 @@
|
|||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- -- 在职-->
|
||||
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'normal'">-->
|
||||
<!-- AND em.status in (0,1,2,3)-->
|
||||
<!-- </if>-->
|
||||
<!-- -- 离职-->
|
||||
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'unavailable'">-->
|
||||
<!-- AND em.status in (4,5,6)-->
|
||||
<!-- </if>-->
|
||||
)
|
||||
</foreach>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,15 @@
|
|||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="employee_type" property="employeeType"/>
|
||||
<result column="lock_status" property="lockStatus"/>
|
||||
<result column="subcompany_name" property="subcompanyName"/>
|
||||
<result column="subcompany_id" property="subcompanyId"/>
|
||||
<result column="department_name" property="departmentName"/>
|
||||
<result column="department_id" property="departmentId"/>
|
||||
<result column="jobtitle_name" property="jobtitleName"/>
|
||||
<result column="jobtitle_id" property="jobtitleId"/>
|
||||
<result column="jobcall" property="jobcall"/>
|
||||
<result column="jobcall_id" property="jobcallId"/>
|
||||
<result column="status" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SalaryAccEmployeeCountMap"
|
||||
|
|
@ -40,7 +49,16 @@
|
|||
t.delete_type,
|
||||
t.tenant_key,
|
||||
t.employee_type,
|
||||
t.lock_status
|
||||
t.lock_status,
|
||||
t.subcompany_name,
|
||||
t.subcompany_id,
|
||||
t.department_name,
|
||||
t.department_id,
|
||||
t.jobtitle_name,
|
||||
t.jobtitle_id,
|
||||
t.jobcall,
|
||||
t.jobcall_id,
|
||||
t.status
|
||||
</sql>
|
||||
|
||||
<sql id="emp1Column">
|
||||
|
|
@ -54,7 +72,16 @@
|
|||
<insert id="batchInsert">
|
||||
INSERT INTO hrsa_salary_acct_emp(
|
||||
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status,
|
||||
subcompany_name,
|
||||
subcompany_id,
|
||||
department_name,
|
||||
department_id,
|
||||
jobtitle_name,
|
||||
jobtitle_id,
|
||||
jobcall,
|
||||
jobcall_id,
|
||||
status)
|
||||
VALUES
|
||||
<foreach collection="collection" item="emp" separator=",">
|
||||
(
|
||||
|
|
@ -69,15 +96,32 @@
|
|||
#{emp.deleteType},
|
||||
#{emp.tenantKey},
|
||||
#{emp.employeeType},
|
||||
#{emp.lockStatus}
|
||||
#{emp.lockStatus},
|
||||
#{emp.subcompanyName},
|
||||
#{emp.subcompanyId},
|
||||
#{emp.departmentName},
|
||||
#{emp.departmentId},
|
||||
#{emp.jobtitleName},
|
||||
#{emp.jobtitleId},
|
||||
#{emp.jobcall},
|
||||
#{emp.jobcallId},
|
||||
#{emp.status}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
INSERT INTO hrsa_salary_acct_emp(
|
||||
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
|
||||
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status,
|
||||
subcompany_name,
|
||||
subcompany_id,
|
||||
department_name,
|
||||
department_id,
|
||||
jobtitle_name,
|
||||
jobtitle_id,
|
||||
jobcall,
|
||||
jobcall_id,
|
||||
status)
|
||||
<foreach collection="collection" item="emp" separator="union all">
|
||||
select
|
||||
#{emp.salaryAcctRecordId,jdbcType=DOUBLE},
|
||||
|
|
@ -92,6 +136,15 @@
|
|||
#{emp.tenantKey,jdbcType=VARCHAR},
|
||||
#{emp.employeeType,jdbcType=INTEGER},
|
||||
#{emp.lockStatus,jdbcType=INTEGER}
|
||||
#{emp.subcompanyName,jdbcType=VARCHAR},
|
||||
#{emp.subcompanyId,jdbcType=DOUBLE},
|
||||
#{emp.departmentName,jdbcType=VARCHAR},
|
||||
#{emp.departmentId,jdbcType=DOUBLE},
|
||||
#{emp.jobtitleName,jdbcType=VARCHAR},
|
||||
#{emp.jobtitleId,jdbcType=DOUBLE},
|
||||
#{emp.jobcall,jdbcType=VARCHAR},
|
||||
#{emp.jobcallId,jdbcType=DOUBLE},
|
||||
#{emp.status,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -99,7 +152,16 @@
|
|||
<foreach collection="collection" item="emp" separator=";">
|
||||
INSERT INTO hrsa_salary_acct_emp(
|
||||
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status,
|
||||
subcompany_name,
|
||||
subcompany_id,
|
||||
department_name,
|
||||
department_id,
|
||||
jobtitle_name,
|
||||
jobtitle_id,
|
||||
jobcall,
|
||||
jobcall_id,
|
||||
status)
|
||||
VALUES
|
||||
(
|
||||
#{emp.salaryAcctRecordId},
|
||||
|
|
@ -113,7 +175,16 @@
|
|||
#{emp.deleteType},
|
||||
#{emp.tenantKey},
|
||||
#{emp.employeeType},
|
||||
#{emp.lockStatus}
|
||||
#{emp.lockStatus},
|
||||
#{emp.subcompanyName},
|
||||
#{emp.subcompanyId},
|
||||
#{emp.departmentName},
|
||||
#{emp.departmentId},
|
||||
#{emp.jobtitleName},
|
||||
#{emp.jobtitleId},
|
||||
#{emp.jobcall},
|
||||
#{emp.jobcallId},
|
||||
#{emp.status}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -1151,6 +1222,15 @@
|
|||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="lock_status" property="lockStatus"/>
|
||||
<result column="subcompany_name" property="subcompanyName"/>
|
||||
<result column="subcompany_id" property="subcompanyId"/>
|
||||
<result column="department_name" property="departmentName"/>
|
||||
<result column="department_id" property="departmentId"/>
|
||||
<result column="jobtitle_name" property="jobtitleName"/>
|
||||
<result column="jobtitle_id" property="jobtitleId"/>
|
||||
<result column="jobcall" property="jobcall"/>
|
||||
<result column="jobcall_id" property="jobcallId"/>
|
||||
<result column="status" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -1170,6 +1250,15 @@
|
|||
, t.tenant_key
|
||||
, t.employee_type
|
||||
, t.lock_status
|
||||
, t.subcompany_name
|
||||
, t.subcompany_id
|
||||
, t.department_name
|
||||
, t.department_id
|
||||
, t.jobtitle_name
|
||||
, t.jobtitle_id
|
||||
, t.jobcall
|
||||
, t.jobcall_id
|
||||
, t.status
|
||||
</sql>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -117,15 +117,15 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<if test="taxAgentIds != null and taxAgentIds.size()>0">
|
||||
AND tax_agent_id IN
|
||||
<foreach collection="taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
|
||||
#{taxAgentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="taxAgentId != null">
|
||||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<include refid="listSomeParamSql"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -47,4 +47,7 @@ public class SalaryStatisticsEmployeeSalaryQueryParam extends BaseQueryParam {
|
|||
|
||||
// 部分导出id
|
||||
private List<Long> ids;
|
||||
|
||||
// 导出时显示列定制信息
|
||||
List<String> columns;
|
||||
}
|
||||
|
|
@ -200,7 +200,7 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
|
|||
|
||||
public void sendMsg(SalaryStatisticsPushParam param) {
|
||||
// 获取被分享人
|
||||
List<DataCollectionEmployee> receivers = getSalaryEmployeeService(user).getEmployeeByIds(param.getSharedBy());
|
||||
List<DataCollectionEmployee> receivers = getSalaryEmployeeService(user).getEmployeeByIdsIncludeAccountType(param.getSharedBy());
|
||||
// 发送消息
|
||||
receivers.forEach(receiver -> {
|
||||
// 发送消息...
|
||||
|
|
@ -654,7 +654,7 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
|
|||
} else {
|
||||
salaryStatisticsPushPOS = getSalaryStatisticsPushMapper().listSome(SalaryStatisticsPushPO.builder().build());
|
||||
}
|
||||
|
||||
int total = salaryStatisticsPushPOS.size();
|
||||
salaryStatisticsPushPOS = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), salaryStatisticsPushPOS);
|
||||
PageInfo<SalaryStatisticsPushTableDTO> dtoPageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), SalaryStatisticsPushTableDTO.class);
|
||||
if (CollectionUtils.isNotEmpty(salaryStatisticsPushPOS)) {
|
||||
|
|
@ -679,12 +679,12 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
|
|||
.effectiveTime(StringUtils.isEmpty(po.getStartTime()) ? "" : po.getStartTime()
|
||||
+ "——" + (StringUtils.isEmpty(po.getEndTime()) ? "" : po.getEndTime()))
|
||||
.id(po.getId())
|
||||
.successPush(buildSuccessPush(groupByBatchId.get(po.getId())))
|
||||
.sharedView(buildSharedView(groupByBatchId.get(po.getId())))
|
||||
.successPush(buildSuccessPush(groupByBatchId.getOrDefault(po.getId(), Collections.emptyList())))
|
||||
.sharedView(buildSharedView(groupByBatchId.getOrDefault(po.getId(), Collections.emptyList())))
|
||||
.build();
|
||||
}).collect(Collectors.toList());
|
||||
dtoPageInfo.setList(dtoList);
|
||||
dtoPageInfo.setTotal(dtoList.size());
|
||||
dtoPageInfo.setTotal(total);
|
||||
}
|
||||
return dtoPageInfo;
|
||||
}
|
||||
|
|
@ -699,7 +699,10 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
|
|||
}
|
||||
|
||||
public String buildSuccessPush(List<SalaryStatisticsPushDetailPO> list) {
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).getEmployeeByIds(list.stream().filter(po -> Objects.equals(po.getPushStatus(), "true") && !(Objects.equals(po.getRebackStatus(), "true"))).map(SalaryStatisticsPushDetailPO::getEmployeeId).collect(Collectors.toList()));
|
||||
List<Long> employeeIds = list.stream()
|
||||
.filter(po -> Objects.equals(po.getPushStatus(), "true") && !(Objects.equals(po.getRebackStatus(), "true")))
|
||||
.map(SalaryStatisticsPushDetailPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).getEmployeeByIdsIncludeAccountType(employeeIds);
|
||||
Set<String> employeeName = employeeByIds.stream().map(DataCollectionEmployee::getUsername).collect(Collectors.toSet());
|
||||
return String.join("、", employeeName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQuery
|
|||
import com.engine.salary.report.service.SalaryStatisticsEmployeeService;
|
||||
import com.engine.salary.report.service.impl.SalaryStatisticsEmployeeServiceImpl;
|
||||
import com.engine.salary.report.util.ReportDataUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -264,6 +265,15 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
List<Map<String, Object>> resultList = ((PageInfo<Map<String, Object>>) resultMap.get("pageInfo")).getList();
|
||||
Map<String, Object> countResult = (Map<String, Object>)resultMap.get("countResult");
|
||||
|
||||
Map<String, WeaTableColumn> columnMap = SalaryEntityUtil.convert2Map(columns, WeaTableColumn::getColumn);
|
||||
List<WeaTableColumn> finalColumns = new ArrayList<>();
|
||||
queryParam.getColumns().forEach(col -> {
|
||||
WeaTableColumn column = columnMap.get(col);
|
||||
if (column != null) {
|
||||
finalColumns.add(column);
|
||||
}
|
||||
});
|
||||
columns = finalColumns;
|
||||
List<List<Object>> rowList = new ArrayList<>();
|
||||
// 表头
|
||||
rowList.add(columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList()));
|
||||
|
|
|
|||
|
|
@ -70,6 +70,14 @@ public interface SalaryEmployeeService {
|
|||
*/
|
||||
List<DataCollectionEmployee> getEmployeeByIds(List<Long> simpleEmployeeIds);
|
||||
|
||||
/**
|
||||
* 获取人员信息 包括次账号
|
||||
*
|
||||
* @param simpleEmployeeIds
|
||||
* @return 简单
|
||||
*/
|
||||
List<DataCollectionEmployee> getEmployeeByIdsIncludeAccountType(List<Long> simpleEmployeeIds);
|
||||
|
||||
/**
|
||||
* 获取当前登录人的信息
|
||||
* @param employeeId
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.biz.AttendQuoteBiz;
|
||||
import com.engine.salary.biz.AttendQuoteDataBiz;
|
||||
import com.engine.salary.biz.AttendQuoteDataValueBiz;
|
||||
|
|
@ -16,7 +17,6 @@ import com.engine.salary.biz.AttendQuoteFieldBiz;
|
|||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.bo.AttendQuoteDataBO;
|
||||
import com.engine.salary.entity.datacollection.dto.*;
|
||||
|
|
@ -25,11 +25,12 @@ import com.engine.salary.entity.datacollection.po.AttendQuoteDataPO;
|
|||
import com.engine.salary.entity.datacollection.po.AttendQuoteDataValuePO;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuoteFieldPO;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuotePO;
|
||||
import com.engine.salary.entity.salarysob.bo.SalarySobRangeBO;
|
||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.datacollection.AttendQuoteSourceTypeEnum;
|
||||
|
|
@ -125,6 +126,11 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
return MapperProxyFactory.getProxy(SalarySobRangeMapper.class);
|
||||
}
|
||||
|
||||
private SalaryArchiveService getSalaryArchiveService(User user) {
|
||||
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private RemoteAttend4SalaryService getRemoteAttend4SalaryService(User user) {
|
||||
return ServiceUtil.getService(RemoteAttend4SalaryServiceImpl.class, user);
|
||||
|
|
@ -328,39 +334,45 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
@Override
|
||||
public String syncAttendQuoteData(AttendQuoteDataSyncParam syncParam) {
|
||||
AttendQuoteDataSyncParam.checkParam(syncParam);
|
||||
|
||||
Long salarySobId = syncParam.getSalarySobId();
|
||||
String salaryYearMonth = syncParam.getSalaryYearMonth();
|
||||
int year = Integer.parseInt(salaryYearMonth.split("-")[0]);
|
||||
int month = Integer.parseInt(salaryYearMonth.split("-")[1]);
|
||||
if (!SalaryDateUtil.checkYearMonth(salaryYearMonth)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100365, "薪资所属月格式有误,正确格式示例为'2021-01'"));
|
||||
}
|
||||
|
||||
// 1.获取已设置的可同步的考勤字段
|
||||
List<AttendQuoteFieldPO> attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.QUOTE);
|
||||
if (CollectionUtils.isEmpty(attendQuoteFields)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100366, "请先设置同步字段"));
|
||||
}
|
||||
// 获取薪资账套
|
||||
SalarySobCycleDTO salarySobCycle = getSalarySobService(user).getSalarySobCycle(syncParam.getSalarySobId(), YearMonth.of(year, month));
|
||||
// 2.薪资账套人员
|
||||
List<Long> employeeIds = new ArrayList<>();
|
||||
// 获取薪资账套人员
|
||||
List<SalarySobRangePO> salarySobRanges = getSalarySobRangeMapper().listSome(SalarySobRangePO.builder().includeType(1).salarySobId(salarySobCycle.getSalarySobId()).build());
|
||||
List<SalarySobRangeEmpQueryParam> salarySobRangeEmpQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(salarySobRanges);
|
||||
List<List<SalarySobRangeEmpQueryParam>> partition = Lists.partition(salarySobRangeEmpQueryParams, 100);
|
||||
List<Long> employeeSalarySobIds = new ArrayList<>();
|
||||
partition.forEach(l -> employeeSalarySobIds.addAll(getSalarySobRangeMapper().listEmployeeIds(l)));
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSalarySobIds) || CollectionUtils.isEmpty(salarySobRangeEmpQueryParams)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100367, "薪资账套还没有人员"));
|
||||
// 获取薪资账套
|
||||
SalarySobCycleDTO salarySobCycleDTO = getSalarySobService(user).getSalarySobCycle(syncParam.getSalarySobId(), YearMonth.of(year, month));
|
||||
|
||||
// 根据薪资账套查询人员
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listBySalarySobId(salarySobId);
|
||||
if (CollectionUtils.isEmpty(salaryEmployees)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100367, "薪资账套没有人员"));
|
||||
}
|
||||
// 账套外人员
|
||||
List<Long> employeeOtherIds = (List<Long>) syncParam.getEmployeeIds();
|
||||
employeeIds.addAll(employeeSalarySobIds);
|
||||
employeeIds.addAll(CollectionUtils.emptyIfNull(employeeOtherIds));
|
||||
// 根据薪资账套查询薪资周期
|
||||
SalarySobPO salarySobPO = getSalarySobService(user).getById(salarySobId);
|
||||
Long taxAgentId = salarySobPO.getTaxAgentId();
|
||||
|
||||
// 查询薪资档案,获取人员的个税扣缴义务人
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryEmployees, DataCollectionEmployee::getEmployeeId, Collectors.toList());
|
||||
List<SalaryArchiveDataDTO> salaryArchiveDataDTOS = getSalaryArchiveService(user).getSalaryArchiveTaxAgentData(salarySobCycleDTO.getSalaryCycle(), employeeIds, taxAgentId);
|
||||
// 转换成薪资核算人员po
|
||||
Date salaryDate = SalaryDateUtil.dateStrToLocalTime(salaryYearMonth + "-01");
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = SalaryAcctEmployeeBO.convert2Employee(salaryEmployees, SalaryAcctRecordPO.builder().salarySobId(salarySobId).salaryMonth(salaryDate).build(), salaryArchiveDataDTOS, (long) user.getUID());
|
||||
|
||||
//过滤掉不属于当前账套扣缴义务人的人员
|
||||
employeeIds = salaryAcctEmployeePOS.stream().filter(po -> Objects.equals(taxAgentId, po.getTaxAgentId())).map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
|
||||
|
||||
|
||||
// 4.获取考勤模块数据
|
||||
List<Map<String, Object>> attendQuoteSyncData = getAttendQuoteDataFromRemoteAttend(salarySobCycle.getAttendCycle(), employeeIds, attendQuoteFields);
|
||||
List<Map<String, Object>> attendQuoteSyncData = getAttendQuoteDataFromRemoteAttend(salarySobCycleDTO.getAttendCycle(), employeeIds, attendQuoteFields);
|
||||
List<AttendQuoteDataPO> pos = new ArrayList<>();
|
||||
List<AttendQuoteDataValuePO> values = new ArrayList<>();
|
||||
// 5.考勤引用数据处理
|
||||
|
|
@ -368,7 +380,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
if (CollectionUtils.isNotEmpty(attendQuoteSyncData)) {
|
||||
|
||||
// 3.生成考勤引用
|
||||
AttendQuotePO attendQuote = getAttendQuote(AttendQuoteSourceTypeEnum.QUOTE, syncParam.getSalarySobId(), year, month, syncParam.getDescription());
|
||||
AttendQuotePO attendQuote = getAttendQuote(AttendQuoteSourceTypeEnum.QUOTE, salarySobId, year, month, syncParam.getDescription());
|
||||
|
||||
for (Long employeeId : employeeIds) {
|
||||
AttendQuoteDataPO po = new AttendQuoteDataPO();
|
||||
|
|
|
|||
|
|
@ -3699,7 +3699,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(insuranceAccountDetailPO.getBillMonth(), insuranceAccountDetailPO.getPaymentOrganization());
|
||||
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization());
|
||||
DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(insuranceAccountDetailPO.getEmployeeId());
|
||||
DataCollectionEmployee empInfo = getSalaryEmployeeService(user).getEmployeeById(insuranceAccountDetailPO.getEmployeeId());
|
||||
LoggerContext<InsuranceAccountDetailPO> loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(targetPO.getId()));
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
|
|||
//记录操作日志
|
||||
InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(insuranceAccountDetailPO.getBillMonth(), insuranceAccountDetailPO.getPaymentOrganization());
|
||||
TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountDetailPO.getPaymentOrganization());
|
||||
DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(insuranceAccountDetailPO.getEmployeeId());
|
||||
DataCollectionEmployee empInfo = getSalaryEmployeeService(user).getEmployeeById(insuranceAccountDetailPO.getEmployeeId());
|
||||
LoggerContext<InsuranceCompensationPO> loggerContext = new LoggerContext();
|
||||
loggerContext.setUser(user);
|
||||
loggerContext.setTargetId(String.valueOf(targetPO.getId()));
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import org.springframework.util.StopWatch;
|
|||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
import java.time.Month;
|
||||
import java.util.*;
|
||||
|
|
@ -242,7 +241,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
if (Objects.nonNull(expressFormula)) {
|
||||
// 运行公式
|
||||
ExcelResult result = runExpressFormula(expressFormula, formulaVarValueMap, simpleEmployee);
|
||||
resultValue = Utils.null2String(result.getData());
|
||||
resultValue = result.getData2String();
|
||||
//公式异常信息
|
||||
if (!result.isStatus()) {
|
||||
String username = empInfo.stream().filter(emp -> StringUtils.equals("employeeInfo_username", emp.getFieldId())).findFirst().map(CalculateFormulaVarBO.FormulaVarValue::getFieldValue).orElse("");
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
|
||||
@Override
|
||||
public SalaryAcctEmployeePO getById(Long id) {
|
||||
return getSalaryAcctEmployeeMapper().getById(id);
|
||||
SalaryAcctEmployeePO po = getSalaryAcctEmployeeMapper().getById(id);
|
||||
SalaryI18nUtil.i18n(po);
|
||||
return po;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -439,7 +441,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
if (CollectionUtils.isEmpty(salaryAcctEmployeePOS)) {
|
||||
return;
|
||||
}
|
||||
List<List<SalaryAcctEmployeePO>> partition = Lists.partition((List) salaryAcctEmployeePOS, 100);
|
||||
List<List<SalaryAcctEmployeePO>> partition = Lists.partition((List) salaryAcctEmployeePOS, 50);
|
||||
partition.forEach(getSalaryAcctEmployeeMapper()::batchInsert);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -757,6 +757,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
rows.add(headerList);
|
||||
if (param.getImportType() != null && param.getImportType().equals("true")) {
|
||||
// 需要导出现有数据,查询薪资核算结果
|
||||
param.setDynamicEmpInfo(true);
|
||||
List<Map<String, Object>> resultMapList = getSalaryAcctResultService(user).listByParam(param);
|
||||
for (Map<String, Object> map : resultMapList) {
|
||||
List<Object> row = Lists.newArrayListWithExpectedSize(headerColumnGroup.size());
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
});
|
||||
|
||||
// 转换成薪资核算结果列表
|
||||
return SalaryAcctResultBO.buildTableData(salaryItemPOS, salarySobEmpFieldPOS, simpleEmployees, salaryAcctEmployeePOS, salaryAcctResultPOS, taxAgentPOS, salaryAcctEmployeeIds4ConsolidatedTax, customParameters, customBackCalcParameters, isBackCalc);
|
||||
return SalaryAcctResultBO.buildTableData(salaryItemPOS, salarySobEmpFieldPOS, simpleEmployees, salaryAcctEmployeePOS, salaryAcctResultPOS, taxAgentPOS, salaryAcctEmployeeIds4ConsolidatedTax, customParameters, customBackCalcParameters, queryParam.isDynamicEmpInfo());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ public class SalaryComparisonResultServiceImpl extends Service implements Salary
|
|||
// 查询薪资核算所用薪资账套的薪资项目副本
|
||||
List<SalarySobItemPO> salarySobItemPOS = salaryAcctConfig.getSalarySobItems();
|
||||
// 过滤在账套中隐藏的薪资项目
|
||||
salarySobItemPOS = salarySobItemPOS.stream().filter(po -> po.getItemHide()==null || po.getItemHide() == 0).collect(Collectors.toList());
|
||||
salarySobItemPOS = salarySobItemPOS.stream().filter(po -> po.getItemHide() == null || po.getItemHide() == 0).collect(Collectors.toList());
|
||||
// 查询公式详情
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId);
|
||||
List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
|
|
@ -230,7 +230,7 @@ public class SalaryComparisonResultServiceImpl extends Service implements Salary
|
|||
Set<Long> includeSalaryItemIds = Sets.newHashSetWithExpectedSize(salaryItemPOS.size());
|
||||
// 转换成薪资核算线下对比结果
|
||||
List<Map<String, Object>> resultMapList = SalaryAcctResultBO.buildComparisonTableData(salaryItemPOS, salarySobEmpFieldPOS, simpleEmployees,
|
||||
salaryAcctEmployeePOS, salaryAcctResultPOS, excelAcctResultPOS, taxAgentPOS, customParameters, salaryAcctEmployeeIds4ConsolidatedTax, includeSalaryItemIds);
|
||||
salaryAcctEmployeePOS, salaryAcctResultPOS, excelAcctResultPOS, taxAgentPOS, customParameters, salaryAcctEmployeeIds4ConsolidatedTax, includeSalaryItemIds, queryParam.isDynamicEmpInfo());
|
||||
// 系统值和线下值一致的人员
|
||||
if (queryParam.isOnlyDiffEmployee()) {
|
||||
// 过滤系统值和线下值一致的薪资核算人员
|
||||
|
|
|
|||
|
|
@ -212,6 +212,23 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> getEmployeeByIdsIncludeAccountType(List<Long> simpleEmployeeIds) {
|
||||
if (CollectionUtils.isEmpty(simpleEmployeeIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<DataCollectionEmployee> employeeList = new ArrayList<>();
|
||||
List<List<Long>> partition = Lists.partition(simpleEmployeeIds, 1000);
|
||||
for (List<Long> longs : partition) {
|
||||
employeeList.addAll(employBiz.getEmployeeByIdsIncludeAccountType(longs));
|
||||
if (openExtEmp) {
|
||||
employeeList.addAll(getExtEmpService(user).getEmployeeByIds(longs));
|
||||
}
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employeeList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<DataCollectionEmployee> filterEmployees(List<DataCollectionEmployee> employees, String userName, String deparmentName, String mobile) {
|
||||
List<DataCollectionEmployee> employeeSameIds = employees.stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
|
||||
|
|
@ -327,7 +344,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
// 从hrmresource和hrmresourcevirtual可能获取到重复人员数据,需要根据人员id去重
|
||||
result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new));
|
||||
|
||||
return SalaryI18nUtil.i18nList(result);
|
||||
//部门分部等信息备份到核算人员表中,不进行多语言处理
|
||||
// return SalaryI18nUtil.i18nList(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Validator;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
|
|
@ -25,6 +26,7 @@ import com.engine.salary.entity.salaryBill.param.*;
|
|||
import com.engine.salary.entity.salaryBill.po.SalarySendInfoPO;
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
|
||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctFormulaBO;
|
||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultBO;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctResultQueryParam;
|
||||
|
|
@ -522,10 +524,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
salarySendInfo.setUpdateTime(new Date());
|
||||
getSalarySendInfoMapper().updateIgnoreNull(salarySendInfo);
|
||||
}
|
||||
// List<SalarySendPO> salarySends = new LambdaQueryChainWrapper<>(mapper)
|
||||
// .eq(SalarySendPO::getDeleteType, 0)
|
||||
// .eq(SalarySendPO::getTenantKey, currentTenantKey)
|
||||
// .eq(SalarySendPO::getId, salarySendInfo.getSalarySendId()).list();
|
||||
|
||||
List<SalarySendPO> salarySends = mapper.listSome(SalarySendPO.builder().id(salarySendInfo.getSalarySendId()).build());
|
||||
if (CollectionUtils.isEmpty(salarySends)) {
|
||||
|
|
@ -557,6 +555,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
|
||||
Long salaryAcctRecordId = salarySendInfo.getSalaryAcctRecordId();
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctRecordId(salaryAcctRecordId).employeeId(currentEmployeeId).build());
|
||||
if (CollUtil.isEmpty(salaryAcctResultPOS)) {
|
||||
throw new SalaryRunTimeException("薪资核算结果不存在!");
|
||||
}
|
||||
encryptUtil.decryptList(salaryAcctResultPOS, SalaryAcctResultPO.class);
|
||||
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salaryAcctRecordId);
|
||||
|
|
@ -633,6 +634,8 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
|
||||
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(salarySendInfo.getTaxAgentId());
|
||||
DataCollectionEmployee simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(salarySendInfo.getEmployeeId());
|
||||
SalaryAcctEmployeePO acctEmployeePO = getSalaryAcctEmployeeService(user).getById(salaryAcctResultPOS.get(0).getSalaryAcctEmpId());
|
||||
SalaryAcctEmployeeBO.copyAcctEmp(simpleEmployee, acctEmployeePO);
|
||||
buildEmployeeInfo(employeeInformation, simpleEmployee, taxAgentPO.getName(), SalaryAcctResultBO.buildEmployeeFieldName());
|
||||
map.put("employeeInformation", employeeInformation);
|
||||
map.put("salaryGroups", itemSetListDTOS);
|
||||
|
|
@ -686,6 +689,8 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Date getLimitMonth() {
|
||||
//工资单时效性
|
||||
salaryBillViewingLimitSetting salaryBillViewingLimitSetting = getSalaryBillBaseSetService(user).getSalaryBillViewingLimitSetting();
|
||||
|
|
@ -927,7 +932,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
.jobtitleName(simpleEmployee.getJobtitleName())
|
||||
.jobtitleId(simpleEmployee.getJobtitleId())
|
||||
.status(simpleEmployee.getStatus() == null ? "" : simpleEmployee.getStatus())
|
||||
.statusName(simpleEmployee.getStatus() == null ? "" : UserStatusEnum.parseByValue(new Integer(simpleEmployee.getStatus())).getDefaultLabel())
|
||||
.statusName(simpleEmployee.getStatus() == null ? "" : UserStatusEnum.parseByValue(new Integer(Util.null2s(simpleEmployee.getStatus(),"1"))).getDefaultLabel())
|
||||
.telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
|
||||
.username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())
|
||||
.workcode(StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode())
|
||||
|
|
@ -1858,11 +1863,10 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
// 判断是否是补发
|
||||
boolean isReplenish = NumberUtils.INTEGER_ONE.equals(salarySendInfo.getSalaryAcctType());
|
||||
|
||||
SalaryAcctResultPO acctPo = new SalaryAcctResultPO();
|
||||
acctPo.setDeleteType(0);
|
||||
acctPo.setSalaryAcctRecordId(salarySendInfo.getSalaryAcctRecordId());
|
||||
acctPo.setEmployeeId(recipient);
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultMapper().listSome(acctPo);
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctRecordId(salarySendInfo.getSalaryAcctRecordId()).employeeId(recipient).build());
|
||||
if (CollUtil.isEmpty(salaryAcctResultPOS)) {
|
||||
throw new SalaryRunTimeException("薪资核算结果不存在!");
|
||||
}
|
||||
encryptUtil.decryptList(salaryAcctResultPOS, SalaryAcctResultPO.class);
|
||||
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salarySendInfo.getSalaryAcctRecordId());
|
||||
|
|
@ -1938,6 +1942,8 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
}
|
||||
|
||||
DataCollectionEmployee simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(salarySendInfo.getEmployeeId());
|
||||
SalaryAcctEmployeePO acctEmployeePO = getSalaryAcctEmployeeService(user).getById(salaryAcctResultPOS.get(0).getSalaryAcctEmpId());
|
||||
SalaryAcctEmployeeBO.copyAcctEmp(simpleEmployee, acctEmployeePO);
|
||||
buildEmployeeInfo(employeeInformation, simpleEmployee, taxAgentPO.getName(), SalaryAcctResultBO.buildEmployeeFieldName());
|
||||
map.put("employeeInformation", employeeInformation);
|
||||
map.put("salaryGroups", itemSetListDTOS);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.engine.salary.wrapper.SalaryArchiveWrapper;
|
|||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
|
@ -486,6 +487,11 @@ public class SalaryArchiveController {
|
|||
if (StringUtils.isNotBlank(taxAgentId)) {
|
||||
param.setTaxAgentId(Long.valueOf(taxAgentId));
|
||||
}
|
||||
String taxAgentIdsStr = request.getParameter("taxAgentIds");
|
||||
if (StringUtils.isNotBlank(taxAgentIdsStr)) {
|
||||
List<Long> taxAgentIds = Arrays.stream(taxAgentIdsStr.split(",")).filter(NumberUtils::isCreatable).map(Long::valueOf).collect(Collectors.toList());
|
||||
param.setTaxAgentIds(taxAgentIds);
|
||||
}
|
||||
String departmentIds = request.getParameter("departmentIds");
|
||||
if (StringUtils.isNotBlank(departmentIds)) {
|
||||
param.setDepartmentIds(Arrays.stream(departmentIds.split(",")).map(Long::valueOf).collect(Collectors.toList()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue