fix导入性能,导入方法类型改完外层引用
This commit is contained in:
parent
4b77af983a
commit
8ae06f27b8
|
|
@ -30,6 +30,7 @@ public interface SalaryEmployeeService {
|
|||
|
||||
/**
|
||||
* 获取报表人员字段
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listAllForReport();
|
||||
|
|
@ -44,6 +45,7 @@ public interface SalaryEmployeeService {
|
|||
|
||||
/**
|
||||
* 获取人员信息
|
||||
*
|
||||
* @param ids
|
||||
* @return 全量
|
||||
*/
|
||||
|
|
@ -53,6 +55,7 @@ public interface SalaryEmployeeService {
|
|||
|
||||
/**
|
||||
* 获取人员信息
|
||||
*
|
||||
* @param employeeId
|
||||
* @return 全量
|
||||
*/
|
||||
|
|
@ -60,6 +63,7 @@ public interface SalaryEmployeeService {
|
|||
|
||||
/**
|
||||
* 获取人员信息
|
||||
*
|
||||
* @param simpleEmployeeIds
|
||||
* @return 简单
|
||||
*/
|
||||
|
|
@ -74,14 +78,16 @@ public interface SalaryEmployeeService {
|
|||
|
||||
/**
|
||||
* 筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
* @param employeeList 人力资源池
|
||||
* @param userName 姓名
|
||||
*
|
||||
* @param confValue 校验方式
|
||||
* @param employeeList 人力资源池
|
||||
* @param userName 姓名
|
||||
* @param deparmentName 部门
|
||||
* @param mobile 手机号
|
||||
* @param workcode 工号
|
||||
* @param uid 人员id
|
||||
* @param mobile 手机号
|
||||
* @param workcode 工号
|
||||
* @param uid 人员id
|
||||
*/
|
||||
List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
|
||||
List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
|
||||
|
||||
String empValidType();
|
||||
|
||||
|
|
@ -97,29 +103,33 @@ public interface SalaryEmployeeService {
|
|||
|
||||
/**
|
||||
* 根据离职日期获取离职信息
|
||||
*
|
||||
* @param formatDate
|
||||
*/
|
||||
Map<Long, String> getResignationMapByDate(String formatDate);
|
||||
|
||||
/**
|
||||
* 扩展人员信息
|
||||
*
|
||||
* @param ids
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> expandEmployeeInfo(List<Long> ids, EmployeeInfoExpandDTO param);
|
||||
|
||||
Map<Long,Map<String,String>> expandEmployeeMap(List<Long> ids, EmployeeInfoExpandDTO param);
|
||||
Map<Long, Map<String, String>> expandEmployeeMap(List<Long> ids, EmployeeInfoExpandDTO param);
|
||||
|
||||
|
||||
/**
|
||||
* 保存扩展信息
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
void saveEmployeeExpandFieldSettings(EmployeeInfoExpandDTO param);
|
||||
|
||||
/**
|
||||
* 获取扩展信息
|
||||
*
|
||||
* @param module
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
String workcode = dto.getJobNum();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {
|
||||
//姓名 不能为空
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
String workcode = dto.getJobNum();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
|
||||
//当人员信息导入筛选的全局配置为"0"时,姓名才是必填项
|
||||
if (StringUtils.isBlank(userName) && "0".equals(confValue)) {
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
|
|
|
|||
|
|
@ -1737,7 +1737,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
} else {
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
@ -2739,7 +2739,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
} else {
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
@ -3577,7 +3577,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
} else {
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, name, departmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
|
|||
|
|
@ -991,7 +991,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
isError = true;
|
||||
}
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
employees = getSalaryEmployeeService(user).matchImportEmployee(employeeByIds, userName, deparmentName, mobile, workcode, null);
|
||||
employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode, null);
|
||||
} else {
|
||||
employees = employeeByIds.stream().filter(f -> f.getEmployeeId().equals(addEmployeeId)).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,10 +289,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
|
||||
//判断是否按照自定义字段导出表头
|
||||
List<WeaTableColumnGroup> finalWeaTableColumns = new ArrayList<>();
|
||||
if (queryParam.getSalaryItemIds() != null ) {
|
||||
if (queryParam.getSalaryItemIds() != null) {
|
||||
//获取人员基本信息字段(汇总)
|
||||
Collection<Map<String, String>> empFieldList = getSalarySobItemWrapper(user).empFieldList();
|
||||
List<String> empFieldIdList= new ArrayList<>();
|
||||
List<String> empFieldIdList = new ArrayList<>();
|
||||
empFieldList.forEach(f -> empFieldIdList.add(f.get("id")));
|
||||
// 必须选择导出所需的薪资项目
|
||||
if (CollectionUtils.isEmpty(queryParam.getSalaryItemIds())) {
|
||||
|
|
@ -311,7 +311,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
columnGroupItem.setChildren(childrenColumns);
|
||||
finalWeaTableColumns.add(columnGroupItem);
|
||||
}
|
||||
} else if (empFieldIdList.contains(tableColumn.getColumn()) || headerRangeList.contains(tableColumn.getColumn())){
|
||||
} else if (empFieldIdList.contains(tableColumn.getColumn()) || headerRangeList.contains(tableColumn.getColumn())) {
|
||||
finalWeaTableColumns.add(columnGroupItem);
|
||||
}
|
||||
|
||||
|
|
@ -334,12 +334,12 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
||||
total = true;
|
||||
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
||||
sumRow.forEach((k,v) -> {
|
||||
sumRow.forEach((k, v) -> {
|
||||
if (NumberUtils.isCreatable(v.toString())) {
|
||||
sumRow.put(k,new BigDecimal(v.toString()));
|
||||
sumRow.put(k, new BigDecimal(v.toString()));
|
||||
}
|
||||
});
|
||||
if(sumRow !=null){
|
||||
if (sumRow != null) {
|
||||
sumRow.put("taxAgentName", "总计");
|
||||
resultMapList.add(sumRow);
|
||||
}
|
||||
|
|
@ -354,7 +354,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
for (WeaTableColumnGroup weaTableColumn : headerColumnGroup) {
|
||||
String fieldType = (String) map.getOrDefault(weaTableColumn.getColumn().toString() + DATA_TYPE_SUFFIX, StringUtils.EMPTY);
|
||||
if (StringUtils.equals("number", fieldType)) {
|
||||
row.add(new BigDecimal(StringUtils.isBlank(map.get(weaTableColumn.getColumn()).toString()) ? "0" :map.get(weaTableColumn.getColumn()).toString()));
|
||||
row.add(new BigDecimal(StringUtils.isBlank(map.get(weaTableColumn.getColumn()).toString()) ? "0" : map.get(weaTableColumn.getColumn()).toString()));
|
||||
} else {
|
||||
row.add(map.getOrDefault(weaTableColumn.getColumn(), StringUtils.EMPTY));
|
||||
}
|
||||
|
|
@ -380,7 +380,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
SalaryAcctRecordPO byId = getSalaryAcctRecordService(user).getById(salaryAcctRecordPO.getId());
|
||||
boolean isBackCalc = Objects.equals(byId.getBackCalcStatus(), 1);
|
||||
// 查询薪资账套下的薪资项目+员工信息字段
|
||||
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getSalarySobId(),isBackCalc);
|
||||
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getSalarySobId(), isBackCalc);
|
||||
// 构建薪资核算结果列表表头
|
||||
List<WeaTableColumnGroup> columnList = SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO, ListUtils.emptyIfNull(salaryAcctRecordPO.getLockSalaryItemIds()));
|
||||
// 获取固定列头数
|
||||
|
|
@ -450,27 +450,27 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
SalaryAcctResultBO.sortItem(salarySobItemPOMap);
|
||||
// 根据账套分组封装薪资项目的值
|
||||
List<SalaryAcctImportFieldDTO.ImportFieldByGroupDTO> itemsByGroup = new ArrayList<>();
|
||||
for(SalarySobItemGroupPO groupPO : salarySobItemGroupPOS){
|
||||
List<SalarySobItemPO> groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList());
|
||||
for (SalarySobItemGroupPO groupPO : salarySobItemGroupPOS) {
|
||||
List<SalarySobItemPO> groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(), Collections.emptyList());
|
||||
List<SalaryAcctImportFieldDTO.ImportFieldDTO> items = groupItems.stream()
|
||||
.map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
|
||||
.salaryItemId(salarySobItemPO.getSalaryItemId())
|
||||
.salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY))
|
||||
.dataType(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getDataType).orElse(SalaryDataTypeEnum.NUMBER.getValue()))
|
||||
.build())
|
||||
.salaryItemId(salarySobItemPO.getSalaryItemId())
|
||||
.salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY))
|
||||
.dataType(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getDataType).orElse(SalaryDataTypeEnum.NUMBER.getValue()))
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
itemsByGroup.add(SalaryAcctImportFieldDTO.ImportFieldByGroupDTO.builder()
|
||||
.salarySobItemGroupId(groupPO.getId())
|
||||
.salarySobItemGroupName(groupPO.getName())
|
||||
.salaryItems(items)
|
||||
.sortedIndex(groupPO.getSortedIndex()).build() );
|
||||
.sortedIndex(groupPO.getSortedIndex()).build());
|
||||
}
|
||||
// 未分类
|
||||
List<SalarySobItemPO> noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList());
|
||||
if(CollectionUtils.isNotEmpty(noGroupItems)){
|
||||
if (CollectionUtils.isNotEmpty(noGroupItems)) {
|
||||
List<SalaryAcctImportFieldDTO.ImportFieldDTO> items = noGroupItems.stream()
|
||||
.map(salarySobItemPO ->SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
|
||||
.map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
|
||||
.salaryItemId(salarySobItemPO.getSalaryItemId())
|
||||
.salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY))
|
||||
.dataType(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getDataType).orElse(SalaryDataTypeEnum.NUMBER.getValue()))
|
||||
|
|
@ -510,7 +510,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// .collect(Collectors.toList());
|
||||
// 缓存勾选
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.RESULT_IMPORT_FIELD_SIGN;
|
||||
String cacheValue = (String)Util_DataCache.getObjVal(cacheKey);
|
||||
String cacheValue = (String) Util_DataCache.getObjVal(cacheKey);
|
||||
List<Long> checkItems = JsonUtil.parseList(cacheValue, Long.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, Long.class);
|
||||
// 转换成dto
|
||||
// return SalaryAcctImportFieldDTO.builder().formulaItems(formulaItems).sqlItems(sqlItems).inputItems(inputItems).checkItems(checkItems).build();
|
||||
|
|
@ -541,8 +541,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
SalaryAcctResultBO.sortItem(salarySobItemPOMap);
|
||||
// 根据账套分组封装薪资项目的值
|
||||
List<SalaryAcctImportFieldDTO.ImportFieldByGroupDTO> itemsByGroup = new ArrayList<>();
|
||||
for(SalarySobItemGroupPO groupPO : salarySobItemGroupPOS){
|
||||
List<SalarySobItemPO> groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList());
|
||||
for (SalarySobItemGroupPO groupPO : salarySobItemGroupPOS) {
|
||||
List<SalarySobItemPO> groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(), Collections.emptyList());
|
||||
List<SalaryAcctImportFieldDTO.ImportFieldDTO> items = groupItems.stream()
|
||||
.map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
|
||||
.salaryItemId(salarySobItemPO.getSalaryItemId())
|
||||
|
|
@ -554,13 +554,13 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
.salarySobItemGroupId(groupPO.getId())
|
||||
.salarySobItemGroupName(groupPO.getName())
|
||||
.salaryItems(items)
|
||||
.sortedIndex(groupPO.getSortedIndex()).build() );
|
||||
.sortedIndex(groupPO.getSortedIndex()).build());
|
||||
}
|
||||
// 未分类
|
||||
List<SalarySobItemPO> noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList());
|
||||
if(CollectionUtils.isNotEmpty(noGroupItems)){
|
||||
if (CollectionUtils.isNotEmpty(noGroupItems)) {
|
||||
List<SalaryAcctImportFieldDTO.ImportFieldDTO> items = noGroupItems.stream()
|
||||
.map(salarySobItemPO ->SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
|
||||
.map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
|
||||
.salaryItemId(salarySobItemPO.getSalaryItemId())
|
||||
.salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY))
|
||||
.build())
|
||||
|
|
@ -574,7 +574,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
}
|
||||
// 缓存勾选
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.RESULT_EXPORT_FIELD_SIGN;
|
||||
String cacheValue = (String)Util_DataCache.getObjVal(cacheKey);
|
||||
String cacheValue = (String) Util_DataCache.getObjVal(cacheKey);
|
||||
List<Long> checkItems = JsonUtil.parseList(cacheValue, Long.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, Long.class);
|
||||
// 转换成dto
|
||||
// return SalaryAcctImportFieldDTO.builder().formulaItems(formulaItems).sqlItems(sqlItems).inputItems(inputItems).checkItems(checkItems).build();
|
||||
|
|
@ -586,7 +586,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// ValidUtil.doValidator(param);
|
||||
// 从缓存中获取所选的薪资项目
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.RESULT_IMPORT_FIELD_SIGN;
|
||||
String cacheValue = (String)Util_DataCache.getObjVal(cacheKey);
|
||||
String cacheValue = (String) Util_DataCache.getObjVal(cacheKey);
|
||||
List<Long> checkItems = JsonUtil.parseList(cacheValue, Long.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, Long.class);
|
||||
// 必须选择导入模板所需的薪资项目
|
||||
if (CollectionUtils.isEmpty(checkItems)) {
|
||||
|
|
@ -691,7 +691,6 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook exportComparisonResult(SalaryComparisonResultQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
|
|
@ -827,7 +826,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// 查询薪资核算所用的薪资账套的员工信息字段
|
||||
List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
|
||||
List<SalarySobEmpFieldDTO> salarySobEmpFieldDTOS = new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS);
|
||||
salarySobEmpFieldDTOS.stream().forEach(empField -> finalWeaTableColumns.add(new WeaTableColumnGroup("150", SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()), SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()))));
|
||||
salarySobEmpFieldDTOS.stream().forEach(empField -> finalWeaTableColumns.add(new WeaTableColumnGroup("150", SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()), SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()))));
|
||||
for (WeaTableColumnGroup tableColumn : weaTableColumns) {
|
||||
WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) tableColumn;
|
||||
if (columnGroupItem.getChildren() != null) {
|
||||
|
|
@ -992,16 +991,16 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// List<String> headers = ExcelSupport.getSheetHeader(sheet, 0);
|
||||
List<String> headers;
|
||||
// if (StringUtils.equals("importSalaryAcctResult", importType)) {
|
||||
headers = ExcelSupport.getSheetHeader(sheet, 1);
|
||||
headers = ExcelSupport.getSheetHeader(sheet, 1);
|
||||
// } else {
|
||||
// headers = ExcelSupport.getSheetHeader(sheet, 0);
|
||||
// }
|
||||
|
||||
// 处理数值
|
||||
// 处理数值
|
||||
// List<Map<String, Object>> data = ExcelParseHelper.parse2Map(sheet, 1);
|
||||
List<Map<String, Object>> data;
|
||||
// if (StringUtils.equals("importSalaryAcctResult", importType)) {
|
||||
data = ExcelParseHelper.parse2Map(sheet, 2, 1);
|
||||
data = ExcelParseHelper.parse2Map(sheet, 2, 1);
|
||||
// } else {
|
||||
// data = ExcelParseHelper.parse2Map(sheet, 1);
|
||||
// }
|
||||
|
|
@ -1045,7 +1044,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
//salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"), i, i, j, j);
|
||||
} else {
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode, null);
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
@ -1248,7 +1247,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
getSalaryComparisonResultService(user).deleteBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordId));
|
||||
if (CollectionUtils.isNotEmpty(excelAcctResults)) {
|
||||
excelAcctResults.stream().forEach(result -> {
|
||||
if(StringUtils.isEmpty(result.getResultValue())){
|
||||
if (StringUtils.isEmpty(result.getResultValue())) {
|
||||
result.setResultValue(" ");
|
||||
}
|
||||
});
|
||||
|
|
@ -1282,7 +1281,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
}
|
||||
}
|
||||
SalarySysConfPO autoLock = getSalarySysConfService(user).getOneByCode(SalarySysConstant.EDIT_IMPORT_AUTO_LOCK);
|
||||
if(autoLock != null && StringUtils.equals(autoLock.getConfValue(),"1")){
|
||||
if (autoLock != null && StringUtils.equals(autoLock.getConfValue(), "1")) {
|
||||
// 导入的列都自动锁定
|
||||
SalaryAcctResultUpdateLockStatusParam updateLockStatusParam = SalaryAcctResultUpdateLockStatusParam.builder()
|
||||
.salaryItemIds(excelSalaryItemIds)
|
||||
|
|
@ -1305,7 +1304,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
}
|
||||
|
||||
/**
|
||||
* 存储薪资核算结果数据来源日志
|
||||
* 存储薪资核算结果数据来源日志
|
||||
*
|
||||
* @param salaryAcctResults
|
||||
*/
|
||||
private void handleSalaryAcctResultLog(List<SalaryAcctResultPO> salaryAcctResults) {
|
||||
|
|
@ -1315,14 +1315,14 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
List<SalaryAcctResultPO> salaryAcctResultList = getSalaryAcctResultService(user).listByAcctEmployeeIdsAndSalaryItemIds(salaryAcctEmpIds, salaryItemIds);
|
||||
Long uid = Long.valueOf(user.getUID());
|
||||
List<SalaryAcctResultLogPO> needInsertList = SalaryAcctResultLogBO.buildSalaryAcctResultLog(salaryAcctResultList, uid, SalaryAcctResultDataSourceEnum.IMPORT);
|
||||
if(CollectionUtils.isNotEmpty(needInsertList)){
|
||||
if (CollectionUtils.isNotEmpty(needInsertList)) {
|
||||
getSalaryAcctResultLogService(user).batchInsert(needInsertList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @return void
|
||||
* @description
|
||||
* @author Harryxzy
|
||||
* @date 2022/12/26 22:36
|
||||
*/
|
||||
|
|
@ -1330,7 +1330,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
Map<String, List<SalaryAcctResultPO>> deleteMap = SalaryEntityUtil.group2Map(deleteResults, po -> po.getSalaryAcctEmpId() + "-" + po.getSalaryItemId());
|
||||
salaryAcctResults.stream().forEach(result -> {
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = deleteMap.get(result.getSalaryAcctEmpId() + "-" + result.getSalaryItemId());
|
||||
if(salaryAcctResultPOS != null && salaryAcctResultPOS.size() > 0 ){
|
||||
if (salaryAcctResultPOS != null && salaryAcctResultPOS.size() > 0) {
|
||||
result.setOriginResultValue(salaryAcctResultPOS.get(0).getOriginResultValue());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -209,15 +209,13 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid) {
|
||||
public List<DataCollectionEmployee> matchImportEmployee(String confValue, List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid) {
|
||||
if (uid != null) {
|
||||
return employeeList.stream()
|
||||
.filter(e -> Objects.equals(e.getEmployeeId(), uid))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
String confValue = empValidType();
|
||||
List<DataCollectionEmployee> employees = new ArrayList<>();
|
||||
//“0”代表姓名+部门+手机号的匹配原则,“1”代表工号为唯一匹配原则
|
||||
if ("0".equals(confValue)) {
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
|
|||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user)
|
||||
.matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService(user)
|
||||
.matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
|
|
|
|||
|
|
@ -769,7 +769,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> emps = getSalaryEmployeeService()
|
||||
.matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null);
|
||||
.matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null);
|
||||
if (CollectionUtils.isNotEmpty(emps)) {
|
||||
employeeSameIds = emps.stream()
|
||||
.map(DataCollectionEmployee::getEmployeeId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue