From 1bb3b8d64a5bc0265510e899012522291bb2084a Mon Sep 17 00:00:00 2001 From: lyf66 Date: Fri, 8 Aug 2025 15:32:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../whdc/component/AutoCallTaskScheduled.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/whdc/component/AutoCallTaskScheduled.java b/src/main/java/com/whdc/component/AutoCallTaskScheduled.java index 499cac5..9570f45 100644 --- a/src/main/java/com/whdc/component/AutoCallTaskScheduled.java +++ b/src/main/java/com/whdc/component/AutoCallTaskScheduled.java @@ -144,15 +144,23 @@ public class AutoCallTaskScheduled { resultFetched = autoCallTaskService.step4QueryAICCTaskResult(person); if (resultFetched) break; } + AutoCallPerson _person = autoCallTaskService.getPersonMapper().selectById(person.getId()); person = _person; - if (!resultFetched) { + + if (resultFetched) { + //获取到任务详情且有话术标签为已知晓,中断循环 + if (AutoCallPerson.TAG_DONE.equals(person.getTag())) break; + } else { + //获取任务详情超时 if (person.getUploadedTimes() == 2) { + //已经呼叫两次了,中断循环 autoCallTaskService.markPersonDetailQueryTimeout(person); + break; } } + //重呼等15秒 - if (AutoCallPerson.TAG_DONE.equals(person.getTag())) break; try { Thread.sleep(15*1000); } catch (InterruptedException ignore) { @@ -160,10 +168,11 @@ public class AutoCallTaskScheduled { break; } } - if (!AutoCallPerson.TAG_DONE.equals(person.getTag())) { - autoCallTaskService.cancelPerson(person); - } else { + if (AutoCallPerson.TAG_DONE.equals(person.getTag())) { + //有话术标签为已知晓,中断后续呼叫 break; + } else { + autoCallTaskService.cancelPerson(person); } } } catch (Exception e) {