Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
Overview
Overview
Details
Activity
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
shenjunjie
brandkbs2
Commits
71303afd
Commit
71303afd
authored
Mar 03, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'master'
Release See merge request
!235
parents
b41c0373
57444a46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
+5
-6
No files found.
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
View file @
71303afd
...
@@ -247,7 +247,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -247,7 +247,7 @@ public class ReportServiceImpl implements ReportService {
try
{
try
{
result
=
getPcReportResult
(
report
);
result
=
getPcReportResult
(
report
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"生成报告数据异常
"
,
e
);
log
.
error
(
"生成报告数据异常
,id:{}"
,
report
.
getId
()
,
e
);
ExceptionCast
.
cast
(
CommonCodeEnum
.
FAIL
,
"生成报告数据异常"
);
ExceptionCast
.
cast
(
CommonCodeEnum
.
FAIL
,
"生成报告数据异常"
);
}
}
redisUtil
.
set
(
redisKey
,
JSON
.
toJSONString
(
result
));
redisUtil
.
set
(
redisKey
,
JSON
.
toJSONString
(
result
));
...
@@ -412,7 +412,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -412,7 +412,7 @@ public class ReportServiceImpl implements ReportService {
List
<
Map
.
Entry
<
String
,
Integer
>>
topPosArticleList
=
markDataService
.
getMarkTopTitle
(
startTime
,
endTime
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
linkedGroupId
,
contendId
,
3
);
List
<
Map
.
Entry
<
String
,
Integer
>>
topPosArticleList
=
markDataService
.
getMarkTopTitle
(
startTime
,
endTime
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
linkedGroupId
,
contendId
,
3
);
result
.
put
(
"topPosSummary"
,
this
.
getTopArticlesMsg
(
startTime
,
endTime
,
projectId
,
linkedGroupId
,
contendId
,
topPosArticleList
));
result
.
put
(
"topPosSummary"
,
this
.
getTopArticlesMsg
(
startTime
,
endTime
,
projectId
,
linkedGroupId
,
contendId
,
topPosArticleList
));
}
else
{
}
else
{
result
.
put
(
"topPosSummary"
,
this
.
getTopEventMsg
(
topPosEventList
));
result
.
put
(
"topPosSummary"
,
this
.
getTopEventMsg
(
topPosEventList
,
projectId
));
}
}
//获取上个周期时间范围内总正面稿件数
//获取上个周期时间范围内总正面稿件数
long
lastPositiveTotal
=
markDataService
.
getYuqingMarkCount
(
lastStartTime
,
startTime
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
contendId
);
long
lastPositiveTotal
=
markDataService
.
getYuqingMarkCount
(
lastStartTime
,
startTime
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
contendId
);
...
@@ -430,7 +430,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -430,7 +430,7 @@ public class ReportServiceImpl implements ReportService {
List
<
Map
.
Entry
<
String
,
Integer
>>
topNeuArticleList
=
markDataService
.
getMarkTopTitle
(
startTime
,
endTime
,
EmotionEnum
.
NEUTRAL
.
getName
(),
projectId
,
linkedGroupId
,
contendId
,
4
);
List
<
Map
.
Entry
<
String
,
Integer
>>
topNeuArticleList
=
markDataService
.
getMarkTopTitle
(
startTime
,
endTime
,
EmotionEnum
.
NEUTRAL
.
getName
(),
projectId
,
linkedGroupId
,
contendId
,
4
);
result
.
put
(
"topNeuSummary"
,
this
.
getTopArticlesMsg
(
startTime
,
endTime
,
projectId
,
linkedGroupId
,
contendId
,
topNeuArticleList
));
result
.
put
(
"topNeuSummary"
,
this
.
getTopArticlesMsg
(
startTime
,
endTime
,
projectId
,
linkedGroupId
,
contendId
,
topNeuArticleList
));
}
else
{
}
else
{
result
.
put
(
"topNeuSummary"
,
this
.
getTopEventMsg
(
topNeuEventList
));
result
.
put
(
"topNeuSummary"
,
this
.
getTopEventMsg
(
topNeuEventList
,
projectId
));
}
}
//获取上个周期时间范围内总中性稿件数
//获取上个周期时间范围内总中性稿件数
long
lastNeutralTotal
=
markDataService
.
getYuqingMarkCount
(
lastStartTime
,
startTime
,
EmotionEnum
.
NEUTRAL
.
getName
(),
projectId
,
contendId
);
long
lastNeutralTotal
=
markDataService
.
getYuqingMarkCount
(
lastStartTime
,
startTime
,
EmotionEnum
.
NEUTRAL
.
getName
(),
projectId
,
contendId
);
...
@@ -448,7 +448,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -448,7 +448,7 @@ public class ReportServiceImpl implements ReportService {
List
<
Map
.
Entry
<
String
,
Integer
>>
topNegArticleList
=
markDataService
.
getMarkTopTitle
(
startTime
,
endTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
linkedGroupId
,
contendId
,
4
);
List
<
Map
.
Entry
<
String
,
Integer
>>
topNegArticleList
=
markDataService
.
getMarkTopTitle
(
startTime
,
endTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
linkedGroupId
,
contendId
,
4
);
result
.
put
(
"topNegSummary"
,
this
.
getTopArticlesMsg
(
startTime
,
endTime
,
projectId
,
linkedGroupId
,
contendId
,
topNegArticleList
));
result
.
put
(
"topNegSummary"
,
this
.
getTopArticlesMsg
(
startTime
,
endTime
,
projectId
,
linkedGroupId
,
contendId
,
topNegArticleList
));
}
else
{
}
else
{
result
.
put
(
"topNegSummary"
,
this
.
getTopEventMsg
(
topNegEventList
));
result
.
put
(
"topNegSummary"
,
this
.
getTopEventMsg
(
topNegEventList
,
projectId
));
}
}
//获取上个周期时间范围内总负面稿件数
//获取上个周期时间范围内总负面稿件数
long
lastNegativeTotal
=
markDataService
.
getYuqingMarkCount
(
lastStartTime
,
startTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
contendId
);
long
lastNegativeTotal
=
markDataService
.
getYuqingMarkCount
(
lastStartTime
,
startTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
contendId
);
...
@@ -586,8 +586,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -586,8 +586,7 @@ public class ReportServiceImpl implements ReportService {
* @param topEventList top事件集合
* @param topEventList top事件集合
* @return top事件信息
* @return top事件信息
*/
*/
private
List
<
JSONObject
>
getTopEventMsg
(
List
<
com
.
zhiwei
.
middleware
.
event
.
pojo
.
entity
.
Event
>
topEventList
)
{
private
List
<
JSONObject
>
getTopEventMsg
(
List
<
com
.
zhiwei
.
middleware
.
event
.
pojo
.
entity
.
Event
>
topEventList
,
String
projectId
)
{
String
projectId
=
UserThreadLocal
.
getProjectId
();
return
topEventList
.
stream
().
map
(
event
->
{
return
topEventList
.
stream
().
map
(
event
->
{
boolean
hasAnalyze
=
false
;
boolean
hasAnalyze
=
false
;
for
(
BrandkbsBasicInfo
brandkbsInfo
:
event
.
getBrandkbsInfos
())
{
for
(
BrandkbsBasicInfo
brandkbsInfo
:
event
.
getBrandkbsInfos
())
{
...
...
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