From ecda68f9ffbd4e0f01d3939550906f670b1e0482 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 21 六月 2024 15:56:28 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java                           |   22 
 smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java                         |    9 
 smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml                                           |  243 ++-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateTargetoptionController.java |   91 +
 smartor/src/main/java/com/smartor/service/impl/SvyTasksingledetailServiceImpl.java                    |   97 +
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateScriptController.java       |   98 +
 smartor/src/main/java/com/smartor/domain/SvyLibScript.java                                            |    7 
 smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateTargetoptionMapper.java                       |   64 
 smartor/src/main/java/com/smartor/service/ISvyTaskTemplateTargetoptionService.java                    |   62 
 smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml                              |    4 
 smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml                               |    8 
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java                             |  209 ++
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java                                   |  244 +++
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java                                         |    2 
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java                                       |  237 +++
 smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java                                      |    7 
 smartor/src/main/java/com/smartor/mapper/SvyTaskSingleMapper.java                                     |    3 
 smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml                                  |    8 
 smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml                                   |   18 
 smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateScriptMapper.java                             |   64 
 smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java                          |  113 +
 smartor/src/main/java/com/smartor/service/ISvyTasksingledetailService.java                            |   62 
 smartor/src/main/java/com/smartor/service/ISvyTaskSingleService.java                                  |    6 
 smartor/src/main/java/com/smartor/service/ISvyTaskTemplateScriptService.java                          |   62 
 smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml                                |   30 
 smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java                        |  199 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskSingleController.java               |   42 
 smartor/src/main/java/com/smartor/domain/SvyTaskVO.java                                               |  318 ++++
 smartor/src/main/java/com/smartor/mapper/SvyTasksingledetailMapper.java                               |   63 
 smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml                                      |    5 
 smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateScriptServiceImpl.java                  |   97 +
 smartor/src/main/java/com/smartor/domain/SvyTasksingledetail.java                                     |  576 +++++++
 smartor/src/main/java/com/smartor/service/ISvyTaskTemplateService.java                                |   15 
 smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateTargetoptionServiceImpl.java            |   97 +
 smartor/src/main/java/com/smartor/domain/SvyTask.java                                                 |   44 
 smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml                                           |    2 
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java                                 |  251 +++
 smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml                       |  201 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTasksingledetailController.java         |   98 +
 smartor/src/main/java/com/smartor/domain/SvyTaskSingle.java                                           |    7 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateController.java             |   50 
 smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml                                    |    7 
 smartor/src/main/java/com/smartor/domain/SvyLibScriptOption.java                                      |    6 
 smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml                                     |   14 
 smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml                        |    4 
 smartor/src/main/resources/mapper/smartor/SvyTasksingledetailMapper.xml                               |  258 +++
 smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java                                     |    7 
 smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml                             |  241 +++
 smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java                                        |    7 
 49 files changed, 4,182 insertions(+), 197 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskSingleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskSingleController.java
index fbb660e..f5e8108 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskSingleController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskSingleController.java
@@ -3,11 +3,16 @@
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.IvrTaskVO;
 import com.smartor.domain.SvyTaskSingle;
+import com.smartor.domain.SvyTaskVO;
 import com.smartor.service.ISvyTaskSingleService;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -23,8 +28,7 @@
  */
 @RestController
 @RequestMapping("/smartor/svysingle")
-public class SvyTaskSingleController extends BaseController
-{
+public class SvyTaskSingleController extends BaseController {
     @Autowired
     private ISvyTaskSingleService svyTaskSingleService;
 
@@ -33,8 +37,7 @@
      */
     @PreAuthorize("@ss.hasPermi('system:single:list')")
     @GetMapping("/list")
-    public TableDataInfo list(SvyTaskSingle svyTaskSingle)
-    {
+    public TableDataInfo list(SvyTaskSingle svyTaskSingle) {
         startPage();
         List<SvyTaskSingle> list = svyTaskSingleService.selectSvyTaskSingleList(svyTaskSingle);
         return getDataTable(list);
@@ -46,8 +49,7 @@
     @PreAuthorize("@ss.hasPermi('system:single:export')")
     @Log(title = "鍗曚竴浠诲姟锛堥棶鍗凤級", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, SvyTaskSingle svyTaskSingle)
-    {
+    public void export(HttpServletResponse response, SvyTaskSingle svyTaskSingle) {
         List<SvyTaskSingle> list = svyTaskSingleService.selectSvyTaskSingleList(svyTaskSingle);
         ExcelUtil<SvyTaskSingle> util = new ExcelUtil<SvyTaskSingle>(SvyTaskSingle.class);
         util.exportExcel(response, list, "鍗曚竴浠诲姟锛堥棶鍗凤級鏁版嵁");
@@ -58,8 +60,7 @@
      */
     @PreAuthorize("@ss.hasPermi('system:single:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(svyTaskSingleService.selectSvyTaskSingleById(id));
     }
 
@@ -69,8 +70,7 @@
     @PreAuthorize("@ss.hasPermi('system:single:add')")
     @Log(title = "鍗曚竴浠诲姟锛堥棶鍗凤級", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody SvyTaskSingle svyTaskSingle)
-    {
+    public AjaxResult add(@RequestBody SvyTaskSingle svyTaskSingle) {
         return toAjax(svyTaskSingleService.insertSvyTaskSingle(svyTaskSingle));
     }
 
@@ -80,8 +80,7 @@
     @PreAuthorize("@ss.hasPermi('system:single:edit')")
     @Log(title = "鍗曚竴浠诲姟锛堥棶鍗凤級", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody SvyTaskSingle svyTaskSingle)
-    {
+    public AjaxResult edit(@RequestBody SvyTaskSingle svyTaskSingle) {
         return toAjax(svyTaskSingleService.updateSvyTaskSingle(svyTaskSingle));
     }
 
@@ -90,9 +89,22 @@
      */
     @PreAuthorize("@ss.hasPermi('system:single:remove')")
     @Log(title = "鍗曚竴浠诲姟锛堥棶鍗凤級", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(svyTaskSingleService.deleteSvyTaskSingleByIds(ids));
     }
+
+    /**
+     * 鏂板鎴栦慨鏀瑰垹闄ら棶鍗蜂换鍔�
+     */
+    @ApiOperation("鏂板鎴栦慨鏀瑰垹闄ら棶鍗蜂换鍔�")
+    @PreAuthorize("@ss.hasPermi('system:task:add')")
+    @PostMapping("/insertOrUpdateSvyTask")
+    public AjaxResult insertOrUpdateSvyTask(@RequestBody SvyTaskVO svyTaskVO) {
+
+        LoginUser loginUser = getLoginUser();
+        SysUser user = loginUser.getUser();
+        svyTaskVO.setCreateBy(user.getNickName());
+        return toAjax(svyTaskSingleService.insertOrUpdateSvyTask(svyTaskVO));
+    }
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateController.java
index a26084d..41d382b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateController.java
@@ -6,8 +6,11 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.SendTaskVO;
 import com.smartor.domain.SvyTaskTemplate;
+import com.smartor.domain.SvyTaskTemplateVO;
 import com.smartor.service.ISvyTaskTemplateService;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -23,8 +26,7 @@
  */
 @RestController
 @RequestMapping("/smartor/svytemplate")
-public class SvyTaskTemplateController extends BaseController
-{
+public class SvyTaskTemplateController extends BaseController {
     @Autowired
     private ISvyTaskTemplateService svyTaskTemplateService;
 
@@ -33,8 +35,7 @@
      */
     @PreAuthorize("@ss.hasPermi('system:template:list')")
     @GetMapping("/list")
-    public TableDataInfo list(SvyTaskTemplate svyTaskTemplate)
-    {
+    public TableDataInfo list(SvyTaskTemplate svyTaskTemplate) {
         startPage();
         List<SvyTaskTemplate> list = svyTaskTemplateService.selectSvyTaskTemplateList(svyTaskTemplate);
         return getDataTable(list);
@@ -46,8 +47,7 @@
     @PreAuthorize("@ss.hasPermi('system:template:export')")
     @Log(title = "浠诲姟闂嵎妯℃澘", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, SvyTaskTemplate svyTaskTemplate)
-    {
+    public void export(HttpServletResponse response, SvyTaskTemplate svyTaskTemplate) {
         List<SvyTaskTemplate> list = svyTaskTemplateService.selectSvyTaskTemplateList(svyTaskTemplate);
         ExcelUtil<SvyTaskTemplate> util = new ExcelUtil<SvyTaskTemplate>(SvyTaskTemplate.class);
         util.exportExcel(response, list, "浠诲姟闂嵎妯℃澘鏁版嵁");
@@ -58,8 +58,7 @@
      */
     @PreAuthorize("@ss.hasPermi('system:template:query')")
     @GetMapping(value = "/{svyid}")
-    public AjaxResult getInfo(@PathVariable("svyid") Long svyid)
-    {
+    public AjaxResult getInfo(@PathVariable("svyid") Long svyid) {
         return success(svyTaskTemplateService.selectSvyTaskTemplateBySvyid(svyid));
     }
 
@@ -69,8 +68,7 @@
     @PreAuthorize("@ss.hasPermi('system:template:add')")
     @Log(title = "浠诲姟闂嵎妯℃澘", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody SvyTaskTemplate svyTaskTemplate)
-    {
+    public AjaxResult add(@RequestBody SvyTaskTemplate svyTaskTemplate) {
         return toAjax(svyTaskTemplateService.insertSvyTaskTemplate(svyTaskTemplate));
     }
 
@@ -80,8 +78,7 @@
     @PreAuthorize("@ss.hasPermi('system:template:edit')")
     @Log(title = "浠诲姟闂嵎妯℃澘", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody SvyTaskTemplate svyTaskTemplate)
-    {
+    public AjaxResult edit(@RequestBody SvyTaskTemplate svyTaskTemplate) {
         return toAjax(svyTaskTemplateService.updateSvyTaskTemplate(svyTaskTemplate));
     }
 
@@ -90,9 +87,32 @@
      */
     @PreAuthorize("@ss.hasPermi('system:template:remove')")
     @Log(title = "浠诲姟闂嵎妯℃澘", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{svyids}")
-    public AjaxResult remove(@PathVariable Long[] svyids)
-    {
+    @DeleteMapping("/{svyids}")
+    public AjaxResult remove(@PathVariable Long[] svyids) {
         return toAjax(svyTaskTemplateService.deleteSvyTaskTemplateBySvyids(svyids));
     }
+
+    /**
+     * 鏂板鎴栦慨鏀归殢璁夸换鍔¢棶鍗锋ā鏉垮簱
+     */
+    @PreAuthorize("@ss.hasPermi('system:template:add')")
+    @ApiOperation("鏂板鎴栦慨鏀归殢璁夸换鍔¢棶鍗锋ā鏉垮簱")
+    @PostMapping("/saveOrUpdateTaskTemp")
+    public AjaxResult saveOrUpdateTaskTemp(@RequestBody SvyTaskTemplateVO svyTaskTemplateVO) {
+        return AjaxResult.success(svyTaskTemplateService.saveOrUpdateTemplate(svyTaskTemplateVO));
+    }
+
+    /**
+     * 鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢
+     *
+     * @param svyTaskTemplateVO
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('system:template:add')")
+    @ApiOperation("鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢")
+    @PostMapping("/selectInfoByCondition")
+    public AjaxResult selectInfoByCondition(@RequestBody SvyTaskTemplateVO svyTaskTemplateVO) {
+        return AjaxResult.success(svyTaskTemplateService.selectInfoByCondition(svyTaskTemplateVO));
+    }
+
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateScriptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateScriptController.java
new file mode 100644
index 0000000..e8e1da3
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateScriptController.java
@@ -0,0 +1,98 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.SvyTaskTemplateScript;
+import com.smartor.service.ISvyTaskTemplateScriptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯$増闂璇濇湳搴揅ontroller
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@RestController
+@RequestMapping("/smartor/svyTaskTempScript")
+public class SvyTaskTemplateScriptController extends BaseController
+{
+    @Autowired
+    private ISvyTaskTemplateScriptService svyTaskTemplateScriptService;
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴撳垪琛�
+     */
+    @PreAuthorize("@ss.hasPermi('system:script:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        startPage();
+        List<SvyTaskTemplateScript> list = svyTaskTemplateScriptService.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭闂嵎浠诲姟妯$増闂璇濇湳搴撳垪琛�
+     */
+    @PreAuthorize("@ss.hasPermi('system:script:export')")
+    @Log(title = "闂嵎浠诲姟妯$増闂璇濇湳搴�", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        List<SvyTaskTemplateScript> list = svyTaskTemplateScriptService.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
+        ExcelUtil<SvyTaskTemplateScript> util = new ExcelUtil<SvyTaskTemplateScript>(SvyTaskTemplateScript.class);
+        util.exportExcel(response, list, "闂嵎浠诲姟妯$増闂璇濇湳搴撴暟鎹�");
+    }
+
+    /**
+     * 鑾峰彇闂嵎浠诲姟妯$増闂璇濇湳搴撹缁嗕俊鎭�
+     */
+    @PreAuthorize("@ss.hasPermi('system:script:query')")
+    @GetMapping(value = "/{ID}")
+    public AjaxResult getInfo(@PathVariable("ID") Long ID)
+    {
+        return success(svyTaskTemplateScriptService.selectSvyTaskTemplateScriptByID(ID));
+    }
+
+    /**
+     * 鏂板闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    @PreAuthorize("@ss.hasPermi('system:script:add')")
+    @Log(title = "闂嵎浠诲姟妯$増闂璇濇湳搴�", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        return toAjax(svyTaskTemplateScriptService.insertSvyTaskTemplateScript(svyTaskTemplateScript));
+    }
+
+    /**
+     * 淇敼闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    @PreAuthorize("@ss.hasPermi('system:script:edit')")
+    @Log(title = "闂嵎浠诲姟妯$増闂璇濇湳搴�", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        return toAjax(svyTaskTemplateScriptService.updateSvyTaskTemplateScript(svyTaskTemplateScript));
+    }
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    @PreAuthorize("@ss.hasPermi('system:script:remove')")
+    @Log(title = "闂嵎浠诲姟妯$増闂璇濇湳搴�", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{IDs}")
+    public AjaxResult remove(@PathVariable Long[] IDs)
+    {
+        return toAjax(svyTaskTemplateScriptService.deleteSvyTaskTemplateScriptByIDs(IDs));
+    }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateTargetoptionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateTargetoptionController.java
new file mode 100644
index 0000000..78d8d0c
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTaskTemplateTargetoptionController.java
@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.SvyTaskTemplateTargetoption;
+import com.smartor.service.ISvyTaskTemplateTargetoptionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴揅ontroller
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@RestController
+@RequestMapping("/smartor/svyTaskTargetOption")
+public class SvyTaskTemplateTargetoptionController extends BaseController {
+    @Autowired
+    private ISvyTaskTemplateTargetoptionService svyTaskTemplateTargetoptionService;
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撳垪琛�
+     */
+    @PreAuthorize("@ss.hasPermi('system:targetoption:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption) {
+        startPage();
+        List<SvyTaskTemplateTargetoption> list = svyTaskTemplateTargetoptionService.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撳垪琛�
+     */
+    @PreAuthorize("@ss.hasPermi('system:targetoption:export')")
+    @Log(title = "闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SvyTaskTemplateTargetoption svyTaskTemplateTargetoption) {
+        List<SvyTaskTemplateTargetoption> list = svyTaskTemplateTargetoptionService.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption);
+        ExcelUtil<SvyTaskTemplateTargetoption> util = new ExcelUtil<SvyTaskTemplateTargetoption>(SvyTaskTemplateTargetoption.class);
+        util.exportExcel(response, list, "闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撴暟鎹�");
+    }
+
+    /**
+     * 鑾峰彇闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撹缁嗕俊鎭�
+     */
+    @PreAuthorize("@ss.hasPermi('system:targetoption:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(svyTaskTemplateTargetoptionService.selectSvyTaskTemplateTargetoptionById(id));
+    }
+
+    /**
+     * 鏂板闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    @PreAuthorize("@ss.hasPermi('system:targetoption:add')")
+    @Log(title = "闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SvyTaskTemplateTargetoption svyTaskTemplateTargetoption) {
+        return toAjax(svyTaskTemplateTargetoptionService.insertSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption));
+    }
+
+    /**
+     * 淇敼闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    @PreAuthorize("@ss.hasPermi('system:targetoption:edit')")
+    @Log(title = "闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SvyTaskTemplateTargetoption svyTaskTemplateTargetoption) {
+        return toAjax(svyTaskTemplateTargetoptionService.updateSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption));
+    }
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    @PreAuthorize("@ss.hasPermi('system:targetoption:remove')")
+    @Log(title = "闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(svyTaskTemplateTargetoptionService.deleteSvyTaskTemplateTargetoptionByIds(ids));
+    }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTasksingledetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTasksingledetailController.java
new file mode 100644
index 0000000..c8ae9a4
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyTasksingledetailController.java
@@ -0,0 +1,98 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.SvyTasksingledetail;
+import com.smartor.service.ISvyTasksingledetailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 闂嵎缁撴灉璁板綍璇︽儏Controller
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@RestController
+@RequestMapping("/smartor/svytasksingledetail")
+public class SvyTasksingledetailController extends BaseController
+{
+    @Autowired
+    private ISvyTasksingledetailService svyTasksingledetailService;
+
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('system:tasksingledetail:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SvyTasksingledetail svyTasksingledetail)
+    {
+        startPage();
+        List<SvyTasksingledetail> list = svyTasksingledetailService.selectSvyTasksingledetailList(svyTasksingledetail);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭闂嵎缁撴灉璁板綍璇︽儏鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('system:tasksingledetail:export')")
+    @Log(title = "闂嵎缁撴灉璁板綍璇︽儏", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SvyTasksingledetail svyTasksingledetail)
+    {
+        List<SvyTasksingledetail> list = svyTasksingledetailService.selectSvyTasksingledetailList(svyTasksingledetail);
+        ExcelUtil<SvyTasksingledetail> util = new ExcelUtil<SvyTasksingledetail>(SvyTasksingledetail.class);
+        util.exportExcel(response, list, "闂嵎缁撴灉璁板綍璇︽儏鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇闂嵎缁撴灉璁板綍璇︽儏璇︾粏淇℃伅
+     */
+    @PreAuthorize("@ss.hasPermi('system:tasksingledetail:query')")
+    @GetMapping(value = "/{calldetailid}")
+    public AjaxResult getInfo(@PathVariable("calldetailid") String calldetailid)
+    {
+        return success(svyTasksingledetailService.selectSvyTasksingledetailByCalldetailid(calldetailid));
+    }
+
+    /**
+     * 鏂板闂嵎缁撴灉璁板綍璇︽儏
+     */
+    @PreAuthorize("@ss.hasPermi('system:tasksingledetail:add')")
+    @Log(title = "闂嵎缁撴灉璁板綍璇︽儏", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SvyTasksingledetail svyTasksingledetail)
+    {
+        return toAjax(svyTasksingledetailService.insertSvyTasksingledetail(svyTasksingledetail));
+    }
+
+    /**
+     * 淇敼闂嵎缁撴灉璁板綍璇︽儏
+     */
+    @PreAuthorize("@ss.hasPermi('system:tasksingledetail:edit')")
+    @Log(title = "闂嵎缁撴灉璁板綍璇︽儏", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SvyTasksingledetail svyTasksingledetail)
+    {
+        return toAjax(svyTasksingledetailService.updateSvyTasksingledetail(svyTasksingledetail));
+    }
+
+    /**
+     * 鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏
+     */
+    @PreAuthorize("@ss.hasPermi('system:tasksingledetail:remove')")
+    @Log(title = "闂嵎缁撴灉璁板綍璇︽儏", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{calldetailids}")
+    public AjaxResult remove(@PathVariable String[] calldetailids)
+    {
+        return toAjax(svyTasksingledetailService.deleteSvyTasksingledetailByCalldetailids(calldetailids));
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java
index 986da38..3f0ff55 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java
@@ -50,6 +50,13 @@
     private String orgid;
 
     /**
+     * 鏍囩鍚�
+     */
+    @ApiModelProperty(value = "鏍囩鍚�")
+    @Excel(name = " 鏍囩鍚� ")
+    private String tagname;
+
+    /**
      * 鍒犻櫎鏍囪
      */
     @ApiModelProperty(value = "鍒犻櫎鏍囪")
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java
index be06220..e302c48 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java
@@ -43,6 +43,13 @@
     private Long tagid;
 
     /**
+     * 鏍囩鍚�
+     */
+    @ApiModelProperty(value = "鏍囩鍚�")
+    @Excel(name = " 鏍囩鍚� ")
+    private String tagname;
+
+    /**
      * 鏈烘瀯ID
      */
     @ApiModelProperty(value = "鏈烘瀯ID")
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
index 968ae44..e96ff36 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
@@ -115,6 +115,13 @@
     private Long warndown;
 
     /**
+     * 椤哄簭搴忓彿
+     */
+    @ApiModelProperty(value = "椤哄簭搴忓彿")
+    @Excel(name = "椤哄簭搴忓彿")
+    private Long orderno;
+
+    /**
      * 鍒犻櫎鏍囪
      */
     @ApiModelProperty(value = "鍒犻櫎鏍囪")
diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibScript.java b/smartor/src/main/java/com/smartor/domain/SvyLibScript.java
index 066878a..e595d16 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyLibScript.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyLibScript.java
@@ -123,13 +123,6 @@
     @ApiModelProperty("涓婁紶鏃堕棿")
     private Date uploadTime;
 
-
-    /**
-     * svy_script棰樼洰琛ㄧ殑涓婚敭ID
-     */
-    @ApiModelProperty("棰樼洰琛ㄧ殑涓婚敭ID")
-    private Long svyscriptId;
-
     /**
      * 棰樼洰鍐呭
      */
diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibScriptOption.java b/smartor/src/main/java/com/smartor/domain/SvyLibScriptOption.java
index af5dd72..2f53ff0 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyLibScriptOption.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyLibScriptOption.java
@@ -23,7 +23,7 @@
      * 鑷ID
      */
     @ApiModelProperty(value = "鑷ID")
-    private Long optionid;
+    private Long id;
 
     /**
      * 棰樼洰ID
@@ -72,7 +72,7 @@
      * 鏄惁寮傚父椤圭洰
      */
     @ApiModelProperty(value = "鏄惁寮傚父椤圭洰")
-    private Long isexceptionitem;
+    private Long isabnormal;
 
     /**
      * 鏄惁璺熻繘
@@ -84,7 +84,7 @@
      * 鍒嗘暟
      */
     @ApiModelProperty(value = "鍒嗘暟")
-    private Long score;
+    private String score;
 
     /**
      * 鎻愮ず
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTask.java b/smartor/src/main/java/com/smartor/domain/SvyTask.java
index 9f38e05..8d47243 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTask.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTask.java
@@ -252,5 +252,49 @@
     @ApiModelProperty(value = "鏂囨湰鍙橀噺鍙傛暟")
     private String param;
 
+    /**
+     * 鏂囨湰鍙橀噺鍙傛暟
+     */
+    @Excel(name = "鏂囨湰鍙橀噺鍙傛暟")
+    @ApiModelProperty(value = "鏂囨湰鍙橀噺鍙傛暟")
+    private String textParam;
+
+    /**
+     * 鏆傚仠鐘舵�� 锛� 鐘舵�佸鏋滃彂鐢熶慨鏀癸紝鍊煎氨鍔�1
+     */
+    @Excel(name = "鏆傚仠鐘舵�� 锛� 鐘舵�佸鏋滃彂鐢熶慨鏀癸紝鍊煎氨鍔�1")
+    @ApiModelProperty(value = "鏆傚仠鐘舵�� 锛� 鐘舵�佸鏋滃彂鐢熶慨鏀癸紝鍊煎氨鍔�1")
+    private Long stopState = 0L;
+
+    @ApiModelProperty(value = "涓婂崍鏃堕棿")
+    private String showTimeMorn;
+
+    @ApiModelProperty(value = "涓崍鏃堕棿")
+    private String showTimeNoon;
+
+    @ApiModelProperty(value = "鏅氬崍鏃堕棿")
+    private String showTimeNight;
+
+    @ApiModelProperty(value = "灞曠ず鏃ユ湡")
+    private String showDate;
+
+    /**
+     * 绫诲瀷鍚嶇О
+     */
+    @Excel(name = "鍙戦�佹椂闂存")
+    @ApiModelProperty(value = "鍙戦�佹椂闂存")
+    private String sendTimeSlot;
+
+    /**
+     * 妯℃澘搴撴ā鐗堝悕绉�
+     */
+    @Excel(name = "妯℃澘搴撴ā鐗堝悕绉�")
+    private String libtemplatename;
+
+    /**
+     * 妯℃澘搴撴ā鐗圛D
+     */
+    @Excel(name = "妯℃澘搴撴ā鐗圛D")
+    private String libtemplateid;
 
 }
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskSingle.java b/smartor/src/main/java/com/smartor/domain/SvyTaskSingle.java
index 2688a6b..506a364 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskSingle.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskSingle.java
@@ -41,6 +41,13 @@
     private String phone;
 
     /**
+     * 鎮h�匢D
+     */
+    @Excel(name = " 鎮h�匢D ")
+    @ApiModelProperty(value = "鎮h�匢D")
+    private Long patid;
+
+    /**
      * 鎬у埆
      */
     @Excel(name = "  鎬у埆")
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
index 85219f3..358f631 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
@@ -25,7 +25,7 @@
      * 鑷ID
      */
     @ApiModelProperty(value = "涓婚敭")
-    private Long svyid;
+    private Long id;
 
     /**
      * 妯℃澘闂嵎ID
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
new file mode 100644
index 0000000..cd24d8b
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
@@ -0,0 +1,244 @@
+package com.smartor.domain;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 闂嵎浠诲姟妯$増闂璇濇湳搴撳璞� svy_task_template_script
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Data
+public class SvyTaskTemplateScript extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 涓婚敭ID
+     */
+    private Long ID;
+
+    /**
+     * 浠诲姟id
+     */
+    @ApiModelProperty(value = "浠诲姟id")
+    private Long taskid;
+
+    /**
+     * 妯℃澘璇濇湳缂栧彿
+     */
+    @ApiModelProperty(value = "妯℃澘璇濇湳缂栧彿")
+    private Long templateQuestionNum;
+
+    /**
+     * 妯℃澘ID
+     */
+    @ApiModelProperty(value = "妯℃澘ID")
+    private Long templateID;
+
+    /**
+     * 璇濇湳ID
+     */
+    @ApiModelProperty(value = "璇濇湳ID")
+    private Long scriptID;
+
+    /**
+     * 鏍囬
+     */
+    @ApiModelProperty(value = "鏍囬")
+    private String questiontitle;
+
+    /**
+     * 璇█
+     */
+    @ApiModelProperty(value = "璇█")
+    private String language;
+
+    /**
+     * 绫诲埆鍚�
+     */
+    @ApiModelProperty(value = "绫诲埆鍚�")
+    private String categoryName;
+
+    /**
+     * 闂鐐�
+     */
+    @ApiModelProperty(value = "闂鐐�")
+    private String questionPoint;
+
+    /**
+     * 璇濇湳鍐呭
+     */
+    @ApiModelProperty(value = "璇濇湳鍐呭")
+    private String questionText;
+
+    /**
+     * 璇濇湳璇煶
+     */
+    @ApiModelProperty(value = "璇濇湳璇煶")
+    private String questionVoice;
+
+    /**
+     * 鏃犲尮閰嶈瘽鏈�
+     */
+    @ApiModelProperty(value = "鏃犲尮閰嶈瘽鏈�")
+    private String noMatchText;
+
+    /**
+     * 鏃犲尮閰嶈瘽鏈闊�
+     */
+    @ApiModelProperty(value = "鏃犲尮閰嶈瘽鏈闊�")
+    private String noMatchVoice;
+
+    /**
+     * 闈欓粯璇濇湳
+     */
+    @ApiModelProperty(value = "闈欓粯璇濇湳")
+    private String slienceText;
+
+    /**
+     * 闈欓粯璇濇湳璇煶
+     */
+    @ApiModelProperty(value = "闈欓粯璇濇湳璇煶")
+    private String slienceVoice;
+
+    /**
+     * 閫氱敤搴撳尮閰嶅悗璇濇湳
+     */
+    @ApiModelProperty(value = "閫氱敤搴撳尮閰嶅悗璇濇湳")
+    private String submoduleText;
+
+    /**
+     * 閫氱敤搴撳尮閰嶅悗璇濇湳璇煶
+     */
+    @ApiModelProperty(value = "閫氱敤搴撳尮閰嶅悗璇濇湳璇煶")
+    private String submoduleVoice;
+
+    /**
+     * 鍚笉娓呰瘽鏈�
+     */
+    @ApiModelProperty(value = "鍚笉娓呰瘽鏈�")
+    private String noClearlyText;
+
+    /**
+     * 鍚笉娓呰瘽鏈闊�
+     */
+    @ApiModelProperty(value = "鍚笉娓呰瘽鏈闊�")
+    private String noClearlyVoice;
+
+    /**
+     * 鏄惁蹇呭~,1:蹇呭~    2锛氬彲浠ヤ笉濉�    锛堢粰浜哄伐鐢ㄧ殑锛孉I涓嶇敤閬靛畧锛�
+     */
+    @ApiModelProperty(value = "鏄惁蹇呭~,1:蹇呭~    2锛氬彲浠ヤ笉濉�  ")
+    private String isMust;
+
+    /**
+     * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
+     */
+    @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
+    private Integer isoperation;
+
+    /**
+     * 鍙兘鎾斁WAV绫诲瀷
+     */
+    @ApiModelProperty(value = "鍙兘鎾斁WAV绫诲瀷")
+    private Long playWavOnly;
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    private String delFlag;
+
+    /**
+     * 涓婁紶鏍囪
+     */
+    @ApiModelProperty(value = "涓婁紶鏍囪")
+    private Long isupload;
+
+    /**
+     * 涓婁紶鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "涓婁紶鏃堕棿")
+    private Date uploadTime;
+
+    /**
+     * 鏈烘瀯ID
+     */
+    @ApiModelProperty(value = "鏈烘瀯ID")
+    private String orgid;
+
+    /**
+     * 鐖禝D
+     */
+    @ApiModelProperty(value = "鐖禝D")
+    private Long pid;
+
+    /**
+     * GUID
+     */
+    @ApiModelProperty(value = "GUID")
+    private String guid;
+
+    /**
+     * 鍊肩被鍨嬶紙1 閫夐」  2 鏂囨湰  3 鏁板�硷級
+     */
+    @ApiModelProperty(value = "鍊肩被鍨�  1= 閫夐」,2= 鏂囨湰,3= 鏁板��")
+    private Long valueType;
+
+    /**
+     * 鎸囨爣閫夐」*
+     */
+    @ApiModelProperty(value = "鎸囨爣閫夐」*")
+    private String targetOptions;
+
+    /**
+     * 鍩虹鎸囨爣绫诲瀷锛�1 閫夐」  2 鏂囨湰  3 鏁板�硷級
+     */
+    @ApiModelProperty(value = "鍩虹鎸囨爣绫诲瀷1=閫夐」,2=鏂囨湰,3=鏁板��")
+    private String targettype;
+
+    /**
+     * 鍩虹鎸囨爣ID(鏆傛椂褰撳簭鍙穒d)
+     */
+    @ApiModelProperty(value = "鍩虹鎸囨爣ID(鏆傛椂褰撳簭鍙穒d)")
+    private Long targetid;
+
+    /**
+     * 鍩虹鎸囨爣鍊�
+     */
+    @ApiModelProperty(value = "鍩虹鎸囨爣鍊�")
+    private String targetvalue;
+
+    /**
+     * 涓嬩竴璇濇湳缂栧彿
+     */
+    @ApiModelProperty(value = "涓嬩竴璇濇湳缂栧彿")
+    private Long nextQuestion;
+
+    /**
+     * 闂缁撴灉锛堢粰鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨勶級*
+     */
+    @ApiModelProperty(value = "闂缁撴灉")
+    private String questionResult;
+
+    /**
+     * 鍙橀噺鍙傛暟闆嗗悎
+     */
+    @ApiModelProperty(value = "鍙橀噺鍙傛暟闆嗗悎")
+    private String otherdata;
+
+    /**
+     * 闂鍥剧墖璺緞
+     */
+    @ApiModelProperty(value = "闂鍥剧墖璺緞")
+    private String picturePath;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
new file mode 100644
index 0000000..73e8591
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
@@ -0,0 +1,251 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯$増闂璇濇湳搴撳璞� svy_task_template_script
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Data
+public class SvyTaskTemplateScriptVO extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 涓婚敭ID
+     */
+    private Long ID;
+
+    /**
+     * 浠诲姟id
+     */
+    @ApiModelProperty(value = "浠诲姟id")
+    private Long taskid;
+
+    /**
+     * 妯℃澘璇濇湳缂栧彿
+     */
+    @ApiModelProperty(value = "妯℃澘璇濇湳缂栧彿")
+    private Long templateQuestionNum;
+
+    /**
+     * 妯℃澘ID
+     */
+    @ApiModelProperty(value = "妯℃澘ID")
+    private Long templateID;
+
+    /**
+     * 璇濇湳ID
+     */
+    @ApiModelProperty(value = "璇濇湳ID")
+    private Long scriptID;
+
+    /**
+     * 鏍囬
+     */
+    @ApiModelProperty(value = "鏍囬")
+    private String questiontitle;
+
+    /**
+     * 璇█
+     */
+    @ApiModelProperty(value = "璇█")
+    private String language;
+
+    /**
+     * 绫诲埆鍚�
+     */
+    @ApiModelProperty(value = "绫诲埆鍚�")
+    private String categoryName;
+
+    /**
+     * 闂鐐�
+     */
+    @ApiModelProperty(value = "闂鐐�")
+    private String questionPoint;
+
+    /**
+     * 璇濇湳鍐呭
+     */
+    @ApiModelProperty(value = "璇濇湳鍐呭")
+    private String questionText;
+
+    /**
+     * 璇濇湳璇煶
+     */
+    @ApiModelProperty(value = "璇濇湳璇煶")
+    private String questionVoice;
+
+    /**
+     * 鏃犲尮閰嶈瘽鏈�
+     */
+    @ApiModelProperty(value = "鏃犲尮閰嶈瘽鏈�")
+    private String noMatchText;
+
+    /**
+     * 鏃犲尮閰嶈瘽鏈闊�
+     */
+    @ApiModelProperty(value = "鏃犲尮閰嶈瘽鏈闊�")
+    private String noMatchVoice;
+
+    /**
+     * 闈欓粯璇濇湳
+     */
+    @ApiModelProperty(value = "闈欓粯璇濇湳")
+    private String slienceText;
+
+    /**
+     * 闈欓粯璇濇湳璇煶
+     */
+    @ApiModelProperty(value = "闈欓粯璇濇湳璇煶")
+    private String slienceVoice;
+
+    /**
+     * 閫氱敤搴撳尮閰嶅悗璇濇湳
+     */
+    @ApiModelProperty(value = "閫氱敤搴撳尮閰嶅悗璇濇湳")
+    private String submoduleText;
+
+    /**
+     * 閫氱敤搴撳尮閰嶅悗璇濇湳璇煶
+     */
+    @ApiModelProperty(value = "閫氱敤搴撳尮閰嶅悗璇濇湳璇煶")
+    private String submoduleVoice;
+
+    /**
+     * 鍚笉娓呰瘽鏈�
+     */
+    @ApiModelProperty(value = "鍚笉娓呰瘽鏈�")
+    private String noClearlyText;
+
+    /**
+     * 鍚笉娓呰瘽鏈闊�
+     */
+    @ApiModelProperty(value = "鍚笉娓呰瘽鏈闊�")
+    private String noClearlyVoice;
+
+    /**
+     * 鏄惁蹇呭~,1:蹇呭~    2锛氬彲浠ヤ笉濉�    锛堢粰浜哄伐鐢ㄧ殑锛孉I涓嶇敤閬靛畧锛�
+     */
+    @ApiModelProperty(value = "鏄惁蹇呭~,1:蹇呭~    2锛氬彲浠ヤ笉濉� ")
+    private String isMust;
+
+    /**
+     * 鍙兘鎾斁WAV绫诲瀷
+     */
+    @ApiModelProperty(value = "鍙兘鎾斁WAV绫诲瀷")
+    private Long playWavOnly;
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    private String delFlag;
+
+    /**
+     * 涓婁紶鏍囪
+     */
+    @ApiModelProperty(value = "涓婁紶鏍囪")
+    private Long isupload;
+
+    /**
+     * 涓婁紶鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "涓婁紶鏃堕棿")
+    private Date uploadTime;
+
+    /**
+     * 鏈烘瀯ID
+     */
+    @ApiModelProperty(value = "鏈烘瀯ID")
+    private String orgid;
+
+    /**
+     * 鐖禝D
+     */
+    @ApiModelProperty(value = "鐖禝D")
+    private Long pid;
+
+    /**
+     * GUID
+     */
+    @ApiModelProperty(value = "GUID")
+    private String guid;
+
+    /**
+     * 鍊肩被鍨嬶紙1 閫夐」  2 鏂囨湰  3 鏁板�硷級
+     */
+    @ApiModelProperty(value = "鍊肩被鍨�1=閫夐」,2=鏂囨湰,3=鏁板��")
+    private Long valueType;
+
+    /**
+     * 鎸囨爣閫夐」*
+     */
+    @ApiModelProperty(value = "鎸囨爣閫夐」*")
+    private String targetOptions;
+
+    /**
+     * 鍩虹鎸囨爣绫诲瀷锛�1 閫夐」  2 鏂囨湰  3 鏁板�硷級
+     */
+    @ApiModelProperty(value = "鍩虹鎸囨爣绫诲瀷 1=閫夐」,2=鏂囨湰,3=鏁板��")
+    private String targettype;
+
+    /**
+     * 鍩虹鎸囨爣ID(鏆傛椂褰撳簭鍙穒d)
+     */
+    @ApiModelProperty(value = "鍩虹鎸囨爣ID(鏆傛椂褰撳簭鍙穒d)")
+    private Long targetid;
+
+    /**
+     * 鍩虹鎸囨爣鍊�
+     */
+    @ApiModelProperty(value = "鍩虹鎸囨爣鍊�")
+    private String targetvalue;
+
+    /**
+     * 涓嬩竴璇濇湳缂栧彿
+     */
+    @ApiModelProperty(value = "涓嬩竴璇濇湳缂栧彿")
+    private Long nextQuestion;
+
+    /**
+     * 闂缁撴灉锛堢粰鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨勶級*
+     */
+    @ApiModelProperty(value = "闂缁撴灉 ,缁�=鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨�")
+    private String questionResult;
+
+    /**
+     * 鍙橀噺鍙傛暟闆嗗悎
+     */
+    @ApiModelProperty(value = "鍙橀噺鍙傛暟闆嗗悎")
+    private String otherdata;
+
+    /**
+     * 闂鍥剧墖璺緞
+     */
+    @ApiModelProperty(value = "闂鍥剧墖璺緞")
+    private String picturePath;
+
+    /**
+     * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
+     */
+    @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
+    private Integer isoperation;
+
+    /**
+     * 璇濇湳閫夐」
+     */
+    @ApiModelProperty(value = "璇濇湳閫夐」")
+    private List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = new ArrayList<>();
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java
new file mode 100644
index 0000000..c6cd019
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java
@@ -0,0 +1,209 @@
+package com.smartor.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撳璞� svy_task_template_targetoption
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Data
+public class SvyTaskTemplateTargetoption extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 涓婚敭
+     */
+    @ApiModelProperty(value = "涓婚敭")
+    private Long id;
+
+    /**
+     * 浠诲姟id
+     */
+    @ApiModelProperty(value = "浠诲姟id")
+    private Long taskid;
+
+    /**
+     * 妯℃澘ID
+     */
+    @ApiModelProperty(value = "妯℃澘ID")
+    private Long templateID;
+
+    /**
+     * 鎸囨爣ID
+     */
+    @ApiModelProperty(value = "鎸囨爣ID")
+    private Long targetid;
+
+    /**
+     * 鎸囨爣鍚嶇О
+     */
+    @ApiModelProperty(value = "鎸囨爣鍚嶇О")
+    private String targetname;
+
+    /**
+     * 妯℃澘鎸囨爣绫诲瀷
+     */
+    @ApiModelProperty(value = "妯℃澘鎸囨爣绫诲瀷")
+    private String targettype;
+
+    /**
+     * 绫诲埆鍚嶇О
+     */
+    @ApiModelProperty(value = "绫诲埆鍚嶇О")
+    private String categoryName;
+
+    /**
+     * 妯℃澘鎸囨爣鍊�
+     */
+    @ApiModelProperty(value = "妯℃澘鎸囨爣鍊�")
+    private String targetvalue;
+
+    /**
+     * 妯℃澘鎸囨爣姝e垯2
+     */
+    @ApiModelProperty(value = "妯℃澘鎸囨爣姝e垯2")
+    private String targetregex2;
+
+    /**
+     * 妯℃澘鎸囨爣姝e垯
+     */
+    @ApiModelProperty(value = "妯℃澘鎸囨爣姝e垯")
+    private String targetregex;
+
+    /**
+     * 閫夐」鎻忚堪
+     */
+    @ApiModelProperty(value = "閫夐」鎻忚堪")
+    private String optiondesc;
+
+    /**
+     * 璇█
+     */
+    @ApiModelProperty(value = "璇█")
+    private String language;
+
+    /**
+     * 鐗堟湰
+     */
+    @ApiModelProperty(value = "鐗堟湰")
+    private String version;
+
+    /**
+     * 鍒嗙粍ID
+     */
+    @ApiModelProperty(value = "鍒嗙粍ID")
+    private String groupid;
+
+    /**
+     * 鏄惁寮傚父鏍囪瘑
+     */
+    @ApiModelProperty(value = "鏄惁寮傚父鏍囪瘑")
+    private Long isabnormal;
+
+    /**
+     * 棰勮闃�鍊间笂闄�
+     */
+    @ApiModelProperty(value = "棰勮闃�鍊间笂闄�")
+    private Long warnup;
+
+    /**
+     * 棰勮闃�鍊间笅闄�
+     */
+    @ApiModelProperty(value = "棰勮闃�鍊间笅闄�")
+    private Long warndown;
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    private String delFlag;
+
+    /**
+     * 涓婁紶鏍囪
+     */
+    @ApiModelProperty(value = "涓婁紶鏍囪")
+    private Long isupload;
+
+    /**
+     * 涓婁紶鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "涓婁紶鏃堕棿")
+    private Date uploadTime;
+
+    /**
+     * 鏈烘瀯ID
+     */
+    @ApiModelProperty(value = "鏈烘瀯ID")
+    private String orgid;
+
+    /**
+     * 鐖禝D
+     */
+    @ApiModelProperty(value = "鐖禝D")
+    private Long pid;
+
+    /**
+     * GUID
+     */
+    @ApiModelProperty(value = "GUID")
+    private String guid;
+
+    /**
+     * 闂id
+     */
+    @ApiModelProperty(value = "闂id")
+    private Long scriptid;
+
+    /**
+     * 姝e垯鍏抽敭瀛�(鍚�)
+     */
+    @ApiModelProperty(value = "姝e垯鍏抽敭瀛�(鍚�)闆嗗悎")
+    private List<String> nodynamiccruxs;
+
+    /**
+     * 姝e垯鍏抽敭瀛�(涓嶅惈)
+     */
+    @ApiModelProperty(value = "姝e垯鍏抽敭瀛�(涓嶅惈)闆嗗悎")
+    private List<String> dynamiccruxs;
+    /**
+     * 姝e垯鍏抽敭瀛�(鍚�)
+     */
+    @ApiModelProperty(value = "姝e垯鍏抽敭瀛�(鍚�)")
+    private String nodynamiccruxsJson;
+
+    /**
+     * 姝e垯鍏抽敭瀛�(涓嶅惈)
+     */
+    @ApiModelProperty(value = "姝e垯鍏抽敭瀛�(涓嶅惈)")
+    private String dynamiccruxsJson;
+
+    /**
+     * 涓嬩竴棰�
+     */
+    @ApiModelProperty(value = "涓嬩竴棰�")
+    private Long nextQuestion;
+
+    /**
+     * 閫夐」鍥剧墖璺緞
+     */
+    @ApiModelProperty(value = "閫夐」鍥剧墖璺緞")
+    private String picturePath;
+
+    /**
+     * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
+     */
+    @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
+    private Integer isoperation;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java
new file mode 100644
index 0000000..75689cd
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java
@@ -0,0 +1,237 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 闅忚浠诲姟闅忚妯℃澘搴撳璞� ivr_task_template
+ *
+ * @author ruoyi
+ * @date 2024-05-13
+ */
+@Data
+@ApiModel(value = "IvrTaskTemplateVO", description = "浠诲姟浠诲姟闅忚妯℃澘搴撳璞�")
+public class SvyTaskTemplateVO extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 鑷ID
+     */
+    @ApiModelProperty(value = "涓婚敭")
+    private Long id;
+
+    /**
+     * 妯℃澘闂嵎ID
+     */
+    @Excel(name = " 妯℃澘闂嵎ID ")
+    @ApiModelProperty(value = "妯℃澘闂嵎ID")
+    private Long templateid;
+
+    /**
+     * 闂嵎鍒嗙被ID
+     */
+    @Excel(name = " 闂嵎鍒嗙被ID ")
+    @ApiModelProperty(value = "闂嵎鍒嗙被ID")
+    private Long categoryid;
+
+    /**
+     * 闂嵎浠g爜
+     */
+    @Excel(name = " 闂嵎浠g爜 ")
+    @ApiModelProperty(value = "闂嵎浠g爜")
+    private String svycode;
+
+    /**
+     * 闂嵎鍚嶇О
+     */
+    @Excel(name = " 闂嵎鍚嶇О ")
+    @ApiModelProperty(value = "闂嵎鍚嶇О")
+    private String svyname;
+
+    /**
+     * 鎻忚堪
+     */
+    @Excel(name = " 鎻忚堪 ")
+    @ApiModelProperty(value = "鎻忚堪")
+    private String description;
+
+    /**
+     * 闂嵎浠嬬粛
+     */
+    @Excel(name = " 闂嵎浠嬬粛 ")
+    @ApiModelProperty(value = "闂嵎浠嬬粛")
+    private String introduce;
+
+    /**
+     * 闂嵎鎻愮ず
+     */
+    @Excel(name = " 闂嵎鎻愮ず ")
+    @ApiModelProperty(value = "闂嵎鎻愮ず")
+    private String submitprompt;
+
+    /**
+     * 鏍囩
+     */
+    @Excel(name = "鏍囩")
+    @ApiModelProperty(value = "鏍囩")
+    private String tag;
+
+    /**
+     * 鐗堟湰
+     */
+    @Excel(name = " 鐗堟湰 ")
+    @ApiModelProperty(value = "鐗堟湰")
+    private BigDecimal version;
+
+    /**
+     * 涓績搴撲唬鐮�
+     */
+    @Excel(name = " 涓績搴撲唬鐮� ")
+    @ApiModelProperty(value = "涓績搴撲唬鐮�")
+    private String centerlibrarycode;
+
+    /**
+     * 涓績搴揑D
+     */
+    @Excel(name = " 涓績搴揑D ")
+    @ApiModelProperty(value = "涓績搴揑D")
+    private Long centerlibraryid;
+
+    /**
+     * 鏄惁鏈湴
+     */
+    @Excel(name = " 鏄惁鏈湴 ")
+    @ApiModelProperty(value = "鏄惁鏈湴")
+    private Long islocal;
+
+    /**
+     * 鏄惁鍚敤
+     */
+    @Excel(name = " 鏄惁鍚敤 ")
+    @ApiModelProperty(value = "鏄惁鍚敤")
+    private String isenable;
+
+    /**
+     * 鏈烘瀯ID
+     */
+    @Excel(name = " 鏈烘瀯ID ")
+    @ApiModelProperty(value = "鏈烘瀯ID")
+    private String orgid;
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    @ApiModelProperty(value = "鍒犻櫎鏍囪")
+    private String delFlag;
+
+    /**
+     * 涓婁紶鏍囪
+     */
+    @Excel(name = " 涓婁紶鏍囪 ")
+    @ApiModelProperty(value = "涓婁紶鏍囪")
+    private Long isupload;
+
+    /**
+     * 涓婁紶鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "涓婁紶鏃堕棿")
+    private Date uploadTime;
+
+    /**
+     * 闂id
+     */
+    @Excel(name = "闂id")
+    @ApiModelProperty(value = "闂id")
+    private String taskScriptId;
+
+    /**
+     * 鐖禝D
+     */
+    @Excel(name = "鐖禝D")
+    @ApiModelProperty(value = "鐖禝D")
+    private Long pid;
+
+    /**
+     * GUID
+     */
+    @Excel(name = "GUID")
+    @ApiModelProperty(value = "GUID")
+    private String guid;
+
+    /**
+     * 绉戝鍚嶇О
+     */
+    @Excel(name = "绉戝鍚嶇О")
+    @ApiModelProperty(value = "绉戝鍚嶇О")
+    private String deptNames;
+
+    /**
+     * 鏍囩淇℃伅
+     */
+    @Excel(name = "鏍囩淇℃伅")
+    @ApiModelProperty(value = "鏍囩淇℃伅")
+    private String labelInfo;
+
+    /**
+     * 闄㈠尯
+     */
+    @Excel(name = "闄㈠尯")
+    @ApiModelProperty(value = "闄㈠尯")
+    private String campus;
+
+    /**
+     * 閫傜敤鏂瑰紡锛氳皟鏌ヨ〃1锛屾櫤鑳借闊�2銆佷汉宸�3
+     */
+    @Excel(name = "閫傜敤鏂瑰紡锛氳皟鏌ヨ〃1锛屾櫤鑳借闊�2銆佷汉宸�3")
+    @ApiModelProperty(value = "閫傜敤鏂瑰紡锛氳皟鏌ヨ〃1锛屾櫤鑳借闊�2銆佷汉宸�3")
+    private String suitway;
+
+    /**
+     * 鍏跺畠鏁版嵁锛堝瓨鍌ㄥ彉閲忥級
+     */
+    @Excel(name = "鍏跺畠鏁版嵁", readConverterExp = "瀛�=鍌ㄥ彉閲�")
+    @ApiModelProperty(value = "鍏跺畠鏁版嵁锛堝瓨鍌ㄥ彉閲忥級")
+    private String otherdata;
+
+    /**
+     * 鍊肩被鍨嬶紙1 閫夐」  2 鏂囨湰  3 鏁板�硷級
+     */
+    @Excel(name = "鍊肩被鍨�", readConverterExp = "1=,閫�=椤�,2=,鏂�=鏈�,3=,鏁�=鍊�")
+    @ApiModelProperty(value = " 鍊肩被鍨嬶紙1 閫夐」  2 鏂囨湰  3 鏁板�硷級")
+    private String valueType;
+
+    /**
+     * 鍥炲锛堟寚闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑锛�
+     */
+    @Excel(name = "鍥炲", readConverterExp = "鎸�=闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑")
+    @ApiModelProperty(value = "鍥炲锛堟寚闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑锛�")
+    private String reply;
+
+    /**
+     * 浠诲姟ID
+     */
+    @Excel(name = "浠诲姟ID")
+    @ApiModelProperty(value = "浠诲姟ID")
+    private Long taskid;
+    /**
+     * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
+     */
+    @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
+    private Integer isoperation;
+
+
+    @ApiModelProperty(value = "妯℃澘闂闆嗗悎")
+    private List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOS = new ArrayList<>();
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskVO.java
new file mode 100644
index 0000000..86fb3c8
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskVO.java
@@ -0,0 +1,318 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 缁煎悎闂嵎浠诲姟锛堜换鍔★級瀵硅薄 svy_task
+ *
+ * @author ruoyi
+ * @date 2024-06-12
+ */
+@Data
+public class SvyTaskVO extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "浠诲姟ID")
+    private Long taskid;
+
+    /**
+     * 鎮h�呮湇鍔′换鍔d
+     */
+    @Excel(name = "鎮h�呮湇鍔′换鍔d")
+    @ApiModelProperty(value = "鎮h�呮湇鍔′换鍔d")
+    private Long svrtaskid;
+
+    /**
+     *
+     */
+    @Excel(name = "  ")
+    @ApiModelProperty(value = "浠诲姟鍚嶇О")
+    private String taskname;
+
+    /**
+     * 妯℃澘ID
+     */
+    @Excel(name = "  妯℃澘ID")
+    @ApiModelProperty(value = "妯℃澘ID")
+    private String templateid;
+
+    /**
+     * 妯℃澘鍚嶇О
+     */
+    @Excel(name = "  妯℃澘鍚嶇О")
+    @ApiModelProperty(value = "妯℃澘鍚嶇О")
+    private String templatename;
+
+    /**
+     * 鏍囩淇℃伅
+     */
+    @Excel(name = "  鏍囩淇℃伅")
+    @ApiModelProperty(value = "鏍囩淇℃伅")
+    private String labelinfo;
+
+    /**
+     * 鐘舵��
+     */
+    @Excel(name = "  鐘舵��")
+    @ApiModelProperty(value = "鐘舵��")
+    private Long state;
+
+    /**
+     * 鏁伴噺
+     */
+    @Excel(name = "  鏁伴噺")
+    @ApiModelProperty(value = "鏁伴噺")
+    private Long count;
+
+    /**
+     * 鎵ц
+     */
+    @Excel(name = "  鎵ц")
+    @ApiModelProperty(value = "鎵ц")
+    private Long executed;
+
+    /**
+     * 涓嶆墽琛�
+     */
+    @Excel(name = "  涓嶆墽琛�")
+    @ApiModelProperty(value = "涓嶆墽琛�")
+    private Long unexecuted;
+
+    /**
+     * 鏄惁澶辫触
+     */
+    @Excel(name = "  鏄惁澶辫触")
+    @ApiModelProperty(value = "鏄惁澶辫触")
+    private Long fail;
+
+    /**
+     * 鎮h�匢D
+     */
+    @Excel(name = "  鎮h�匢D")
+    @ApiModelProperty(value = "鎮h�匢D")
+    private String patientid;
+
+    /**
+     * 鎮h�呭悕绉�
+     */
+    @Excel(name = "  鎮h�呭悕绉�")
+    @ApiModelProperty(value = "鎮h�呭悕绉�")
+    private String patientname;
+
+    /**
+     *
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "  ", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "鏂板鏃堕棿")
+    private Date addtime;
+
+    /**
+     * 瀹℃牳浜篿d
+     */
+    @Excel(name = "  瀹℃牳浜篿d")
+    @ApiModelProperty(value = "瀹℃牳浜篿d")
+    private String checkuserid;
+
+    /**
+     * 鏂囨湰鍙橀噺鍙傛暟
+     */
+    @Excel(name = "鏂囨湰鍙橀噺鍙傛暟")
+    @ApiModelProperty(value = "鏂囨湰鍙橀噺鍙傛暟")
+    private Map<String, Map<String, String>> textParamMap;
+
+    /**
+     * 瀹℃牳浜�
+     */
+    @Excel(name = "  瀹℃牳浜�")
+    @ApiModelProperty(value = "瀹℃牳浜�")
+    private String checkusername;
+
+    /**
+     *
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "  ", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "瀹℃牳鏃堕棿")
+    private Date checktime;
+
+    /**
+     * 1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱
+     */
+    @Excel(name = " 1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱 ")
+    @ApiModelProperty(value = "鍑洪櫌闅忚锛�2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱")
+    private String type;
+
+    /**
+     * 绫诲瀷鍚嶇О
+     */
+    @Excel(name = "  绫诲瀷鍚嶇О")
+    @ApiModelProperty(value = "绫诲瀷鍚嶇О")
+    private String typename;
+
+    /**
+     * 0.涓嶄娇鐢ㄦ挱鍓嶇煭淇� 1.浣跨敤鎾墠鐭俊
+     */
+    @Excel(name = " 0.涓嶄娇鐢ㄦ挱鍓嶇煭淇� 1.浣跨敤鎾墠鐭俊 ")
+    @ApiModelProperty(value = "0.涓嶄娇鐢ㄦ挱鍓嶇煭淇� 1.浣跨敤鎾墠鐭俊")
+    private Long usebqsms;
+
+    /**
+     * 0.涓嶄娇鐢ㄦ挱鍚庣煭淇� 1.浣跨敤鎾墠鐭俊
+     */
+    @Excel(name = " 0.涓嶄娇鐢ㄦ挱鍚庣煭淇� 1.浣跨敤鎾墠鐭俊 ")
+    @ApiModelProperty(value = " 0.涓嶄娇鐢ㄦ挱鍚庣煭淇� 1.浣跨敤鎾墠鐭俊")
+    private Long usebhsms;
+
+    /**
+     *
+     */
+    @Excel(name = "  ")
+    @ApiModelProperty(value = "")
+    private Long usesendsms;
+
+    /**
+     * 閮ㄩ棬code
+     */
+    @Excel(name = "  閮ㄩ棬code")
+    @ApiModelProperty(value = "閮ㄩ棬code")
+    private String deptcode;
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    @ApiModelProperty(value = "鍒犻櫎鏍囪")
+    private String delFlag;
+
+    /**
+     * 涓婁紶鏍囪
+     */
+    @Excel(name = " 涓婁紶鏍囪 ")
+    @ApiModelProperty(value = "涓婁紶鏍囪")
+    private Long isupload;
+
+    /**
+     * 涓婁紶鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "涓婁紶鏃堕棿")
+    private Date uploadTime;
+
+    /**
+     * 鏈烘瀯ID
+     */
+    @Excel(name = " 鏈烘瀯ID ")
+    @ApiModelProperty(value = "鏈烘瀯ID")
+    private String orgid;
+
+    /**
+     * 鐖禝D
+     */
+    @Excel(name = "鐖禝D")
+    @ApiModelProperty(value = "鐖禝D")
+    private Long pid;
+
+    /**
+     * GUID
+     */
+    @Excel(name = "GUID")
+    @ApiModelProperty(value = "GUID")
+    private String guid;
+
+    /**
+     * 浠诲姟褰㈠紡 1,澶氬獟浣�   2,绾歌川  3,鐢佃瘽  4,鐭俊  5.寰俊鍏紬鍙� 6.寰俊灏忕▼搴�  7.鏀粯瀹�  8.鏅鸿兘灏忕▼搴�  9.閽夐拤
+     */
+    @Excel(name = " 浠诲姟褰㈠紡 1,澶氬獟浣�   2,绾歌川  3,鐢佃瘽  4,鐭俊  5.寰俊鍏紬鍙� 6.寰俊灏忕▼搴�  7.鏀粯瀹�  8.鏅鸿兘灏忕▼搴�  9.閽夐拤")
+    @ApiModelProperty(value = "浠诲姟褰㈠紡 1,澶氬獟浣�   2,绾歌川  3,鐢佃瘽  4,鐭俊  5.寰俊鍏紬鍙� 6.寰俊灏忕▼搴�  7.鏀粯瀹�  8.鏅鸿兘灏忕▼搴�  9.閽夐拤")
+    private String preachform;
+
+    /**
+     * 鏄惁鍙戦�� 锛� 0 鏆傚仠鍙戦��  1 瀹氭椂鍙戦��  2 绔嬪嵆鍙戦��
+     */
+    @Excel(name = "鏄惁鍙戦�� 锛� 0 鏆傚仠鍙戦��  1 瀹氭椂鍙戦��  2 绔嬪嵆鍙戦��  ")
+    @ApiModelProperty(value = "鏄惁鍙戦�� 锛� 0 鏆傚仠鍙戦��  1 瀹氭椂鍙戦��  2 绔嬪嵆鍙戦��")
+    private Long isSend;
+
+    /**
+     * 鍙戦�佺姸鎬侊細  0  澶辫触   1鎴愬姛
+     */
+    @Excel(name = "鍙戦�佺姸鎬侊細  0  澶辫触   1鎴愬姛")
+    @ApiModelProperty(value = "鍙戦�佺姸鎬侊細  0  澶辫触   1鎴愬姛")
+    private String sendState;
+
+    /**
+     * 鏂囨湰鍙橀噺鍙傛暟
+     */
+    @Excel(name = "鏂囨湰鍙橀噺鍙傛暟")
+    @ApiModelProperty(value = "鏂囨湰鍙橀噺鍙傛暟")
+    private String param;
+
+    /**
+     * 鎮h�呬笌鍗曚竴浠诲姟鍏宠仈琛ㄩ泦鍚�
+     */
+    @Excel(name = " 瀹f偅鑰呬笌鍗曚竴浠诲姟鍏宠仈琛ㄩ泦鍚�")
+    @ApiModelProperty(value = "鎮h�呬笌鍗曚竴浠诲姟鍏宠仈琛ㄩ泦鍚�")
+    private List<PatTaskRelevance> patTaskRelevances;
+
+    /**
+     * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
+     */
+    @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
+    private Integer isoperation;
+
+    /**
+     * 鏂囨湰鍙橀噺鍙傛暟
+     */
+    @Excel(name = "鏂囨湰鍙橀噺鍙傛暟")
+    @ApiModelProperty(value = "鏂囨湰鍙橀噺鍙傛暟")
+    private String textParam;
+
+    /**
+     * 鏆傚仠鐘舵�� 锛� 鐘舵�佸鏋滃彂鐢熶慨鏀癸紝鍊煎氨鍔�1
+     */
+    @Excel(name = "鏆傚仠鐘舵�� 锛� 鐘舵�佸鏋滃彂鐢熶慨鏀癸紝鍊煎氨鍔�1")
+    @ApiModelProperty(value = "鏆傚仠鐘舵�� 锛� 鐘舵�佸鏋滃彂鐢熶慨鏀癸紝鍊煎氨鍔�1")
+    private Long stopState = 0L;
+
+    @ApiModelProperty(value = "涓婂崍鏃堕棿")
+    private String showTimeMorn;
+
+    @ApiModelProperty(value = "涓崍鏃堕棿")
+    private String showTimeNoon;
+
+    @ApiModelProperty(value = "鏅氬崍鏃堕棿")
+    private String showTimeNight;
+
+    @ApiModelProperty(value = "灞曠ず鏃ユ湡")
+    private String showDate;
+
+    /**
+     * 鍙戦�佹椂闂存
+     */
+    @ApiModelProperty(value = "鍙戦�佹椂闂存 ")
+    private List<TaskSendTimeVO> sendTimeSlot;
+
+    /**
+     * 妯℃澘搴撴ā鐗堝悕绉�
+     */
+    @Excel(name = "妯℃澘搴撴ā鐗堝悕绉�")
+    private String libtemplatename;
+
+    /**
+     * 妯℃澘搴撴ā鐗圛D
+     */
+    @Excel(name = "妯℃澘搴撴ā鐗圛D")
+    private String libtemplateid;
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTasksingledetail.java b/smartor/src/main/java/com/smartor/domain/SvyTasksingledetail.java
new file mode 100644
index 0000000..847e3c1
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/SvyTasksingledetail.java
@@ -0,0 +1,576 @@
+package com.smartor.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 闂嵎缁撴灉璁板綍璇︽儏瀵硅薄 svy_tasksingledetail
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+public class SvyTasksingledetail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 浠诲姟鐢佃瘽ID */
+    private String calldetailid;
+
+    /** tasksingleid */
+    @Excel(name = "tasksingleid")
+    private String callid;
+
+    /** 鎷ㄥ彿uuid */
+    @Excel(name = "鎷ㄥ彿uuid")
+    private String uuid;
+
+    /** 鐢佃瘽鍙风爜 */
+    @Excel(name = "鐢佃瘽鍙风爜")
+    private String phone;
+
+    /** 鏄剧ず鍙风爜 */
+    @Excel(name = "鏄剧ず鍙风爜")
+    private String displayno;
+
+    /** 鎿嶄綔浜�  */
+    @Excel(name = "鎿嶄綔浜� ")
+    private String operate;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long inbound;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long incoming;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long assigntime;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long starttime;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long answertime;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long silent;
+
+    /**    */
+    @Excel(name = "  ")
+    private String dtmfKey;
+
+    /**    */
+    @Excel(name = "  ")
+    private String musicpath;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long sentIndex;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long sentBegin;
+
+    /** 鍥炵瓟缁撴灉 */
+    @Excel(name = "鍥炵瓟缁撴灉")
+    private String asrtext;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long beginTime;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long endTime;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long sentEnd;
+
+    /**    */
+    @Excel(name = "  ")
+    private String recordpath;
+
+    /**    */
+    @Excel(name = "  ")
+    private String recordurl;
+
+    /**    */
+    @Excel(name = "  ")
+    private String templateid;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long templatequestionnum;
+
+    /**    */
+    @Excel(name = "  ")
+    private Long switchid;
+
+    /** 闂鏂囨湰   */
+    @Excel(name = "闂鏂囨湰  ")
+    private String questiontext;
+
+    /** 闂璇煶   */
+    @Excel(name = "闂璇煶  ")
+    private String questionvoice;
+
+    /** 绫诲埆 */
+    @Excel(name = "绫诲埆")
+    private String categoryname;
+
+    /** 鎸囨爣閫夐」 */
+    @Excel(name = "鎸囨爣閫夐」")
+    private String targetoptions;
+
+    /** 鎸囨爣鍊硷紙姝e垯鍖归厤鐨勯�夐」鍊硷級 */
+    @Excel(name = "鎸囨爣鍊�", readConverterExp = "姝�=鍒欏尮閰嶇殑閫夐」鍊�")
+    private String targetvalue;
+
+    /** 閫氳繃姝e垯瑙f瀽鐨勫�� */
+    @Excel(name = "閫氳繃姝e垯瑙f瀽鐨勫��")
+    private String matchedtext;
+
+    /**    */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "  ", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date addtime;
+
+    /** 涓婁紶鏍囪 */
+    @Excel(name = "涓婁紶鏍囪")
+    private Long isupload;
+
+    /** 涓婁紶鏃堕棿 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "涓婁紶鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date uploadTime;
+
+    /** 鏈烘瀯ID */
+    @Excel(name = "鏈烘瀯ID")
+    private String orgid;
+
+    /** 鍒犻櫎鏍囪 */
+    private String delFlag;
+
+    /** 鐖禝D */
+    @Excel(name = "鐖禝D")
+    private Long pid;
+
+    /** GUID */
+    @Excel(name = "GUID")
+    private String guid;
+
+    /** 闂绫诲瀷 */
+    @Excel(name = "闂绫诲瀷")
+    private String valueType;
+
+    public void setCalldetailid(String calldetailid)
+    {
+        this.calldetailid = calldetailid;
+    }
+
+    public String getCalldetailid()
+    {
+        return calldetailid;
+    }
+    public void setCallid(String callid)
+    {
+        this.callid = callid;
+    }
+
+    public String getCallid()
+    {
+        return callid;
+    }
+    public void setUuid(String uuid)
+    {
+        this.uuid = uuid;
+    }
+
+    public String getUuid()
+    {
+        return uuid;
+    }
+    public void setPhone(String phone)
+    {
+        this.phone = phone;
+    }
+
+    public String getPhone()
+    {
+        return phone;
+    }
+    public void setDisplayno(String displayno)
+    {
+        this.displayno = displayno;
+    }
+
+    public String getDisplayno()
+    {
+        return displayno;
+    }
+    public void setOperate(String operate)
+    {
+        this.operate = operate;
+    }
+
+    public String getOperate()
+    {
+        return operate;
+    }
+    public void setInbound(Long inbound)
+    {
+        this.inbound = inbound;
+    }
+
+    public Long getInbound()
+    {
+        return inbound;
+    }
+    public void setIncoming(Long incoming)
+    {
+        this.incoming = incoming;
+    }
+
+    public Long getIncoming()
+    {
+        return incoming;
+    }
+    public void setAssigntime(Long assigntime)
+    {
+        this.assigntime = assigntime;
+    }
+
+    public Long getAssigntime()
+    {
+        return assigntime;
+    }
+    public void setStarttime(Long starttime)
+    {
+        this.starttime = starttime;
+    }
+
+    public Long getStarttime()
+    {
+        return starttime;
+    }
+    public void setAnswertime(Long answertime)
+    {
+        this.answertime = answertime;
+    }
+
+    public Long getAnswertime()
+    {
+        return answertime;
+    }
+    public void setSilent(Long silent)
+    {
+        this.silent = silent;
+    }
+
+    public Long getSilent()
+    {
+        return silent;
+    }
+    public void setDtmfKey(String dtmfKey)
+    {
+        this.dtmfKey = dtmfKey;
+    }
+
+    public String getDtmfKey()
+    {
+        return dtmfKey;
+    }
+    public void setMusicpath(String musicpath)
+    {
+        this.musicpath = musicpath;
+    }
+
+    public String getMusicpath()
+    {
+        return musicpath;
+    }
+    public void setSentIndex(Long sentIndex)
+    {
+        this.sentIndex = sentIndex;
+    }
+
+    public Long getSentIndex()
+    {
+        return sentIndex;
+    }
+    public void setSentBegin(Long sentBegin)
+    {
+        this.sentBegin = sentBegin;
+    }
+
+    public Long getSentBegin()
+    {
+        return sentBegin;
+    }
+    public void setAsrtext(String asrtext)
+    {
+        this.asrtext = asrtext;
+    }
+
+    public String getAsrtext()
+    {
+        return asrtext;
+    }
+    public void setBeginTime(Long beginTime)
+    {
+        this.beginTime = beginTime;
+    }
+
+    public Long getBeginTime()
+    {
+        return beginTime;
+    }
+    public void setEndTime(Long endTime)
+    {
+        this.endTime = endTime;
+    }
+
+    public Long getEndTime()
+    {
+        return endTime;
+    }
+    public void setSentEnd(Long sentEnd)
+    {
+        this.sentEnd = sentEnd;
+    }
+
+    public Long getSentEnd()
+    {
+        return sentEnd;
+    }
+    public void setRecordpath(String recordpath)
+    {
+        this.recordpath = recordpath;
+    }
+
+    public String getRecordpath()
+    {
+        return recordpath;
+    }
+    public void setRecordurl(String recordurl)
+    {
+        this.recordurl = recordurl;
+    }
+
+    public String getRecordurl()
+    {
+        return recordurl;
+    }
+    public void setTemplateid(String templateid)
+    {
+        this.templateid = templateid;
+    }
+
+    public String getTemplateid()
+    {
+        return templateid;
+    }
+    public void setTemplatequestionnum(Long templatequestionnum)
+    {
+        this.templatequestionnum = templatequestionnum;
+    }
+
+    public Long getTemplatequestionnum()
+    {
+        return templatequestionnum;
+    }
+    public void setSwitchid(Long switchid)
+    {
+        this.switchid = switchid;
+    }
+
+    public Long getSwitchid()
+    {
+        return switchid;
+    }
+    public void setQuestiontext(String questiontext)
+    {
+        this.questiontext = questiontext;
+    }
+
+    public String getQuestiontext()
+    {
+        return questiontext;
+    }
+    public void setQuestionvoice(String questionvoice)
+    {
+        this.questionvoice = questionvoice;
+    }
+
+    public String getQuestionvoice()
+    {
+        return questionvoice;
+    }
+    public void setCategoryname(String categoryname)
+    {
+        this.categoryname = categoryname;
+    }
+
+    public String getCategoryname()
+    {
+        return categoryname;
+    }
+    public void setTargetoptions(String targetoptions)
+    {
+        this.targetoptions = targetoptions;
+    }
+
+    public String getTargetoptions()
+    {
+        return targetoptions;
+    }
+    public void setTargetvalue(String targetvalue)
+    {
+        this.targetvalue = targetvalue;
+    }
+
+    public String getTargetvalue()
+    {
+        return targetvalue;
+    }
+    public void setMatchedtext(String matchedtext)
+    {
+        this.matchedtext = matchedtext;
+    }
+
+    public String getMatchedtext()
+    {
+        return matchedtext;
+    }
+    public void setAddtime(Date addtime)
+    {
+        this.addtime = addtime;
+    }
+
+    public Date getAddtime()
+    {
+        return addtime;
+    }
+    public void setIsupload(Long isupload)
+    {
+        this.isupload = isupload;
+    }
+
+    public Long getIsupload()
+    {
+        return isupload;
+    }
+    public void setUploadTime(Date uploadTime)
+    {
+        this.uploadTime = uploadTime;
+    }
+
+    public Date getUploadTime()
+    {
+        return uploadTime;
+    }
+    public void setOrgid(String orgid)
+    {
+        this.orgid = orgid;
+    }
+
+    public String getOrgid()
+    {
+        return orgid;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setPid(Long pid)
+    {
+        this.pid = pid;
+    }
+
+    public Long getPid()
+    {
+        return pid;
+    }
+    public void setGuid(String guid)
+    {
+        this.guid = guid;
+    }
+
+    public String getGuid()
+    {
+        return guid;
+    }
+    public void setValueType(String valueType)
+    {
+        this.valueType = valueType;
+    }
+
+    public String getValueType()
+    {
+        return valueType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("calldetailid", getCalldetailid())
+            .append("callid", getCallid())
+            .append("uuid", getUuid())
+            .append("phone", getPhone())
+            .append("displayno", getDisplayno())
+            .append("operate", getOperate())
+            .append("inbound", getInbound())
+            .append("incoming", getIncoming())
+            .append("assigntime", getAssigntime())
+            .append("starttime", getStarttime())
+            .append("answertime", getAnswertime())
+            .append("silent", getSilent())
+            .append("dtmfKey", getDtmfKey())
+            .append("musicpath", getMusicpath())
+            .append("sentIndex", getSentIndex())
+            .append("sentBegin", getSentBegin())
+            .append("asrtext", getAsrtext())
+            .append("beginTime", getBeginTime())
+            .append("endTime", getEndTime())
+            .append("sentEnd", getSentEnd())
+            .append("recordpath", getRecordpath())
+            .append("recordurl", getRecordurl())
+            .append("templateid", getTemplateid())
+            .append("templatequestionnum", getTemplatequestionnum())
+            .append("switchid", getSwitchid())
+            .append("questiontext", getQuestiontext())
+            .append("questionvoice", getQuestionvoice())
+            .append("categoryname", getCategoryname())
+            .append("targetoptions", getTargetoptions())
+            .append("targetvalue", getTargetvalue())
+            .append("matchedtext", getMatchedtext())
+            .append("addtime", getAddtime())
+            .append("isupload", getIsupload())
+            .append("uploadTime", getUploadTime())
+            .append("orgid", getOrgid())
+            .append("createTime", getCreateTime())
+            .append("delFlag", getDelFlag())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("createBy", getCreateBy())
+            .append("pid", getPid())
+            .append("guid", getGuid())
+            .append("valueType", getValueType())
+            .toString();
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/SvyTaskSingleMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyTaskSingleMapper.java
index 3fec8fa..13ab6ee 100644
--- a/smartor/src/main/java/com/smartor/mapper/SvyTaskSingleMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/SvyTaskSingleMapper.java
@@ -2,6 +2,7 @@
 
 import com.smartor.domain.SvyTaskSingle;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -60,4 +61,6 @@
      * @return 缁撴灉
      */
     public int deleteSvyTaskSingleByIds(Long[] ids);
+
+    public int deleteSvyTaskcallByCondition(@Param("taskid") Long id, @Param("patid") Long patid);
 }
diff --git a/smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateScriptMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateScriptMapper.java
new file mode 100644
index 0000000..9d65fcd
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateScriptMapper.java
@@ -0,0 +1,64 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.SvyTaskTemplateScript;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯$増闂璇濇湳搴揗apper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Mapper
+public interface SvyTaskTemplateScriptMapper
+{
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param ID 闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    public SvyTaskTemplateScript selectSvyTaskTemplateScriptByID(Long ID);
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴撳垪琛�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 闂嵎浠诲姟妯$増闂璇濇湳搴撻泦鍚�
+     */
+    public List<SvyTaskTemplateScript> selectSvyTaskTemplateScriptList(SvyTaskTemplateScript svyTaskTemplateScript);
+
+    /**
+     * 鏂板闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 缁撴灉
+     */
+    public int insertSvyTaskTemplateScript(SvyTaskTemplateScript svyTaskTemplateScript);
+
+    /**
+     * 淇敼闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 缁撴灉
+     */
+    public int updateSvyTaskTemplateScript(SvyTaskTemplateScript svyTaskTemplateScript);
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param ID 闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateScriptByID(Long ID);
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param IDs 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateScriptByIDs(Long[] IDs);
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateTargetoptionMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateTargetoptionMapper.java
new file mode 100644
index 0000000..32b88eb
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/SvyTaskTemplateTargetoptionMapper.java
@@ -0,0 +1,64 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.SvyTaskTemplateTargetoption;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴揗apper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Mapper
+public interface SvyTaskTemplateTargetoptionMapper
+{
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param id 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    public SvyTaskTemplateTargetoption selectSvyTaskTemplateTargetoptionById(Long id);
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撳垪琛�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撻泦鍚�
+     */
+    public List<SvyTaskTemplateTargetoption> selectSvyTaskTemplateTargetoptionList(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption);
+
+    /**
+     * 鏂板闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 缁撴灉
+     */
+    public int insertSvyTaskTemplateTargetoption(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption);
+
+    /**
+     * 淇敼闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 缁撴灉
+     */
+    public int updateSvyTaskTemplateTargetoption(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption);
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param id 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateTargetoptionById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateTargetoptionByIds(Long[] ids);
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/SvyTasksingledetailMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyTasksingledetailMapper.java
new file mode 100644
index 0000000..3100941
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/SvyTasksingledetailMapper.java
@@ -0,0 +1,63 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.SvyTasksingledetail;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 闂嵎缁撴灉璁板綍璇︽儏Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Mapper
+public interface SvyTasksingledetailMapper {
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailid 闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 闂嵎缁撴灉璁板綍璇︽儏
+     */
+    public SvyTasksingledetail selectSvyTasksingledetailByCalldetailid(String calldetailid);
+
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏鍒楄〃
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 闂嵎缁撴灉璁板綍璇︽儏闆嗗悎
+     */
+    public List<SvyTasksingledetail> selectSvyTasksingledetailList(SvyTasksingledetail svyTasksingledetail);
+
+    /**
+     * 鏂板闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 缁撴灉
+     */
+    public int insertSvyTasksingledetail(SvyTasksingledetail svyTasksingledetail);
+
+    /**
+     * 淇敼闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 缁撴灉
+     */
+    public int updateSvyTasksingledetail(SvyTasksingledetail svyTasksingledetail);
+
+    /**
+     * 鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailid 闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteSvyTasksingledetailByCalldetailid(String calldetailid);
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteSvyTasksingledetailByCalldetailids(String[] calldetailids);
+}
diff --git a/smartor/src/main/java/com/smartor/service/ISvyTaskSingleService.java b/smartor/src/main/java/com/smartor/service/ISvyTaskSingleService.java
index 6b2bf18..86ea32d 100644
--- a/smartor/src/main/java/com/smartor/service/ISvyTaskSingleService.java
+++ b/smartor/src/main/java/com/smartor/service/ISvyTaskSingleService.java
@@ -1,6 +1,7 @@
 package com.smartor.service;
 
 import com.smartor.domain.SvyTaskSingle;
+import com.smartor.domain.SvyTaskVO;
 
 import java.util.List;
 
@@ -59,4 +60,9 @@
      * @return 缁撴灉
      */
     public int deleteSvyTaskSingleById(Long id);
+
+    /**
+     * 鏂板鎴栦慨鏀瑰垹闄ら棶鍗蜂换鍔�
+     */
+    public int insertOrUpdateSvyTask(SvyTaskVO svyTaskVO);
 }
diff --git a/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateScriptService.java b/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateScriptService.java
new file mode 100644
index 0000000..9e61da4
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateScriptService.java
@@ -0,0 +1,62 @@
+package com.smartor.service;
+
+import com.smartor.domain.SvyTaskTemplateScript;
+
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯$増闂璇濇湳搴揝ervice鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+public interface ISvyTaskTemplateScriptService
+{
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param ID 闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    public SvyTaskTemplateScript selectSvyTaskTemplateScriptByID(Long ID);
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴撳垪琛�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 闂嵎浠诲姟妯$増闂璇濇湳搴撻泦鍚�
+     */
+    public List<SvyTaskTemplateScript> selectSvyTaskTemplateScriptList(SvyTaskTemplateScript svyTaskTemplateScript);
+
+    /**
+     * 鏂板闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 缁撴灉
+     */
+    public int insertSvyTaskTemplateScript(SvyTaskTemplateScript svyTaskTemplateScript);
+
+    /**
+     * 淇敼闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 缁撴灉
+     */
+    public int updateSvyTaskTemplateScript(SvyTaskTemplateScript svyTaskTemplateScript);
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param IDs 闇�瑕佸垹闄ょ殑闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿泦鍚�
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateScriptByIDs(Long[] IDs);
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴撲俊鎭�
+     *
+     * @param ID 闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateScriptByID(Long ID);
+}
diff --git a/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateService.java b/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateService.java
index 995b489..e46e689 100644
--- a/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateService.java
+++ b/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateService.java
@@ -1,6 +1,8 @@
 package com.smartor.service;
 
+import com.smartor.domain.IvrLibaTemplateVO;
 import com.smartor.domain.SvyTaskTemplate;
+import com.smartor.domain.SvyTaskTemplateVO;
 
 import java.util.List;
 
@@ -10,8 +12,7 @@
  * @author ruoyi
  * @date 2024-06-12
  */
-public interface ISvyTaskTemplateService
-{
+public interface ISvyTaskTemplateService {
     /**
      * 鏌ヨ浠诲姟闂嵎妯℃澘
      *
@@ -59,4 +60,14 @@
      * @return 缁撴灉
      */
     public int deleteSvyTaskTemplateBySvyid(Long svyid);
+
+    /**
+     * 鏂板鎴栦慨鏀归棶棰樿鎯�
+     */
+    public Integer saveOrUpdateTemplate(SvyTaskTemplateVO svyTaskTemplateVO);
+
+    /**
+     * 鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢
+     */
+    public SvyTaskTemplateVO selectInfoByCondition(SvyTaskTemplateVO svyTaskTemplateVO);
 }
diff --git a/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateTargetoptionService.java b/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateTargetoptionService.java
new file mode 100644
index 0000000..aa08a19
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/ISvyTaskTemplateTargetoptionService.java
@@ -0,0 +1,62 @@
+package com.smartor.service;
+
+import com.smartor.domain.SvyTaskTemplateTargetoption;
+
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴揝ervice鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+public interface ISvyTaskTemplateTargetoptionService
+{
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param id 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    public SvyTaskTemplateTargetoption selectSvyTaskTemplateTargetoptionById(Long id);
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撳垪琛�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撻泦鍚�
+     */
+    public List<SvyTaskTemplateTargetoption> selectSvyTaskTemplateTargetoptionList(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption);
+
+    /**
+     * 鏂板闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 缁撴灉
+     */
+    public int insertSvyTaskTemplateTargetoption(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption);
+
+    /**
+     * 淇敼闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 缁撴灉
+     */
+    public int updateSvyTaskTemplateTargetoption(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption);
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿泦鍚�
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateTargetoptionByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲俊鎭�
+     *
+     * @param id 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 缁撴灉
+     */
+    public int deleteSvyTaskTemplateTargetoptionById(Long id);
+}
diff --git a/smartor/src/main/java/com/smartor/service/ISvyTasksingledetailService.java b/smartor/src/main/java/com/smartor/service/ISvyTasksingledetailService.java
new file mode 100644
index 0000000..735dbcd
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/ISvyTasksingledetailService.java
@@ -0,0 +1,62 @@
+package com.smartor.service;
+
+import com.smartor.domain.SvyTasksingledetail;
+
+import java.util.List;
+
+/**
+ * 闂嵎缁撴灉璁板綍璇︽儏Service鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+public interface ISvyTasksingledetailService
+{
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailid 闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 闂嵎缁撴灉璁板綍璇︽儏
+     */
+    public SvyTasksingledetail selectSvyTasksingledetailByCalldetailid(String calldetailid);
+
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏鍒楄〃
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 闂嵎缁撴灉璁板綍璇︽儏闆嗗悎
+     */
+    public List<SvyTasksingledetail> selectSvyTasksingledetailList(SvyTasksingledetail svyTasksingledetail);
+
+    /**
+     * 鏂板闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 缁撴灉
+     */
+    public int insertSvyTasksingledetail(SvyTasksingledetail svyTasksingledetail);
+
+    /**
+     * 淇敼闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 缁撴灉
+     */
+    public int updateSvyTasksingledetail(SvyTasksingledetail svyTasksingledetail);
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailids 闇�瑕佸垹闄ょ殑闂嵎缁撴灉璁板綍璇︽儏涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteSvyTasksingledetailByCalldetailids(String[] calldetailids);
+
+    /**
+     * 鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏淇℃伅
+     *
+     * @param calldetailid 闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteSvyTasksingledetailByCalldetailid(String calldetailid);
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java
index 0a19606..c96e430 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java
@@ -53,28 +53,26 @@
      */
     @Override
     public List<SvyLibScript> selectSvyLibScriptList(SvyLibScript svyLibTopic) {
-        //娣诲姞棰樼洰
-
-        List<SvyLibScript> svyLibTopics = svyLibTopicMapper.selectSvyLibScriptList(svyLibTopic);
+        List<SvyLibScript> svyLibScripts = svyLibTopicMapper.selectSvyLibScriptList(svyLibTopic);
         //鑾峰彇棰樼洰閫夐」
 
-        for (int j = 0; j < svyLibTopics.size(); j++) {
-            log.info("闂id涓猴細{}", svyLibTopics.get(j).getSvyscriptId());
-            if (StringUtils.isNotEmpty(svyLibTopics.get(j).getIcd10Name()))
-                svyLibTopics.get(j).setIcd10NameList(JSONArray.parseArray(svyLibTopics.get(j).getIcd10Name(), String.class));
+        for (int j = 0; j < svyLibScripts.size(); j++) {
+            log.info("闂id涓猴細{}", svyLibScripts.get(j).getId());
+            if (StringUtils.isNotEmpty(svyLibScripts.get(j).getIcd10Name()))
+                svyLibScripts.get(j).setIcd10NameList(JSONArray.parseArray(svyLibScripts.get(j).getIcd10Name(), String.class));
 
-            if (StringUtils.isNotEmpty(svyLibTopics.get(j).getScripttype()) && svyLibTopics.get(j).getScripttype().equals("3") || svyLibTopics.get(j).getId() == null) {
+            if (StringUtils.isNotEmpty(svyLibScripts.get(j).getScripttype()) && svyLibScripts.get(j).getScripttype().equals("3") || svyLibScripts.get(j).getId() == null) {
                 //浣滅瓟棰橈紝涓嶉渶瑕侀�夐」
                 continue;
             } else {
                 SvyLibScriptOption svyLibTopicoption = new SvyLibScriptOption();
-                svyLibTopicoption.setTopicid(svyLibTopics.get(j).getId());
+                svyLibTopicoption.setTopicid(svyLibScripts.get(j).getId());
                 List<SvyLibScriptOption> svyLibTopicoptions = svyLibScriptOptionMapper.selectSvyLibScriptOptionList(svyLibTopicoption);
                 //灏嗘煡璇㈠嚭鐨勯�夐」鐩斁鍒伴鐩腑
-                svyLibTopics.get(j).setSvyLibScriptOptions(svyLibTopicoptions);
+                svyLibScripts.get(j).setSvyLibScriptOptions(svyLibTopicoptions);
             }
         }
-        return svyLibTopics;
+        return svyLibScripts;
     }
 
     /**
@@ -122,7 +120,7 @@
                     svyLibScriptOptionMapper.updateSvyLibScriptOption(svyLibTopicoption);
                 } else if (svyLibTopicoption.getIsoperation() != null && svyLibTopicoption.getIsoperation() == 3) {
                     //鍒犻櫎
-                    svyLibScriptOptionMapper.deleteSvyLibScriptOptionByOptionid(svyLibTopicoption.getOptionid());
+                    svyLibScriptOptionMapper.deleteSvyLibScriptOptionByOptionid(svyLibTopicoption.getId());
                 }
             }
         }
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
index c81b222..ffe451c 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
@@ -153,6 +153,10 @@
             //淇敼
             svyLibTemplate.setUpdateTime(DateUtils.getNowDate());
             i = svyLibTemplateMapper.updateSvyLibTemplate(svyLibTemplate);
+        } else if (svyLibTemplate.getIsoperation() != null && svyLibTemplate.getIsoperation() == 3) {
+            //鍒犻櫎
+            i = svyLibTemplateMapper.deleteSvyLibTemplateBySvyid(svyLibTemplate.getSvyid());
+
         }
 
         //澶勭悊棰樼洰
@@ -170,6 +174,8 @@
                     //淇敼
                     svyLibTemplateScript.setSvyid(svyLibTemplate.getSvyid());
                     svyLibTemplateScriptMapper.updateSvyLibTemplateScript(svyLibTemplateScript);
+                } else if (svyLibScript.getIsoperation() != null && svyLibScript.getIsoperation() == 3) {
+                    svyLibTemplateScriptMapper.deleteSvyLibTemplateScriptByTopicid(svyLibTemplateScript.getId());
                 }
 
                 //瀵归鐩�夐」杩涜澶勭悊
@@ -183,6 +189,9 @@
                             //淇敼
                             svyLibTemplateTargetoption.setScriptid(svyLibScript.getId());
                             svyLibTemplateTargetoptionMapper.updateSvyLibTemplateTargetoption(svyLibTemplateTargetoption);
+                        } else if (svyLibTemplateTargetoption.getIsoperation() != null && svyLibTemplateTargetoption.getIsoperation() == 3) {
+                            //鍒犻櫎
+                            svyLibTemplateTargetoptionMapper.deleteSvyLibTemplateTargetoptionById(svyLibTemplateTargetoption.getId());
                         }
                     }
 
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
index 30012c2..7ec6671 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -1,9 +1,20 @@
 package com.smartor.service.impl;
 
+import com.alibaba.fastjson2.JSON;
+import com.google.gson.Gson;
+import com.ruoyi.common.exception.base.BaseException;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DtoConversionUtils;
+import com.smartor.domain.PatTaskRelevance;
+import com.smartor.domain.SvyTask;
 import com.smartor.domain.SvyTaskSingle;
+import com.smartor.domain.SvyTaskVO;
 import com.smartor.mapper.SvyTaskSingleMapper;
+import com.smartor.service.ISvyTaskService;
 import com.smartor.service.ISvyTaskSingleService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -15,11 +26,14 @@
  * @author ruoyi
  * @date 2024-06-12
  */
+@Slf4j
 @Service
-public class SvyTaskSingleServiceImpl implements ISvyTaskSingleService
-{
+public class SvyTaskSingleServiceImpl implements ISvyTaskSingleService {
     @Autowired
     private SvyTaskSingleMapper svyTaskSingleMapper;
+
+    @Autowired
+    private ISvyTaskService svyTaskService;
 
     /**
      * 鏌ヨ鍗曚竴浠诲姟锛堥棶鍗凤級
@@ -28,8 +42,7 @@
      * @return 鍗曚竴浠诲姟锛堥棶鍗凤級
      */
     @Override
-    public SvyTaskSingle selectSvyTaskSingleById(Long id)
-    {
+    public SvyTaskSingle selectSvyTaskSingleById(Long id) {
         return svyTaskSingleMapper.selectSvyTaskSingleById(id);
     }
 
@@ -40,8 +53,7 @@
      * @return 鍗曚竴浠诲姟锛堥棶鍗凤級
      */
     @Override
-    public List<SvyTaskSingle> selectSvyTaskSingleList(SvyTaskSingle svyTaskSingle)
-    {
+    public List<SvyTaskSingle> selectSvyTaskSingleList(SvyTaskSingle svyTaskSingle) {
         return svyTaskSingleMapper.selectSvyTaskSingleList(svyTaskSingle);
     }
 
@@ -52,8 +64,7 @@
      * @return 缁撴灉
      */
     @Override
-    public int insertSvyTaskSingle(SvyTaskSingle svyTaskSingle)
-    {
+    public int insertSvyTaskSingle(SvyTaskSingle svyTaskSingle) {
         svyTaskSingle.setCreateTime(DateUtils.getNowDate());
         return svyTaskSingleMapper.insertSvyTaskSingle(svyTaskSingle);
     }
@@ -65,8 +76,7 @@
      * @return 缁撴灉
      */
     @Override
-    public int updateSvyTaskSingle(SvyTaskSingle svyTaskSingle)
-    {
+    public int updateSvyTaskSingle(SvyTaskSingle svyTaskSingle) {
         svyTaskSingle.setUpdateTime(DateUtils.getNowDate());
         return svyTaskSingleMapper.updateSvyTaskSingle(svyTaskSingle);
     }
@@ -78,8 +88,7 @@
      * @return 缁撴灉
      */
     @Override
-    public int deleteSvyTaskSingleByIds(Long[] ids)
-    {
+    public int deleteSvyTaskSingleByIds(Long[] ids) {
         return svyTaskSingleMapper.deleteSvyTaskSingleByIds(ids);
     }
 
@@ -90,8 +99,84 @@
      * @return 缁撴灉
      */
     @Override
-    public int deleteSvyTaskSingleById(Long id)
-    {
+    public int deleteSvyTaskSingleById(Long id) {
         return svyTaskSingleMapper.deleteSvyTaskSingleById(id);
     }
+
+    @Override
+    public int insertOrUpdateSvyTask(SvyTaskVO svyTaskVO) {
+        if (ObjectUtils.isEmpty(svyTaskVO)) {
+            log.info("闂嵎浠诲姟鍏ュ弬涓虹┖锛岃妫�鏌ュ叆鍙�");
+            throw new BaseException("闂嵎浠诲姟鍏ュ弬涓虹┖锛岃妫�鏌ュ叆鍙�");
+        }
+        Integer integer = 1;
+        SvyTask svyTask = DtoConversionUtils.sourceToTarget(svyTaskVO, SvyTask.class);
+        svyTask.setTextParam(JSON.toJSONString(svyTaskVO.getTextParamMap()));
+        if (svyTaskVO.getIsoperation() != null && svyTaskVO.getIsoperation() == 1) {
+            //寰�浠诲姟琛ㄤ腑锛屾柊澧炰换鍔�
+            if (ObjectUtils.isNotEmpty(svyTaskVO.getSendTimeSlot()))
+                svyTask.setSendTimeSlot(JSON.toJSONString(svyTaskVO.getSendTimeSlot()));
+            if (svyTask.getSendState() == null) svyTask.setSendState("1");
+            svyTask.setTemplateid(svyTaskVO.getLibtemplateid());
+            svyTaskService.insertSvyTask(svyTask);
+
+            //灏嗕换鍔′俊鎭斁鍒版湇鍔¤〃涓�
+            SvyTaskSingle svyTaskSingle = DtoConversionUtils.sourceToTarget(svyTaskVO, SvyTaskSingle.class);
+            svyTaskSingle.setTaskid(svyTask.getTaskid());
+            //鏂板
+            if (CollectionUtils.isNotEmpty(svyTaskVO.getPatTaskRelevances())) {
+                for (PatTaskRelevance patTaskRelevance : svyTaskVO.getPatTaskRelevances()) {
+                    //灏嗕换鍔′俊鎭柊澧炲埌闅忚鏈嶅姟琛ㄤ腑
+                    svyTaskSingle.setSendname(patTaskRelevance.getName());
+                    svyTaskSingle.setAge(patTaskRelevance.getAge());
+                    svyTaskSingle.setSfzh(patTaskRelevance.getSfzh());
+                    svyTaskSingle.setPhone(patTaskRelevance.getPhone());
+                    svyTaskSingle.setAddr(patTaskRelevance.getAddr());
+                    svyTaskSingle.setPatid(patTaskRelevance.getPatid());
+                    svyTaskSingle.setCreateTime(DateUtils.getNowDate());
+                    svyTaskSingle.setCreateTime(DateUtils.getNowDate());
+                    svyTaskSingleMapper.insertSvyTaskSingle(svyTaskSingle);
+                    integer = svyTaskSingle.getId().intValue();
+                }
+            }
+
+        } else if (svyTaskVO.getIsoperation() != null && svyTaskVO.getIsoperation() == 2) {
+            //浠诲姟淇敼
+            if (ObjectUtils.isNotEmpty(svyTaskVO.getSendTimeSlot()))
+                svyTask.setSendTimeSlot(JSON.toJSONString(svyTaskVO.getSendTimeSlot()));
+            //淇敼鎿嶄綔锛岄渶瑕佸皢stopState鐘舵��+1
+            SvyTask svyTask1 = svyTaskService.selectSvyTaskByTaskid(svyTaskVO.getTaskid());
+            svyTask.setStopState(svyTask1.getStopState() + 1);
+            svyTask.setTemplateid(svyTaskVO.getLibtemplateid());
+            svyTaskService.updateSvyTask(svyTask);
+
+            if (CollectionUtils.isNotEmpty(svyTaskVO.getPatTaskRelevances())) {
+                for (PatTaskRelevance patTaskRelevance : svyTaskVO.getPatTaskRelevances()) {
+
+                    SvyTaskSingle svyTaskSingle = DtoConversionUtils.sourceToTarget(svyTaskVO, SvyTaskSingle.class);
+                    svyTaskSingle.setSendname(patTaskRelevance.getName());
+                    svyTaskSingle.setAge(patTaskRelevance.getAge());
+                    svyTaskSingle.setSfzh(patTaskRelevance.getSfzh());
+                    svyTaskSingle.setPhone(patTaskRelevance.getPhone());
+                    svyTaskSingle.setAddr(patTaskRelevance.getAddr());
+                    svyTaskSingle.setPatid(patTaskRelevance.getPatid());
+                    svyTaskSingle.setCreateTime(DateUtils.getNowDate());
+                    svyTaskSingle.setTextParam(new Gson().toJson(svyTaskVO.getTextParamMap()));
+                    if (patTaskRelevance.getIsoperation() != null) {
+                        if (patTaskRelevance.getIsoperation() == 2)
+                            svyTaskSingleMapper.updateSvyTaskSingle(svyTaskSingle);
+                        if (patTaskRelevance.getIsoperation() == 1)
+                            svyTaskSingleMapper.insertSvyTaskSingle(svyTaskSingle);
+                        if (patTaskRelevance.getIsoperation() == 3)
+                            //  閫氳繃taskid鍜宲atid鍘诲垹闄よ鏉℃暟鎹�
+                            svyTaskSingleMapper.deleteSvyTaskcallByCondition(svyTaskVO.getTaskid(), patTaskRelevance.getPatid());
+                    }
+                    integer = svyTaskSingle.getTaskid().intValue();
+                }
+            }
+        }
+
+
+        return integer;
+    }
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateScriptServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateScriptServiceImpl.java
new file mode 100644
index 0000000..1e2ef5d
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateScriptServiceImpl.java
@@ -0,0 +1,97 @@
+package com.smartor.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.SvyTaskTemplateScript;
+import com.smartor.mapper.SvyTaskTemplateScriptMapper;
+import com.smartor.service.ISvyTaskTemplateScriptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯$増闂璇濇湳搴揝ervice涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Service
+public class SvyTaskTemplateScriptServiceImpl implements ISvyTaskTemplateScriptService
+{
+    @Autowired
+    private SvyTaskTemplateScriptMapper svyTaskTemplateScriptMapper;
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param ID 闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    @Override
+    public SvyTaskTemplateScript selectSvyTaskTemplateScriptByID(Long ID)
+    {
+        return svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptByID(ID);
+    }
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯$増闂璇濇湳搴撳垪琛�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     */
+    @Override
+    public List<SvyTaskTemplateScript> selectSvyTaskTemplateScriptList(SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        return svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
+    }
+
+    /**
+     * 鏂板闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertSvyTaskTemplateScript(SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        svyTaskTemplateScript.setCreateTime(DateUtils.getNowDate());
+        return svyTaskTemplateScriptMapper.insertSvyTaskTemplateScript(svyTaskTemplateScript);
+    }
+
+    /**
+     * 淇敼闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param svyTaskTemplateScript 闂嵎浠诲姟妯$増闂璇濇湳搴�
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateSvyTaskTemplateScript(SvyTaskTemplateScript svyTaskTemplateScript)
+    {
+        svyTaskTemplateScript.setUpdateTime(DateUtils.getNowDate());
+        return svyTaskTemplateScriptMapper.updateSvyTaskTemplateScript(svyTaskTemplateScript);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴�
+     *
+     * @param IDs 闇�瑕佸垹闄ょ殑闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteSvyTaskTemplateScriptByIDs(Long[] IDs)
+    {
+        return svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByIDs(IDs);
+    }
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯$増闂璇濇湳搴撲俊鎭�
+     *
+     * @param ID 闂嵎浠诲姟妯$増闂璇濇湳搴撲富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteSvyTaskTemplateScriptByID(Long ID)
+    {
+        return svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(ID);
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java
index 7ec8061..a18eb0d 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java
@@ -1,12 +1,25 @@
 package com.smartor.service.impl;
 
+import com.alibaba.fastjson2.JSON;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ruoyi.common.exception.base.BaseException;
 import com.ruoyi.common.utils.DateUtils;
-import com.smartor.domain.SvyTaskTemplate;
+import com.ruoyi.common.utils.DtoConversionUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.smartor.domain.*;
 import com.smartor.mapper.SvyTaskTemplateMapper;
+import com.smartor.mapper.SvyTaskTemplateScriptMapper;
+import com.smartor.mapper.SvyTaskTemplateTargetoptionMapper;
 import com.smartor.service.ISvyTaskTemplateService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -15,11 +28,17 @@
  * @author ruoyi
  * @date 2024-06-12
  */
+@Slf4j
 @Service
-public class SvyTaskTemplateServiceImpl implements ISvyTaskTemplateService
-{
+public class SvyTaskTemplateServiceImpl implements ISvyTaskTemplateService {
     @Autowired
     private SvyTaskTemplateMapper svyTaskTemplateMapper;
+
+    @Autowired
+    private SvyTaskTemplateScriptMapper svyTaskTemplateScriptMapper;
+
+    @Autowired
+    private SvyTaskTemplateTargetoptionMapper svyTaskTemplateTargetoptionMapper;
 
     /**
      * 鏌ヨ浠诲姟闂嵎妯℃澘
@@ -28,8 +47,7 @@
      * @return 浠诲姟闂嵎妯℃澘
      */
     @Override
-    public SvyTaskTemplate selectSvyTaskTemplateBySvyid(Long svyid)
-    {
+    public SvyTaskTemplate selectSvyTaskTemplateBySvyid(Long svyid) {
         return svyTaskTemplateMapper.selectSvyTaskTemplateBySvyid(svyid);
     }
 
@@ -40,8 +58,7 @@
      * @return 浠诲姟闂嵎妯℃澘
      */
     @Override
-    public List<SvyTaskTemplate> selectSvyTaskTemplateList(SvyTaskTemplate svyTaskTemplate)
-    {
+    public List<SvyTaskTemplate> selectSvyTaskTemplateList(SvyTaskTemplate svyTaskTemplate) {
         return svyTaskTemplateMapper.selectSvyTaskTemplateList(svyTaskTemplate);
     }
 
@@ -52,8 +69,7 @@
      * @return 缁撴灉
      */
     @Override
-    public int insertSvyTaskTemplate(SvyTaskTemplate svyTaskTemplate)
-    {
+    public int insertSvyTaskTemplate(SvyTaskTemplate svyTaskTemplate) {
         svyTaskTemplate.setCreateTime(DateUtils.getNowDate());
         return svyTaskTemplateMapper.insertSvyTaskTemplate(svyTaskTemplate);
     }
@@ -65,8 +81,7 @@
      * @return 缁撴灉
      */
     @Override
-    public int updateSvyTaskTemplate(SvyTaskTemplate svyTaskTemplate)
-    {
+    public int updateSvyTaskTemplate(SvyTaskTemplate svyTaskTemplate) {
         svyTaskTemplate.setUpdateTime(DateUtils.getNowDate());
         return svyTaskTemplateMapper.updateSvyTaskTemplate(svyTaskTemplate);
     }
@@ -78,8 +93,7 @@
      * @return 缁撴灉
      */
     @Override
-    public int deleteSvyTaskTemplateBySvyids(Long[] svyids)
-    {
+    public int deleteSvyTaskTemplateBySvyids(Long[] svyids) {
         return svyTaskTemplateMapper.deleteSvyTaskTemplateBySvyids(svyids);
     }
 
@@ -90,8 +104,163 @@
      * @return 缁撴灉
      */
     @Override
-    public int deleteSvyTaskTemplateBySvyid(Long svyid)
-    {
+    public int deleteSvyTaskTemplateBySvyid(Long svyid) {
         return svyTaskTemplateMapper.deleteSvyTaskTemplateBySvyid(svyid);
     }
+
+    /**
+     * 鏂板鎴栦慨鏀归棶棰樿鎯�
+     *
+     * @param svyTaskTemplateVO
+     * @return
+     */
+    @Override
+    public Integer saveOrUpdateTemplate(SvyTaskTemplateVO svyTaskTemplateVO) {
+        Integer i = null;
+        SvyTaskTemplate svyTaskTemplate = DtoConversionUtils.sourceToTarget(svyTaskTemplateVO, SvyTaskTemplate.class);
+        if (svyTaskTemplateVO.getIsoperation() != null && svyTaskTemplateVO.getIsoperation() == 1) {
+            //鏂板
+            svyTaskTemplate.setCreateTime(new Date());
+            svyTaskTemplateMapper.insertSvyTaskTemplate(svyTaskTemplate);
+            i = svyTaskTemplate.getId().intValue();
+        } else if (svyTaskTemplateVO.getIsoperation() != null && svyTaskTemplateVO.getIsoperation() == 2) {
+            //淇敼
+            svyTaskTemplate.setUpdateTime(new Date());
+            svyTaskTemplateMapper.updateSvyTaskTemplate(svyTaskTemplate);
+            i = svyTaskTemplate.getId().intValue();
+        }
+        log.info("鏂板鎴栦慨鏀归棶鍗蜂换鍔℃ā鏉胯鎯呯殑id涓猴細{}", svyTaskTemplate.getId());
+
+        //瀵规ā鏉胯瘽鏈拰閫夐」杩涜澶勭悊锛堣瘽鏈〃涓庢寚鏍囪〃杩涜鍚堝苟浜嗭紝锛�
+        if (CollectionUtils.isNotEmpty(svyTaskTemplateVO.getSvyTaskTemplateScriptVOS())) {
+            log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()鏄惁鏈夋暟鎹搱锛歿}", svyTaskTemplateVO.getSvyTaskTemplateScriptVOS());
+            for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : svyTaskTemplateVO.getSvyTaskTemplateScriptVOS()) {
+                if (svyTaskTemplateScriptVO.getIsoperation() != null && svyTaskTemplateScriptVO.getIsoperation() == 1 || svyTaskTemplateScriptVO.getIsoperation() == null && svyTaskTemplateScriptVO.getIsoperation() == 1) {
+                    //鏂板
+                    SvyTaskTemplateScript svyTaskTemplateScript = DtoConversionUtils.sourceToTarget(svyTaskTemplateScriptVO, SvyTaskTemplateScript.class);
+                    svyTaskTemplateScript.setTemplateID(svyTaskTemplate.getId());
+                    svyTaskTemplateScript.setCreateTime(new Date());
+                    svyTaskTemplateScriptMapper.insertSvyTaskTemplateScript(svyTaskTemplateScript);
+                    svyTaskTemplateScript.setIsoperation(1);
+                    //瀵归�夐」鐩繘琛屽鐞�
+                    dealOption(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions(), svyTaskTemplateScript, svyTaskTemplate.getId());
+
+                } else if (svyTaskTemplateScriptVO.getIsoperation() != null && svyTaskTemplateScriptVO.getIsoperation() == 2) {
+                    //淇敼
+                    SvyTaskTemplateScript svyTaskTemplateScript = DtoConversionUtils.sourceToTarget(svyTaskTemplateScriptVO, SvyTaskTemplateScript.class);
+                    svyTaskTemplateScript.setTemplateID(svyTaskTemplate.getId());
+                    svyTaskTemplateScript.setUpdateTime(new Date());
+                    svyTaskTemplateScriptMapper.updateSvyTaskTemplateScript(svyTaskTemplateScript);
+                    svyTaskTemplateScript.setIsoperation(2);
+                    //瀵归�夐」鐩繘琛屽鐞�
+                    dealOption(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions(), svyTaskTemplateScript, svyTaskTemplate.getId());
+
+                } else if (svyTaskTemplateScriptVO.getIsoperation() != null && svyTaskTemplateScriptVO.getIsoperation() == 3) {
+                    //鍒犻櫎
+                    if (svyTaskTemplateScriptVO.getID() == null) {
+                        log.info("鍒犻櫎澶辫触,妯℃澘璇濇湳id涓虹┖");
+                    } else {
+                        svyTaskTemplateScriptVO.setUpdateTime(new Date());
+                        svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getID());
+                    }
+                }
+            }
+        }
+
+        return i;
+    }
+
+
+    /**
+     * 鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢
+     */
+    @Override
+    public SvyTaskTemplateVO selectInfoByCondition(SvyTaskTemplateVO svyTaskTemplateVO) {
+        log.info("selectInfoByCondition鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢鐨勫叆鍙備负 : {}", svyTaskTemplateVO);
+        //鍏堟牴鎹潯浠舵煡璇㈤棶棰樿〃淇℃伅
+        SvyTaskTemplate svyTaskTemplate = DtoConversionUtils.sourceToTarget(svyTaskTemplateVO, SvyTaskTemplate.class);
+        List<SvyTaskTemplate> svyTaskTemplates = selectSvyTaskTemplateList(svyTaskTemplate);
+        if (CollectionUtils.isEmpty(svyTaskTemplates)) {
+            log.info("妯℃澘淇℃伅鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖锛歿}", svyTaskTemplates);
+            throw new BaseException("妯℃澘淇℃伅鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖");
+        }
+
+        log.info("svyLibaTemplates鐨勬煡璇㈢粨鏋滀负:{},鏁伴噺涓� : {}", svyTaskTemplates.get(0), svyTaskTemplates.size());
+        //瀹氫箟IvrLibaTemplateVO 鐢ㄤ簬杩斿弬
+        SvyTaskTemplateVO templateVO = DtoConversionUtils.sourceToTarget(svyTaskTemplates.get(0), SvyTaskTemplateVO.class);
+
+        //鏌ヨ璇濇湳
+        SvyTaskTemplateScript svyTaskTemplateScript = new SvyTaskTemplateScript();
+        svyTaskTemplateScript.setTemplateID(svyTaskTemplates.get(0).getId());
+        List<SvyTaskTemplateScript> svyTaskTemplateScripts = svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
+        List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOS = DtoConversionUtils.sourceToTarget(svyTaskTemplateScripts, SvyTaskTemplateScriptVO.class);
+
+        //閫氳繃璇濇湳ID鑾峰彇閫夐」
+        for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : svyTaskTemplateScriptVOS) {
+            log.info("svyLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", svyTaskTemplateScriptVO.getID());
+            SvyTaskTemplateTargetoption svyTaskTemplateTargetoption = new SvyTaskTemplateTargetoption();
+            svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScriptVO.getID());
+            List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption);
+            for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption1 : svyTaskTemplateTargetoptions) {
+                ObjectMapper mapper = new ObjectMapper();
+                if (!StringUtils.isEmpty(svyTaskTemplateTargetoption1.getDynamiccruxs())) {
+                    try {
+                        svyTaskTemplateTargetoption1.setDynamiccruxs(mapper.readValue(svyTaskTemplateTargetoption1.getDynamiccruxsJson(), List.class));
+                    } catch (JsonProcessingException e) {
+                        e.printStackTrace();
+                    }
+                }
+
+                if (!StringUtils.isEmpty(svyTaskTemplateTargetoption1.getNodynamiccruxs())) {
+                    try {
+                        svyTaskTemplateTargetoption1.setNodynamiccruxs(mapper.readValue(svyTaskTemplateTargetoption1.getNodynamiccruxsJson(), List.class));
+                    } catch (JsonProcessingException e) {
+                        e.printStackTrace();
+                    }
+                }
+
+            }
+            svyTaskTemplateScriptVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateTargetoptions);
+        }
+        Collections.sort(svyTaskTemplateScriptVOS, Comparator.comparing(SvyTaskTemplateScriptVO::getTargetid));
+        //鏁版嵁缁勮
+        templateVO.setSvyTaskTemplateScriptVOS(svyTaskTemplateScriptVOS);
+        return templateVO;
+    }
+
+
+    private void dealOption(List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions, SvyTaskTemplateScript svyTaskTemplateScript, Long tmpID) {
+        log.info("svyTaskTemplateScript鐨勫�间负锛歿}", svyTaskTemplateScript);
+        //瀵规ā鏉挎寚鏍囬�夐」杩涜澶勭悊
+        if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoptions)) {
+            for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateTargetoptions) {
+                if (svyTaskTemplateTargetoption.getIsoperation() != null && svyTaskTemplateTargetoption.getIsoperation() == 1 || svyTaskTemplateTargetoption.getIsoperation() == null && svyTaskTemplateTargetoption.getIsoperation() == 1) {
+                    //鏂板
+                    svyTaskTemplateTargetoption.setTemplateID(tmpID);
+                    svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScript.getID());
+                    if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoption.getDynamiccruxs()))
+                        svyTaskTemplateTargetoption.setDynamiccruxsJson(JSON.toJSONString(svyTaskTemplateTargetoption.getDynamiccruxs()));
+                    if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoption.getNodynamiccruxs()))
+                        svyTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(svyTaskTemplateTargetoption.getNodynamiccruxs()));
+                    svyTaskTemplateTargetoptionMapper.insertSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption);
+                } else if (svyTaskTemplateTargetoption.getIsoperation() != null && svyTaskTemplateTargetoption.getIsoperation() == 2) {
+                    //淇敼
+                    svyTaskTemplateTargetoption.setTemplateID(tmpID);
+                    svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScript.getID());
+                    if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoption.getDynamiccruxs()))
+                        svyTaskTemplateTargetoption.setDynamiccruxsJson(JSON.toJSONString(svyTaskTemplateTargetoption.getDynamiccruxs()));
+                    if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoption.getNodynamiccruxs()))
+                        svyTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(svyTaskTemplateTargetoption.getNodynamiccruxs()));
+                    svyTaskTemplateTargetoptionMapper.updateSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption);
+                } else if (svyTaskTemplateTargetoption.getIsoperation() != null && svyTaskTemplateTargetoption.getIsoperation() == 3) {
+                    //鍒犻櫎
+                    if (svyTaskTemplateTargetoption.getId() == null) {
+                        log.info("鍒犻櫎澶辫触,妯℃澘鎸囨爣閫夐」id涓虹┖");
+                    } else {
+                        svyTaskTemplateTargetoptionMapper.deleteSvyTaskTemplateTargetoptionById(svyTaskTemplateTargetoption.getId());
+                    }
+                }
+            }
+        }
+    }
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateTargetoptionServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateTargetoptionServiceImpl.java
new file mode 100644
index 0000000..3b7c4cc
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateTargetoptionServiceImpl.java
@@ -0,0 +1,97 @@
+package com.smartor.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.SvyTaskTemplateTargetoption;
+import com.smartor.mapper.SvyTaskTemplateTargetoptionMapper;
+import com.smartor.service.ISvyTaskTemplateTargetoptionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴揝ervice涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Service
+public class SvyTaskTemplateTargetoptionServiceImpl implements ISvyTaskTemplateTargetoptionService
+{
+    @Autowired
+    private SvyTaskTemplateTargetoptionMapper svyTaskTemplateTargetoptionMapper;
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param id 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    @Override
+    public SvyTaskTemplateTargetoption selectSvyTaskTemplateTargetoptionById(Long id)
+    {
+        return svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionById(id);
+    }
+
+    /**
+     * 鏌ヨ闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撳垪琛�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     */
+    @Override
+    public List<SvyTaskTemplateTargetoption> selectSvyTaskTemplateTargetoptionList(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption)
+    {
+        return svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption);
+    }
+
+    /**
+     * 鏂板闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertSvyTaskTemplateTargetoption(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption)
+    {
+        svyTaskTemplateTargetoption.setCreateTime(DateUtils.getNowDate());
+        return svyTaskTemplateTargetoptionMapper.insertSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption);
+    }
+
+    /**
+     * 淇敼闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param svyTaskTemplateTargetoption 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateSvyTaskTemplateTargetoption(SvyTaskTemplateTargetoption svyTaskTemplateTargetoption)
+    {
+        svyTaskTemplateTargetoption.setUpdateTime(DateUtils.getNowDate());
+        return svyTaskTemplateTargetoptionMapper.updateSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteSvyTaskTemplateTargetoptionByIds(Long[] ids)
+    {
+        return svyTaskTemplateTargetoptionMapper.deleteSvyTaskTemplateTargetoptionByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲俊鎭�
+     *
+     * @param id 闂嵎浠诲姟妯℃澘鎸囨爣閫夐」搴撲富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteSvyTaskTemplateTargetoptionById(Long id)
+    {
+        return svyTaskTemplateTargetoptionMapper.deleteSvyTaskTemplateTargetoptionById(id);
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTasksingledetailServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTasksingledetailServiceImpl.java
new file mode 100644
index 0000000..b13a6ed
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTasksingledetailServiceImpl.java
@@ -0,0 +1,97 @@
+package com.smartor.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.SvyTasksingledetail;
+import com.smartor.mapper.SvyTasksingledetailMapper;
+import com.smartor.service.ISvyTasksingledetailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 闂嵎缁撴灉璁板綍璇︽儏Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2024-06-19
+ */
+@Service
+public class SvyTasksingledetailServiceImpl implements ISvyTasksingledetailService
+{
+    @Autowired
+    private SvyTasksingledetailMapper svyTasksingledetailMapper;
+
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailid 闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 闂嵎缁撴灉璁板綍璇︽儏
+     */
+    @Override
+    public SvyTasksingledetail selectSvyTasksingledetailByCalldetailid(String calldetailid)
+    {
+        return svyTasksingledetailMapper.selectSvyTasksingledetailByCalldetailid(calldetailid);
+    }
+
+    /**
+     * 鏌ヨ闂嵎缁撴灉璁板綍璇︽儏鍒楄〃
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 闂嵎缁撴灉璁板綍璇︽儏
+     */
+    @Override
+    public List<SvyTasksingledetail> selectSvyTasksingledetailList(SvyTasksingledetail svyTasksingledetail)
+    {
+        return svyTasksingledetailMapper.selectSvyTasksingledetailList(svyTasksingledetail);
+    }
+
+    /**
+     * 鏂板闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertSvyTasksingledetail(SvyTasksingledetail svyTasksingledetail)
+    {
+        svyTasksingledetail.setCreateTime(DateUtils.getNowDate());
+        return svyTasksingledetailMapper.insertSvyTasksingledetail(svyTasksingledetail);
+    }
+
+    /**
+     * 淇敼闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param svyTasksingledetail 闂嵎缁撴灉璁板綍璇︽儏
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateSvyTasksingledetail(SvyTasksingledetail svyTasksingledetail)
+    {
+        svyTasksingledetail.setUpdateTime(DateUtils.getNowDate());
+        return svyTasksingledetailMapper.updateSvyTasksingledetail(svyTasksingledetail);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏
+     *
+     * @param calldetailids 闇�瑕佸垹闄ょ殑闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteSvyTasksingledetailByCalldetailids(String[] calldetailids)
+    {
+        return svyTasksingledetailMapper.deleteSvyTasksingledetailByCalldetailids(calldetailids);
+    }
+
+    /**
+     * 鍒犻櫎闂嵎缁撴灉璁板綍璇︽儏淇℃伅
+     *
+     * @param calldetailid 闂嵎缁撴灉璁板綍璇︽儏涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteSvyTasksingledetailByCalldetailid(String calldetailid)
+    {
+        return svyTasksingledetailMapper.deleteSvyTasksingledetailByCalldetailid(calldetailid);
+    }
+}
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
index d275617..a00925c 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
@@ -8,6 +8,7 @@
         <result property="id" column="id"/>
         <result property="tagcategoryid" column="tagcategoryid"/>
         <result property="tagid" column="tagid"/>
+        <result property="tagname" column="tagname"/>
         <result property="orgid" column="orgid"/>
         <result property="delFlag" column="del_flag"/>
         <result property="updateBy" column="update_by"/>
@@ -35,6 +36,7 @@
                upload_time,
                targetid,
                pid,
+               tagname,
                guid
         from ivr_liba_target_tag
     </sql>
@@ -50,6 +52,7 @@
             <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
             <if test="targetid != null ">and targetid = #{targetid}</if>
             <if test="pid != null ">and pid = #{pid}</if>
+            <if test="tagname != null ">and tagname = #{tagname}</if>
             <if test="guid != null  and guid != ''">and guid = #{guid}</if>
         </where>
     </select>
@@ -87,6 +90,7 @@
             <if test="targetid != null">targetid,</if>
             <if test="pid != null">pid,</if>
             <if test="guid != null">guid,</if>
+            <if test="tagname != null">tagname,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="tagcategoryid != null">#{tagcategoryid},</if>
@@ -102,6 +106,7 @@
             <if test="targetid != null">#{targetid},</if>
             <if test="pid != null">#{pid},</if>
             <if test="guid != null">#{guid},</if>
+            <if test="tagname != null">#{tagname},</if>
         </trim>
     </insert>
 
@@ -121,6 +126,7 @@
             <if test="targetid != null">targetid = #{targetid},</if>
             <if test="pid != null">pid = #{pid},</if>
             <if test="guid != null">guid = #{guid},</if>
+            <if test="tagname != null">tagname = #{tagname},</if>
         </trim>
         where id = #{id}
     </update>
@@ -137,4 +143,4 @@
             #{id}
         </foreach>
     </delete>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
index 3a41b36..0a61fd1 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
@@ -31,6 +31,7 @@
         <result property="orgid" column="orgid"/>
         <result property="pid" column="pid"/>
         <result property="guid" column="guid"/>
+        <result property="orderno" column="orderno"/>
     </resultMap>
 
     <sql id="selectIvrLibaTargetoptionVo">
@@ -42,6 +43,7 @@
                targetregex,
                targetregex2,
                nodynamiccruxs,
+               orderno,
                dynamiccruxs,
                optiondesc, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
         from ivr_liba_targetoption
@@ -71,6 +73,7 @@
             <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
             <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
             <if test="pid != null ">and pid = #{pid}</if>
+            <if test="orderno != null ">and orderno = #{orderno}</if>
             <if test="guid != null  and guid != ''">and guid = #{guid}</if>
             <if test="nodynamiccruxsJson != null">and nodynamiccruxs = #{nodynamiccruxsJson}</if>
             <if test="dynamiccruxsJson != null">and dynamiccruxs = #{dynamiccruxsJson}</if>
@@ -113,6 +116,7 @@
             <if test="guid != null">guid,</if>
             <if test="nodynamiccruxsJson != null">nodynamiccruxs,</if>
             <if test="dynamiccruxsJson != null">dynamiccruxs,</if>
+            <if test="orderno != null">orderno,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="targetid != null">#{targetid},</if>
@@ -140,6 +144,7 @@
             <if test="guid != null">#{guid},</if>
             <if test="nodynamiccruxsJson != null">#{nodynamiccruxsJson},</if>
             <if test="dynamiccruxsJson != null">#{dynamiccruxsJson},</if>
+            <if test="orderno != null">#{orderno},</if>
         </trim>
     </insert>
 
@@ -171,6 +176,7 @@
             <if test="guid != null">guid = #{guid},</if>
             <if test="nodynamiccruxsJson != null">nodynamiccruxs = #{nodynamiccruxsJson},</if>
             <if test="dynamiccruxsJson != null">dynamiccruxs = #{dynamiccruxsJson},</if>
+            <if test="orderno != null">orderno = #{orderno},</if>
         </trim>
         where targetoptionid = #{targetoptionid}
     </update>
@@ -187,4 +193,4 @@
             #{targetoptionid}
         </foreach>
     </delete>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
index be61105..8bd3dbf 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
@@ -38,8 +38,6 @@
         <result property="libtemplateid" column="libtemplateid"/>
         <result property="libtemplatename" column="libtemplatename"/>
         <result property="sendTimeSlot" column="send_time_slot"/>
-        <result property="libtemplatename" column="libtemplatename"/>
-        <result property="libtemplatename" column="libtemplatename"/>
         <result property="stopState" column="stop_state"/>
         <result property="showDate" column="show_date"/>
         <result property="showTimeMorn" column="show_time_morn"/>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml
index 1779932..08927f4 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml
@@ -69,8 +69,7 @@
                otherdata,
                script_picture,
             language,
-            icd10_name,
-            svy_scriptid as svyscriptId
+            icd10_name
         from svy_lib_script
     </sql>
 
@@ -124,7 +123,6 @@
             <if test="isupload != null">isupload,</if>
             <if test="uploadTime != null">upload_time,</if>
             <if test="tag != null">tag,</if>
-            <if test="svyscriptId != null">svy_scriptid,</if>
             <if test="categoryid != null">categoryid,</if>
             <if test="scriptContent != null and scriptContent != ''">script_content,</if>
             <if test="suitway != null and suitway != ''">suitway,</if>
@@ -157,7 +155,6 @@
             <if test="isupload != null">#{isupload},</if>
             <if test="uploadTime != null">#{uploadTime},</if>
             <if test="tag != null">#{tag},</if>
-            <if test="svyscriptId != null">#{svyscriptId},</if>
             <if test="categoryid != null">#{categoryid},</if>
             <if test="scriptContent != null and scriptContent != ''">#{scriptContent},</if>
             <if test="suitway != null  and suitway != ''">#{suitway},</if>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
index b21026c..3c0a691 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
@@ -5,7 +5,7 @@
 <mapper namespace="com.smartor.mapper.SvyLibScriptOptionMapper">
 
     <resultMap type="com.smartor.domain.SvyLibScriptOption" id="SvyLibScriptOptionResult">
-        <result property="optionid" column="optionid"/>
+        <result property="id" column="id"/>
         <result property="topicid" column="topicid"/>
         <result property="svyid" column="svyid"/>
         <result property="topictype" column="topictype"/>
@@ -13,7 +13,7 @@
         <result property="optioncontent" column="optioncontent"/>
         <result property="isexistdetail" column="isexistdetail"/>
         <result property="detailismandatory" column="detailismandatory"/>
-        <result property="isexceptionitem" column="isexceptionitem"/>
+        <result property="isabnormal" column="isabnormal"/>
         <result property="istrack" column="istrack"/>
         <result property="score" column="score"/>
         <result property="prompt" column="prompt"/>
@@ -39,7 +39,7 @@
     </resultMap>
 
     <sql id="selectSvyLibScriptOptionVo">
-        select optionid,
+        select id,
                topicid,
                svyid,
                topictype,
@@ -47,7 +47,7 @@
                optioncontent,
                isexistdetail,
                detailismandatory,
-               isexceptionitem,
+               isabnormal,
                istrack,
                score,
                prompt,
@@ -85,7 +85,7 @@
             <if test="optioncontent != null  and optioncontent != ''">and optioncontent = #{optioncontent}</if>
             <if test="isexistdetail != null ">and isexistdetail = #{isexistdetail}</if>
             <if test="detailismandatory != null ">and detailismandatory = #{detailismandatory}</if>
-            <if test="isexceptionitem != null ">and isexceptionitem = #{isexceptionitem}</if>
+            <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if>
             <if test="istrack != null ">and istrack = #{istrack}</if>
             <if test="score != null ">and score = #{score}</if>
             <if test="prompt != null  and prompt != ''">and prompt = #{prompt}</if>
@@ -108,11 +108,11 @@
 
     <select id="selectSvyLibScriptOptionByOptionid" parameterType="Long" resultMap="SvyLibScriptOptionResult">
         <include refid="selectSvyLibScriptOptionVo"/>
-        where optionid = #{optionid}
+        where id = #{id}
     </select>
 
     <insert id="insertSvyLibScriptOption" parameterType="com.smartor.domain.SvyLibScriptOption" useGeneratedKeys="true"
-            keyProperty="optionid">
+            keyProperty="id">
         insert into svy_lib_ScriptOption
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="topicid != null">topicid,</if>
@@ -122,7 +122,7 @@
             <if test="optioncontent != null">optioncontent,</if>
             <if test="isexistdetail != null">isexistdetail,</if>
             <if test="detailismandatory != null">detailismandatory,</if>
-            <if test="isexceptionitem != null">isexceptionitem,</if>
+            <if test="isabnormal != null">isabnormal,</if>
             <if test="istrack != null">istrack,</if>
             <if test="score != null">score,</if>
             <if test="prompt != null">prompt,</if>
@@ -154,7 +154,7 @@
             <if test="optioncontent != null">#{optioncontent},</if>
             <if test="isexistdetail != null">#{isexistdetail},</if>
             <if test="detailismandatory != null">#{detailismandatory},</if>
-            <if test="isexceptionitem != null">#{isexceptionitem},</if>
+            <if test="isabnormal != null">#{isabnormal},</if>
             <if test="istrack != null">#{istrack},</if>
             <if test="score != null">#{score},</if>
             <if test="prompt != null">#{prompt},</if>
@@ -190,7 +190,7 @@
             <if test="optioncontent != null">optioncontent = #{optioncontent},</if>
             <if test="isexistdetail != null">isexistdetail = #{isexistdetail},</if>
             <if test="detailismandatory != null">detailismandatory = #{detailismandatory},</if>
-            <if test="isexceptionitem != null">isexceptionitem = #{isexceptionitem},</if>
+            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
             <if test="istrack != null">istrack = #{istrack},</if>
             <if test="score != null">score = #{score},</if>
             <if test="prompt != null">prompt = #{prompt},</if>
@@ -214,7 +214,7 @@
             <if test="isupload != null">isupload = #{isupload},</if>
             <if test="uploadTime != null">upload_time = #{uploadTime},</if>
         </trim>
-        where optionid = #{optionid}
+        where id = #{id}
     </update>
 
     <update id="deleteSvyLibScriptOptionByOptionid" parameterType="Long">
@@ -222,13 +222,13 @@
         <trim prefix="SET" suffixOverrides=",">
            del_flag = 1
         </trim>
-        where optionid = #{optionid}
+        where id = #{id}
     </update>
 
     <delete id="deleteSvyLibScriptOptionByOptionids" parameterType="String">
-        delete from svy_lib_ScriptOption where optionid in
-        <foreach item="optionid" collection="array" open="(" separator="," close=")">
-            #{optionid}
+        delete from svy_lib_ScriptOption where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
index 2ef18f7..f68c3ee 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
@@ -71,7 +71,8 @@
         from svy_lib_template
     </sql>
 
-    <select id="selectSvyLibTemplateList" parameterType="com.smartor.domain.SvyLibTemplateReq" resultMap="SvyLibTemplateResult">
+    <select id="selectSvyLibTemplateList" parameterType="com.smartor.domain.SvyLibTemplateReq"
+            resultMap="SvyLibTemplateResult">
         select a.svyid, a.categoryid, a.svycode, a.svyname, a.description, a.introduce,a.submitprompt, a.templateid,
         a.version,a.centerlibrarycode, a.centerlibraryid, a.islocal, a.isenable, a.orgid, a.del_flag, a.create_by,
         a.create_time, a.update_by, a.update_time, a.isupload,
@@ -201,8 +202,8 @@
     </update>
 
     <delete id="deleteSvyLibTemplateBySvyid" parameterType="Long">
-        delete
-        from svy_lib_template
+        update svy_lib_template
+        set del_flag=1
         where svyid = #{svyid}
     </delete>
 
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
index 6a47143..8ec9dfc 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
@@ -216,8 +216,8 @@
     </update>
 
     <delete id="deleteSvyLibTemplateScriptByTopicid" parameterType="Long">
-        delete
-        from svy_lib_template_script
+        update svy_lib_template_script
+        set del_flag=1
         where id = #{id}
     </delete>
 
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml
index 138bfe8..8f45203 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml
@@ -208,8 +208,8 @@
     </update>
 
     <delete id="deleteSvyLibTemplateTargetoptionById" parameterType="Long">
-        delete
-        from svy_lib_template_targetoption
+        update svy_lib_template_targetoption
+        set del_flag=1
         where id = #{id}
     </delete>
 
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml
index e66185c..c093388 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml
@@ -1,87 +1,153 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.smartor.mapper.SvyTaskMapper">
 
     <resultMap type="com.smartor.domain.SvyTask" id="SvyTaskResult">
-        <result property="taskid"    column="taskid"    />
-        <result property="svrtaskid"    column="svrtaskid"    />
-        <result property="taskname"    column="taskname"    />
-        <result property="templateid"    column="templateid"    />
-        <result property="templatename"    column="templatename"    />
-        <result property="labelinfo"    column="labelinfo"    />
-        <result property="state"    column="state"    />
-        <result property="count"    column="count"    />
-        <result property="executed"    column="executed"    />
-        <result property="unexecuted"    column="unexecuted"    />
-        <result property="fail"    column="fail"    />
-        <result property="patientid"    column="patientid"    />
-        <result property="patientname"    column="patientname"    />
-        <result property="addtime"    column="addtime"    />
-        <result property="checkuserid"    column="checkuserid"    />
-        <result property="checkusername"    column="checkusername"    />
-        <result property="checktime"    column="checktime"    />
-        <result property="type"    column="type"    />
-        <result property="typename"    column="typename"    />
-        <result property="usebqsms"    column="usebqsms"    />
-        <result property="usebhsms"    column="usebhsms"    />
-        <result property="usesendsms"    column="usesendsms"    />
-        <result property="deptcode"    column="deptcode"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="isupload"    column="isupload"    />
-        <result property="uploadTime"    column="upload_time"    />
-        <result property="orgid"    column="orgid"    />
-        <result property="pid"    column="pid"    />
-        <result property="guid"    column="guid"    />
-        <result property="preachform"    column="preachform"    />
-        <result property="isSend"    column="is_send"    />
-        <result property="sendState"    column="send_state"    />
-        <result property="param"    column="param"    />
+        <result property="taskid" column="taskid"/>
+        <result property="svrtaskid" column="svrtaskid"/>
+        <result property="taskname" column="taskname"/>
+        <result property="templateid" column="templateid"/>
+        <result property="templatename" column="templatename"/>
+        <result property="labelinfo" column="labelinfo"/>
+        <result property="state" column="state"/>
+        <result property="count" column="count"/>
+        <result property="executed" column="executed"/>
+        <result property="unexecuted" column="unexecuted"/>
+        <result property="fail" column="fail"/>
+        <result property="patientid" column="patientid"/>
+        <result property="patientname" column="patientname"/>
+        <result property="addtime" column="addtime"/>
+        <result property="checkuserid" column="checkuserid"/>
+        <result property="checkusername" column="checkusername"/>
+        <result property="checktime" column="checktime"/>
+        <result property="type" column="type"/>
+        <result property="typename" column="typename"/>
+        <result property="usebqsms" column="usebqsms"/>
+        <result property="usebhsms" column="usebhsms"/>
+        <result property="usesendsms" column="usesendsms"/>
+        <result property="deptcode" column="deptcode"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="isupload" column="isupload"/>
+        <result property="uploadTime" column="upload_time"/>
+        <result property="orgid" column="orgid"/>
+        <result property="pid" column="pid"/>
+        <result property="guid" column="guid"/>
+        <result property="preachform" column="preachform"/>
+        <result property="isSend" column="is_send"/>
+        <result property="sendState" column="send_state"/>
+        <result property="param" column="param"/>
+        <result property="textParam" column="text_param"/>
+        <result property="stopState" column="stop_state"/>
+        <result property="showDate" column="show_date"/>
+        <result property="showTimeMorn" column="show_time_morn"/>
+        <result property="showTimeNoon" column="show_time_noon"/>
+        <result property="showTimeNight" column="show_time_night"/>
+        <result property="sendTimeSlot" column="send_time_slot"/>
+        <result property="libtemplateid" column="libtemplateid"/>
+        <result property="libtemplatename" column="libtemplatename"/>
     </resultMap>
 
     <sql id="selectSvyTaskVo">
-        select taskid, svrtaskid, taskname, templateid, templatename, labelinfo, state, count, executed, unexecuted, fail, patientid, patientname, addtime, checkuserid, checkusername, checktime, type, typename, usebqsms, usebhsms, usesendsms, deptcode, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, preachform, is_send, send_state, param from svy_task
+        select taskid,
+               send_time_slot,
+               libtemplateid,
+               libtemplatename,
+               show_date,
+               show_time_morn,
+               show_time_noon,
+               show_time_night,
+               stop_state,
+               svrtaskid,
+               text_param,
+               taskname,
+               templateid,
+               templatename,
+               labelinfo,
+               state,
+               count,
+               executed,
+               unexecuted,
+               fail,
+               patientid,
+               patientname,
+               addtime,
+               checkuserid,
+               checkusername,
+               checktime,
+               type,
+               typename,
+               usebqsms,
+               usebhsms,
+               usesendsms,
+               deptcode,
+               del_flag,
+               update_by,
+               update_time,
+               create_by,
+               create_time,
+               isupload,
+               upload_time,
+               orgid,
+               pid,
+               guid,
+               preachform,
+               is_send,
+               send_state,
+               param
+        from svy_task
     </sql>
 
     <select id="selectSvyTaskList" parameterType="com.smartor.domain.SvyTask" resultMap="SvyTaskResult">
         <include refid="selectSvyTaskVo"/>
         <where>
-            <if test="svrtaskid != null "> and svrtaskid = #{svrtaskid}</if>
-            <if test="taskname != null  and taskname != ''"> and taskname like concat('%', #{taskname}, '%')</if>
-            <if test="templateid != null  and templateid != ''"> and templateid = #{templateid}</if>
-            <if test="templatename != null  and templatename != ''"> and templatename like concat('%', #{templatename}, '%')</if>
-            <if test="labelinfo != null  and labelinfo != ''"> and labelinfo = #{labelinfo}</if>
-            <if test="state != null "> and state = #{state}</if>
-            <if test="count != null "> and count = #{count}</if>
-            <if test="executed != null "> and executed = #{executed}</if>
-            <if test="unexecuted != null "> and unexecuted = #{unexecuted}</if>
-            <if test="fail != null "> and fail = #{fail}</if>
-            <if test="patientid != null  and patientid != ''"> and patientid = #{patientid}</if>
-            <if test="patientname != null  and patientname != ''"> and patientname like concat('%', #{patientname}, '%')</if>
-            <if test="addtime != null "> and addtime = #{addtime}</if>
-            <if test="checkuserid != null  and checkuserid != ''"> and checkuserid = #{checkuserid}</if>
-            <if test="checkusername != null  and checkusername != ''"> and checkusername like concat('%', #{checkusername}, '%')</if>
-            <if test="checktime != null "> and checktime = #{checktime}</if>
-            <if test="type != null  and type != ''"> and type = #{type}</if>
-            <if test="typename != null  and typename != ''"> and typename like concat('%', #{typename}, '%')</if>
-            <if test="usebqsms != null "> and usebqsms = #{usebqsms}</if>
-            <if test="usebhsms != null "> and usebhsms = #{usebhsms}</if>
-            <if test="usesendsms != null "> and usesendsms = #{usesendsms}</if>
-            <if test="deptcode != null  and deptcode != ''"> and deptcode = #{deptcode}</if>
-            <if test="isupload != null "> and isupload = #{isupload}</if>
-            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
-            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
-            <if test="pid != null "> and pid = #{pid}</if>
-            <if test="guid != null  and guid != ''"> and guid = #{guid}</if>
-            <if test="preachform != null  and preachform != ''"> and preachform = #{preachform}</if>
-            <if test="isSend != null "> and is_send = #{isSend}</if>
-            <if test="sendState != null  and sendState != ''"> and send_state = #{sendState}</if>
-            <if test="param != null  and param != ''"> and param = #{param}</if>
+            <if test="svrtaskid != null ">and svrtaskid = #{svrtaskid}</if>
+            <if test="taskname != null  and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if>
+            <if test="templateid != null  and templateid != ''">and templateid = #{templateid}</if>
+            <if test="templatename != null  and templatename != ''">and templatename like concat('%', #{templatename},
+                '%')
+            </if>
+            <if test="labelinfo != null  and labelinfo != ''">and labelinfo = #{labelinfo}</if>
+            <if test="state != null ">and state = #{state}</if>
+            <if test="count != null ">and count = #{count}</if>
+            <if test="executed != null ">and executed = #{executed}</if>
+            <if test="unexecuted != null ">and unexecuted = #{unexecuted}</if>
+            <if test="fail != null ">and fail = #{fail}</if>
+            <if test="patientid != null  and patientid != ''">and patientid = #{patientid}</if>
+            <if test="patientname != null  and patientname != ''">and patientname like concat('%', #{patientname},
+                '%')
+            </if>
+            <if test="addtime != null ">and addtime = #{addtime}</if>
+            <if test="checkuserid != null  and checkuserid != ''">and checkuserid = #{checkuserid}</if>
+            <if test="checkusername != null  and checkusername != ''">and checkusername like concat('%',
+                #{checkusername}, '%')
+            </if>
+            <if test="checktime != null ">and checktime = #{checktime}</if>
+            <if test="type != null  and type != ''">and type = #{type}</if>
+            <if test="typename != null  and typename != ''">and typename like concat('%', #{typename}, '%')</if>
+            <if test="usebqsms != null ">and usebqsms = #{usebqsms}</if>
+            <if test="usebhsms != null ">and usebhsms = #{usebhsms}</if>
+            <if test="usesendsms != null ">and usesendsms = #{usesendsms}</if>
+            <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
+            <if test="isupload != null ">and isupload = #{isupload}</if>
+            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
+            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
+            <if test="pid != null ">and pid = #{pid}</if>
+            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
+            <if test="preachform != null  and preachform != ''">and preachform = #{preachform}</if>
+            <if test="isSend != null ">and is_send = #{isSend}</if>
+            <if test="sendState != null  and sendState != ''">and send_state = #{sendState}</if>
+            <if test="param != null  and param != ''">and param = #{param}</if>
+            <if test="sendTimeSlot != null  and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot},
+                '%')
+            </if>
+            <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
+            <if test="libtemplatename != null  and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if>
         </where>
     </select>
 
@@ -129,7 +195,16 @@
             <if test="isSend != null">is_send,</if>
             <if test="sendState != null">send_state,</if>
             <if test="param != null">param,</if>
-         </trim>
+            <if test="textParam != null">text_param,</if>
+            <if test="sendTimeSlot != null  and sendTimeSlot != ''">send_time_slot,</if>
+            <if test="stopState != null">stop_state,</if>
+            <if test="showDate != null and showDate != ''">show_date,</if>
+            <if test="showTimeNight != null and showTimeNight != ''">show_time_night,</if>
+            <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon,</if>
+            <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn,</if>
+            <if test="libtemplateid != null ">libtemplateid,</if>
+            <if test="libtemplatename != null  and libtemplatename != ''">libtemplatename,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="svrtaskid != null">#{svrtaskid},</if>
             <if test="taskname != null">#{taskname},</if>
@@ -167,7 +242,16 @@
             <if test="isSend != null">#{isSend},</if>
             <if test="sendState != null">#{sendState},</if>
             <if test="param != null">#{param},</if>
-         </trim>
+            <if test="textParam != null">#{textParam},</if>
+            <if test="sendTimeSlot != null  and sendTimeSlot != ''">#{sendTimeSlot},</if>
+            <if test="stopState != null">#{stopState},</if>
+            <if test="showDate != null and showDate != ''">#{showDate},</if>
+            <if test="showTimeNight != null and showTimeNight != ''">#{showTimeNight},</if>
+            <if test="showTimeNoon != null and showTimeNoon != ''">#{showTimeNoon},</if>
+            <if test="showTimeMorn != null and showTimeMorn != ''">#{showTimeMorn},</if>
+            <if test="libtemplateid != null ">#{libtemplateid},</if>
+            <if test="libtemplatename != null  and libtemplatename != ''">#{libtemplatename},</if>
+        </trim>
     </insert>
 
     <update id="updateSvyTask" parameterType="com.smartor.domain.SvyTask">
@@ -209,12 +293,23 @@
             <if test="isSend != null">is_send = #{isSend},</if>
             <if test="sendState != null">send_state = #{sendState},</if>
             <if test="param != null">param = #{param},</if>
+            <if test="textParam != null">text_param = #{textParam},</if>
+            <if test="sendTimeSlot != null  and sendTimeSlot != ''">send_time_slot=#{sendTimeSlot},</if>
+            <if test="stopState != null ">stop_state=#{stopState},</if>
+            <if test="showDate != null and showDate != ''">show_date=#{showDate},</if>
+            <if test="showTimeNight != null and showTimeNight != ''">show_time_night=#{showTimeNight},</if>
+            <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon=#{showTimeNoon},</if>
+            <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn=#{showTimeMorn},</if>
+            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
+            <if test="libtemplatename != null  and libtemplatename != ''">libtemplatename = #{libtemplatename},</if>
         </trim>
         where taskid = #{taskid}
     </update>
 
     <delete id="deleteSvyTaskByTaskid" parameterType="Long">
-        delete from svy_task where taskid = #{taskid}
+        delete
+        from svy_task
+        where taskid = #{taskid}
     </delete>
 
     <delete id="deleteSvyTaskByTaskids" parameterType="String">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
index 3cfcd88..b77c87f 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
@@ -69,11 +69,13 @@
         <result property="admindate" column="admindate"/>
         <result property="roomno" column="roomno"/>
         <result property="bedno" column="bedno"/>
+        <result property="patid" column="patid"/>
     </resultMap>
 
     <sql id="selectSvyTaskSingleVo">
         select id,
                sendname,
+               patid,
                phone,
                sex,
                age,
@@ -204,6 +206,7 @@
             <if test="admindate != null ">and admindate = #{admindate}</if>
             <if test="roomno != null  and roomno != ''">and roomno = #{roomno}</if>
             <if test="bedno != null  and bedno != ''">and bedno = #{bedno}</if>
+            <if test="patid != null ">and patid = #{patid}</if>
         </where>
     </select>
 
@@ -279,6 +282,7 @@
             <if test="admindate != null">admindate,</if>
             <if test="roomno != null">roomno,</if>
             <if test="bedno != null">bedno,</if>
+            <if test="patid != null">patid,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="sendname != null">#{sendname},</if>
@@ -344,6 +348,7 @@
             <if test="admindate != null">#{admindate},</if>
             <if test="roomno != null">#{roomno},</if>
             <if test="bedno != null">#{bedno},</if>
+            <if test="patid != null">#{patid},</if>
         </trim>
     </insert>
 
@@ -413,6 +418,7 @@
             <if test="admindate != null">admindate = #{admindate},</if>
             <if test="roomno != null">roomno = #{roomno},</if>
             <if test="bedno != null">bedno = #{bedno},</if>
+            <if test="patid != null">patid = #{patid},</if>
         </trim>
         where id = #{id}
     </update>
@@ -429,4 +435,12 @@
             #{id}
         </foreach>
     </delete>
+
+    <update id="deleteSvyTaskcallByCondition" >
+        update svy_task_single
+        <trim prefix="SET" suffixOverrides=",">
+            del_flag =1
+        </trim>
+        where patid = #{patid} and taskid = #{taskid}
+    </update>
 </mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
index 9c8c935..9d762db 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
@@ -5,7 +5,7 @@
 <mapper namespace="com.smartor.mapper.SvyTaskTemplateMapper">
 
     <resultMap type="com.smartor.domain.SvyTaskTemplate" id="SvyTaskTemplateResult">
-        <result property="svyid" column="svyid"/>
+        <result property="id" column="id"/>
         <result property="templateid" column="templateid"/>
         <result property="categoryid" column="categoryid"/>
         <result property="svycode" column="svycode"/>
@@ -41,7 +41,7 @@
     </resultMap>
 
     <sql id="selectSvyTaskTemplateVo">
-        select svyid,
+        select id,
                templateid,
                categoryid,
                svycode,
@@ -115,11 +115,11 @@
 
     <select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult">
         <include refid="selectSvyTaskTemplateVo"/>
-        where svyid = #{svyid}
+        where id = #{id}
     </select>
 
     <insert id="insertSvyTaskTemplate" parameterType="com.smartor.domain.SvyTaskTemplate" useGeneratedKeys="true"
-            keyProperty="svyid">
+            keyProperty="id">
         insert into svy_task_template
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="templateid != null">templateid,</if>
@@ -227,19 +227,19 @@
             <if test="reply != null">reply = #{reply},</if>
             <if test="taskid != null">taskid = #{taskid},</if>
         </trim>
-        where svyid = #{svyid}
+        where id = #{id}
     </update>
 
     <delete id="deleteSvyTaskTemplateBySvyid" parameterType="Long">
         delete
         from svy_task_template
-        where svyid = #{svyid}
+        where id = #{id}
     </delete>
 
     <delete id="deleteSvyTaskTemplateBySvyids" parameterType="String">
-        delete from svy_task_template where svyid in
-        <foreach item="svyid" collection="array" open="(" separator="," close=")">
-            #{svyid}
+        delete from svy_task_template where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
new file mode 100644
index 0000000..f62b28e
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.SvyTaskTemplateScriptMapper">
+
+    <resultMap type="com.smartor.domain.SvyTaskTemplateScript" id="SvyTaskTemplateScriptResult">
+        <result property="ID"    column="ID"    />
+        <result property="taskid"    column="taskid"    />
+        <result property="templateQuestionNum"    column="templateQuestionNum"    />
+        <result property="templateID"    column="templateID"    />
+        <result property="scriptID"    column="scriptID"    />
+        <result property="questiontitle"    column="questiontitle"    />
+        <result property="language"    column="language"    />
+        <result property="categoryName"    column="categoryName"    />
+        <result property="questionPoint"    column="questionPoint"    />
+        <result property="questionText"    column="questionText"    />
+        <result property="questionVoice"    column="questionVoice"    />
+        <result property="noMatchText"    column="noMatchText"    />
+        <result property="noMatchVoice"    column="noMatchVoice"    />
+        <result property="slienceText"    column="slienceText"    />
+        <result property="slienceVoice"    column="slienceVoice"    />
+        <result property="submoduleText"    column="submoduleText"    />
+        <result property="submoduleVoice"    column="submoduleVoice"    />
+        <result property="noClearlyText"    column="noClearlyText"    />
+        <result property="noClearlyVoice"    column="noClearlyVoice"    />
+        <result property="isMust"    column="is_must"    />
+        <result property="playWavOnly"    column="playWavOnly"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="isupload"    column="isupload"    />
+        <result property="uploadTime"    column="upload_time"    />
+        <result property="orgid"    column="orgid"    />
+        <result property="pid"    column="pid"    />
+        <result property="guid"    column="guid"    />
+        <result property="valueType"    column="value_type"    />
+        <result property="targetOptions"    column="targetOptions"    />
+        <result property="targettype"    column="targettype"    />
+        <result property="targetid"    column="targetid"    />
+        <result property="targetvalue"    column="targetvalue"    />
+        <result property="nextQuestion"    column="next_question"    />
+        <result property="questionResult"    column="question_result"    />
+        <result property="otherdata"    column="otherdata"    />
+        <result property="picturePath"    column="picture_path"    />
+    </resultMap>
+
+    <sql id="selectSvyTaskTemplateScriptVo">
+        select ID, taskid, templateQuestionNum, templateID, scriptID, questiontitle, language, categoryName, questionPoint, questionText, questionVoice, noMatchText, noMatchVoice, slienceText, slienceVoice, submoduleText, submoduleVoice, noClearlyText, noClearlyVoice, is_must, playWavOnly, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetOptions, targettype, targetid, targetvalue, next_question, question_result, otherdata, picture_path from svy_task_template_script
+    </sql>
+
+    <select id="selectSvyTaskTemplateScriptList" parameterType="com.smartor.domain.SvyTaskTemplateScript" resultMap="SvyTaskTemplateScriptResult">
+        <include refid="selectSvyTaskTemplateScriptVo"/>
+        <where>
+            <if test="taskid != null "> and taskid = #{taskid}</if>
+            <if test="templateQuestionNum != null "> and templateQuestionNum = #{templateQuestionNum}</if>
+            <if test="templateID != null "> and templateID = #{templateID}</if>
+            <if test="scriptID != null "> and scriptID = #{scriptID}</if>
+            <if test="questiontitle != null  and questiontitle != ''"> and questiontitle = #{questiontitle}</if>
+            <if test="language != null  and language != ''"> and language = #{language}</if>
+            <if test="categoryName != null  and categoryName != ''"> and categoryName like concat('%', #{categoryName}, '%')</if>
+            <if test="questionPoint != null  and questionPoint != ''"> and questionPoint = #{questionPoint}</if>
+            <if test="questionText != null  and questionText != ''"> and questionText = #{questionText}</if>
+            <if test="questionVoice != null  and questionVoice != ''"> and questionVoice = #{questionVoice}</if>
+            <if test="noMatchText != null  and noMatchText != ''"> and noMatchText = #{noMatchText}</if>
+            <if test="noMatchVoice != null  and noMatchVoice != ''"> and noMatchVoice = #{noMatchVoice}</if>
+            <if test="slienceText != null  and slienceText != ''"> and slienceText = #{slienceText}</if>
+            <if test="slienceVoice != null  and slienceVoice != ''"> and slienceVoice = #{slienceVoice}</if>
+            <if test="submoduleText != null  and submoduleText != ''"> and submoduleText = #{submoduleText}</if>
+            <if test="submoduleVoice != null  and submoduleVoice != ''"> and submoduleVoice = #{submoduleVoice}</if>
+            <if test="noClearlyText != null  and noClearlyText != ''"> and noClearlyText = #{noClearlyText}</if>
+            <if test="noClearlyVoice != null  and noClearlyVoice != ''"> and noClearlyVoice = #{noClearlyVoice}</if>
+            <if test="isMust != null  and isMust != ''"> and is_must = #{isMust}</if>
+            <if test="playWavOnly != null "> and playWavOnly = #{playWavOnly}</if>
+            <if test="isupload != null "> and isupload = #{isupload}</if>
+            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
+            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
+            <if test="pid != null "> and pid = #{pid}</if>
+            <if test="guid != null  and guid != ''"> and guid = #{guid}</if>
+            <if test="valueType != null "> and value_type = #{valueType}</if>
+            <if test="targetOptions != null  and targetOptions != ''"> and targetOptions = #{targetOptions}</if>
+            <if test="targettype != null  and targettype != ''"> and targettype = #{targettype}</if>
+            <if test="targetid != null "> and targetid = #{targetid}</if>
+            <if test="targetvalue != null  and targetvalue != ''"> and targetvalue = #{targetvalue}</if>
+            <if test="nextQuestion != null "> and next_question = #{nextQuestion}</if>
+            <if test="questionResult != null  and questionResult != ''"> and question_result = #{questionResult}</if>
+            <if test="otherdata != null  and otherdata != ''"> and otherdata = #{otherdata}</if>
+            <if test="picturePath != null  and picturePath != ''"> and picture_path = #{picturePath}</if>
+        </where>
+    </select>
+
+    <select id="selectSvyTaskTemplateScriptByID" parameterType="Long" resultMap="SvyTaskTemplateScriptResult">
+        <include refid="selectSvyTaskTemplateScriptVo"/>
+        where ID = #{ID}
+    </select>
+
+    <insert id="insertSvyTaskTemplateScript" parameterType="com.smartor.domain.SvyTaskTemplateScript" useGeneratedKeys="true" keyProperty="ID">
+        insert into svy_task_template_script
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="taskid != null">taskid,</if>
+            <if test="templateQuestionNum != null">templateQuestionNum,</if>
+            <if test="templateID != null">templateID,</if>
+            <if test="scriptID != null">scriptID,</if>
+            <if test="questiontitle != null">questiontitle,</if>
+            <if test="language != null">language,</if>
+            <if test="categoryName != null">categoryName,</if>
+            <if test="questionPoint != null">questionPoint,</if>
+            <if test="questionText != null">questionText,</if>
+            <if test="questionVoice != null">questionVoice,</if>
+            <if test="noMatchText != null">noMatchText,</if>
+            <if test="noMatchVoice != null">noMatchVoice,</if>
+            <if test="slienceText != null">slienceText,</if>
+            <if test="slienceVoice != null">slienceVoice,</if>
+            <if test="submoduleText != null">submoduleText,</if>
+            <if test="submoduleVoice != null">submoduleVoice,</if>
+            <if test="noClearlyText != null">noClearlyText,</if>
+            <if test="noClearlyVoice != null">noClearlyVoice,</if>
+            <if test="isMust != null">is_must,</if>
+            <if test="playWavOnly != null">playWavOnly,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="isupload != null">isupload,</if>
+            <if test="uploadTime != null">upload_time,</if>
+            <if test="orgid != null">orgid,</if>
+            <if test="pid != null">pid,</if>
+            <if test="guid != null">guid,</if>
+            <if test="valueType != null">value_type,</if>
+            <if test="targetOptions != null">targetOptions,</if>
+            <if test="targettype != null">targettype,</if>
+            <if test="targetid != null">targetid,</if>
+            <if test="targetvalue != null">targetvalue,</if>
+            <if test="nextQuestion != null">next_question,</if>
+            <if test="questionResult != null">question_result,</if>
+            <if test="otherdata != null">otherdata,</if>
+            <if test="picturePath != null">picture_path,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="taskid != null">#{taskid},</if>
+            <if test="templateQuestionNum != null">#{templateQuestionNum},</if>
+            <if test="templateID != null">#{templateID},</if>
+            <if test="scriptID != null">#{scriptID},</if>
+            <if test="questiontitle != null">#{questiontitle},</if>
+            <if test="language != null">#{language},</if>
+            <if test="categoryName != null">#{categoryName},</if>
+            <if test="questionPoint != null">#{questionPoint},</if>
+            <if test="questionText != null">#{questionText},</if>
+            <if test="questionVoice != null">#{questionVoice},</if>
+            <if test="noMatchText != null">#{noMatchText},</if>
+            <if test="noMatchVoice != null">#{noMatchVoice},</if>
+            <if test="slienceText != null">#{slienceText},</if>
+            <if test="slienceVoice != null">#{slienceVoice},</if>
+            <if test="submoduleText != null">#{submoduleText},</if>
+            <if test="submoduleVoice != null">#{submoduleVoice},</if>
+            <if test="noClearlyText != null">#{noClearlyText},</if>
+            <if test="noClearlyVoice != null">#{noClearlyVoice},</if>
+            <if test="isMust != null">#{isMust},</if>
+            <if test="playWavOnly != null">#{playWavOnly},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="isupload != null">#{isupload},</if>
+            <if test="uploadTime != null">#{uploadTime},</if>
+            <if test="orgid != null">#{orgid},</if>
+            <if test="pid != null">#{pid},</if>
+            <if test="guid != null">#{guid},</if>
+            <if test="valueType != null">#{valueType},</if>
+            <if test="targetOptions != null">#{targetOptions},</if>
+            <if test="targettype != null">#{targettype},</if>
+            <if test="targetid != null">#{targetid},</if>
+            <if test="targetvalue != null">#{targetvalue},</if>
+            <if test="nextQuestion != null">#{nextQuestion},</if>
+            <if test="questionResult != null">#{questionResult},</if>
+            <if test="otherdata != null">#{otherdata},</if>
+            <if test="picturePath != null">#{picturePath},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSvyTaskTemplateScript" parameterType="com.smartor.domain.SvyTaskTemplateScript">
+        update svy_task_template_script
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="taskid != null">taskid = #{taskid},</if>
+            <if test="templateQuestionNum != null">templateQuestionNum = #{templateQuestionNum},</if>
+            <if test="templateID != null">templateID = #{templateID},</if>
+            <if test="scriptID != null">scriptID = #{scriptID},</if>
+            <if test="questiontitle != null">questiontitle = #{questiontitle},</if>
+            <if test="language != null">language = #{language},</if>
+            <if test="categoryName != null">categoryName = #{categoryName},</if>
+            <if test="questionPoint != null">questionPoint = #{questionPoint},</if>
+            <if test="questionText != null">questionText = #{questionText},</if>
+            <if test="questionVoice != null">questionVoice = #{questionVoice},</if>
+            <if test="noMatchText != null">noMatchText = #{noMatchText},</if>
+            <if test="noMatchVoice != null">noMatchVoice = #{noMatchVoice},</if>
+            <if test="slienceText != null">slienceText = #{slienceText},</if>
+            <if test="slienceVoice != null">slienceVoice = #{slienceVoice},</if>
+            <if test="submoduleText != null">submoduleText = #{submoduleText},</if>
+            <if test="submoduleVoice != null">submoduleVoice = #{submoduleVoice},</if>
+            <if test="noClearlyText != null">noClearlyText = #{noClearlyText},</if>
+            <if test="noClearlyVoice != null">noClearlyVoice = #{noClearlyVoice},</if>
+            <if test="isMust != null">is_must = #{isMust},</if>
+            <if test="playWavOnly != null">playWavOnly = #{playWavOnly},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="isupload != null">isupload = #{isupload},</if>
+            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
+            <if test="orgid != null">orgid = #{orgid},</if>
+            <if test="pid != null">pid = #{pid},</if>
+            <if test="guid != null">guid = #{guid},</if>
+            <if test="valueType != null">value_type = #{valueType},</if>
+            <if test="targetOptions != null">targetOptions = #{targetOptions},</if>
+            <if test="targettype != null">targettype = #{targettype},</if>
+            <if test="targetid != null">targetid = #{targetid},</if>
+            <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
+            <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
+            <if test="questionResult != null">question_result = #{questionResult},</if>
+            <if test="otherdata != null">otherdata = #{otherdata},</if>
+            <if test="picturePath != null">picture_path = #{picturePath},</if>
+        </trim>
+        where ID = #{ID}
+    </update>
+
+    <delete id="deleteSvyTaskTemplateScriptByID" parameterType="Long">
+        delete from svy_task_template_script where ID = #{ID}
+    </delete>
+
+    <delete id="deleteSvyTaskTemplateScriptByIDs" parameterType="String">
+        delete from svy_task_template_script where ID in
+        <foreach item="ID" collection="array" open="(" separator="," close=")">
+            #{ID}
+        </foreach>
+    </delete>
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
new file mode 100644
index 0000000..19c0318
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.SvyTaskTemplateTargetoptionMapper">
+
+    <resultMap type="com.smartor.domain.SvyTaskTemplateTargetoption" id="SvyTaskTemplateTargetoptionResult">
+        <result property="id"    column="id"    />
+        <result property="taskid"    column="taskid"    />
+        <result property="templateID"    column="templateID"    />
+        <result property="targetid"    column="targetid"    />
+        <result property="targetname"    column="targetname"    />
+        <result property="targettype"    column="targettype"    />
+        <result property="categoryName"    column="categoryName"    />
+        <result property="targetvalue"    column="targetvalue"    />
+        <result property="targetregex2"    column="targetregex2"    />
+        <result property="targetregex"    column="targetregex"    />
+        <result property="optiondesc"    column="optiondesc"    />
+        <result property="language"    column="language"    />
+        <result property="version"    column="version"    />
+        <result property="groupid"    column="groupid"    />
+        <result property="isabnormal"    column="isabnormal"    />
+        <result property="warnup"    column="warnup"    />
+        <result property="warndown"    column="warndown"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="isupload"    column="isupload"    />
+        <result property="uploadTime"    column="upload_time"    />
+        <result property="orgid"    column="orgid"    />
+        <result property="pid"    column="pid"    />
+        <result property="guid"    column="guid"    />
+        <result property="scriptid"    column="scriptid"    />
+        <result property="nodynamiccruxsJson"    column="nodynamiccruxs"    />
+        <result property="dynamiccruxsJson"    column="dynamiccruxs"    />
+        <result property="nextQuestion"    column="next_question"    />
+        <result property="picturePath"    column="picture_path"    />
+    </resultMap>
+
+    <sql id="selectSvyTaskTemplateTargetoptionVo">
+        select id, taskid, templateID, targetid, targetname, targettype, categoryName, targetvalue, targetregex2, targetregex, optiondesc, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, scriptid, nodynamiccruxs, dynamiccruxs, next_question, picture_path from svy_task_template_targetoption
+    </sql>
+
+    <select id="selectSvyTaskTemplateTargetoptionList" parameterType="SvyTaskTemplateTargetoption" resultMap="SvyTaskTemplateTargetoptionResult">
+        <include refid="selectSvyTaskTemplateTargetoptionVo"/>
+        <where>
+            <if test="taskid != null "> and taskid = #{taskid}</if>
+            <if test="templateID != null "> and templateID = #{templateID}</if>
+            <if test="targetid != null "> and targetid = #{targetid}</if>
+            <if test="targetname != null  and targetname != ''"> and targetname like concat('%', #{targetname}, '%')</if>
+            <if test="targettype != null  and targettype != ''"> and targettype = #{targettype}</if>
+            <if test="categoryName != null  and categoryName != ''"> and categoryName like concat('%', #{categoryName}, '%')</if>
+            <if test="targetvalue != null  and targetvalue != ''"> and targetvalue = #{targetvalue}</if>
+            <if test="targetregex2 != null  and targetregex2 != ''"> and targetregex2 = #{targetregex2}</if>
+            <if test="targetregex != null  and targetregex != ''"> and targetregex = #{targetregex}</if>
+            <if test="optiondesc != null  and optiondesc != ''"> and optiondesc = #{optiondesc}</if>
+            <if test="language != null  and language != ''"> and language = #{language}</if>
+            <if test="version != null  and version != ''"> and version = #{version}</if>
+            <if test="groupid != null  and groupid != ''"> and groupid = #{groupid}</if>
+            <if test="isabnormal != null "> and isabnormal = #{isabnormal}</if>
+            <if test="warnup != null "> and warnup = #{warnup}</if>
+            <if test="warndown != null "> and warndown = #{warndown}</if>
+            <if test="isupload != null "> and isupload = #{isupload}</if>
+            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
+            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
+            <if test="pid != null "> and pid = #{pid}</if>
+            <if test="guid != null  and guid != ''"> and guid = #{guid}</if>
+            <if test="scriptid != null "> and scriptid = #{scriptid}</if>
+            <if test="nodynamiccruxs != null  and nodynamiccruxs != ''"> and nodynamiccruxs = #{nodynamiccruxsJson}</if>
+            <if test="dynamiccruxs != null  and dynamiccruxs != ''"> and dynamiccruxs = #{dynamiccruxsJson}</if>
+            <if test="nextQuestion != null "> and next_question = #{nextQuestion}</if>
+            <if test="picturePath != null  and picturePath != ''"> and picture_path = #{picturePath}</if>
+        </where>
+    </select>
+
+    <select id="selectSvyTaskTemplateTargetoptionById" parameterType="Long" resultMap="SvyTaskTemplateTargetoptionResult">
+        <include refid="selectSvyTaskTemplateTargetoptionVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSvyTaskTemplateTargetoption" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption" useGeneratedKeys="true" keyProperty="id">
+        insert into svy_task_template_targetoption
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="taskid != null">taskid,</if>
+            <if test="templateID != null">templateID,</if>
+            <if test="targetid != null">targetid,</if>
+            <if test="targetname != null">targetname,</if>
+            <if test="targettype != null">targettype,</if>
+            <if test="categoryName != null">categoryName,</if>
+            <if test="targetvalue != null">targetvalue,</if>
+            <if test="targetregex2 != null">targetregex2,</if>
+            <if test="targetregex != null">targetregex,</if>
+            <if test="optiondesc != null">optiondesc,</if>
+            <if test="language != null">language,</if>
+            <if test="version != null">version,</if>
+            <if test="groupid != null">groupid,</if>
+            <if test="isabnormal != null">isabnormal,</if>
+            <if test="warnup != null">warnup,</if>
+            <if test="warndown != null">warndown,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="isupload != null">isupload,</if>
+            <if test="uploadTime != null">upload_time,</if>
+            <if test="orgid != null">orgid,</if>
+            <if test="pid != null">pid,</if>
+            <if test="guid != null">guid,</if>
+            <if test="scriptid != null">scriptid,</if>
+            <if test="nodynamiccruxs != null">nodynamiccruxs,</if>
+            <if test="dynamiccruxs != null">dynamiccruxs,</if>
+            <if test="nextQuestion != null">next_question,</if>
+            <if test="picturePath != null">picture_path,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="taskid != null">#{taskid},</if>
+            <if test="templateID != null">#{templateID},</if>
+            <if test="targetid != null">#{targetid},</if>
+            <if test="targetname != null">#{targetname},</if>
+            <if test="targettype != null">#{targettype},</if>
+            <if test="categoryName != null">#{categoryName},</if>
+            <if test="targetvalue != null">#{targetvalue},</if>
+            <if test="targetregex2 != null">#{targetregex2},</if>
+            <if test="targetregex != null">#{targetregex},</if>
+            <if test="optiondesc != null">#{optiondesc},</if>
+            <if test="language != null">#{language},</if>
+            <if test="version != null">#{version},</if>
+            <if test="groupid != null">#{groupid},</if>
+            <if test="isabnormal != null">#{isabnormal},</if>
+            <if test="warnup != null">#{warnup},</if>
+            <if test="warndown != null">#{warndown},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="isupload != null">#{isupload},</if>
+            <if test="uploadTime != null">#{uploadTime},</if>
+            <if test="orgid != null">#{orgid},</if>
+            <if test="pid != null">#{pid},</if>
+            <if test="guid != null">#{guid},</if>
+            <if test="scriptid != null">#{scriptid},</if>
+            <if test="nodynamiccruxs != null">#{nodynamiccruxsJson},</if>
+            <if test="dynamiccruxs != null">#{dynamiccruxsJson},</if>
+            <if test="nextQuestion != null">#{nextQuestion},</if>
+            <if test="picturePath != null">#{picturePath},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSvyTaskTemplateTargetoption" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption">
+        update svy_task_template_targetoption
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="taskid != null">taskid = #{taskid},</if>
+            <if test="templateID != null">templateID = #{templateID},</if>
+            <if test="targetid != null">targetid = #{targetid},</if>
+            <if test="targetname != null">targetname = #{targetname},</if>
+            <if test="targettype != null">targettype = #{targettype},</if>
+            <if test="categoryName != null">categoryName = #{categoryName},</if>
+            <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
+            <if test="targetregex2 != null">targetregex2 = #{targetregex2},</if>
+            <if test="targetregex != null">targetregex = #{targetregex},</if>
+            <if test="optiondesc != null">optiondesc = #{optiondesc},</if>
+            <if test="language != null">language = #{language},</if>
+            <if test="version != null">version = #{version},</if>
+            <if test="groupid != null">groupid = #{groupid},</if>
+            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
+            <if test="warnup != null">warnup = #{warnup},</if>
+            <if test="warndown != null">warndown = #{warndown},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="isupload != null">isupload = #{isupload},</if>
+            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
+            <if test="orgid != null">orgid = #{orgid},</if>
+            <if test="pid != null">pid = #{pid},</if>
+            <if test="guid != null">guid = #{guid},</if>
+            <if test="scriptid != null">scriptid = #{scriptid},</if>
+            <if test="nodynamiccruxs != null">nodynamiccruxs = #{nodynamiccruxsJson},</if>
+            <if test="dynamiccruxs != null">dynamiccruxs = #{dynamiccruxsJson},</if>
+            <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
+            <if test="picturePath != null">picture_path = #{picturePath},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSvyTaskTemplateTargetoptionById" parameterType="Long">
+        delete from svy_task_template_targetoption where id = #{id}
+    </delete>
+
+    <delete id="deleteSvyTaskTemplateTargetoptionByIds" parameterType="String">
+        delete from svy_task_template_targetoption where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTasksingledetailMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTasksingledetailMapper.xml
new file mode 100644
index 0000000..abd0d8a
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/SvyTasksingledetailMapper.xml
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.SvyTasksingledetailMapper">
+
+    <resultMap type="com.smartor.domain.SvyTasksingledetail" id="SvyTasksingledetailResult">
+        <result property="calldetailid"    column="calldetailid"    />
+        <result property="callid"    column="callid"    />
+        <result property="uuid"    column="uuid"    />
+        <result property="phone"    column="phone"    />
+        <result property="displayno"    column="displayno"    />
+        <result property="operate"    column="operate"    />
+        <result property="inbound"    column="inbound"    />
+        <result property="incoming"    column="incoming"    />
+        <result property="assigntime"    column="assigntime"    />
+        <result property="starttime"    column="starttime"    />
+        <result property="answertime"    column="answertime"    />
+        <result property="silent"    column="silent"    />
+        <result property="dtmfKey"    column="dtmf_key"    />
+        <result property="musicpath"    column="musicpath"    />
+        <result property="sentIndex"    column="sent_index"    />
+        <result property="sentBegin"    column="sent_begin"    />
+        <result property="asrtext"    column="asrtext"    />
+        <result property="beginTime"    column="begin_time"    />
+        <result property="endTime"    column="end_time"    />
+        <result property="sentEnd"    column="sent_end"    />
+        <result property="recordpath"    column="recordpath"    />
+        <result property="recordurl"    column="recordurl"    />
+        <result property="templateid"    column="templateid"    />
+        <result property="templatequestionnum"    column="templatequestionnum"    />
+        <result property="switchid"    column="switchid"    />
+        <result property="questiontext"    column="questiontext"    />
+        <result property="questionvoice"    column="questionvoice"    />
+        <result property="categoryname"    column="categoryname"    />
+        <result property="targetoptions"    column="targetoptions"    />
+        <result property="targetvalue"    column="targetvalue"    />
+        <result property="matchedtext"    column="matchedtext"    />
+        <result property="addtime"    column="addtime"    />
+        <result property="isupload"    column="isupload"    />
+        <result property="uploadTime"    column="upload_time"    />
+        <result property="orgid"    column="orgid"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="pid"    column="pid"    />
+        <result property="guid"    column="guid"    />
+        <result property="valueType"    column="value_type"    />
+    </resultMap>
+
+    <sql id="selectSvyTasksingledetailVo">
+        select calldetailid, callid, uuid, phone, displayno, operate, inbound, incoming, assigntime, starttime, answertime, silent, dtmf_key, musicpath, sent_index, sent_begin, asrtext, begin_time, end_time, sent_end, recordpath, recordurl, templateid, templatequestionnum, switchid, questiontext, questionvoice, categoryname, targetoptions, targetvalue, matchedtext, addtime, isupload, upload_time, orgid, create_time, del_flag, update_by, update_time, create_by, pid, guid, value_type from svy_tasksingledetail
+    </sql>
+
+    <select id="selectSvyTasksingledetailList" parameterType="com.smartor.domain.SvyTasksingledetail" resultMap="SvyTasksingledetailResult">
+        <include refid="selectSvyTasksingledetailVo"/>
+        <where>
+            <if test="callid != null  and callid != ''"> and callid = #{callid}</if>
+            <if test="uuid != null  and uuid != ''"> and uuid = #{uuid}</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="displayno != null  and displayno != ''"> and displayno = #{displayno}</if>
+            <if test="operate != null  and operate != ''"> and operate = #{operate}</if>
+            <if test="inbound != null "> and inbound = #{inbound}</if>
+            <if test="incoming != null "> and incoming = #{incoming}</if>
+            <if test="assigntime != null "> and assigntime = #{assigntime}</if>
+            <if test="starttime != null "> and starttime = #{starttime}</if>
+            <if test="answertime != null "> and answertime = #{answertime}</if>
+            <if test="silent != null "> and silent = #{silent}</if>
+            <if test="dtmfKey != null  and dtmfKey != ''"> and dtmf_key = #{dtmfKey}</if>
+            <if test="musicpath != null  and musicpath != ''"> and musicpath = #{musicpath}</if>
+            <if test="sentIndex != null "> and sent_index = #{sentIndex}</if>
+            <if test="sentBegin != null "> and sent_begin = #{sentBegin}</if>
+            <if test="asrtext != null  and asrtext != ''"> and asrtext = #{asrtext}</if>
+            <if test="beginTime != null "> and begin_time = #{beginTime}</if>
+            <if test="endTime != null "> and end_time = #{endTime}</if>
+            <if test="sentEnd != null "> and sent_end = #{sentEnd}</if>
+            <if test="recordpath != null  and recordpath != ''"> and recordpath = #{recordpath}</if>
+            <if test="recordurl != null  and recordurl != ''"> and recordurl = #{recordurl}</if>
+            <if test="templateid != null  and templateid != ''"> and templateid = #{templateid}</if>
+            <if test="templatequestionnum != null "> and templatequestionnum = #{templatequestionnum}</if>
+            <if test="switchid != null "> and switchid = #{switchid}</if>
+            <if test="questiontext != null  and questiontext != ''"> and questiontext = #{questiontext}</if>
+            <if test="questionvoice != null  and questionvoice != ''"> and questionvoice = #{questionvoice}</if>
+            <if test="categoryname != null  and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
+            <if test="targetoptions != null  and targetoptions != ''"> and targetoptions = #{targetoptions}</if>
+            <if test="targetvalue != null  and targetvalue != ''"> and targetvalue = #{targetvalue}</if>
+            <if test="matchedtext != null  and matchedtext != ''"> and matchedtext = #{matchedtext}</if>
+            <if test="addtime != null "> and addtime = #{addtime}</if>
+            <if test="isupload != null "> and isupload = #{isupload}</if>
+            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
+            <if test="orgid != null  and orgid != ''"> and orgid = #{orgid}</if>
+            <if test="pid != null "> and pid = #{pid}</if>
+            <if test="guid != null  and guid != ''"> and guid = #{guid}</if>
+            <if test="valueType != null  and valueType != ''"> and value_type = #{valueType}</if>
+        </where>
+    </select>
+
+    <select id="selectSvyTasksingledetailByCalldetailid" parameterType="String" resultMap="SvyTasksingledetailResult">
+        <include refid="selectSvyTasksingledetailVo"/>
+        where calldetailid = #{calldetailid}
+    </select>
+
+    <insert id="insertSvyTasksingledetail" parameterType="com.smartor.domain.SvyTasksingledetail">
+        insert into svy_tasksingledetail
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="calldetailid != null">calldetailid,</if>
+            <if test="callid != null">callid,</if>
+            <if test="uuid != null">uuid,</if>
+            <if test="phone != null">phone,</if>
+            <if test="displayno != null">displayno,</if>
+            <if test="operate != null">operate,</if>
+            <if test="inbound != null">inbound,</if>
+            <if test="incoming != null">incoming,</if>
+            <if test="assigntime != null">assigntime,</if>
+            <if test="starttime != null">starttime,</if>
+            <if test="answertime != null">answertime,</if>
+            <if test="silent != null">silent,</if>
+            <if test="dtmfKey != null">dtmf_key,</if>
+            <if test="musicpath != null">musicpath,</if>
+            <if test="sentIndex != null">sent_index,</if>
+            <if test="sentBegin != null">sent_begin,</if>
+            <if test="asrtext != null">asrtext,</if>
+            <if test="beginTime != null">begin_time,</if>
+            <if test="endTime != null">end_time,</if>
+            <if test="sentEnd != null">sent_end,</if>
+            <if test="recordpath != null">recordpath,</if>
+            <if test="recordurl != null">recordurl,</if>
+            <if test="templateid != null">templateid,</if>
+            <if test="templatequestionnum != null">templatequestionnum,</if>
+            <if test="switchid != null">switchid,</if>
+            <if test="questiontext != null">questiontext,</if>
+            <if test="questionvoice != null">questionvoice,</if>
+            <if test="categoryname != null">categoryname,</if>
+            <if test="targetoptions != null">targetoptions,</if>
+            <if test="targetvalue != null">targetvalue,</if>
+            <if test="matchedtext != null">matchedtext,</if>
+            <if test="addtime != null">addtime,</if>
+            <if test="isupload != null">isupload,</if>
+            <if test="uploadTime != null">upload_time,</if>
+            <if test="orgid != null">orgid,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="pid != null">pid,</if>
+            <if test="guid != null">guid,</if>
+            <if test="valueType != null">value_type,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="calldetailid != null">#{calldetailid},</if>
+            <if test="callid != null">#{callid},</if>
+            <if test="uuid != null">#{uuid},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="displayno != null">#{displayno},</if>
+            <if test="operate != null">#{operate},</if>
+            <if test="inbound != null">#{inbound},</if>
+            <if test="incoming != null">#{incoming},</if>
+            <if test="assigntime != null">#{assigntime},</if>
+            <if test="starttime != null">#{starttime},</if>
+            <if test="answertime != null">#{answertime},</if>
+            <if test="silent != null">#{silent},</if>
+            <if test="dtmfKey != null">#{dtmfKey},</if>
+            <if test="musicpath != null">#{musicpath},</if>
+            <if test="sentIndex != null">#{sentIndex},</if>
+            <if test="sentBegin != null">#{sentBegin},</if>
+            <if test="asrtext != null">#{asrtext},</if>
+            <if test="beginTime != null">#{beginTime},</if>
+            <if test="endTime != null">#{endTime},</if>
+            <if test="sentEnd != null">#{sentEnd},</if>
+            <if test="recordpath != null">#{recordpath},</if>
+            <if test="recordurl != null">#{recordurl},</if>
+            <if test="templateid != null">#{templateid},</if>
+            <if test="templatequestionnum != null">#{templatequestionnum},</if>
+            <if test="switchid != null">#{switchid},</if>
+            <if test="questiontext != null">#{questiontext},</if>
+            <if test="questionvoice != null">#{questionvoice},</if>
+            <if test="categoryname != null">#{categoryname},</if>
+            <if test="targetoptions != null">#{targetoptions},</if>
+            <if test="targetvalue != null">#{targetvalue},</if>
+            <if test="matchedtext != null">#{matchedtext},</if>
+            <if test="addtime != null">#{addtime},</if>
+            <if test="isupload != null">#{isupload},</if>
+            <if test="uploadTime != null">#{uploadTime},</if>
+            <if test="orgid != null">#{orgid},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="pid != null">#{pid},</if>
+            <if test="guid != null">#{guid},</if>
+            <if test="valueType != null">#{valueType},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSvyTasksingledetail" parameterType="com.smartor.domain.SvyTasksingledetail">
+        update svy_tasksingledetail
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="callid != null">callid = #{callid},</if>
+            <if test="uuid != null">uuid = #{uuid},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="displayno != null">displayno = #{displayno},</if>
+            <if test="operate != null">operate = #{operate},</if>
+            <if test="inbound != null">inbound = #{inbound},</if>
+            <if test="incoming != null">incoming = #{incoming},</if>
+            <if test="assigntime != null">assigntime = #{assigntime},</if>
+            <if test="starttime != null">starttime = #{starttime},</if>
+            <if test="answertime != null">answertime = #{answertime},</if>
+            <if test="silent != null">silent = #{silent},</if>
+            <if test="dtmfKey != null">dtmf_key = #{dtmfKey},</if>
+            <if test="musicpath != null">musicpath = #{musicpath},</if>
+            <if test="sentIndex != null">sent_index = #{sentIndex},</if>
+            <if test="sentBegin != null">sent_begin = #{sentBegin},</if>
+            <if test="asrtext != null">asrtext = #{asrtext},</if>
+            <if test="beginTime != null">begin_time = #{beginTime},</if>
+            <if test="endTime != null">end_time = #{endTime},</if>
+            <if test="sentEnd != null">sent_end = #{sentEnd},</if>
+            <if test="recordpath != null">recordpath = #{recordpath},</if>
+            <if test="recordurl != null">recordurl = #{recordurl},</if>
+            <if test="templateid != null">templateid = #{templateid},</if>
+            <if test="templatequestionnum != null">templatequestionnum = #{templatequestionnum},</if>
+            <if test="switchid != null">switchid = #{switchid},</if>
+            <if test="questiontext != null">questiontext = #{questiontext},</if>
+            <if test="questionvoice != null">questionvoice = #{questionvoice},</if>
+            <if test="categoryname != null">categoryname = #{categoryname},</if>
+            <if test="targetoptions != null">targetoptions = #{targetoptions},</if>
+            <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
+            <if test="matchedtext != null">matchedtext = #{matchedtext},</if>
+            <if test="addtime != null">addtime = #{addtime},</if>
+            <if test="isupload != null">isupload = #{isupload},</if>
+            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
+            <if test="orgid != null">orgid = #{orgid},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="pid != null">pid = #{pid},</if>
+            <if test="guid != null">guid = #{guid},</if>
+            <if test="valueType != null">value_type = #{valueType},</if>
+        </trim>
+        where calldetailid = #{calldetailid}
+    </update>
+
+    <delete id="deleteSvyTasksingledetailByCalldetailid" parameterType="String">
+        delete from svy_tasksingledetail where calldetailid = #{calldetailid}
+    </delete>
+
+    <delete id="deleteSvyTasksingledetailByCalldetailids" parameterType="String">
+        delete from svy_tasksingledetail where calldetailid in
+        <foreach item="calldetailid" collection="array" open="(" separator="," close=")">
+            #{calldetailid}
+        </foreach>
+    </delete>
+</mapper>

--
Gitblit v1.9.3