Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cmeeting
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
翟斌
cmeeting
Commits
624eac0c
提交
624eac0c
authored
6月 17, 2025
作者:
duanxincheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
重新生成纪要功能调试
父级
04a0d678
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
54 行删除
+5
-54
src/main/java/com/cmeeting/service/impl/MeetingInfoServiceImpl.java
+5
-54
没有找到文件。
src/main/java/com/cmeeting/service/impl/MeetingInfoServiceImpl.java
浏览文件 @
624eac0c
...
@@ -202,20 +202,12 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
...
@@ -202,20 +202,12 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
//获取系统模板
//获取系统模板
MeetingRecordTemplate
meetingRecordTemplate
=
meetingRecordTemplateMapper
.
selectById
(
2
);
MeetingRecordTemplate
meetingRecordTemplate
=
meetingRecordTemplateMapper
.
selectById
(
2
);
String
processedResult
=
processWithClaude
(
recordTextBuffer
.
toString
(),
meetingDate
,
meetingRecordTemplate
.
getPrompt
(),
meetingId
,
subMeetingId
);
String
processedResult
=
processWithClaude
(
recordTextBuffer
.
toString
(),
meetingDate
,
meetingRecordTemplate
.
getPrompt
(),
meetingId
,
subMeetingId
);
String
groupOfficeMinutesPath
=
saveResult
(
processedResult
,
recordTextBuffer
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
meetingInfo
,
meetingRecordTemplate
);
saveResult
(
processedResult
,
recordTextBuffer
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
meetingInfo
,
meetingRecordTemplate
);
try
(
InputStream
is
=
new
FileInputStream
(
groupOfficeMinutesPath
)){
meetingInfoMapper
.
update
(
null
,
byte
[]
meetingMinutesBytes
=
IOUtils
.
toByteArray
(
is
);
minioUtils
.
upload
(
groupOfficeMinutesPath
,
meetingMinutesBytes
);
meetingInfoMapper
.
update
(
meetingInfo
,
new
LambdaUpdateWrapper
<
MeetingInfo
>()
new
LambdaUpdateWrapper
<
MeetingInfo
>()
.
eq
(
MeetingInfo:
:
getMeetingId
,
meetingId
)
.
eq
(
MeetingInfo:
:
getMeetingId
,
meetingId
)
.
eq
(
subMeetingId
!=
null
,
MeetingInfo:
:
getSubMeetingId
,
subMeetingId
)
.
eq
(
subMeetingId
!=
null
,
MeetingInfo:
:
getSubMeetingId
,
subMeetingId
)
.
set
(
MeetingInfo:
:
getRecordXml
,
groupOfficeMinutesPath
));
.
set
(
MeetingInfo:
:
getRecordXml
,
meetingInfo
.
getRecordXml
()));
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
e
);
}
finally
{
FileUtil
.
del
(
groupOfficeMinutesPath
);
}
return
true
;
return
true
;
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
StringWriter
sw
=
new
StringWriter
();
StringWriter
sw
=
new
StringWriter
();
...
@@ -233,46 +225,18 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
...
@@ -233,46 +225,18 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
* @param meetingInfo 会议对象
* @param meetingInfo 会议对象
* @param meetingRecordTemplate 模板信息
* @param meetingRecordTemplate 模板信息
*/
*/
private
String
saveResult
(
String
content
,
byte
[]
recordData
,
MeetingInfo
meetingInfo
,
MeetingRecordTemplate
meetingRecordTemplate
)
{
private
void
saveResult
(
String
content
,
byte
[]
recordData
,
MeetingInfo
meetingInfo
,
MeetingRecordTemplate
meetingRecordTemplate
)
{
String
meetingName
;
String
meetingId
=
meetingInfo
.
getMeetingId
();
String
meetingId
=
meetingInfo
.
getMeetingId
();
String
subMeetingId
=
meetingInfo
.
getSubMeetingId
();
String
subMeetingId
=
meetingInfo
.
getSubMeetingId
();
//转录文件临时存储路径
//转录文件临时存储路径
String
recordContentPath
=
meetingId
+
"-recordContent-"
+
IdUtil
.
fastSimpleUUID
()
+
".txt"
;
String
recordContentPath
=
meetingId
+
"-recordContent-"
+
IdUtil
.
fastSimpleUUID
()
+
".txt"
;
//生成的xml临时存储路径
//生成的xml临时存储路径
String
recordXmlPath
=
meetingId
+
"-recordXmlPath-"
+
IdUtil
.
fastSimpleUUID
()
+
".xml"
;
String
recordXmlPath
=
meetingId
+
"-recordXmlPath-"
+
IdUtil
.
fastSimpleUUID
()
+
".xml"
;
//填充后的会议纪要名称
String
meetingMinutesFileName
;
//填充后的会议纪要word文件临时路径
String
meetingMinutesPath
;
try
{
try
{
//去除内容中除了xml内容以外其他的信息,格式化xml
//去除内容中除了xml内容以外其他的信息,格式化xml
String
xml
=
extractXmlFromMarkdown
(
content
,
meetingId
,
subMeetingId
);
String
xml
=
extractXmlFromMarkdown
(
content
,
meetingId
,
subMeetingId
);
minioUtils
.
upload
(
recordContentPath
,
recordData
);
minioUtils
.
upload
(
recordXmlPath
,
xml
.
getBytes
(
StandardCharsets
.
UTF_8
));
minioUtils
.
upload
(
recordXmlPath
,
xml
.
getBytes
(
StandardCharsets
.
UTF_8
));
//将xml格式的内容转换为map,用于填充模板
meetingInfo
.
setRecordXml
(
recordXmlPath
);
Map
<
String
,
Object
>
dataModel
=
convertXmlToMap
(
xml
);
meetingName
=
dataModel
.
get
(
"meeting_name"
)
!=
null
?
String
.
valueOf
(
dataModel
.
get
(
"meeting_name"
))
:
"腾讯会议纪要"
;
meetingMinutesFileName
=
meetingName
+
"_"
+
meetingRecordTemplate
.
getName
();
//追加参会人员信息
Map
<
String
,
Object
>
participantsMap
=
new
ConcurrentHashMap
<>();
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
meetingDate
=
meetingInfo
.
getStartTime
().
toLocalDate
().
format
(
df
);
participantsMap
.
put
(
"meeting_date"
,
meetingDate
);
participantsMap
.
put
(
"meeting_location"
,
"线上腾讯会议"
);
participantsMap
.
put
(
"meeting_participants"
,
meetingInfo
.
getParticipantUsers
());
participantsMap
.
put
(
"meeting_host"
,
meetingInfo
.
getHost
());
dataModel
.
putAll
(
participantsMap
);
XWPFTemplate
template
;
try
(
InputStream
inputStream
=
minioUtils
.
getFile
(
meetingRecordTemplate
.
getTemplate
()))
{
template
=
XWPFTemplate
.
compile
(
inputStream
).
render
(
dataModel
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
meetingMinutesPath
=
baseSavePath
+
meetingMinutesFileName
+
".docx"
;
template
.
writeAndClose
(
new
FileOutputStream
(
meetingMinutesPath
));
processLogService
.
log
(
meetingId
,
subMeetingId
,
"填充会议纪要成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"填充会议纪要失败: {}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"填充会议纪要失败: {}"
,
e
.
getMessage
(),
e
);
StringWriter
sw
=
new
StringWriter
();
StringWriter
sw
=
new
StringWriter
();
...
@@ -281,19 +245,6 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
...
@@ -281,19 +245,6 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
processLogService
.
log
(
meetingId
,
subMeetingId
,
"填充会议纪要失败"
+
sw
.
toString
());
processLogService
.
log
(
meetingId
,
subMeetingId
,
"填充会议纪要失败"
+
sw
.
toString
());
throw
new
RuntimeException
(
"填充会议纪要失败"
);
throw
new
RuntimeException
(
"填充会议纪要失败"
);
}
}
meetingInfoMapper
.
update
(
meetingInfo
,
new
LambdaUpdateWrapper
<
MeetingInfo
>()
.
eq
(
MeetingInfo:
:
getMeetingId
,
meetingId
)
.
eq
(
subMeetingId
!=
null
,
MeetingInfo:
:
getSubMeetingId
,
subMeetingId
)
.
set
(
MeetingInfo:
:
getRecordContent
,
recordContentPath
)
.
set
(
MeetingInfo:
:
getRecordXml
,
recordXmlPath
)
.
set
(
MeetingInfo:
:
getParticipantUsers
,
meetingInfo
.
getParticipantUsers
())
.
set
(
MeetingInfo:
:
getIsGenerated
,
Boolean
.
TRUE
)
);
meetingInfo
.
setRecordContent
(
recordContentPath
);
meetingInfo
.
setRecordXml
(
recordXmlPath
);
return
baseSavePath
+
meetingMinutesFileName
+
".docx"
;
}
}
/**
/**
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论