From 562a960261b75d70abd65aa10528f09aeece94e8 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 24 九月 2024 09:49:23 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java |   81 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index b4a6887..7a0b1e6 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.smartor;
 
+import com.github.pagehelper.ISelect;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -20,6 +21,9 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -40,21 +44,33 @@
      * 鏌ヨ鎮h�呴殢璁夸俊鎭�
      */
     @ApiOperation("鏌ヨ鎮h�呴殢璁夸俊鎭�")
-    @PreAuthorize("@ss.hasPermi('system:taskcall:list')")
+    //@PreAuthorize("@ss.hasPermi('system:taskcall:list')")
     @PostMapping("/patItem")
     public TableDataInfo patItem(@RequestBody ServiceSubtask ivrTaskcall) {
         PageUtils.startPageByPost(ivrTaskcall.getPageNum(), ivrTaskcall.getPageSize());
-        return getDataTable(serviceSubtaskService.patItem(ivrTaskcall));
+        List<ServiceSubtask> serviceSubtaskList = serviceSubtaskService.patItem(ivrTaskcall);
+        //鑾峰彇total
+        long total = PageUtils.count(new ISelect() {
+            @Override
+            public void doSelect() {
+                ivrTaskcall.setPageNum(null);
+                ivrTaskcall.setPageSize(null);
+                serviceSubtaskService.patItem(ivrTaskcall);
+            }
+        });
+        return getDataTable2(total, serviceSubtaskList);
+//        return getDataTable(serviceSubtaskService.patItem(ivrTaskcall));
     }
 
     /**
      * 瀵煎嚭鍗曚竴浠诲姟锛堥殢璁垮鏁欙級鍒楄〃
      */
-    @PreAuthorize("@ss.hasPermi('system:taskcall:export')")
+    //@PreAuthorize("@ss.hasPermi('system:taskcall:export')")
     @Log(title = "鍗曚竴浠诲姟锛堥殢璁垮鏁欙級", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, ServiceSubtask ivrTaskcall) {
-        List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(ivrTaskcall);
+    public void export(HttpServletResponse response, ServiceSubtask serviceSubtask) {
+        ServiceSubtaskVO serviceSubtaskVO = DtoConversionUtils.sourceToTarget(serviceSubtask, ServiceSubtaskVO.class);
+        List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskVO);
         ExcelUtil<ServiceSubtask> util = new ExcelUtil<ServiceSubtask>(ServiceSubtask.class);
         util.exportExcel(response, list, "鍗曚竴浠诲姟锛堥殢璁匡級鏁版嵁");
     }
@@ -62,7 +78,7 @@
     /**
      * 鑾峰彇鍗曚竴浠诲姟锛堥殢璁匡級璇︾粏淇℃伅
      */
-    @PreAuthorize("@ss.hasPermi('system:taskcall:query')")
+    //@PreAuthorize("@ss.hasPermi('system:taskcall:query')")
     @GetMapping(value = "/getInfo/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(serviceSubtaskService.selectServiceSubtaskById(id));
@@ -72,7 +88,7 @@
      * 鏂板鎴栦慨鏀瑰垹闄ゅ崟涓�浠诲姟
      */
     @ApiOperation("鏂板鎴栦慨鏀瑰垹闄ゅ崟涓�浠诲姟")
-    @PreAuthorize("@ss.hasPermi('system:task:add')")
+    //@PreAuthorize("@ss.hasPermi('system:task:add')")
     @Log(title = "鍗曚竴浠诲姟锛堥殢璁匡級", businessType = BusinessType.INSERT)
     @PostMapping("/insertOrUpdateTask")
     public AjaxResult insertOrUpdateHeTask(@RequestBody ServiceTaskVO ivrTaskVO) {
@@ -80,7 +96,13 @@
         LoginUser loginUser = getLoginUser();
         SysUser user = loginUser.getUser();
         ivrTaskVO.setCreateBy(user.getNickName());
-        return toAjax(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO));
+        return success(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO));
+    }
+
+    @ApiOperation("淇敼瀛愪换鍔�")
+    @PostMapping("/update")
+    public AjaxResult update(@RequestBody ServiceSubtask serviceSubtask) {
+        return toAjax(serviceSubtaskService.updateServiceSubtask(serviceSubtask));
     }
 
     /**
@@ -90,8 +112,8 @@
     @PostMapping("/queryTaskByCondition")
     public AjaxResult queryTaskByCondition(@RequestBody ServiceSubtaskVO ivrTaskcallVO) {
         //鏍规嵁鍏ュ弬鏌ヨ淇℃伅
-        ServiceSubtask ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, ServiceSubtask.class);
-        ServiceTaskVO ivrTaskVO = serviceSubtaskService.queryTaskByCondition(ivrTaskcall);
+        ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, ServiceSubtask.class);
+        ServiceTaskVO ivrTaskVO = serviceSubtaskService.queryTaskByCondition(serviceSubtask);
         return success(ivrTaskVO);
     }
 
@@ -101,9 +123,28 @@
     @ApiOperation("鐢佃瘽鍥炶皟浠诲姟")
     @PostMapping("/phoneCallBack")
     public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) {
-//        log.error("鐢佃瘽鍥炶皟浠诲姟鎴愬姛浜嗕笉锛焮}", phoneCallBackVO);
         serviceSubtaskService.phoneCallBack(phoneCallBackVO);
         return success();
+    }
+
+    @ApiOperation("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划)")
+    @PostMapping("/phoneCallBackYQ")
+    public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) {
+        log.error("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划) 锛焮}", phoneCallReqYQVO);
+        PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO);
+        return phoneCallBackYQVO;
+    }
+
+    /**
+     * 鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)
+     */
+    @ApiOperation("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)")
+    @PostMapping("/taskPull")
+    public List<PullTaskVO> taskPull() {
+        log.error("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)");
+        List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull();
+        log.error("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划):{}", pullTaskVOList);
+        return pullTaskVOList;
     }
 
     /**
@@ -115,4 +156,22 @@
         return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
     }
 
+    /**
+     * 閫氳瘽璁板綍鍥炶皟
+     */
+    @ApiOperation("閫氳瘽璁板綍鍥炶皟")
+    @PostMapping("/recordAccept")
+    public AjaxResult recordAccept(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) {
+        return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
+    }
+
+    /**
+     * 鑾峰彇姣忎釜鏈堢殑闅忚銆佸璇婇噺
+     */
+    @ApiOperation("鑾峰彇姣忎釜鏈堢殑闅忚銆佸璇婇噺")
+    @PostMapping("/getSfFzInfoEveryMonth")
+    public TableDataInfo getSfFzInfoEveryMonth(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) {
+        return getDataTable(serviceSubtaskService.getSfFzInfoEveryMonth(serviceSubtaskCountReq));
+    }
+
 }

--
Gitblit v1.9.3