listByAcctEmployeeIdsAndSalaryItemIds的分片问题

This commit is contained in:
Harryxzy 2023-06-28 16:26:20 +08:00
parent 2bb5d18b90
commit 5d83326d23
3 changed files with 4 additions and 4 deletions

View File

@ -197,7 +197,7 @@ public interface SalaryAcctResultService {
* @author Harryxzy
* @date 2022/12/26 22:24
*/
List<SalaryAcctResultPO> listByAcctEmployeeIdsAndSalaryItemIds(Collection<Long> salaryAcctEmpIds, Collection<Long> salaryItemIds);
List<SalaryAcctResultPO> listByAcctEmployeeIdsAndSalaryItemIds(List<Long> salaryAcctEmpIds, Collection<Long> salaryItemIds);
List<Long> listAcctEmpIdByAcctEmpId(List<Long> salaryAcctEmployeeIds);

View File

@ -768,7 +768,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
// 包含错误提示信息的sheet页
List<Map<String, String>> errorExcelSheets = Lists.newArrayList();
// 解析excel
Set<Long> salaryAcctEmpIds = Sets.newHashSet();
List<Long> salaryAcctEmpIds = Lists.newArrayList();
// excel导入了哪些薪资项目
Set<Long> excelSalaryItemIds = Sets.newHashSet();
List<SalaryAcctResultPO> salaryAcctResults = Lists.newArrayList();
@ -1109,7 +1109,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
* @param salaryAcctResults
*/
private void handleSalaryAcctResultLog(List<SalaryAcctResultPO> salaryAcctResults) {
Set<Long> salaryAcctEmpIds = salaryAcctResults.stream().map(SalaryAcctResultPO::getSalaryAcctEmpId).collect(Collectors.toSet());
List<Long> salaryAcctEmpIds = salaryAcctResults.stream().map(SalaryAcctResultPO::getSalaryAcctEmpId).distinct().collect(Collectors.toList());
Set<Long> salaryItemIds = salaryAcctResults.stream().map(SalaryAcctResultPO::getSalaryItemId).collect(Collectors.toSet());
// 查询导入的薪资核算结果
List<SalaryAcctResultPO> salaryAcctResultList = getSalaryAcctResultService(user).listByAcctEmployeeIdsAndSalaryItemIds(salaryAcctEmpIds, salaryItemIds);

View File

@ -974,7 +974,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
}
@Override
public List<SalaryAcctResultPO> listByAcctEmployeeIdsAndSalaryItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds) {
public List<SalaryAcctResultPO> listByAcctEmployeeIdsAndSalaryItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds) {
if(CollectionUtils.isEmpty(salaryAcctEmployeeIds)){
return Collections.emptyList();
}