| | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.config.RabbitMqCallPhoneConfig; |
| | | import com.smartor.config.RobotPhoneUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.robot.RobotData; |
| | | import com.smartor.domain.robot.RobotDataConfig; |
| | | import com.smartor.domain.robot.RobotIdlenumVO; |
| | | import com.smartor.domain.robot.RobotScritpTemplateVO; |
| | | import org.springframework.amqp.core.Message; |
| | | import org.springframework.context.support.ClassPathXmlApplicationContext; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | private List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVO; |
| | | private RedisCache redisCache; |
| | | private IvrTaskTemplateVO ivrTaskTemplateVO; |
| | | private RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig; |
| | | private Message message; |
| | | private SendService sendService; |
| | | private String phonePath; |
| | | private RobotPhoneUtils robotPhoneUtils; |
| | | |
| | | |
| | | public PhoneTask(IvrTaskSingle ivrTaskSingle, IvrTaskTemplateVO ivrTaskTemplateVO, RedisCache redisCache, RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig, Message message, SendService sendService, String phonePath, RobotPhoneUtils robotPhoneUtils) { |
| | | public PhoneTask(IvrTaskSingle ivrTaskSingle, IvrTaskTemplateVO ivrTaskTemplateVO, RedisCache redisCache, SendService sendService, String phonePath, RobotPhoneUtils robotPhoneUtils) { |
| | | this.ivrTaskSingle = DtoConversionUtils.sourceToTarget(ivrTaskSingle, IvrTaskSingle.class); |
| | | this.ivrTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList(), IvrTaskTemplateScriptVO.class); |
| | | this.ivrTaskTemplateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplateVO.class); |
| | | this.redisCache = redisCache; |
| | | this.rabbitMqCallPhoneConfig = rabbitMqCallPhoneConfig; |
| | | this.message = message; |
| | | this.sendService = sendService; |
| | | this.phonePath = phonePath; |
| | | this.robotPhoneUtils = robotPhoneUtils; |
| | |
| | | Map<String, String> obMap = objectMapper.readValue(ob, Map.class); |
| | | Thread.sleep(1000); |
| | | redisCache.setCacheObject(uuid + "state_id", "0", 10, TimeUnit.MINUTES); |
| | | rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.ob1", data, 0L); |
| | | // rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.ob1", data, 0L); |
| | | //这里先注释,state_id,电话那边,只能返回6,不能返回0,还需要电话那边进行修改,那边修改之后,上面两行可删除,将下面的解开注释 |
| | | // if (obMap.get("state_id").equals("0")) { |
| | | // // 说明打通了 |