| | |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVO) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | ivrTaskTemplateScriptVO.setQuestionText(ivrTaskTemplateScriptVO.getQuestionText().replace(key, map.get(key))); |
| | | ivrTaskTemplateScriptVO.setScriptContent(ivrTaskTemplateScriptVO.getScriptContent().replace(key, map.get(key))); |
| | | } |
| | | } |
| | | } |
| | |
| | | redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(uuid + "ivrTaskTemplateVO", ivrTaskTemplateVO, 120, TimeUnit.MINUTES); |
| | | |
| | | System.out.println("----------------uuID为 :" + uuid + " " + ivrTaskSingle.getSendname() + " " + returnQues.getNowQuestion().getQuestionText() + " " + ivrTaskSingle.getPhone()); |
| | | System.out.println("----------------uuID为 :" + uuid + " " + ivrTaskSingle.getSendname() + " " + returnQues.getNowQuestion().getScriptContent() + " " + ivrTaskSingle.getPhone()); |
| | | |
| | | //先将话术放到ob_queue队列中 |
| | | IvrTaskcallPhoneMQ ivrTaskcallPhoneMQ = new IvrTaskcallPhoneMQ(); |
| | | ivrTaskcallPhoneMQ.setScript(ivrTaskTemplateVO.getRevisitBefore() + returnQues.getNowQuestion().getQuestionText()); |
| | | ivrTaskcallPhoneMQ.setScript(ivrTaskTemplateVO.getRevisitBefore() + returnQues.getNowQuestion().getScriptContent()); |
| | | ivrTaskcallPhoneMQ.setType("1"); |
| | | ivrTaskcallPhoneMQ.setUuid(uuid); |
| | | String data = JSON.toJSONString(ivrTaskcallPhoneMQ); |
| | |
| | | |
| | | //调用机器人电话,开始电话 |
| | | String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskSingle.getPhone(), uuid, true); |
| | | System.out.println("----------------uuID为 :" + uuid + " " + ivrTaskSingle.getSendname() + " " + returnQues.getNowQuestion().getQuestionText() + " " + ivrTaskSingle.getPhone() + "----------已经拨打"); |
| | | System.out.println("----------------uuID为 :" + uuid + " " + ivrTaskSingle.getSendname() + " " + returnQues.getNowQuestion().getScriptContent() + " " + ivrTaskSingle.getPhone() + "----------已经拨打"); |
| | | Map<String, String> obMap = objectMapper.readValue(ob, Map.class); |
| | | Thread.sleep(1000); |
| | | redisCache.setCacheObject(uuid + "state_id", "0", 10, TimeUnit.MINUTES); |