|
@@ -961,6 +961,29 @@ public class ReimbursementInfoService {
|
|
|
UserDTO dtoByName = SpringUtil.getBean(IUserApi.class).getByLoginNameNoTen("潘中");
|
|
|
List<TreeUserDto> officeList1 = infoMapper.findOfficeListByCompanyId2(dtoByName.getCompanyDTO().getId());
|
|
|
filterList.addAll(officeList1);
|
|
|
+ //当前登录人是审计一部或审计二部员工
|
|
|
+ List<TreeUserDto> offices = Lists.newArrayList();
|
|
|
+ String zsOfficeName = "";
|
|
|
+ if (userDTO.getOfficeDTO().getName().contains("审计一部")){
|
|
|
+ //获取中审公司的张宁部门
|
|
|
+ offices = infoMapper.findOfficeListByTenantId("10004");
|
|
|
+ for (TreeUserDto office : offices) {
|
|
|
+ if (office.getName().equals("张宁部门") || office.getName().equals("中审江苏分所")){
|
|
|
+ filterList.add(office);
|
|
|
+ }
|
|
|
+ zsOfficeName = "张宁部门";
|
|
|
+ }
|
|
|
+ }else if (userDTO.getOfficeDTO().getName().contains("审计二部") ){
|
|
|
+ //获取中审公司的孙文宝部门
|
|
|
+ offices = infoMapper.findOfficeListByTenantId("10004");
|
|
|
+ for (TreeUserDto office : offices) {
|
|
|
+ if (office.getName().equals("孙文宝部门") || office.getName().equals("中审江苏分所")){
|
|
|
+ filterList.add(office);
|
|
|
+ }
|
|
|
+ zsOfficeName = "孙文宝部门";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
ArrayList<TreeUserDto> treeUsers = new ArrayList<>();
|
|
|
//如果当前登录人角色是多公司报销则查询全部公司
|
|
|
if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
|
|
@@ -1063,12 +1086,18 @@ public class ReimbursementInfoService {
|
|
|
List<TreeUserDto> userList = infoMapper.findUserList(name);
|
|
|
//查询综合管理公司用户信息
|
|
|
List<TreeUserDto> userList1=infoMapper.findZhglgsUserList(name);
|
|
|
+
|
|
|
/*if (CollectionUtils.isNotEmpty(userList)) {
|
|
|
list.addAll(userList);
|
|
|
}*/
|
|
|
ArrayList<TreeUserDto> treeUserDtos = new ArrayList<>();
|
|
|
treeUserDtos.addAll(userList);
|
|
|
treeUserDtos.addAll(userList1);
|
|
|
+ //查询中审公司用户信息
|
|
|
+ if (null != userDTO && null != userDTO.getOfficeDTO() && StringUtils.isNotBlank(userDTO.getOfficeDTO().getName()) && (userDTO.getOfficeDTO().getName().contains("审计一部") || userDTO.getOfficeDTO().getName().contains("审计二部"))){
|
|
|
+ List<TreeUserDto> zsUserList=infoMapper.findZsUserList(name,zsOfficeName);
|
|
|
+ treeUserDtos.addAll(zsUserList);
|
|
|
+ }
|
|
|
|
|
|
if(null != userDTO && null != userDTO.getOfficeDTO() && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId()) && ("1826176524081065985".equals(userDTO.getOfficeDTO().getId()) || "1826176609011527681".equals(userDTO.getOfficeDTO().getId()))) {
|
|
|
//查询会计公司用户信息
|
|
@@ -1088,6 +1117,11 @@ public class ReimbursementInfoService {
|
|
|
list.add(officeDto);
|
|
|
}
|
|
|
}
|
|
|
+ for (TreeUserDto officeDto : offices) {
|
|
|
+ if("0".equals(officeDto.getParentId())){
|
|
|
+ list.add(officeDto);
|
|
|
+ }
|
|
|
+ }
|
|
|
//去重
|
|
|
List<TreeUserDto> newList = list.stream().collect(Collectors.collectingAndThen(
|
|
|
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TreeUserDto::getId))), ArrayList::new)
|