薪酬系统导入方式配置-人员筛选方法类调用优化以及调整相关调用该方法的代码
This commit is contained in:
parent
ad3a2b4f69
commit
de150e063e
|
|
@ -242,13 +242,4 @@ public interface SalaryAcctEmployeeService {
|
|||
*/
|
||||
void refresh(Long salaryAcctRecordId);
|
||||
|
||||
/**
|
||||
* 筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
* @param employeeList 人力资源池
|
||||
* @param userName 姓名
|
||||
* @param deparmentName 部门
|
||||
* @param mobile 手机号
|
||||
* @param workcode 工号
|
||||
*/
|
||||
List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
String workcode = dto.getJobNum();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryAcctEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {
|
||||
//姓名 不能为空
|
||||
|
|
|
|||
|
|
@ -76,10 +76,6 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
|
@ -629,7 +625,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
String workcode = dto.getJobNum();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryAcctEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
|
||||
//当人员信息导入筛选的全局配置为"0"时,姓名才是必填项
|
||||
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {
|
||||
|
|
|
|||
|
|
@ -31,10 +31,7 @@ import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
|||
import com.engine.salary.remote.attend.entity.Attend4Salary;
|
||||
import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService;
|
||||
import com.engine.salary.remote.attend.service.impl.RemoteAttend4SalaryServiceImpl;
|
||||
import com.engine.salary.service.AttendQuoteDataService;
|
||||
import com.engine.salary.service.AttendQuoteFieldSettingService;
|
||||
import com.engine.salary.service.SalaryAcctEmployeeService;
|
||||
import com.engine.salary.service.SalarySobService;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
|
@ -109,8 +106,8 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
return (RemoteAttend4SalaryService) ServiceUtil.getService(RemoteAttend4SalaryServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return (SalaryEmployeeService) ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
|
|
@ -649,8 +646,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryAcctEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode);
|
||||
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
|
|
|
|||
|
|
@ -67,10 +67,6 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
|
@ -230,8 +226,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryAcctEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode);
|
||||
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employeeBiz = new EmployBiz();
|
||||
|
|
@ -1140,7 +1140,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
} else {
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryAcctEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
|
|||
|
|
@ -37,10 +37,7 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
|||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.SIImportService;
|
||||
import com.engine.salary.service.SISchemeService;
|
||||
import com.engine.salary.service.SalaryAcctEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
|
|
@ -121,8 +118,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return (SalaryEmployeeService) ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
|
|
@ -709,7 +706,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
isError = true;
|
||||
}
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employees = getSalaryAcctEmployeeService(user).matchImportEmployee(employeeByIds, userName, deparmentName, mobile, workcode);
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).matchImportEmployee(employeeByIds, userName, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employees)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
|
|
|
|||
|
|
@ -514,33 +514,4 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
* @param employeeList 人力资源池
|
||||
* @param userName 姓名
|
||||
* @param deparmentName 部门
|
||||
* @param mobile 手机号
|
||||
* @param workcode 工号
|
||||
*/
|
||||
@Override
|
||||
public List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode) {
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
List<DataCollectionEmployee> employees = new ArrayList<>();
|
||||
//“0”代表姓名+部门+手机号的匹配原则,“1”代表工号为唯一匹配原则
|
||||
if ("0".equals(confValue)) {
|
||||
employees = employeeList.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());
|
||||
} else if ("1".equals(confValue)) {
|
||||
employees = employeeList.stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
return employees;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -669,11 +669,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
//salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"), i, i, j, j);
|
||||
} else {
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryAcctEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode);
|
||||
// List<DataCollectionEmployee> employeeSameIds = salaryEmployees.stream().filter(e -> (StringUtils.isBlank(dataValue) || Objects.equals(e.getUsername(), dataValue))
|
||||
// && (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
|
||||
// && (StringUtils.isBlank(mobile) || Objects.equals(e.getMobile(), mobile)))
|
||||
// .collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue