liusheng
2025-02-17 32d595cb8c9b608f089c800815bf44210e25117c
往队列新增是,判断是往头部新增还是往尾部新增
已添加3个文件
已修改15个文件
533 ■■■■ 文件已修改
.idea/workspace.xml 117 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/HospTypeEnum.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/ServiceTaskTypeEnum.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/TaskTypeEnum.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtask.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceTaskInfo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/workspace.xml
@@ -4,13 +4,25 @@
    <option name="autoReloadType" value="SELECTIVE" />
  </component>
  <component name="ChangeListManager">
    <list default="true" id="d7325e97-ef1a-4946-a53e-fea72f2992f8" name="Changes" comment="代码提交">
    <list default="true" id="d7325e97-ef1a-4946-a53e-fea72f2992f8" name="Changes" comment="">
      <change afterPath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/enums/HospTypeEnum.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/enums/ServiceTaskTypeEnum.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/enums/TaskTypeEnum.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/resources/application-druid.yml" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/resources/application-druid.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/resources/application.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceTaskInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceTaskInfo.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -93,11 +105,11 @@
      <recent name="D:\daima\smartor\smartor-lisui\smartor\src\main\java\com\smartor\mapper" />
    </key>
    <key name="CopyClassDialog.RECENTS_KEY">
      <recent name="com.ruoyi.common.enums" />
      <recent name="com.smartor.domain" />
      <recent name="com.ruoyi.web.controller.smartor" />
      <recent name="com.smartor.service" />
      <recent name="com.smartor.service.impl" />
      <recent name="com.smartor.mapper" />
    </key>
  </component>
  <component name="RedisHelper">
@@ -228,9 +240,9 @@
    </configuration>
    <recent_temporary>
      <list>
        <item itemvalue="JUnit.MQTest.bb" />
        <item itemvalue="JUnit.FtpService.aa" />
        <item itemvalue="JUnit.FtpService" />
        <item itemvalue="JUnit.MQTest.bb" />
        <item itemvalue="JUnit.MQTest" />
      </list>
    </recent_temporary>
@@ -332,7 +344,7 @@
      <workItem from="1739411538383" duration="21710000" />
      <workItem from="1739501318573" duration="2373000" />
      <workItem from="1739507523684" duration="15221000" />
      <workItem from="1739766088739" duration="469000" />
      <workItem from="1739766088739" duration="19190000" />
    </task>
    <task id="LOCAL-00001" summary="代码提交">
      <created>1730948127775</created>
@@ -383,7 +395,14 @@
      <option name="project" value="LOCAL" />
      <updated>1734406665810</updated>
    </task>
    <option name="localTasksCounter" value="8" />
    <task id="LOCAL-00008" summary="往队列新增是,判断是往头部新增还是往尾部新增">
      <created>1739766619501</created>
      <option name="number" value="00008" />
      <option name="presentableId" value="LOCAL-00008" />
      <option name="project" value="LOCAL" />
      <updated>1739766619501</updated>
    </task>
    <option name="localTasksCounter" value="9" />
    <servers />
  </component>
  <component name="TypeScriptGeneratedFilesManager">
@@ -403,7 +422,8 @@
  <component name="VcsManagerConfiguration">
    <MESSAGE value="代码提交(长期任务电话完成)" />
    <MESSAGE value="代码提交" />
    <option name="LAST_COMMIT_MESSAGE" value="代码提交" />
    <MESSAGE value="往队列新增是,判断是往头部新增还是往尾部新增" />
    <option name="LAST_COMMIT_MESSAGE" value="往队列新增是,判断是往头部新增还是往尾部新增" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
@@ -425,12 +445,12 @@
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java</url>
          <line>116</line>
          <line>115</line>
          <option name="timeStamp" value="281" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java</url>
          <line>133</line>
          <line>132</line>
          <option name="timeStamp" value="285" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
@@ -525,7 +545,7 @@
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java</url>
          <line>206</line>
          <line>209</line>
          <option name="timeStamp" value="349" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
@@ -535,7 +555,7 @@
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java</url>
          <line>311</line>
          <line>266</line>
          <option name="timeStamp" value="352" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
@@ -640,27 +660,27 @@
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>523</line>
          <line>530</line>
          <option name="timeStamp" value="383" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>662</line>
          <line>669</line>
          <option name="timeStamp" value="384" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>634</line>
          <line>641</line>
          <option name="timeStamp" value="385" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1983</line>
          <line>1991</line>
          <option name="timeStamp" value="386" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1979</line>
          <line>1987</line>
          <option name="timeStamp" value="387" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
@@ -680,33 +700,68 @@
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>298</line>
          <option name="timeStamp" value="404" />
          <line>320</line>
          <option name="timeStamp" value="405" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>313</line>
          <option name="timeStamp" value="405" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>255</line>
          <line>256</line>
          <option name="timeStamp" value="412" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java</url>
          <line>205</line>
          <option name="timeStamp" value="415" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1440</line>
          <line>1442</line>
          <option name="timeStamp" value="416" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1493</line>
          <option name="timeStamp" value="417" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java</url>
          <line>339</line>
          <option name="timeStamp" value="420" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java</url>
          <line>206</line>
          <option name="timeStamp" value="421" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java</url>
          <line>51</line>
          <option name="timeStamp" value="425" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>2093</line>
          <option name="timeStamp" value="426" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java</url>
          <line>204</line>
          <option name="timeStamp" value="427" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>2102</line>
          <option name="timeStamp" value="428" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1489</line>
          <option name="timeStamp" value="417" />
          <line>1510</line>
          <option name="timeStamp" value="429" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java</url>
          <line>107</line>
          <option name="timeStamp" value="431" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-method">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java</url>
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
@@ -61,12 +61,11 @@
     */
    @ApiOperation("新增任务")
    @PostMapping("/generalInterfaceAddTask")
    public AjaxResult generalInterfaceAddTask(@RequestBody ServiceTaskInfo serviceSubtask) {
        ServiceTaskInfo serviceTaskVO = null;
    public AjaxResult generalInterfaceAddTask(@RequestBody ServiceTaskInfo serviceTaskInfo) {
        log.error("------serviceTaskInfo的值为:{}", serviceTaskInfo);
        Integer res = 0;
        try {
            serviceTaskVO = DtoConversionUtils.sourceToTarget(serviceSubtask, ServiceTaskInfo.class);
            res = svyTaskSingleService.insertTaskInfo(serviceTaskVO);
            res = svyTaskSingleService.insertTaskInfo(serviceTaskInfo);
        } catch (Exception e) {
            e.printStackTrace();
            log.error("serviceExternal---generalInterfaceAddTask出异常了:{}", e.getMessage());
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -204,6 +204,8 @@
    public List<PullTaskVO> taskPull() {
        log.error("电话任务拉取(雨绮)");
        List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull();
//        List<PullTaskVO> pullTaskVOList = new ArrayList<>();
        log.error("电话任务拉取(雨绮):{}", pullTaskVOList);
        return pullTaskVOList;
    }
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
@@ -48,7 +48,8 @@
    @Test
    public void bb() {
        int i = 61 /60;
        System.out.println(i);
    }
    public void aa(MultipartFile file) throws IOException {
ruoyi-admin/src/main/resources/application-druid.yml
@@ -18,13 +18,13 @@
        password: Smartor.2023
        driverClassName: com.mysql.cj.jdbc.Driver
        # æ–°åŽ
        # 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
        #        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
        #        å…¬å¸äº‘
        #        url: jdbc:mysql://116.62.18.175:6002/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
      #        url: jdbc:mysql://116.62.18.175:6002/smartor_lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
      #        username: hxsoft
      #        password: Hxerp2000
      #        driverClassName: com.mysql.cj.jdbc.Driver
@@ -151,12 +151,12 @@
qrpath: D:\qrcode
#公司内外链请求IP和端口号
req_path: 8095
localIP: 192.168.2.13
#req_path: 8095
#localIP: 192.168.2.13
#新华医院外链请求IP和端口号
#req_path: 8093
#localIP: https://wx.lihusmart.com
req_path: 8093
localIP: https://wx.lihusmart.com
#获取患者信息URL(华卓提供)
hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange
@@ -165,23 +165,23 @@
uploadSwitch: 1
##  æŒ‡å®šasr回调的url路径(本地)
ASRCallBackPath: http://192.168.2.13:8095/smartor/serviceSubtask/phoneCallBackYQ
#ASRCallBackPath: http://192.168.2.13:8095/smartor/serviceSubtask/phoneCallBackYQ
##挂断IP(本地)
hangup: http://192.168.2.13:8091/hangup
#hangup: http://192.168.2.13:8091/hangup
##fs所使用的阿里的app_key(本地)
#app_key_yq: ZurNHpaQLq6P55YS
#  æŒ‡å®šasr回调的url路径(新华)
#ASRCallBackPath: http://192.168.101.135:8095/smartor/serviceSubtask/phoneCallBackYQ
ASRCallBackPath: http://192.168.101.135:8095/smartor/serviceSubtask/phoneCallBackYQ
#挂断IP(新华)
#hangup: http://192.16.4.220:8091/hangup
hangup: http://192.16.4.220:8091/hangup
#fs所使用的阿里的app_key(新华)
app_key_yq: ZurNHpaQLq6P55YS
#本 åœ° çŸ­ä¿¡è¯·æ±‚地址(这个服务是我们自己写的)
xhsmsPath: http://192.168.2.13:8092/sendSms
#xhsmsPath: http://192.168.2.13:8092/sendSms
#新华短信请求地址(这个服务是我们自己写的)
#xhsmsPath: http://192.16.4.220:8092/sendSms
xhsmsPath: http://192.16.4.220:8092/sendSms
#帐号
xhsmsAccount: 911124
#接口密码
@@ -200,12 +200,14 @@
FTP_PASSWORD: xh@2023
#语音地址访问前缀(新华)
#voicePathPrefix: http://192.168.191.181:8095/profile/upload/vadio/
voicePathPrefix: http://192.168.191.181:8095/profile/upload/vadio/
#语音地址访问前缀(公司)
voicePathPrefix: http://192.168.2.13:8095/profile/upload/vadio/
#voicePathPrefix: http://192.168.2.13:8095/profile/upload/vadio/
#允许自动生成任务
createTaskServiceType: 2
#第个小时电话拨打的上限
phoneUpEveryHour: 10
phoneUpEveryHour: 12
#电话每天结束时间
phoneEndHour: 20
ruoyi-admin/src/main/resources/application.yml
@@ -72,7 +72,7 @@
  # redis é…ç½®
  redis:
    #    # åœ°å€ï¼ˆä¸½æ°´ï¼‰
    # host: 127.0.0.1
    #    host: 127.0.0.1
    # åœ°å€ï¼ˆå…¬å¸ï¼‰
    host: 116.62.18.175
    port: 6020
ruoyi-common/src/main/java/com/ruoyi/common/enums/HospTypeEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
package com.ruoyi.common.enums;
/**
 * å‘送类型枚举
 */
public enum HospTypeEnum {
    é—¨è¯Š("1", "门诊"), å‡ºé™¢("2", "、出院"), ä¸“ç—…("3", "专病"), å¤–部导入("4", "外部导入"), æ€¥è¯Š("5", "、急诊"), ä½é™¢("6", "住院"), ä½“检("7", "体检");
    private String code;
    private String desc;
    HospTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDescByCode(String desc) {
        HospTypeEnum[] organEnums = values();
        for (int i = 0; i < organEnums.length; i++) {
            HospTypeEnum organEnum = organEnums[i];
            if (organEnum.getDesc().equals(desc)) {
                return organEnum.getCode();
            }
        }
        return "0";
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
ruoyi-common/src/main/java/com/ruoyi/common/enums/ServiceTaskTypeEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
package com.ruoyi.common.enums;
/**
 * å‘送类型枚举
 */
public enum ServiceTaskTypeEnum {
    ä½“检随访("9", "体检随访 "), åŒ»æŠ€éšè®¿("10", "医技随访");
    private String code;
    private String desc;
    ServiceTaskTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDescByCode(String desc) {
        ServiceTaskTypeEnum[] organEnums = values();
        for (int i = 0; i < organEnums.length; i++) {
            ServiceTaskTypeEnum organEnum = organEnums[i];
            if (organEnum.getDesc().equals(desc)) {
                return organEnum.getCode();
            }
        }
        return "0";
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
ruoyi-common/src/main/java/com/ruoyi/common/enums/TaskTypeEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
package com.ruoyi.common.enums;
/**
 * å‘送类型枚举
 */
public enum TaskTypeEnum {
    ä½“检随访("8", "体检随访"),  å¿ƒç”µä¸“科随访("9", "、心电专科随访"), å½±åƒä¸“科随访("10", "影像专科随访");
    private String code;
    private String desc;
    TaskTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDescByCode(String desc) {
        TaskTypeEnum[] organEnums = values();
        for (int i = 0; i < organEnums.length; i++) {
            TaskTypeEnum organEnum = organEnums[i];
            if (organEnum.getDesc().equals(desc)) {
                return organEnum.getCode();
            }
        }
        return "0";
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java
@@ -72,7 +72,7 @@
     * @return ä¿®æ”¹åŽçš„ SQL
     */
    private String modifySqlWithorgidId(String originalSql, String orgid) {
        if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu"))
        if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu") || originalSql.contains("update sys_menu"))
            return originalSql;
        // æå– orgid çš„ WHERE å­å¥
        String whereClause = " orgid = '" + orgid + "'";
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -48,6 +48,7 @@
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
/**
 * å®šæ—¶ä»»åŠ¡è°ƒåº¦æµ‹è¯•
@@ -308,7 +309,13 @@
                ServiceSubtaskVO ivrTaskcall = new ServiceSubtaskVO();
                ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid());
                ivrTaskcall.setSendstate(2L);
                List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall);
                List<ServiceSubtask> subtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall);
                // æŒ‰ç…§ endtime ç¦»å½“前时间最近的排序
                List<ServiceSubtask> selectServiceSubtaskList = subtaskList.stream()
                        .sorted(Comparator.comparing(subtask -> Math.abs(subtask.getEndtime().getTime() - new Date().getTime())))
                        .collect(Collectors.toList());
                if (descByCode.equals("电话")) {
                    String value = "";
                    List<String> list = new ArrayList<>();
smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -35,6 +35,12 @@
    private Long taskid;
    /**
     * ç¬¬ä¸‰æ–¹ä»»åŠ¡ID
     */
    @ApiModelProperty(value = "第三方任务ID")
    private String taskGuid;
    /**
     * å‡ºé™¢ç—…人记录ID
     */
    @ApiModelProperty(value = "出院病人记录ID")
@@ -144,14 +150,14 @@
     * ä»»åŠ¡ç±»åž‹(门诊,住院,复诊…)
     */
    @Excel(name = "任务类型(0通知、1宣教、2门诊、3出院、4复诊、5体检、6问卷、7医技……)")
    @ApiModelProperty(value = "任务类型(0通知、1宣教、2门诊、3出院、4复诊、5体检、6问卷、7医技……)")
    @ApiModelProperty(value = "任务类型(0通知、1宣教、2门诊、3出院、4复诊、5体检、6问卷、7医技、8体检随访、9影像专科随访、10心电专科随访……)")
    private String type;
    /**
     * æœåŠ¡ç±»åž‹(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知)
     */
    @Excel(name = "服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知)")
    @ApiModelProperty(value = "服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知)")
    @ApiModelProperty(value = "服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知 9体检随访 10医技随访")
    private String serviceType;
    /**
@@ -420,7 +426,7 @@
     * å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)
     */
    @Excel(name = "  å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病 4.外部导入)")
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病 4.外部导入 5急诊、5住院、7体检)")
    private String hospType;
smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java
@@ -28,6 +28,13 @@
    @ApiModelProperty(value = "主键id")
    private Long subId;
    /**
     * ç¬¬ä¸‰æ–¹ä»»åŠ¡ID
     */
    @ApiModelProperty(value = "第三方任务ID")
    private String taskGuid;
    /**
     * å‘送人
     */
smartor/src/main/java/com/smartor/domain/ServiceTaskInfo.java
@@ -33,7 +33,7 @@
    private long taskstate;
    @ApiModelProperty(value = "任务ID")
    private long taskguid;
    private String taskguid;
    @ApiModelProperty(value = "任务名称")
    private String taskname;
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -51,6 +51,8 @@
    public Boolean updateServiceSubtaskByPatId(ServiceSubtask ServiceSubtask);
    public Boolean updateServiceSubtaskByCondition(ServiceSubtask ServiceSubtask);
    public Boolean updateServiceSubtaskByTaskGuid(ServiceSubtask ServiceSubtask);
    /**
     * åˆ é™¤å•一任务(随访)
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -124,6 +124,8 @@
    @Value("${phoneUpEveryHour}")
    private Integer phoneUpEveryHour;
    @Value("${phoneEndHour}")
    private Integer phoneEndHour;
    /**
     * æŸ¥è¯¢å•一任务(随访)
@@ -1452,7 +1454,9 @@
            //phoneCount()  é€šè¿‡ç»™å‡ºçš„æ¯ä¸ªå°æ—¶éœ€è¦æ‰“出的电话量,算出到晚上8点一点能打出多少个电话,获取到总量
            //如果需要立即执行的数据量大于一天要执行的上限,则只取上限的数量,其它的则放回redis中
            count = Math.min(phoneCount(), (int) size);
            cacheList = listOps.range("cache-0", 0, count - 1);
            if (count != 0) {
                cacheList = listOps.range("cache-0", 0, count - 1);
            }
        }
        log.error("任务拉取cache-0的值是多少:{}", cacheList);
@@ -1507,6 +1511,10 @@
                PullTaskVO pullTaskVO = new PullTaskVO();
                String subId = subIds.get(i).trim();
                ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(subId));
                if (ObjectUtils.isEmpty(serviceSubtask)) {
                    log.error("该subId有问题,在表中查询不到:{}", subId);
                    continue;
                }
                ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
                IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid());
                if (ObjectUtils.isEmpty(ivrTaskTemplate)) continue;
@@ -2079,13 +2087,17 @@
        // å½“前时间
        LocalTime currentTime = LocalTime.now();
        // ç›®æ ‡æ—¶é—´ï¼ˆæ™šä¸Š 8 ç‚¹ï¼‰
        LocalTime targetTime = LocalTime.of(20, 0);
        LocalTime targetTime = LocalTime.of(phoneEndHour, 0);
        // è®¡ç®—当前时间到目标时间的时长
        Duration duration = Duration.between(currentTime, targetTime);
        // èŽ·å–å‰©ä½™æ—¶é—´çš„å°æ—¶æ•°
        long remainingHours = duration.toHours();
        long remainingHours = 0;
        long remainingMinutes = duration.toMinutes();
        //如果超过8点,就设置为0
        if (remainingHours < 0) remainingHours = 0;
        //距离结束时间小于20分钟,就不拉取了
        if (remainingMinutes < 20) remainingHours = 0;
        else if (remainingMinutes < 60 && remainingMinutes > 20) remainingHours = 1;
        else if (remainingMinutes > 60) remainingHours = remainingMinutes / 60;
        // è®¡ç®—剩余可以打的电话数
        int remainingCalls = (int) (remainingHours * phoneUpEveryHour);
        return remainingCalls;
smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -6,6 +6,9 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.ruoyi.common.enums.HospTypeEnum;
import com.ruoyi.common.enums.ServiceTaskTypeEnum;
import com.ruoyi.common.enums.TaskTypeEnum;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.http.HttpEntity;
@@ -16,6 +19,7 @@
import com.smartor.mapper.ServiceSubtaskMapper;
import com.smartor.service.IServiceTaskService;
import com.smartor.service.ISvyTaskSingleService;
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.extern.slf4j.Slf4j;
import okhttp3.OkHttpClient;
import okhttp3.Request;
@@ -201,69 +205,27 @@
        else if (isoperation == 3) serviceSubtaskMapper.deleteServiceSubtaskByCondition(taskId, patid);
    }
    @Override
    public int insertTaskInfo(ServiceTaskInfo serviceTaskVO) {
        if (ObjectUtils.isEmpty(serviceTaskVO)) {
            log.info("新增任务入参为空,请检查入参");
            throw new BaseException("新增任务入参为空,请检查入参");
        }
        Integer integer = 1;
        //ServiceSubtask serviceTask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class);
        //serviceTask.setTextParam(JSON.toJSONString(serviceTaskVO.getTextParam()));
        //将任务信息放到服务表中
        ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class);
        serviceSubtask.setTaskid(serviceTaskVO.getTaskguid());
        ServiceSubtask serviceSubtask = new ServiceSubtask();
        serviceSubtask.setTaskGuid(serviceTaskVO.getTaskguid());
        String type = "0";
        if (serviceTaskVO.getServicetype().equals("监测评估")) {
            type = "1";
        } else if (serviceTaskVO.getServicetype().equals("出院随访")) {
            type = "2";
        } else if (serviceTaskVO.getServicetype().equals("门诊随访")) {
            type = "3";
        } else if (serviceTaskVO.getServicetype().equals("宣教关怀")) {
            type = "4";
        } else if (serviceTaskVO.getServicetype().equals("复诊通知")) {
            type = "5";
        } else if (serviceTaskVO.getServicetype().equals("满意度调查")) {
            type = "6";
        } else if (serviceTaskVO.getServicetype().equals("患者报告")) {
            type = "7";
        } else if (serviceTaskVO.getServicetype().equals("其他通知")) {
            type = "8";
        }
        if (type.equals("0")) {
            type = serviceTaskVO.getServicetype();
        }
        if (StringUtils.isNotEmpty(serviceTaskVO.getServicetype()))
            type = ServiceTaskTypeEnum.getDescByCode(serviceTaskVO.getServicetype());
        serviceSubtask.setServiceType(type);
        //0、1宣教、2门诊、3出院、4复诊、5体检、6问卷、7医技
        String tasktype = "-1";
        if (serviceTaskVO.getTasktype().equals("通知")) {
            tasktype = "0";
        } else if (serviceTaskVO.getTasktype().equals("宣教")) {
            tasktype = "1";
        } else if (serviceTaskVO.getTasktype().equals("门诊")) {
            tasktype = "2";
        } else if (serviceTaskVO.getTasktype().equals("出院")) {
            tasktype = "3";
        } else if (serviceTaskVO.getTasktype().equals("复诊")) {
            tasktype = "4";
        } else if (serviceTaskVO.getTasktype().equals("体检")) {
            tasktype = "5";
        } else if (serviceTaskVO.getTasktype().equals("问卷")) {
            tasktype = "6";
        } else if (serviceTaskVO.getTasktype().equals("医技")) {
            tasktype = "7";
        }
        if (tasktype.equals("-1")) {
            tasktype = serviceTaskVO.getTasktype();
        }
        if (StringUtils.isNotEmpty(serviceTaskVO.getTasktype()))
            tasktype = TaskTypeEnum.getDescByCode(serviceTaskVO.getTasktype());
        serviceSubtask.setType(tasktype);
        serviceSubtask.setLabelstatus(serviceTaskVO.getTaskstate());
        serviceSubtask.setTaskName(serviceTaskVO.getTaskname());
        serviceSubtask.setTaskDesc(serviceTaskVO.getTaskdesc());
        serviceSubtask.setPreachform(serviceTaskVO.getExemode());
        //serviceSubtask.setUploadTime(serviceTaskVO.setUploadTime());
        serviceSubtask.setCreateBy(serviceTaskVO.getCreateBy());
        serviceSubtask.setCreateTime(serviceTaskVO.getCreateTime());
        serviceSubtask.setOperatorNo(serviceTaskVO.getOperatorno());
@@ -286,31 +248,25 @@
        serviceSubtask.setWechat(serviceTaskVO.getPatopenid());
        serviceSubtask.setInhospno(serviceTaskVO.getInhosno());
        String hosptype = "-1";
        if (serviceTaskVO.getVisittype().equals("门诊")) {
            hosptype = "1";
        } else if (serviceTaskVO.getVisittype().equals("出院")) {
            hosptype = "2";
        } else if (serviceTaskVO.getVisittype().equals("专病")) {
            hosptype = "3";
        } else if (serviceTaskVO.getVisittype().equals("外部导入")) {
            hosptype = "4";
        }
        if (hosptype.equals("-1")) {
            hosptype = serviceTaskVO.getVisittype();
        }
        hosptype = HospTypeEnum.getDescByCode(serviceTaskVO.getVisittype());
        serviceSubtask.setHospType(hosptype);
        serviceSubtask.setHospno(serviceTaskVO.getVisitno());
        serviceSubtask.setAdmindate(serviceTaskVO.getVisittime());
        serviceSubtask.setRoomno(serviceTaskVO.getRoomno());
        serviceSubtask.setBedNo(serviceTaskVO.getBedno());
        serviceSubtask.setDeptname(serviceTaskVO.getDeptname());
        //serviceSubtask.setSendname(serviceTaskVO.gets());
        //serviceSubtask.setPatid(serviceTaskVO.getPid());
        serviceSubtask.setSendstate(1L);
        //serviceSubtask.setHospType(serviceTask.getHospType());
        serviceSubtask.setCreateTime(new Date());
        serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
        integer = serviceSubtask.getId().intValue();
        //先查询一遍,该taskGuid是否存在
        ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
        serviceSubtaskVO.setTaskGuid(serviceTaskVO.getGuid());
        List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO);
        if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
            serviceSubtaskMapper.updateServiceSubtaskByTaskGuid(serviceSubtask);
        } else {
            serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
        }
        Integer integer = serviceSubtask.getId().intValue();
        log.error("插入的ID是:{}", integer);
        return integer;
    }
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -38,6 +38,7 @@
        <result property="orgid" column="orgid"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="taskGuid" column="task_guid"/>
        <result property="textParam" column="text_param"/>
        <result property="preachform" column="preachform"/>
        <result property="bedNo" column="bed_no"/>
@@ -85,6 +86,7 @@
    <sql id="selectServiceSubtaskVo">
        select id,
               hosp_type,
               task_guid,
               patfrom,
               inhospid,
               suggest,
@@ -248,6 +250,7 @@
            <if test="remark != null">and remark = #{remark}</if>
            <if test="suggest != null">and suggest = #{suggest}</if>
            <if test="createBy != null">and create_by = #{createBy}</if>
            <if test="taskGuid != null">and task_guid = #{taskGuid}</if>
        </where>
        <if test="serviceType != null  and serviceType != ''and serviceType != '2'and serviceType != '3'">order by
            long_send_time desc
@@ -336,6 +339,7 @@
            <if test="sendstate != null ">sendstate,</if>
            <if test="inhospid != null ">inhospid,</if>
            <if test="patfrom != null ">patfrom,</if>
            <if test="taskGuid != null ">task_guid,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sendname != null">#{sendname},</if>
@@ -408,6 +412,7 @@
            <if test="sendstate != null ">#{sendstate},</if>
            <if test="inhospid != null ">#{inhospid},</if>
            <if test="patfrom != null ">#{patfrom},</if>
            <if test="taskGuid != null ">#{taskGuid},</if>
        </trim>
    </insert>
@@ -484,6 +489,7 @@
            <if test="suggest != null ">suggest=#{suggest},</if>
            <if test="inhospid != null ">inhospid=#{inhospid},</if>
            <if test="patfrom != null ">patfrom=#{patfrom},</if>
            <if test="taskGuid != null ">task_guid=#{taskGuid},</if>
        </trim>
        where id = #{id}
    </update>
@@ -561,6 +567,7 @@
            <if test="suggest != null ">suggest=#{suggest},</if>
            <if test="inhospid != null ">inhospid=#{inhospid},</if>
            <if test="patfrom != null ">patfrom=#{patfrom},</if>
            <if test="taskGuid != null ">taskGuid=#{taskGuid},</if>
        </trim>
        where patid = #{patid} and taskid = #{taskid}
    </update>
@@ -638,9 +645,90 @@
            <if test="suggest != null ">suggest=#{suggest},</if>
            <if test="inhospid != null ">inhospid=#{inhospid},</if>
            <if test="patfrom != null ">patfrom=#{patfrom},</if>
            <if test="taskGuid != null ">task_guid=#{taskGuid},</if>
        </trim>
        where patid = #{patid} and taskid = #{taskid}
    </update>
    <update id="updateServiceSubtaskByTaskGuid" parameterType="com.smartor.domain.ServiceSubtask">
        update service_subtask
        <trim prefix="SET" suffixOverrides=",">
            <if test="sendname != null">sendname = #{sendname},</if>
            <if test="phone != null">phone = #{phone},</if>
            <if test="sex != null">sex = #{sex},</if>
            <if test="sendstate != null ">sendstate = #{sendstate},</if>
            <if test="age != null">age = #{age},</if>
            <if test="sfzh != null">sfzh = #{sfzh},</if>
            <if test="addr != null">addr = #{addr},</if>
            <if test="senderdetail != null">senderdetail = #{senderdetail},</if>
            <if test="type != null">type = #{type},</if>
            <if test="taskid != null">taskid = #{taskid},</if>
            <if test="templateid != null">templateid = #{templateid},</if>
            <if test="templatename != null">templatename = #{templatename},</if>
            <if test="senddate != null">senddate = #{senddate},</if>
            <if test="senduuid != null">senduuid = #{senduuid},</if>
            <if test="result != null">result = #{result},</if>
            <if test="finishtime != null">finishtime = #{finishtime},</if>
            <if test="recordid != null">recordid = #{recordid},</if>
            <if test="exrecallcount != null">exrecallcount = #{exrecallcount},</if>
            <if test="pulltime != null">pulltime = #{pulltime},</if>
            <if test="deptcode != null">deptcode = #{deptcode},</if>
            <if test="labelstatus != null">labelstatus = #{labelstatus},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="textParam != null">text_param = #{textParam},</if>
            <if test="preachform != null">preachform = #{preachform},</if>
            <if test="bedNo != null">bed_no = #{bedNo},</if>
            <if test="sendType != null  and sendType != ''">send_type = #{sendType},</if>
            <if test="taskName != null  and taskName != ''">task_name = #{taskName},</if>
            <if test="taskDesc != null  and taskDesc != ''">task_desc = #{taskDesc},</if>
            <if test="operatorNo != null  and operatorNo != ''">operator_no = #{operatorNo},</if>
            <if test="operator != null  and operator != ''">operator = #{operator},</if>
            <if test="hospType != null  and hospType != ''">hosp_type = #{hospType},</if>
            <if test="hospno != null  and hospno != ''">hospno = #{hospno},</if>
            <if test="wechat != null  and wechat != ''">wechat = #{wechat},</if>
            <if test="roomno != null  and roomno != ''">roomno = #{roomno},</if>
            <if test="admindate != null  and admindate != ''">admindate = #{admindate},</if>
            <if test="deptname != null  and deptname != ''">deptname = #{deptname},</if>
            <if test="diagname != null  and diagname != ''">diagname = #{diagname},</if>
            <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
            <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
            <if test="patid != null ">patid = #{patid},</if>
            <if test="openid != null ">openid = #{openid},</if>
            <if test="longSendTime != null ">long_send_time = #{longSendTime},</if>
            <if test="serviceType != null ">service_type = #{serviceType},</if>
            <if test="score != null ">score = #{score},</if>
            <if test="submit != null ">submit = #{submit},</if>
            <if test="leavehospitaldistrictcode != null  and leavehospitaldistrictcode != ''">leavehospitaldistrictcode
                = #{leavehospitaldistrictcode},
            </if>
            <if test="leavehospitaldistrictname != null  and leavehospitaldistrictname != ''">leavehospitaldistrictname
                = #{leavehospitaldistrictname},
            </if>
            <if test="drname != null ">drname = #{drname},</if>
            <if test="drcode != null ">drcode = #{drcode},</if>
            <if test="endtime != null ">endtime = #{endtime},</if>
            <if test="starttime != null ">starttime = #{starttime},</if>
            <if test="excep != null ">excep = #{excep},</if>
            <if test="nurseName != null ">nurse_name=#{nurseName},</if>
            <if test="nurseId != null ">nurse_id=#{nurseId},</if>
            <if test="remark != null ">remark=#{remark},</if>
            <if test="suggest != null ">suggest=#{suggest},</if>
            <if test="inhospid != null ">inhospid=#{inhospid},</if>
            <if test="patfrom != null ">patfrom=#{patfrom},</if>
            <if test="taskGuid != null ">task_guid=#{taskGuid},</if>
        </trim>
        where task_guid = #{taskGuid}
    </update>
    <update id="deleteServiceSubtaskById" parameterType="Long">
        update service_subtask
@@ -749,6 +837,7 @@
               remark,
               inhospid,
               patfrom,
               task_guid,
               diagname
        FROM service_subtask,
             JSON_TABLE(send_time_slot, '$[*]' COLUMNS (