|
@@ -727,7 +727,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
projectReportVo.setProjectName(poParam.getProjectName());
|
|
projectReportVo.setProjectName(poParam.getProjectName());
|
|
projectReportVo.setAlgorithmName(algorithmBaseInfoVo.getAlgorithmName());
|
|
projectReportVo.setAlgorithmName(algorithmBaseInfoVo.getAlgorithmName());
|
|
projectReportVo.setAlgorithmDescribe(algorithmBaseInfoVo.getDescription());
|
|
projectReportVo.setAlgorithmDescribe(algorithmBaseInfoVo.getDescription());
|
|
- String sceneNames = "";
|
|
|
|
|
|
+ String sceneNames;
|
|
|
|
|
|
//算法测试得分表
|
|
//算法测试得分表
|
|
/*
|
|
/*
|
|
@@ -747,34 +747,38 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
|
|
//汇总数据初始化
|
|
//汇总数据初始化
|
|
- Integer totalSceneNum = 0;
|
|
|
|
|
|
+ int totalSceneNum = 0;
|
|
double totalScore = 0D;
|
|
double totalScore = 0D;
|
|
double totalScoreRatio = 0D;
|
|
double totalScoreRatio = 0D;
|
|
- Integer totalSceneScoreNum = 0;
|
|
|
|
|
|
+ int totalSceneScoreNum = 0;
|
|
|
|
|
|
-
|
|
|
|
- for (SimulationMptFirstTargetScorePo v : pos) {
|
|
|
|
|
|
+ // 根据一级指标表结果获取平分细则
|
|
|
|
+ for (SimulationMptFirstTargetScorePo firstTargetScorePo : pos) {
|
|
//获取指标信息
|
|
//获取指标信息
|
|
- stringBuilder.append(v.getSublistName()).append("、");
|
|
|
|
- AlgorithmScoreVo algorithmScoreVo = new AlgorithmScoreVo();
|
|
|
|
- algorithmScoreVo.setProjectName(v.getSublistName());
|
|
|
|
- Integer sceneNum = v.getSceneNum();
|
|
|
|
- totalSceneNum += sceneNum;
|
|
|
|
- algorithmScoreVo.setSceneNum(sceneNum);
|
|
|
|
- String weight = v.getWeight();
|
|
|
|
|
|
+ int sceneNum = firstTargetScorePo.getSceneNum(); // 一级指标包含场景数量
|
|
|
|
+ String weight = firstTargetScorePo.getWeight(); // 一级指标权重
|
|
double weightDouble = Double.parseDouble(weight);
|
|
double weightDouble = Double.parseDouble(weight);
|
|
- algorithmScoreVo.setWeight(weight);
|
|
|
|
//单个二级指标得分
|
|
//单个二级指标得分
|
|
- Double score = v.getScore();
|
|
|
|
|
|
+ Double score = firstTargetScorePo.getScore();
|
|
totalScore += BigDecimal.valueOf(score).multiply(BigDecimal.valueOf(weightDouble).divide(BigDecimal.valueOf(100))).doubleValue();
|
|
totalScore += BigDecimal.valueOf(score).multiply(BigDecimal.valueOf(weightDouble).divide(BigDecimal.valueOf(100))).doubleValue();
|
|
- algorithmScoreVo.setScore(saveTwoDecimalPlaces(score));
|
|
|
|
- //获取得分不为0的场景数量
|
|
|
|
- Integer scoreNum = getSetScoreNum(v.getSublistId(), poParam.getId());
|
|
|
|
|
|
+ //获取得分不为 0 的场景数量
|
|
|
|
+ Integer scoreNum = getSetScoreNum(firstTargetScorePo.getSublistId(), poParam.getId());
|
|
totalSceneScoreNum += scoreNum;
|
|
totalSceneScoreNum += scoreNum;
|
|
|
|
+
|
|
|
|
+ totalScoreRatio += Double.valueOf(scoreNum) / Double.valueOf(sceneNum) * 100;
|
|
|
|
+
|
|
|
|
+ AlgorithmScoreVo algorithmScoreVo = new AlgorithmScoreVo();
|
|
|
|
+ algorithmScoreVo.setProjectName(firstTargetScorePo.getSublistName());
|
|
|
|
+ algorithmScoreVo.setSceneNum(sceneNum);
|
|
|
|
+ algorithmScoreVo.setWeight(weight);
|
|
|
|
+ algorithmScoreVo.setScore(saveTwoDecimalPlaces(score));
|
|
algorithmScoreVo.setScoreRatio(saveTwoDecimalPlaces(Double.valueOf(scoreNum) / Double.valueOf(sceneNum) * 100));
|
|
algorithmScoreVo.setScoreRatio(saveTwoDecimalPlaces(Double.valueOf(scoreNum) / Double.valueOf(sceneNum) * 100));
|
|
|
|
+
|
|
algorithmScoreVoList.add(algorithmScoreVo);
|
|
algorithmScoreVoList.add(algorithmScoreVo);
|
|
|
|
|
|
- totalScoreRatio += Double.valueOf(scoreNum) / Double.valueOf(sceneNum) * 100;
|
|
|
|
|
|
+ // 其他操作
|
|
|
|
+ stringBuilder.append(firstTargetScorePo.getSublistName()).append("、");
|
|
|
|
+ totalSceneNum += sceneNum;
|
|
}
|
|
}
|
|
// 汇总
|
|
// 汇总
|
|
AlgorithmScoreVo algorithmScoreVo = new AlgorithmScoreVo();
|
|
AlgorithmScoreVo algorithmScoreVo = new AlgorithmScoreVo();
|
|
@@ -1877,36 +1881,40 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
SimulationManualProjectParam query = new SimulationManualProjectParam();
|
|
SimulationManualProjectParam query = new SimulationManualProjectParam();
|
|
query.setId(projectId);
|
|
query.setId(projectId);
|
|
query.setPackageId(scenePackageId);
|
|
query.setPackageId(scenePackageId);
|
|
-// List<SublistScoreVo> pos = simulationProjectMapper.selectSubScore(query);
|
|
|
|
List<SublistScoreVo> pos = simulationProjectMapper.selectSubScore2(query);
|
|
List<SublistScoreVo> pos = simulationProjectMapper.selectSubScore2(query);
|
|
-
|
|
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
-
|
|
|
|
int size = 0;
|
|
int size = 0;
|
|
List<List<String>> result = new ArrayList<>();
|
|
List<List<String>> result = new ArrayList<>();
|
|
//递归指标名称得分
|
|
//递归指标名称得分
|
|
for (SublistScoreVo po : pos) {
|
|
for (SublistScoreVo po : pos) {
|
|
-// if(ObjectUtil.isNotNull(po.getPackageAndRules())){
|
|
|
|
if (ObjectUtil.isNotNull(po.getPackageAndRules()) && (po.getFirTarget() != null || po.getLasTarget() != null)) {
|
|
if (ObjectUtil.isNotNull(po.getPackageAndRules()) && (po.getFirTarget() != null || po.getLasTarget() != null)) {
|
|
//末级指标
|
|
//末级指标
|
|
setParent(po, null, pos, scenePackageId);
|
|
setParent(po, null, pos, scenePackageId);
|
|
|
|
|
|
String sublistName = po.getSublistName();
|
|
String sublistName = po.getSublistName();
|
|
Double firScore = po.getFirScore();
|
|
Double firScore = po.getFirScore();
|
|
- String firstScore = "";//first得分
|
|
|
|
|
|
+ String firstScore = ""; // first得分
|
|
if (firScore != null) {
|
|
if (firScore != null) {
|
|
firstScore = saveTwoDecimalPlaces(firScore, 1).toString();
|
|
firstScore = saveTwoDecimalPlaces(firScore, 1).toString();
|
|
}
|
|
}
|
|
Double lasScore = po.getLasScore();
|
|
Double lasScore = po.getLasScore();
|
|
- String LastScore = "";//last得分
|
|
|
|
|
|
+ String LastScore = ""; // last得分
|
|
if (lasScore != null) {
|
|
if (lasScore != null) {
|
|
LastScore = saveTwoDecimalPlaces(lasScore, 1).toString();
|
|
LastScore = saveTwoDecimalPlaces(lasScore, 1).toString();
|
|
}
|
|
}
|
|
String sceneNum = po.getSceneNum();//场景数量
|
|
String sceneNum = po.getSceneNum();//场景数量
|
|
- String notStandardSceneNum = po.getNotStandardSceneNum();//未达标场景数量
|
|
|
|
|
|
+ String notScoredSceneNum = po.getNotScoredSceneNum(); // 未参与评分数量
|
|
|
|
+ String notStandardSceneNum = po.getNotStandardSceneNum(); // 未达标场景数量
|
|
|
|
+ String standardSceneNum = po.getStandardSceneNum(); // 达标场景数量
|
|
|
|
|
|
if (ObjectUtil.isNotNull(sublistName)) {
|
|
if (ObjectUtil.isNotNull(sublistName)) {
|
|
- sublistName += ProjectConstants.SEPARATOR + sceneNum + ProjectConstants.SEPARATOR + notStandardSceneNum + ProjectConstants.SEPARATOR + LastScore + ProjectConstants.SEPARATOR + firstScore;
|
|
|
|
|
|
+ sublistName += ProjectConstants.SEPARATOR
|
|
|
|
+ + sceneNum + ProjectConstants.SEPARATOR
|
|
|
|
+ + notScoredSceneNum + ProjectConstants.SEPARATOR
|
|
|
|
+ + notStandardSceneNum + ProjectConstants.SEPARATOR
|
|
|
|
+ + standardSceneNum + ProjectConstants.SEPARATOR
|
|
|
|
+ + LastScore + ProjectConstants.SEPARATOR
|
|
|
|
+ + firstScore;
|
|
String[] split = sublistName.split(ProjectConstants.SEPARATOR);
|
|
String[] split = sublistName.split(ProjectConstants.SEPARATOR);
|
|
|
|
|
|
|
|
|
|
@@ -1944,10 +1952,12 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- subScListVo.setSceneNum(list.get(start));
|
|
|
|
- subScListVo.setNotStandardSceneNum(list.get(start + 1));
|
|
|
|
- subScListVo.setLastScore(list.get(start + 2));
|
|
|
|
- subScListVo.setFirstScore(list.get(start + 3));
|
|
|
|
|
|
+ subScListVo.setSceneNum(list.get(start + 0));
|
|
|
|
+ subScListVo.setNotScoredSceneNum(list.get(start + 1));
|
|
|
|
+ subScListVo.setNotStandardSceneNum(list.get(start + 2));
|
|
|
|
+ subScListVo.setStandardSceneNum(list.get(start + 3));
|
|
|
|
+ subScListVo.setLastScore(list.get(start + 4));
|
|
|
|
+ subScListVo.setFirstScore(list.get(start + 5));
|
|
|
|
|
|
objects.add(subScListVo);
|
|
objects.add(subScListVo);
|
|
|
|
|
|
@@ -1959,7 +1969,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
addHeaders(i, headerList);
|
|
addHeaders(i, headerList);
|
|
}
|
|
}
|
|
headerList.add(ImmutableMap.builder().put("label", "场景数量").put("prop", "sceneNum").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "场景数量").put("prop", "sceneNum").build());
|
|
|
|
+ headerList.add(ImmutableMap.builder().put("label", "未参与评分场景个数").put("prop", "notScoredSceneNum").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "未达标场景数量").put("prop", "notStandardSceneNum").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "未达标场景数量").put("prop", "notStandardSceneNum").build());
|
|
|
|
+ headerList.add(ImmutableMap.builder().put("label", "达标场景个数").put("prop", "standardSceneNum").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "得分").put("prop", "lastScore").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "得分").put("prop", "lastScore").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "总分").put("prop", "firstScore").build());
|
|
headerList.add(ImmutableMap.builder().put("label", "总分").put("prop", "firstScore").build());
|
|
hashMap.put("headerList", headerList);
|
|
hashMap.put("headerList", headerList);
|
|
@@ -2244,7 +2256,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取二级场景下所有得分不为0的场景数量
|
|
|
|
|
|
+ * 获取二级场景下所有得分不为 0 的场景数量
|
|
*
|
|
*
|
|
* @param sublistId
|
|
* @param sublistId
|
|
* @param pId
|
|
* @param pId
|
|
@@ -2257,7 +2269,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取一级指标下所有得分不为0的场景总数
|
|
|
|
|
|
+ * 获取一级指标下所有得分不为 0 的场景总数
|
|
*
|
|
*
|
|
* @param resultVo 返回值,返回统计数量,首次传null
|
|
* @param resultVo 返回值,返回统计数量,首次传null
|
|
* @param parentVoList 首次传null
|
|
* @param parentVoList 首次传null
|
|
@@ -2266,8 +2278,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
* @param sublistId 指标id(用户查询指标下的所有场景)
|
|
* @param sublistId 指标id(用户查询指标下的所有场景)
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- private SceneScoreVo selectScoreNum(SceneScoreVo resultVo, List<ScenePackageSubListVO> parentVoList,
|
|
|
|
- boolean isRoot, String pId, String sublistId) {
|
|
|
|
|
|
+ private SceneScoreVo selectScoreNum(SceneScoreVo resultVo, List<ScenePackageSubListVO> parentVoList, boolean isRoot, String pId, String sublistId) {
|
|
if (isRoot) {
|
|
if (isRoot) {
|
|
//初始化返回值
|
|
//初始化返回值
|
|
resultVo = new SceneScoreVo();
|
|
resultVo = new SceneScoreVo();
|