Merge branch 'refs/heads/isComplete' into liantong

master
李一帆 2025-08-10 08:53:21 +08:00
commit fc1f4e7383
4 changed files with 10 additions and 7 deletions

View File

@ -133,7 +133,7 @@ public class AutoCallTaskScheduled {
//fetch status //fetch status
int pendingDuration = 60 * 1000 * 2; int pendingDuration = 60 * 1000 * 2;
int loopGap = 1000; int loopGap = 1000;
boolean resultFetched = false; boolean isComplete = false;
AutoCallPerson _person = null; AutoCallPerson _person = null;
while (pendingDuration > 0) { while (pendingDuration > 0) {
try { try {
@ -146,15 +146,15 @@ public class AutoCallTaskScheduled {
//联通确保tag和remark同时返回 //联通确保tag和remark同时返回
_person = autoCallTaskService.step4QueryAICCTaskResult(person); _person = autoCallTaskService.step4QueryAICCTaskResult(person);
if (_person != null && _person.getDetailRemark() != null) { if (_person != null && _person.getIsComplete() == 1) {
resultFetched = true; isComplete = true;
} }
if (resultFetched) break; if (isComplete) break;
} }
if (_person != null) person = _person; if (_person != null) person = _person;
if (resultFetched) { if (isComplete) {
//获取到任务详情且有话术标签为已知晓,中断循环 //获取到任务详情且有话术标签为已知晓,中断循环
if (AutoCallPerson.TAG_DONE.equals(person.getTag())) break; if (AutoCallPerson.TAG_DONE.equals(person.getTag())) break;
} else { } else {

View File

@ -71,6 +71,8 @@ public class AutoCallPerson {
private String detailSipTermCause; //例如”对方挂机“ private String detailSipTermCause; //例如”对方挂机“
@TableField(value = "__tag") @TableField(value = "__tag")
private String tag; //话术识别:未识别,已知晓 private String tag; //话术识别:未识别,已知晓
@TableField("__is_complete")
private Integer isComplete; //default 0
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@TableField(value = "__startring_at") @TableField(value = "__startring_at")

View File

@ -36,6 +36,7 @@ public class AICCCallRespDetail {
private Integer status; //0进行中 2结束 4暂停 private Integer status; //0进行中 2结束 4暂停
private Integer totalCount; private Integer totalCount;
private Integer sendCount; private Integer sendCount;
private boolean isComplete;
private RawVarListMap rawVarListMap; private RawVarListMap rawVarListMap;
private List<Tag> tags; private List<Tag> tags;

View File

@ -620,8 +620,7 @@ public class AutoCallTaskService2 {
detail.getResult().getData() == null || detail.getResult().getData() == null ||
detail.getResult().getData().getRecords() == null || detail.getResult().getData().getRecords() == null ||
detail.getResult().getData().getRecords().isEmpty() || detail.getResult().getData().getRecords().isEmpty() ||
detail.getResult().getData().getRecords().get(0).getTags() == null || !detail.getResult().getData().getRecords().get(0).isComplete()
detail.getResult().getData().getRecords().get(0).getTags().isEmpty()
) { ) {
return null; //tags为空代表联通平台还未或正在呼叫还没有结果信息应继续刷接口 return null; //tags为空代表联通平台还未或正在呼叫还没有结果信息应继续刷接口
} }
@ -631,6 +630,7 @@ public class AutoCallTaskService2 {
String dialRemark = record.getRemark(); String dialRemark = record.getRemark();
AICCCallRespDetail.RawVarListMap rawVarListMap = record.getRawVarListMap(); AICCCallRespDetail.RawVarListMap rawVarListMap = record.getRawVarListMap();
//已产生结果信息 //已产生结果信息
person.setIsComplete(record.isComplete() ? 1 : 0);
person.setDetailRemark(dialRemark); person.setDetailRemark(dialRemark);
person.setDetailTalkTimes(record.getTalkTimes()); person.setDetailTalkTimes(record.getTalkTimes());
person.setDetailSipTermCause(rawVarListMap.getSipTermCause()); person.setDetailSipTermCause(rawVarListMap.getSipTermCause());