已删除1个文件
已修改27个文件
已添加1个文件
932 ■■■■ 文件已修改
.idea/encodings.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/DeepSeekApi.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/common/DeepSeekApi.java 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/encodings.xml
@@ -39,7 +39,8 @@
    <file url="file://$PROJECT_DIR$/ruoyi-system/src/main/java" charset="UTF-8" />
    <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/DeepSeekApi.java" charset="GBK" />
    <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/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -493,16 +493,18 @@
                        if (active.equals("sltd")) {
                            data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                            if (StringUtils.isNotEmpty(data)) {
                                ObjectMapper mapper = new ObjectMapper();
                                JsonNode root = mapper.readTree(data);
                                String status = root.get("result").get(0).get("status").asText();
                                if (status.equals("00000")) {
                                    s = "true";
                                } else {
                                    setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5");
                                    throw new BaseException("短信发送失败");
                                String[] pairs = data.split("&");
                                String resultVal = null;
                                for (String pair : pairs) {
                                    String[] kv = pair.split("=", 2);
                                    if ("result".equals(kv[0])) {
                                        resultVal = kv.length > 1 ? kv[1] : null;
                                        break;
                                    }
                                }
                                if ("0".equals(resultVal)) {
                                    s = "true";
                                }
                            } else {
                                setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5");
                                throw new BaseException("短信发送失败");
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -53,10 +53,14 @@
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:list')")
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("list")
    public TableDataInfo list(@RequestBody PatArchive patArchive) {
        PageUtils.startPageByPost(patArchive.getPageNum(), patArchive.getPageSize());
    public Map<String, Object> list(@RequestBody PatArchive patArchive) {
        patArchive.setPageNum(PageUtils.getOffset(patArchive.getPageNum(), patArchive.getPageSize()));
        List<PatArchive> list = patArchiveService.selectPatArchiveList(patArchive);
        return getDataTable(list);
        patArchive.setPageNum(null);
        patArchive.setPageSize(null);
        List<PatArchive> patArchives = patArchiveService.selectPatArchiveList(patArchive);
        return getDataTable3(patArchives.size(), list);
    }
    /**
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -137,7 +137,7 @@
            return buildRedirect(path + "/login");
        }
        String redirectUrl = path + "/loginSSO?token=" + loginToken + "&orgid=" + orgid + "&orgname=null&ZuHuID=null&deptCode=null";
        String redirectUrl = path + "/loginSSO?token=" + loginToken + "&orgid=" + orgid + "&campusid=" + campusid + "&orgname=null&ZuHuID=null&deptCode=null";
        log.info("【SSO登录】重定向地址:{}", redirectUrl);
        return buildRedirect(redirectUrl);
    }
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -1143,10 +1143,18 @@
                            //省立同德的短信发送方式
                            String data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                            if (StringUtils.isNotEmpty(data)) {
                                ObjectMapper mapper = new ObjectMapper();
                                JsonNode root = mapper.readTree(data);
                                String status = root.get("result").get(0).get("status").asText();
                                if (status.equals("00000")) {
                                // è§£æž result=0&description=成功&faillist= æ ¼å¼ï¼ˆresult=0成功,1失败)
                                log.info("【sfHandlle】省立同德短信发送返回:{}", data);
                                String[] pairs = data.split("&");
                                String resultVal = null;
                                for (String pair : pairs) {
                                    String[] kv = pair.split("=", 2);
                                    if ("result".equals(kv[0])) {
                                        resultVal = kv.length > 1 ? kv[1] : null;
                                        break;
                                    }
                                }
                                if ("0".equals(resultVal)) {
                                    isSuccess = "true";
                                }
                            }
smartor/src/main/java/com/smartor/DeepSeekApi.java
ÎļþÒÑɾ³ý
smartor/src/main/java/com/smartor/common/DeepSeekApi.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,178 @@
package com.smartor.common;
;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.apache.commons.lang3.StringUtils;
import java.io.IOException;
import java.util.*;
@Slf4j
public class DeepSeekApi {
    // æ›¿æ¢ä¸ºä½ è‡ªå·±çš„key
    private static final String API_KEY = "sk-4e489637e105411596be6c72e2dacdbd";
    private static final String API_URL = "https://api.deepseek.com/v1/chat/completions";
    public static void main(String[] args) {
        String questionText = "您好,请问您是患者本人还是家属?\n";
        String voiceText = "我自己";
//        List<String> options = new ArrayList<>(Arrays.asList("本人","亲属","其他"));
        String optionText = "亲属";
        Integer resp = matchQuestionAnswer(questionText, voiceText, optionText);
        System.out.println("DeepSeek返回结果:\n" + resp);
    }
    public static String chatCompletion(String systemPrompt, String userPrompt) {
        OkHttpClient client = new OkHttpClient();
        // 1. ç»„装消息体
        List<Map<String, String>> messages = new ArrayList<>();
        // ç³»ç»Ÿè§’色(可选,用于设定AI身份)
        Map<String, String> sysMsg = new HashMap<>();
        sysMsg.put("role", "system");
        sysMsg.put("content", systemPrompt);
        messages.add(sysMsg);
        // ç”¨æˆ·æé—®
        Map<String, String> userMsg = new HashMap<>();
        userMsg.put("role", "user");
        userMsg.put("content", userPrompt);
        messages.add(userMsg);
        // 2. è¯·æ±‚参数
        Map<String, Object> requestBody = new HashMap<>();
        requestBody.put("model", "deepseek-chat");
        requestBody.put("messages", messages);
        requestBody.put("temperature", 0.7); // éšæœºæ€§0~1,越低越严谨
        requestBody.put("max_tokens", 1024);
        // 3. æž„建请求
        String jsonBody = JSON.toJSONString(requestBody);
        RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonBody);
        Request request = new Request.Builder()
                .url(API_URL)
                .header("Authorization", "Bearer " + API_KEY)
                .header("Content-Type", "application/json")
                .post(body)
                .build();
        // 4. å‘送请求
        try (Response response = client.newCall(request).execute()) {
            if (!response.isSuccessful()) {
                return "请求失败,状态码:" + response.code() + ",错误信息:" + response.body().string();
            }
            String resJson = response.body().string();
            JSONObject jsonObj = JSON.parseObject(resJson);
            // æå–AI回答内容
            return jsonObj.getJSONArray("choices")
                    .getJSONObject(0)
                    .getJSONObject("message")
                    .getString("content");
        } catch (IOException e) {
            e.printStackTrace();
            return "接口调用异常:" + e.getMessage();
        }
    }
    /**
     * åˆ¤æ–­è¯­éŸ³æ–‡æœ¬æœ€æŽ¥è¿‘哪个选项,返回选项在列表中的下标。
     *
     * @param voiceText è¯­éŸ³è¯†åˆ«å¾—到的文本
     * @param options   å€™é€‰é€‰é¡¹åˆ—表
     * @return å‘½ä¸­é€‰é¡¹çš„下标(从 0 å¼€å§‹ï¼‰ï¼›æ— æ³•匹配任一选项时返回 {@code -1}
     */
    public static int matchOptionIndex(String questionText, String voiceText, List<String> options) {
        if (StringUtils.isBlank(voiceText) || options == null || options.isEmpty()) {
            return -1;
        }
        // åªæœ‰ä¸€ä¸ªé€‰é¡¹æ—¶æ— éœ€è°ƒç”¨æ¨¡åž‹
        if (options.size() == 1) {
            return 0;
        }
        StringBuilder optionText = new StringBuilder();
        for (int i = 0; i < options.size(); i++) {
            optionText.append(i + 1).append(". ").append(options.get(i)).append('\n');
        }
        String systemPrompt = "\"你是一个专业的语音识别文本语义匹配助手。你的任务是判断用户的语音文本在语义上最符合的选项。用户会给出一段语音识别文本和若干个带编号的选项,"
                + "请判断这段文本在语义上最接近哪一个选项。只允许从给定选项中选择,"
                + "不要做任何解释。直接输出最匹配选项的编号数字;若没有任何选项与文本相关,则输出 0。";
        String userPrompt = "请根据以下信息进行语义匹配判断:\n" +
                "- é—®é¢˜æ–‡æœ¬ï¼š" + questionText + "\n\n"
                + "- è¯­éŸ³è¯†åˆ«æ–‡æœ¬ï¼š" + voiceText + "\n\n"
                + "- é€‰é¡¹ï¼š\n" + optionText
                + "\n请只输出一个数字(最匹配选项的编号,没有匹配则输出 0)。";
        String content = chatCompletion(systemPrompt, userPrompt);
        if (StringUtils.isBlank(content)) {
            return -1;
        }
        Integer number = extractFirstNumber(content);
        if (number == null || number <= 0 || number > options.size()) {
            log.warn("DeepSeek é€‰é¡¹åŒ¹é…æœªå‘½ä¸­ï¼ŒvoiceText={}, options={}, modelReturn={}", voiceText, options, content);
            return -1;
        }
        return number - 1;
    }
    /**
     * åˆ¤æ–­è¯­éŸ³æ–‡æœ¬æœ€æŽ¥è¿‘哪个选项,返回选项在列表中的下标。
     *
     * @param questionText è¯­éŸ³è¯†åˆ«å¾—到的文本
     * @param answerText   ç­”案文本
     * @param optionText   é€‰é¡¹æ–‡æœ¬
     * @return å‘½ä¸­é€‰é¡¹çš„下标(从 0 å¼€å§‹ï¼‰ï¼›æ— æ³•匹配任一选项时返回 {@code -1}
     */
    public static int matchQuestionAnswer(String questionText, String answerText, String optionText) {
        if (StringUtils.isBlank(questionText) || StringUtils.isBlank(answerText) || StringUtils.isBlank(optionText)) {
            return -1;
        }
        String systemPrompt = "\"你是一个专业的语音识别文本语义匹配助手。你的任务是判断用户的语音文本在语义上最符合的选项。用户会给出一段语音识别文本和选项文本,"
                + "请判断这段文本在语义上是否匹配选项, åŒ¹é…åˆ™è¾“出 1,没有匹配则输出 0, åªå…è®¸è¾“出1或者0,"
                + "不要做任何解释。直接输出最匹配选项的编号数字;若没有任何选项与文本相关,则输出 0。";
        String userPrompt = "请根据以下信息进行语义匹配判断:\n" +
                "- é—®é¢˜æ–‡æœ¬ï¼š" + questionText + "\n\n"
                + "- è¯­è¨€è¯†åˆ«æ–‡æœ¬ï¼š" + answerText + "\n\n"
                + "- é€‰é¡¹æ–‡æœ¬ï¼š" + optionText + "\n\n"
                + "\n请只输出一个数字(匹配则输出 1,没有匹配则输出 0,只允许输出1或者0)。";
        String content = chatCompletion(systemPrompt, userPrompt);
        if (StringUtils.isBlank(content)) {
            return -1;
        }
        return extractFirstNumber(content);
    }
    /**
     * ä»Žæ¨¡åž‹å›žå¤ä¸­æå–第一个整数。模型偶尔会回复 â€œé€‰é¡¹2” â€œ2。” ä¹‹ç±»ï¼Œåšä¸€æ¬¡å…œåº•解析。
     */
    private static Integer extractFirstNumber(String text) {
        List<Character> digits = new ArrayList<>();
        for (int i = 0; i < text.length(); i++) {
            char c = text.charAt(i);
            if (c >= '0' && c <= '9') {
                digits.add(c);
            } else if (!digits.isEmpty()) {
                break;
            }
        }
        if (digits.isEmpty()) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (char c : digits) {
            sb.append(c);
        }
        try {
            return Integer.parseInt(sb.toString());
        } catch (NumberFormatException e) {
            return null;
        }
    }
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
@@ -356,6 +356,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
//    /**
//     * é—®é¢˜ç»“果(给“值类型”是文本或者数值用的)
//     */
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
@@ -388,6 +388,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    /**
     * è¯æœ¯é€‰é¡¹
     */
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
@@ -343,6 +343,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    /**
     * é—®é¢˜é€‰é¡¹
     */
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
@@ -375,6 +375,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    /**
     * è¯æœ¯é€‰é¡¹
     */
smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java
@@ -246,7 +246,7 @@
     * å¤„理详细说明(处理科室)
     */
    @ApiModelProperty("处理详细说明(处理科室)")
    @Excel(name = "处理详细说明", readConverterExp = "处=理科室")
    @Excel(name = "处理详细说明", readConverterExp = "处理科室")
    private String handledesc;
    /**
@@ -360,5 +360,23 @@
    @ApiModelProperty("问题维度")
    private String dimension;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
}
smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java
@@ -35,6 +35,40 @@
    private String sendname;
    /**
     * å¹´é¾„
     */
    @Excel(name = "年龄 ")
    @ApiModelProperty(value = "年龄")
    private Long age;
    /**
     * æ€§åˆ«
     */
    @ApiModelProperty(value = "性别")
    private Long sex;
    /**
     * æ€§åˆ«
     */
    @Excel(name = "性别")
    @ApiModelProperty(value = "性别")
    private String sexName;
    /**
     * å°±è¯Šç¼–号(对应的outhospno、inhospno)
     */
//    @Excel(name = "就诊编号")
    @ApiModelProperty(value = "就诊编号(对应的outhospno、inhospno)")
    private String hospno;
    /**
     * ç—…历号
     */
    @Excel(name = "病历号")
    @ApiModelProperty(value = "患者编号(病历号)")
    private String patno;
    /**
     * å‡ºé™¢æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java
@@ -121,6 +121,13 @@
    private Long sex;
    /**
     * æ€§åˆ«
     */
    @Excel(name = " æ€§åˆ«åç§°")
    @ApiModelProperty(value = "性别名称")
    private String sexName;
    /**
     * å¹´é¾„
     */
    @Excel(name = " å¹´é¾„ ")
@@ -447,6 +454,13 @@
    private String hospno;
    /**
     * æ‚£è€…编号
     */
    @Excel(name = "患者编号(病历号)")
    @ApiModelProperty(value = "患者编号(病历号)")
    private String patno;
    /**
     * å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)
     */
    @Excel(name = "  å°±è¯Šç±»åž‹ï¼ˆ1门诊  2出院)")
smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java
@@ -298,6 +298,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    /**
     * é—®åˆ¸é¢˜ç›®åˆ†ç±»ID集合
     */
smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java
@@ -315,6 +315,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    @Excel(name = "分类ID集合")
    @ApiModelProperty(value = "分类ID集合")
    private List<Long> categoryids;
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
@@ -262,6 +262,21 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    /**
     * é—®åˆ¸é¢˜ç›®åˆ†ç±»ID集合
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
@@ -351,6 +351,22 @@
    @ApiModelProperty(value = "报备科室编码(如果多个科室用逗号分割)")
    private String reportDeptCode;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
    /**
     * é—®åˆ¸é¢˜ç›®åˆ†ç±»ID集合
     */
smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java
@@ -34,7 +34,7 @@
    @ApiModelProperty("处理科室名称")
    @Excel(name = "处理科室名称")
    private String todeptname;
    /**
     * é—®é¢˜ç±»åž‹:语音、问卷
     */
@@ -83,5 +83,21 @@
     */
    @ApiModelProperty("问题维度")
    private String dimension;
    @Excel(name = "责任科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人名称(如果多个科室用逗号分割)")
    private String dutyDeptPersonName;
    @Excel(name = "责任科室责任人编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "责任科室责任人编码(如果多个科室用逗号分割)")
    private String dutyDeptPersonCode;
    @Excel(name = "报备科室责任人名称(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室名称(如果多个科室用逗号分割)")
    private String reportDeptPersonName;
    @Excel(name = "报备科室编码(如果多个科室用逗号分割)")
    @ApiModelProperty(value = "报备科室责任人编码(如果多个科室用逗号分割)")
    private String reportDeptPersonCode;
}
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -1,8 +1,6 @@
package com.smartor.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ruoyi.common.core.domain.entity.SysDept;
@@ -10,8 +8,6 @@
import com.ruoyi.common.core.domain.entity.SysUserDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.AesUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
@@ -21,7 +17,6 @@
import com.smartor.service.IPatMedOuthospService;
import com.smartor.service.IServiceExternalService;
import lombok.extern.slf4j.Slf4j;
import netscape.javascript.JSObject;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -30,8 +25,6 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
@@ -441,12 +434,6 @@
        ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true);
        ExternalInDeptPatientInfo externalInDeptPatientInfo = BeanUtil.mapToBean(RuKeXX, ExternalInDeptPatientInfo.class, true);
        ExternalInDeptPatientInfo externalJZInfo = BeanUtil.mapToBean(JiuZhenXX, ExternalInDeptPatientInfo.class, true);
        if(ObjectUtils.isNotEmpty(externalJZInfo)){
            externalInHospPatientInfo.setJingGuanYSID(externalJZInfo.getJingGuanYSID());
            externalInHospPatientInfo.setJingGuanYSXM(externalJZInfo.getJingGuanYSXM());
        }
        externalInHospPatientInfo.setZeRenHSID(externalInDeptPatientInfo.getZeRenHSID());
        externalInHospPatientInfo.setZeRenHSXM(externalInDeptPatientInfo.getZeRenHSXM());
        externalInHospPatientInfo.setZhuZhiYSID(externalInDeptPatientInfo.getZhuZhiYSID());
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -15,7 +15,6 @@
import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.mapper.*;
import com.smartor.service.*;
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
@@ -1020,6 +1019,10 @@
            subtaskDetailTrace.setCreateTime(new Date());
            subtaskDetailTrace.setUpdateTime(new Date());
            subtaskDetailTrace.setOrgid(selectServiceSubtaskList.get(0).getOrgid());
            subtaskDetailTrace.setDutyDeptPersonCode(svyTaskTemplateScriptVO.getDutyDeptPersonCode());
            subtaskDetailTrace.setDutyDeptPersonName(svyTaskTemplateScriptVO.getDutyDeptPersonName());
            subtaskDetailTrace.setReportDeptPersonCode(svyTaskTemplateScriptVO.getReportDeptPersonCode());
            subtaskDetailTrace.setReportDeptPersonName(svyTaskTemplateScriptVO.getReportDeptPersonName());
            Long existTraceId = existingTraceIdMap.get(subtaskDetailTrace.getScriptid());
            if (existTraceId != null) {
@@ -1293,6 +1296,10 @@
            subtaskDetailTrace.setCreateTime(new Date());
            subtaskDetailTrace.setUpdateTime(new Date());
            subtaskDetailTrace.setOrgid(selectServiceSubtaskList.get(0).getOrgid());
            subtaskDetailTrace.setDutyDeptPersonCode(ivrTaskTemplateScriptVO.getDutyDeptPersonCode());
            subtaskDetailTrace.setDutyDeptPersonName(ivrTaskTemplateScriptVO.getDutyDeptPersonName());
            subtaskDetailTrace.setReportDeptPersonCode(ivrTaskTemplateScriptVO.getReportDeptPersonCode());
            subtaskDetailTrace.setReportDeptPersonName(ivrTaskTemplateScriptVO.getReportDeptPersonName());
            ServiceSubtaskDetailTraceVO ssdt = new ServiceSubtaskDetailTraceVO();
            ssdt.setSubId(subtaskDetailTrace.getSubId());
@@ -1303,6 +1310,7 @@
                subtaskDetailTrace.setId(serviceSubtaskDetailTraces.get(0).getId());
                traceService.updateServiceSubtaskDetailTtrace(subtaskDetailTrace);
            } else traceService.insertServiceSubtaskDetailTtrace(subtaskDetailTrace);
        } else if (stt != null && stt.getIsabnormal() != null && stt.getIsabnormal() != 1L) {
            //这里主要是怕医护人员把异常选项改成了非异常的,这里就需要查一下这条数据是不是在满意度异常表,如果在,则要删除
            ServiceSubtaskDetailTraceVO subtaskDetailTraceVO = new ServiceSubtaskDetailTraceVO();
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -16,6 +16,7 @@
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.mapper.SysConfigMapper;
import com.smartor.common.DeepSeekApi;
import com.smartor.common.FtpService;
import com.smartor.common.MtSubmitSmUtil;
import com.smartor.config.PhoneUtils;
@@ -44,11 +45,9 @@
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
@@ -417,9 +416,74 @@
                    serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]);
                }
            }
            PatMedInhosp inhosp = patMedInhospMapper.selectPatMedInhospByInhospid(serviceSubtask.getInhospid());
            if (ObjectUtils.isNotEmpty(inhosp)) {
                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(inhosp.getPatid());
                if (ObjectUtils.isNotEmpty(patArchive)) {
                    Map<String, String> stringStringMap = calculateAge(patArchive.getBirthdate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now());
                    serviceSubtaskRes.setAge(StringUtils.isNotEmpty(stringStringMap.get("age")) ? Long.valueOf(stringStringMap.get("age")) : null);
                    serviceSubtaskRes.setSex(patArchive.getSex());
                    serviceSubtaskRes.setSexName(patArchive.getSex() != null ? (patArchive.getSex() == 1 ? "男" : "女") : null);
                }
                serviceSubtaskRes.setHospno(inhosp.getInhospno());
                serviceSubtaskRes.setPatno(inhosp.getPatno());
            }
            serviceSubtaskResList.add(serviceSubtaskRes);
        }
        return serviceSubtaskResList;
    }
    public Map<String, String> calculateAge(LocalDate birthdate, LocalDate today) {
        if (birthdate == null || today.isBefore(birthdate)) {
            return null;
        }
        Map<String, String> ageMap = new HashMap<>();
        Period period = Period.between(birthdate, today);
        long totalDays = ChronoUnit.DAYS.between(birthdate, today);
        long totalMonths = ChronoUnit.MONTHS.between(birthdate, today);
        int years = period.getYears();
        int months = period.getMonths();
        int days = period.getDays();
        String ageUnit;
        Integer age;
        String ageUnit2 = null;
        Integer age2 = null;
        if (totalDays < 90) {
            // å°äºŽ 1 ä¸ªæœˆï¼ŒæŒ‰å¤©è®¡ç®—
            ageUnit = "天";
            age = (int) totalDays;
            ageMap.put("age", age != null ? age.toString() : null);
            ageMap.put("ageUnit", ageUnit);
            ageMap.put("age2", null);
            ageMap.put("ageUnit2", null);
        } else if (totalMonths < 36) {
            // å°äºŽ 1 å¹´ï¼ŒæŒ‰æœˆ + å¤©è®¡ç®—
            ageUnit = "月";
            age = (int) totalMonths;
            ageUnit2 = "天";
            age2 = days;
            ageMap.put("age", age != null ? age.toString() : null);
            ageMap.put("ageUnit", ageUnit);
            ageMap.put("age2", age2 != null ? age2.toString() : null);
            ageMap.put("ageUnit2", ageUnit2);
        } else {
            // å¤§äºŽ 1 å¹´ï¼ŒæŒ‰å¹´ + æœˆè®¡ç®—
            ageUnit = "岁";
            age = years;
            ageUnit2 = "月";
            age2 = months;
            ageMap.put("age", age != null ? age.toString() : null);
            ageMap.put("ageUnit", ageUnit);
            ageMap.put("age2", age2 != null ? age2.toString() : null);
            ageMap.put("ageUnit2", ageUnit2);
        }
        return ageMap;
    }
    @Override
@@ -1666,20 +1730,39 @@
                    if (StringUtils.isEmpty(phoneCallReqYQVO.getAsrtext())) {
                        continue;
                    }
                    //包含
                    Matcher matcher = null;
                    if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) {
                        Pattern pattern = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex());
                        matcher = pattern.matcher(phoneCallReqYQVO.getAsrtext());
                    //2-AI识别
                    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 {
                        //包含
                        Matcher matcher = null;
                        if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) {
                            Pattern pattern = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex());
                            matcher = pattern.matcher(phoneCallReqYQVO.getAsrtext());
                        }
                        //不包含
                        Matcher matcher2 = null;
                        if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2())) {
                            Pattern pattern2 = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
                            matcher2 = pattern2.matcher(phoneCallReqYQVO.getAsrtext());
                        }
                        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;
                        }
                    }
                    //不包含
                    Matcher matcher2 = null;
                    if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2())) {
                        Pattern pattern2 = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
                        matcher2 = pattern2.matcher(phoneCallReqYQVO.getAsrtext());
                    }
                    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()) {
                        //说明匹配正确了
                    //说明匹配正确了
                    if(matchedFlag){
                        //这里应该先判断类型,去再修改,设置IsUserOperation是单选题的改法
                        log.info("匹配正确了吗--------------");
                        ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1);
@@ -4544,9 +4627,9 @@
    }
    @Override
    public List<ServiceSubtask> gethelibraryCountHyperlink(HeLibraryCountVO heLibraryCountVO){
    public List<ServiceSubtask> gethelibraryCountHyperlink(HeLibraryCountVO heLibraryCountVO) {
        String hyperLinkInfoType = heLibraryCountVO.getHyperLinkInfoType();
        if(StringUtils.isNotEmpty(hyperLinkInfoType)){
        if (StringUtils.isNotEmpty(hyperLinkInfoType)) {
            heLibraryCountVO.setSendstate(null);
            heLibraryCountVO.setIsFinished(null);
            switch (hyperLinkInfoType) {
@@ -4769,19 +4852,19 @@
        }
    }
    public String scanGenerateSubtask(ServiceTask serviceTaskVo){
    public String scanGenerateSubtask(ServiceTask serviceTaskVo) {
        String content = "";
        String ip = localIP;
        ServiceTask serviceTask = new ServiceTask();
        serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceTaskVo.getTaskid());
        if(ObjectUtils.isNotEmpty(serviceTask)){
        if (ObjectUtils.isNotEmpty(serviceTask)) {
            try {
                ServiceTaskdept serviceTaskdept = new ServiceTaskdept();
                if(ObjectUtils.isNotEmpty(serviceTaskVo.getDeptcode())){
                if (ObjectUtils.isNotEmpty(serviceTaskVo.getDeptcode())) {
                    serviceTaskdept.setDeptType("1");
                    serviceTaskdept.setDeptCode(serviceTask.getDeptcode());
                }
                if(ObjectUtils.isNotEmpty(serviceTaskVo.getLeavehospitaldistrictcode())){
                if (ObjectUtils.isNotEmpty(serviceTaskVo.getLeavehospitaldistrictcode())) {
                    serviceTaskdept.setDeptType("2");
                    serviceTaskdept.setDeptCode(serviceTaskVo.getLeavehospitaldistrictcode());
                }
@@ -4798,9 +4881,7 @@
                    ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, patArchive);
                    int i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
                    //根据生成外链
                    if (ObjectUtils.isNotEmpty(serviceSubtask.getTaskid()) &&
                            ObjectUtils.isNotEmpty(serviceSubtask.getPatid())
                            && ObjectUtils.isNotEmpty(serviceSubtask.getId())) {
                    if (ObjectUtils.isNotEmpty(serviceSubtask.getTaskid()) && ObjectUtils.isNotEmpty(serviceSubtask.getPatid()) && ObjectUtils.isNotEmpty(serviceSubtask.getId())) {
                        RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
                        String taskId = rsaPublicKeyExample.encryptedData(serviceSubtask.getTaskid().toString(), pub_key);
                        String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
@@ -456,6 +456,7 @@
            serviceSubtaskVO.setPatid(patid);
        }
        List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO);
        List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOS = null;
        if (CollectionUtils.isNotEmpty(serviceSubtaskList) && serviceSubtaskList.size() == 1) {
            if (serviceSubtaskList.get(0).getSendstate() == 3 && isFinish == true) {
                ServiceSubtask serviceSubtask = new ServiceSubtask();
@@ -464,22 +465,25 @@
                serviceSubtask.setTaskid(serviceTask.getTaskid());
                serviceSubtaskMapper.updateServiceSubtaskByPatId(serviceSubtask);
            }
        }
        //通过模板ID获取问题信息
        SvyTaskTemplateScript svyTaskTemplateScript = new SvyTaskTemplateScript();
        svyTaskTemplateScript.setTemplateID(Long.valueOf(serviceTask.getTemplateid()));
        if (serviceTask.getTemplateid() != null) svyTaskTemplateScript.setTemplateID(serviceTask.getTemplateid());
        svyTaskTemplateScript.setDelFlag("0");
        List<SvyTaskTemplateScript> svyTaskTemplateScripts = svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
        if (CollectionUtils.isEmpty(svyTaskTemplateScripts) || svyTaskTemplateScripts.size() == 0) {
            insertSvyTaskTempScript(null, serviceTask);
            svyTaskTemplateScripts = svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
            if (CollectionUtils.isEmpty(svyTaskTemplateScripts)) {
                throw new BaseException("请联系管理员,检查问题模板信息!");
            }
        }
        List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOS = DtoConversionUtils.sourceToTarget(svyTaskTemplateScripts, SvyTaskTemplateScriptVO.class);
            //通过模板ID获取问题信息
            SvyTaskTemplateScript svyTaskTemplateScript = new SvyTaskTemplateScript();
            svyTaskTemplateScript.setTemplateID(Long.valueOf(serviceTask.getTemplateid()));
            if (serviceSubtaskList.get(0).getTemplateid() != null)
                svyTaskTemplateScript.setTemplateID(serviceSubtaskList.get(0).getTemplateid());
            else if (serviceTask.getTemplateid() != null)
                svyTaskTemplateScript.setTemplateID(serviceTask.getTemplateid());
            svyTaskTemplateScript.setDelFlag("0");
            List<SvyTaskTemplateScript> svyTaskTemplateScripts = svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
            if (CollectionUtils.isEmpty(svyTaskTemplateScripts) || svyTaskTemplateScripts.size() == 0) {
                insertSvyTaskTempScript(null, serviceTask);
                svyTaskTemplateScripts = svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript);
                if (CollectionUtils.isEmpty(svyTaskTemplateScripts)) {
                    throw new BaseException("请联系管理员,检查问题模板信息!");
                }
            }
            svyTaskTemplateScriptVOS = DtoConversionUtils.sourceToTarget(svyTaskTemplateScripts, SvyTaskTemplateScriptVO.class);
        }
        //获取患者信息
        PatArchive patArchive = null;
        if (patfrom.equals("0")) patArchive = patArchiveMapper.selectPatArchiveByPatid(patid);
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -55,13 +55,20 @@
        <result property="reportDeptName" column="report_dept_code"/>
        <result property="isMydException" column="is_myd_exception"/>
        <result property="dimension" column="dimension"/>
        <result property="dutyDeptPersonName" column="duty_dept_person_name"/>
        <result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
        <result property="reportDeptPersonCode" column="report_dept_person_name"/>
        <result property="reportDeptPersonName" column="report_dept_person_code"/>
    </resultMap>
    <sql id="selectIvrLibaTemplateScriptVo">
        select id,
               scriptno,
               is_myd_exception,
               duty_dept_person_name,
               duty_dept_person_code,
               report_dept_person_name,
               report_dept_person_code,
               dimension,
               sort,
               script_assortname,
@@ -174,6 +181,18 @@
        <if test="scriptType != null">and script_type = #{scriptType}</if>
        <if test="sort != null">and sort = #{sort}</if>
        <if test="score != null">and score = #{score}</if>
        <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%', #{dutyDeptPersonName},
            '%')
        </if>
        <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%', #{dutyDeptPersonCode},
            '%')
        </if>
        <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%', #{reportDeptPersonName},
            '%')
        </if>
        <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode},
            '%')
        </if>
    </select>
@@ -187,6 +206,18 @@
                </foreach>
            </if>
            <if test="dimensionList == null ">and dimension IS NOT NULL </if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%', #{dutyDeptPersonName},
                '%')
            </if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%', #{dutyDeptPersonCode},
                '%')
            </if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%', #{reportDeptPersonName},
                '%')
            </if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode},
                '%')
            </if>
        </where>
    </select>
@@ -248,6 +279,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code,</if>
            <if test="isMydException != null  and isMydException != ''">is_myd_exception,</if>
            <if test="dimension != null  and dimension != ''">dimension,</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name,</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name,</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="scriptno != null">#{scriptno},</if>
@@ -298,6 +333,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''">#{reportDeptCode},</if>
            <if test="isMydException != null  and isMydException != ''">#{isMydException},</if>
            <if test="dimension != null  and dimension != ''">#{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">#{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
        </trim>
    </insert>
@@ -331,6 +370,10 @@
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name = #{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
            <if test="targetid != null">targetid = #{targetid},</if>
            <if test="scriptTopic != null">script_topic = #{scriptTopic},</if>
            <if test="nextScriptno != null">next_scriptno = #{nextScriptno},</if>
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
@@ -55,6 +55,10 @@
        <result property="reportDeptName" column="report_dept_code"/>
        <result property="dimension" column="dimension"/>
        <result property="isMydException" column="is_myd_exception"/>
        <result property="dutyDeptPersonName" column="duty_dept_person_name"/>
        <result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
        <result property="reportDeptPersonCode" column="report_dept_person_name"/>
        <result property="reportDeptPersonName" column="report_dept_person_code"/>
    </resultMap>
    <sql id="selectIvrTaskTemplateScriptVo">
@@ -67,6 +71,10 @@
               report_dept_name,
               report_dept_code,
               script_assortid,
               duty_dept_person_name,
               duty_dept_person_code,
               report_dept_person_name,
               report_dept_person_code,
               sort,
               ivrtext,
               script_type,
@@ -154,6 +162,22 @@
        <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
            #{branchNextscriptno}
        </if>
        <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%',
            #{dutyDeptPersonName},
            '%')
        </if>
        <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%',
            #{dutyDeptPersonCode},
            '%')
        </if>
        <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%',
            #{reportDeptPersonName},
            '%')
        </if>
        <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%',
            #{reportDeptPersonCode},
            '%')
        </if>
    </select>
    <select id="selectIvrTaskTemplateScriptByID" parameterType="Long" resultMap="IvrTaskTemplateScriptResult">
@@ -213,6 +237,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code,</if>
            <if test="dimension != null  and dimension != ''">dimension,</if>
            <if test="isMydException != null  and isMydException != ''">is_myd_exception,</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name,</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name,</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
@@ -263,6 +291,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''">#{reportDeptCode},</if>
            <if test="dimension != null  and dimension != ''">#{dimension},</if>
            <if test="isMydException != null  and isMydException != ''">#{isMydException},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">#{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
        </trim>
    </insert>
@@ -319,6 +351,10 @@
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">duty_dept_code = #{dutyDeptCode},</if>
            <if test="reportDeptName != null  and reportDeptName != ''">report_dept_name = #{reportDeptName},</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name = #{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -189,7 +189,6 @@
            <if test="idcardno != null  and idcardno != ''">and idcardno = #{idcardno}</if>
            <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
            <if test="telcode != null  and telcode != ''">and telcode = #{telcode}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="id != null  and id != ''">and id = #{id}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
@@ -214,7 +213,7 @@
            <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
            <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
            <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
            <if test="campusid != null ">and campusid = #{campusid}</if>
        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
    </select>
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml
@@ -55,10 +55,18 @@
        <result property="templateType" column="template_type"/>
        <result property="isMydException" column="is_myd_exception"/>
        <result property="dimension" column="dimension"/>
        <result property="dutyDeptPersonName" column="duty_dept_person_name"/>
        <result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
        <result property="reportDeptPersonCode" column="report_dept_person_name"/>
        <result property="reportDeptPersonName" column="report_dept_person_code"/>
    </resultMap>
    <sql id="selectServiceSubtaskDetailTtraceVo">
        select id,
               duty_dept_person_name,
               duty_dept_person_code,
               report_dept_person_name,
               report_dept_person_code,
               detail_id,
               is_myd_exception,
               dimension,
@@ -257,6 +265,18 @@
        <if test="isMydException != null ">
            and is_myd_exception = #{isMydException}
        </if>
        <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">
            and duty_dept_person_name like concat('%', #{dutyDeptPersonName}, '%')
        </if>
        <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">
            and duty_dept_person_code like concat('%', #{dutyDeptPersonCode}, '%')
        </if>
        <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">
            and report_dept_person_name like concat('%', #{reportDeptPersonName}, '%')
        </if>
        <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">
            and report_dept_person_code like concat('%', #{reportDeptPersonCode}, '%')
        </if>
    </select>
    <select id="tracedeallist" parameterType="com.smartor.domain.VO.DetailTraceDealVO"
@@ -292,6 +312,18 @@
        </if>
        <if test="dimension != null  and dimension != ''">
            and dimension = #{dimension}
        </if>
        <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">
            and duty_dept_person_name like concat('%', #{dutyDeptPersonName}, '%')
        </if>
        <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">
            and duty_dept_person_code like concat('%', #{dutyDeptPersonCode}, '%')
        </if>
        <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">
            and report_dept_person_name like concat('%', #{reportDeptPersonName}, '%')
        </if>
        <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">
            and report_dept_person_code like concat('%', #{reportDeptPersonCode}, '%')
        </if>
    </select>
@@ -406,6 +438,14 @@
            </if>
            <if test="isMydException != null">is_myd_exception,
            </if>
            <if test="dutyDeptPersonName != null">duty_dept_person_name,
            </if>
            <if test="dutyDeptPersonCode != null">duty_dept_person_code,
            </if>
            <if test="reportDeptPersonName != null">report_dept_person_name,
            </if>
            <if test="reportDeptPersonCode != null">report_dept_person_code,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="detailId != null">#{detailId},
@@ -507,6 +547,14 @@
            <if test="dimension != null">#{dimension},
            </if>
            <if test="isMydException != null">#{isMydException},
            </if>
            <if test="dutyDeptPersonName != null">#{dutyDeptPersonName},
            </if>
            <if test="dutyDeptPersonCode != null">#{dutyDeptPersonCode},
            </if>
            <if test="reportDeptPersonName != null">#{reportDeptPersonName},
            </if>
            <if test="reportDeptPersonCode != null">#{reportDeptPersonCode},
            </if>
        </trim>
    </insert>
@@ -664,6 +712,18 @@
            <if test="isMydException != null">is_myd_exception =
                #{isMydException},
            </if>
            <if test="dutyDeptPersonName != null">duty_dept_person_name =
                #{dutyDeptPersonName},
            </if>
            <if test="dutyDeptPersonCode != null">duty_dept_person_code =
                #{dutyDeptPersonCode},
            </if>
            <if test="reportDeptPersonName != null">report_dept_person_name =
                #{reportDeptPersonName},
            </if>
            <if test="reportDeptPersonCode != null">report_dept_person_code =
                #{reportDeptPersonCode},
            </if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
@@ -50,6 +50,10 @@
        <result property="dutyDeptCode" column="duty_dept_code"/>
        <result property="reportDeptCode" column="report_dept_name"/>
        <result property="reportDeptName" column="report_dept_code"/>
        <result property="dutyDeptPersonName" column="duty_dept_person_name"/>
        <result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
        <result property="reportDeptPersonCode" column="report_dept_person_name"/>
        <result property="reportDeptPersonName" column="report_dept_person_code"/>
        <result property="isMydException" column="is_myd_exception"/>
        <result property="dimension" column="dimension"/>
@@ -64,6 +68,10 @@
               duty_dept_code,
               report_dept_name,
               report_dept_code,
               duty_dept_person_name,
               duty_dept_person_code,
               report_dept_person_name,
               report_dept_person_code,
               targetid,
               group_name,
               targetname,
@@ -168,6 +176,22 @@
                #{categoryid}
            </foreach>
        </if>
        <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%',
            #{dutyDeptPersonName},
            '%')
        </if>
        <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%',
            #{dutyDeptPersonCode},
            '%')
        </if>
        <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%',
            #{reportDeptPersonName},
            '%')
        </if>
        <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%',
            #{reportDeptPersonCode},
            '%')
        </if>
        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
    </select>
@@ -179,6 +203,22 @@
                <foreach item="dimension" collection="dimensionList" open="(" separator="," close=")">
                    #{dimension}
                </foreach>
            </if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%',
                #{dutyDeptPersonName},
                '%')
            </if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%',
                #{dutyDeptPersonCode},
                '%')
            </if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%',
                #{reportDeptPersonName},
                '%')
            </if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%',
                #{reportDeptPersonCode},
                '%')
            </if>
            <if test="dimensionList == null ">and dimension IS NOT NULL </if>
        </where>
@@ -240,6 +280,10 @@
            <if test="categoryName != null  and categoryName != ''">categoryName,</if>
            <if test="isMydException != null  and isMydException != ''">is_myd_exception,</if>
            <if test="dimension != null  and dimension != ''">dimension,</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name,</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name,</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="nextScriptno != null">#{nextScriptno},</if>
@@ -289,6 +333,10 @@
            <if test="categoryName != null  and categoryName != ''">#{categoryName},</if>
            <if test="isMydException != null  and isMydException != ''">#{isMydException},</if>
            <if test="dimension != null  and dimension != ''">#{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">#{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
        </trim>
    </insert>
@@ -344,6 +392,10 @@
            <if test="categoryName != null  and categoryName != ''">categoryName = #{categoryName},</if>
            <if test="isMydException != null  and isMydException != ''">is_myd_exception = #{isMydException},</if>
            <if test="dimension != null  and dimension != ''">dimension = #{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name = #{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -49,6 +49,10 @@
        <result property="dutyDeptCode" column="duty_dept_code"/>
        <result property="reportDeptCode" column="report_dept_name"/>
        <result property="reportDeptName" column="report_dept_code"/>
        <result property="dutyDeptPersonName" column="duty_dept_person_name"/>
        <result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
        <result property="reportDeptPersonCode" column="report_dept_person_name"/>
        <result property="reportDeptPersonName" column="report_dept_person_code"/>
        <result property="isMydException" column="is_myd_exception"/>
        <result property="dimension" column="dimension"/>
    </resultMap>
@@ -77,6 +81,7 @@
               templateID,
               scriptid,
               script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetoptions, script_type, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path
                , duty_dept_person_name, duty_dept_person_code, report_dept_person_name, report_dept_person_code
        from svy_task_template_script
    </sql>
@@ -135,6 +140,18 @@
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
                #{branchNextscriptno}
            </if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%', #{dutyDeptPersonName},
                '%')
            </if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%', #{dutyDeptPersonCode},
                '%')
            </if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">and report_dept_person_name like concat('%', #{reportDeptPersonName},
                '%')
            </if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode},
                '%')
            </if>
    </select>
    <select id="selectSvyTaskTemplateScriptByID" parameterType="Long" resultMap="SvyTaskTemplateScriptResult">
@@ -191,6 +208,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''"> report_dept_code,</if>
            <if test="isMydException != null ">is_myd_exception,</if>
            <if test="dimension != null ">dimension,</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name,</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name,</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
@@ -238,6 +259,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''">#{reportDeptCode},</if>
            <if test="isMydException != null ">#{isMydException},</if>
            <if test="dimension != null ">#{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">#{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
        </trim>
    </insert>
@@ -291,6 +316,10 @@
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if>
            <if test="isMydException != null ">is_myd_exception = #{isMydException},</if>
            <if test="dimension != null ">dimension = #{dimension},</if>
            <if test="dutyDeptPersonName != null  and dutyDeptPersonName != ''">duty_dept_person_name = #{dutyDeptPersonName},</if>
            <if test="dutyDeptPersonCode != null  and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
            <if test="reportDeptPersonName != null  and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
            <if test="reportDeptPersonCode != null  and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
        </trim>
        where id = #{d}
    </update>