| | |
| | | <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" /> |
| | |
| | | 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("çä¿¡åé失败"); |
| | |
| | | //@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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | |
| | | //çç«åå¾·ççä¿¡åéæ¹å¼ |
| | | 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"; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | @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; |
| | | |
| | | // /** |
| | | // * é®é¢ç»æï¼ç»âå¼ç±»åâæ¯ææ¬æè
æ°å¼ç¨çï¼ |
| | | // */ |
| | |
| | | @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; |
| | | |
| | | /** |
| | | * è¯æ¯é项 |
| | | */ |
| | |
| | | @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; |
| | | |
| | | /** |
| | | * é®é¢é项 |
| | | */ |
| | |
| | | @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; |
| | | |
| | | /** |
| | | * è¯æ¯é项 |
| | | */ |
| | |
| | | * å¤ç详ç»è¯´æï¼å¤çç§å®¤ï¼ |
| | | */ |
| | | @ApiModelProperty("å¤ç详ç»è¯´æï¼å¤çç§å®¤ï¼") |
| | | @Excel(name = "å¤ç详ç»è¯´æ", readConverterExp = "å¤=çç§å®¤") |
| | | @Excel(name = "å¤ç详ç»è¯´æ", readConverterExp = "å¤çç§å®¤") |
| | | private String handledesc; |
| | | |
| | | /** |
| | |
| | | @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; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | 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") |
| | |
| | | private Long sex; |
| | | |
| | | /** |
| | | * æ§å« |
| | | */ |
| | | @Excel(name = " æ§å«åç§°") |
| | | @ApiModelProperty(value = "æ§å«åç§°") |
| | | private String sexName; |
| | | |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | @Excel(name = " å¹´é¾ ") |
| | |
| | | private String hospno; |
| | | |
| | | /** |
| | | * æ£è
ç¼å· |
| | | */ |
| | | @Excel(name = "æ£è
ç¼å·ï¼ç
åå·ï¼") |
| | | @ApiModelProperty(value = "æ£è
ç¼å·ï¼ç
åå·ï¼") |
| | | private String patno; |
| | | |
| | | /** |
| | | * å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | |
| | | @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éå |
| | | */ |
| | |
| | | @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; |
| | |
| | | @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éå |
| | |
| | | @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éå |
| | | */ |
| | |
| | | @ApiModelProperty("å¤çç§å®¤åç§°") |
| | | @Excel(name = "å¤çç§å®¤åç§°") |
| | | private String todeptname; |
| | | |
| | | |
| | | /** |
| | | * é®é¢ç±»å:è¯é³ãé®å· |
| | | */ |
| | |
| | | */ |
| | | @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; |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | 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()); |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | 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()); |
| | |
| | | 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(); |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | 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); |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | } |
| | | |
| | | 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()); |
| | | } |
| | |
| | | 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); |
| | |
| | | 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(); |
| | |
| | | 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); |
| | |
| | | <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, |
| | |
| | | <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> |
| | | |
| | | |
| | |
| | | </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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | 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, |
| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | | |
| | |
| | | <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, |
| | |
| | | <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" |
| | |
| | | </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> |
| | | |
| | |
| | | </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}, |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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"/> |
| | | |
| | |
| | | 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, |
| | |
| | | #{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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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> |
| | | |
| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |