EmployeeBiz修改调用方式
This commit is contained in:
parent
a423790a35
commit
068f7e6535
|
|
@ -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<String, Object> data = new HashMap<>(16);
|
||||
SalaryAssert.notNull(employeeId, "员工id不可为空");
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
List<DataCollectionEmployee> employeeByIds = employBiz.getEmployeeByIdsAll(Collections.singletonList(employeeId));
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(employeeId));
|
||||
SalaryAssert.notEmpty(employeeByIds, "员工信息不存在");
|
||||
DataCollectionEmployee item = employeeByIds.get(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -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<DataCollectionEmployee> listEmployee();
|
||||
|
||||
List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Map<String, Object>> buildCommonRecords(List<InsuranceAccountDetailPO> list, Long employeeId) {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
|
@ -52,7 +59,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
List<DataCollectionEmployee> employeeByIds = new ArrayList<>();
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, 1000);
|
||||
for (List<Long> 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<DataCollectionEmployee> employeeByIds = new ArrayList<>();
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, 1000);
|
||||
for (List<Long> longs : partition) {
|
||||
employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
|
||||
employeeByIds.addAll(getSalaryEmployeeService(user).getEmployeeByIdsAll(longs));
|
||||
}
|
||||
if (CollectionUtils.isEmpty(employeeByIds)) {
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Map<String, Long> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
|
||||
|
||||
// 失败的数量
|
||||
int failCount = 0;
|
||||
|
|
@ -1528,7 +1528,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
for(InsuranceAccountDetailPO po : supplyDataList) {
|
||||
Map<String, Object> 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<String, Object> 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<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
|
||||
|
||||
// 失败的数量
|
||||
int failCount = 0;
|
||||
|
|
@ -2609,7 +2609,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Map<String, Long> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listEmployee();
|
||||
|
||||
List<ICategoryPO> insuranceCategoryPOS = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll();
|
||||
// 失败的数量
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
|
||||
|
||||
// 获取所有人员信息
|
||||
List<DataCollectionEmployee> employeeByIds = employeeBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).listEmployee();
|
||||
int total = 0;
|
||||
|
||||
int index = 0;
|
||||
|
|
@ -1402,7 +1402,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
|
||||
|
||||
// 获取所有人员信息
|
||||
List<DataCollectionEmployee> employeeByIds = employeeBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).listEmployee();
|
||||
int total = 0;
|
||||
|
||||
int index = 0;
|
||||
|
|
|
|||
|
|
@ -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<DataCollectionEmployee> listAll() {
|
||||
return employBiz.listEmployee();
|
||||
|
|
@ -66,7 +70,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
// 将薪资账套的人员范围转换成人员查询参数
|
||||
List<SalarySobRangeEmpQueryParam> includeQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(includeSalarySobRangePOS);
|
||||
// 根据上一步的查询参数查询人员
|
||||
List<DataCollectionEmployee> includeSalaryEmployees = employBiz.listByParams(includeQueryParams);
|
||||
List<DataCollectionEmployee> includeSalaryEmployees = getSalaryEmployeeService(user).listByParams(includeQueryParams);
|
||||
if (CollectionUtils.isEmpty(includeSalaryEmployees)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
@ -78,7 +82,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
// 将薪资账套的人员范围转换成人员查询参数
|
||||
List<SalarySobRangeEmpQueryParam> excludeQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(excludeSalarySobRangePOS);
|
||||
// 根据上一步的查询参数查询人员
|
||||
List<DataCollectionEmployee> excludeSalaryEmployees = employBiz.listByParams(excludeQueryParams);
|
||||
List<DataCollectionEmployee> excludeSalaryEmployees = getSalaryEmployeeService(user).listByParams(excludeQueryParams);
|
||||
// 需要排除的人员范围
|
||||
Set<Long> excludeEmployeeIds = SalaryEntityUtil.properties(excludeSalaryEmployees, DataCollectionEmployee::getEmployeeId);
|
||||
// 过滤人员
|
||||
|
|
@ -173,4 +177,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
public List<DataCollectionEmployee> listEmployee() {
|
||||
return employBiz.listEmployee();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams) {
|
||||
return employBiz.listByParams(includeQueryParams);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<DataCollectionEmployee> empInfos = employBiz.getEmployeeByIds(employeeIds);
|
||||
List<DataCollectionEmployee> 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<PositionInfo> positionInfos = employBiz.listPositionInfo(positionIds);
|
||||
List<PositionInfo> positionInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds);
|
||||
|
||||
// 薪资账套的人员范围po转换成列表dto
|
||||
List<SalarySobRangeListDTO> salarySobRangeListDTOS = SalarySobRangeBO.convert2ListDTO(salarySobRangePOS, empInfos, deptInfos,subCompanyInfos, positionInfos);
|
||||
|
|
@ -294,7 +294,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 错误excel内容
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> 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<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> 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<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 查询已有数据
|
||||
|
|
|
|||
|
|
@ -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<SalaryAcctRecordListDTO> listPage(SalaryAcctRecordQueryParam queryParam) {
|
||||
|
|
@ -84,7 +82,7 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByIds(salarySobIds);
|
||||
// 查询薪资核算记录的创建人员的人员信息
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getCreator, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
|
||||
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 查询薪资核算人数的数量
|
||||
Set<Long> salaryAcctRecordIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getId);
|
||||
List<SalaryAcctEmployeeCountDTO> salaryAcctEmployeeCountDTOS = getSalaryAcctEmployeeService(user).countBySalaryAcctRecordId(salaryAcctRecordIds);
|
||||
|
|
|
|||
|
|
@ -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<DataCollectionEmployee> employeeList = employeeService.getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100465, "薪资档案员工信息不存在"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<TaxAgentSubAdminPO> list = taxAgentSubAdminService.listByTaxAgentIds(Collections.singletonList(queryParam.getTaxAgentId()));
|
||||
String range = SalaryI18nUtil.getI18nLabel(106290, "详情");
|
||||
List<DataCollectionEmployee> subAdminList = employBiz.getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
List<DataCollectionEmployee> subAdminList = getSalaryEmployeeService().getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
|
||||
List<TaxAgentSubAdminListDTO> records = TaxAgentBO.convertToSubAdminListDTO(list, range, subAdminList);
|
||||
PageInfo<TaxAgentSubAdminListDTO> 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));
|
||||
|
|
|
|||
|
|
@ -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<Long> employeeIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getCreator, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
|
||||
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 查询个税扣缴义务人
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getTaxAgentId);
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxDeclarationService(user).countByTaxDeclarationId(taxAgentIds);
|
||||
|
|
|
|||
Loading…
Reference in New Issue