ÎļþÃû´Ó ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java ÐÞ¸Ä |
| | |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.robot.back.RobotAIDialogBack; |
| | | import com.smartor.domain.robot.back.RobotCallBack; |
| | | import com.smartor.service.IIvrTaskSingleService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Slf4j |
| | | @Api(description = "åä¸ä»»å¡ï¼é访宣æï¼") |
| | | @RestController |
| | | @RequestMapping("/smartor/tasksingle") |
| | | public class IvrTaskSingleController extends BaseController { |
| | | @RequestMapping("/smartor/serviceSubtask") |
| | | public class ServiceSubtaskController extends BaseController { |
| | | @Autowired |
| | | private IIvrTaskSingleService ivrTaskcallService; |
| | | private IServiceSubtaskService serviceSubtaskService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
éè®¿ä¿¡æ¯ |
| | |
| | | @ApiOperation("æ¥è¯¢æ£è
é访信æ¯") |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody IvrTaskSingle ivrTaskcall) { |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtask ivrTaskcall) { |
| | | PageUtils.startPageByPost(ivrTaskcall.getPageNum(), ivrTaskcall.getPageSize()); |
| | | return getDataTable(ivrTaskcallService.patItem(ivrTaskcall)); |
| | | return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:export')") |
| | | @Log(title = "åä¸ä»»å¡ï¼é访宣æï¼", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrTaskSingle ivrTaskcall) { |
| | | List<IvrTaskSingle> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall); |
| | | ExcelUtil<IvrTaskSingle> util = new ExcelUtil<IvrTaskSingle>(IvrTaskSingle.class); |
| | | public void export(HttpServletResponse response, ServiceSubtask ivrTaskcall) { |
| | | List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(ivrTaskcall); |
| | | ExcelUtil<ServiceSubtask> util = new ExcelUtil<ServiceSubtask>(ServiceSubtask.class); |
| | | util.exportExcel(response, list, "åä¸ä»»å¡ï¼éè®¿ï¼æ°æ®"); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(ivrTaskcallService.selectIvrTaskcallById(id)); |
| | | return success(serviceSubtaskService.selectServiceSubtaskById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:task:add')") |
| | | @Log(title = "åä¸ä»»å¡ï¼é访ï¼", businessType = BusinessType.INSERT) |
| | | @PostMapping("/insertOrUpdateTask") |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskVO ivrTaskVO) { |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody ServiceTaskVO ivrTaskVO) { |
| | | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskVO.setCreateBy(user.getNickName()); |
| | | return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskVO)); |
| | | return toAjax(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiOperation("æ ¹æ®æ¡ä»¶æ¥è¯¢ä»»å¡ä¿¡æ¯") |
| | | @PostMapping("/queryTaskByCondition") |
| | | public AjaxResult queryTaskByCondition(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | public AjaxResult queryTaskByCondition(@RequestBody ServiceSubtaskVO ivrTaskcallVO) { |
| | | //æ ¹æ®å
¥åæ¥è¯¢ä¿¡æ¯ |
| | | IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class); |
| | | IvrTaskVO ivrTaskVO = ivrTaskcallService.queryTaskByCondition(ivrTaskcall); |
| | | ServiceSubtask ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, ServiceSubtask.class); |
| | | ServiceTaskVO ivrTaskVO = serviceSubtaskService.queryTaskByCondition(ivrTaskcall); |
| | | return success(ivrTaskVO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/phoneCallBack") |
| | | public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) { |
| | | // log.error("çµè¯åè°ä»»å¡æåäºä¸ï¼{}", phoneCallBackVO); |
| | | ivrTaskcallService.phoneCallBack(phoneCallBackVO); |
| | | serviceSubtaskService.phoneCallBack(phoneCallBackVO); |
| | | return success(); |
| | | } |
| | | /** |
| | | * æ£è
é®é¢ç»æè®°å½ |
| | | */ |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswer(serviceSubTaskDetailReq)); |
| | | } |
| | | |
| | | } |