|
@@ -31,6 +31,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.concurrent.atomic.AtomicReference;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@@ -142,6 +143,7 @@ public class TaskService {
|
|
SshClient clientScore = SshUtil.getClient();
|
|
SshClient clientScore = SshUtil.getClient();
|
|
ClientSession sessionScore = SshUtil.getSession(clientScore, hostnameScore, usernameScore, passwordScore);
|
|
ClientSession sessionScore = SshUtil.getSession(clientScore, hostnameScore, usernameScore, passwordScore);
|
|
for (int i = 0; i < leafIndexTemplateList.size(); i++) {
|
|
for (int i = 0; i < leafIndexTemplateList.size(); i++) {
|
|
|
|
+ AtomicReference<String> scoreExplain = new AtomicReference<>(); // 每个叶子指标下的任务的得分说明一样和叶子指标一致
|
|
IndexTemplatePO indexTemplatePO = leafIndexTemplateList.get(i);
|
|
IndexTemplatePO indexTemplatePO = leafIndexTemplateList.get(i);
|
|
String indexId = indexTemplatePO.getIndexId();
|
|
String indexId = indexTemplatePO.getIndexId();
|
|
String parentId = indexTemplatePO.getParentId();
|
|
String parentId = indexTemplatePO.getParentId();
|
|
@@ -218,6 +220,7 @@ public class TaskService {
|
|
task2.setScoreExplain(score.getScore_description());
|
|
task2.setScoreExplain(score.getScore_description());
|
|
task2.setModifyUserId(USER_ID);
|
|
task2.setModifyUserId(USER_ID);
|
|
task2.setModifyTime(TimeUtil.getNowForMysql());
|
|
task2.setModifyTime(TimeUtil.getNowForMysql());
|
|
|
|
+ scoreExplain.set(score.getScore_description());
|
|
|
|
|
|
taskMapper.updateState(task2Id, DictConstants.TASK_COMPLETED);
|
|
taskMapper.updateState(task2Id, DictConstants.TASK_COMPLETED);
|
|
|
|
|
|
@@ -239,6 +242,7 @@ public class TaskService {
|
|
.parentId(parentId)
|
|
.parentId(parentId)
|
|
.rootId(rootId)
|
|
.rootId(rootId)
|
|
.weight(weight)
|
|
.weight(weight)
|
|
|
|
+ .scoreExplain(scoreExplain.get())
|
|
.build();
|
|
.build();
|
|
leafTaskIndex.setCreateUserId(USER_ID);
|
|
leafTaskIndex.setCreateUserId(USER_ID);
|
|
leafTaskIndex.setCreateTime(TimeUtil.getNowForMysql());
|
|
leafTaskIndex.setCreateTime(TimeUtil.getNowForMysql());
|