Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elleai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
E
ellehuis-group
backend
elleai
Commits
261128ef
Commit
261128ef
authored
Oct 21, 2024
by
陈立彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dify agent返回字段
parent
b7ab069d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ExamineRecordMobileDto.java
...leai/application/dto/response/ExamineRecordMobileDto.java
+7
-0
AppExamineService.java
.../breeze/elleai/application/service/AppExamineService.java
+3
-0
No files found.
src/main/java/cn/breeze/elleai/application/dto/response/ExamineRecordMobileDto.java
View file @
261128ef
...
...
@@ -65,6 +65,13 @@ public class ExamineRecordMobileDto implements Serializable {
@JsonProperty
(
"overall_score"
)
private
Float
overallScore
;
/**
* 平均分
*/
@Schema
(
description
=
"平均分"
)
@JsonProperty
(
"avg_score"
)
private
Float
avgScore
;
/**
* 综合评价
*/
...
...
src/main/java/cn/breeze/elleai/application/service/AppExamineService.java
View file @
261128ef
...
...
@@ -543,6 +543,8 @@ public class AppExamineService {
req
.
setRecordId
(
id
);
List
<
ExamineDetailRecordResponseModel
>
detailRecordList
=
examineService
.
examineDetailRecordList
(
req
);
if
(
CollectionUtil
.
isNotEmpty
(
detailRecordList
))
{
double
totalScore
=
detailRecordList
.
stream
().
filter
(
v
->
Objects
.
nonNull
(
v
.
getScore
())).
mapToDouble
(
ExamineDetailRecordResponseModel:
:
getScore
).
sum
();
Double
avgScore
=
totalScore
/
detailRecordList
.
size
();
// 题目信息
List
<
Integer
>
qaIdList
=
detailRecordList
.
stream
().
map
(
ExamineDetailRecordResponseModel:
:
getQaId
).
collect
(
Collectors
.
toList
());
List
<
ExamineQaResponseModel
>
examineQaList
=
examineService
.
examineQaList
(
qaIdList
);
...
...
@@ -559,6 +561,7 @@ public class AppExamineService {
}
return
detail
;
}).
collect
(
Collectors
.
toList
());
result
.
setAvgScore
(
avgScore
.
floatValue
());
result
.
setDetails
(
details
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment