|
@@ -22,6 +22,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.Serializable;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -609,6 +611,9 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
|
|
|
|
|
|
List<EvaluationScoreInfoResDTO> listdt = baseMapper.selectEvaluationScoreInfoList(id, binSection, indicatorId, organizationEvaluationRuleId);
|
|
|
|
|
|
+ if(null == listdt || listdt.size()<=0){
|
|
|
+ throw new CustomException("未找到对应的打分记录");
|
|
|
+ }
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(indicatorId)) {
|
|
@@ -718,7 +723,7 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
|
|
|
|
|
|
if (zhdfflg && (dto.getChildName().equals("净利润"))) {
|
|
|
Map<String, Object> zhdf = new HashMap<>();
|
|
|
- zhdf.put("key", "zhdf");
|
|
|
+ zhdf.put("key", dto.getChildCode()+"_zhdf");
|
|
|
zhdf.put("name", "综合得分");
|
|
|
zhdfflg = false;
|
|
|
oplist.add(zhdf);
|
|
@@ -761,12 +766,16 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
|
|
|
|
|
|
if(zhdfflg2 && (dto.getChildName().equals("净利润"))){
|
|
|
List<EvaluationScoreCount> scoreCounts = evaluationScoreCountService.getEvaluationScoreCountList(id,dto.getOrganizationEvaluationRuleId(),dto.getIndicatorId());
|
|
|
- opmap.put("zhdf",scoreCounts.get(0).getObversionScore());
|
|
|
+ opmap.put(dto.getChildCode()+"_zhdf",scoreCounts.get(0).getObversionScore());
|
|
|
zhdfflg2 = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ List<EvaluationScoreCount> scoreCounts2 = evaluationScoreCountService.getEvaluationScoreCountList(id,organizationScoreEntry.getValue().get(0).getOrganizationEvaluationRuleId(),"");
|
|
|
+ Double scoresum = scoreCounts2.stream().mapToDouble(EvaluationScoreCount::getObversionScore).sum();
|
|
|
+
|
|
|
|
|
|
+ opmap.put("zhdf",new BigDecimal(scoresum).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
bodylist2.add(opmap);
|
|
|
}
|
|
|
|
|
@@ -774,12 +783,10 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
|
|
|
Map<String, Object> title2map = new LinkedHashMap<>();
|
|
|
title2map.put("考核指标名称",indicatorNamelist);
|
|
|
title1map.put(title1,title2map);
|
|
|
+ map.put("zhdf","综合得分");
|
|
|
map.put("title",title1map);
|
|
|
map.put("values",bodylist2);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
return map;
|
|
|
}
|
|
|
}
|