|
@@ -208,27 +208,28 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
Map<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropList = list.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getBinSection));
|
|
|
|
|
|
for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropEntry : binSectionGropList.entrySet()){
|
|
|
+
|
|
|
if (binSectionGropEntry.getValue().size() > 0){
|
|
|
//按照指标分组
|
|
|
Map<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropList = binSectionGropEntry.getValue().stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getIndicatorId));
|
|
|
|
|
|
|
|
|
//计算前置属性(差值、利润贡献、单位千瓦利润)的最大最小值
|
|
|
- for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropListEntry : indicatorGropList.entrySet()){
|
|
|
+ for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropListEntry : indicatorGropList.entrySet()) {
|
|
|
|
|
|
- if (indicatorGropListEntry.getValue().size() > 0){
|
|
|
+ if (indicatorGropListEntry.getValue().size() > 0) {
|
|
|
//按照公司规则分组
|
|
|
Map<String, List<OrganizationEvaluationInfoResDTO>> ruleIdGropList = indicatorGropListEntry.getValue().stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getOrganizationEvaluationRuleId));
|
|
|
|
|
|
//遍历公司指标
|
|
|
- for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> ruleIdGropListEntry : ruleIdGropList.entrySet()){
|
|
|
+ for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> ruleIdGropListEntry : ruleIdGropList.entrySet()) {
|
|
|
if (ruleIdGropListEntry.getValue().size() > 0) {
|
|
|
|
|
|
List<OrganizationEvaluationInfoResDTO> indicator = ruleIdGropListEntry.getValue();
|
|
|
Map<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropList = indicator.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getChildCode));
|
|
|
|
|
|
double totalScore = 0.00;
|
|
|
- for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropListEntry : childCodeGropList.entrySet()){
|
|
|
+ for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropListEntry : childCodeGropList.entrySet()) {
|
|
|
for (OrganizationEvaluationInfoResDTO dto : childCodeGropListEntry.getValue()) {
|
|
|
|
|
|
if ((!dto.getOptionCode().equals("CZ") && !dto.getOptionCode().equals("LRGXL") && !dto.getOptionCode().equals("DWQWLR")) || StringUtils.isEmpty(dto.getFormula())) {
|
|
@@ -242,16 +243,16 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
if (StringUtils.inStringIgnoreCase("DF", dto.getOptionCode())) {
|
|
|
totalScore = totalScore + score;
|
|
|
}
|
|
|
- log.info(dto.getOrganizationShortName() + "|" + dto.getChildName()+"|"+dto.getOptionCode() + "----------" + dto.getFormula() + "=" + score);
|
|
|
+ log.info(dto.getOrganizationShortName() + "|" + dto.getChildName() + "|" + dto.getOptionCode() + "----------" + dto.getFormula() + "=" + score);
|
|
|
OrganizationEvaluationInfo info = baseMapper.selectById(dto.getId());
|
|
|
//将计算结果保存
|
|
|
info.setQuantifiedValue(score);
|
|
|
- info.setNonQuantifiedValue(score+"");
|
|
|
+ info.setNonQuantifiedValue(score + "");
|
|
|
dto.setQuantifiedValue(score);
|
|
|
- dto.setNonQuantifiedValue(score+"");
|
|
|
+ dto.setNonQuantifiedValue(score + "");
|
|
|
this.saveOrUpdate(info);
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -260,7 +261,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
}
|
|
|
|
|
|
|
|
|
-// //计算前置属性(差值、利润贡献、单位千瓦利润)的最大最小值
|
|
|
+ //计算前置属性(差值、利润贡献、单位千瓦利润)的最大最小值
|
|
|
for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropListEntry : indicatorGropList.entrySet()){
|
|
|
for (OrganizationEvaluationInfoResDTO d : indicatorGropListEntry.getValue()){
|
|
|
System.out.println(d.getOrganizationShortName()+"|"+d.getIndicatorName()+"|"+d.getOptionName()+"|"+d.getQuantifiedValue());
|
|
@@ -390,13 +391,13 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
Map data = new HashMap();
|
|
|
|
|
|
//编辑标记
|
|
|
- OrganizationEvaluation evaluation = organizationEvaluationService.getById(organizationEvaluationId);
|
|
|
- boolean editFlag = false;
|
|
|
- if(StringUtils.isNotEmpty(evaluation.getInstId())){
|
|
|
- editFlag = workflowService.todoTaskList2(evaluation.getInstId(),request);
|
|
|
-
|
|
|
- }
|
|
|
- data.put("editFlag",editFlag);
|
|
|
+// OrganizationEvaluation evaluation = organizationEvaluationService.getById(organizationEvaluationId);
|
|
|
+// boolean editFlag = false;
|
|
|
+// if(StringUtils.isNotEmpty(evaluation.getInstId())){
|
|
|
+// editFlag = workflowService.todoTaskList2(evaluation.getInstId(),request);
|
|
|
+//
|
|
|
+// }
|
|
|
+// data.put("editFlag",editFlag);
|
|
|
|
|
|
|
|
|
|
|
@@ -420,17 +421,13 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
.collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getOrganizationId));
|
|
|
List<Map> mapList = new ArrayList<>();
|
|
|
|
|
|
-
|
|
|
//设置数据标题
|
|
|
//将子指标分组
|
|
|
Map<String, List<IndicatorDictionary>> groupedChildCode = dictionaryList.stream()
|
|
|
.collect(Collectors.groupingBy(d -> d.getChildCode() + "," + d.getChildName()));
|
|
|
-
|
|
|
if (titlemark) {
|
|
|
Map title = new LinkedHashMap();
|
|
|
for (Map.Entry<String, List<IndicatorDictionary>> childCodeEntry : groupedChildCode.entrySet()) {
|
|
|
-
|
|
|
-
|
|
|
List<Map> titleArray = new ArrayList<>();
|
|
|
for (IndicatorDictionary d : childCodeEntry.getValue()) {
|
|
|
Map titlemap = new LinkedHashMap();
|
|
@@ -444,7 +441,6 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
|
|
|
}
|
|
|
title.put(childCodeEntry.getKey().split(",")[1], titleArray);
|
|
|
-
|
|
|
}
|
|
|
Map deptstateMap = new LinkedHashMap();
|
|
|
List<Map> titlestateArray = new ArrayList<>();
|
|
@@ -457,11 +453,9 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
data.put("title", title);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//获取行数据
|
|
|
//遍历按照公司分组后的数据
|
|
|
for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> entry : groupedData.entrySet()) {
|
|
|
-
|
|
|
Map indicatormap = new HashMap();
|
|
|
List<OrganizationEvaluationInfoResDTO> dtoList = entry.getValue();
|
|
|
|
|
@@ -471,12 +465,10 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
dto -> dto,
|
|
|
(oldValue, newValue) -> oldValue)); // 解决键重复的情况
|
|
|
boolean mark = true;//标记给公司名赋值
|
|
|
-
|
|
|
for (IndicatorDictionary d : dictionaryList) {
|
|
|
if (!d.getIsShow()) {
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
if (mark) {
|
|
|
indicatormap.put("organizationShortName", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationShortName());//公司名
|
|
|
indicatormap.put("organizationId", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationId());//公司id
|
|
@@ -485,7 +477,6 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
|
|
|
mark = false;
|
|
|
}
|
|
|
-
|
|
|
//指标属性
|
|
|
indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue());
|
|
|
//指标id
|
|
@@ -493,13 +484,9 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
//是否量化
|
|
|
indicatormap.put("IS_LH_" +d.getChildCode() + "_" + d.getOptionCode(),resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getIsQuantified2()?"1":"2");
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
mapList.add(indicatormap);
|
|
|
}
|
|
|
-
|
|
|
data.put("value", mapList);
|
|
|
return data;
|
|
|
}
|