|
@@ -30,6 +30,7 @@ import com.fs.crm.param.SmsSendBatchParam;
|
|
|
import com.fs.crm.service.impl.CrmCustomerServiceImpl;
|
|
import com.fs.crm.service.impl.CrmCustomerServiceImpl;
|
|
|
import com.fs.enums.ExecutionStatusEnum;
|
|
import com.fs.enums.ExecutionStatusEnum;
|
|
|
import com.fs.enums.NodeTypeEnum;
|
|
import com.fs.enums.NodeTypeEnum;
|
|
|
|
|
+import com.fs.enums.TaskTypeEnum;
|
|
|
import com.fs.qw.domain.QwUser;
|
|
import com.fs.qw.domain.QwUser;
|
|
|
import com.fs.qw.mapper.QwUserMapper;
|
|
import com.fs.qw.mapper.QwUserMapper;
|
|
|
import com.fs.qw.service.impl.QwExternalContactServiceImpl;
|
|
import com.fs.qw.service.impl.QwExternalContactServiceImpl;
|
|
@@ -1035,29 +1036,24 @@ public class CompanyVoiceRoboticServiceImpl extends ServiceImpl<CompanyVoiceRobo
|
|
|
if (robotic.getCompanyAiWorkflowId() == null) {
|
|
if (robotic.getCompanyAiWorkflowId() == null) {
|
|
|
throw new RuntimeException("任务未配置工作流: " + id);
|
|
throw new RuntimeException("任务未配置工作流: " + id);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
robotic.setTaskStatus(1);
|
|
robotic.setTaskStatus(1);
|
|
|
updateById(robotic);
|
|
updateById(robotic);
|
|
|
-
|
|
|
|
|
- // 根据任务加微方式决定是否直接分配微信 平均时 直接分配用户
|
|
|
|
|
- if (Integer.valueOf(0).equals(robotic.getAddType())) {
|
|
|
|
|
|
|
+ // 根据任务加微方式决定是否直接分配微信 平均时 直接分配用户 场景任务不做分配
|
|
|
|
|
+ if (Integer.valueOf(0).equals(robotic.getAddType()) && robotic.getTaskType().equals(TaskTypeEnum.ORDINARY.getValue())) {
|
|
|
allocateWx(robotic);
|
|
allocateWx(robotic);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 新增启动写入任务业务表数据
|
|
// 新增启动写入任务业务表数据
|
|
|
- buildTaskBussiness(robotic);
|
|
|
|
|
-
|
|
|
|
|
- // 查询业务列表
|
|
|
|
|
- List<CompanyVoiceRoboticBusiness> roboticBusinesseList = companyVoiceRoboticBusinessMapper
|
|
|
|
|
- .selectList(new QueryWrapper<CompanyVoiceRoboticBusiness>().eq("robotic_id", id));
|
|
|
|
|
-
|
|
|
|
|
- if (roboticBusinesseList.isEmpty()) {
|
|
|
|
|
- log.warn("任务没有业务数据: {}", id);
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if(robotic.getTaskType().equals(TaskTypeEnum.ORDINARY.getValue())){
|
|
|
|
|
+ buildTaskBussiness(robotic);
|
|
|
|
|
+ // 查询业务列表
|
|
|
|
|
+ List<CompanyVoiceRoboticBusiness> roboticBusinesseList = companyVoiceRoboticBusinessMapper
|
|
|
|
|
+ .selectList(new QueryWrapper<CompanyVoiceRoboticBusiness>().eq("robotic_id", id));
|
|
|
|
|
+ if (roboticBusinesseList.isEmpty()) {
|
|
|
|
|
+ log.warn("任务没有业务数据: {}", id);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ initAndExecuteWorkflows(robotic, roboticBusinesseList);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 初始化并执行工作流
|
|
|
|
|
- initAndExecuteWorkflows(robotic, roboticBusinesseList);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|