Merge branch 'fix/intSalaryArchiveFLOWOpenPermissions' into release/2.3.2.2212.01
This commit is contained in:
commit
fa6e41d62e
|
|
@ -199,6 +199,8 @@ public interface TaxAgentService {
|
|||
*/
|
||||
List<TaxAgentManageRangeEmployeeDTO> listTaxAgentAndEmployeeTree(Long employeeId);
|
||||
|
||||
List<TaxAgentManageRangeEmployeeDTO> listAllTaxAgentAndEmployeeTree();
|
||||
|
||||
List<TaxAgentManageRangeEmployeeDTO> listTaxAgentAndEmployeeTree();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -42,7 +42,10 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
|||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.SIImportService;
|
||||
import com.engine.salary.service.SISchemeService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
|
|
@ -68,7 +71,6 @@ import weaver.file.ImageFileManager;
|
|||
import weaver.hrm.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -1344,16 +1346,20 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
Map<Long, String> welfareMap = welfareMap();
|
||||
// 获取所有个税扣缴义务人的名称和id的map
|
||||
Map<String, Long> paymentNameIdMap;
|
||||
|
||||
//分权
|
||||
Boolean openDevolution = getTaxAgentService().isOpenDevolution();
|
||||
// Boolean openDevolution = getTaxAgentService().isOpenDevolution();
|
||||
// 流程处理,默认不开启分权
|
||||
Boolean openDevolution = false;
|
||||
if (openDevolution) {
|
||||
paymentNameIdMap = getTaxAgentService().listAllTaxAgentsAsAdmin((long) user.getUID()).stream().collect(Collectors.toMap(TaxAgentPO::getName, TaxAgentPO::getId));
|
||||
} else {
|
||||
|
||||
paymentNameIdMap = getTaxAgentService().listAll().stream().collect(Collectors.toMap(TaxAgentPO::getName, TaxAgentPO::getId));
|
||||
}
|
||||
|
||||
//获取所以个税扣缴义务人树型
|
||||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
|
||||
//获取所有个税扣缴义务人树型
|
||||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeTree = getTaxAgentService().listAllTaxAgentAndEmployeeTree();
|
||||
|
||||
// 获取所有人员信息
|
||||
List<DataCollectionEmployee> employeeByIds = employeeBiz.listEmployee();
|
||||
|
|
|
|||
|
|
@ -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,27 @@ 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));
|
||||
taxAgentManageRangeEmployeeList = taxAgentManageRangeEmployeeList.stream().distinct().collect(Collectors.toList());
|
||||
return taxAgentManageRangeEmployeeList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取分管理员的关联人员
|
||||
|
|
|
|||
Loading…
Reference in New Issue