全业务考评 hace 1 año
padre
commit
8093f7c67a

+ 26 - 18
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java

@@ -12,6 +12,7 @@ import com.ims.eval.entity.*;
 import com.ims.eval.dao.OrganizationEvaluationInfoMapper;
 import com.ims.eval.entity.dto.request.AddEvaluationInfoDTO;
 import com.ims.eval.entity.dto.response.IndicatorResDTO;
+import com.ims.eval.entity.dto.response.MyuserResDTO;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO;
 import com.ims.eval.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -484,16 +485,21 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 
 
 
-//		//获取用户信息 23031009
-//		boolean deptFlag = false;
-//		MyuserResDTO user = userService.getSysUser(request);
-//		if(null != user){
-//			String deptId = "23031009";
-//			if(deptId.equals(user.getDeptId())){
-//				deptFlag = true;
-//			}
-//
-//		}
+		//获取用户信息 23031009
+		boolean deptFlag = false;
+		try {
+			MyuserResDTO user = userService.getSysUser(request);
+			if(null != user){
+//				String deptId = "23031009";
+				Optional<DataDictionary> any = CacheContext.ddSuperKeyMap.get("BM0001").stream().filter(t -> t.getKeyName().equals(user.getDeptName())).findAny();
+				if(any.isPresent()){
+					deptFlag = 	"ZZRSB".equals(any.get().getDataKey()) ? true: false;
+				}
+
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
 
 		boolean titlemark = true;//标记生成标题
 		List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId,organizationShortName, indicatorId,binSection,binStage,"");
@@ -525,7 +531,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				}
 				title.put(childCodeEntry.getKey().split(",")[1]+"-对标", titleArray);
 			}
-			if(groupedChildCode.size()>1){
+			if(groupedChildCode.size()>1 || dictionaryList.get(0).getChildCode().endsWith("LRZE")){
 				Map zhdfMap = new LinkedHashMap();
 				List<Map> zhdfArray = new ArrayList<>();
 				zhdfMap.put("key", "得分");//名称
@@ -534,13 +540,15 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				zhdfArray.add(zhdfMap);
 				title.put("综合得分", zhdfArray);
 			}
-			Map deptstateMap = new LinkedHashMap();
-			List<Map> titlestateArray = new ArrayList<>();
-			deptstateMap.put("key", "填报状态");//名称
-			deptstateMap.put("code","state");//名称
-			deptstateMap.put("flag", "3");//下拉
-			titlestateArray.add(deptstateMap);
-			title.put("", titlestateArray);
+			if(deptFlag){
+				Map deptstateMap = new LinkedHashMap();
+				List<Map> titlestateArray = new ArrayList<>();
+				deptstateMap.put("key", "状态");//名称
+				deptstateMap.put("code","state");//名称
+				deptstateMap.put("flag", "3");//下拉
+				titlestateArray.add(deptstateMap);
+				title.put("填报状态", titlestateArray);
+			}
 
 			if ("PUBLIC".equals(indicator.getDeptId())) {