From 0123a0bd06f83a2a973023bb2f197e21118ef293 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 23 七月 2024 18:31:32 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java                  |    3 
 smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java                             |   14 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java            |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java |    8 
 smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java                      |    5 
 smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java                      |   14 +
 smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java                 |    8 
 smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml                      |  167 +++++++-----
 smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java                 |    8 
 smartor/src/main/java/com/smartor/domain/ServiceSubTaskCacheReq.java                           |    4 
 smartor/src/main/java/com/smartor/domain/PatArchiveVO.java                                     |    2 
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java                      |   25 +
 smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml                |   12 
 smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java                    |    9 
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java            |  133 +++++++---
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java                          |    4 
 smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java                            |    2 
 smartor/src/main/java/com/smartor/domain/ServiceSubtaskOptionAnswer.java                       |   47 +++
 smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml                |  172 ++++++++-----
 smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java                            |    7 
 smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java                       |    2 
 smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java                          |   10 
 smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml                                 |    8 
 smartor/src/main/java/com/smartor/domain/ServiceSubTaskQueryReq.java                           |   42 +++
 smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml                      |   12 
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml                       |   30 +
 26 files changed, 518 insertions(+), 232 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
index a369af2..aafb101 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -161,7 +161,7 @@
                 List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList = redisCache.getCacheObject(userId + "ivrTaskTemplateScriptVOList");
                 //鏍规嵁鍓嶇浼犲洖鐨勬潯浠讹紝鑾峰彇褰撳墠棰樼洰
                 IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = questionMessage.getNowQuestion();
-                if (ivrTaskTemplateScriptVO.getID() == null) {
+                if (ivrTaskTemplateScriptVO.getId() == null) {
                     QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues");
                     ivrTaskTemplateScriptVO = returnQues.getNowQuestion();
                 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
index 8ffedc5..7ba7922 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
@@ -8,6 +8,7 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.smartor.domain.ServiceSubTaskAnswerReq;
 import com.smartor.domain.ServiceSubTaskCacheReq;
+import com.smartor.domain.ServiceSubTaskQueryReq;
 import com.smartor.domain.ServiceSubtaskAnswer;
 import com.smartor.service.IServiceSubtaskAnswerService;
 import io.swagger.annotations.Api;
@@ -113,4 +114,11 @@
     public AjaxResult saveQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) {
         return toAjax(serviceSubtaskAnswerService.saveQuestionCache(serviceSubTaskCacheReq));
     }
+
+
+    @ApiOperation("鍖荤敓鏌ヨ鎮h�呴棶棰樼粨鏋�(澶栭摼)")
+    @PostMapping("/selectPatQuestionResult")
+    public AjaxResult selectPatQuestionResult(@RequestBody ServiceSubTaskQueryReq serviceSubTaskQueryReq) {
+        return AjaxResult.success(serviceSubtaskAnswerService.selectPatQuestionResult(serviceSubTaskQueryReq));
+    }
 }
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
index 2aad1be..1bd1ca1 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
@@ -36,6 +36,13 @@
 
 
     /**
+     * 閫傜敤棰樺瀷锛�1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠锛�
+     */
+    @Excel(name = "閫傜敤棰樺瀷锛�1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠锛�")
+    @ApiModelProperty(value = "閫傜敤棰樺瀷锛�1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠锛�")
+    private String scriptType;
+
+    /**
      * 妯℃澘ID
      */
     @Excel(name = "妯℃澘ID")
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
index 96781f9..b711180 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
@@ -27,7 +27,7 @@
      * 涓婚敭ID
      */
     @ApiModelProperty(value = "涓婚敭")
-    private Long ID;
+    private Long id;
 
     /**
      * 浠诲姟id
@@ -43,6 +43,14 @@
     @ApiModelProperty(value = "妯℃澘璇濇湳缂栧彿")
     private Long scriptno;
 
+
+    /**
+     * 閫傜敤棰樺瀷锛�1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠锛�
+     */
+    @Excel(name = "閫傜敤棰樺瀷锛�1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠锛�")
+    @ApiModelProperty(value = "閫傜敤棰樺瀷锛�1.鍗曢�� 2澶氶�� 3闂瓟 4濉┖  5鍏跺畠锛�")
+    private String scriptType;
+
     /**
      * 妯℃澘ID
      */
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
index c3b6cc7..775f7a6 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
@@ -81,6 +81,13 @@
     private String targetvalue;
 
     /**
+     * 妯℃澘鎸囨爣鍊�
+     */
+    @Excel(name = "妯℃澘鎸囨爣鍊�")
+    @ApiModelProperty(value = "妯℃澘鎸囨爣鍊�")
+    private String appenddesc;
+
+    /**
      * 妯℃澘鎸囨爣姝e垯2
      */
     @Excel(name = "妯℃澘鎸囨爣姝e垯2")
@@ -235,5 +242,10 @@
     @ApiModelProperty(value = "鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」")
     private Boolean isUserOperation = false;
 
-
+    /**
+     * 閫夐」缁彿
+     */
+    @Excel(name = "閫夐」缁彿")
+    @ApiModelProperty(value = "閫夐」缁彿")
+    private String optionCode;
 }
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
index de542e1..84793b3 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
@@ -28,7 +28,7 @@
      * 鑷ID
      */
     @ApiModelProperty(value = "鑷ID")
-    private Long patid;
+    private Long id;
 
     /**
      * 濮撳悕
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubTaskCacheReq.java b/smartor/src/main/java/com/smartor/domain/ServiceSubTaskCacheReq.java
index 1abf24c..003caee 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubTaskCacheReq.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubTaskCacheReq.java
@@ -23,9 +23,9 @@
     private String param2;
 
     @ApiModelProperty(value = "闂鍥炵瓟鏄庣粏(闅忚)")
-    private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList;
+    private List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList;
 
     @ApiModelProperty(value = "闂鍥炵瓟鏄庣粏(闂嵎)")
-    List<SvyLibTemplateScriptVO> svyLibTemplateScriptVOList;
+    List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOList;
 
 }
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubTaskQueryReq.java b/smartor/src/main/java/com/smartor/domain/ServiceSubTaskQueryReq.java
new file mode 100644
index 0000000..f67ef27
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubTaskQueryReq.java
@@ -0,0 +1,42 @@
+package com.smartor.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.annotation.Nonnull;
+
+
+/**
+ * 鍖荤敓鏌ヨ鎮h�呭洖绛斾俊鎭�
+ *
+ * @author ls
+ * @date 2023-06-05
+ */
+@ApiModel(value = "ServiceSubTaskQueryReq", description = "鍖荤敓鏌ヨ鎮h�呭洖绛斾俊鎭�")
+@Data
+public class ServiceSubTaskQueryReq {
+
+    @ApiModelProperty(value = "浠诲姟绫诲瀷锛�1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱 ")
+    private Long type;
+
+    /**
+     * 浠诲姟ID
+     */
+    @Nonnull
+    @ApiModelProperty(value = "浠诲姟ID")
+    private Long taskid;
+
+    /**
+     * 鎮h�匢D
+     */
+    @ApiModelProperty(value = "鎮h�匢D")
+    private Long patId;
+
+    /**
+     * 棰樼洰ID
+     */
+    @ApiModelProperty(value = "棰樼洰ID")
+    private Long scriptid;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java
index 6b03a4a..bc43e63 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java
@@ -35,9 +35,9 @@
     private Long taskid;
 
     /**
-     * 瀛愪换鍔D
+     * 鎮h�匢D
      */
-    @ApiModelProperty(value = "瀛愪换鍔D")
+    @ApiModelProperty(value = "鎮h�匢D")
     private Long patId;
 
     /**
@@ -74,13 +74,19 @@
      * 闇�瑕佽窡杩涳紙鏄細1銆佸惁锛�0锛�
      */
     @ApiModelProperty(value = "闇�瑕佽窡杩�")
-    private String istrack;
+    private String trackFlag;
 
     /**
      * 寮傚父棰勮锛堟槸锛�1銆佸惁锛�0锛�
      */
     @ApiModelProperty(value = "寮傚父棰勮")
-    private String isabnormal;
+    private String warningFlag;
+
+    /**
+     * 閫夐」绛旀鐨勯檮鍔犱俊鎭�
+     */
+    @ApiModelProperty(value = "閫夐」绛旀鐨勯檮鍔犱俊鎭�")
+    private String answerps;
 
     /**
      * 鍒犻櫎鏍囧織锛�0锛氭湭鍒犻櫎 1锛氬凡鍒犻櫎锛�
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskOptionAnswer.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskOptionAnswer.java
new file mode 100644
index 0000000..96b6e02
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskOptionAnswer.java
@@ -0,0 +1,47 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 浠诲姟闂嵎闂閫夐」瀵硅薄 service_subtask_answer
+ *
+ * @author ruoyi
+ * @date 2024-07-18
+ */
+@ApiModel(value = "ServiceSubtaskOptionAnswer", description = "澶栭摼閫夐」缁撴灉")
+@Data
+public class ServiceSubtaskOptionAnswer extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 浠诲姟妯℃澘閫夐」ID
+     */
+    @ApiModelProperty(value = "浠诲姟妯℃澘閫夐」ID")
+    private Long id;
+
+    /**
+     * 浠诲姟ID
+     */
+    @ApiModelProperty(value = "閫夐」code")
+    private String code;
+
+    /**
+     * 鎮h�匢D
+     */
+    @ApiModelProperty(value = "閫夐」鍊�")
+    private String value;
+
+    /**
+     * 棰樼洰ID
+     */
+    @ApiModelProperty(value = "鎻忚堪")
+    private String appenddesc;
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java
index 6e1845a..661a2b1 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java
@@ -61,7 +61,7 @@
      */
     @Excel(name = "閫夐」缂栧彿")
     @ApiModelProperty(value = "閫夐」缂栧彿")
-    private Long optionNo;
+    private String optionCode;
 
     /**
      * 璇濇湳ID
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
index ee77211..ad5020b 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
@@ -143,7 +143,7 @@
      * 鍩虹鎸囨爣绫诲瀷锛�1 閫夐」  2 鏂囨湰  3 鏁板�硷級
      */
     @ApiModelProperty(value = "鍩虹鎸囨爣绫诲瀷1=閫夐」,2=鏂囨湰,3=鏁板��")
-    private String targettype;
+    private String scriptType;
 
     /**
      * 鍩虹鎸囨爣ID(鏆傛椂褰撳簭鍙穒d)
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
index 9b01476..607827b 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
@@ -25,7 +25,7 @@
     /**
      * 涓婚敭ID
      */
-    private Long ID;
+    private Long id;
 
     /**
      * 棰樼洰涓婚
@@ -143,7 +143,7 @@
      * 鍩虹鎸囨爣绫诲瀷锛�1 閫夐」  2 鏂囨湰  3 鏁板�硷級
      */
     @ApiModelProperty(value = "鍩虹鎸囨爣绫诲瀷 1=閫夐」,2=鏂囨湰,3=鏁板��")
-    private String targettype;
+    private String scriptType;
 
     /**
      * 鍩虹鎸囨爣ID(鏆傛椂褰撳簭鍙穒d)
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java
index 23f04c0..dbb79a3 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateTargetoption.java
@@ -200,10 +200,35 @@
     @ApiModelProperty(value = "閫夐」鍥剧墖璺緞")
     private String picturePath;
 
+
+    /**
+     * 閫夐」闄勫姞鏍囪瘑锛�0-鏃犻檮鍔狅紝1-鏈夐檮浠讹紱
+     */
+    @ApiModelProperty(value = "閫夐」鍥剧墖璺緞")
+    private String appendflag;
+
+    /**
+     * 闄勪欢淇℃伅
+     */
+    @ApiModelProperty(value = "闄勪欢淇℃伅(闂瓟棰樼殑缁撴灉涔熸槸鏀惧湪杩欎釜閲岄潰)")
+    private String appenddesc;
+
     /**
      * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
      */
     @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
     private Integer isoperation;
 
+    /**
+     * 閫夐」缁彿
+     */
+    @ApiModelProperty(value = "閫夐」缁彿")
+    private String optionCode;
+
+    /**
+     * 鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」
+     */
+    @ApiModelProperty(value = "鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」")
+    private Boolean isUserOperation = false;
+
 }
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java b/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java
index 8d4a4a2..a5ea506 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java
@@ -1,9 +1,8 @@
 package com.smartor.service;
 
-import com.smartor.domain.ServiceSubTaskAnswerReq;
-import com.smartor.domain.ServiceSubTaskCacheReq;
-import com.smartor.domain.ServiceSubTaskDetailReq;
-import com.smartor.domain.ServiceSubtaskAnswer;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.smartor.domain.*;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.List;
 
@@ -78,4 +77,6 @@
      */
     public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq);
 
+    public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq);
+
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
index a6da642..91d229a 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
@@ -174,9 +174,9 @@
 
         //閫氳繃璇濇湳ID鑾峰彇閫夐」
         for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOS) {
-            log.info("ivrLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", ivrTaskTemplateScriptVO.getID());
+            log.info("ivrLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", ivrTaskTemplateScriptVO.getId());
             IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption();
-            ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getID());
+            ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId());
             List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
             for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption1 : ivrTaskTemplateTargetoptions) {
                 ObjectMapper mapper = new ObjectMapper();
@@ -224,11 +224,11 @@
 
         } else if (isoperation == 3) {
             //鍒犻櫎
-            if (ivrTaskTemplateScriptVO.getID() == null) {
+            if (ivrTaskTemplateScriptVO.getId() == null) {
                 log.info("鍒犻櫎澶辫触,妯℃澘璇濇湳id涓虹┖");
             } else {
                 ivrTaskTemplateScriptVO.setUpdateTime(new Date());
-                ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getID());
+                ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getId());
             }
         }
         return ivrTaskTemplateScript;
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
index 0ce2b89..17705b9 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -118,13 +118,13 @@
     public Boolean saveOrUpdatePatInfo(PatArchiveVO patArchiveVO) {
         //閫氳繃isoperation鏉ュ垽鏂槸鍚︽柊澧�
         PatArchive patArchive = DtoConversionUtils.sourceToTarget(patArchiveVO, PatArchive.class);
-        if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 1 || patArchiveVO.getPatid() == null) {
+        if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 1 || patArchiveVO.getId() == null) {
             //鏂板
             List<PatArchive> patArchives = new ArrayList<>();
             patArchive.setUpdateTime(DateUtils.getNowDate());
             patArchives.add(patArchive);
             patArchiveMapper.insertPatArchive(patArchives);
-        } else if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 2 || patArchiveVO.getPatid() != null) {
+        } else if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 2 || patArchiveVO.getId() != null) {
             //淇敼
             patArchiveVO.setIsoperation(2);
             patArchiveMapper.updatePatArchive(patArchive);
@@ -475,7 +475,6 @@
                 patArchiveList.addAll(patArchives3);
             }
         }
-
 
         //鏍规嵁鎮h�匢D杩涜鍒嗙粍
         Map<Long, List<PatArchive>> listMap = patArchiveList.stream().collect(Collectors.groupingBy(PatArchive::getId));
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
index 908e483..5333257 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -1,13 +1,20 @@
 package com.smartor.service.impl;
 
+import com.alibaba.fastjson2.JSON;
+import com.google.gson.JsonArray;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DtoConversionUtils;
 import com.ruoyi.common.utils.RSAPublicKeyExample;
 import com.ruoyi.common.utils.StringUtils;
 import com.smartor.domain.*;
+import com.smartor.mapper.IvrTaskTemplateScriptMapper;
 import com.smartor.mapper.ServiceSubtaskAnswerMapper;
 import com.smartor.mapper.ServiceSubtaskMapper;
+import com.smartor.mapper.ServiceTaskMapper;
+import com.smartor.service.IIvrTaskTemplateService;
 import com.smartor.service.IServiceSubtaskAnswerService;
+import com.smartor.service.ISvyTaskTemplateService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ObjectUtils;
@@ -15,10 +22,7 @@
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 /**
  * 浠诲姟闂嵎闂閫夐」Service涓氬姟灞傚鐞�
@@ -31,9 +35,6 @@
 public class ServiceSubtaskAnswerServiceImpl implements IServiceSubtaskAnswerService {
     @Autowired
     private ServiceSubtaskAnswerMapper serviceSubtaskAnswerMapper;
-
-    @Autowired
-    private ServiceSubtaskMapper serviceSubtaskMapper;
 
     @Autowired
     private RedisCache redisCache;
@@ -120,10 +121,8 @@
 
             allKeys = new HashSet<>();
             if (serviceSubTaskAnswerReq.getType() == 1) {
-//                allKeys.add(redisCache.getCacheObject(pid + "-" + tid + "-SFscriptCache"));
                 allKeys.add(pid + "-" + tid + "-SFscriptCache");
             } else if (serviceSubTaskAnswerReq.getType() == 2) {
-//                allKeys.add(redisCache.getCacheObject(pid + "-" + tid + "-WJscriptCache"));
                 allKeys.add(pid + "-" + tid + "-WJscriptCache");
             }
         }
@@ -133,17 +132,17 @@
             String[] split = key.split("-");
             if (key.contains("-SFscriptCache")) {
                 //鍖呭惈浜�,璇存槑浜嗘槸闅忚闂
-                List<IvrLibaTemplateScriptVO> cacheList = redisCache.getCacheObject(key);
+                List<IvrTaskTemplateScriptVO> cacheList = redisCache.getCacheObject(key);
                 for (int i = 0; i < cacheList.size(); i++) {
                     if (i == 0) {
                         // 璇存槑鏄涓�棰�
-                        IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = cacheList.get(0);
+                        IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO = cacheList.get(0);
                         //灏嗙涓�棰樼殑淇℃伅鏀惧埌琛ㄤ腑
                         setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]));
                         nextScriptno = cacheList.get(0).getNextScriptno();
                     } else {
                         //涓嶆槸绗� 涓� 棰�
-                        for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : cacheList) {
+                        for (IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO : cacheList) {
                             if (ivrLibaTemplateScriptVO.getId() == nextScriptno) {
                                 setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]));
                                 nextScriptno = ivrLibaTemplateScriptVO.getNextScriptno();
@@ -152,7 +151,7 @@
                     }
                 }
             } else if (key.contains("-WJscriptCache")) {
-                List<SvyLibTemplateScriptVO> cacheList = redisCache.getCacheList(key);
+                List<SvyTaskTemplateScriptVO> cacheList = redisCache.getCacheList(key);
                 for (int i = 0; i < cacheList.size(); i++) {
                     if (i == 0) {
                         // 璇存槑鏄涓�棰�
@@ -160,10 +159,10 @@
                         setWJInfo(cacheList.get(0), Long.valueOf(split[1]), Long.valueOf(split[0]));
                         nextScriptno = Long.valueOf(cacheList.get(0).getNextScriptno());
                     } else {
-                        for (SvyLibTemplateScriptVO svyLibTemplateScriptVO : cacheList) {
-                            if (svyLibTemplateScriptVO.getId() == nextScriptno) {
+                        for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : cacheList) {
+                            if (svyTaskTemplateScriptVO.getId() == nextScriptno) {
                                 //灏嗙涓�棰樼殑淇℃伅鏀惧埌琛ㄤ腑
-                                setWJInfo(svyLibTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]));
+                                setWJInfo(svyTaskTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]));
                                 nextScriptno = Long.valueOf(cacheList.get(0).getNextScriptno());
                             }
 
@@ -188,63 +187,113 @@
         RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
         Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key));
         Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key));
-        if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrLibaTemplateScriptVOList())) {
+        if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList())) {
             //闅忚
-            redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrLibaTemplateScriptVOList());
-        } else if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyLibTemplateScriptVOList())) {
+            redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList());
+        } else if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList())) {
             //闂嵎
-            redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyLibTemplateScriptVOList());
+            redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList());
         }
         return 1;
     }
 
+    @Override
+    public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) {
+        log.error("selectPatQuesTionResult鐨勫叆鍙備负锛歿}", serviceSubTaskQueryReq);
+        ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer();
+        serviceSubtaskAnswer.setTaskid(serviceSubTaskQueryReq.getTaskid());
+        serviceSubtaskAnswer.setPatId(serviceSubTaskQueryReq.getPatId());
+        serviceSubtaskAnswer.setScriptid(serviceSubTaskQueryReq.getScriptid());
+        List<ServiceSubtaskAnswer> serviceSubtaskAnswerList = serviceSubtaskAnswerMapper.selectServiceSubtaskAnswerList(serviceSubtaskAnswer);
+        return serviceSubtaskAnswerList;
+    }
 
-    private void setSFInfo(IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO, Long taskid, Long patid) {
+
+    private void setSFInfo(IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Long taskid, Long patid) {
         ServiceSubtaskAnswer serviceSubtaskAnswer = null;
-        String dx = "";
-        if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getScriptType()) && ivrLibaTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getScriptType()) && ivrLibaTemplateScriptVO.getScriptType().equals("2")) {
+        List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>();
+        if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("2")) {
             //1銆�2涓哄崟閫夋垨澶氶��
-            for (IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption : ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList()) {
+            for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) {
                 //鑾峰彇鐢ㄦ埛閫変腑鐨勯�夐」鍙�
-                dx = dx + "," + ivrLibaTemplateTargetoption.getOptionNo().toString();
+                if (ivrTaskTemplateTargetoption.getIsUserOperation() == true) {
+                    ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
+                    serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId());
+                    serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode());
+                    serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateTargetoption.getTargetvalue());
+                    serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc());
+                    answerList.add(serviceSubtaskOptionAnswer);
+                }
+            }
+        } else if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("4")) {
+            //濉┖
+            for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) {
+                log.error("ivrTaskTemplateTargetoption鐨勫�间负锛歿}", ivrTaskTemplateTargetoption);
+                String[] split = ivrTaskTemplateTargetoption.getTargetvalue().split("|");
+                for (String s : split) {
+                    ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
+                    serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId());
+                    serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode());
+                    serviceSubtaskOptionAnswer.setValue(s);
+                    serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc());
+                    answerList.add(serviceSubtaskOptionAnswer);
+                }
             }
         } else {
-            //闈炲崟澶氶��
-            if (CollectionUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList())) {
-                dx = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(0).getAppenddesc();
+            //闈炲崟澶氶�夛紙闂瓟锛�
+            if (CollectionUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList())) {
+                log.error("IvrTaskScriptTargetoptionList鐨勫�间负锛歿}", ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList());
+                ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
+                serviceSubtaskOptionAnswer.setId(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getId());
+                serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getOptionCode());
+                serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getTargetvalue());
+                serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getAppenddesc());
+                answerList.add(serviceSubtaskOptionAnswer);
             }
         }
+        //鏁版嵁淇濆瓨
         serviceSubtaskAnswer.setTaskid(taskid);
         serviceSubtaskAnswer.setPatId(patid);
-        serviceSubtaskAnswer.setScriptid(ivrLibaTemplateScriptVO.getId());
-        serviceSubtaskAnswer.setScriptType(Long.valueOf(ivrLibaTemplateScriptVO.getScriptType()));
-        serviceSubtaskAnswer.setAnswer(dx.substring(1));
+        serviceSubtaskAnswer.setScriptid(ivrTaskTemplateScriptVO.getId());
+        serviceSubtaskAnswer.setScriptType(Long.valueOf(ivrTaskTemplateScriptVO.getScriptType()));
+        serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList));
         serviceSubtaskAnswer.setComment(null);
         serviceSubtaskAnswer.setCreateTime(new Date());
         serviceSubtaskAnswer.setUpdateTime(new Date());
         serviceSubtaskAnswerMapper.insertServiceSubtaskAnswer(serviceSubtaskAnswer);
     }
 
-    private void setWJInfo(SvyLibTemplateScriptVO svyLibTemplateScriptVO, Long taskid, Long patid) {
+    private void setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid) {
         ServiceSubtaskAnswer serviceSubtaskAnswer = null;
-        String dx = "";
-        if (svyLibTemplateScriptVO.getScriptType().equals("1") || svyLibTemplateScriptVO.getScriptType().equals("2")) {
+        List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>();
+        if (svyTaskTemplateScriptVO.getScriptType().equals("1") || svyTaskTemplateScriptVO.getScriptType().equals("2")) {
             //1銆�2涓哄崟閫夋垨澶氶��
-            for (SvyLibTemplateTargetoption svyLibTemplateTargetoption : svyLibTemplateScriptVO.getSvyLibTemplateTargetoptions()) {
-                //鑾峰彇鐢ㄦ埛閫変腑鐨勯�夐」鍙�
-                dx = dx + "," + svyLibTemplateTargetoption.getOptionNo().toString();
+            for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()) {
+                if (svyTaskTemplateTargetoption.getIsUserOperation() == true) {
+                    ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
+                    serviceSubtaskOptionAnswer.setId(svyTaskTemplateTargetoption.getId());
+                    serviceSubtaskOptionAnswer.setCode(svyTaskTemplateTargetoption.getOptionCode());
+                    serviceSubtaskOptionAnswer.setValue(svyTaskTemplateTargetoption.getTargetvalue());
+                    serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateTargetoption.getAppenddesc());
+                    answerList.add(serviceSubtaskOptionAnswer);
+                }
             }
         } else {
             //闈炲崟澶氶��
-            if (CollectionUtils.isNotEmpty(svyLibTemplateScriptVO.getSvyLibTemplateTargetoptions())) {
-                dx = svyLibTemplateScriptVO.getSvyLibTemplateTargetoptions().get(0).getAppenddesc();
+            if (CollectionUtils.isNotEmpty(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions())) {
+                ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
+                serviceSubtaskOptionAnswer.setId(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getId());
+                serviceSubtaskOptionAnswer.setCode(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getOptionCode());
+                serviceSubtaskOptionAnswer.setValue(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getTargetvalue());
+                serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getAppenddesc());
+                answerList.add(serviceSubtaskOptionAnswer);
             }
         }
         serviceSubtaskAnswer.setTaskid(Long.valueOf(taskid));
         serviceSubtaskAnswer.setPatId(Long.valueOf(patid));
-        serviceSubtaskAnswer.setScriptid(svyLibTemplateScriptVO.getId());
-        serviceSubtaskAnswer.setScriptType(Long.valueOf(svyLibTemplateScriptVO.getScriptType()));
-        serviceSubtaskAnswer.setAnswer(dx.substring(1));
+        serviceSubtaskAnswer.setScriptid(svyTaskTemplateScriptVO.getId());
+        serviceSubtaskAnswer.setScriptType(Long.valueOf(svyTaskTemplateScriptVO.getScriptType()));
+        serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList));
         serviceSubtaskAnswer.setComment(null);
         serviceSubtaskAnswer.setCreateTime(new Date());
         serviceSubtaskAnswer.setUpdateTime(new Date());
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 8dccacc..5948885 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
@@ -1,7 +1,6 @@
 package com.smartor.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.DtoConversionUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.smartor.domain.*;
 import com.smartor.mapper.*;
@@ -30,8 +29,6 @@
 public class SvyLibTemplateServiceImpl implements ISvyLibTemplateService {
     @Autowired
     private SvyLibTemplateMapper svyLibTemplateMapper;
-    @Autowired
-    private Icd10AssociationMapper icd10AssociationMapper;
     @Autowired
     private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper;
     @Autowired
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 fbcb8e1..8a1a5b8 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskTemplateServiceImpl.java
@@ -174,9 +174,9 @@
 
         //閫氳繃璇濇湳ID鑾峰彇閫夐」
         for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : svyTaskTemplateScriptVOS) {
-            log.info("svyLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", svyTaskTemplateScriptVO.getID());
+            log.info("svyLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", svyTaskTemplateScriptVO.getId());
             SvyTaskTemplateTargetoption svyTaskTemplateTargetoption = new SvyTaskTemplateTargetoption();
-            svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScriptVO.getID());
+            svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScriptVO.getId());
             List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption);
             for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption1 : svyTaskTemplateTargetoptions) {
                 ObjectMapper mapper = new ObjectMapper();
@@ -221,11 +221,11 @@
             svyTaskTemplateScriptMapper.updateSvyTaskTemplateScript(svyTaskTemplateScript);
             svyTaskTemplateScript.setIsoperation(2);
         } else if (isoperation == 3) {
-            if (svyTaskTemplateScriptVO.getID() == null) {
+            if (svyTaskTemplateScriptVO.getId() == null) {
                 log.info("鍒犻櫎澶辫触,妯℃澘璇濇湳id涓虹┖");
             } else {
                 svyTaskTemplateScriptVO.setUpdateTime(new Date());
-                svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getID());
+                svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getId());
             }
         }
         return svyTaskTemplateScript;
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
index dd1592a..c5afd34 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
@@ -1,83 +1,106 @@
 <?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.IvrTaskTemplateScriptMapper">
 
     <resultMap type="com.smartor.domain.IvrTaskTemplateScript" id="IvrTaskTemplateScriptResult">
-        <result property="id"    column="id"    />
-        <result property="taskid"    column="taskid"    />
-        <result property="templateID"    column="templateID"    />
-        <result property="questionPoint"    column="questionPoint"    />
-        <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="categoryName"    column="categoryName"    />
-        <result property="targetOptions"    column="targetOptions"    />
-        <result property="language"    column="language"    />
-        <result property="playWavOnly"    column="playWavOnly"    />
-        <result property="valueType"    column="value_type"    />
-        <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="targettype"    column="targettype"    />
-        <result property="targetid"    column="targetid"    />
-        <result property="targetvalue"    column="targetvalue"    />
-        <result property="otherdata"    column="otherdata"    />
-        <result property="isMust"    column="is_must"    />
-        <result property="questionResult"    column="question_result"    />
+        <result property="id" column="id"/>
+        <result property="taskid" column="taskid"/>
+        <result property="templateID" column="templateID"/>
+        <result property="questionPoint" column="questionPoint"/>
+        <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="categoryName" column="categoryName"/>
+        <result property="targetOptions" column="targetOptions"/>
+        <result property="language" column="language"/>
+        <result property="playWavOnly" column="playWavOnly"/>
+        <result property="valueType" column="value_type"/>
+        <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="targettype" column="targettype"/>
+        <result property="targetid" column="targetid"/>
+        <result property="targetvalue" column="targetvalue"/>
+        <result property="otherdata" column="otherdata"/>
+        <result property="isMust" column="is_must"/>
+        <result property="questionResult" column="question_result"/>
         <result property="branchFlag" column="branch_flag"/>
         <result property="branchNextscriptno" column="branch_nextscriptno"/>
+        <result property="scriptType" column="script_type"/>
     </resultMap>
 
     <sql id="selectIvrTaskTemplateScriptVo">
-        select id, taskid,branch_flag,branch_nextscriptno,  templateID, questionPoint,  noMatchText, noMatchVoice, slienceText, slienceVoice, submoduleText, submoduleVoice, noClearlyText, noClearlyVoice, categoryName, targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue,  otherdata, is_must, question_result from ivr_task_template_script
+        select id,
+               taskid,
+               script_type,
+               branch_flag,
+               branch_nextscriptno,
+               templateID,
+               questionPoint,
+               noMatchText,
+               noMatchVoice,
+               slienceText,
+               slienceVoice,
+               submoduleText,
+               submoduleVoice,
+               noClearlyText,
+               noClearlyVoice,
+               categoryName,
+               targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue, otherdata, is_must, question_result
+        from ivr_task_template_script
     </sql>
 
-    <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript" resultMap="IvrTaskTemplateScriptResult">
+    <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript"
+            resultMap="IvrTaskTemplateScriptResult">
         <include refid="selectIvrTaskTemplateScriptVo"/>
         <where>
-            <if test="taskid != null "> and taskid = #{taskid}</if>
-            <if test="templateID != null "> and templateID = #{templateID}</if>
-            <if test="questionPoint != null  and questionPoint != ''"> and questionPoint = #{questionPoint}</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="categoryName != null  and categoryName != ''"> and categoryName like concat('%', #{categoryName}, '%')</if>
-            <if test="targetOptions != null  and targetOptions != ''"> and targetOptions = #{targetOptions}</if>
-            <if test="language != null  and language != ''"> and language = #{language}</if>
-            <if test="playWavOnly != null "> and playWavOnly = #{playWavOnly}</if>
-            <if test="valueType != null "> and value_type = #{valueType}</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="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="otherdata != null  and otherdata != ''"> and otherdata = #{otherdata}</if>
-            <if test="isMust != null  and isMust != ''"> and is_must = #{isMust}</if>
-            <if test="questionResult != null  and questionResult != ''"> and question_result = #{questionResult}</if>
+            <if test="taskid != null ">and taskid = #{taskid}</if>
+            <if test="templateID != null ">and templateID = #{templateID}</if>
+            <if test="questionPoint != null  and questionPoint != ''">and questionPoint = #{questionPoint}</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="categoryName != null  and categoryName != ''">and categoryName like concat('%', #{categoryName},
+                '%')
+            </if>
+            <if test="targetOptions != null  and targetOptions != ''">and targetOptions = #{targetOptions}</if>
+            <if test="language != null  and language != ''">and language = #{language}</if>
+            <if test="playWavOnly != null ">and playWavOnly = #{playWavOnly}</if>
+            <if test="valueType != null ">and value_type = #{valueType}</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="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="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
+            <if test="isMust != null  and isMust != ''">and is_must = #{isMust}</if>
+            <if test="questionResult != null  and questionResult != ''">and question_result = #{questionResult}</if>
             <if test="branchFlag != null  and branchFlag != ''">and branch_flag = #{branchFlag}</if>
-            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno = #{branchNextscriptno}
+            <if test="scriptType != null  and scriptType != ''">and script_type = #{scriptType}</if>
+            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
+                #{branchNextscriptno}
             </if>
         </where>
     </select>
@@ -87,7 +110,8 @@
         where id = #{id}
     </select>
 
-    <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript"
+            useGeneratedKeys="true" keyProperty="id">
         insert into ivr_task_template_script
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="taskid != null">taskid,</if>
@@ -124,7 +148,8 @@
             <if test="questionResult != null">question_result,</if>
             <if test="branchFlag != null  and branchFlag != ''">branch_flag,</if>
             <if test="branchNextscriptno != null  and branchNextscriptno != ''">branch_nextscriptno,</if>
-         </trim>
+            <if test="scriptType != null  and scriptType != ''">script_type,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskid != null">#{taskid},</if>
             <if test="templateID != null">#{templateID},</if>
@@ -160,7 +185,8 @@
             <if test="questionResult != null">#{questionResult},</if>
             <if test="branchFlag != null  and branchFlag != ''">#{branchFlag},</if>
             <if test="branchNextscriptno != null  and branchNextscriptno != ''">#{branchNextscriptno},</if>
-         </trim>
+            <if test="scriptType != null  and scriptType != ''">#{scriptType},</if>
+        </trim>
     </insert>
 
     <update id="updateIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript">
@@ -202,12 +228,15 @@
             <if test="branchNextscriptno != null  and branchNextscriptno != ''">branch_nextscriptno =
                 #{branchNextscriptno},
             </if>
+            <if test="scriptType != null  and scriptType != ''">script_type = #{scriptType},</if>
         </trim>
         where id = #{id}
     </update>
 
     <delete id="deleteIvrTaskTemplateScriptByID" parameterType="Long">
-        delete from ivr_task_template_script where ID = #{ID}
+        delete
+        from ivr_task_template_script
+        where ID = #{ID}
     </delete>
 
     <delete id="deleteIvrTaskTemplateScriptByIDs" parameterType="String">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
index 43939eb..4cac445 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
@@ -36,13 +36,17 @@
         <result property="nodynamiccruxsJson" column="nodynamiccruxs"/>
         <result property="dynamiccruxsJson" column="dynamiccruxs"/>
         <result property="nextQuestion" column="next_question"/>
+        <result property="appenddesc" column="appenddesc"/>
+        <result property="optionCode" column="option_code"/>
     </resultMap>
 
     <sql id="selectIvrTaskTemplateTargetoptionVo">
         select id,
                taskid,
                templateID,
+               appenddesc,
                targetid,
+               option_code,
                targetname,
                targettype,
                categoryName,
@@ -86,6 +90,8 @@
             </if>
             <if test="dynamiccruxsJson != null  and dynamiccruxsJson != ''">and dynamiccruxs = #{dynamiccruxsJson}</if>
             <if test="nextQuestion != null ">and next_question = #{nextQuestion}</if>
+            <if test="appenddesc != null ">and appenddesc = #{appenddesc}</if>
+            <if test="optionCode != null ">and option_code = #{optionCode}</if>
         </where>
     </select>
 
@@ -129,6 +135,8 @@
             <if test="nodynamiccruxsJson != null">nodynamiccruxs,</if>
             <if test="dynamiccruxsJson != null">dynamiccruxs,</if>
             <if test="nextQuestion != null">next_question,</if>
+            <if test="appenddesc != null">appenddesc,</if>
+            <if test="optionCode != null ">option_code,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskid != null">#{taskid},</if>
@@ -161,6 +169,8 @@
             <if test="nodynamiccruxsJson != null">#{nodynamiccruxsJson},</if>
             <if test="dynamiccruxsJson != null">#{dynamiccruxsJson},</if>
             <if test="nextQuestion != null">#{nextQuestion},</if>
+            <if test="appenddesc != null">#{appenddesc},</if>
+            <if test="optionCode != null ">#{optionCode},</if>
         </trim>
     </insert>
 
@@ -197,6 +207,8 @@
             <if test="nodynamiccruxsJson != null">nodynamiccruxs = #{nodynamiccruxsJson},</if>
             <if test="dynamiccruxsJson != null">dynamiccruxs = #{dynamiccruxsJson},</if>
             <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
+            <if test="appenddesc != null">appenddesc = #{appenddesc},</if>
+            <if test="optionCode != null ">option_code = #{optionCode},</if>
         </trim>
         where id = #{id}
     </update>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index f0eb828..78c168a 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -169,12 +169,12 @@
         <!--        </trim>-->
 
         insert into
-        pat_archive(name,viptype,sex,idcardno,birthdate,birthplace,place_of_residence,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
-        ,create_by,create_time,isupload,upload_time,pattype,place_of_residence,nation,birthplace,native_place) values
+        pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
+        ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place) values
         <foreach item="item" index="index" collection="list" separator=",">
-            (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.birthplace},#{item.placeOfResidence},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby}
+            (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby}
             ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy},
-            #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.placeOfResidence},#{item.nation},#{item.birthplace},#{item.nativePlace}
+            #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace}
             )
         </foreach>
     </insert>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
index a10ef14..e7bb891 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
@@ -13,8 +13,8 @@
         <result property="score" column="score"/>
         <result property="answer" column="answer"/>
         <result property="comment" column="comment"/>
-        <result property="istrack" column="istrack"/>
-        <result property="isabnormal" column="isabnormal"/>
+        <result property="trackFlag" column="trackFlag"/>
+        <result property="warningFlag" column="warning_flag"/>
         <result property="delFlag" column="del_flag"/>
         <result property="createBy" column="create_by"/>
         <result property="createTime" column="create_time"/>
@@ -24,19 +24,21 @@
         <result property="uploadTime" column="upload_time"/>
         <result property="pid" column="pid"/>
         <result property="guid" column="guid"/>
+        <result property="answerps" column="answerps"/>
     </resultMap>
 
     <sql id="selectServiceSubtaskAnswerVo">
         select id,
                taskid,
+               answerps,
                pat_id,
                scriptid,
                script_type,
                score,
                answer,
                comment,
-               istrack,
-               isabnormal,
+               track_flag,
+               warning_flag,
                del_flag,
                create_by,
                create_time,
@@ -60,12 +62,13 @@
             <if test="score != null  and score != ''">and score = #{score}</if>
             <if test="answer != null  and answer != ''">and answer = #{answer}</if>
             <if test="comment != null  and comment != ''">and comment = #{comment}</if>
-            <if test="istrack != null  and istrack != ''">and istrack = #{istrack}</if>
-            <if test="isabnormal != null  and isabnormal != ''">and isabnormal = #{isabnormal}</if>
+            <if test="trackFlag != null  and trackFlag != ''">and track_flag = #{trackFlag}</if>
+            <if test="warningFlag != null  and warningFlag != ''">and warning_flag = #{warningFlag}</if>
             <if test="isupload != null ">and isupload = #{isupload}</if>
             <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
             <if test="pid != null  and pid != ''">and pid = #{pid}</if>
             <if test="guid != null  and guid != ''">and guid = #{guid}</if>
+            <if test="answerps != null  and answerps != ''">and answerps = #{answerps}</if>
         </where>
     </select>
 
@@ -85,8 +88,8 @@
             <if test="score != null">score,</if>
             <if test="answer != null">answer,</if>
             <if test="comment != null">comment,</if>
-            <if test="istrack != null">istrack,</if>
-            <if test="isabnormal != null">isabnormal,</if>
+            <if test="trackFlag != null">track_flag,</if>
+            <if test="warningFlag != null">warning_flag,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -96,6 +99,7 @@
             <if test="uploadTime != null">upload_time,</if>
             <if test="pid != null">pid,</if>
             <if test="guid != null">guid,</if>
+            <if test="answerps != null">answerps,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskid != null">#{taskid},</if>
@@ -105,8 +109,8 @@
             <if test="score != null">#{score},</if>
             <if test="answer != null">#{answer},</if>
             <if test="comment != null">#{comment},</if>
-            <if test="istrack != null">#{istrack},</if>
-            <if test="isabnormal != null">#{isabnormal},</if>
+            <if test="trackFlag != null">#{trackFlag},</if>
+            <if test="warningFlag != null">#{warningFlag},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -116,6 +120,7 @@
             <if test="uploadTime != null">#{uploadTime},</if>
             <if test="pid != null">#{pid},</if>
             <if test="guid != null">#{guid},</if>
+            <if test="answerps != null">#{answerps},</if>
         </trim>
     </insert>
 
@@ -129,8 +134,8 @@
             <if test="score != null">score = #{score},</if>
             <if test="answer != null">answer = #{answer},</if>
             <if test="comment != null">comment = #{comment},</if>
-            <if test="istrack != null">istrack = #{istrack},</if>
-            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
+            <if test="trackFlag != null">track_flag = #{trackFlag},</if>
+            <if test="warningFlag != null">warning_flag = #{warningFlag},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
@@ -140,6 +145,7 @@
             <if test="uploadTime != null">upload_time = #{uploadTime},</if>
             <if test="pid != null">pid = #{pid},</if>
             <if test="guid != null">guid = #{guid},</if>
+            <if test="answerps != null">answerps = #{answerps},</if>
         </trim>
         where id = #{id}
     </update>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
index e7b6a7a..a8c516e 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -27,7 +27,7 @@
         <result property="guid" column="guid"/>
         <result property="valueType" column="value_type"/>
         <result property="targetOptions" column="targetOptions"/>
-        <result property="targettype" column="targettype"/>
+        <result property="scriptType" column="script_type"/>
         <result property="targetid" column="targetid"/>
         <result property="targetvalue" column="targetvalue"/>
         <result property="nextScriptno" column="next_scriptno"/>
@@ -51,7 +51,7 @@
                scriptno,
                templateID,
                scriptid,
-               script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetOptions, targettype, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path
+               script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetOptions, script_type, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path
         from svy_task_template_script
     </sql>
 
@@ -77,7 +77,7 @@
             <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="scriptType != null  and scriptType != ''">and script_type = #{scriptType}</if>
             <if test="targetid != null ">and targetid = #{targetid}</if>
             <if test="targetvalue != null  and targetvalue != ''">and targetvalue = #{targetvalue}</if>
             <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if>
@@ -122,7 +122,7 @@
             <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="scriptType != null">script_type,</if>
             <if test="targetid != null">targetid,</if>
             <if test="targetvalue != null">targetvalue,</if>
             <if test="nextScriptno != null">next_scriptno,</if>
@@ -156,7 +156,7 @@
             <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="scriptType != null">#{scriptType},</if>
             <if test="targetid != null">#{targetid},</if>
             <if test="targetvalue != null">#{targetvalue},</if>
             <if test="nextScriptno != null">#{nextScriptno},</if>
@@ -194,7 +194,7 @@
             <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="scriptType != null">script_type = #{scriptType},</if>
             <if test="targetid != null">targetid = #{targetid},</if>
             <if test="targetvalue != null">targetvalue = #{targetvalue},</if>
             <if test="nextScriptno != null">next_scriptno = #{nextScriptno},</if>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
index e42a465..f0cf721 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
@@ -1,86 +1,111 @@
 <?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.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="optioncontent"    column="optioncontent"    />
-        <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"    />
+        <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="optioncontent" column="optioncontent"/>
+        <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"/>
+        <result property="optionCode" column="option_code"/>
+        <result property="appendflag" column="appendflag"/>
+        <result property="appenddesc" column="appenddesc"/>
     </resultMap>
 
     <sql id="selectSvyTaskTemplateTargetoptionVo">
-        select id, taskid, templateID, targetid, targetname, targettype, categoryName, targetvalue, targetregex2, targetregex, optioncontent, 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
+        select id,
+               option_code,
+               appendflag,
+               appenddesc,
+               taskid,
+               templateID,
+               targetid,
+               targetname,
+               targettype,
+               categoryName,
+               targetvalue,
+               targetregex2,
+               targetregex,
+               optioncontent, 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="com.smartor.domain.SvyTaskTemplateTargetoption" resultMap="SvyTaskTemplateTargetoptionResult">
+    <select id="selectSvyTaskTemplateTargetoptionList" parameterType="com.smartor.domain.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="optioncontent != null  and optioncontent != ''"> and optioncontent = #{optioncontent}</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>
+            <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="optioncontent != null  and optioncontent != ''">and optioncontent = #{optioncontent}</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>
+            <if test="optionCode != null">and option_code = #{optionCode}</if>
+            <if test="appendflag != null">and appendflag = #{appendflag}</if>
+            <if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
         </where>
     </select>
 
-    <select id="selectSvyTaskTemplateTargetoptionById" parameterType="Long" resultMap="SvyTaskTemplateTargetoptionResult">
+    <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 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>
@@ -114,7 +139,11 @@
             <if test="dynamiccruxs != null">dynamiccruxs,</if>
             <if test="nextQuestion != null">next_question,</if>
             <if test="picturePath != null">picture_path,</if>
-         </trim>
+            <if test="optionCode != null">option_code,</if>
+            <if test="appendflag != null">appendflag,</if>
+            <if test="appenddesc != null">appenddesc,</if>
+
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskid != null">#{taskid},</if>
             <if test="templateID != null">#{templateID},</if>
@@ -147,7 +176,11 @@
             <if test="dynamiccruxs != null">#{dynamiccruxsJson},</if>
             <if test="nextQuestion != null">#{nextQuestion},</if>
             <if test="picturePath != null">#{picturePath},</if>
-         </trim>
+            <if test="optionCode != null">#{optionCode}</if>
+            <if test="appendflag != null">#{appendflag}</if>
+            <if test="appenddesc != null">#{appenddesc}</if>
+
+        </trim>
     </insert>
 
     <update id="updateSvyTaskTemplateTargetoption" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption">
@@ -184,12 +217,17 @@
             <if test="dynamiccruxs != null">dynamiccruxs = #{dynamiccruxsJson},</if>
             <if test="nextQuestion != null">next_question = #{nextQuestion},</if>
             <if test="picturePath != null">picture_path = #{picturePath},</if>
+            <if test="optionCode != null">option_code = #{optionCode},</if>
+            <if test="appendflag != null">appendflag = #{appendflag},</if>
+            <if test="appenddesc != null">appenddesc = #{appenddesc},</if>
         </trim>
         where id = #{id}
     </update>
 
     <delete id="deleteSvyTaskTemplateTargetoptionById" parameterType="Long">
-        delete from svy_task_template_targetoption where id = #{id}
+        delete
+        from svy_task_template_targetoption
+        where id = #{id}
     </delete>
 
     <delete id="deleteSvyTaskTemplateTargetoptionByIds" parameterType="String">

--
Gitblit v1.9.3