|
@@ -3,6 +3,7 @@ package com.ims.eval.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.entity.DataDictionary;
|
|
import com.ims.eval.entity.DataDictionary;
|
|
|
|
+import com.ims.eval.entity.Myuser;
|
|
import com.ims.eval.entity.ResponsibilityIndicatorInfo;
|
|
import com.ims.eval.entity.ResponsibilityIndicatorInfo;
|
|
import com.ims.eval.dao.ResponsibilityIndicatorInfoMapper;
|
|
import com.ims.eval.dao.ResponsibilityIndicatorInfoMapper;
|
|
import com.ims.eval.entity.dto.request.IndicatorDictionaryDTO;
|
|
import com.ims.eval.entity.dto.request.IndicatorDictionaryDTO;
|
|
@@ -10,9 +11,12 @@ import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
|
|
import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
|
|
import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
|
|
import com.ims.eval.service.IResponsibilityIndicatorInfoService;
|
|
import com.ims.eval.service.IResponsibilityIndicatorInfoService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.ims.eval.service.IUserService;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -30,11 +34,20 @@ import java.util.stream.Collectors;
|
|
public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<ResponsibilityIndicatorInfoMapper, ResponsibilityIndicatorInfo> implements IResponsibilityIndicatorInfoService {
|
|
public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<ResponsibilityIndicatorInfoMapper, ResponsibilityIndicatorInfo> implements IResponsibilityIndicatorInfoService {
|
|
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IUserService userService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Map<String ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept) {
|
|
|
|
- List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds,dept,"ZRMB");//默认获取指定的怎目标
|
|
|
|
|
|
+ public Map<String ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept, HttpServletRequest request) {
|
|
|
|
|
|
|
|
+ Myuser myuser = userService.getSysUser(request);
|
|
|
|
+ if(null == myuser){
|
|
|
|
+ throw new CustomException("暂无权限");
|
|
|
|
+ }
|
|
|
|
+ List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds,dept,"ZRMB");//默认获取指定的怎目标
|
|
|
|
+ list.stream().forEach(i->{
|
|
|
|
+ i.setUpdateMark(i.getDeptName().equals(myuser.getDeptName()));
|
|
|
|
+ });
|
|
Map<String ,List<ResponsibilityIndicatorInfoResDTO>> map = list.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getIsQuantified));
|
|
Map<String ,List<ResponsibilityIndicatorInfoResDTO>> map = list.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getIsQuantified));
|
|
map.put("quantifiedList", map.remove("是"));
|
|
map.put("quantifiedList", map.remove("是"));
|
|
map.put("nonQuantifiedList", map.remove("否"));
|
|
map.put("nonQuantifiedList", map.remove("否"));
|