人员信息快照

This commit is contained in:
钱涛 2024-06-18 11:01:58 +08:00
parent 5b7533e908
commit 0c0c754a9d
22 changed files with 784 additions and 28 deletions

View File

@ -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;
/

View File

@ -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
);
/

View File

@ -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;
/

View File

@ -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
);
/

View File

@ -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;
/

View File

@ -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
);
/

View File

@ -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);

View File

@ -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;

View File

@ -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
/

View File

@ -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
)
/

View File

@ -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);

View File

@ -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
);

View File

@ -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

View File

@ -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

View File

@ -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;
/

View File

@ -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
);
/

View File

@ -147,6 +147,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)

View File

@ -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;
@ -267,6 +268,7 @@ public class SalaryAcctResultBO {
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 +280,31 @@ 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 ("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

View File

@ -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集合

View File

@ -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>
<!-- &#45;&#45; 在职-->
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'normal'">-->
<!-- AND em.status in (0,1,2,3)-->
<!-- </if>-->
<!-- &#45;&#45; 离职-->
<!-- <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>
<!-- &#45;&#45; 在职-->
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'normal'">-->
<!-- AND em.status in (0,1,2,3)-->
<!-- </if>-->
<!-- &#45;&#45; 离职-->
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'unavailable'">-->
<!-- AND em.status in (4,5,6)-->
<!-- </if>-->
)
</foreach>
)

View File

@ -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>

View File

@ -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;
}
/**