万君调整
This commit is contained in:
parent
b4e5eb4342
commit
e121b81588
|
|
@ -180,8 +180,13 @@ public class EmployBiz extends BaseBean {
|
|||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
List<DeptInfo> resultList = new ArrayList<>();
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.getDeptInfoList(list);
|
||||
List<List<Long>> partition = Lists.partition(list, 500);
|
||||
partition.forEach(part -> {
|
||||
resultList.addAll(mapper.getDeptInfoList(part));
|
||||
});
|
||||
return resultList;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ public class DeptInfo {
|
|||
@I18n
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@I18n
|
||||
private String departmentMark;
|
||||
|
||||
/**
|
||||
* 所属分部id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -131,6 +131,9 @@ public class SalaryAcctEmployeePO {
|
|||
@I18n
|
||||
@SalaryFormulaVar(defaultLabel = "部门", labelId = 86321, dataType = "string")
|
||||
private String departmentName;
|
||||
|
||||
@I18n
|
||||
private String departmentMark;
|
||||
@SalaryFormulaVar(defaultLabel = "部门ID", labelId = 86321, dataType = "string")
|
||||
private Long departmentId;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -344,7 +344,8 @@
|
|||
<select id="getDeptInfoList" resultType="com.engine.salary.entity.hrm.DeptInfo">
|
||||
select d.departmentname as name,
|
||||
d.id as id,
|
||||
showorder
|
||||
showorder,
|
||||
d.DEPARTMENTMARK as departmentMark
|
||||
from hrmdepartment d
|
||||
where 1=1
|
||||
<if test="departmentIds != null and departmentIds.size()>0">
|
||||
|
|
|
|||
|
|
@ -1302,6 +1302,18 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
|
||||
// 查询薪资核算人员
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOList = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()));
|
||||
// 获取部门简称信息
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployeePOList)) {
|
||||
List<Long> deptIds = salaryAcctEmployeePOList.stream().map(SalaryAcctEmployeePO::getDepartmentId).distinct().collect(Collectors.toList());
|
||||
List<DeptInfo> deptInfoList = getSalaryEmployeeService(user).getDeptInfoList(deptIds);
|
||||
Map<Long, String> deptMarkMap = SalaryEntityUtil.convert2Map(deptInfoList, DeptInfo::getId, DeptInfo::getDepartmentMark);
|
||||
for (SalaryAcctEmployeePO acctEmp : salaryAcctEmployeePOList) {
|
||||
String deptMark = deptMarkMap.get(acctEmp.getDepartmentId());
|
||||
if (deptMarkMap != null) {
|
||||
acctEmp.setDepartmentMark(deptMark);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 二开 - 只统计名字中带“部”的,和 公司领导班子 部门
|
||||
BaseBean baseBean = new BaseBean();
|
||||
Long ldbzDepartmentId = NumberUtils.isCreatable(baseBean.getPropValue("wjztkjSalary", "gsldbz_department_id")) ? Long.valueOf(baseBean.getPropValue("wjztkjSalary", "gsldbz_department_id")) : 0L;
|
||||
|
|
@ -1343,7 +1355,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
});
|
||||
}
|
||||
salaryAcctEmployeePOList = salaryAcctEmployeePOList.stream()
|
||||
.filter(acctEmp -> acctEmp.getDepartmentName().contains("部")
|
||||
.filter(acctEmp -> acctEmp.getDepartmentMark().contains("部")
|
||||
|| needSumToLdbzDepartmentIds.contains(acctEmp.getDepartmentId())
|
||||
|| acctEmp.getDepartmentId().equals(ldbzDepartmentId)
|
||||
|| needSumDepIds.contains(acctEmp.getDepartmentId()))
|
||||
|
|
|
|||
Loading…
Reference in New Issue