|
|
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
@@ -12,24 +11,17 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.google.common.collect.Lists;
|
|
|
-import com.google.common.collect.Maps;
|
|
|
import com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.*;
|
|
|
import com.jeeplus.assess.workContract.mapper.WorkContractInfoMapper;
|
|
|
import com.jeeplus.common.TokenProvider;
|
|
|
import com.jeeplus.core.query.QueryWrapperGenerator;
|
|
|
import com.jeeplus.flowable.feign.IFlowableApi;
|
|
|
-import com.jeeplus.sys.domain.Office;
|
|
|
import com.jeeplus.sys.domain.User;
|
|
|
import com.jeeplus.sys.domain.WorkAttachmentInfo;
|
|
|
import com.jeeplus.sys.feign.*;
|
|
|
-//import com.jeeplus.sys.mapper.OfficeMapper;
|
|
|
import com.jeeplus.sys.service.dto.OfficeDTO;
|
|
|
import com.jeeplus.sys.service.dto.RoleDTO;
|
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
-//import com.jeeplus.sys.utils.DictUtils;
|
|
|
-//import com.jeeplus.sys.utils.UserUtils;
|
|
|
-//import com.jeeplus.pubmodules.serialNumTpl.service.SerialnumTplService;
|
|
|
-//import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
|
|
|
import com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo;
|
|
|
import com.jeeplus.assess.program.configuration.projectList.domain.ProgramReportNo;
|
|
|
import com.jeeplus.assess.program.configuration.projectList.mapper.ProgramReportNoMapper;
|
|
|
@@ -1053,13 +1045,15 @@ public class ReimbursementInfoService {
|
|
|
}else{
|
|
|
officeList = infoMapper.findOfficeListByCompanyId(userDTO.getCompanyDTO().getId());
|
|
|
}
|
|
|
- //单独处理苏州分公司添加程爱国的问题
|
|
|
+ //单独处理苏州分公司添加所需用户的问题
|
|
|
if("苏州分公司".equals(userDTO.getCompanyDTO().getName())){
|
|
|
isSz = true;
|
|
|
List<TreeUserDto> officeListByTenantId = infoMapper.findOfficeListByTenantId("10003");
|
|
|
List<TreeUserDto> tempOfficeList = officeListByTenantId.stream()
|
|
|
.filter(item -> "江苏兴光会计".equals(item.getName()) ||
|
|
|
- "兴光审计一部".equals(item.getName()))
|
|
|
+ "兴光审计一部".equals(item.getName()) ||
|
|
|
+ "兴光审计二部".equals(item.getName())
|
|
|
+ )
|
|
|
.collect(Collectors.toList());
|
|
|
officeList.addAll(tempOfficeList);
|
|
|
}
|
|
|
@@ -1199,17 +1193,14 @@ public class ReimbursementInfoService {
|
|
|
|
|
|
// 查询用户
|
|
|
List<TreeUserDto> userList = infoMapper.findUserList(name);
|
|
|
- //如果当前用户为苏州公司的,则单独查询程爱国信息添加至list
|
|
|
- if(isSz){
|
|
|
- UserDTO szNeedUser = SpringUtil.getBean(IUserApi.class).getByLoginNameNotTenantId("程爱国");
|
|
|
- TreeUserDto treeUserDto = new TreeUserDto();
|
|
|
- treeUserDto.setId(szNeedUser.getId());
|
|
|
- treeUserDto.setName(szNeedUser.getName());
|
|
|
- treeUserDto.setParentId(szNeedUser.getOfficeDTO().getId());
|
|
|
- treeUserDto.setOfficeName(szNeedUser.getOfficeDTO().getName());
|
|
|
- treeUserDto.setIsUser(true);
|
|
|
- userList.add(treeUserDto);
|
|
|
+ //如果当前用户为苏州公司的,则单独查询程爱国和李东信息添加至list
|
|
|
+ if (isSz) {
|
|
|
+ IUserApi userApi = SpringUtil.getBean(IUserApi.class);
|
|
|
+
|
|
|
+ addUserToTree(userApi, "程爱国", userList);
|
|
|
+ addUserToTree(userApi, "李东", userList);
|
|
|
}
|
|
|
+
|
|
|
//查询综合管理公司用户信息
|
|
|
List<TreeUserDto> userList1=infoMapper.findZhglgsUserList(name);
|
|
|
|
|
|
@@ -1255,6 +1246,22 @@ public class ReimbursementInfoService {
|
|
|
return newList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 将指定用户添加到树形列表
|
|
|
+ */
|
|
|
+ private void addUserToTree(IUserApi userApi, String loginName, List<TreeUserDto> userList) {
|
|
|
+ UserDTO user = userApi.getByLoginNameNotTenantId(loginName);
|
|
|
+ if (user != null && user.getOfficeDTO() != null) {
|
|
|
+ TreeUserDto treeUserDto = new TreeUserDto();
|
|
|
+ treeUserDto.setId(user.getId());
|
|
|
+ treeUserDto.setName(user.getName());
|
|
|
+ treeUserDto.setParentId(user.getOfficeDTO().getId());
|
|
|
+ treeUserDto.setOfficeName(user.getOfficeDTO().getName());
|
|
|
+ treeUserDto.setIsUser(true);
|
|
|
+ userList.add(treeUserDto);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//用户树形(用于查询会计公司有资质的员工)
|
|
|
public List<TreeUserDto> userTree2(String name) {
|
|
|
UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|