|
@@ -171,7 +171,7 @@ public class TaskManager {
|
|
* @param userId 项目创建用户的 id
|
|
* @param userId 项目创建用户的 id
|
|
*/
|
|
*/
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
- public void score(String projectRunningKey,String userId, String projectId, String projectType) {
|
|
|
|
|
|
+ public void score(String projectRunningKey, String userId, String projectId, String projectType) {
|
|
stringRedisTemplate.delete(projectRunningKey);
|
|
stringRedisTemplate.delete(projectRunningKey);
|
|
// -------------------------------- 打分 --------------------------------
|
|
// -------------------------------- 打分 --------------------------------
|
|
ProjectEntity projectEntity = null;
|
|
ProjectEntity projectEntity = null;
|
|
@@ -407,7 +407,8 @@ public class TaskManager {
|
|
parentIndexTemplateList.forEach(indexTemplate -> {
|
|
parentIndexTemplateList.forEach(indexTemplate -> {
|
|
String weight = indexTemplate.getWeight();
|
|
String weight = indexTemplate.getWeight();
|
|
List<LeafIndexEntity> sonTaskIndexList = sonTaskIndexMap.get(indexTemplate.getIndexId());
|
|
List<LeafIndexEntity> sonTaskIndexList = sonTaskIndexMap.get(indexTemplate.getIndexId());
|
|
- double parentScore = sonTaskIndexList.stream().mapToDouble(taskIndex -> taskIndex.getScore() * Double.parseDouble(taskIndex.getWeight()) / 100).sum();
|
|
|
|
|
|
+ double parentScore = NumberUtil.cut(sonTaskIndexList.stream().mapToDouble(taskIndex -> taskIndex
|
|
|
|
+ .getScore() * Double.parseDouble(taskIndex.getWeight()) / 100).sum(), 2);
|
|
LeafIndexEntity parentTaskIndex = LeafIndexEntity.builder()
|
|
LeafIndexEntity parentTaskIndex = LeafIndexEntity.builder()
|
|
.id(StringUtil.getRandomUUID())
|
|
.id(StringUtil.getRandomUUID())
|
|
.pId(projectId)
|
|
.pId(projectId)
|