|
|
@@ -3,6 +3,7 @@ package com.goafanti.business.service.impl;
|
|
|
import com.goafanti.business.bo.InputRestrictProject;
|
|
|
import com.goafanti.business.bo.OutRestrictProject;
|
|
|
import com.goafanti.business.bo.RestrictProjectPageList;
|
|
|
+import com.goafanti.business.bo.UserRestrictProjectBo;
|
|
|
import com.goafanti.business.service.RestrictProjectService;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
@@ -159,6 +160,8 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
return fbb;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
private void pushPageList(List<RestrictProjectPageList> list) {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
now=now.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
@@ -195,4 +198,40 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
}
|
|
|
userTransferLogMapper.insertSelective(log);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object getRestrictProjectUser(String ids) {
|
|
|
+ List<UserRestrictProjectBo> list = new ArrayList<>();
|
|
|
+ String aid=TokenManager.getAdminId();
|
|
|
+ if (ids!=null&& !ids.isEmpty()){
|
|
|
+ String[] split = ids.split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ UserRestrictProjectBo bo = new UserRestrictProjectBo();
|
|
|
+ bo.setUid(s);
|
|
|
+ User user = userMapper.selectByPrimaryKey(s);
|
|
|
+ if (user.getShareType()==0||user.getShareType()==2){
|
|
|
+ //0私有 2签单 查询当前是否有签订限定项目
|
|
|
+ if (user.getAid().equals(aid)){
|
|
|
+ //是自己的
|
|
|
+ bo.setType(0);
|
|
|
+ }else{
|
|
|
+ //不是自己的
|
|
|
+ List<RestrictProject> restrictProjects = restrictProjectMapper.selectListByParam(new InputRestrictProject(s, aid));
|
|
|
+ if (!restrictProjects.isEmpty()){
|
|
|
+ // 有限定项目
|
|
|
+ bo.setType(1);
|
|
|
+ }else{
|
|
|
+ //没有限定
|
|
|
+ bo.setType(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if(user.getShareType()==1){
|
|
|
+ //公共客户
|
|
|
+ bo.setType(3);
|
|
|
+ }
|
|
|
+ list.add(bo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
}
|