获取人员信息

This commit is contained in:
钱涛 2023-03-06 17:57:20 +08:00
parent 88de36f260
commit a423790a35
21 changed files with 176 additions and 136 deletions

View File

@ -17,6 +17,16 @@ import java.util.List;
public class EmployBiz extends BaseBean {
public List<DataCollectionEmployee> listAll(){
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
return mapper.listAll();
} finally {
sqlSession.close();
}
}
/**
* 查询人员列表
*
@ -70,24 +80,6 @@ public class EmployBiz extends BaseBean {
}
}
public List<DataCollectionEmployee> getAdminEmployeeByIds(List<Long> list) {
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
}
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
List<DataCollectionEmployee> employeeList = Lists.newArrayList();
List<List<Long>> partition = Lists.partition(list, 1000);
for (List<Long> longs : partition) {
employeeList.addAll(mapper.getAdminEmployeeByIds(longs));
}
return employeeList;
} finally {
sqlSession.close();
}
}
/**
* 岗位信息
@ -158,4 +150,14 @@ public class EmployBiz extends BaseBean {
sqlSession.close();
}
}
public List<DataCollectionEmployee> listAllForReport() {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
return mapper.listAllForReport();
} finally {
sqlSession.close();
}
}
}

View File

@ -9,7 +9,6 @@ import com.engine.salary.cache.SalaryCacheKey;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.AESEncryptUtil;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
import com.engine.salary.entity.siaccount.dto.SIAccountUtilDTO;
@ -22,7 +21,6 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.siaccount.*;
import com.engine.salary.enums.sicategory.*;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.siaccount.*;
import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
@ -117,6 +115,11 @@ public class SIAccountBiz extends Service {
return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
}
private SalaryEmployeeService getSalaryEmployeeService(User user) {
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
public PageInfo<InsuranceAccountBatchPO> listPage(InsuranceAccountBatchParam queryParam) {
List<InsuranceAccountBatchPO> list = getInsuranceAccountBatchMapper().list(queryParam);
PageInfo<InsuranceAccountBatchPO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
@ -1102,7 +1105,6 @@ public class SIAccountBiz extends Service {
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, param.getPaymentOrganization());
encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
DataCollectionEmployee simpleEmployee = MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeById(employeeId);
insuranceAccountBatchPO.setAccountant(currentUserName);
insuranceAccountBatchPO.setUpdateTime(new Date());
insuranceAccountBatchPO.setSocialPay(socialSum.toPlainString());

View File

@ -14,20 +14,34 @@ import java.util.List;
public interface EmployMapper {
/**
* 获取所有员工
* 只查人力资源表
* @return
*/
List<DataCollectionEmployee> listAll();
/**
* 获取所有员工关联部门
*
* @return
*/
List<DataCollectionEmployee> listEmployee();
/**
* 单表查询
* @param ids
* @return
*/
List<DataCollectionEmployee> getEmployeeByIds(@Param("collection") List<Long> ids);
/**
* 多表联查
* @param ids
* @return
*/
List<DataCollectionEmployee> getEmployeeByIdsAll(@Param("collection") List<Long> ids);
List<DataCollectionEmployee> getAdminEmployeeByIds(@Param("collection") List<Long> list);
List<DataCollectionEmployee> getEmployeeIdsByUserName(@Param("userName") String userName);
/**
* 根据薪资账套的人员范围转换而成的查询参数查询人员
@ -37,24 +51,40 @@ public interface EmployMapper {
*/
List<DataCollectionEmployee> listByParams(@Param("params") Collection<SalarySobRangeEmpQueryParam> queryParams);
/**
* 多表详细信息
* @param employeeId
* @return
*/
DataCollectionEmployee getEmployeeById(Long employeeId);
List<DataCollectionEmployee> listAllFields();
/**
* 报表专用
* @return
*/
List<DataCollectionEmployee> listAllForReport();
/**
* 所以岗位
* @param ids
* @return
*/
List<PositionInfo> listPositionInfo(@Param("collection") List<Long> ids);
/**
* 所以部门
* @param departmentIds
* @return
*/
List<DeptInfo> getDeptInfoList(@Param("departmentIds") List<Long> departmentIds);
/**
* 所以分部
* @param subDepartmentIds
* @return
*/
List<SubCompanyInfo> getSubCompanyInfoList(@Param("subDepartmentIds") List<Long> subDepartmentIds);
List<DataCollectionEmployee> listAll();
List<HrmInfoDTO> listHrmInfoByIdAndName(@Param("param") HrmQueryParam param);
}

View File

@ -81,19 +81,6 @@
</if>
</select>
<select id="getAdminEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.lastname as username
from hrmresourcemanager e
where e.status not in (7)
<if test="collection != null and collection.size()>0">
AND e.id IN
<foreach collection="collection" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="listByParams" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.lastname as username,
@ -208,15 +195,6 @@
</if>
</sql>
<select id="getEmployeeIdsByUserName" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select
a.LASTNAME as username
from hrmresource a
where
e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
<include refid="paramSql"/>
</select>
<select id="listAllFields" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,

View File

@ -1,6 +1,9 @@
package com.engine.salary.service;
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 java.util.List;
@ -40,7 +43,7 @@ public interface SalaryEmployeeService {
* @param ids
* @return 全量
*/
List<DataCollectionEmployee> listByIds(List<Long> ids);
List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> ids);
/**
* 获取人员信息
@ -73,4 +76,13 @@ public interface SalaryEmployeeService {
* @param uid 人员id
*/
List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
List<DeptInfo> getDeptInfoList(List<Long> departmentIds);
List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds);
List<PositionInfo> listPositionInfo(List<Long> positionIds);
List<DataCollectionEmployee> listEmployee();
}

View File

@ -9,7 +9,6 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.AddUpDeductionBiz;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.common.LocalDateRange;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpDeduction;
@ -195,7 +194,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
Map<String, Object> apidatas = new HashMap<String, Object>();
EmployBiz employBiz = new EmployBiz();
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
//检验参数
@ -211,7 +209,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
//个税扣缴义务人
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
@ -437,7 +435,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
public void createAddUpDeduction(AddUpDeductionRecordParam addUpDeductionRecordParam) {
long currentEmployeeId = user.getUID();
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
EmployBiz employBiz = new EmployBiz();
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
//税款所属期
@ -450,7 +447,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
//个税扣缴义务人
String taxAgentId = Util.null2String(addUpDeductionRecordParam.getTaxAgentId());
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
@ -729,7 +726,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
.forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List<AddUpDeduction>) l));
if (!errorMessages.isEmpty()) {
String userNames = getSalaryEmployeeService(user)
.listByIds(errorMessages)
.getEmployeeByIdsAll(errorMessages)
.stream()
.map(DataCollectionEmployee::getUsername)
.collect(Collectors.joining(","));
@ -886,7 +883,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
public XSSFWorkbook exportDetail(Long beLongEmployeeId, boolean isChief, AddUpDeductionQueryParam queryParam) {
queryParam.setEmployeeId(beLongEmployeeId);
EmployBiz employBiz = new EmployBiz();
AddUpDeductionBiz biz = new AddUpDeductionBiz();
Long id = queryParam.getAccumulatedSpecialAdditionalDeductionId();
@ -899,7 +895,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
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("员工信息不存在");
}

View File

@ -8,7 +8,6 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.AddUpSituationBiz;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpSituation;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@ -395,7 +394,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
@Override
public XSSFWorkbook exportDetail(AddUpSituationQueryParam queryParam) {
AddUpSituationBiz biz = new AddUpSituationBiz();
EmployBiz employBiz = new EmployBiz();
Long id = queryParam.getAccumulatedSituationId();
if (id == null) {
@ -407,7 +406,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
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("员工信息不存在");
}
@ -578,7 +577,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
Map<String, Object> apidatas = new HashMap<String, Object>();
EmployBiz employBiz = new EmployBiz();
AddUpSituationBiz biz = new AddUpSituationBiz();
//查询对于人员信息导入筛选的全局配置
@ -598,7 +597,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
// 获取所有个税扣缴义务人
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
@ -890,7 +889,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
@Override
public void createAddUpSituation(AddUpSituationParam addUpSituationParam) {
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
EmployBiz employBiz = new EmployBiz();
AddUpSituationBiz biz = new AddUpSituationBiz();
//查询对于人员信息导入筛选的全局配置
@ -902,7 +901,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
// 获取所有个税扣缴义务人
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 已经核算过的不可操作
// 获取已经核算的数据
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);

View File

@ -91,7 +91,6 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
private AttendQuoteDataBiz dataBiz = new AttendQuoteDataBiz();
private AttendQuoteDataValueBiz dataValueBiz = new AttendQuoteDataValueBiz();
private AttendQuoteFieldBiz fieldBiz = new AttendQuoteFieldBiz();
private EmployBiz employeeBiz = new EmployBiz();
private AttendQuoteFieldSettingService getFieldSettingService(User user) {
return ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user);
@ -596,7 +595,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
// 获取租户下所有的人员
List<DataCollectionEmployee> employees = employeeBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 获取已设置的可同步的考勤字段
List<AttendQuoteFieldPO> attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.IMPORT);
// 生成获取考勤引用

View File

@ -1,6 +1,7 @@
package com.engine.salary.service.impl;
import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.extemp.param.ExtEmpQueryParam;
import com.engine.salary.entity.extemp.param.ExtEmpSaveParam;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
@ -16,6 +17,7 @@ import org.springframework.beans.BeanUtils;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 累计专项
@ -79,4 +81,12 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService {
ids.forEach(getExternalEmployeeMapper()::delete);
}
}
public List<DataCollectionEmployee> cover(List<ExtEmpPO> extEmps) {
return extEmps.stream().map(emp -> {
DataCollectionEmployee employee = new DataCollectionEmployee();
BeanUtils.copyProperties(emp, employee);
return employee;
}).collect(Collectors.toList());
}
}

View File

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.biz.OtherDeductionBiz;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.EncryptUtil;
@ -177,7 +176,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
long currentEmployeeId = user.getUID();
Map<String, Object> apidatas = new HashMap<String, Object>();
EmployBiz employBiz = new EmployBiz();
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
//查询对于人员信息导入筛选的全局配置
@ -206,7 +205,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
int errorCount = 0;
//人员信息
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
//税款所属期
@ -480,7 +479,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
public XSSFWorkbook exportDetail(OtherDeductionQueryParam param) {
OtherDeductionBiz biz = new OtherDeductionBiz();
EmployBiz employBiz = new EmployBiz();
Long id = param.getOtherTaxExemptDeductionId();
if (id == null) {
@ -492,7 +491,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
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("员工信息不存在");
}
@ -601,7 +600,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
long currentEmployeeId = user.getUID();
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
EmployBiz employBiz = new EmployBiz();
//查询对于人员信息导入筛选的全局配置
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
@ -609,7 +608,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
//税款所属期
String declareMonthStr = Util.null2String(otherDeductionParam.getDeclareMonth());
//人员信息
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 获取所有个税扣缴义务人
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
//税款所属期

View File

@ -2,6 +2,7 @@ package com.engine.salary.service.impl;
import com.alibaba.fastjson.JSON;
import com.engine.core.impl.Service;
import com.engine.salary.biz.EmployBiz;
import com.engine.salary.biz.SIArchivesBiz;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
@ -14,11 +15,13 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.siaccount.BillStatusEnum;
import com.engine.salary.enums.siaccount.ResourceFromEnum;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
import com.engine.salary.service.RecordsBuildService;
import com.engine.salary.util.*;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEnumUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
@ -37,6 +40,7 @@ import java.util.stream.Collectors;
* @Version V1.0
**/
public class RecordsBuildServiceImpl extends Service implements RecordsBuildService {
EmployBiz employBiz = new EmployBiz();
@Override
public List<Map<String, Object>> buildCommonRecords(List<InsuranceAccountDetailPO> list, Long employeeId) {
@ -48,7 +52,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(MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeByIdsAll(longs));
employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
}
if (CollectionUtils.isEmpty(employeeByIds)) {
return result;
@ -195,7 +199,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(MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeByIdsAll(longs));
employeeByIds.addAll(employBiz.getEmployeeByIdsAll(longs));
}
if (CollectionUtils.isEmpty(employeeByIds)) {
return result;

View File

@ -51,56 +51,56 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
private SalaryAcctResultService getSalaryAcctResultService(User user) {
return (SalaryAcctResultService) ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
return ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
}
private SalaryEmployeeService getSalaryEmployeeService(User user) {
return (SalaryEmployeeService) ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private SalaryArchiveService getSalaryArchiveService(User user) {
return (SalaryArchiveService) ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
private AddUpSituationService getAddUpSituationService(User user) {
return (AddUpSituationService) ServiceUtil.getService(AddUpSituationServiceImpl.class, user);
return ServiceUtil.getService(AddUpSituationServiceImpl.class, user);
}
private AddUpDeductionService getAddUpDeductionService(User user) {
return (AddUpDeductionService) ServiceUtil.getService(AddUpDeductionServiceImpl.class, user);
return ServiceUtil.getService(AddUpDeductionServiceImpl.class, user);
}
private OtherDeductionService getOtherDeductionService(User user) {
return (OtherDeductionService) ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
return ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
}
private SIAccountService getSIAccountService(User user) {
return (SIAccountService) ServiceUtil.getService(SIAccountServiceImpl.class, user);
return ServiceUtil.getService(SIAccountServiceImpl.class, user);
}
private AttendQuoteDataService getAttendQuoteDataService(User user) {
return (AttendQuoteDataService) ServiceUtil.getService(AttendQuoteDataServiceImpl.class, user);
return ServiceUtil.getService(AttendQuoteDataServiceImpl.class, user);
}
private FormulaRunService getFormulaRunService(User user) {
return (FormulaRunService) ServiceUtil.getService(FormulaRunServiceImpl.class, user);
return ServiceUtil.getService(FormulaRunServiceImpl.class, user);
}
private SalaryAcctResultTempService getSalaryAcctResultTempService(User user) {
return (SalaryAcctResultTempService) ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user);
return ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user);
}
private SalaryAcctProgressService getSalaryAcctProgressService(User user) {
return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
return ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
}
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
return ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
}
@Override
@ -110,7 +110,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 数据库字段加密用
// 1查询人员信息
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
SalarySobCycleDTO salarySobCycleDTO = salaryAcctCalculateBO.getSalarySobCycleDTO();
Long taxAgentId = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId();
// 2查询薪资档案的数据
@ -138,8 +138,8 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 薪资回算时回算前的核算结果 (没有回算项)
Map<String, List<SalaryAcctResultPO>> collect = salaryAcctResultPOS.stream().collect(Collectors.groupingBy(k -> k.getEmployeeId() + "-" + k.getTaxAgentId() + "-" + k.getSalaryItemId()));
Map<String, String> salaryAcctResultPOMap = new HashMap<>();
for(Map.Entry<String,List<SalaryAcctResultPO>> et : collect.entrySet()){
salaryAcctResultPOMap.put(et.getKey(),et.getValue().get(0).getOriginResultValue());
for (Map.Entry<String, List<SalaryAcctResultPO>> et : collect.entrySet()) {
salaryAcctResultPOMap.put(et.getKey(), et.getValue().get(0).getOriginResultValue());
}
//核算锁定的值
Map<String, SalaryAcctResultPO> salaryAcctLockResultPOS = MapUtils.emptyIfNull(salaryAcctCalculateBO.getSalaryAcctLockResultPOS());
@ -181,12 +181,11 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
String resultValue;
SalaryItemPO salaryItemPO = salaryItemMap.get(salaryItemId);
ExpressFormula expressFormula;
if (salarySobBackItemMap.containsKey(salaryItemId)){
if (salarySobBackItemMap.containsKey(salaryItemId)) {
// 如果薪资账套的回算项目中重新定义了回算项目公式则使用薪资账套下的公式
SalarySobBackItemPO salarySobBackItemPO = salarySobBackItemMap.get(salaryItemId);
expressFormula = expressFormulaMap.get(salarySobBackItemPO.getFormulaId());
}
else if (salaryItemIdKeySalarySobItemPOMap.containsKey(salaryItemId)) {
} else if (salaryItemIdKeySalarySobItemPOMap.containsKey(salaryItemId)) {
// 如果薪资账套下重新定义了薪资项目的公式则使用薪资账套下的公式否则使用薪资项目本身的公式
SalarySobItemPO salarySobItemPO = salaryItemIdKeySalarySobItemPOMap.get(salaryItemId);
expressFormula = expressFormulaMap.get(salarySobItemPO.getFormulaId());
@ -229,8 +228,8 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
.setSalarySobId(salaryAcctEmployeePO.getSalarySobId())
.setSalaryItemId(salaryItemPO.getId())
.setResultValue(resultValue)
.setOriginResultValue(salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId()+"-"+salaryAcctEmployeePO.getTaxAgentId()+"-"+salaryItemId) == null
? StringUtils.EMPTY : salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId()+"-"+salaryAcctEmployeePO.getTaxAgentId()+"-"+salaryItemId))
.setOriginResultValue(salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId() + "-" + salaryAcctEmployeePO.getTaxAgentId() + "-" + salaryItemId) == null
? StringUtils.EMPTY : salaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId() + "-" + salaryAcctEmployeePO.getTaxAgentId() + "-" + salaryItemId))
.setCalculateKey(salaryAcctCalculateBO.getCalculateKey())
.setCreator((long) user.getUID())
.setCreateTime(now)

View File

@ -239,7 +239,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
for (List<SalaryAcctEmployeePO> tempList : partition) {
// 人员
List<Long> employeeIds = tempList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 个税扣缴义务人
List<Long> taxAgentIds = tempList.stream().map(SalaryAcctEmployeePO::getTaxAgentId).distinct().collect(Collectors.toList());
List<TaxAgentPO> taxAgents = getTaxAgentService(user).listByIds(taxAgentIds);

View File

@ -361,7 +361,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
List<SalaryAcctResultPO> salaryAcctResultPOS = listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
// 查询人员信息
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询个税扣缴义务人
Set<Long> taxAgentIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getTaxAgentId);
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);

View File

@ -195,7 +195,7 @@ public class SalaryComparisonResultServiceImpl extends Service implements Salary
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
// 查询人员信息
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 判断是否存在合并计税
Set<Long> salaryAcctEmployeeIds4ConsolidatedTax;
if (StringUtils.isEmpty(queryParam.getConsolidatedTaxation())) {

View File

@ -5,17 +5,18 @@ 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;
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.bo.SalarySobRangeBO;
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.SalarySobRangeService;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.engine.salary.util.SalaryEntityUtil;
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;
@ -41,10 +42,6 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
return ServiceUtil.getService(SalarySobRangeServiceImpl.class, user);
}
private EmployMapper getEmployMapper() {
return MapperProxyFactory.getProxy(EmployMapper.class);
}
private SalarySysConfMapper getSalarySysConfMapper() {
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
}
@ -56,7 +53,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
@Override
public List<DataCollectionEmployee> listAllForReport() {
return getEmployMapper().listAllForReport();
return employBiz.listAllForReport();
}
@Override
@ -93,7 +90,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
}
@Override
public List<DataCollectionEmployee> listByIds(List<Long> ids) {
public List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> ids) {
return employBiz.getEmployeeByIdsAll(ids);
}
@ -110,7 +107,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
List<DataCollectionEmployee> employeeList = new ArrayList<>();
List<List<Long>> partition = Lists.partition(simpleEmployeeIds, 1000);
for (List<Long> longs : partition) {
employeeList.addAll(getEmployMapper().getEmployeeByIds(longs));
employeeList.addAll(employBiz.getEmployeeByIds(longs));
}
return employeeList;
@ -156,4 +153,24 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
return employees;
}
@Override
public List<DeptInfo> getDeptInfoList(List<Long> departmentIds) {
return employBiz.getDeptInfoList(departmentIds);
}
@Override
public List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds) {
return employBiz.getSubCompanyInfoList(subDepartmentIds);
}
@Override
public List<PositionInfo> listPositionInfo(List<Long> positionIds) {
return employBiz.listPositionInfo(positionIds);
}
@Override
public List<DataCollectionEmployee> listEmployee() {
return employBiz.listEmployee();
}
}

View File

@ -4,7 +4,6 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.cloudstore.dev.api.util.Util_DataCache;
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;
import com.engine.salary.entity.hrm.DeptInfo;
import com.engine.salary.entity.hrm.HrmStatus;
@ -21,7 +20,6 @@ import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
import com.engine.salary.enums.salarysob.TargetTypeEnum;
import com.engine.salary.enums.taxagent.TaxAgentRangeTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.mapper.taxagent.TaxAgentManageRangeMapper;
import com.engine.salary.service.*;
@ -81,9 +79,9 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
private SalaryArchiveService getSalaryArchiveService(User user) {
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
private EmployMapper getEmployMapper() {
return MapperProxyFactory.getProxy(EmployMapper.class);
private SalaryEmployeeService getSalaryEmployeeService(User user) {
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private SalarySysConfMapper getSalarySysConfMapper() {
@ -98,7 +96,6 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
return ServiceUtil.getService(SIArchivesServiceImpl.class,user);
}
private EmployBiz employBiz = new EmployBiz();
private List<TaxAgentManageRangePO> listByTaxAgentIds(List<Long> taxAgentIds) {
if (CollectionUtils.isEmpty(taxAgentIds)) {
@ -233,17 +230,17 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// 查询人员信息
List<Long> employeeIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
// List<DataCollectionEmployee> employeeComInfos = comInfoCache.getCacheList(HrmEmployeeComInfo.class, employeeIds);
List<DataCollectionEmployee> employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询部门信息
List<Long> departmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.DEPT.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
List<DeptInfo> departmentComInfos = employBiz.getDeptInfoList(departmentIds);
List<DeptInfo> departmentComInfos = getSalaryEmployeeService(user).getDeptInfoList(departmentIds);
// 查询分部信息
List<Long> subDepartmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
List<SubCompanyInfo> subDepartmentComInfos = employBiz.getSubCompanyInfoList(subDepartmentIds);
List<SubCompanyInfo> subDepartmentComInfos = getSalaryEmployeeService(user).getSubCompanyInfoList(subDepartmentIds);
// 查询岗位信息
List<Long> positionIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
List<PositionInfo> positionComInfos = employBiz.listPositionInfo(positionIds);
List<PositionInfo> positionComInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds);
// 分页参数
PageInfo<TaxAgentManageRangeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentManageRangeListDTO.class);
// 查询人员状态
@ -316,7 +313,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// 去重
allRanges = allRanges.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getTaxAgentId() + "." + f.getRangeType() + "." + f.getTargetType() + "." + f.getTargetId() + "." + f.getEmployeeStatus() + "." + f.getIncludeType()))), ArrayList::new));
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAll();
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(saveParam.getTaxAgentId(), allRanges, salaryEmployees);
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
@ -401,7 +398,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
List<TaxAgentManageRangePO> allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList());
Long taxAgentId = taxAgentIds.get(0);
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAll();
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
List<DataCollectionEmployee> allSubAdminSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allSubAdminRanges, salaryEmployees);
@ -442,7 +439,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
}
taxAgentIds = allManageRanges.stream().map(TaxAgentManageRangePO::getTaxAgentId).distinct().collect(Collectors.toList());
// 获取所有人员
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAll();
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
List<TaxAgentEmpSaveParam> taxAgentEmpSaveParamList = Lists.newArrayList();
List<TaxAgentSubAdminEmpSaveParam> subAdminEmpSaveParamList = Lists.newArrayList();
@ -585,7 +582,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
int errorCount = 0;
//人员信息
List<DataCollectionEmployee> employees = employBiz.listEmployee();
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
// 错误excel内容
List<Map> errorData = new ArrayList<>();
@ -722,7 +719,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
// 去重
allRanges = allRanges.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getTaxAgentId() + "." + f.getRangeType() + "." + f.getTargetType() + "." + f.getTargetId() + "." + f.getEmployeeStatus() + "." + f.getIncludeType()))), ArrayList::new));
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAll();
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */

View File

@ -27,7 +27,6 @@ import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.archive.SalaryArchiveMapper;
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
import com.engine.salary.mapper.datacollection.AddUpSituationMapper;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
import com.engine.salary.mapper.salarysob.SalarySobMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
@ -112,9 +111,6 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
return MapperProxyFactory.getProxy(TaxAgentMapper.class);
}
private EmployMapper getEmployMapper() {
return MapperProxyFactory.getProxy(EmployMapper.class);
}
// private PaymentAgencyMapper paymentAgencyMapper;

View File

@ -110,7 +110,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
// 查询个税申报表明细
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(queryParam.getTaxDeclarationId(), employeeIdPage);
// 查询人员
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIdPage);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIdPage);
// List<SimpleEmployee> simpleEmployees = hrmCommonEmployeeService.getEmployeeByIds(employeeIdPage.getRecords(), tenantKey);
// 转换成列表dto
TaxDeclarationBO.buildDetailListDTO(queryParam.getTaxDeclarationId(), dtoPage, taxDeclarationDetailPOS, simpleEmployees);
@ -181,7 +181,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
List<Long> employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
// 查询人员信息
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
// 转换成列表dto
return TaxDeclarationDetailBO.convert2ListDTO4Labor(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
}
@ -199,7 +199,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
List<Long> employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
// 查询人员信息
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
// 转换成列表dto
return TaxDeclarationDetailBO.convert2ListDTO4Annual(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
}

View File

@ -107,7 +107,7 @@ public class SalaryAcctEmployeeWrapper extends Service {
}
// 查询人员信息
List<Long> employeeIds = list.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
// 查询个税扣缴义务人
List<Long> taxAgentIds = list.stream().map(SalaryAcctEmployeePO::getTaxAgentId).collect(Collectors.toList());
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);

View File

@ -146,7 +146,7 @@ public class TaxAgentWrapper extends Service {
List<TaxAgentPO> list = page.getList();
List<Long> taxAgentIds = list.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
List<TaxAgentAdminPO> taxAgentAdmins = getTaxAgentAdminService(user).listByTaxAgentIds(taxAgentIds);
List<DataCollectionEmployee> adminList = getSalaryEmployeeService(user).listByIds(taxAgentAdmins.stream().map(TaxAgentAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
List<DataCollectionEmployee> adminList = getSalaryEmployeeService(user).getEmployeeByIdsAll(taxAgentAdmins.stream().map(TaxAgentAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
listPage.setList(TaxAgentBO.convertToTableListDTO(page.getList(), null, taxAgentAdmins, adminList, setLabel));
} else {
listPage.setList(TaxAgentBO.convertToTableListDTO(page.getList(), null, setLabel));