diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 5e4051d13..5183139f0 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -40,6 +40,8 @@ import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; +import com.engine.salary.service.SalaryEmployeeService; +import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryFormItemUtil; @@ -110,6 +112,10 @@ public class SIArchivesBiz { return ServiceUtil.getService(TaxAgentWrapper.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + /** * @param welfareType * @param employeeId @@ -121,7 +127,7 @@ public class SIArchivesBiz { Map data = new HashMap<>(16); SalaryAssert.notNull(employeeId, "员工id不可为空"); EmployBiz employBiz = new EmployBiz(); - List employeeByIds = employBiz.getEmployeeByIdsAll(Collections.singletonList(employeeId)); + List employeeByIds = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(employeeId)); SalaryAssert.notEmpty(employeeByIds, "员工信息不存在"); DataCollectionEmployee item = employeeByIds.get(0); diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java index 8fc5f9d4d..7cb496957 100644 --- a/src/com/engine/salary/service/SalaryEmployeeService.java +++ b/src/com/engine/salary/service/SalaryEmployeeService.java @@ -4,6 +4,7 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.hrm.DeptInfo; import com.engine.salary.entity.hrm.PositionInfo; import com.engine.salary.entity.hrm.SubCompanyInfo; +import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam; import java.util.List; @@ -85,4 +86,6 @@ public interface SalaryEmployeeService { List listEmployee(); + List listByParams(List includeQueryParams); + } diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java index 6dd5c4c2d..cf1a2abed 100644 --- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java @@ -1,6 +1,7 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; +import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.EmployBiz; import com.engine.salary.biz.SIArchivesBiz; @@ -18,6 +19,7 @@ import com.engine.salary.enums.siaccount.ResourceFromEnum; import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.RecordsBuildService; +import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEnumUtil; @@ -26,6 +28,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import weaver.hrm.User; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -42,6 +45,10 @@ import java.util.stream.Collectors; public class RecordsBuildServiceImpl extends Service implements RecordsBuildService { EmployBiz employBiz = new EmployBiz(); + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + @Override public List> buildCommonRecords(List list, Long employeeId) { List> result = new ArrayList<>(); @@ -52,7 +59,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ List employeeByIds = new ArrayList<>(); List> partition = Lists.partition(employeeIds, 1000); for (List longs : partition) { - employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs)); + employeeByIds.addAll(getSalaryEmployeeService(user).getEmployeeByIdsAll(longs)); } if (CollectionUtils.isEmpty(employeeByIds)) { return result; @@ -199,7 +206,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ List employeeByIds = new ArrayList<>(); List> partition = Lists.partition(employeeIds, 1000); for (List longs : partition) { - employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs)); + employeeByIds.addAll(getSalaryEmployeeService(user).getEmployeeByIdsAll(longs)); } if (CollectionUtils.isEmpty(employeeByIds)) { return result; diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 86dbc3a69..64765b7cd 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -1252,7 +1252,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // Map taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId); // 获取租户下所有的人员 - List salaryEmployees = employBiz.listEmployee(); + List salaryEmployees = getSalaryEmployeeService(user).listAll(); // 失败的数量 int failCount = 0; @@ -1528,7 +1528,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { for(InsuranceAccountDetailPO po : supplyDataList) { Map resultMap = new HashMap<>(); - employee = employeeBiz.getEmployeeById(po.getEmployeeId()); + employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId()); resultMap.put("username", employee.getUsername()); resultMap.put("departmentName", employee.getDepartmentName()); resultMap.put("mobile", employee.getMobile()); @@ -1568,7 +1568,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { for(InsuranceAccountDetailPO po : normalDataList) { Map resultMap = new HashMap<>(); - employee = employeeBiz.getEmployeeById(po.getEmployeeId()); + employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId()); resultMap.put("username", employee.getUsername()); resultMap.put("departmentName", employee.getDepartmentName()); resultMap.put("mobile", employee.getMobile()); @@ -1917,7 +1917,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } // 获取租户下所有的人员 - List salaryEmployees = employBiz.listEmployee(); + List salaryEmployees = getSalaryEmployeeService(user).listAll(); // 失败的数量 int failCount = 0; @@ -2609,7 +2609,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // Map taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId); // 获取租户下所有的人员 - List salaryEmployees = employBiz.listEmployee(); + List salaryEmployees = getSalaryEmployeeService(user).listEmployee(); List insuranceCategoryPOS = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll(); // 失败的数量 diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index fa7a46414..495d93dfb 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -635,7 +635,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree(); // 获取所有人员信息 - List employeeByIds = employeeBiz.listEmployee(); + List employeeByIds = getSalaryEmployeeService(user).listEmployee(); int total = 0; int index = 0; @@ -1402,7 +1402,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree(); // 获取所有人员信息 - List employeeByIds = employeeBiz.listEmployee(); + List employeeByIds = getSalaryEmployeeService(user).listEmployee(); int total = 0; int index = 0; diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java index ff64556f1..704003b35 100644 --- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java @@ -46,6 +46,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee return SqlProxyHandle.getProxy(SalarySysConfMapper.class); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + @Override public List listAll() { return employBiz.listEmployee(); @@ -66,7 +70,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee // 将薪资账套的人员范围转换成人员查询参数 List includeQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(includeSalarySobRangePOS); // 根据上一步的查询参数查询人员 - List includeSalaryEmployees = employBiz.listByParams(includeQueryParams); + List includeSalaryEmployees = getSalaryEmployeeService(user).listByParams(includeQueryParams); if (CollectionUtils.isEmpty(includeSalaryEmployees)) { return Collections.emptyList(); } @@ -78,7 +82,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee // 将薪资账套的人员范围转换成人员查询参数 List excludeQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(excludeSalarySobRangePOS); // 根据上一步的查询参数查询人员 - List excludeSalaryEmployees = employBiz.listByParams(excludeQueryParams); + List excludeSalaryEmployees = getSalaryEmployeeService(user).listByParams(excludeQueryParams); // 需要排除的人员范围 Set excludeEmployeeIds = SalaryEntityUtil.properties(excludeSalaryEmployees, DataCollectionEmployee::getEmployeeId); // 过滤人员 @@ -173,4 +177,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee public List listEmployee() { return employBiz.listEmployee(); } + + @Override + public List listByParams(List includeQueryParams) { + return employBiz.listByParams(includeQueryParams); + } } diff --git a/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java index bf15ff818..01ea17ddc 100644 --- a/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendRangeServiceImpl.java @@ -116,17 +116,17 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan .orElse(null); break; case DEPT: - targetName = employBiz.getDeptInfoList(Collections.singletonList(rangeObj.getTargetId())) + targetName = getSalaryEmployeeService().getDeptInfoList(Collections.singletonList(rangeObj.getTargetId())) .stream().findFirst() .map(DeptInfo::getName).orElse(null); break; case SUB_COMPANY: - targetName = employBiz.getSubCompanyInfoList(Collections.singletonList(rangeObj.getTargetId())) + targetName = getSalaryEmployeeService().getSubCompanyInfoList(Collections.singletonList(rangeObj.getTargetId())) .stream().findFirst() .map(SubCompanyInfo::getName).orElse(null); break; case POSITION: - targetName = employBiz.listPositionInfo(Collections.singletonList(rangeObj.getTargetId())) + targetName = getSalaryEmployeeService().listPositionInfo(Collections.singletonList(rangeObj.getTargetId())) .stream().findFirst() .map(PositionInfo::getName).orElse(null); break; diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index 9a6e12409..8d2a8b6cc 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -116,7 +116,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange .filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue())) .map(SalarySobRangePO::getTargetId) .collect(Collectors.toList()); - List empInfos = employBiz.getEmployeeByIds(employeeIds); + List empInfos = getSalaryEmployeeService(user).getEmployeeByIds(employeeIds); // 查询部门信息 @@ -143,7 +143,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange .filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue())) .map(SalarySobRangePO::getTargetId) .collect(Collectors.toList()); - List positionInfos = employBiz.listPositionInfo(positionIds); + List positionInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds); // 薪资账套的人员范围po转换成列表dto List salarySobRangeListDTOS = SalarySobRangeBO.convert2ListDTO(salarySobRangePOS, empInfos, deptInfos,subCompanyInfos, positionInfos); @@ -294,7 +294,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange int errorCount = 0; //人员信息 - List employees = employBiz.listEmployee(); + List employees = getSalaryEmployeeService(user).listEmployee(); // 获取所有个税扣缴义务人 Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); // 错误excel内容 diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index 18ea0cf0c..d8425298d 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -202,7 +202,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd int errorCount = 0; //人员信息 - List employees = employBiz.listEmployee(); + List employees = getSalaryEmployeeService(user).listEmployee(); // 获取所有个税扣缴义务人 Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); // 查询已有数据 @@ -414,7 +414,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd throw new SalaryRunTimeException(String.format("专项附加扣除不存在" + "[id:%s]", id)); } - List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId())); + List employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId())); if (CollectionUtils.isEmpty(employeeList)) { throw new SalaryRunTimeException("员工信息不存在"); } @@ -525,7 +525,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0"; //人员信息 - List employees = employBiz.listEmployee(); + List employees = getSalaryEmployeeService(user).listEmployee(); // 获取所有个税扣缴义务人 Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); // 查询已有数据 diff --git a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java index 66f83facf..de81db3e6 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java @@ -15,14 +15,8 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.exception.SalaryRunTimeException; -import com.engine.salary.service.SalaryAcctEmployeeService; -import com.engine.salary.service.SalaryAcctRecordService; -import com.engine.salary.service.SalarySendService; -import com.engine.salary.service.SalarySobService; -import com.engine.salary.service.impl.SalaryAcctEmployeeServiceImpl; -import com.engine.salary.service.impl.SalaryAcctRecordServiceImpl; -import com.engine.salary.service.impl.SalarySendServiceImpl; -import com.engine.salary.service.impl.SalarySobServiceImpl; +import com.engine.salary.service.*; +import com.engine.salary.service.impl.*; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; @@ -62,6 +56,10 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord return ServiceUtil.getService(SalarySendServiceImpl.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + // private ComInfoCache comInfoCache; public PageInfo listPage(SalaryAcctRecordQueryParam queryParam) { @@ -84,7 +82,7 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord List salarySobPOS = getSalarySobService(user).listByIds(salarySobIds); // 查询薪资核算记录的创建人员的人员信息 List employeeIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getCreator, Collectors.toList()); - List employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds); + List employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds); // 查询薪资核算人数的数量 Set salaryAcctRecordIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getId); List salaryAcctEmployeeCountDTOS = getSalaryAcctEmployeeService(user).countBySalaryAcctRecordId(salaryAcctRecordIds); diff --git a/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java b/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java index 300f0dda2..30c817900 100644 --- a/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java @@ -67,6 +67,10 @@ public class SalaryArchiveWrapper extends Service { return ServiceUtil.getService(SalaryArchiveExcelServiceImpl.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + /** * 薪资档案列表(分页) @@ -320,7 +324,7 @@ public class SalaryArchiveWrapper extends Service { throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(100463, "薪资档案不存在") + "[id:%s]", salaryArchiveId)); } - List employeeList = employeeService.getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId())); + List employeeList = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId())); if (CollectionUtils.isEmpty(employeeList)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100465, "薪资档案员工信息不存在")); } diff --git a/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java b/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java index b9025ead9..d829f0d6c 100644 --- a/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java +++ b/src/com/engine/salary/wrapper/TaxAgentSubAdminWrapper.java @@ -1,5 +1,6 @@ package com.engine.salary.wrapper; +import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.EmployBiz; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -9,8 +10,10 @@ import com.engine.salary.entity.taxagent.param.*; import com.engine.salary.entity.taxagent.po.TaxAgentSubAdminPO; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.TaxAgentManageRangeService; import com.engine.salary.service.TaxAgentSubAdminService; +import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -38,6 +41,10 @@ public class TaxAgentSubAdminWrapper extends Service { private TaxAgentManageRangeService taxAgentManageRangeService; // private HrmCommonEmployeeService hrmCommonEmployeeService; + private SalaryEmployeeService getSalaryEmployeeService() { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + private EmployBiz employBiz = new EmployBiz(); /** @@ -51,7 +58,7 @@ public class TaxAgentSubAdminWrapper extends Service { List list = taxAgentSubAdminService.listByTaxAgentIds(Collections.singletonList(queryParam.getTaxAgentId())); String range = SalaryI18nUtil.getI18nLabel(106290, "详情"); - List subAdminList = employBiz.getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList())); + List subAdminList = getSalaryEmployeeService().getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList())); List records = TaxAgentBO.convertToSubAdminListDTO(list, range, subAdminList); PageInfo listPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentSubAdminListDTO.class); @@ -95,7 +102,7 @@ public class TaxAgentSubAdminWrapper extends Service { taxAgentSubAdminBaseFormDTO.setDescription(taxAgentSubAdmin.getRemark()); TaxAgentEmployeeOptionDTO taxAgentEmployee = new TaxAgentEmployeeOptionDTO(); taxAgentEmployee.setId(taxAgentSubAdmin.getEmployeeId()); - DataCollectionEmployee employee = employBiz.getEmployeeById(taxAgentEmployee.getId()); + DataCollectionEmployee employee = getSalaryEmployeeService().getEmployeeById(taxAgentEmployee.getId()); taxAgentEmployee.setContent(employee == null ? "" : employee.getUsername()); taxAgentSubAdminBaseFormDTO.setSubAdminUser(Collections.singletonList(taxAgentEmployee)); diff --git a/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java b/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java index b3f4a23c5..6ef9c7d16 100644 --- a/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java +++ b/src/com/engine/salary/wrapper/TaxDeclarationWrapper.java @@ -14,8 +14,10 @@ import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryPara import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam; import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.TaxAgentService; import com.engine.salary.service.TaxDeclarationService; +import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; import com.engine.salary.service.impl.TaxAgentServiceImpl; import com.engine.salary.service.impl.TaxDeclarationServiceImpl; import com.engine.salary.util.SalaryDateUtil; @@ -48,6 +50,9 @@ public class TaxDeclarationWrapper extends Service { return ServiceUtil.getService(TaxAgentServiceImpl.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } /** * 个税申报表列表 * @@ -67,7 +72,7 @@ public class TaxDeclarationWrapper extends Service { if (CollectionUtils.isNotEmpty(list)) { // 查询人员 List employeeIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getCreator, Collectors.toList()); - List employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds); + List employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds); // 查询个税扣缴义务人 Set taxAgentIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getTaxAgentId); List taxAgentPOS = getTaxDeclarationService(user).countByTaxDeclarationId(taxAgentIds);