|
@@ -1,6 +1,7 @@
|
|
|
package com.ims.eval.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.ims.common.utils.Constant;
|
|
|
import com.ims.common.utils.StringUtils;
|
|
|
import com.ims.eval.config.CustomException;
|
|
|
import com.ims.eval.entity.DataDictionary;
|
|
@@ -9,6 +10,7 @@ import com.ims.eval.entity.ResponsibilityIndicatorInfo;
|
|
|
import com.ims.eval.dao.ResponsibilityIndicatorInfoMapper;
|
|
|
import com.ims.eval.entity.dto.request.IndicatorDictionaryDTO;
|
|
|
import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
|
|
|
+import com.ims.eval.entity.dto.response.MyuserResDTO;
|
|
|
import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
|
|
|
import com.ims.eval.service.IResponsibilityIndicatorInfoService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -41,17 +43,22 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
|
|
|
@Override
|
|
|
public Map<String ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept, HttpServletRequest request) {
|
|
|
|
|
|
- Myuser myuser = userService.getSysUser(request);
|
|
|
+ MyuserResDTO myuser = userService.getSysUser(request);
|
|
|
if(null == myuser){
|
|
|
throw new CustomException("暂无权限");
|
|
|
}
|
|
|
- if(null != myuser.getUnitOrg() && null != myuser.getUnitOrg().getParentIds()){
|
|
|
- String strparentIds = myuser.getUnitOrg().getParentIds();
|
|
|
- strparentIds = StringUtils.trimstart(strparentIds,",");
|
|
|
- strparentIds = StringUtils.trimend(strparentIds,",");
|
|
|
- List<String> parentIds = Arrays.asList(strparentIds.split(","));
|
|
|
- parentIds.size();
|
|
|
|
|
|
+ if (null != myuser.getUnitOrg() && null != myuser.getUnitOrg().getParentIds()) {
|
|
|
+ String type = myuser.getUnitOrg().getType();
|
|
|
+ if (Constant.THREE.contains(type) || Constant.FOUR.contains(type)) {
|
|
|
+ dept = myuser.getDeptName();
|
|
|
+ } else if (Constant.SUB_BRANCH.contains(type)) {
|
|
|
+ dept = "";
|
|
|
+ } else if (myuser.getLoginName().equals("admin")) {
|
|
|
+ dept = "";
|
|
|
+ } else {
|
|
|
+ throw new CustomException("暂无权限");
|
|
|
+ }
|
|
|
}
|
|
|
List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds,dept,"ZRMB");
|
|
|
list.stream().forEach(i->{
|