|
|
@@ -466,7 +466,6 @@ public class CompanyVoiceRoboticServiceImpl extends ServiceImpl<CompanyVoiceRobo
|
|
|
wxAccount = companyWxAccountService.selectCompanyWxAccountById(wxClient.getAccountId());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
CompanySmsTemp temp = smsTempService.selectCompanySmsTempById(smsTempId);
|
|
|
|
|
|
if (temp != null && temp.getStatus().equals(1) && temp.getIsAudit().equals(1)) {
|
|
|
@@ -1075,6 +1074,23 @@ public class CompanyVoiceRoboticServiceImpl extends ServiceImpl<CompanyVoiceRobo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 初始化场景任务客户流程
|
|
|
+ * @param robotic
|
|
|
+ * @param business
|
|
|
+ */
|
|
|
+ private void initWorkflows4SceneTask(CompanyVoiceRobotic robotic,CompanyVoiceRoboticBusiness business) {
|
|
|
+ final Long workflowId = robotic.getCompanyAiWorkflowId();
|
|
|
+ final Long roboticId = robotic.getId();
|
|
|
+ Map<String, Object> inputVariables = new HashMap<>();
|
|
|
+ inputVariables.put("roboticId", roboticId);
|
|
|
+ inputVariables.put("businessId", business.getId());
|
|
|
+ inputVariables.put("cidGroupNo", robotic.getCidGroupNo());
|
|
|
+ inputVariables.put("runtimeRangeStart", robotic.getRuntimeRangeStart());
|
|
|
+ inputVariables.put("runtimeRangeEnd", robotic.getRuntimeRangeEnd());
|
|
|
+ companyWorkflowEngine.initialize(workflowId, inputVariables);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 初始化并执行工作流
|
|
|
*/
|
|
|
@@ -1186,8 +1202,10 @@ public class CompanyVoiceRoboticServiceImpl extends ServiceImpl<CompanyVoiceRobo
|
|
|
companyWxClientServiceImpl.saveOrUpdate(companyWxClient);
|
|
|
}
|
|
|
//写入业务表数据
|
|
|
- buildTaskBussiness4SceneTask(companyVoiceRobotic,callee);
|
|
|
+ CompanyVoiceRoboticBusiness companyVoiceRoboticBusiness = buildTaskBussiness4SceneTask(companyVoiceRobotic, callee);
|
|
|
//初始化流程表 todo
|
|
|
+ initWorkflows4SceneTask(companyVoiceRobotic,companyVoiceRoboticBusiness);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1303,7 +1321,7 @@ public class CompanyVoiceRoboticServiceImpl extends ServiceImpl<CompanyVoiceRobo
|
|
|
return resArr;
|
|
|
}
|
|
|
|
|
|
- public void buildTaskBussiness4SceneTask(CompanyVoiceRobotic robotic,CompanyVoiceRoboticCallees callee){
|
|
|
+ public CompanyVoiceRoboticBusiness buildTaskBussiness4SceneTask(CompanyVoiceRobotic robotic,CompanyVoiceRoboticCallees callee){
|
|
|
List<CompanyWxClient> companyWxClients = companyWxClientMapper.selectListByRoboticId(robotic.getId());
|
|
|
Map<String, CompanyWxClient> clientMp = companyWxClients.stream().collect(Collectors.toMap(e -> e.getRoboticId() + "-" + e.getCustomerId(), e -> e));
|
|
|
CompanyVoiceRoboticBusiness companyVoiceRoboticBusiness = new CompanyVoiceRoboticBusiness();
|
|
|
@@ -1315,6 +1333,7 @@ public class CompanyVoiceRoboticServiceImpl extends ServiceImpl<CompanyVoiceRobo
|
|
|
companyVoiceRoboticBusiness.setSendMsgDone(0);
|
|
|
companyVoiceRoboticBusiness.setCreateTime(new Date());
|
|
|
companyVoiceRoboticBusinessMapper.insert(companyVoiceRoboticBusiness);
|
|
|
+ return companyVoiceRoboticBusiness;
|
|
|
}
|
|
|
public void buildTaskBussiness(CompanyVoiceRobotic robotic) {
|
|
|
List<CompanyVoiceRoboticCallees> calleesList = companyVoiceRoboticCalleesMapper.selectByRoboticId(robotic.getId());
|