已修改8个文件
已添加1个文件
409 ■■■■ 文件已修改
.idea/encodings.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/pom.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-huizhou.yml 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceTaskScriptQues.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/encodings.xml
@@ -40,7 +40,6 @@
    <file url="file://$PROJECT_DIR$/ruoyi-system/src/main/resources" charset="UTF-8" />
    <file url="file://$PROJECT_DIR$/smartor/src/main/java" charset="UTF-8" />
    <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/common/DeepSeekApi.java" charset="UTF-8" />
    <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/common/DeepSeekApi.java" charset="GBK" />
    <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/PatMedOuthospProvisional.java" charset="UTF-8" />
    <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceSubtaskPreachform.java" charset="UTF-8" />
    <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/PatMedOuthospProvisionalMapper.java" charset="UTF-8" />
ruoyi-admin/pom.xml
@@ -55,6 +55,13 @@
            <version>9.2.1.jre8</version>
        </dependency>
        <!-- Kingbase8 JDBC驱动 -->
        <dependency>
            <groupId>cn.com.kingbase</groupId>
            <artifactId>kingbase8</artifactId>
            <version>8.6.0</version>
        </dependency>
        <!-- æ ¸å¿ƒæ¨¡å—-->
        <dependency>
            <groupId>com.ruoyi</groupId>
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
@@ -219,18 +219,21 @@
    public AjaxResult getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) {
        Long tid = null;
        Long pid = null;
        Long sid = null;
        log.info("getScriptInfoByCondition入参为:{}", serviceTaskScriptQues);
        try {
            tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key));
            if (StringUtils.isNotEmpty(serviceTaskScriptQues.getParam2()))
                pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key));
            if (StringUtils.isNotEmpty(serviceTaskScriptQues.getParam6()))
                sid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam6(), pri_key));
        } catch (Exception e) {
            log.error("getScriptInfoByCondition报错了:{}", e.getMessage());
        }
        log.info("tid和pid的值为:{},{}", tid, pid);
        if (StringUtils.isEmpty(serviceTaskScriptQues.getPatfrom())) serviceTaskScriptQues.setPatfrom("0");
        return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(), null));
        return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(), sid));
    }
ruoyi-admin/src/main/resources/application-huizhou.yml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,249 @@
# æ•°æ®æºé…ç½®
spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    #    driverClassName: com.mysql.cj.jdbc.Driver
    druid:
      # ä¸»åº“数据源
      master:
        url: jdbc:kingbase8://10.100.1.23:54321/smartor-huizhou?currentSchema=smartor,sys_catalog&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000
        username: smartor
        password: smartor.2025
        driverClassName: com.kingbase8.Driver
      # ä»Žåº“数据源
      slave:
      # ä»Žæ•°æ®æºå¼€å…³/默认关闭(公司)
      # enabled: true
      # url: jdbc:sqlserver://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor
      # username: sa
      # password: Hxerp2000
      # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
      # ä»Žæ•°æ®æºå¼€å…³/默认关闭(义乌二院)
      # enabled: true
      # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=IntelligentVoice;encrypt=false;SelectMethod=cursor
      # username: sa
      # password: sfxt#2023
      # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
      # åˆå§‹è¿žæŽ¥æ•°
      initialSize: 5
      # æœ€å°è¿žæŽ¥æ± æ•°é‡
      minIdle: 10
      # æœ€å¤§è¿žæŽ¥æ± æ•°é‡
      maxActive: 20
      # é…ç½®èŽ·å–è¿žæŽ¥ç­‰å¾…è¶…æ—¶çš„æ—¶é—´
      maxWait: 60000
      # é…ç½®é—´éš”多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      timeBetweenEvictionRunsMillis: 60000
      # é…ç½®ä¸€ä¸ªè¿žæŽ¥åœ¨æ± ä¸­æœ€å°ç”Ÿå­˜çš„æ—¶é—´ï¼Œå•位是毫秒
      minEvictableIdleTimeMillis: 300000
      # é…ç½®ä¸€ä¸ªè¿žæŽ¥åœ¨æ± ä¸­æœ€å¤§ç”Ÿå­˜çš„æ—¶é—´ï¼Œå•位是毫秒
      maxEvictableIdleTimeMillis: 900000
      # é…ç½®æ£€æµ‹è¿žæŽ¥æ˜¯å¦æœ‰æ•ˆ
      #      validationQuery: SELECT 1 FROM DUAL
      validationQuery: SELECT 1
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      webStatFilter:
        enabled: true
      statViewServlet:
        enabled: false
        # è®¾ç½®ç™½åå•,不填则允许所有访问
        allow:
        url-pattern: /druid/*
        # æŽ§åˆ¶å°ç®¡ç†ç”¨æˆ·åå’Œå¯†ç 
        login-username: lihu
        login-password: Lihu@1363419#$
      filter:
        stat:
          enabled: false
          # æ…¢SQL记录
          log-slow-sql: false
          slow-sql-millis: 1000
          merge-sql: true
        wall:
          config:
            multi-statement-allow: true
  # redis é…ç½®
  redis:
    host: 127.0.0.1
    port: 6379
    # æ•°æ®åº“索引
    database: 0
    # å¯†ç 
    password: Smartor
    # è¿žæŽ¥è¶…æ—¶æ—¶é—´
    timeout: 30s
    lettuce:
      pool:
        # è¿žæŽ¥æ± ä¸­çš„æœ€å°ç©ºé—²è¿žæŽ¥
        min-idle: 0
        # è¿žæŽ¥æ± ä¸­çš„æœ€å¤§ç©ºé—²è¿žæŽ¥
        max-idle: 8
        # è¿žæŽ¥æ± çš„æœ€å¤§æ•°æ®åº“连接数
        max-active: 8
        # #连接池最大阻塞等待时间(使用负值表示没有限制)
        max-wait: -1ms
# Swagger配置
swagger:
  # æ˜¯å¦å¼€å¯swagger
  enabled: false
  # è¯·æ±‚前缀
  pathMapping: /dev-api
# PageHelper分页插件
#pagehelper:
#  helperDialect: mysql
#  supportMethodsArguments: true
##  params: countSql;pageSizeZero=true
magic-api:
  web: /magic/web
  resource:
    type: database   # é…ç½®å­˜å‚¨åœ¨æ•°æ®åº“中
    tableName: magic_config  # æ•°æ®åº“中的表名
    prefix: /api
    readonly: false
  sql-column-case: camel
  show-sql: true #配置打印SQL
  page-config:
    size: size
    page: page
    default-page: 1
    default-size: 10
#钉钉的密钥
dingAppid: dingn8iip5ubj7clrrsv
dingAppSecret: qlEK8D3oOVwGPOTiBQIBYTqQVlAfy9S_qQizEQFjJdSScwemWFryg4gbneu-NqWD
# websocket超时时间
server:
websocket:
timeout=60000:
accessKeyId: LTAI5tPfc1VJzz7VuhzcBwug
accessKeySecret: gG1srKxPFDBNWe2oHfqmK1qsSQkf1e
signName: æ­å·žåˆ©æ¹–科技
#智能呼叫(上海)
phoneIP: http://124.220.50.51
phonePort: 8001
#杭州
hzphoneIP: http://121.43.112.160
hzphonePort: 8088
#电话线路(1 ä¸Šæµ·ï¼Œ2 æ­å·žï¼‰
phonePath: 2
#自己的电话号码
phoneMySelf: 83234089
##授权 id(杭州)
#app_id: hzgs
##授权 key(已加密过的 key)(杭州)
#app_key: 605453540c4a0a692fe07e1cae1162f3
#授权 id(杭州)
app_id: hz_ali
#授权 key(已加密过的 key)(杭州)
app_key: a2f3b5799d635216aa280362fafd8c35
pub_key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ==
#这个是后端的私钥,用不到
pri_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg==
#前端私钥(用不到了)
#pri_key: MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEApHTIe/StslZAT5Jzv8XClbrqox32pfaTrP5IOCRJ3FaH/UZsGgA/tsNBBEXq9eagqwPbJrjYfpdEtINcChrK4wIDAQABAkEAilDujdKshGGmlUZHs/NQRT6AOdDpsYxBiC4V76IVvQpw0IW6c4HGEvH4T+xRufika7/48L0eu0f06H+YtL5lgQIhANUd0a6oSsVxWifAjtKwMZcXD3OaIxQIQSCN4NT4VFY3AiEAxYxYrIhkIyg+UVw3WOSvBpXKxM4/WL9HRzkxDLvp2rUCIQCK23P8tgCJ5xJT5l3onw6goFDcBKkoazxsBqVgfjENPwIgWbuTd+OIYPPhwsE5ntZZrosSDO2GlsBkFzUiU59z7VUCIA0LL+9IFb+FWCl3DGTwIQ9SZYbv61T83LKjebUcSOfe
#二维码路径
qrpath: D:\qrcode
#公司内外链请求IP和端口号
#req_path: 8095
#localIP: 192.168.2.13
#新华医院外链请求IP和端口号
req_path: 8093
#localIP: https://wx.lihusmart.com
#丽水外链请求IP和端口号
localIP: https://lishuisf.health-y.cn
#获取患者信息URL(华卓提供)
hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange
# 0代表走默认的上传    1 ä»£ç èµ°æ–°åŽåŒ»é™¢çš„上传
uploadSwitch: 1
##  æŒ‡å®šasr回调的url路径(本地)
#ASRCallBackPath: http://192.168.2.13:8095/smartor/serviceSubtask/phoneCallBackYQ
##挂断IP(本地)
#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
#挂断IP(新华)
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.16.4.220:8092/sendSms
#帐号
xhsmsAccount: 911124
#接口密码
xhsmsPwd: zW5eXe
#虚拟接入码
xhsmsjrm: 1069055
##本地FTP连接
#FTP_SERVER: "192.168.2.13"
#FTP_USERNAME: voice
#FTP_PASSWORD: xh@2023
#新华FTP连接
FTP_SERVER: "192.16.4.220"
FTP_USERNAME: voice
FTP_PASSWORD: xh@2023
#语音地址访问前缀(新华)
voicePathPrefix: http://192.168.191.181:8095/profile/upload/vadio/
#语音地址访问前缀(公司)
#voicePathPrefix: http://192.168.2.13:8095/profile/upload/vadio/
#第个小时电话拨打的上限
phoneUpEveryHour: 12
#电话每天结束时间
phoneEndHour: 20
#新员工默认密码
defaultPwd: 123456
#是否需要根据疾病建立出院患者随访
createIcd10Visit: false
#admin管理员userId
isAdmin: 1,2,3,4,5,6,7,8,9,10,11,12,13
#处理投诉建议的部门编码
dealDeptCode:
#是否加密  0不加   1加密
isEncryp: 0
#文件上传地址
fileUpload:
profile:
# PageHelper分页插件
pagehelper:
  helperDialect: mysql
  supportMethodsArguments: true
  params: count=countSql
smartor/pom.xml
@@ -145,6 +145,12 @@
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- Kingbase8 JDBC驱动 -->
        <dependency>
            <groupId>cn.com.kingbase</groupId>
            <artifactId>kingbase8</artifactId>
            <version>8.6.0</version>
        </dependency>
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>ruoyi-system</artifactId>
smartor/src/main/java/com/smartor/domain/ServiceTaskScriptQues.java
@@ -46,6 +46,13 @@
    private String param4;
    /**
     * å­ä»»åŠ¡ID subId
     */
    @Excel(name = "子任务ID subId ")
    @ApiModelProperty(value = "子任务ID subId")
    private String param6;
    /**
     * æ‚£è€…来源
     */
    @Excel(name = "patfrom  ")
smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
@@ -63,10 +63,10 @@
    private String description;
    /**
     * é—®å·ä»‹ç»
     * é—®å·ä»‹ç»ï¼ˆå½“备注用)
     */
    @Excel(name = " é—®å·ä»‹ç» ")
    @ApiModelProperty(value = "问卷介绍")
    @Excel(name = " é—®å·ä»‹ç»ï¼ˆå½“备注用) ")
    @ApiModelProperty(value = "问卷介绍(当备注用)")
    private String introduce;
    /**
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -655,9 +655,16 @@
        ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubtaskTemplateVO.getSubId());
        if (serviceSubtask == null || serviceSubtask.getSendstate() != 2L)
            throw new BaseException("该任务已发送给患者,不能再进行修改模板");
        serviceSubtaskTemplateVO.getSvyTaskTemplateVO().setIntroduce("该问卷是替换后的问题,替换前的问题是:" + serviceSubtask.getTemplateid());
        Integer taskTempid = svyTaskTemplateService.saveOrUpdateTemplate(serviceSubtaskTemplateVO.getSvyTaskTemplateVO());
        if (taskTempid == null) return false;
        //每次都新建一个也可以,但新建之后要把之前的删除
        if (serviceSubtask.getType().equals("2")) {
            svyTaskTemplateService.deleteSvyTaskTemplateBySvyid(serviceSubtask.getTemplateid());
        } else if (serviceSubtask.getType().equals("1"))
            ivrTaskTemplateService.deleteIvrTaskTemplateByID(serviceSubtask.getTemplateid());
        String tempName = svyTaskTemplateService.selectSvyTaskTemplateBySvyid(Long.valueOf(taskTempid)).getSvyname();
        serviceSubtask.setTemplateid(taskTempid.longValue());
@@ -1731,19 +1738,19 @@
                        continue;
                    }
                    //2-AI识别
                    SysConfig configVoiceMatchType = new SysConfig();
                    configVoiceMatchType.setOrgid(phoneCallReqYQVO.getOrgid());
                    configVoiceMatchType.setConfigKey("sys.voice.match.type");
                    SysConfig matchType = sysConfigMapper.selectConfig(configVoiceMatchType);
//                    SysConfig configVoiceMatchType = new SysConfig();
//                    configVoiceMatchType.setOrgid(phoneCallReqYQVO.getOrgid());
//                    configVoiceMatchType.setConfigKey("sys.voice.match.type");
//                    SysConfig matchType = sysConfigMapper.selectConfig(configVoiceMatchType);
                    boolean matchedFlag = false;
                    if(ObjectUtils.isNotEmpty(matchType) && StringUtils.isNotEmpty(matchType.getConfigValue()) && matchType.getConfigValue().equals("2")){
                        int checkFlag = DeepSeekApi.matchQuestionAnswer(ivrTaskTemplateScriptVO.getScriptContent(),
                                phoneCallReqYQVO.getAsrtext(),
                                ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetvalue());
                        if(checkFlag == 1){
                            matchedFlag = true;
                        }
                    }else {
//                    if (ObjectUtils.isNotEmpty(matchType) && StringUtils.isNotEmpty(matchType.getConfigValue()) && matchType.getConfigValue().equals("2")) {
//                        int checkFlag = DeepSeekApi.matchQuestionAnswer(ivrTaskTemplateScriptVO.getScriptContent(),
//                                phoneCallReqYQVO.getAsrtext(),
//                                ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetvalue());
//                        if (checkFlag == 1) {
//                            matchedFlag = true;
//                        }
//                    } else {
                        //包含
                        Matcher matcher = null;
                        if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) {
@@ -1760,7 +1767,7 @@
                        if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
                            matchedFlag = true;
                        }
                    }
//                    }
                    //说明匹配正确了
                    if(matchedFlag){
                        //这里应该先判断类型,去再修改,设置IsUserOperation是单选题的改法
@@ -4862,7 +4869,7 @@
                ServiceTaskdept serviceTaskdept = new ServiceTaskdept();
                if (ObjectUtils.isNotEmpty(serviceTaskVo.getDeptcode())) {
                    serviceTaskdept.setDeptType("1");
                    serviceTaskdept.setDeptCode(serviceTask.getDeptcode());
                    serviceTaskdept.setDeptCode(serviceTaskVo.getDeptcode());
                }
                if (ObjectUtils.isNotEmpty(serviceTaskVo.getLeavehospitaldistrictcode())) {
                    serviceTaskdept.setDeptType("2");
@@ -4875,10 +4882,10 @@
                if (!CollectionUtils.isEmpty(serviceTaskdepts)) {
                    PatArchive patArchive = new PatArchive();
                    patArchive.setId(-1L);
                    patArchive.setId(999999999L);
                    patArchive.setName("虚拟患者");
                    //封装serviceSubtask
                    ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, patArchive);
                    ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, serviceTaskdepts.get(0), patArchive);
                    int i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
                    //根据生成外链
                    if (ObjectUtils.isNotEmpty(serviceSubtask.getTaskid()) && ObjectUtils.isNotEmpty(serviceSubtask.getPatid()) && ObjectUtils.isNotEmpty(serviceSubtask.getId())) {
@@ -4912,7 +4919,7 @@
        return content;
    }
    public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatArchive patArchive) {
    public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, ServiceTaskdept serviceTaskdept, PatArchive patArchive) {
        ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class);
        serviceSubtask.setTaskid(serviceTask.getTaskid());
        if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid()))
@@ -4921,10 +4928,13 @@
//        serviceSubtask.setNurseName(patMedInhosp1.getNurseName());
//        serviceSubtask.setDrcode(patMedInhosp1.getDrcode());
//        serviceSubtask.setDrname(patMedInhosp1.getDrname());
        serviceSubtask.setDeptcode(serviceTask.getDeptcode());
        serviceSubtask.setDeptname(serviceTask.getDeptname());
        serviceSubtask.setLeavehospitaldistrictcode(serviceTask.getLeavehospitaldistrictcode());
        serviceSubtask.setLeavehospitaldistrictname(serviceTask.getLeavehospitaldistrictname());
        if(StringUtils.isNotEmpty(serviceTaskdept.getDeptType()) && serviceTaskdept.getDeptType().equals("1")){
            serviceSubtask.setDeptcode(serviceTaskdept.getDeptCode());
            serviceSubtask.setDeptname(serviceTaskdept.getDeptName());
        }else {
            serviceSubtask.setLeavehospitaldistrictcode(serviceTaskdept.getDeptCode());
            serviceSubtask.setLeavehospitaldistrictname(serviceTaskdept.getDeptName());
        }
        serviceSubtask.setTemplateid(serviceTask.getTemplateid());
        serviceSubtask.setTemplatename(serviceTask.getTemplatename());
        serviceSubtask.setPatid(patArchive.getId());
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
@@ -93,45 +93,45 @@
            resultMap="SvyTaskTemplateResult">
        <include refid="selectSvyTaskTemplateVo"/>
        where 1=1
            and del_flag = 0
            <if test="templateid != null ">and templateid = #{templateid}</if>
            <if test="id != null ">and id = #{id}</if>
            <if test="categoryid != null ">and categoryid = #{categoryid}</if>
            <if test="svycode != null  and svycode != ''">and svycode = #{svycode}</if>
            <if test="svyname != null  and svyname != ''">and svyname like concat('%', #{svyname}, '%')</if>
            <if test="description != null  and description != ''">and description = #{description}</if>
            <if test="introduce != null  and introduce != ''">and introduce = #{introduce}</if>
            <if test="submitprompt != null  and submitprompt != ''">and submitprompt = #{submitprompt}</if>
            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
            <if test="version != null ">and version = #{version}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''">and centerlibrarycode =
                #{centerlibrarycode}
            </if>
            <if test="centerlibraryid != null ">and centerlibraryid = #{centerlibraryid}</if>
            <if test="islocal != null ">and islocal = #{islocal}</if>
            <if test="isenable != null  and isenable != ''">and isenable = #{isenable}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="taskScriptId != null  and taskScriptId != ''">and task_script_id = #{taskScriptId}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="deptNames != null  and deptNames != ''">and dept_names = #{deptNames}</if>
            <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
            <if test="campus != null  and campus != ''">and campus = #{campus}</if>
            <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
            <if test="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
            <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
            <if test="reply != null  and reply != ''">and reply = #{reply}</if>
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="deptCode != null ">and dept_code = #{deptCode}</if>
            <if test="longTemp != null ">and long_temp = #{longTemp}</if>
            <if test="sendDay != null ">and send_day = #{sendDay}</if>
        and del_flag = 0
        <if test="templateid != null ">and templateid = #{templateid}</if>
        <if test="id != null ">and id = #{id}</if>
        <if test="categoryid != null ">and categoryid = #{categoryid}</if>
        <if test="svycode != null  and svycode != ''">and svycode = #{svycode}</if>
        <if test="svyname != null  and svyname != ''">and svyname like concat('%', #{svyname}, '%')</if>
        <if test="description != null  and description != ''">and description = #{description}</if>
        <if test="introduce != null  and introduce != ''">and introduce = #{introduce}</if>
        <if test="submitprompt != null  and submitprompt != ''">and submitprompt = #{submitprompt}</if>
        <if test="tag != null  and tag != ''">and tag = #{tag}</if>
        <if test="version != null ">and version = #{version}</if>
        <if test="centerlibrarycode != null  and centerlibrarycode != ''">and centerlibrarycode =
            #{centerlibrarycode}
        </if>
        <if test="centerlibraryid != null ">and centerlibraryid = #{centerlibraryid}</if>
        <if test="islocal != null ">and islocal = #{islocal}</if>
        <if test="isenable != null  and isenable != ''">and isenable = #{isenable}</if>
        <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        <if test="isupload != null ">and isupload = #{isupload}</if>
        <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
        <if test="taskScriptId != null  and taskScriptId != ''">and task_script_id = #{taskScriptId}</if>
        <if test="pid != null ">and pid = #{pid}</if>
        <if test="guid != null  and guid != ''">and guid = #{guid}</if>
        <if test="deptNames != null  and deptNames != ''">and dept_names = #{deptNames}</if>
        <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
        <if test="campus != null  and campus != ''">and campus = #{campus}</if>
        <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
        <if test="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
        <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
        <if test="reply != null  and reply != ''">and reply = #{reply}</if>
        <if test="taskid != null ">and taskid = #{taskid}</if>
        <if test="deptCode != null ">and dept_code = #{deptCode}</if>
        <if test="longTemp != null ">and long_temp = #{longTemp}</if>
        <if test="sendDay != null ">and send_day = #{sendDay}</if>
    </select>
    <select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult">
        <include refid="selectSvyTaskTemplateVo"/>
        where del_flag=0 and  id = #{id}
        where del_flag=0 and id = #{id}
    </select>
    <insert id="insertSvyTaskTemplate" parameterType="com.smartor.domain.SvyTaskTemplate" useGeneratedKeys="true"
@@ -265,8 +265,8 @@
    </update>
    <delete id="deleteSvyTaskTemplateBySvyid" parameterType="Long">
        delete
        from svy_task_template
        update svy_task_template
        set del_flag=1
        where id = #{id}
    </delete>