From 5d1d54e83546ba9fc85c69b32287883d04f4a475 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 01 十一月 2024 18:56:13 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java                |    3 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java      |   78 ++-
 smartor/src/main/java/WebServiceClient/MessagingInsertSoap_PortType.java                 |   12 
 smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java                |    3 
 smartor/src/main/java/WebServiceClient/MessagingInsert.asmx                              |   66 ++++
 smartor/src/main/java/com/smartor/domain/SocketMessage.java                              |    2 
 smartor/src/main/java/WebServiceClient/MessagingInsert.java                              |   21 +
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java            |   79 +++-
 smartor/src/main/java/com/smartor/domain/QuestionMessagePhone.java                       |   28 +
 smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml                  |    6 
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml                 |    7 
 smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml          |    7 
 smartor/src/main/java/WebServiceClient/MessagingInsertTestCase.java                      |   65 ++++
 smartor/src/main/java/WebServiceClient/MessagingInsertSoap_BindingStub.java              |  138 ++++++++
 smartor/src/main/java/com/smartor/domain/IvrLibaScriptTargetoption.java                  |    3 
 smartor/src/main/java/WebServiceClient/MessagingInsertLocator.java                       |  202 ++++++++++++
 smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java                    |    3 
 smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml          |    6 
 smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java                       |    3 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java |   22 +
 smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java                        |    3 
 ruoyi-admin/src/main/resources/application-druid.yml                                     |    2 
 smartor/src/main/java/WebServiceClient/MessagingInsertSoap12Stub.java                    |  136 ++++++++
 smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java          |   18 
 smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml            |    6 
 25 files changed, 851 insertions(+), 68 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 fae4378..4f31ebc 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
@@ -139,7 +139,6 @@
                 //鐢ㄦ潵杩斿洖褰撳墠闇�瑕侀棶鐨勯棶棰樹俊鎭�
                 QuestionMessagePhone returnQues = new QuestionMessagePhone();
 
-
                 for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOList) {
                     if (ivrLibaTemplateScriptVO.getSort() == ivrLibaTemplateVO1.getFirstQuestionNum().intValue())
                         //鑾峰彇绗竴棰樼殑闂
@@ -180,23 +179,25 @@
                         backQuset.add(ivrLibaTemplateScriptVO);
                         redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES);
 
-                        //濡傛灉鍑犳閮芥病鍝嶅簲锛屽氨涓嬩竴棰橈紙闇�瑕佸厛鍒ゆ柇鏄惁鏈変笅涓�棰橈級
-                        if (ivrLibaTemplateScriptVO.getSort() == 0) {
-                            //濡傛灉涓嬩竴棰樻病鏈変簡锛屽氨缁撴潫浜�
-                            QuestionMessagePhone returnQues = new QuestionMessagePhone();
-//                            returnQues.setCode(null);
-                            List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
-                            returnQues.setContent(JSON.toJSONString(backQusetRedis));
-                            returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
-                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
-                            redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
+//                        //濡傛灉鍑犳閮芥病鍝嶅簲锛屽氨涓嬩竴棰橈紙闇�瑕佸厛鍒ゆ柇鏄惁鏈変笅涓�棰橈級
+//                        if (ivrLibaTemplateScriptVO.getSort() == 0) {
+                        //濡傛灉涓嬩竴棰樻病鏈変簡锛屽氨缁撴潫浜�
 
-                        } else {
-                            //濡傛灉鏈変笅涓�棰橈紝灏辨牴鎹綋鍓峵eagetID+1 鑾峰彇涓嬩竴棰�
-                            QuestionMessagePhone returnQues = getNextQuestion(ivrLibaTemplateScriptVOList, ivrLibaTemplateScriptVO);
-                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
-                            redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
-                        }
+                        //娌℃湁鍝嶅簲锛屽氨缁撴潫浜�
+                        QuestionMessagePhone returnQues = new QuestionMessagePhone();
+//                            returnQues.setCode(null);
+                        List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
+                        returnQues.setContent(JSON.toJSONString(backQusetRedis));
+                        returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
+                        redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
+                        redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
+
+//                        } else {
+//                            //濡傛灉鏈変笅涓�棰橈紝灏辨牴鎹綋鍓峵eagetID+1 鑾峰彇涓嬩竴棰�
+//                            QuestionMessagePhone returnQues = getNextQuestion(ivrLibaTemplateScriptVOList, ivrLibaTemplateScriptVO);
+//                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
+//                            redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
+//                        }
                     } else {
                         //瀹為檯闈欓粯娆℃暟鏄惁 涓嶇瓑浜� 妯℃澘涓厤缃殑娆℃暟
 //                        QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues");
@@ -206,10 +207,10 @@
                         Integer noVoice2 = redisCache.getCacheObject(userId + "noVoice");
                         noVoice2 = noVoice2 + 1;
 
-                        //缁欓棶棰樺姞涓婃棤鍖归厤璇濇湳
+                        //缁欓棶棰樺姞涓婇潤榛樿瘽鏈�
                         QuestionMessagePhone returnQues = redisCache.getCacheObject(userId + "returnQues");
                         IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
-                        boolean contains = nowQuestion.getScriptContent().contains(nowQuestion.getNoMatchText());
+                        boolean contains = nowQuestion.getScriptContent().contains(nowQuestion.getSlienceText());
                         if (!contains) {
                             String scriptContent = nowQuestion.getSlienceText() + "," + nowQuestion.getScriptContent();
                             nowQuestion.setScriptContent(scriptContent);
@@ -321,7 +322,11 @@
                             }
                             log.info("==============================Targetregex鐨勫�间负锛歿},   Targetregex2鐨勫�间负锛歿}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
 
-                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
+                            if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() &&
+                                    StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() ||
+                                    StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) &&
+                                            StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) &&
+                                            matcher.matches()) {
                                 log.error("鍖归厤姝g‘浜�");
                                 //璇存槑鍖归厤姝g‘浜�
                                 ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(1);
@@ -331,10 +336,9 @@
                                 redisCache.setCacheObject(userId + "backQuset", backQuset, 120, TimeUnit.MINUTES);
                                 //灏嗛潤榛樼疆涓�0
                                 redisCache.setCacheObject(userId + "noVoice", 0, 120, TimeUnit.MINUTES);
-                                //鑾峰彇涓嬩竴棰�
-                                Integer nextQuestion = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
-                                if (nextQuestion > ivrLibaTemplateScriptVOList.size()) {
-                                    //濡傛灉涓嬩竴棰樻病鏈変簡锛屽氨缁撴潫浜�
+
+                                //鍒ゆ柇涓�涓嬶紝杩欎釜閫夐」缁撴灉鏄笉鏄繕鏈夌户缁棶涓嬪幓鐨勫繀瑕侊紝渚嬪閫夐」缁撴灉鏄埆浜轰笉鎯崇户缁洖绛旈棶棰橈紝灏辫缁撴潫鎺�
+                                if (ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getIsEnd() == 1) {
                                     QuestionMessagePhone returnQues = new QuestionMessagePhone();
                                     List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
                                     returnQues.setContent(JSON.toJSONString(backQusetRedis));
@@ -342,16 +346,28 @@
                                     redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
                                     redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
                                 } else {
-                                    for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) {
-                                        if (script.getSort() == nextQuestion) {
-                                            QuestionMessagePhone returnQues = new QuestionMessagePhone();
-                                            returnQues.setNowQuestion(script);
-                                            redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
-                                            break;
+                                    //鑾峰彇涓嬩竴棰�
+                                    Integer nextQuestion = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
+                                    if (nextQuestion > ivrLibaTemplateScriptVOList.size()) {
+                                        //濡傛灉涓嬩竴棰樻病鏈変簡锛屽氨缁撴潫浜�
+                                        QuestionMessagePhone returnQues = new QuestionMessagePhone();
+                                        List<IvrLibaTemplateScriptVO> backQusetRedis = redisCache.getCacheObject(userId + "backQuset");
+                                        returnQues.setContent(JSON.toJSONString(backQusetRedis));
+                                        returnQues.setJsy(ivrLibaTemplateVO1.getRevisitAfter());
+                                        redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
+                                        redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
+                                    } else {
+                                        for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) {
+                                            if (script.getSort() == nextQuestion) {
+                                                QuestionMessagePhone returnQues = new QuestionMessagePhone();
+                                                returnQues.setNowQuestion(script);
+                                                redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
+                                                break;
+                                            }
                                         }
                                     }
+                                    break;
                                 }
-                                break;
                             } else {
                                 log.error("鏃犲尮閰�");
                                 //娌℃湁鍖归厤鍒�
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index 064bc94..14cda92 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -155,14 +155,14 @@
     }
 
     /**
-     *  鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)
+     * 鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划)
      */
-    @ApiOperation("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)")
+    @ApiOperation("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划)")
     @PostMapping("/taskPull")
     public List<PullTaskVO> taskPull() {
-        log.error("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)");
+        log.error("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划)");
         List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull();
-        log.error("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划):{}", pullTaskVOList);
+        log.error("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划):{}", pullTaskVOList);
         return pullTaskVOList;
     }
 
@@ -178,9 +178,19 @@
     /**
      * 閫氳瘽璁板綍鍥炶皟
      */
-    @ApiOperation("閫氳瘽璁板綍鍥炶皟")
+    @ApiOperation("閫氳瘽璁板綍鍥炶皟(涓婃捣)")
+    @PostMapping("/recordAcceptshanghai")
+    public AjaxResult recordAccepshanghait(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) {
+        return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
+    }
+
+    /**
+     * 閫氳瘽璁板綍鍥炶皟
+     */
+    @ApiOperation("閫氳瘽璁板綍鍥炶皟(闆ㄧ划)")
     @PostMapping("/recordAccept")
-    public AjaxResult recordAccept(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) {
+    public AjaxResult recordAccept(@RequestBody PhoneCallRecordVO phoneCallRecordVO) {
+        log.error("閫氳瘽璁板綍鍥炶皟(闆ㄧ划):{}", phoneCallRecordVO);
 //        return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
         return success();
     }
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index 94ed064..141a34a 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -150,7 +150,7 @@
 uploadSwitch: 1
 
 #  鎸囧畾asr鍥炶皟鐨剈rl璺緞
-ASRCallBackPath: http://192.168.2.13:8095/smartor/serviceSubtask/phoneCallBackYQ
+ASRCallBackPath: http://192.168.2.10:8095/smartor/serviceSubtask/phoneCallBackYQ
 #鎸傛柇IP
 hangup: http://192.168.2.10:8091/hangup
 
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsert.asmx b/smartor/src/main/java/WebServiceClient/MessagingInsert.asmx
new file mode 100644
index 0000000..423cb09
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsert.asmx
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
+      <s:element name="SMSMessageAccept">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="xmlReq" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="SMSMessageAcceptResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="1" maxOccurs="1" name="SMSMessageAcceptResult" type="s:int" />
+            <s:element minOccurs="0" maxOccurs="1" name="xmlResp" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+    </s:schema>
+  </wsdl:types>
+  <wsdl:message name="SMSMessageAcceptSoapIn">
+    <wsdl:part name="parameters" element="tns:SMSMessageAccept" />
+  </wsdl:message>
+  <wsdl:message name="SMSMessageAcceptSoapOut">
+    <wsdl:part name="parameters" element="tns:SMSMessageAcceptResponse" />
+  </wsdl:message>
+  <wsdl:portType name="MessagingInsertSoap">
+    <wsdl:operation name="SMSMessageAccept">
+      <wsdl:input message="tns:SMSMessageAcceptSoapIn" />
+      <wsdl:output message="tns:SMSMessageAcceptSoapOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="MessagingInsertSoap" type="tns:MessagingInsertSoap">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="SMSMessageAccept">
+      <soap:operation soapAction="http://tempuri.org/SMSMessageAccept" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="MessagingInsertSoap12" type="tns:MessagingInsertSoap">
+    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="SMSMessageAccept">
+      <soap12:operation soapAction="http://tempuri.org/SMSMessageAccept" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="MessagingInsert">
+    <wsdl:port name="MessagingInsertSoap" binding="tns:MessagingInsertSoap">
+      <soap:address location="http://218.108.11.29:8081/MessagingInsert.asmx" />
+    </wsdl:port>
+    <wsdl:port name="MessagingInsertSoap12" binding="tns:MessagingInsertSoap12">
+      <soap12:address location="http://218.108.11.29:8081/MessagingInsert.asmx" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsert.java b/smartor/src/main/java/WebServiceClient/MessagingInsert.java
new file mode 100644
index 0000000..bf446d3
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsert.java
@@ -0,0 +1,21 @@
+/**
+ * MessagingInsert.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package WebServiceClient;
+
+public interface MessagingInsert extends javax.xml.rpc.Service {
+    public String getMessagingInsertSoap12Address();
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap12() throws javax.xml.rpc.ServiceException;
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap12(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+    public String getMessagingInsertSoapAddress();
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap() throws javax.xml.rpc.ServiceException;
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsertLocator.java b/smartor/src/main/java/WebServiceClient/MessagingInsertLocator.java
new file mode 100644
index 0000000..2c52b13
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsertLocator.java
@@ -0,0 +1,202 @@
+/**
+ * MessagingInsertLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package WebServiceClient;
+
+public class MessagingInsertLocator extends org.apache.axis.client.Service implements MessagingInsert {
+
+    public MessagingInsertLocator() {
+    }
+
+
+    public MessagingInsertLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public MessagingInsertLocator(String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for MessagingInsertSoap12
+    private String MessagingInsertSoap12_address = "http://218.108.11.29:8081/MessagingInsert.asmx";
+
+    public String getMessagingInsertSoap12Address() {
+        return MessagingInsertSoap12_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private String MessagingInsertSoap12WSDDServiceName = "MessagingInsertSoap12";
+
+    public String getMessagingInsertSoap12WSDDServiceName() {
+        return MessagingInsertSoap12WSDDServiceName;
+    }
+
+    public void setMessagingInsertSoap12WSDDServiceName(String name) {
+        MessagingInsertSoap12WSDDServiceName = name;
+    }
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap12() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(MessagingInsertSoap12_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getMessagingInsertSoap12(endpoint);
+    }
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap12(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            MessagingInsertSoap12Stub _stub = new MessagingInsertSoap12Stub(portAddress, this);
+            _stub.setPortName(getMessagingInsertSoap12WSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setMessagingInsertSoap12EndpointAddress(String address) {
+        MessagingInsertSoap12_address = address;
+    }
+
+
+    // Use to get a proxy class for MessagingInsertSoap
+    private String MessagingInsertSoap_address = "http://218.108.11.29:8081/MessagingInsert.asmx";
+
+    public String getMessagingInsertSoapAddress() {
+        return MessagingInsertSoap_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private String MessagingInsertSoapWSDDServiceName = "MessagingInsertSoap";
+
+    public String getMessagingInsertSoapWSDDServiceName() {
+        return MessagingInsertSoapWSDDServiceName;
+    }
+
+    public void setMessagingInsertSoapWSDDServiceName(String name) {
+        MessagingInsertSoapWSDDServiceName = name;
+    }
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(MessagingInsertSoap_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getMessagingInsertSoap(endpoint);
+    }
+
+    public MessagingInsertSoap_PortType getMessagingInsertSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            MessagingInsertSoap_BindingStub _stub = new MessagingInsertSoap_BindingStub(portAddress, this);
+            _stub.setPortName(getMessagingInsertSoapWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setMessagingInsertSoapEndpointAddress(String address) {
+        MessagingInsertSoap_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     * This service has multiple ports for a given interface;
+     * the proxy implementation returned may be indeterminate.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (MessagingInsertSoap_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
+                MessagingInsertSoap12Stub _stub = new MessagingInsertSoap12Stub(new java.net.URL(MessagingInsertSoap12_address), this);
+                _stub.setPortName(getMessagingInsertSoap12WSDDServiceName());
+                return _stub;
+            }
+            if (MessagingInsertSoap_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
+                MessagingInsertSoap_BindingStub _stub = new MessagingInsertSoap_BindingStub(new java.net.URL(MessagingInsertSoap_address), this);
+                _stub.setPortName(getMessagingInsertSoapWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        String inputPortName = portName.getLocalPart();
+        if ("MessagingInsertSoap12".equals(inputPortName)) {
+            return getMessagingInsertSoap12();
+        }
+        else if ("MessagingInsertSoap".equals(inputPortName)) {
+            return getMessagingInsertSoap();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://tempuri.org/", "MessagingInsert");
+    }
+
+    private java.util.HashSet ports = null;
+
+    public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://tempuri.org/", "MessagingInsertSoap12"));
+            ports.add(new javax.xml.namespace.QName("http://tempuri.org/", "MessagingInsertSoap"));
+        }
+        return ports.iterator();
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(String portName, String address) throws javax.xml.rpc.ServiceException {
+
+if ("MessagingInsertSoap12".equals(portName)) {
+            setMessagingInsertSoap12EndpointAddress(address);
+        }
+        else
+if ("MessagingInsertSoap".equals(portName)) {
+            setMessagingInsertSoapEndpointAddress(address);
+        }
+        else
+{ // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+
+}
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsertSoap12Stub.java b/smartor/src/main/java/WebServiceClient/MessagingInsertSoap12Stub.java
new file mode 100644
index 0000000..496334e
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsertSoap12Stub.java
@@ -0,0 +1,136 @@
+/**
+ * MessagingInsertSoap12Stub.java
+ * <p>
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package WebServiceClient;
+
+public class MessagingInsertSoap12Stub extends org.apache.axis.client.Stub implements MessagingInsertSoap_PortType {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc[] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[1];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1() {
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("SMSMessageAccept");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tempuri.org/", "xmlReq"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        param.setOmittable(true);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAcceptResult"), org.apache.axis.description.ParameterDesc.OUT, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tempuri.org/", "xmlResp"), org.apache.axis.description.ParameterDesc.OUT, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        param.setOmittable(true);
+        oper.addParameter(param);
+        oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
+        oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
+        oper.setUse(org.apache.axis.constants.Use.LITERAL);
+        _operations[0] = oper;
+
+    }
+
+    public MessagingInsertSoap12Stub() throws org.apache.axis.AxisFault {
+        this(null);
+    }
+
+    public MessagingInsertSoap12Stub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        this(service);
+        super.cachedEndpoint = endpointURL;
+    }
+
+    public MessagingInsertSoap12Stub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service) super.service).setTypeMappingVersion("1.1");
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                String key = (String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            return _call;
+        } catch (Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public Integer SMSMessageAccept(String xmlReq, javax.xml.rpc.holders.IntHolder SMSMessageAcceptResult, javax.xml.rpc.holders.StringHolder xmlResp) throws java.rmi.RemoteException {
+        Integer success = null;
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("http://tempuri.org/SMSMessageAccept");
+        _call.setEncodingStyle(null);
+        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
+        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP12_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAccept"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+        try {
+            Object _resp = _call.invoke(new Object[]{xmlReq});
+
+            if (_resp instanceof java.rmi.RemoteException) {
+                throw (java.rmi.RemoteException) _resp;
+            } else {
+                extractAttachments(_call);
+                java.util.Map _output;
+                _output = _call.getOutputParams();
+                try {
+                    success = ((Integer) _output.get(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAcceptResult"))).intValue();
+                } catch (Exception _exception) {
+                    success = ((Integer) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAcceptResult")), int.class)).intValue();
+                }
+                try {
+                    xmlResp.value = (String) _output.get(new javax.xml.namespace.QName("http://tempuri.org/", "xmlResp"));
+                } catch (Exception _exception) {
+                    xmlResp.value = (String) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("http://tempuri.org/", "xmlResp")), String.class);
+                }
+            }
+        } catch (org.apache.axis.AxisFault axisFaultException) {
+            throw axisFaultException;
+        }
+        return success;
+    }
+
+}
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsertSoap_BindingStub.java b/smartor/src/main/java/WebServiceClient/MessagingInsertSoap_BindingStub.java
new file mode 100644
index 0000000..1d6f833
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsertSoap_BindingStub.java
@@ -0,0 +1,138 @@
+/**
+ * MessagingInsertSoap_BindingStub.java
+ * <p>
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package WebServiceClient;
+
+import org.apache.axis.client.Stub;
+
+public class MessagingInsertSoap_BindingStub extends Stub implements MessagingInsertSoap_PortType {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc[] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[1];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1() {
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("SMSMessageAccept");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tempuri.org/", "xmlReq"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        param.setOmittable(true);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAcceptResult"), org.apache.axis.description.ParameterDesc.OUT, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tempuri.org/", "xmlResp"), org.apache.axis.description.ParameterDesc.OUT, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        param.setOmittable(true);
+        oper.addParameter(param);
+        oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
+        oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
+        oper.setUse(org.apache.axis.constants.Use.LITERAL);
+        _operations[0] = oper;
+
+    }
+
+    public MessagingInsertSoap_BindingStub() throws org.apache.axis.AxisFault {
+        this(null);
+    }
+
+    public MessagingInsertSoap_BindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        this(service);
+        super.cachedEndpoint = endpointURL;
+    }
+
+    public MessagingInsertSoap_BindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service) super.service).setTypeMappingVersion("1.1");
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                String key = (String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            return _call;
+        } catch (Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public Integer SMSMessageAccept(String xmlReq, javax.xml.rpc.holders.IntHolder SMSMessageAcceptResult, javax.xml.rpc.holders.StringHolder xmlResp) throws java.rmi.RemoteException {
+        Integer success = null;
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("http://tempuri.org/SMSMessageAccept");
+        _call.setEncodingStyle(null);
+        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
+        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAccept"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+        try {
+            Object _resp = _call.invoke(new Object[]{xmlReq});
+
+            if (_resp instanceof java.rmi.RemoteException) {
+                throw (java.rmi.RemoteException) _resp;
+            } else {
+                extractAttachments(_call);
+                java.util.Map _output;
+                _output = _call.getOutputParams();
+                try {
+                    success = ((Integer) _output.get(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAcceptResult"))).intValue();
+                } catch (Exception _exception) {
+                    success = ((Integer) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("http://tempuri.org/", "SMSMessageAcceptResult")), int.class)).intValue();
+                }
+                try {
+                    xmlResp.value = (String) _output.get(new javax.xml.namespace.QName("http://tempuri.org/", "xmlResp"));
+                } catch (Exception _exception) {
+                    xmlResp.value = (String) org.apache.axis.utils.JavaUtils.convert(_output.get(new javax.xml.namespace.QName("http://tempuri.org/", "xmlResp")), String.class);
+                }
+            }
+        } catch (org.apache.axis.AxisFault axisFaultException) {
+            throw axisFaultException;
+        }
+        return success;
+    }
+
+}
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsertSoap_PortType.java b/smartor/src/main/java/WebServiceClient/MessagingInsertSoap_PortType.java
new file mode 100644
index 0000000..d1068ed
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsertSoap_PortType.java
@@ -0,0 +1,12 @@
+/**
+ * MessagingInsertSoap_PortType.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package WebServiceClient;
+
+public interface MessagingInsertSoap_PortType extends java.rmi.Remote {
+    public Integer SMSMessageAccept(String xmlReq, javax.xml.rpc.holders.IntHolder SMSMessageAcceptResult, javax.xml.rpc.holders.StringHolder xmlResp) throws java.rmi.RemoteException;
+}
diff --git a/smartor/src/main/java/WebServiceClient/MessagingInsertTestCase.java b/smartor/src/main/java/WebServiceClient/MessagingInsertTestCase.java
new file mode 100644
index 0000000..2576c8c
--- /dev/null
+++ b/smartor/src/main/java/WebServiceClient/MessagingInsertTestCase.java
@@ -0,0 +1,65 @@
+/**
+ * MessagingInsertTestCase.java
+ * <p>
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package WebServiceClient;
+
+public class MessagingInsertTestCase extends junit.framework.TestCase {
+    public MessagingInsertTestCase(String name) {
+        super(name);
+    }
+
+    public void testMessagingInsertSoap12WSDL() throws Exception {
+        javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+        java.net.URL url = new java.net.URL(new MessagingInsertLocator().getMessagingInsertSoap12Address() + "?WSDL");
+        javax.xml.rpc.Service service = serviceFactory.createService(url, new MessagingInsertLocator().getServiceName());
+        assertTrue(service != null);
+    }
+
+    public void test1MessagingInsertSoap12SMSMessageAccept() throws Exception {
+        MessagingInsertSoap12Stub binding;
+        try {
+            binding = (MessagingInsertSoap12Stub) new MessagingInsertLocator().getMessagingInsertSoap12();
+        } catch (javax.xml.rpc.ServiceException jre) {
+            if (jre.getLinkedCause() != null) jre.getLinkedCause().printStackTrace();
+            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+        }
+        assertNotNull("binding is null", binding);
+
+        // Time out after a minute
+        binding.setTimeout(60000);
+
+        // Test operation
+        binding.SMSMessageAccept(new String(), new javax.xml.rpc.holders.IntHolder(), new javax.xml.rpc.holders.StringHolder());
+        // TBD - validate results
+    }
+
+    public void testMessagingInsertSoapWSDL() throws Exception {
+        javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+        java.net.URL url = new java.net.URL(new MessagingInsertLocator().getMessagingInsertSoapAddress() + "?WSDL");
+        javax.xml.rpc.Service service = serviceFactory.createService(url, new MessagingInsertLocator().getServiceName());
+        assertTrue(service != null);
+    }
+
+    public void test2MessagingInsertSoapSMSMessageAccept() throws Exception {
+        MessagingInsertSoap_BindingStub binding;
+        try {
+            binding = (MessagingInsertSoap_BindingStub) new MessagingInsertLocator().getMessagingInsertSoap();
+        } catch (javax.xml.rpc.ServiceException jre) {
+            if (jre.getLinkedCause() != null) jre.getLinkedCause().printStackTrace();
+            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+        }
+        assertNotNull("binding is null", binding);
+
+        // Time out after a minute
+        binding.setTimeout(60000);
+
+        // Test operation
+        binding.SMSMessageAccept(new String(), new javax.xml.rpc.holders.IntHolder(), new javax.xml.rpc.holders.StringHolder());
+        // TBD - validate results
+    }
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaScriptTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrLibaScriptTargetoption.java
index f1690cf..a5f827a 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaScriptTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaScriptTargetoption.java
@@ -215,4 +215,7 @@
     @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
     private Integer isoperation;
 
+    @ApiModelProperty(value = "鏄惁缁撴潫 0锛氫笉缁撴潫   1锛氱粨鏉�")
+    private Integer isEnd;
+
 }
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
index 2e66f28..d1099f7 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTargetoption.java
@@ -198,4 +198,7 @@
     @Excel(name = "pageSize")
     private Integer pageSize;
 
+    @ApiModelProperty(value = "鏄惁缁撴潫 0锛氫笉缁撴潫   1锛氱粨鏉�")
+    private Integer isEnd;
+
 }
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
index 63612d6..adbd77f 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
@@ -242,5 +242,8 @@
     @ApiModelProperty(value = "闄勪欢淇℃伅")
     private String appenddesc;
 
+    @ApiModelProperty(value = "鏄惁缁撴潫 0锛氫笉缁撴潫   1锛氱粨鏉�")
+    private Integer isEnd;
+
 
 }
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
index 9420f17..26cda95 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
@@ -297,6 +297,9 @@
     @ApiModelProperty(value = "闂缁撴灉锛堢粰鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨勶級")
     private String questionResult;
 
+    @ApiModelProperty(value = "閫氱敤搴撳尮閰嶅埌鐨勮瘽鏈�")
+    private String extemplateText;
+
     /**
      * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎
      */
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
index 23b2201..bf5de6d 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
@@ -263,4 +263,7 @@
     @Excel(name = "閫夐」缁彿")
     @ApiModelProperty(value = "閫夐」缁彿")
     private String optionCode;
+
+    @ApiModelProperty(value = "鏄惁缁撴潫 0锛氫笉缁撴潫   1锛氱粨鏉�")
+    private Integer isEnd;
 }
diff --git a/smartor/src/main/java/com/smartor/domain/QuestionMessagePhone.java b/smartor/src/main/java/com/smartor/domain/QuestionMessagePhone.java
new file mode 100644
index 0000000..30a6378
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/QuestionMessagePhone.java
@@ -0,0 +1,28 @@
+package com.smartor.domain;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class QuestionMessagePhone {
+    //    //棰樺彿targetId
+//    private Integer code;
+    //杩斿洖鐨勫唴瀹�
+    private String content;
+
+    //寮�鍦虹櫧(缁欐祴璇曞姛鑳界敤鐨�)
+    private String kcb = null;
+
+    //缁撴潫璇�(缁欐祴璇曞姛鑳界敤鐨�)
+    private String jsy = null;
+
+    //褰撳墠闂
+    private IvrLibaTemplateScriptVO nowQuestion = new IvrLibaTemplateScriptVO();
+
+    //闂娓呭崟
+    private List<IvrLibaTemplateScriptVO> questionList = new ArrayList();
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java
index f7c1fdf..41a6cfd 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java
@@ -159,6 +159,9 @@
     @ApiModelProperty(value = "瀵圭瓟妗堢殑璇勮")
     private String comment;
 
+    @ApiModelProperty(value = "閫氱敤搴撳尮閰嶅埌鐨勮瘽鏈�")
+    private String extemplateText;
+
     @ApiModelProperty(value = "鎮h�匢D")
     private Long patid;
 
diff --git a/smartor/src/main/java/com/smartor/domain/SocketMessage.java b/smartor/src/main/java/com/smartor/domain/SocketMessage.java
index 4cf8f29..639c20a 100644
--- a/smartor/src/main/java/com/smartor/domain/SocketMessage.java
+++ b/smartor/src/main/java/com/smartor/domain/SocketMessage.java
@@ -6,7 +6,7 @@
 public class SocketMessage {
     //鍙戦�佸唴绌虹殑绫诲瀷锛坱ext,image锛�
     private String type;
-    //鍐呭锛堝彂閫佺殑鏂囨湰鍐呭锛�
+    //鍐呭锛堝彂閫佺殑鏂囨湰鍐呭,鑷繁 鍐橦TML娴嬭瘯鐢ㄧ殑锛屽钩鏃舵病鍊硷級
     private String content;
     //妯℃澘ID
     private Long templateId;
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
index dbe3da2..1a3a169 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
@@ -115,18 +115,18 @@
                 PatArchiveImport patArchiveImport = new PatArchiveImport();
                 Row row = sheet.getRow(i);
                 //濡傛灉琛屼负绌猴紝杩涜涓嬩竴娆″惊鐜�
-                if (ObjectUtils.isEmpty(row.getCell(0)) && ObjectUtils.isEmpty(row.getCell(1)) && ObjectUtils.isEmpty(row.getCell(2))) {
+                if (ObjectUtils.isEmpty(row.getCell(0)) && StringUtils.isNotEmpty(row.getCell(0) + "") && ObjectUtils.isEmpty(row.getCell(1)) && StringUtils.isNotEmpty(row.getCell(1) + "") && ObjectUtils.isEmpty(row.getCell(2)) && StringUtils.isNotEmpty(row.getCell(2) + "")) {
                     continue;
                 }
                 //鍒ゆ柇鏁版嵁鏄惁鏈夐棶棰�
 
 
-                if (ObjectUtils.isNotEmpty(row.getCell(0))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(0)) && StringUtils.isNotEmpty(row.getCell(0) + "")) {
                     patArchiveImport.setName(row.getCell(0).toString());
                 } else {
                     continue;
                 }
-                if (ObjectUtils.isNotEmpty(row.getCell(1))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(1)) && StringUtils.isNotEmpty(row.getCell(1) + "")) {
                     Cell cell = row.getCell(1);
                     if (row.getCell(1).toString().contains("X") || row.getCell(1).toString().contains("x")) {
                         patArchiveImport.setIdcardno(row.getCell(1).toString());
@@ -147,27 +147,27 @@
                     if (contains) continue;
                 }
 
-                if (ObjectUtils.isNotEmpty(row.getCell(2))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(2)) && StringUtils.isNotEmpty(row.getCell(2) + "")) {
                     Cell cell = row.getCell(2);
                     double numericCellValue = cell.getNumericCellValue();
                     DecimalFormat decimalFormat = new DecimalFormat("#");
                     String formattedValue = decimalFormat.format(numericCellValue);
                     patArchiveImport.setTelcode(formattedValue);
                 }
-                if (ObjectUtils.isNotEmpty(row.getCell(3))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(3)) && StringUtils.isNotEmpty(row.getCell(3) + "")) {
                     patArchiveImport.setBatchName(row.getCell(3).toString());
                 }
-                if (ObjectUtils.isNotEmpty(row.getCell(4))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(4)) && StringUtils.isNotEmpty(row.getCell(4) + "")) {
                     patArchiveImport.setPatientno(row.getCell(4).toString());
                 }
 
-                if (ObjectUtils.isNotEmpty(row.getCell(5))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(5)) && StringUtils.isNotEmpty(row.getCell(5) + "")) {
                     patArchiveImport.setPattype(row.getCell(5).toString());
                 }
-                if (ObjectUtils.isNotEmpty(row.getCell(6))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(6)) && StringUtils.isNotEmpty(row.getCell(6) + "")) {
                     patArchiveImport.setSex(Long.valueOf(row.getCell(6).toString()));
                 }
-                if (ObjectUtils.isNotEmpty(row.getCell(7))) {
+                if (ObjectUtils.isNotEmpty(row.getCell(7)) && StringUtils.isNotEmpty(row.getCell(7) + "")) {
                     patArchiveImport.setAge(Long.valueOf(row.getCell(7).toString()));
                 }
 
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index c55649a..c1286ec 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -368,7 +368,7 @@
                     serviceSubtask.setSendname(patTaskRelevance.getName());
                     serviceSubtask.setAge(patTaskRelevance.getAge());
                     serviceSubtask.setSfzh(patTaskRelevance.getSfzh());
-                    serviceSubtask.setPhone(patTaskRelevance.getPhone());
+                    serviceSubtask.setPhone(patTaskRelevance.getTelcode());
                     serviceSubtask.setAddr(patTaskRelevance.getAddr());
                     serviceSubtask.setPatid(patTaskRelevance.getPatid());
                     serviceSubtask.setOpenid(patTaskRelevance.getOpenid());
@@ -702,9 +702,12 @@
             return phoneCallBackYQVO;
         }
         //鑾峰彇鏀鹃煶鏄惁缁撴潫
-        boolean isPlayEventOver = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop");
-        if (!isPlayEventOver) {
-            return phoneCallBackYQVO;
+        Object isPlayEventOverObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop");
+        if (ObjectUtils.isNotEmpty(isPlayEventOverObj)) {
+            Boolean isPlayEventOver = (Boolean) isPlayEventOverObj;
+            if (!isPlayEventOver) {
+                return phoneCallBackYQVO;
+            }
         }
 
         //閫氳繃瀛愪换鍔D鑾峰彇鍒版ā鏉夸俊鎭�
@@ -764,7 +767,7 @@
                 serviceSubtask.setFinishtime(new Date());
                 serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
                 Map<String, String> map = delRedisValue(null, id.toString());
-                redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
+                if (ObjectUtils.isNotEmpty(map)) redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
                 redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
                 redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE");
                 redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop");
@@ -817,7 +820,15 @@
                         //鍦╮edis涓繚瀛樹竴涓嬬粨鏉熻锛屽湪璋冪敤鎸傜數璇濈殑鏂规硶鏃跺垹闄�
                         ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
                         redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "- jsy", serviceTask.getJsy(), 120, TimeUnit.MINUTES);
-                        phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask.getJsy());
+                        phoneCallBackYQVO.setType("text");
+                        phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + les.getSwitchText());
+                        //灏嗙粨鏋滃啓杩沝etail琛�
+                        ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq();
+                        List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>();
+                        ivrTaskTemplateScriptVO.setExtemplateText(les.getSwitchText());
+                        serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate));
+                        serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList);
+                        saveQuestionAnswerPhone(serviceSubTaskDetailReq);
                         return phoneCallBackYQVO;
                     }
                 }
@@ -859,6 +870,20 @@
                         serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate));
                         serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList);
                         saveQuestionAnswerPhone(serviceSubTaskDetailReq);
+                        //鍒ゆ柇涓�涓嬶紝杩欎釜閫夐」缁撴灉鏄笉鏄繕鏈夌户缁棶涓嬪幓鐨勫繀瑕侊紝渚嬪閫夐」缁撴灉鏄埆浜轰笉鎯崇户缁洖绛旈棶棰橈紝灏辫缁撴潫鎺�
+                        if (ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getIsEnd() == 1) {
+                            redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
+                            redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop");
+                            redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "noVoice");
+                            //鍦╮edis涓繚瀛樹竴涓嬬粨鏉熻锛屽湪璋冪敤鎸傜數璇濈殑鏂规硶鏃跺垹闄�
+                            ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
+                            redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "- jsy", serviceTask.getJsy(), 120, TimeUnit.MINUTES);
+                            phoneCallBackYQVO.setType("text");
+                            phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask.getJsy());
+                            return phoneCallBackYQVO;
+                        }
+
                         flag = 1;
                         //灏嗗綋鍓嶅墠鐨勬挱鎶ョ姸鎬佸垹闄わ紝缁欎笅涓�棰樿浣�
                         redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop");
@@ -899,7 +924,9 @@
                             phoneCallBackYQVO.setType("text");
                             phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
                             //鏇存柊涓�涓嬪垎鏁�
-                            double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            double score = 0.0;
+                            Object scoreObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            if (ObjectUtils.isNotEmpty(scoreObj)) score = (double) scoreObj;
                             serviceSubtask.setScore(BigDecimal.valueOf(score));
                             serviceSubtask.setFinishtime(new Date());
                             serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
@@ -907,7 +934,9 @@
                             phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask1.getJsy());
                             Long id = serviceSubtask.getId();
                             Map<String, String> map = delRedisValue(null, id.toString());
-                            redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
+                            log.error("map鐨勫�间负锛歿}", map);
+                            if (ObjectUtils.isNotEmpty(map))
+                                redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
                             redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
                             redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
                             redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE");
@@ -932,7 +961,9 @@
                 }
                 //閮芥病鏈夊尮閰嶅埌
                 if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) {
-                    Integer count = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
+                    Integer count = null;
+                    Object countObj = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
+                    if (ObjectUtils.isNotEmpty(countObj)) count = (Integer) countObj;
                     if (count != null && count >= ivrTaskTemplate.getMateNum()) {
                         //濡傛灉count宸茬粡澶т簬鎴栫瓑浜庢病鏈夊尮閰嶆鏁�
                         if (ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() == 0 || ivrTaskTemplateScriptVO.getBranchFlag().equals("1") && ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getBranchFlag().equals("1") && ivrTaskTemplateScriptVO.getNextScriptno() == 0) {
@@ -945,7 +976,9 @@
                             else phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask1.getJsy());
 
                             //鏇存柊涓�涓嬪垎鏁�
-                            double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            Double score = null;
+                            Object scoreObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            if (ObjectUtils.isNotEmpty(scoreObj)) score = (Double) scoreObj;
                             serviceSubtask.setScore(BigDecimal.valueOf(score));
                             serviceSubtask.setFinishtime(new Date());
                             serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
@@ -972,7 +1005,9 @@
                                     redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES);
 
                                     //鏇存柊涓�涓嬪垎鏁�
-                                    double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                                    Double score = null;
+                                    Object scoreObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                                    if (ObjectUtils.isNotEmpty(scoreObj)) score = (Double) scoreObj;
                                     score = BigDecimal.valueOf(score).add(script.getScore()).doubleValue();
 
                                     redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score, 120, TimeUnit.MINUTES);
@@ -1012,7 +1047,9 @@
                             redisCache.setCacheObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone(), ivrTaskTemplateScript1.getId().toString());
 
                             //鏇存柊涓�涓嬪垎鏁�
-                            double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            Double score = null;
+                            Object scoreObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                            if (ObjectUtils.isNotEmpty(scoreObj)) score = (Double) scoreObj;
                             score = BigDecimal.valueOf(score).add(ivrTaskTemplateScriptVO.getScore()).doubleValue();
                             redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score, 120, TimeUnit.MINUTES);
 
@@ -1026,7 +1063,9 @@
                     phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask1.getJsy());
 
                     //鏇存柊涓�涓嬪垎鏁�
-                    double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                    Double score = null;
+                    Object scoreObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE");
+                    if (ObjectUtils.isNotEmpty(scoreObj)) score = (Double) scoreObj;
                     serviceSubtask.setScore(BigDecimal.valueOf(score));
                     serviceSubtask.setFinishtime(new Date());
                     serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
@@ -1054,9 +1093,9 @@
                 scriptContent = scriptContent.replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "");
             }
         }
-        scriptContent.replace("${name}", StringUtils.isNotEmpty(serviceSubtask.getName()) ? serviceSubtask.getName() : "");
-        scriptContent.replace("${dzz}", StringUtils.isNotEmpty(serviceSubtask.getPlaceOfResidence()) ? serviceSubtask.getPlaceOfResidence() : "");
-        scriptContent.replace("${phone}", StringUtils.isNotEmpty(serviceSubtask.getTelcode()) ? serviceSubtask.getTelcode() : "");
+        scriptContent = scriptContent.replace("${name}", StringUtils.isNotEmpty(serviceSubtask.getSendname()) ? serviceSubtask.getSendname() : "");
+        scriptContent = scriptContent.replace("${dzz}", StringUtils.isNotEmpty(serviceSubtask.getAddr()) ? serviceSubtask.getAddr() : "");
+        scriptContent = scriptContent.replace("${phone}", StringUtils.isNotEmpty(serviceSubtask.getTelcode()) ? serviceSubtask.getTelcode() : "");
 
         return scriptContent;
     }
@@ -1125,7 +1164,7 @@
         //  cache-0涓虹珛鍗冲彂璧风殑,鍏跺畠鐨勫厛鎺ㄨ繜
         if (!StringUtils.isEmpty(value0)) {
             pullTaskVOList = getPullTaskList(value0, "cache-0");
-            //灏哻ache-0鐨勬暟鎹紝杞Щ涓嶅鍔瞔ache-00涓�
+            //灏哻ache-0鐨勬暟鎹紝杞Щ鍒癱ache-00涓�
             redisCache.deleteObject("cache-00");
             String cache00 = redisCache.getCacheObject("cache-00");
             if (!StringUtils.isEmpty(cache00))
@@ -1200,7 +1239,8 @@
                 pullTaskVO.setSections(LocalTime.now().format(DateTimeFormatter.ofPattern("hh:mm")) + "-" + LocalTime.now().plusMinutes(1).format(DateTimeFormatter.ofPattern("hh:mm")));
                 pullTaskVO.setPhones(serviceSubtask.getPhone());
                 pullTaskVO.setPrologue(kcb);
-                pullTaskVO.setDisplayNo("85129866");
+                if (cacheName.equals("cache-0")) pullTaskVO.setDisplayNo("2");
+                else pullTaskVO.setDisplayNo("2");
                 pullTaskVOList.add(pullTaskVO);
                 redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim(), ivrTaskTemplateScript.getId().toString());
 //                redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim() + "-firstSort", 1, 120, TimeUnit.MINUTES);
@@ -1527,7 +1567,6 @@
         return null;
     }
 
-
     private ServiceSubtaskDetail getServiceSubtaskDetail(PhoneCallReqYQVO phoneCallReqYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate) {
         ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail();
         serviceSubtaskDetail.setSubId(Long.valueOf(phoneCallReqYQVO.getTaskid()));
@@ -1547,8 +1586,10 @@
         serviceSubtaskDetail.setTemplateid(ivrTaskTemplate.getId().toString());
         serviceSubtaskDetail.setTemplatequestionnum(ivrTaskTemplateScriptVO.getId());
         serviceSubtaskDetail.setQuestiontext(ivrTaskTemplateScriptVO.getScriptContent());
+        serviceSubtaskDetail.setQuestionvoice(phoneCallReqYQVO.getRecordpath());
         serviceSubtaskDetail.setCategoryname(ivrTaskTemplateScriptVO.getScriptType());
         serviceSubtaskDetail.setTargetoptions(ivrTaskTemplateScriptVO.getTargetOptions());
+        serviceSubtaskDetail.setExtemplateText(ivrTaskTemplateScriptVO.getExtemplateText());
 
         int i = 1;
         for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) {
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
index 60f4695..ff7c3ee 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
@@ -36,11 +36,13 @@
         <result property="appendflag" column="appendflag"/>
         <result property="appenddesc" column="appenddesc"/>
         <result property="picturePath" column="picture_path"/>
+        <result property="isEnd" column="is_end"/>
     </resultMap>
 
     <sql id="selectIvrLibaScriptTargetoptionVo">
         select id,
                targetid,
+               is_end,
                picture_path,
                targetname,
                appendflag,
@@ -75,6 +77,7 @@
             <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 = #{version}</if>
+            <if test="isEnd != null ">and is_end = #{isEnd}</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>
@@ -132,6 +135,7 @@
             <if test="appendflag != null">appendflag,</if>
             <if test="appenddesc != null">appenddesc,</if>
             <if test="picturePath != null">picture_path,</if>
+            <if test="isEnd != null ">is_end,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -165,6 +169,7 @@
             <if test="appendflag != null">#{appendflag},</if>
             <if test="appenddesc != null">#{appenddesc},</if>
             <if test="picturePath != null">#{picturePath},</if>
+            <if test="isEnd != null ">#{isEnd},</if>
         </trim>
     </insert>
 
@@ -201,6 +206,7 @@
             <if test="appendflag != null">appendflag = #{appendflag},</if>
             <if test="appenddesc != null">appenddesc = #{appenddesc},</if>
             <if test="picturePath != null">picture_path = #{picturePath},</if>
+            <if test="isEnd != null ">is_end = #{isEnd},</if>
         </trim>
         where id = #{id}
     </update>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
index 469a4f5..91884b1 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
@@ -36,11 +36,13 @@
         <result property="appenddesc" column="appenddesc"/>
         <result property="picturePath" column="picture_path"/>
         <result property="prompt" column="prompt"/>
+        <result property="isEnd" column="is_end"/>
     </resultMap>
 
     <sql id="selectIvrLibaTargetoptionVo">
         select targetoptionid,
                targetid,
+               is_end,
                appendflag,
                picture_path,
                appenddesc,
@@ -87,6 +89,7 @@
             <if test="appendflag != null">and appendflag = #{appendflag}</if>
             <if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
             <if test="picturePath != null">and picture_path = #{picturePath}</if>
+            <if test="isEnd != null ">and is_end = #{isEnd}</if>
         </where>
         order by guid asc
     </select>
@@ -129,6 +132,7 @@
             <if test="appendflag != null">appendflag,</if>
             <if test="appenddesc != null">appenddesc,</if>
             <if test="picturePath != null">picture_path,</if>
+            <if test="isEnd != null ">is_end,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="targetid != null">#{targetid},</if>
@@ -160,6 +164,7 @@
             <if test="appendflag != null">#{appendflag},</if>
             <if test="appenddesc != null">#{appenddesc},</if>
             <if test="picturePath != null">#{picturePath},</if>
+            <if test="isEnd != null ">#{isEnd},</if>
         </trim>
     </insert>
 
@@ -195,6 +200,7 @@
             <if test="appendflag != null">appendflag = #{appendflag},</if>
             <if test="appenddesc != null">appenddesc = #{appenddesc},</if>
             <if test="picturePath != null">picture_path = #{picturePath},</if>
+            <if test="isEnd != null ">is_end = #{isEnd},</if>
         </trim>
         where targetoptionid = #{targetoptionid}
     </update>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
index c3a9963..214f8d0 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
@@ -38,11 +38,13 @@
         <result property="optionNo" column="option_no"/>
         <result property="score" column="score"/>
         <result property="prompt" column="prompt"/>
+        <result property="isEnd" column="is_end"/>
     </resultMap>
 
     <sql id="selectIvrLibaTemplateTargetoptionVo">
         select id,
                targetid,
+               is_end,
                score,
                appendflag,
                appenddesc,
@@ -69,6 +71,7 @@
         <where>
             del_flag=0
             <if test="targetid != null ">and targetid = #{targetid}</if>
+            <if test="isEnd != null ">and is_end = #{isEnd}</if>
             <if test="score != null ">and score = #{score}</if>
             <if test="targetname != null ">and targetname = #{targetname}</if>
             <if test="templateID != null ">and templateID = #{templateID}</if>
@@ -139,6 +142,7 @@
             <if test="appenddesc != null">appenddesc,</if>
             <if test="optionNo != null">option_no,</if>
             <if test="score != null">score,</if>
+            <if test="isEnd != null ">is_end,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="targetid != null">#{targetid},</if>
@@ -172,6 +176,7 @@
             <if test="appenddesc != null">#{appenddesc},</if>
             <if test="optionNo != null">#{optionNo},</if>
             <if test="score != null">#{score},</if>
+            <if test="isEnd != null ">#{isEnd},</if>
         </trim>
     </insert>
 
@@ -209,6 +214,7 @@
             <if test="appenddesc != null">appenddesc = #{appenddesc},</if>
             <if test="optionNo != null">option_no = #{optionNo},</if>
             <if test="score != null">score = #{score},</if>
+            <if test="isEnd != null ">is_end = #{isEnd},</if>
         </trim>
         where id = #{id}
     </update>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
index 4ee4208..ce15a1c 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
@@ -41,11 +41,13 @@
         <result property="isUserOperation" column="is_user_operation"/>
         <result property="score" column="score"/>
         <result property="prompt" column="prompt"/>
+        <result property="isEnd" column="is_end"/>
     </resultMap>
 
     <sql id="selectIvrTaskTemplateTargetoptionVo">
         select id,
                taskid,
+               is_end,
                templateID,
                score,
                is_user_operation,
@@ -67,6 +69,7 @@
         <include refid="selectIvrTaskTemplateTargetoptionVo"/>
         <where>
             <if test="taskid != null ">and taskid = #{taskid}</if>
+            <if test="isEnd != null ">and is_end = #{isEnd}</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>
@@ -146,6 +149,7 @@
             <if test="optionCode != null ">option_code,</if>
             <if test="isUserOperation != null ">is_user_operation,</if>
             <if test="score != null ">score,</if>
+            <if test="isEnd != null ">is_end,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskid != null">#{taskid},</if>
@@ -182,6 +186,7 @@
             <if test="optionCode != null ">#{optionCode},</if>
             <if test="isUserOperation != null ">#{isUserOperation},</if>
             <if test="score != null ">#{score},</if>
+            <if test="isEnd != null ">#{isEnd},</if>
         </trim>
     </insert>
 
@@ -222,7 +227,7 @@
             <if test="optionCode != null ">option_code = #{optionCode},</if>
             <if test="isUserOperation != null ">is_user_operation = #{isUserOperation},</if>
             <if test="score != null ">score = #{score},</if>
-
+            <if test="isEnd != null ">is_end = #{isEnd},</if>
         </trim>
         where id = #{id}
     </update>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
index 8f43028..913f6b6 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
@@ -51,6 +51,7 @@
         <result property="answerps" column="answerps"/>
         <result property="comment" column="comment"/>
         <result property="patid" column="patid"/>
+        <result property="extemplateText" column="extemplate_text"/>
     </resultMap>
 
     <sql id="selectServiceSubtaskDetailVo">
@@ -58,6 +59,7 @@
                sub_id,
                answerps,
                scriptid,
+               extemplate_text,
                comment,
                patid,
                taskid,
@@ -108,6 +110,7 @@
         <include refid="selectServiceSubtaskDetailVo"/>
         <where>
             <if test="subId != null">and sub_id = #{subId}</if>
+            <if test="extemplateText != null">and extemplate_text = #{extemplateText}</if>
             <if test="taskid != null">and taskid = #{taskid}</if>
             <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
             <if test="phone != null  and phone != ''">and phone = #{phone}</if>
@@ -206,6 +209,7 @@
             <if test="comment != null  and comment != ''">comment,</if>
             <if test="scriptid != null ">scriptid,</if>
             <if test=" patid != null">patid,</if>
+            <if test=" extemplateText != null">extemplate_text,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -254,6 +258,7 @@
             <if test="comment != null  and comment != ''">#{comment},</if>
             <if test="scriptid != null ">#{scriptid},</if>
             <if test=" patid != null">#{patid},</if>
+            <if test=" extemplateText != null">#{extemplateText},</if>
         </trim>
     </insert>
 
@@ -305,6 +310,7 @@
             <if test="comment != null  and comment != ''">comment = #{comment},</if>
             <if test="scriptid != null ">scriptid = #{scriptid},</if>
             <if test=" patid != null">patid = #{patid},</if>
+            <if test=" extemplateText != null">extemplate_text = #{extemplateText},</if>
         </trim>
         where id = #{id}
     </update>
@@ -358,6 +364,7 @@
             <if test="comment != null  and comment != ''">comment = #{comment},</if>
             <if test="scriptid != null ">scriptid = #{scriptid},</if>
             <if test=" patid != null">patid = #{patid},</if>
+            <if test=" extemplateText != null">extemplate_text = #{extemplateText},</if>
         </trim>
         where patid = #{patid} and scriptid = #{scriptid} and sub_id = #{subId}
     </update>

--
Gitblit v1.9.3