薪酬系统导入方式配置-薪资档案调薪/初始化-导入,添加导入人员筛选配置化处理
This commit is contained in:
parent
c13ca103f3
commit
a3ec7caf44
|
|
@ -67,6 +67,12 @@ public class SalaryArchiveListDTO {
|
|||
@TableTitle(title = "电话", dataIndex = "mobile", key = "mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
|
||||
private String workcode;
|
||||
|
||||
/**
|
||||
* 员工状态
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
, t1.pay_start_date
|
||||
, t1.pay_end_date
|
||||
, e.mobile
|
||||
, e.workcode
|
||||
, e.lastname as username
|
||||
, e.status AS employeeStatus
|
||||
, d.departmentname AS departmentName
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import com.engine.salary.enums.salaryarchive.SalaryArchiveTaxAgentAdjustReasonEn
|
|||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveMapper;
|
||||
import com.engine.salary.service.SalaryAcctEmployeeService;
|
||||
import com.engine.salary.service.SalaryArchiveService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
|
|
@ -98,6 +99,10 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
return MapperProxyFactory.getProxy(SalaryArchiveItemMapper.class);
|
||||
}
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalaryArchivePO getById(Long salaryArchiveId) {
|
||||
return salaryArchiveMapper.getById(salaryArchiveId);
|
||||
|
|
@ -307,6 +312,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
map.put("subcompanyName", e.getSubcompanyName());
|
||||
map.put("departmentName", e.getDepartmentName());
|
||||
map.put("mobile", e.getMobile());
|
||||
map.put("workcode", e.getWorkcode());
|
||||
map.put("employeeStatus", e.getEmployeeStatus());
|
||||
map.put("payStartDate", SalaryDateUtil.getFormatLocalDate(e.getPayStartDate()));
|
||||
map.put("payEndDate", SalaryDateUtil.getFormatLocalDate(e.getPayEndDate()));
|
||||
|
|
@ -462,6 +468,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
}
|
||||
row.add(Util.null2String(e.get("departmentName")));
|
||||
row.add(Util.null2String(e.get("mobile")));
|
||||
row.add(Util.null2String(e.get("workcode")));
|
||||
row.add(Util.null2String(e.get("employeeStatus")));
|
||||
if (isInit) {
|
||||
row.add(Util.null2String(e.get("payStartDate")));
|
||||
|
|
@ -931,10 +938,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
String userName = Optional.ofNullable(map.get(userNameI18n)).orElse("").toString();
|
||||
String deparmentName = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86185, "部门"))).orElse("").toString();
|
||||
String mobile = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"))).orElse("").toString();
|
||||
List<DataCollectionEmployee> emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
|
||||
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
|
||||
&& (StringUtils.isBlank(mobile) || Objects.equals(e.getMobile(), mobile)))
|
||||
.collect(Collectors.toList());
|
||||
String workcode = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "工号"))).orElse("").toString();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryAcctEmployeeService(user).matchImportEmployee(importHandleParam.getEmployees(), userName, deparmentName, mobile, workcode);
|
||||
|
||||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream().filter(e -> UserStatusEnum.getNormalStatus().contains(e.getStatus())).map(DataCollectionEmployee::getEmployeeId).collect(Collectors.toList());
|
||||
|
|
|
|||
Loading…
Reference in New Issue