employebiz改成employeeservice
This commit is contained in:
parent
e21b53c2df
commit
82ee707f16
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员列表
|
||||
*
|
||||
|
|
@ -158,4 +168,15 @@ 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -120,8 +126,7 @@ public class SIArchivesBiz {
|
|||
public Map<String, Object> getBaseForm(WelfareTypeEnum welfareType, Long employeeId, Long operateId, User user, Long paymentOrganization) {
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
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 com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -40,7 +44,7 @@ public interface SalaryEmployeeService {
|
|||
* @param ids
|
||||
* @return 全量
|
||||
*/
|
||||
List<DataCollectionEmployee> listByIds(List<Long> ids);
|
||||
List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取人员信息
|
||||
|
|
@ -73,4 +77,17 @@ public interface SalaryEmployeeService {
|
|||
* @param uid 人员id
|
||||
*/
|
||||
List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
|
||||
|
||||
String empValidType();
|
||||
|
||||
List<DeptInfo> getDeptInfoList(List<Long> departmentIds);
|
||||
|
||||
List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds);
|
||||
|
||||
List<PositionInfo> listPositionInfo(List<Long> positionIds);
|
||||
|
||||
List<DataCollectionEmployee> listEmployee();
|
||||
|
||||
List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ 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 +211,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 +437,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 +449,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 +728,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(","));
|
||||
|
|
@ -885,8 +884,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
@Override
|
||||
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 +896,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("员工信息不存在");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,7 +395,6 @@ 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("员工信息不存在");
|
||||
}
|
||||
|
|
@ -583,7 +582,6 @@ 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();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -603,7 +601,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();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据(获取税款所属期下一个月的数据)
|
||||
YearMonth nextTaxYearMonth = SalaryDateUtil.String2YearMonth(taxYearMonthStr);
|
||||
|
|
@ -907,7 +905,6 @@ 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();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -919,7 +916,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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
// 生成获取考勤引用
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ 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,6 @@ 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 +490,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 +599,6 @@ 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 +606,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);
|
||||
//税款所属期
|
||||
|
|
|
|||
|
|
@ -171,8 +171,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return MapperProxyFactory.getProxy(FundSchemeMapper.class);
|
||||
}
|
||||
|
||||
private EmployBiz employeeBiz = new EmployBiz();
|
||||
|
||||
private TaxAgentBiz taxAgentBiz = new TaxAgentBiz();
|
||||
|
||||
private ICategoryMapper getICategoryMapper() {
|
||||
|
|
@ -1242,7 +1240,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
|
|
@ -1259,7 +1256,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();
|
||||
|
||||
// 失败的数量
|
||||
int failCount = 0;
|
||||
|
|
@ -1535,7 +1532,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());
|
||||
|
|
@ -1575,7 +1572,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());
|
||||
|
|
@ -1910,8 +1907,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
public Map<String, Object> importExcelInsuranceDetail(ExcelInsuranceImportParam importParam) {
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
|
@ -1924,7 +1919,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listEmployee();
|
||||
|
||||
// 失败的数量
|
||||
int failCount = 0;
|
||||
|
|
@ -2599,7 +2594,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
|
|
@ -2616,7 +2610,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 = getICategoryMapper().listAll();
|
||||
// 失败的数量
|
||||
|
|
|
|||
|
|
@ -124,8 +124,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
return ServiceUtil.getService(SIImportServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employeeBiz = new EmployBiz();
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
|
|
@ -635,7 +633,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 +1400,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;
|
||||
|
|
|
|||
|
|
@ -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、查询薪资档案的数据
|
||||
|
|
|
|||
|
|
@ -242,7 +242,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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
}
|
||||
|
||||
private SalaryArchiveBiz salaryArchiveMapper = new SalaryArchiveBiz();
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
|
||||
private SalaryArchiveTaxAgentBiz salaryArchiveTaxAgentMapper = new SalaryArchiveTaxAgentBiz();
|
||||
private SalaryArchiveDimissionBiz salaryArchiveDimissionMapper = new SalaryArchiveDimissionBiz();
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX;
|
|||
public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveService {
|
||||
|
||||
private SalaryArchiveBiz salaryArchiveMapper = new SalaryArchiveBiz();
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
|
||||
private SalaryArchiveTaxAgentBiz salaryArchiveTaxAgentMapper = new SalaryArchiveTaxAgentBiz();
|
||||
private SalaryArchiveDimissionBiz salaryArchiveDimissionMapper = new SalaryArchiveDimissionBiz();
|
||||
|
|
|
|||
|
|
@ -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())) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ 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;
|
||||
|
|
@ -93,7 +96,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 +113,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 +159,44 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
return employees;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员定位方式
|
||||
* “0”代表姓名+部门+手机号的匹配原则,“1”代表工号为唯一匹配原则
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String empValidType() {
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
return (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
}
|
||||
|
||||
@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() {
|
||||
List<DataCollectionEmployee> result = employBiz.listEmployee();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams) {
|
||||
List<DataCollectionEmployee> result = employBiz.listByParams(includeQueryParams);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
|
|||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
private <R> R applyMapper(Function<SalarySendRangeMapper, R> mapper) {
|
||||
try (SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession()) {
|
||||
|
|
@ -116,17 +115,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;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ import java.util.stream.Collectors;
|
|||
public class SalarySobRangeServiceImpl extends Service implements SalarySobRangeService {
|
||||
|
||||
private SalarySobRangeBiz salarySobRangeBiz = new SalarySobRangeBiz();
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
private OrganizationShowSetBiz orgBiz = new OrganizationShowSetBiz();
|
||||
|
||||
|
||||
|
|
@ -116,7 +115,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 +142,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 +293,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内容
|
||||
|
|
|
|||
|
|
@ -175,7 +175,6 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
|
||||
long currentEmployeeId = user.getUID();
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -202,7 +201,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);
|
||||
// 查询已有数据
|
||||
|
|
@ -402,7 +401,6 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
public XSSFWorkbook exportDetail(SpecialAddDeductionQueryParam param) {
|
||||
|
||||
SpecialAddDeductionBiz biz = new SpecialAddDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
Long id = param.getSpecialAddDeductionId();
|
||||
if (id == null) {
|
||||
|
|
@ -414,7 +412,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("员工信息不存在");
|
||||
}
|
||||
|
|
@ -519,13 +517,12 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
long currentEmployeeId = user.getUID();
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
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);
|
||||
// 查询已有数据
|
||||
|
|
|
|||
|
|
@ -98,8 +98,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)) {
|
||||
return Lists.newArrayList();
|
||||
|
|
@ -233,17 +231,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().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().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().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().listPositionInfo(positionIds);
|
||||
// 分页参数
|
||||
PageInfo<TaxAgentManageRangeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentManageRangeListDTO.class);
|
||||
// 查询人员状态
|
||||
|
|
@ -589,7 +587,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService().listEmployee();
|
||||
|
||||
// 错误excel内容
|
||||
List<Map> errorData = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
@ -70,7 +68,6 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
SalarySobUtil.handleEmployeeStatusHistory();
|
||||
// 处理工资单发放历史数据
|
||||
getSalarySendService(user).handleHistory();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
// 查询薪资核算记录(分页)
|
||||
PageInfo<SalaryAcctRecordPO> page = getSalaryAcctRecordService(user).listPageByParam(queryParam);
|
||||
PageInfo<SalaryAcctRecordListDTO> dtoPage = new PageInfo<SalaryAcctRecordListDTO>(SalaryAcctRecordListDTO.class);
|
||||
|
|
@ -84,7 +81,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);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return ServiceUtil.getService(SalaryArchiveItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employeeService = new EmployBiz();
|
||||
|
||||
|
||||
private TaxAgentService getTaxAgentService(User user) {
|
||||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
|
|
@ -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;
|
||||
|
|
@ -34,12 +37,14 @@ import java.util.stream.Collectors;
|
|||
**/
|
||||
public class TaxAgentSubAdminWrapper extends Service {
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService() {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private TaxAgentSubAdminService taxAgentSubAdminService;
|
||||
private TaxAgentManageRangeService taxAgentManageRangeService;
|
||||
// private HrmCommonEmployeeService hrmCommonEmployeeService;
|
||||
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
/**
|
||||
* 获取分管理员列表
|
||||
*
|
||||
|
|
@ -51,7 +56,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 +100,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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,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.component.WeaFormOption;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
|
|
@ -14,8 +13,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 +49,10 @@ public class TaxDeclarationWrapper extends Service {
|
|||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个税申报表列表
|
||||
*
|
||||
|
|
@ -56,7 +61,6 @@ public class TaxDeclarationWrapper extends Service {
|
|||
* @return
|
||||
*/
|
||||
public PageInfo listPage(TaxDeclarationListQueryParam queryParam) {
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
// 询个税申报表(分页)
|
||||
PageInfo<TaxDeclarationPO> page = getTaxDeclarationService(user).listPageByParam(queryParam);
|
||||
PageInfo<TaxDeclarationListDTO> dtoPage = new PageInfo<TaxDeclarationListDTO>(TaxDeclarationListDTO.class);
|
||||
|
|
@ -67,7 +71,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