diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java index 33898e40a..16afbb396 100644 --- a/src/com/engine/salary/service/SalaryEmployeeService.java +++ b/src/com/engine/salary/service/SalaryEmployeeService.java @@ -30,6 +30,7 @@ public interface SalaryEmployeeService { /** * 获取报表人员字段 + * * @return */ List 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 matchImportEmployee(List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid); + List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid); String empValidType(); @@ -97,29 +103,33 @@ public interface SalaryEmployeeService { /** * 根据离职日期获取离职信息 + * * @param formatDate */ Map getResignationMapByDate(String formatDate); /** * 扩展人员信息 + * * @param ids * @param param * @return */ List expandEmployeeInfo(List ids, EmployeeInfoExpandDTO param); - Map> expandEmployeeMap(List ids, EmployeeInfoExpandDTO param); + Map> expandEmployeeMap(List ids, EmployeeInfoExpandDTO param); /** * 保存扩展信息 + * * @param param */ void saveEmployeeExpandFieldSettings(EmployeeInfoExpandDTO param); /** * 获取扩展信息 + * * @param module * @return */ diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index bb0242cf4..3cb43f3f7 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -264,7 +264,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction String workcode = dto.getJobNum(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); if (StringUtils.isBlank(userName) && "0".equals(confValue)) { //姓名 不能为空 diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index e4965928c..a209bf946 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -668,7 +668,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation String workcode = dto.getJobNum(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); //当人员信息导入筛选的全局配置为"0"时,姓名才是必填项 if (StringUtils.isBlank(userName) && "0".equals(confValue)) { diff --git a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java index 8e9f4282a..7d06d693c 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java @@ -669,7 +669,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index dbe2e113b..4d0ace968 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -246,7 +246,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 10ccd0a3d..8f5a3970e 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -1737,7 +1737,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List 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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List 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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, name, departmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode, null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 19a670559..00a70a013 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -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()); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 766ebc9f2..b5471f9ad 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -289,10 +289,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc //判断是否按照自定义字段导出表头 List finalWeaTableColumns = new ArrayList<>(); - if (queryParam.getSalaryItemIds() != null ) { + if (queryParam.getSalaryItemIds() != null) { //获取人员基本信息字段(汇总) Collection> empFieldList = getSalarySobItemWrapper(user).empFieldList(); - List empFieldIdList= new ArrayList<>(); + List 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 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 columnList = SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO, ListUtils.emptyIfNull(salaryAcctRecordPO.getLockSalaryItemIds())); // 获取固定列头数 @@ -450,27 +450,27 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc SalaryAcctResultBO.sortItem(salarySobItemPOMap); // 根据账套分组封装薪资项目的值 List itemsByGroup = new ArrayList<>(); - for(SalarySobItemGroupPO groupPO : salarySobItemGroupPOS){ - List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList()); + for (SalarySobItemGroupPO groupPO : salarySobItemGroupPOS) { + List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(), Collections.emptyList()); List 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 noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList()); - if(CollectionUtils.isNotEmpty(noGroupItems)){ + if (CollectionUtils.isNotEmpty(noGroupItems)) { List 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 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 itemsByGroup = new ArrayList<>(); - for(SalarySobItemGroupPO groupPO : salarySobItemGroupPOS){ - List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList()); + for (SalarySobItemGroupPO groupPO : salarySobItemGroupPOS) { + List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(), Collections.emptyList()); List 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 noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList()); - if(CollectionUtils.isNotEmpty(noGroupItems)){ + if (CollectionUtils.isNotEmpty(noGroupItems)) { List 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 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 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 salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId()); List 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 headers = ExcelSupport.getSheetHeader(sheet, 0); List headers; // if (StringUtils.equals("importSalaryAcctResult", importType)) { - headers = ExcelSupport.getSheetHeader(sheet, 1); + headers = ExcelSupport.getSheetHeader(sheet, 1); // } else { // headers = ExcelSupport.getSheetHeader(sheet, 0); // } - // 处理数值 + // 处理数值 // List> data = ExcelParseHelper.parse2Map(sheet, 1); List> 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 employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List 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 salaryAcctResults) { @@ -1315,14 +1315,14 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc List salaryAcctResultList = getSalaryAcctResultService(user).listByAcctEmployeeIdsAndSalaryItemIds(salaryAcctEmpIds, salaryItemIds); Long uid = Long.valueOf(user.getUID()); List 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> deleteMap = SalaryEntityUtil.group2Map(deleteResults, po -> po.getSalaryAcctEmpId() + "-" + po.getSalaryItemId()); salaryAcctResults.stream().forEach(result -> { List 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()); } }); diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java index 3e4528309..d6dcfd5b2 100644 --- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java @@ -209,15 +209,13 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee } @Override - public List matchImportEmployee(List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid) { + public List matchImportEmployee(String confValue, List 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 employees = new ArrayList<>(); //“0”代表姓名+部门+手机号的匹配原则,“1”代表工号为唯一匹配原则 if ("0".equals(confValue)) { diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index 257ab6d72..c21551c9f 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -326,7 +326,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List 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() diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index 3ac80b609..3309c7090 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -239,7 +239,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List 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() diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index caf96a0f9..50c790547 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -769,7 +769,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List 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)