|
|
@@ -1,5 +1,6 @@
|
|
|
package com.goafanti.customer.service.impl;
|
|
|
|
|
|
+import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
import com.goafanti.common.model.*;
|
|
|
import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
@@ -76,6 +77,11 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
|
|
|
@Override
|
|
|
public Object queryByUidAll(String id) {
|
|
|
+ //查询等级 0=自己 1=全部
|
|
|
+ int type=0;
|
|
|
+ if (TokenManager.hasRole(AFTConstants.SUPERADMIN)){
|
|
|
+ type=1;
|
|
|
+ }
|
|
|
UserArchivesDetails user = customerService.selectUserByUid(id);
|
|
|
User u = userMapper.queryById(id);
|
|
|
OrganizationIdentity ori = organizationIdentityMapper.selectOrgIdentityByUserId(id);
|
|
|
@@ -99,15 +105,33 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
user.setContactList(collect);
|
|
|
}
|
|
|
BeanUtils.copyProperties(userArchives, user);
|
|
|
- List<UserArchivesInterview> userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(id, TokenManager.getAdminId());
|
|
|
+ List<UserArchivesInterview> userArchivesInterviews;
|
|
|
+ if (type==0){
|
|
|
+ userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(id, TokenManager.getAdminId());
|
|
|
+ user.setInterviewList(userArchivesInterviews);
|
|
|
+ }else {
|
|
|
+ userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(id, TokenManager.getAdminId());
|
|
|
+ }
|
|
|
user.setInterviewList(userArchivesInterviews);
|
|
|
+
|
|
|
+
|
|
|
//获取首次面谈时间
|
|
|
- List<UserFirstInterview> firstList = userFirstInterviewMapper.selectByUidAid(id, TokenManager.getAdminId());
|
|
|
+ List<UserFirstInterview> firstList;
|
|
|
+ if (type == 0){
|
|
|
+ firstList = userFirstInterviewMapper.selectByUidAid(id, TokenManager.getAdminId());
|
|
|
+ }else {
|
|
|
+ firstList = userFirstInterviewMapper.selectByUidAid(id, null);
|
|
|
+ }
|
|
|
if (!firstList.isEmpty()){
|
|
|
UserFirstInterview userFirstInterview = firstList.get(0);
|
|
|
user.setFirstInterviewDate(userFirstInterview.getFirstTime());
|
|
|
}
|
|
|
- List<UserInterviewProjectBo> userInterviewProjects = userInterviewProjectMapper.selectByAid(TokenManager.getAdminId(), id);
|
|
|
+ List<UserInterviewProjectBo> userInterviewProjects ;
|
|
|
+ if (type==0){
|
|
|
+ userInterviewProjects =userInterviewProjectMapper.selectByAid(TokenManager.getAdminId(), id);
|
|
|
+ } else {
|
|
|
+ userInterviewProjects =userInterviewProjectMapper.selectByAid(null, id);
|
|
|
+ }
|
|
|
user.setProjectList(userInterviewProjects);
|
|
|
return user;
|
|
|
}
|