配置排除账套配置

This commit is contained in:
钱涛 2025-02-24 18:33:32 +08:00
parent 1c0b58d95d
commit 2118cbce86
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1 @@
excludeSobIds=550

View File

@ -1,6 +1,7 @@
package com.engine.salary.report.service.impl;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@ -38,6 +39,7 @@ import com.wbi.util.Util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean;
import weaver.hrm.User;
import java.util.*;
@ -336,6 +338,11 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
List<Long> employeeIds = employeeList.stream().map(DataCollectionEmployee::getEmployeeId).collect(Collectors.toList());
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(acctEmp -> employeeIds.contains(acctEmp.getEmployeeId())).collect(Collectors.toList());
}
String excludeSobIdsProp = new BaseBean().getPropValue("hrmSalaryExcludeData", "excludeSobIds");
if(StrUtil.isNotBlank(excludeSobIdsProp)){
List<Long> excludeSobIds = Arrays.stream(excludeSobIdsProp.split(",")).map(Long::valueOf).collect(Collectors.toList());
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(emp -> !excludeSobIds.contains(emp.getSalarySobId())).collect(Collectors.toList());
}
if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
return new PageInfo<>();
}