Merge branch 'feature/人员信息快照' into release/2.14.5.2406.03
# Conflicts: # src/com/engine/salary/service/impl/SalarySendServiceImpl.java
This commit is contained in:
commit
993f21b448
|
|
@ -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
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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(e.getStatus())));
|
||||
} 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;
|
||||
|
|
@ -112,6 +113,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集合
|
||||
|
|
|
|||
|
|
@ -99,10 +99,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 +145,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 +185,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>
|
||||
|
|
@ -1150,6 +1221,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>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -1169,6 +1249,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>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,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
|
||||
|
|
|
|||
|
|
@ -389,6 +389,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// List<Object> headerList = new ArrayList<>(weaTableColumns);
|
||||
List<Object> headerList = new ArrayList<>(finalWeaTableColumns);
|
||||
// 查询薪资核算结果
|
||||
queryParam.setDynamicEmpInfo(true);
|
||||
List<Map<String, Object>> resultMapList = getSalaryAcctResultService(user).listByParam(queryParam);
|
||||
|
||||
|
||||
|
|
@ -757,6 +758,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());
|
||||
|
|
|
|||
|
|
@ -496,7 +496,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());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
// 过滤系统值和线下值一致的薪资核算人员
|
||||
|
|
|
|||
|
|
@ -328,7 +328,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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue