fix外部人员
This commit is contained in:
parent
aec6918c12
commit
89ecf0984d
|
|
@ -80,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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 岗位信息
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ 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.progress.ProgressDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
|
||||
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
|
||||
import com.engine.salary.entity.siaccount.dto.SIAccountUtilDTO;
|
||||
import com.engine.salary.entity.siaccount.param.*;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
|||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
|
||||
import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper;
|
||||
import com.engine.salary.report.common.constant.SalaryConstant;
|
||||
import com.engine.salary.report.entity.bo.SalaryStatisticsEmployeeBO;
|
||||
|
|
@ -138,7 +139,7 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
// .collect(Collectors.toSet());
|
||||
// }
|
||||
if (CollectionUtils.isNotEmpty(innerEmployeeIds)) {
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL);
|
||||
Set<Long> finalInnerEmployeeIds = innerEmployeeIds;
|
||||
innerEmployeeIds = salaryEmployees.stream()
|
||||
.filter(e -> finalInnerEmployeeIds.contains(e.getEmployeeId()) && (e.getUsername().contains(queryParam.getKeyword()) || (StringUtils.isNotEmpty(e.getWorkcode()) && e.getWorkcode().contains(queryParam.getKeyword()))))
|
||||
|
|
|
|||
|
|
@ -243,5 +243,11 @@ public interface TaxAgentService {
|
|||
Boolean adminChangeCheck(TaxAgentAdminChangeCheckParam checkParam);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取个税扣缴义务人下的人员范围
|
||||
*
|
||||
* @param taxAgentId
|
||||
* @return
|
||||
*/
|
||||
Collection<Long> listEmployeeIdsInTaxAgent(Long taxAgentId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -670,8 +670,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
List<SalaryAcctEmployeePO> accountedEmployeeData =
|
||||
getAccountedEmployeeData(DateUtil.format(yearMonth, "yyyy-MM"));
|
||||
for (TaxAgentPO taxAgent : taxAgents) {
|
||||
Collection<Long> employeeIds = getTaxAgentService(user)
|
||||
.listEmployeeIdsInTaxAgent(taxAgent.getId());
|
||||
List<SpecialAddDeductionPO> employeePOs = getSpecialAddDeductionService(user)
|
||||
.getSpecialAddDeductionPOByEmployee(null, taxAgent.getId());
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.engine.salary.entity.salaryarchive.param.SalaryArchiveQueryParam;
|
|||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentRangeSaveParam;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
|
|
@ -23,6 +24,7 @@ import com.engine.salary.enums.salaryarchive.SalaryArchiveListTypeEnum;
|
|||
import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -620,7 +622,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
map = data.get(i);
|
||||
map.put("index", i + 2);
|
||||
// 3.校验行内容
|
||||
boolean isError = SalaryArchiveExcelBO.singleRowCheck(allTodoSalaryArchives, map, headers, effectiveTimeIndex, excelComments, errorCount, importHandleParam, confValue);
|
||||
boolean isError = SalaryArchiveExcelBO.singleRowCheck(allTodoSalaryArchives, map, headers, effectiveTimeIndex, excelComments, errorCount, importHandleParam);
|
||||
if (isError) {
|
||||
errorCount += 1;
|
||||
// 添加错误数据
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ 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.enums.datacollection.UseEmployeeTypeEnum;
|
||||
import com.engine.salary.mapper.datacollection.EmployMapper;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.service.ExtEmpService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
|
|
@ -21,6 +22,7 @@ import com.engine.salary.service.SalarySobExtRangeService;
|
|||
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;
|
||||
|
|
@ -59,6 +61,11 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
return ServiceUtil.getService(ExtEmpServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalarySobExtRangeService getSalarySobExtRangeService(User user) {
|
||||
return ServiceUtil.getService(SalarySobExtRangeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
boolean openExtEmp = true;
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ 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.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
import com.engine.salary.entity.hrm.HrmStatus;
|
||||
|
|
@ -325,7 +326,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().listAll(UseEmployeeTypeEnum.ALL);
|
||||
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(saveParam.getTaxAgentId(), allRanges, salaryEmployees);
|
||||
|
||||
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
|
||||
|
|
@ -859,7 +860,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().listAll(UseEmployeeTypeEnum.ALL);
|
||||
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
|
||||
|
||||
/* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
|
|||
import com.engine.salary.mapper.salarysob.SalarySobMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -765,4 +766,12 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
return taxAgentEmployeeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Long> listEmployeeIdsInTaxAgent(Long taxAgentId) {
|
||||
List<TaxAgentEmpPO> taxAgentEmpPOS = getTaxAgentEmpService(user).listByTaxAgentIds(Collections.singletonList(taxAgentId),UseEmployeeTypeEnum.ALL);
|
||||
|
||||
return SalaryEntityUtil.properties(taxAgentEmpPOS, TaxAgentEmpPO::getEmployeeId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.engine.salary.web;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.SalarySobExtRangePO;
|
||||
import com.engine.salary.entity.salaryitem.dto.SalaryItemListDTO;
|
||||
import com.engine.salary.entity.salaryitem.dto.SalaryItemSobListDTO;
|
||||
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
|
||||
import com.engine.salary.entity.salarysob.dto.*;
|
||||
|
|
@ -184,6 +183,33 @@ public class SalarySobController {
|
|||
// return WeaResult.success(weaForm);
|
||||
// }
|
||||
|
||||
@POST
|
||||
@Path("/ext/save")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String saveSalarySobExtRange(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobRangeExtSaveParam saveParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalarySobRangeExtSaveParam, String>(user).run(getSalarySobRangeWrapper(user)::saveExtRange, saveParam);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/range/ext/list")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listPage4Ext(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobRangeQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalarySobRangeQueryParam, PageInfo<SalarySobExtRangePO>>(user).run(getSalarySobRangeWrapper(user)::listPage4Ext, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除薪资账套人员范围
|
||||
*/
|
||||
@POST
|
||||
@Path("/range/ext/delete")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteSalarySobExtRange(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Collection<Long>, String>(user).run(getSalarySobRangeWrapper(user)::deleteSalarySobExtRange, ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存薪资账套人员范围
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue