package com.ruoyi.web.controller.smartor;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
import com.smartor.domain.OutboundConfigAddReqVO;
|
import com.smartor.domain.OutboundInstanceResVO;
|
import com.smartor.domain.PhoneCallBackSHVO;
|
import com.smartor.domain.PhoneCallReqYQVO;
|
import com.smartor.domain.PhoneCallResultYQVO;
|
import com.smartor.service.IServicePhoneService;
|
import com.smartor.service.IServiceSubtaskService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.Map;
|
|
/**
|
* 三汇电话流程服务 Controller
|
*
|
* @author ls
|
* @date 2026-08-26
|
*/
|
@Slf4j
|
@Api(description = "三汇电话流程服务")
|
@RestController
|
@RequestMapping("/smartor/shphone")
|
public class ServicePhoneController extends BaseController {
|
@Autowired
|
private IServiceSubtaskService serviceSubtaskService;
|
|
@Autowired
|
private IServicePhoneService iServicePhoneService;
|
|
@ApiOperation("根据电话号码,获取首个问题")
|
@PostMapping("/getFirstQues")
|
public Map<String, Object> getFirstQues(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) {
|
log.info("根据电话号码,获取首个问题?{}", phoneCallReqYQVO);
|
PhoneCallBackSHVO phoneCallBackSHVO = serviceSubtaskService.getFirstQues(phoneCallReqYQVO);
|
return success(phoneCallBackSHVO);
|
}
|
|
@ApiOperation("三汇 ASR 结果处理")
|
@PostMapping("/processResust")
|
public Map<String, Object> processResust(@RequestBody PhoneCallResultYQVO resultYQVO) {
|
log.info("三汇 ASR 结果处理 (三汇)?{}", resultYQVO);
|
PhoneCallBackSHVO phoneCallBackSHVO = serviceSubtaskService.processResust(resultYQVO);
|
return success(phoneCallBackSHVO);
|
}
|
|
@ApiOperation("新增外呼实例配置")
|
@PostMapping("/addOutboundInstance")
|
public Map<String, Object> addOutboundInstance(@RequestBody OutboundConfigAddReqVO request) {
|
log.info("新增外呼实例配置:{}", request);
|
OutboundInstanceResVO outboundInstanceResVO = iServicePhoneService.addOutboundInstance(request);
|
return success(outboundInstanceResVO);
|
}
|
|
}
|