Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-mindworkplate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 50d342a2
authored
Jun 30, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:获取语音转文本时为空校验,添加异常获取
1 parent
0073f885
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
37 deletions
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/ConversationDateService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/prelearn/PreLearnBigModelService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/ConversationDateService.java
View file @
50d342a
...
...
@@ -409,6 +409,9 @@ public class ConversationDateService {
public
String
getBadgeText
(
Integer
recordId
){
ConversationBatch
conversationBatch
=
conversationBatchMapper
.
selectByRecordId
(
recordId
);
if
(
Objects
.
isNull
(
conversationBatch
)){
return
null
;
}
//获取文件内容
List
<
ConversationDetail
>
conversationDetails
=
inspectionConversationDetailExtService
.
listByBatchId
(
Arrays
.
asList
(
conversationBatch
.
getId
()));
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/prelearn/PreLearnBigModelService.java
View file @
50d342a
...
...
@@ -166,46 +166,53 @@ public class PreLearnBigModelService {
// 2d. 为每个订单生成剧本
int
caseIndex
=
1
;
for
(
OrderCustomerDTO
orderCustomer
:
orderCustomers
)
{
if
(
caseIndex
>=
50
)
{
break
;
}
//获取接待录音数据
BadgeRecordings
badgeRecordings
=
fetchReceptionRecordings
(
orderCustomer
.
getCustomerPhone
(),
orderCustomer
.
getEarliestCreatedDate
());
if
(
Objects
.
isNull
(
badgeRecordings
)){
continue
;
}
// 2d-i. 查询录音及ASR文本(连表查询)
String
asrText
=
conversationDateService
.
getBadgeText
(
badgeRecordings
.
getId
());
if
(!
StringUtils
.
hasText
(
asrText
))
{
log
.
info
(
"未获取到ASR文本: phone={}, orderCode={}"
,
orderCustomer
.
getCustomerPhone
(),
orderCustomer
.
getOrderCode
());
continue
;
}
try
{
if
(
caseIndex
>=
50
)
{
break
;
}
//获取接待录音数据
BadgeRecordings
badgeRecordings
=
fetchReceptionRecordings
(
orderCustomer
.
getCustomerPhone
(),
orderCustomer
.
getEarliestCreatedDate
());
if
(
Objects
.
isNull
(
badgeRecordings
)){
continue
;
}
// 2d-i. 查询录音及ASR文本(连表查询)
String
asrText
=
conversationDateService
.
getBadgeText
(
badgeRecordings
.
getId
());
if
(!
StringUtils
.
hasText
(
asrText
))
{
log
.
info
(
"未获取到ASR文本: phone={}, orderCode={}"
,
orderCustomer
.
getCustomerPhone
(),
orderCustomer
.
getOrderCode
());
continue
;
}
// 2e. 提交大模型异步任务
String
modelTaskId
=
submitAsyncTask
(
asrText
);
if
(!
StringUtils
.
hasText
(
modelTaskId
))
{
log
.
warn
(
"大模型任务提交失败: phone={}, orderCode={}"
,
orderCustomer
.
getCustomerPhone
(),
orderCustomer
.
getOrderCode
());
continue
;
}
// 2e. 提交大模型异步任务
String
modelTaskId
=
submitAsyncTask
(
asrText
);
if
(!
StringUtils
.
hasText
(
modelTaskId
))
{
log
.
warn
(
"大模型任务提交失败: phone={}, orderCode={}"
,
orderCustomer
.
getCustomerPhone
(),
orderCustomer
.
getOrderCode
());
continue
;
}
// 2f. 新建剧本记录,状态为生产中
PreLearnProductScript
script
=
PreLearnProductScript
.
builder
()
.
activityId
(
activityId
)
.
activityProductId
(
activityProductId
)
.
caseIndex
(
caseIndex
)
.
modelTaskId
(
modelTaskId
)
.
aiStatus
(
"GENERATING"
)
.
createdBy
(
"system"
)
.
createdDate
(
new
Date
())
.
carModel
(
badgeRecordings
.
getCarModel
())
.
customerName
(
badgeRecordings
.
getCustomerName
())
.
build
();
preLearnProductScriptMapper
.
insert
(
script
);
// 2f. 新建剧本记录,状态为生产中
PreLearnProductScript
script
=
PreLearnProductScript
.
builder
()
.
activityId
(
activityId
)
.
activityProductId
(
activityProductId
)
.
caseIndex
(
caseIndex
)
.
modelTaskId
(
modelTaskId
)
.
aiStatus
(
AiStatusEnum
.
GENERATING
.
getValue
())
.
createdBy
(
"system"
)
.
createdDate
(
new
Date
())
.
carModel
(
badgeRecordings
.
getCarModel
())
.
customerName
(
badgeRecordings
.
getCustomerName
())
.
build
();
preLearnProductScriptMapper
.
insert
(
script
);
caseIndex
++;
}
catch
(
Exception
e
){
log
.
error
(
"生成案例异常,e"
,
e
);
log
.
error
(
"生成案例失败: activityId={}, activityProductId={}, 提交数量={}"
,
activityId
,
activityProductId
,
caseIndex
);
}
caseIndex
++;
}
log
.
info
(
"活动商品剧本提交完成: activityId={}, activityProductId={}, 提交数量={}"
,
activityId
,
activityProductId
,
caseIndex
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment