Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
poc
poc-api
Commits
f8f0935e
You need to sign in or sign up before continuing.
Commit
f8f0935e
authored
Aug 29, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat[长文阅读]:新增关键词/思维导图
parent
6935d327
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
450 additions
and
92 deletions
+450
-92
LongTextDialoguesServiceImpl.java
...document/aggregate/impl/LongTextDialoguesServiceImpl.java
+235
-24
BizLongTextSummaryCacheConvert.java
...long_document/convert/BizLongTextSummaryCacheConvert.java
+4
-0
MindMap.java
src/main/java/cn/com/poc/long_document/domain/MindMap.java
+49
-0
LongTextSummaryDto.java
...java/cn/com/poc/long_document/dto/LongTextSummaryDto.java
+28
-0
BizLongTextSummaryCacheEntity.java
...c/long_document/entity/BizLongTextSummaryCacheEntity.java
+31
-1
BizLongTextSummaryCacheModel.java
...poc/long_document/model/BizLongTextSummaryCacheModel.java
+32
-0
BizLongTextSummaryCacheServiceImpl.java
...ment/service/impl/BizLongTextSummaryCacheServiceImpl.java
+66
-58
KeyWordAnalyzer.java
...ain/java/cn/com/poc/meeting/analysis/KeyWordAnalyzer.java
+5
-9
No files found.
src/main/java/cn/com/poc/long_document/aggregate/impl/LongTextDialoguesServiceImpl.java
View file @
f8f0935e
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/poc/long_document/convert/BizLongTextSummaryCacheConvert.java
View file @
f8f0935e
...
...
@@ -13,6 +13,8 @@ public class BizLongTextSummaryCacheConvert {
entity
.
setSummary
(
model
.
getSummary
());
entity
.
setFileUrl
(
model
.
getFileUrl
());
entity
.
setFileMd5
(
model
.
getFileMd5
());
entity
.
setKeyword
(
model
.
getKeyword
());
entity
.
setMindmap
(
model
.
getMindmap
());
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
entity
.
setCreator
(
model
.
getCreator
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
...
...
@@ -27,6 +29,8 @@ public class BizLongTextSummaryCacheConvert {
model
.
setId
(
entity
.
getId
());
model
.
setCorePoint
(
entity
.
getCorePoint
());
model
.
setSummary
(
entity
.
getSummary
());
model
.
setKeyword
(
entity
.
getKeyword
());
model
.
setMindmap
(
entity
.
getMindmap
());
model
.
setFileUrl
(
entity
.
getFileUrl
());
model
.
setFileMd5
(
entity
.
getFileMd5
());
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
...
...
src/main/java/cn/com/poc/long_document/domain/MindMap.java
0 → 100644
View file @
f8f0935e
package
cn
.
com
.
poc
.
long_document
.
domain
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2025/8/29
*/
public
class
MindMap
{
private
String
id
;
private
String
topic
;
private
Boolean
root
;
private
List
<
MindMap
>
children
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getTopic
()
{
return
topic
;
}
public
void
setTopic
(
String
topic
)
{
this
.
topic
=
topic
;
}
public
Boolean
getRoot
()
{
return
root
;
}
public
void
setRoot
(
Boolean
root
)
{
this
.
root
=
root
;
}
public
List
<
MindMap
>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<
MindMap
>
children
)
{
this
.
children
=
children
;
}
}
src/main/java/cn/com/poc/long_document/dto/LongTextSummaryDto.java
View file @
f8f0935e
package
cn
.
com
.
poc
.
long_document
.
dto
;
import
cn.com.poc.long_document.domain.MindMap
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2025/6/18
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
LongTextSummaryDto
{
private
String
summary
;
private
String
corePoint
;
private
List
<
String
>
keyword
;
private
MindMap
mindMap
;
public
List
<
String
>
getKeyword
()
{
return
keyword
;
}
public
void
setKeyword
(
List
<
String
>
keyword
)
{
this
.
keyword
=
keyword
;
}
public
MindMap
getMindMap
()
{
return
mindMap
;
}
public
void
setMindMap
(
MindMap
mindMap
)
{
this
.
mindMap
=
mindMap
;
}
public
String
getSummary
()
{
return
summary
;
}
...
...
src/main/java/cn/com/poc/long_document/entity/BizLongTextSummaryCacheEntity.java
View file @
f8f0935e
package
cn
.
com
.
poc
.
long_document
.
entity
;
import
javax.persistence.Column
;
public
class
BizLongTextSummaryCacheEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -40,6 +42,34 @@ public class BizLongTextSummaryCacheEntity {
public
void
setSummary
(
java
.
lang
.
String
summary
){
this
.
summary
=
summary
;
}
/** keyword
*关键词
*/
private
java
.
lang
.
String
keyword
;
public
java
.
lang
.
String
getKeyword
(){
return
this
.
keyword
;
}
public
void
setKeyword
(
java
.
lang
.
String
keyword
){
this
.
keyword
=
keyword
;
}
/** mindmap
*思维导图
*/
private
java
.
lang
.
String
mindmap
;
public
java
.
lang
.
String
getMindmap
(){
return
this
.
mindmap
;
}
public
void
setMindmap
(
java
.
lang
.
String
mindmap
){
this
.
mindmap
=
mindmap
;
}
/** file_url
*文件地址
*/
...
...
src/main/java/cn/com/poc/long_document/model/BizLongTextSummaryCacheModel.java
View file @
f8f0935e
...
...
@@ -74,6 +74,38 @@ public class BizLongTextSummaryCacheModel extends BaseModelClass implements Seri
}
/** keyword
*关键词
*/
private
java
.
lang
.
String
keyword
;
@Column
(
name
=
"keyword"
,
length
=
2147483647
)
public
java
.
lang
.
String
getKeyword
(){
return
this
.
keyword
;
}
public
void
setKeyword
(
java
.
lang
.
String
keyword
){
this
.
keyword
=
keyword
;
super
.
addValidField
(
"keyword"
);
}
/** mindmap
*思维导图
*/
private
java
.
lang
.
String
mindmap
;
@Column
(
name
=
"mindmap"
,
length
=
2147483647
)
public
java
.
lang
.
String
getMindmap
(){
return
this
.
mindmap
;
}
public
void
setMindmap
(
java
.
lang
.
String
mindmap
){
this
.
mindmap
=
mindmap
;
super
.
addValidField
(
"mindmap"
);
}
/** file_url
*文件地址
*/
...
...
src/main/java/cn/com/poc/long_document/service/impl/BizLongTextSummaryCacheServiceImpl.java
View file @
f8f0935e
...
...
@@ -10,10 +10,12 @@ import cn.com.yict.framemax.data.model.PagingInfo;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
...
...
@@ -23,34 +25,34 @@ public class BizLongTextSummaryCacheServiceImpl extends BaseServiceImpl
@Resource
private
BizLongTextSummaryCacheRepository
repository
;
public
BizLongTextSummaryCacheEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
public
BizLongTextSummaryCacheEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizLongTextSummaryCacheModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
if
(
model
==
null
)
{
return
null
;
}
if
(
"Y"
.
equals
(
model
.
getIsDeleted
())){
if
(
"Y"
.
equals
(
model
.
getIsDeleted
()))
{
return
null
;
}
return
BizLongTextSummaryCacheConvert
.
modelToEntity
(
model
);
}
public
List
<
BizLongTextSummaryCacheEntity
>
findByExample
(
BizLongTextSummaryCacheEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
public
List
<
BizLongTextSummaryCacheEntity
>
findByExample
(
BizLongTextSummaryCacheEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizLongTextSummaryCacheEntity
>
result
=
new
ArrayList
<
BizLongTextSummaryCacheEntity
>();
BizLongTextSummaryCacheModel
model
=
new
BizLongTextSummaryCacheModel
();
if
(
example
!=
null
){
if
(
example
!=
null
)
{
model
=
BizLongTextSummaryCacheConvert
.
entityToModel
(
example
);
}
model
.
setIsDeleted
(
"N"
);
List
<
BizLongTextSummaryCacheModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
List
<
BizLongTextSummaryCacheModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizLongTextSummaryCacheConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizLongTextSummaryCacheEntity
save
(
BizLongTextSummaryCacheEntity
entity
)
throws
Exception
{
public
BizLongTextSummaryCacheEntity
save
(
BizLongTextSummaryCacheEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
...
...
@@ -59,50 +61,56 @@ public class BizLongTextSummaryCacheServiceImpl extends BaseServiceImpl
return
BizLongTextSummaryCacheConvert
.
modelToEntity
(
saveModel
);
}
public
BizLongTextSummaryCacheEntity
update
(
BizLongTextSummaryCacheEntity
entity
)
throws
Exception
{
public
BizLongTextSummaryCacheEntity
update
(
BizLongTextSummaryCacheEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizLongTextSummaryCacheModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getCorePoint
()
!=
null
)
{
if
(
entity
.
getCorePoint
()
!=
null
)
{
model
.
setCorePoint
(
entity
.
getCorePoint
());
}
if
(
entity
.
getSummary
()
!=
null
)
{
if
(
entity
.
getSummary
()
!=
null
)
{
model
.
setSummary
(
entity
.
getSummary
());
}
if
(
entity
.
getFileUrl
()
!=
null
)
{
if
(
entity
.
getFileUrl
()
!=
null
)
{
model
.
setFileUrl
(
entity
.
getFileUrl
());
}
if
(
entity
.
getFileMd5
()
!=
null
){
if
(
entity
.
getMindmap
()
!=
null
)
{
model
.
setMindmap
(
entity
.
getMindmap
());
}
if
(
entity
.
getKeyword
()
!=
null
)
{
model
.
setKeyword
(
entity
.
getKeyword
());
}
if
(
entity
.
getFileMd5
()
!=
null
)
{
model
.
setFileMd5
(
entity
.
getFileMd5
());
}
if
(
entity
.
getIsDeleted
()
!=
null
)
{
if
(
entity
.
getIsDeleted
()
!=
null
)
{
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
}
if
(
entity
.
getCreator
()
!=
null
)
{
if
(
entity
.
getCreator
()
!=
null
)
{
model
.
setCreator
(
entity
.
getCreator
());
}
if
(
entity
.
getCreatedTime
()
!=
null
)
{
if
(
entity
.
getCreatedTime
()
!=
null
)
{
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
}
if
(
entity
.
getModifier
()
!=
null
)
{
if
(
entity
.
getModifier
()
!=
null
)
{
model
.
setModifier
(
entity
.
getModifier
());
}
if
(
entity
.
getModifiedTime
()
!=
null
)
{
if
(
entity
.
getModifiedTime
()
!=
null
)
{
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
}
if
(
entity
.
getSysVersion
()
!=
null
)
{
if
(
entity
.
getSysVersion
()
!=
null
)
{
model
.
setSysVersion
(
entity
.
getSysVersion
());
}
BizLongTextSummaryCacheModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizLongTextSummaryCacheConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizLongTextSummaryCacheModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
if
(
"N"
.
equals
(
model
.
getIsDeleted
())){
if
(
model
!=
null
)
{
if
(
"N"
.
equals
(
model
.
getIsDeleted
()))
{
model
.
setIsDeleted
(
"Y"
);
this
.
repository
.
save
(
model
);
}
...
...
src/main/java/cn/com/poc/meeting/analysis/KeyWordAnalyzer.java
View file @
f8f0935e
...
...
@@ -70,19 +70,15 @@ public class KeyWordAnalyzer extends MeetingContentAnalysisAbstract<List<String>
double
progress
=
((
double
)
(
i
+
1
)
/
segmentationResultList
.
size
())
*
100
D
;
logger
.
info
(
"-------------关键词提取进度 {} %--------------"
,
progress
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"关键词提取失败"
,
e
);
return
Collections
.
emptyList
();
}
if
(
StringUtils
.
isBlank
(
generateContent
))
{
return
Collections
.
emptyList
();
}
// 转换格式 json to list
int
start
=
generateContent
.
lastIndexOf
(
"["
);
int
end
=
generateContent
.
lastIndexOf
(
"]"
);
List
<
String
>
res
=
JsonUtils
.
deSerialize
(
generateContent
.
substring
(
start
,
end
+
1
),
new
TypeReference
<
List
<
String
>>()
{
}.
getType
());
return
res
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"关键词提取失败"
,
e
);
return
Collections
.
emptyList
();
}
}
...
...
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