|
@@ -1367,6 +1367,8 @@ public class ReimbursementInfoService {
|
|
|
return newList;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 用户树形数据处理
|
|
|
* @param userList
|
|
@@ -2011,6 +2013,62 @@ public class ReimbursementInfoService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //单个用户查询(用于查询会计公司有资质的员工)
|
|
|
+ public String getUserBySignatureScribe(String name,String userId) {
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(userId);
|
|
|
+ List<TreeUserDto> list = new ArrayList<>();
|
|
|
+ List<TreeUserDto> officeList = Lists.newArrayList();
|
|
|
+ List<String> strings = SpringUtil.getBean(IUserApi.class).hasUser();
|
|
|
+
|
|
|
+ List<TreeUserDto> officeAllList = infoMapper.findOfficeListByIdList(strings);
|
|
|
+
|
|
|
+ // 查询部门
|
|
|
+ if(userDTO.isAdmin() || (null != userDTO.getTenantDTO() && "10002".equals(userDTO.getTenantDTO().getId()))|| (null != userDTO.getTenantDTO() && "10004".equals(userDTO.getTenantDTO().getId()))){
|
|
|
+ officeList = infoMapper.findOfficeListByNotTenantId("10000");
|
|
|
+ }else{
|
|
|
+ officeList = infoMapper.findOfficeListByCompanyId(userDTO.getCompanyDTO().getId());
|
|
|
+ }
|
|
|
+ List<TreeUserDto> filterList = new ArrayList<>();
|
|
|
+ filterList.addAll(officeList);
|
|
|
+ filterList.addAll(officeAllList);
|
|
|
+ //查询综合管理公司
|
|
|
+ UserDTO dtoByName = SpringUtil.getBean(IUserApi.class).getByLoginNameNoTen("潘中");
|
|
|
+ List<TreeUserDto> officeList1 = infoMapper.findOfficeListByCompanyId2(dtoByName.getCompanyDTO().getId());
|
|
|
+ filterList.addAll(officeList1);
|
|
|
+ //当前登录人所属部门是中审江苏分所下的管理咨询部时
|
|
|
+ List<TreeUserDto> zsUserList = null;
|
|
|
+ String officeId = "";
|
|
|
+ for (TreeUserDto dto : officeList) {
|
|
|
+ if (dto.getName().equals("管理咨询部")){
|
|
|
+ officeId = dto.getId();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (userDTO.isAdmin() || (StringUtils.isNotBlank(officeId) && userDTO.getOfficeDTO().getId().equals(officeId))){
|
|
|
+ List<TreeUserDto> zsOfficeList = infoMapper.findOfficeListByCompanyId2(officeId);
|
|
|
+ filterList.addAll(zsOfficeList);
|
|
|
+ //查询管理咨询部下的用户信息
|
|
|
+ zsUserList=infoMapper.findZhglgsUserList3(name,officeId);
|
|
|
+ }
|
|
|
+ //如果当前登录人是会计公司,则查询有资质的员工
|
|
|
+ List<TreeUserDto> certUserList = infoMapper.findCertUserList(name);
|
|
|
+ //查询综合管理公司用户信息
|
|
|
+ List<TreeUserDto> userList1=infoMapper.findZhglgsUserList2(name);
|
|
|
+ List<TreeUserDto> combinedList = new ArrayList<>();
|
|
|
+ combinedList.addAll(certUserList);
|
|
|
+ combinedList.addAll(userList1);
|
|
|
+ if (zsUserList != null){
|
|
|
+ combinedList.addAll(zsUserList);
|
|
|
+ }
|
|
|
+ Optional<TreeUserDto> user = combinedList.stream()
|
|
|
+ .filter(u -> name.equals(u.getName()))
|
|
|
+ .findFirst();
|
|
|
+ if(user.isPresent()){
|
|
|
+ return user.get().getId();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|