定薪流程,放开个税扣缴义务人限制
This commit is contained in:
parent
0b2c01fb4c
commit
6fe28ec41c
|
|
@ -199,6 +199,8 @@ public interface TaxAgentService {
|
|||
*/
|
||||
List<TaxAgentManageRangeEmployeeDTO> listTaxAgentAndEmployeeTree(Long employeeId);
|
||||
|
||||
List<TaxAgentManageRangeEmployeeDTO> listAllTaxAgentAndEmployeeTree();
|
||||
|
||||
List<TaxAgentManageRangeEmployeeDTO> listTaxAgentAndEmployeeTree();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -554,6 +554,8 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
// 2.构建导入需要的数据
|
||||
SalaryArchiveImportHandleParam importHandleParam = buildImportHandleParam(listType, importType);
|
||||
|
||||
// 设置所有的个税扣缴义务人,由于定薪流程调用者不一定是个税扣缴义务人管理员,防止出现个税扣缴义务人不存在问题。
|
||||
importHandleParam.setTaxAgentList(getTaxAgentService(user).listAllTaxAgentAndEmployeeTree());
|
||||
|
||||
int total = 0;
|
||||
//excel数据
|
||||
|
|
|
|||
|
|
@ -636,6 +636,8 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<TaxAgentManageRangeEmployeeDTO> listTaxAgentAndEmployeeTree() {
|
||||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeList = Lists.newArrayList();
|
||||
|
|
@ -667,6 +669,26 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
return taxAgentManageRangeEmployeeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaxAgentManageRangeEmployeeDTO> listAllTaxAgentAndEmployeeTree() {
|
||||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeList = Lists.newArrayList();
|
||||
// 所有个税扣缴义务人
|
||||
List<TaxAgentPO> allTaxAgents = listAll();
|
||||
if (CollectionUtils.isEmpty(allTaxAgents)) {
|
||||
return taxAgentManageRangeEmployeeList;
|
||||
}
|
||||
|
||||
List<Long> taxAgentIds = allTaxAgents.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
List<TaxAgentEmployeePO> allEmployees = getTaxAgentMapper().listEmployee();
|
||||
|
||||
// 1.判断自己是否是管理员, 如果是管理员,就是能够操作所属个税扣缴义务人下的所有人的数据
|
||||
List<TaxAgentAdminPO> taxAgentAdminList = getTaxAgentAdminService(user).listByTaxAgentIdsAndEmployeeId(taxAgentIds, (long) user.getUID());
|
||||
// 是管理员的列表
|
||||
List<Long> adminTaxAgentIds = taxAgentAdminList.stream().map(TaxAgentAdminPO::getTaxAgentId).collect(Collectors.toList());
|
||||
taxAgentManageRangeEmployeeList.addAll(getTaxAgentEmp(allTaxAgents, adminTaxAgentIds, allEmployees));
|
||||
return taxAgentManageRangeEmployeeList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取分管理员的关联人员
|
||||
|
|
|
|||
Loading…
Reference in New Issue