From 37b79cfd8e5ecdc6f9f09750583f998183c338fb Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 07 十一月 2024 10:55:27 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java                             |  127 +++++++-
 smartor/src/main/java/com/smartor/mapper/ServiceOutPathMapper.java                       |   63 ++++
 smartor/src/main/java/com/smartor/service/IServiceOutPathService.java                    |   61 ++++
 smartor/src/main/java/com/smartor/service/impl/ServiceOutPathServiceImpl.java            |   87 ++++++
 ruoyi-admin/src/main/resources/application-druid.yml                                     |   10 
 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java                   |  125 +++++++-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java |  116 ++++++++
 smartor/src/main/java/com/smartor/domain/ServiceOutPath.java                             |   66 ++++
 ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java                                 |   18 
 smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml                       |  137 +++++++++
 smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml                          |    7 
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java             |    2 
 12 files changed, 762 insertions(+), 57 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
index 3b101e7..f5cbbb7 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -5,6 +5,7 @@
 import com.google.gson.Gson;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.enums.ServiceFromEnum;
+import com.ruoyi.common.utils.HttpUtil;
 import com.ruoyi.common.utils.RSAPublicKeyExample;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.http.HttpUtils;
@@ -13,10 +14,7 @@
 import com.smartor.domain.*;
 import com.smartor.mapper.ServiceSubtaskMapper;
 import com.smartor.mapper.ServiceTaskMapper;
-import com.smartor.service.IBaseSmsaccountService;
-import com.smartor.service.IIvrTaskTemplateService;
-import com.smartor.service.IServiceSubtaskRecordService;
-import com.smartor.service.ISvyTaskTemplateService;
+import com.smartor.service.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -26,6 +24,7 @@
 import org.springframework.data.redis.listener.RedisMessageListenerContainer;
 import org.springframework.stereotype.Component;
 
+import java.math.BigInteger;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.time.LocalDateTime;
@@ -55,9 +54,7 @@
     private String thirdWXUrl;
 
     @Autowired
-    private IIvrTaskTemplateService ivrTaskTemplateService;
-    @Autowired
-    private ISvyTaskTemplateService svyTaskTemplateService;
+    private IServiceOutPathService iServiceOutPathService;
 
     @Autowired
     private ServiceSubtaskMapper ivrTaskcallMapper;
@@ -88,6 +85,9 @@
 
     @Autowired
     IBaseSmsaccountService baseSmsaccountService;
+
+    @Value("${xhsmsPath}")
+    private String xhsmsPath;
 
     // 鍒涘缓鍥哄畾澶у皬鐨勭嚎绋嬫睜
     private static final ExecutorService executorService = Executors.newFixedThreadPool(10);
@@ -280,7 +280,6 @@
                     continue;
                 } else if (descByCode.equals("鐭俊")) {
                     //鐭俊
-//                        http://localhost:8099/followvisit/particty?param1=3&param2=348
                     //瀵箄rl涓袱涓弬鏁板姞瀵�
                     RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
                     String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key);
@@ -298,17 +297,62 @@
                             SendMagParam sendMagParam = new SendMagParam();
                             sendMagParam.setType("4");
                             if (type == 1) {
-                                sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "&param2=" + patid + "&param5=false");
-                            } else if (type == 1) {
-                                sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false");
+                                //闅忚
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+//                                sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "&param2=" + patid + "&param5=false");
+                                //杞垚16杩涘埗
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+                                sendMagParam.setPhone(serviceSubtask.getPhone());
+                                sendMagParam.setUrl(ip + ":" + req_path + "/sf?p=" + format);
+                                sendMagParam.setContent("銆愭柊鍗庡尰闄€�戞偍濂斤紝閭�璇锋偍濉啓鍑洪櫌闅忚璋冩煡琛紝璇风偣鍑�" + sendMagParam.getUrl() + "濉啓銆傛劅璋㈡偍閰嶅悎锛�");
+                            } else if (type == 2) {
+                                //闂埜锛堥棶棰橈級
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+//                                serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()));
+                                serviceOutPath.setParam3(ivrTask1.getTaskName());
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+//                                sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false");
+                                sendMagParam.setPhone(serviceSubtask.getPhone());
+                                sendMagParam.setUrl(ip + ":" + req_path + "/wt?p=" + format);
+                                sendMagParam.setContent("銆愭柊鍗庡尰闄€�戞偍濂斤紝閭�璇锋偍濉啓鍑洪櫌璋冩煡琛紝璇风偣鍑�" + sendMagParam.getUrl() + "濉啓銆傛劅璋㈡偍閰嶅悎锛�");
                             } else if (type == 3) {
-                                sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false");
+                                //瀹f暀
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+//                                serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()));
+                                serviceOutPath.setParam3(ivrTask1.getTaskName());
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+//                                sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false");
+                                sendMagParam.setPhone(serviceSubtask.getPhone());
+                                sendMagParam.setUrl(ip + ":" + req_path + "/xj?p=" + format);
+                                sendMagParam.setContent("銆愭柊鍗庡尰闄€�戞偍濂斤紝閭�璇锋偍濉啓鍑洪櫌瀹f暀璋冩煡琛紝璇风偣鍑�" + sendMagParam.getUrl() + "鏌ョ湅銆傛劅璋㈡偍閰嶅悎锛�");
                             }
                             //鐭俊杩橀渶瑕佹ā鏉�
-                            sendMagParam.setContent("銆愭柊鍗庡尰闄€��+<a href="+sendMagParam.getUrl()+"閾炬帴娴嬭瘯</a>");
-                            Boolean aBoolean = sendService.sendMsg(sendMagParam);
-
-                            if (!aBoolean) {
+                            Map<String, String> req = new HashMap<>();
+                            req.put("phone", sendMagParam.getPhone());
+                            req.put("content", sendMagParam.getContent());
+                            String s = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req));
+                            if (s.equals("true")) {
                                 ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
                                 serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
                                 serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId());
@@ -387,12 +431,55 @@
 //                        Boolean aBoolean = sendService.sendMsg(sendMagParam);
                         String url = null;
                         try {
+//                            if (type == 1) {
+//                                url = ip + ":" + req_path + "/outsideChain?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
+//                            } else if (type == 2) {
+//                                url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
+//                            } else if (type == 3) {
+//                                url = ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
+//                            }
                             if (type == 1) {
-                                url = ip + ":" + req_path + "/outsideChain?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
+                                //闅忚
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+//                                sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "&param2=" + patid + "&param5=false");
+                                url = ip + ":" + req_path + "/sf?p=" + format;
                             } else if (type == 2) {
-                                url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
+                                //闂埜
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+//                                serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()));
+                                serviceOutPath.setParam3(ivrTask1.getTaskName());
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+//                                sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false");
+                                url = ip + ":" + req_path + "/wt?p=" + format;
                             } else if (type == 3) {
-                                url = ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false";
+                                //瀹f暀
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+//                                serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()));
+                                serviceOutPath.setParam3(ivrTask1.getTaskName());
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+                                url = ip + ":" + req_path + "/xj?p=" + format;
                             }
 
                             String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "鏃�");
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
new file mode 100644
index 0000000..5e8c4fe
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
@@ -0,0 +1,116 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.ServiceOutPath;
+import com.smartor.service.IServiceOutPathService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 涓婚敭Controller
+ *
+ * @author lihu
+ */
+@Api("涓婚敭")
+@RestController
+@RequestMapping("/smartor/outPath")
+public class ServiceOutPathController extends BaseController {
+    @Autowired
+    private IServiceOutPathService serviceOutPathService;
+
+    /**
+     * 鏌ヨ涓婚敭鍒楄〃
+     */
+    @ApiOperation("鏌ヨ涓婚敭鍒楄〃")
+    //@PreAuthorize("@ss.hasPermi('smartor:path:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ServiceOutPath serviceOutPath) {
+        startPage();
+        List<ServiceOutPath> list = serviceOutPathService.selectServiceOutPathList(serviceOutPath);
+        return getDataTable(list);
+    }
+
+    /**
+     * param灏辨槸杩涘埗
+     *
+     * @param param
+     * @return
+     */
+    @PostMapping("/getInfoByParam")
+    public AjaxResult param(@Param("param") String param) {
+        ServiceOutPath serviceOutPath=new ServiceOutPath();
+        serviceOutPath.setRadix(param);
+        List<ServiceOutPath> list = serviceOutPathService.selectServiceOutPathList(serviceOutPath);
+        ServiceOutPath serviceOutPath1 = list.get(0);
+        serviceOutPath1.setId(null);
+        serviceOutPath1.setRadix(null);
+        if (CollectionUtils.isNotEmpty(list)) return success(serviceOutPath1);
+        return success(null);
+    }
+
+    /**
+     * 瀵煎嚭涓婚敭鍒楄〃
+     */
+    @ApiOperation("瀵煎嚭涓婚敭鍒楄〃")
+    //@PreAuthorize("@ss.hasPermi('smartor:path:export')")
+    @Log(title = "涓婚敭", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ServiceOutPath serviceOutPath) {
+        List<ServiceOutPath> list = serviceOutPathService.selectServiceOutPathList(serviceOutPath);
+        ExcelUtil<ServiceOutPath> util = new ExcelUtil<ServiceOutPath>(ServiceOutPath.class);
+        util.exportExcel(response, list, "涓婚敭鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇涓婚敭璇︾粏淇℃伅
+     */
+    @ApiOperation("鑾峰彇涓婚敭璇︾粏淇℃伅")
+    @GetMapping(value = "/getInfo/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(serviceOutPathService.selectServiceOutPathById(id));
+    }
+
+    /**
+     * 鏂板涓婚敭
+     */
+    @ApiOperation("鏂板涓婚敭")
+    @Log(title = "涓婚敭", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody ServiceOutPath serviceOutPath) {
+        return toAjax(serviceOutPathService.insertServiceOutPath(serviceOutPath));
+    }
+
+    /**
+     * 淇敼涓婚敭
+     */
+    @ApiOperation("淇敼涓婚敭")
+    //@PreAuthorize("@ss.hasPermi('smartor:path:edit')")
+    @Log(title = "涓婚敭", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult edit(@RequestBody ServiceOutPath serviceOutPath) {
+        return toAjax(serviceOutPathService.updateServiceOutPath(serviceOutPath));
+    }
+
+    /**
+     * 鍒犻櫎涓婚敭
+     */
+    @ApiOperation("鍒犻櫎涓婚敭")
+    //@PreAuthorize("@ss.hasPermi('smartor:path:remove')")
+    @Log(title = "涓婚敭", businessType = BusinessType.DELETE)
+    @GetMapping("/remove/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(serviceOutPathService.deleteServiceOutPathByIds(ids));
+    }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java b/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
index 1f15e17..42398c5 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
@@ -4,12 +4,14 @@
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
+import com.smartor.domain.ThiedInhospInfo;
 import io.swagger.models.auth.In;
 import org.junit.Test;
 import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.*;
+import java.math.BigInteger;
 import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
@@ -41,13 +43,15 @@
     }
 
     @Test
-    public void bb(){
-
-        for (int j = 0; j < 5; j++) {
-            if(j==5-1){
-                System.out.println("11111111111111111111");
-            }
-        }
+    public void bb() {
+//        int number = 99999; // 绀轰緥鏁版嵁
+//        String format = String.format("%03X", number);
+//        System.out.println(format);
+//        for (int j = 0; j < 5; j++) {
+//            if(j==5-1){
+//                System.out.println("11111111111111111111");
+//            }
+//        }
     }
 
     public void aa(MultipartFile file) throws IOException {
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index 141a34a..ec477ef 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -11,8 +11,9 @@
         #        username: root
         #        password: 123456
         #        鍏徃
-        url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-        #        url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        #        url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        #        鏂板崕
+        url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: smartor
         password: Smartor.2023
         driverClassName: com.mysql.cj.jdbc.Driver
@@ -155,9 +156,8 @@
 hangup: http://192.168.2.10:8091/hangup
 
 
-#鏂板崕鐭俊
-#璇锋眰鍦板潃
-xhsmsPath: http://183.134.75.159:7862/sms
+#鏂板崕鐭俊璇锋眰鍦板潃(杩欎釜鏈嶅姟鏄垜浠嚜宸卞啓鐨�)
+xhsmsPath: http://192.16.4.220:8092/sendSms
 #甯愬彿
 xhsmsAccount: 911124
 #鎺ュ彛瀵嗙爜
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index d10a33f..baadebb 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -108,7 +108,7 @@
                 // 杩囨护璇锋眰
                 .authorizeRequests()
                 // 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
-                .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask/phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer","/smartor/import/download","/smartor/serviceSubtask/recordAccept").permitAll()
+                .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask/phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer","/smartor/import/download","/smartor/serviceSubtask/recordAccept","/smartor/outPath/getInfoByParam").permitAll()
                 // 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
                 // 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇�
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
index ff69715..0d260ff 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -12,6 +12,7 @@
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.enums.ServiceFromEnum;
 import com.ruoyi.common.utils.DtoConversionUtils;
+import com.ruoyi.common.utils.HttpUtil;
 import com.ruoyi.common.utils.RSAPublicKeyExample;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.http.HttpUtils;
@@ -28,6 +29,8 @@
 import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.io.File;
+import java.io.FileWriter;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Type;
@@ -55,6 +58,9 @@
     private IServiceThirdDataService iServiceThirdDataService;
 
     @Autowired
+    private IServiceOutPathService iServiceOutPathService;
+
+    @Autowired
     private IServiceSubtaskAnswerService serviceSubtaskAnswerService;
 
     @Autowired
@@ -71,6 +77,9 @@
 
     @Value("${localIP}")
     private String localIP;
+
+    @Value("${xhsmsPath}")
+    private String xhsmsPath;
 
     @Value("${pub_key}")
     private String pub_key;
@@ -332,34 +341,76 @@
                 } else if (descByCode.equals("绾歌川")) {
                     //绾歌川
                 } else if (descByCode.equals("鐭俊")) {
-                    //鐭俊
-//                        http://localhost:8099/followvisit/particty?param1=3&param2=348
-                    //瀵箄rl涓袱涓弬鏁板姞瀵�
                     RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
                     String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key);
-
                     for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) {
-                        try {
+                        log.error("鐭俊闀挎湡浠诲姟鍙戦��---------杩涙潵浜嗗悧锛焮}", serviceSubtask);
+                        boolean dateToday = isDateToday(serviceSubtask.getLongSendTime());
+                        if (dateToday) {
+                            try {
+                                //鍏堝垽鏂偅鑰呮槸涓嶆槸杩樿鍙戦��
+                                PatArchive patArchive = patArchiveService.selectPatArchiveByPatid(serviceSubtask.getPatid());
+                                if (!Objects.isNull(patArchive) && patArchive.getNotrequiredFlag() == "1") {
+                                    //涓嶉渶瑕佸彂閫�
+                                    serviceSubtask.setResult("error");
+                                    serviceSubtask.setRemark(patArchive.getNotrequiredreason());
+                                    serviceSubtask.setSendstate(4L);
+                                    serviceSubtask.setFinishtime(new Date());
+                                    iServiceSubtaskService.insertServiceSubtask(serviceSubtask);
+                                    continue;
+                                }
+                                String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
+                                SendMagParam sendMagParam = new SendMagParam();
+                                sendMagParam.setType("4");
+                                ServiceOutPath serviceOutPath = new ServiceOutPath();
+                                serviceOutPath.setParam1(taskId);
+                                serviceOutPath.setParam2(patid);
+                                serviceOutPath.setParam3(ivrTask1.getTaskName());
+                                serviceOutPath.setCreateTime(new Date());
+                                iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                                String format = String.format("%03X", serviceOutPath.getId());
+                                serviceOutPath.setRadix(format);
+                                serviceOutPath.setUpdateTime(new Date());
+                                iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+                                sendMagParam.setPhone(serviceSubtask.getPhone());
+                                sendMagParam.setUrl(ip + ":" + req_path + "/wt?p=" + format);
+                                sendMagParam.setContent("銆愭柊鍗庡尰闄€�戞偍濂斤紝閭�璇锋偍濉啓鍑洪櫌璋冩煡琛紝璇风偣鍑�" + sendMagParam.getUrl() + "濉啓銆傛劅璋㈡偍閰嶅悎锛�");
+                                Map<String, String> req = new HashMap<>();
+                                req.put("phone", sendMagParam.getPhone());
+                                req.put("content", sendMagParam.getContent());
+                                String isSuccess = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req));
+                                //浠诲姟鍙戦�佽褰�
+                                ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
+                                serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
+                                serviceSubtaskRecord.setUuid(UUID.randomUUID().toString());
+                                serviceSubtaskRecord.setTasktype(serviceSubtask.getType());
+                                serviceSubtaskRecord.setPreachform("4");
+                                serviceSubtaskRecord.setStartTime(System.currentTimeMillis());
+                                serviceSubtaskRecord.setResult("success");
+                                if (StringUtils.isNotEmpty(isSuccess) && !isSuccess.equals("true"))
+                                    serviceSubtaskRecord.setResult("error");
+                                serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
 
-
-                            String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
-                            SendMagParam sendMagParam = new SendMagParam();
-                            sendMagParam.setType("4");
-                            sendMagParam.setPhone(serviceSubtask.getPhone());
-                            sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "&param2=" + patid + "&param5=false");
-                            Boolean aBoolean = sendService.sendMsg(sendMagParam);
-
-                            //浠诲姟鍙戦�佽褰�
-                            ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
-                            serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
-                            serviceSubtaskRecord.setUuid(UUID.randomUUID().toString());
-                            serviceSubtaskRecord.setTasktype(serviceSubtask.getType());
-                            serviceSubtaskRecord.setPreachform("4");
-                            serviceSubtaskRecord.setStartTime(System.currentTimeMillis());
-                            serviceSubtaskRecord.setResult(aBoolean == true ? "鎴愬姛" : "澶辫触");
-                            serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
-                        } catch (Exception e) {
-                            continue;
+                                //鍙戦�佸畬鎴愬悗锛屼慨鏀圭姸鎬�
+                                serviceSubtask.setSendstate(3L);
+                                if (StringUtils.isNotEmpty(isSuccess) && !isSuccess.equals("true")) {
+                                    serviceSubtask.setResult("success");
+                                } else {
+                                    serviceSubtask.setResult("error");
+                                    serviceSubtask.setSendstate(5L);
+                                    serviceSubtask.setRemark("鐭俊鍙戦�佸け璐�");
+                                }
+                                iServiceSubtaskService.updateServiceSubtask(serviceSubtask);
+                            } catch (Exception e) {
+                                String guid = UUID.randomUUID().toString();
+                                log.error("闀挎湡浠诲姟锛屽彂閫佸け璐ュ師鍥狅細{},{}", e.getMessage(), guid);
+                                serviceSubtask.setResult("error");
+                                serviceSubtask.setRemark("绯荤粺閿欒");
+                                serviceSubtask.setSendstate(5L);
+                                serviceSubtask.setFinishtime(new Date());
+                                serviceSubtask.setGuid(guid);
+                                iServiceSubtaskService.updateServiceSubtask(serviceSubtask);
+                            }
                         }
                     }
                 } else if (descByCode.equals("鍏紬鍙�")) {
@@ -462,6 +513,32 @@
         Type resultType = new TypeToken<List<ThiedInhospInfo>>() {
         }.getType();
         List<ThiedInhospInfo> thiedInhospInfoList = gson.fromJson(resultArray, resultType);
+
+        // 鍒涘缓涓�涓柊鏂囦欢
+        String filename = null;
+        if (cry.equals("0")) filename = "鍏ラ櫌淇℃伅" + System.currentTimeMillis();
+        if (cry.equals("1")) filename = "鍑洪櫌淇℃伅" + System.currentTimeMillis();
+        File file = new File("D:\\public\\鍗庡崜闆嗘垚骞冲彴鏁版嵁\\" + filename);
+        if (!file.exists()) {
+            // 濡傛灉鏂囦欢涓嶅瓨鍦紝鍒欏垱寤烘柊鏂囦欢
+            try {
+                if (file.createNewFile()) {
+                    System.out.println("鎴愬姛鍒涘缓浜嗘柊鏂囦欢!");
+                } else {
+                    System.out.println("澶辫触锛佹枃浠舵棤娉曞垱寤猴紒");
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        // 灏嗘暟鎹啓鍏ュ埌鏂囦欢涓�
+        try {
+            FileWriter writer = new FileWriter(file);
+            writer.write(result);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
         if (CollectionUtils.isNotEmpty(thiedInhospInfoList)) {
             for (ThiedInhospInfo thiedInhospInfo : thiedInhospInfoList) {
                 //閫氳繃韬唤璇佸彿鏌ヨ璇ユ偅鑰呭湪鎮h�呰〃鏄惁瀛樺湪
@@ -571,7 +648,9 @@
                 inhosp.setPatno(patArchive.getPatientno());
                 inhosp.setSerialnum(patMedInhosp.getSerialnum());
                 List<PatMedInhosp> patMedInhosps = patMedInhospService.selectPatMedInhospList(inhosp);
+                log.error("鏄惁闇�瑕佹洿鏂帮細{}", patMedInhosps.size());
                 if (CollectionUtils.isNotEmpty(patMedInhosps)) {
+                    patMedInhosp.setInhospid(patMedInhosps.get(0).getInhospid());
                     patMedInhospService.updatePatMedInhosp(patMedInhosp);
                 } else {
                     patMedInhospService.insertPatMedInhosp(patMedInhosp);
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java b/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java
new file mode 100644
index 0000000..0415bc0
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java
@@ -0,0 +1,66 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 涓婚敭瀵硅薄 service_out_path
+ *
+ * @author lihu
+ * @date 2024-11-04
+ */
+@Data
+@ApiModel("涓婚敭")
+public class ServiceOutPath extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 涓婚敭
+     */
+    @ApiModelProperty("涓婚敭")
+    private Long id;
+
+    /**
+     * taskID
+     */
+    @ApiModelProperty("taskID")
+    @Excel(name = "taskID")
+    private String param1;
+
+    /**
+     * pid
+     */
+    @ApiModelProperty("pid")
+    @Excel(name = "pid")
+    private String param2;
+
+    /**
+     * task_name
+     */
+    @ApiModelProperty("task_name")
+    @Excel(name = "task_name")
+    private String param3;
+
+    /**
+     * flag(鍓嶇瀹氱殑,鐩存帴杩斿洖false灏辫)
+     */
+    @ApiModelProperty("flag(鍓嶇瀹氱殑,鐩存帴杩斿洖false灏辫)")
+    @Excel(name = "flag(鍓嶇瀹氱殑,鐩存帴杩斿洖false灏辫)")
+    private String param5 = "false";
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    @ApiModelProperty(value = "鍒犻櫎鏍囪")
+    private String delFlag;
+
+
+    @ApiModelProperty(value = "杩涘埗")
+    private String radix;
+
+
+}
+
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceOutPathMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceOutPathMapper.java
new file mode 100644
index 0000000..55b810b
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/ServiceOutPathMapper.java
@@ -0,0 +1,63 @@
+package com.smartor.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+import com.smartor.domain.ServiceOutPath;
+
+/**
+ * 涓婚敭Mapper鎺ュ彛
+ *
+ * @author lihu
+ * @date 2024-11-04
+ */
+@Mapper
+public interface ServiceOutPathMapper {
+    /**
+     * 鏌ヨ涓婚敭
+     *
+     * @param id 涓婚敭涓婚敭
+     * @return 涓婚敭
+     */
+    public ServiceOutPath selectServiceOutPathById(Long id);
+
+    /**
+     * 鏌ヨ涓婚敭鍒楄〃
+     *
+     * @param serviceOutPath 涓婚敭
+     * @return 涓婚敭闆嗗悎
+     */
+    public List<ServiceOutPath> selectServiceOutPathList(ServiceOutPath serviceOutPath);
+
+    /**
+     * 鏂板涓婚敭
+     *
+     * @param serviceOutPath 涓婚敭
+     * @return 缁撴灉
+     */
+    public int insertServiceOutPath(ServiceOutPath serviceOutPath);
+
+    /**
+     * 淇敼涓婚敭
+     *
+     * @param serviceOutPath 涓婚敭
+     * @return 缁撴灉
+     */
+    public int updateServiceOutPath(ServiceOutPath serviceOutPath);
+
+    /**
+     * 鍒犻櫎涓婚敭
+     *
+     * @param id 涓婚敭涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteServiceOutPathById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎涓婚敭
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteServiceOutPathByIds(Long[] ids);
+}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceOutPathService.java b/smartor/src/main/java/com/smartor/service/IServiceOutPathService.java
new file mode 100644
index 0000000..6106b89
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IServiceOutPathService.java
@@ -0,0 +1,61 @@
+package com.smartor.service;
+
+import java.util.List;
+import com.smartor.domain.ServiceOutPath;
+
+/**
+ * 涓婚敭Service鎺ュ彛
+ * 
+ * @author lihu
+ * @date 2024-11-04
+ */
+public interface IServiceOutPathService 
+{
+    /**
+     * 鏌ヨ涓婚敭
+     * 
+     * @param id 涓婚敭涓婚敭
+     * @return 涓婚敭
+     */
+    public ServiceOutPath selectServiceOutPathById(Long id);
+
+    /**
+     * 鏌ヨ涓婚敭鍒楄〃
+     * 
+     * @param serviceOutPath 涓婚敭
+     * @return 涓婚敭闆嗗悎
+     */
+    public List<ServiceOutPath> selectServiceOutPathList(ServiceOutPath serviceOutPath);
+
+    /**
+     * 鏂板涓婚敭
+     * 
+     * @param serviceOutPath 涓婚敭
+     * @return 缁撴灉
+     */
+    public int insertServiceOutPath(ServiceOutPath serviceOutPath);
+
+    /**
+     * 淇敼涓婚敭
+     * 
+     * @param serviceOutPath 涓婚敭
+     * @return 缁撴灉
+     */
+    public int updateServiceOutPath(ServiceOutPath serviceOutPath);
+
+    /**
+     * 鎵归噺鍒犻櫎涓婚敭
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑涓婚敭涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteServiceOutPathByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎涓婚敭淇℃伅
+     * 
+     * @param id 涓婚敭涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteServiceOutPathById(Long id);
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceOutPathServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceOutPathServiceImpl.java
new file mode 100644
index 0000000..a63e655
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceOutPathServiceImpl.java
@@ -0,0 +1,87 @@
+package com.smartor.service.impl;
+
+import com.smartor.domain.ServiceOutPath;
+import com.smartor.mapper.ServiceOutPathMapper;
+import com.smartor.service.IServiceOutPathService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 涓婚敭Service涓氬姟灞傚鐞�
+ *
+ * @author lihu
+ * @date 2024-11-04
+ */
+@Service
+public class ServiceOutPathServiceImpl implements IServiceOutPathService {
+    @Autowired
+    private ServiceOutPathMapper serviceOutPathMapper;
+
+    /**
+     * 鏌ヨ涓婚敭
+     *
+     * @param id 涓婚敭涓婚敭
+     * @return 涓婚敭
+     */
+    @Override
+    public ServiceOutPath selectServiceOutPathById(Long id) {
+        return serviceOutPathMapper.selectServiceOutPathById(id);
+    }
+
+    /**
+     * 鏌ヨ涓婚敭鍒楄〃
+     *
+     * @param serviceOutPath 涓婚敭
+     * @return 涓婚敭
+     */
+    @Override
+    public List<ServiceOutPath> selectServiceOutPathList(ServiceOutPath serviceOutPath) {
+        return serviceOutPathMapper.selectServiceOutPathList(serviceOutPath);
+    }
+
+    /**
+     * 鏂板涓婚敭
+     *
+     * @param serviceOutPath 涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertServiceOutPath(ServiceOutPath serviceOutPath) {
+        return serviceOutPathMapper.insertServiceOutPath(serviceOutPath);
+    }
+
+    /**
+     * 淇敼涓婚敭
+     *
+     * @param serviceOutPath 涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateServiceOutPath(ServiceOutPath serviceOutPath) {
+        return serviceOutPathMapper.updateServiceOutPath(serviceOutPath);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎涓婚敭
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑涓婚敭涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteServiceOutPathByIds(Long[] ids) {
+        return serviceOutPathMapper.deleteServiceOutPathByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎涓婚敭淇℃伅
+     *
+     * @param id 涓婚敭涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteServiceOutPathById(Long id) {
+        return serviceOutPathMapper.deleteServiceOutPathById(id);
+    }
+}
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
new file mode 100644
index 0000000..19c6a8f
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.ServiceOutPathMapper">
+
+    <resultMap type="com.smartor.domain.ServiceOutPath" id="ServiceOutPathResult">
+        <result property="id" column="id"/>
+        <result property="param1" column="param1"/>
+        <result property="param2" column="param2"/>
+        <result property="param3" column="param3"/>
+        <result property="param5" column="param5"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="radix" column="radix"/>
+    </resultMap>
+
+    <sql id="selectServiceOutPathVo">
+        select id,
+               param1,
+               param2,
+               param3,
+               param5,
+               create_time,
+               update_time,
+               radix,
+               del_flag
+        from service_out_path
+    </sql>
+
+    <select id="selectServiceOutPathList" parameterType="com.smartor.domain.ServiceOutPath"
+            resultMap="ServiceOutPathResult">
+        <include refid="selectServiceOutPathVo"/>
+        <where>
+            <if test="param1 != null ">
+                and param1 = #{param1}
+            </if>
+            <if test="param2 != null ">
+                and param2 = #{param2}
+            </if>
+            <if test="param3 != null  and param3 != ''">
+                and param3 = #{param3}
+            </if>
+            <if test="param5 != null  and param5 != ''">
+                and param5 = #{param5}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="param5 != null  and param5 != ''">
+                and param5 = #{param5}
+            </if>
+            <if test="radix != null  and radix != ''">
+                and radix = #{radix}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectServiceOutPathById" parameterType="Long"
+            resultMap="ServiceOutPathResult">
+        <include refid="selectServiceOutPathVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertServiceOutPath" parameterType="com.smartor.domain.ServiceOutPath" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into service_out_path
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="param1 != null">param1,
+            </if>
+            <if test="param2 != null">param2,
+            </if>
+            <if test="param3 != null">param3,
+            </if>
+            <if test="param5 != null">param5,
+            </if>
+            <if test="radix != null">radix,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="param1 != null">#{param1},
+            </if>
+            <if test="param2 != null">#{param2},
+            </if>
+            <if test="param3 != null">#{param3},
+            </if>
+            <if test="param5 != null">#{param5},
+            </if>
+            <if test="radix != null">#{radix},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateServiceOutPath" parameterType="com.smartor.domain.ServiceOutPath">
+        update service_out_path
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="param1 != null">param1 =
+                #{param1},
+            </if>
+            <if test="param2 != null">param2 =
+                #{param2},
+            </if>
+            <if test="param3 != null">param3 =
+                #{param3},
+            </if>
+            <if test="param5 != null">param5 =
+                #{param5},
+            </if>
+            <if test="radix != null">radix =
+                #{radix},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteServiceOutPathById" parameterType="Long">
+        update service_out_path
+        <trim prefix="SET" suffixOverrides=",">
+            del_flag =1
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteServiceOutPathByIds" parameterType="String">
+        update service_out_path
+        <trim prefix="SET" suffixOverrides=",">
+            del_flag =1
+        </trim>
+        where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index 46be163..ae62737 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -52,6 +52,7 @@
         <result property="compensateDate" column="compensate_date"/>
         <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
         <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
+        <result property="compensateDate" column="compensate_date"/>
     </resultMap>
 
     <sql id="selectServiceTaskVo">
@@ -147,6 +148,7 @@
             <if test="libtemplatename != null  and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if>
             <if test="createBy != null  and createBy != ''">and create_by = #{createBy}</if>
             <if test="sendState != null  ">and send_state = #{sendState}</if>
+            <if test="compensateDate != null  ">and compensate_date = #{compensateDate}</if>
             <if test="leavehospitaldistrictname != null  ">and leavehospitaldistrictname =
                 #{leavehospitaldistrictname}
             </if>
@@ -228,7 +230,8 @@
             <if test="jsy != null  and jsy != ''">jsy,</if>
             <if test="leavehospitaldistrictname != null  ">leavehospitaldistrictname,</if>
             <if test="leavehospitaldistrictcode != null  ">leavehospitaldistrictcode,</if>
-            <if test="compensateDate != null  and compensateDate != ''">compensate_date</if>
+            <if test="compensateDate != null  and compensateDate != ''">compensate_date,</if>
+            <if test="compensateDate != null  ">compensate_date,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskName != null">#{taskName},</if>
@@ -277,6 +280,7 @@
             <if test="leavehospitaldistrictname != null  ">#{leavehospitaldistrictname},</if>
             <if test="leavehospitaldistrictcode != null  ">#{leavehospitaldistrictcode},</if>
             <if test="compensateDate != null  and compensateDate != ''">#{compensateDate}</if>
+            <if test="compensateDate != null  ">#{compensateDate},</if>
         </trim>
     </insert>
 
@@ -331,6 +335,7 @@
             <if test="leavehospitaldistrictcode != null  ">leavehospitaldistrictcode = #{leavehospitaldistrictcode},
             </if>
             <if test="compensateDate != null  and compensateDate != ''">compensate_date = #{compensateDate}</if>
+            <if test="compensateDate != null  ">compensate_date = #{compensateDate}</if>
         </trim>
         where taskid = #{taskid}
     </update>

--
Gitblit v1.9.3