Merge branch 'release/2.15.2.2409.01' into feature/权限

This commit is contained in:
钱涛 2024-10-09 17:31:45 +08:00
commit 767d650ee9
3 changed files with 15 additions and 2 deletions

View File

@ -33,6 +33,8 @@ import com.engine.salary.report.service.SalaryStatisticsReportService;
import com.engine.salary.report.util.ReportTimeUtil;
import com.engine.salary.service.*;
import com.engine.salary.service.impl.*;
import com.engine.salary.sys.service.SalarySysConfService;
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
import com.engine.salary.util.*;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
@ -73,7 +75,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
public static final String LAST_INFO = "lastInfoList";
public static final String SAME_INFO = "sameInfoList";
private boolean isRealOrg = "1".equals(getSalaryCacheService(user).get(REPORT_ORGANIZATIN_TYPE));
private final boolean isRealOrg = "1".equals(getSalarySysConfService(user).getValueByCode(REPORT_ORGANIZATIN_TYPE));
private SalaryStatisticsReportMapper getSalaryStatisticsReportMapper() {
return MapperProxyFactory.getProxy(SalaryStatisticsReportMapper.class);
@ -115,6 +117,9 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
return ServiceUtil.getService(SalaryCacheServiceImpl.class, user);
}
private SalarySysConfService getSalarySysConfService(User user) {
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
}
// private ExtEmployeeService extEmployeeService;
//
// private HrmCommonEmployeeService hrmCommonEmployeeService;
@ -949,7 +954,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
} else if (StringUtils.equals(dimensionValue, departIdNameMap.get(departId))) {
List<SalaryAcctEmployeePO> departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(po.getDepartmentId(), departId)).collect(Collectors.toList());
if (isRealOrg) {
data.getList().stream().filter(po -> Objects.equals(empIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
departEmployeePOS = data.getList().stream().filter(po -> Objects.equals(empIdDepartIdMap.get(po.getEmployeeId()), departId)).collect(Collectors.toList());
}
data.setListByDimensionValue(departEmployeePOS);
}

View File

@ -40,6 +40,8 @@ public interface SalarySysConfService {
SalarySysConfPO getOneByCode(String code);
String getValueByCode(String code);
List<SalarySysConfPO> listSome(SalarySysConfPO build);
void save(SalarySysConfPO salarySysConfPO);

View File

@ -216,6 +216,12 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
return getSalarySysConfMapper().getOneByCode(code);
}
@Override
public String getValueByCode(String code) {
SalarySysConfPO confPO = getSalarySysConfMapper().getOneByCode(code);
return confPO == null ? "" : confPO.getConfValue();
}
@Override
public List<SalarySysConfPO> listSome(SalarySysConfPO po) {
return getSalarySysConfMapper().listSome(po);