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 323670b1
authored
Jun 24, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:调用大模型生成预学习话术增加车型/用户字段
1 parent
dc98005c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
5 deletions
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/model/BadgeRecordings.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/model/prelearn/PreLearnProductScript.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/prelearn/PreLearnBigModelService.java
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/BadgeRecordingsMapper.xml
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/model/BadgeRecordings.java
View file @
323670b
...
...
@@ -254,4 +254,7 @@ public class BadgeRecordings implements Serializable {
/** 接待开始时间(JOIN自reception_customer_info) */
@Transient
private
Date
receptionStartTime
;
@Transient
private
String
customerName
;
}
\ No newline at end of file
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/model/prelearn/PreLearnProductScript.java
View file @
323670b
...
...
@@ -54,6 +54,18 @@ public class PreLearnProductScript implements Serializable {
@Column
(
name
=
"error_msg"
)
private
String
errorMsg
;
/**
* 车型
*/
@Column
(
name
=
"car_model"
)
private
String
carModel
;
/**
* 车主姓名
*/
@Column
(
name
=
"customer_name"
)
private
String
customerName
;
@ApiModelProperty
(
notes
=
"创建人"
)
@Column
(
name
=
"created_by"
)
private
String
createdBy
;
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/prelearn/PreLearnBigModelService.java
View file @
323670b
...
...
@@ -162,15 +162,19 @@ public class PreLearnBigModelService {
}
// 2d. 为每个订单生成剧本
int
caseIndex
=
0
;
int
caseIndex
=
1
;
for
(
OrderCustomerDTO
orderCustomer
:
orderCustomers
)
{
if
(
caseIndex
>=
50
)
{
break
;
}
// 2d-i. 查询录音及ASR文本(连表查询)
String
asrText
=
fetchAsrText
(
orderCustomer
.
getCustomerPhone
(),
//获取接待录音数据
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
());
...
...
@@ -194,6 +198,8 @@ public class PreLearnBigModelService {
.
aiStatus
(
"GENERATING"
)
.
createdBy
(
"system"
)
.
createdDate
(
new
Date
())
.
carModel
(
badgeRecordings
.
getCarModel
())
.
customerName
(
badgeRecordings
.
getCustomerName
())
.
build
();
preLearnProductScriptMapper
.
insert
(
script
);
...
...
@@ -204,6 +210,23 @@ public class PreLearnBigModelService {
}
}
private
BadgeRecordings
fetchReceptionRecordings
(
String
phoneNumber
,
Date
orderDate
)
{
// 1. 连表查询录音(reception_customer_info LEFT JOIN inspection_badge_recordings)
List
<
BadgeRecordings
>
recordings
=
badgeRecordingsMapper
.
selectByPhoneNumber
(
phoneNumber
);
if
(
CollectionUtils
.
isEmpty
(
recordings
))
{
log
.
info
(
"未找到录音记录: phone={}"
,
phoneNumber
);
return
null
;
}
// 2. 取接待时间与earliestCreatedDate最接近的一条录音
BadgeRecordings
closestRecording
=
findClosestByReceptionTime
(
recordings
,
orderDate
);
if
(
closestRecording
==
null
||
!
StringUtils
.
hasText
(
closestRecording
.
getProcessTaskId
()))
{
log
.
info
(
"无有效录音或processTaskId: phone={}"
,
phoneNumber
);
return
null
;
}
return
closestRecording
;
}
/**
* 查询大模型任务结果(HTTP GET)
*
...
...
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/BadgeRecordingsMapper.xml
View file @
323670b
...
...
@@ -32,6 +32,8 @@
<result
column=
"car_brandId"
jdbcType=
"TINYINT"
property=
"carBrandId"
/>
<result
column=
"one_car_brandId"
jdbcType=
"TINYINT"
property=
"oneCarBrandId"
/>
<result
column=
"reception_start_time"
jdbcType=
"TIMESTAMP"
property=
"receptionStartTime"
/>
<result
column=
"customer_name"
jdbcType=
"VARCHAR"
property=
"carModel"
/>
<result
column=
"car_model"
jdbcType=
"VARCHAR"
property=
"createdBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -132,7 +134,7 @@
i.recording_start_time, i.recording_end_time, i.recording_duration, i.recording_url, i.right_channel_recording_url,
i.sync_time, i.recording_id, i.resolved_flag, i.upload_flag, i.upload_url, i.process_task_id, i.created_by, i.created_date,
i.updated_by, i.updated_date, i.deleted_flag,i.reception_id,
c.reception_start_time AS reception_start_time
c.reception_start_time AS reception_start_time
,c.car_model,c.customer_name
FROM reception_customer_info c
LEFT JOIN inspection_badge_recordings i ON i.reception_id = c.id
WHERE c.phone_number = #{phoneNumber}
...
...
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