Merge branch 'master' into master-任务组
# Conflicts:
# ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
| | |
| | | <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/common/DeepSeekApi.java" charset="UTF-8" /> |
| | | <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" /> |
| | |
| | | <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" /> |
| | | <file url="PROJECT" charset="GBK" /> |
| | | </component> |
| | | </project> |
| | | </project> |
| | |
| | | <version>9.2.1.jre8</version> |
| | | </dependency> |
| | | |
| | | <!-- Kingbase8 JDBCé©±å¨ --> |
| | | <dependency> |
| | | <groupId>cn.com.kingbase</groupId> |
| | | <artifactId>kingbase8</artifactId> |
| | | <version>8.6.0</version> |
| | | </dependency> |
| | | |
| | | <!-- æ ¸å¿æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | |
| | | 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("çä¿¡åé失败"); |
| | |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(vo.getOrgid()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String url = ip + ":" + req_path + "/wt?p=" + format; |
| | | content = "æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + url + "å¡«åãæè°¢æ¨é
åï¼"; |
| | | serviceOutPath.setUrl(url); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | } |
| | | |
| | | if (ObjectUtils.isNotEmpty(vo.getContent())) content = vo.getContent(); |
| | |
| | | return AjaxResult.success(sendMsg); |
| | | } |
| | | |
| | | /** |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation("çæå¤é¾") |
| | | @PostMapping("/getUrl") |
| | | public AjaxResult getUrl(@RequestBody smsVO vo) throws UnsupportedEncodingException { |
| | | String content = ""; |
| | | if (StringUtils.isNotEmpty(vo.getTaskId()) && StringUtils.isNotEmpty(vo.getPatId()) && StringUtils.isNotEmpty(vo.getSubId())) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(vo.getTaskId().toString(), pub_key); |
| | | String patid = rsaPublicKeyExample.encryptedData(vo.getPatId().toString(), pub_key); |
| | | String subId = rsaPublicKeyExample.encryptedData(vo.getSubId().toString(), pub_key); |
| | | Integer radix = iServiceOutPathService.selectAutoId(); |
| | | String format = String.format("%03X", radix); |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(vo.getTaskName()); |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(vo.getOrgid()); |
| | | String url = ip + ":" + req_path + "/wt?p=" + format; |
| | | // content = "æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + url + "å¡«åãæè°¢æ¨é
åï¼"; |
| | | content = url; |
| | | serviceOutPath.setUrl(url); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | } |
| | | return AjaxResult.success(content); |
| | | } |
| | | |
| | | } |
| | |
| | | //@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); |
| | | } |
| | | |
| | | /** |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ruoyi.common.utils.SecurityUtils.getLoginUser; |
| | | |
| | | /** |
| | | * åä¸ä»»å¡ï¼é访ï¼Controller |
| | | * |
| | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | @Value("${localIP}") |
| | | private String localIP; |
| | | |
| | | @Value("${req_path}") |
| | | private String req_path; |
| | | |
| | | @Value("${isAdmin}") |
| | | private List<Long> isAdmin; |
| | | |
| | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | serviceSubtaskVO.setOrgid(user.getOrgid()); |
| | | serviceSubtaskVO.setCampusid(user.getCampusid()); |
| | | ServiceSubtaskEntity serviceSubtaskEntity = null; |
| | | if (serviceSubtaskVO != null) { |
| | | serviceSubtaskEntity = DtoConversionUtils.sourceToTarget(serviceSubtaskVO, ServiceSubtaskEntity.class); |
| | |
| | | return serviceSubtaskService.smsSubTask(subid); |
| | | } |
| | | |
| | | /** |
| | | * 跳转ä¸é´é¡µ |
| | | * |
| | | * @param taskId |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/goSfRelay") |
| | | public AjaxResult goSfRelay(@RequestParam("taskId") Long taskId, @RequestParam("deptcode") String deptcode, @RequestParam("leavehospitaldistrictcode") String leavehospitaldistrictcode) { |
| | | String url = localIP + ":" + req_path + "/SfRelay?taskid=" + taskId; |
| | | if(StringUtils.isNotEmpty(deptcode)){ |
| | | url = url + "&deptcode=" + deptcode; |
| | | } |
| | | if(StringUtils.isNotEmpty(leavehospitaldistrictcode)){ |
| | | url = url + "&leavehospitaldistrictcode=" + leavehospitaldistrictcode; |
| | | } |
| | | return AjaxResult.success(url); |
| | | } |
| | | |
| | | /** |
| | | * æ«ç çæåä»»å¡ |
| | | * |
| | | * @param serviceTask |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/scanGenerateSubtask") |
| | | public AjaxResult scanGenerateSubtask(@RequestBody ServiceTask serviceTask) { |
| | | return AjaxResult.success(serviceSubtaskService.scanGenerateSubtask(serviceTask)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/test") |
| | | public void test() { |
| | | ryTask.dealOutHospInfo(); |
| | | } |
| | | |
| | | @PostMapping("/compensateTasktest") |
| | | public void compensateTasktest(@RequestParam("subId") Long subId) { |
| | | ryTask.compensateTaskTest(subId); |
| | | } |
| | | |
| | | @PostMapping("/longTaskSendtest") |
| | | public void longTaskSendtest(@RequestParam("subId") Long subId) { |
| | | ryTask.longTaskSendTest(subId); |
| | | } |
| | | |
| | | @PostMapping("/syncMedInhospForShiyi") |
| | |
| | | int result = ryTask.qwenLLMTest(questionText, voiceText, value, regexText); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public AjaxResult getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) { |
| | | Long tid = null; |
| | | Long pid = null; |
| | | Long sid = null; |
| | | log.info("getScriptInfoByConditionå
¥å为ï¼{}", serviceTaskScriptQues); |
| | | try { |
| | | tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key)); |
| | | if (StringUtils.isNotEmpty(serviceTaskScriptQues.getParam2())) |
| | | pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | | if (StringUtils.isNotEmpty(serviceTaskScriptQues.getParam6())) |
| | | sid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam6(), pri_key)); |
| | | } catch (Exception e) { |
| | | log.error("getScriptInfoByConditionæ¥éäºï¼{}", e.getMessage()); |
| | | } |
| | | |
| | | log.info("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | if (StringUtils.isEmpty(serviceTaskScriptQues.getPatfrom())) serviceTaskScriptQues.setPatfrom("0"); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(), null)); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(), sid)); |
| | | } |
| | | |
| | | |
| | |
| | | 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); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:kingbase8://10.100.1.23:54321/smartor-huizhou?currentSchema=smartor,sys_catalog&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000 |
| | | username: smartor |
| | | password: smartor.2025 |
| | | driverClassName: com.kingbase8.Driver |
| | | |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(å
¬å¸) |
| | | # enabled: true |
| | | # url: jdbc:sqlserver://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor |
| | | # username: sa |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(ä¹ä¹äºé¢) |
| | | # enabled: true |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=IntelligentVoice;encrypt=false;SelectMethod=cursor |
| | | # username: sa |
| | | # password: sfxt#2023 |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | # validationQuery: SELECT 1 FROM DUAL |
| | | validationQuery: SELECT 1 |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: false |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: lihu |
| | | login-password: Lihu@1363419#$ |
| | | filter: |
| | | stat: |
| | | enabled: false |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: false |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: Smartor |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 30s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: false |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | | # PageHelperå页æä»¶ |
| | | #pagehelper: |
| | | # helperDialect: mysql |
| | | # supportMethodsArguments: true |
| | | ## params: countSql;pageSizeZero=true |
| | | |
| | | magic-api: |
| | | web: /magic/web |
| | | resource: |
| | | type: database # é
ç½®åå¨å¨æ°æ®åºä¸ |
| | | tableName: magic_config # æ°æ®åºä¸ç表å |
| | | prefix: /api |
| | | readonly: false |
| | | sql-column-case: camel |
| | | show-sql: true #é
ç½®æå°SQL |
| | | page-config: |
| | | size: size |
| | | page: page |
| | | default-page: 1 |
| | | default-size: 10 |
| | | |
| | | |
| | | |
| | | #ééçå¯é¥ |
| | | dingAppid: dingn8iip5ubj7clrrsv |
| | | dingAppSecret: qlEK8D3oOVwGPOTiBQIBYTqQVlAfy9S_qQizEQFjJdSScwemWFryg4gbneu-NqWD |
| | | |
| | | # websocketè¶
æ¶æ¶é´ |
| | | server: |
| | | websocket: |
| | | timeout=60000: |
| | | |
| | | |
| | | accessKeyId: LTAI5tPfc1VJzz7VuhzcBwug |
| | | accessKeySecret: gG1srKxPFDBNWe2oHfqmK1qsSQkf1e |
| | | signName: æå·å©æ¹ç§æ |
| | | |
| | | #æºè½å¼å«(䏿µ·) |
| | | phoneIP: http://124.220.50.51 |
| | | phonePort: 8001 |
| | | #æå· |
| | | hzphoneIP: http://121.43.112.160 |
| | | hzphonePort: 8088 |
| | | #çµè¯çº¿è·¯ï¼1 䏿µ·ï¼2 æå·ï¼ |
| | | phonePath: 2 |
| | | #èªå·±ççµè¯å·ç |
| | | phoneMySelf: 83234089 |
| | | ##ææ id(æå·) |
| | | #app_id: hzgs |
| | | ##ææ key(å·²å å¯è¿ç key)(æå·) |
| | | #app_key: 605453540c4a0a692fe07e1cae1162f3 |
| | | #ææ id(æå·) |
| | | app_id: hz_ali |
| | | #ææ key(å·²å å¯è¿ç key)(æå·) |
| | | app_key: a2f3b5799d635216aa280362fafd8c35 |
| | | |
| | | |
| | | pub_key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ== |
| | | #è¿ä¸ªæ¯å端çç§é¥ï¼ç¨ä¸å° |
| | | pri_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg== |
| | | #å端ç§é¥ï¼ç¨ä¸å°äºï¼ |
| | | #pri_key: MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEApHTIe/StslZAT5Jzv8XClbrqox32pfaTrP5IOCRJ3FaH/UZsGgA/tsNBBEXq9eagqwPbJrjYfpdEtINcChrK4wIDAQABAkEAilDujdKshGGmlUZHs/NQRT6AOdDpsYxBiC4V76IVvQpw0IW6c4HGEvH4T+xRufika7/48L0eu0f06H+YtL5lgQIhANUd0a6oSsVxWifAjtKwMZcXD3OaIxQIQSCN4NT4VFY3AiEAxYxYrIhkIyg+UVw3WOSvBpXKxM4/WL9HRzkxDLvp2rUCIQCK23P8tgCJ5xJT5l3onw6goFDcBKkoazxsBqVgfjENPwIgWbuTd+OIYPPhwsE5ntZZrosSDO2GlsBkFzUiU59z7VUCIA0LL+9IFb+FWCl3DGTwIQ9SZYbv61T83LKjebUcSOfe |
| | | |
| | | #äºç»´ç è·¯å¾ |
| | | qrpath: D:\qrcode |
| | | |
| | | #å
¬å¸å
å¤é¾è¯·æ±IPå端å£å· |
| | | #req_path: 8095 |
| | | #localIP: 192.168.2.13 |
| | | |
| | | #æ°åå»é¢å¤é¾è¯·æ±IPå端å£å· |
| | | req_path: 8093 |
| | | #localIP: https://wx.lihusmart.com |
| | | #丽水å¤é¾è¯·æ±IPå端å£å· |
| | | localIP: https://lishuisf.health-y.cn |
| | | |
| | | #è·åæ£è
ä¿¡æ¯URL(ååæä¾) |
| | | hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange |
| | | |
| | | # 0代表走é»è®¤çä¸ä¼ 1 代ç èµ°æ°åå»é¢çä¸ä¼ |
| | | uploadSwitch: 1 |
| | | |
| | | ## æå®asråè°çurlè·¯å¾(æ¬å°) |
| | | #ASRCallBackPath: http://192.168.2.13:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | ##ææIP(æ¬å°) |
| | | #hangup: http://192.168.2.13:8091/hangup |
| | | ##fsæä½¿ç¨çé¿éçapp_key(æ¬å°) |
| | | #app_key_yq: ZurNHpaQLq6P55YS |
| | | |
| | | # æå®asråè°çurlè·¯å¾(æ°å) |
| | | ASRCallBackPath: http://192.168.101.135:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | #ææIP(æ°å) |
| | | hangup: http://192.16.4.220:8091/hangup |
| | | #fsæä½¿ç¨çé¿éçapp_key(æ°å) |
| | | app_key_yq: ZurNHpaQLq6P55YS |
| | | |
| | | #æ¬ å° ç信请æ±å°å(è¿ä¸ªæå¡æ¯æä»¬èªå·±åç) |
| | | #xhsmsPath: http://192.168.2.13:8092/sendSms |
| | | #æ°åç信请æ±å°å(è¿ä¸ªæå¡æ¯æä»¬èªå·±åç) |
| | | xhsmsPath: http://192.16.4.220:8092/sendSms |
| | | #å¸å· |
| | | xhsmsAccount: 911124 |
| | | #æ¥å£å¯ç |
| | | xhsmsPwd: zW5eXe |
| | | #èææ¥å
¥ç |
| | | xhsmsjrm: 1069055 |
| | | |
| | | ##æ¬å°FTPè¿æ¥ |
| | | #FTP_SERVER: "192.168.2.13" |
| | | #FTP_USERNAME: voice |
| | | #FTP_PASSWORD: xh@2023 |
| | | |
| | | #æ°åFTPè¿æ¥ |
| | | FTP_SERVER: "192.16.4.220" |
| | | FTP_USERNAME: voice |
| | | FTP_PASSWORD: xh@2023 |
| | | |
| | | #è¯é³å°å访é®åç¼(æ°å) |
| | | voicePathPrefix: http://192.168.191.181:8095/profile/upload/vadio/ |
| | | #è¯é³å°å访é®åç¼(å
¬å¸) |
| | | #voicePathPrefix: http://192.168.2.13:8095/profile/upload/vadio/ |
| | | |
| | | #ç¬¬ä¸ªå°æ¶çµè¯æ¨æçä¸é |
| | | phoneUpEveryHour: 12 |
| | | #çµè¯æ¯å¤©ç»ææ¶é´ |
| | | phoneEndHour: 20 |
| | | |
| | | #æ°åå·¥é»è®¤å¯ç |
| | | defaultPwd: 123456 |
| | | |
| | | #æ¯å¦éè¦æ ¹æ®ç¾ç
建ç«åºé¢æ£è
é访 |
| | | createIcd10Visit: false |
| | | |
| | | #admin管çåuserId |
| | | isAdmin: 1,2,3,4,5,6,7,8,9,10,11,12,13 |
| | | |
| | | #å¤çæè¯å»ºè®®çé¨é¨ç¼ç |
| | | dealDeptCode: |
| | | |
| | | #æ¯å¦å å¯ 0ä¸å 1å å¯ |
| | | isEncryp: 0 |
| | | |
| | | #æä»¶ä¸ä¼ å°å |
| | | fileUpload: |
| | | profile: |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | |
| | | package com.ruoyi.common.dx; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.common.utils.uuid.UUID; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | * // * @param sOrderNo æ£è
å¯ä¸å·ç |
| | | * // * @param sMessageContent çä¿¡å
容 |
| | | * |
| | | * @param sMessageType çä¿¡ç±»å 1=éªè¯ç ã2=éç¥ã3=广å |
| | | * @param sMessageType çä¿¡ç±»å 1=éªè¯ç ã2=éç¥ã3=广å 6=å
容æé¾æ¥åçµè¯ï¼7=ééæ¶æ¯ |
| | | * @param sUserNumber ææºå·ç |
| | | * @param sScheduleTime é¢çº¦åéæ¶é´ |
| | | * @return |
| | | */ |
| | | public static String sendMsg(String sMessageContent, String sMessageType, String sUserNumber, String sScheduleTime) { |
| | | log.info("--sMessageContentçå¼ä¸ºï¼{} ,--sMessageTypeçå¼ä¸ºï¼{}, --sUserNumberçå¼ä¸ºï¼{}, --sScheduleTimeçå¼ä¸ºï¼{}", sMessageContent, sMessageType, sUserNumber, sScheduleTime); |
| | | log.info("--sMessageContent çå¼ä¸ºï¼{} ,--sMessageType çå¼ä¸ºï¼{}, --sUserNumber çå¼ä¸ºï¼{}, --sScheduleTime çå¼ä¸º:{}", sMessageContent, sMessageType, sUserNumber, sScheduleTime); |
| | | |
| | | com.ruoyi.common.dx.SmsService service = new SmsService(); |
| | | SmsServiceSoap soap = service.getSmsServiceSoap(); |
| | | String result = soap.i5GSend("202508291634227086", "T202508291635259440", UUID.randomUUID().toString(), sMessageContent, sMessageType, sUserNumber, sScheduleTime); |
| | | log.info("----çä¿¡è¿åçæ°æ®ä¸ºï¼{}, ----sMessageContentçå¼ä¸º:{},", result, sMessageContent); |
| | | String result = null; |
| | | |
| | | try { |
| | | if ("6".equals(sMessageType)) { |
| | | result = soap.i5GSend("202508291634227086", "T202508291635259440", UUID.randomUUID().toString(), sMessageContent, sMessageType, sUserNumber, sScheduleTime); |
| | | log.info("----çä¿¡è¿åçæ°æ®ä¸ºï¼{}, ----sMessageContent çå¼ä¸º:{}", UUID.randomUUID().toString()); |
| | | } else if ("7".equals(sMessageType)) { |
| | | result = soap.i5GSend("202508291634227086", "T202607211306131891", UUID.randomUUID().toString(), sMessageContent, sMessageType, sUserNumber, sScheduleTime); |
| | | log.info("----ééè¿åçåå§æ°æ®ä¸ºï¼{}", result); |
| | | |
| | | } else { |
| | | log.warn("䏿¯æççä¿¡ç±»åï¼{}", sMessageType); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("宿´é误信æ¯ï¼{}", e.getCause().getMessage()); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | } |
| | |
| | | // è¿æ»¤è¯·æ± |
| | | .authorizeRequests() |
| | | // 对äºç»å½login 注åregister éªè¯ç captchaImage å
许å¿åè®¿é® |
| | | .antMatchers("/login","/test/**", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask/phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer", "/smartor/import/download", "/smartor/serviceSubtask/recordAccept", "/smartor/outPath/getInfoByParam", "/smartor/serviceExternal/addDeptInfo", "/smartor/serviceExternal/**", "/sso/**","/smartor/sltdHealthcareRecord/**","/smartor/servicetask/getScriptByCondition","/smartor/subtaskAnswer/saveMYDQuestionAnswer").permitAll() |
| | | .antMatchers("/login","/test/**", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask/phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer", "/smartor/import/download", "/smartor/serviceSubtask/recordAccept", "/smartor/outPath/getInfoByParam", "/smartor/serviceExternal/addDeptInfo", "/smartor/serviceExternal/**", "/sso/**","/smartor/sltdHealthcareRecord/**","/smartor/servicetask/getScriptByCondition","/smartor/subtaskAnswer/saveMYDQuestionAnswer","smartor/serviceSubtask/goSfRelay","/smartor/serviceSubtask/scanGenerateSubtask").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | // .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**","/system/dict/data/typeout/*").permitAll().antMatchers( "/druid/**").permitAll() |
| | |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.common.QwenLLMUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.VO.ServiceSubtaskDetailTraceVO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.*; |
| | |
| | | ISysDeptService sysDeptService; |
| | | |
| | | @Autowired |
| | | IServiceSubtaskDetailTraceService serviceSubtaskDetailTraceService; |
| | | |
| | | @Autowired |
| | | IPatMedOuthospService patMedOuthospService; |
| | | |
| | | @Autowired |
| | |
| | | serviceThirdData.setCreateTime(new Date()); |
| | | iServiceThirdDataService.queryList(serviceThirdData); |
| | | } |
| | | |
| | | /** |
| | | * 宿¶åéSLTD满æåº¦å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | public void sendSLTDMYDExceptInfo() { |
| | | //1.è·ååéäººå·¥å· |
| | | ServiceSubtaskDetailTraceVO subtaskDetailTraceVO = new ServiceSubtaskDetailTraceVO(); |
| | | subtaskDetailTraceVO.setHandleFlag("0"); |
| | | List<ServiceSubtaskDetailTrace> serviceSubtaskDetailTraces = serviceSubtaskDetailTraceService.selectServiceSubtaskDetailTtraceList(subtaskDetailTraceVO); |
| | | // æ dutyDeptPersonCode æ´çå° list ä¸ï¼å¦æå¤ä¸ªäººç¨éå·åå²ï¼åå±å¼å¹¶å»éï¼ |
| | | List<String> dutyDeptPersonCodeList = serviceSubtaskDetailTraces.stream().map(ServiceSubtaskDetailTrace::getDutyDeptPersonCode).filter(StringUtils::isNotBlank).flatMap(code -> Arrays.stream(code.split(","))).map(String::trim).filter(StringUtils::isNotBlank).distinct() // å»é |
| | | .collect(Collectors.toList()); |
| | | // è·åâçç«å德满æåº¦å¼å¸¸å
容æé" |
| | | SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("sltd.myd.send.except.contont"); |
| | | String exceptContent = sysConfig.getConfigValue(); |
| | | |
| | | // è·åâçç«å德满æåº¦å¼å¸¸å
容æéæµè¯äººå·¥å·â |
| | | String testPerson = sysConfigMapper.checkConfigKeyUnique("sltd.myd.send.test.person").getConfigValue(); |
| | | if (StringUtils.isNotBlank(testPerson)) { |
| | | String[] split = testPerson.split(","); |
| | | if (CollectionUtils.isEmpty(dutyDeptPersonCodeList)) dutyDeptPersonCodeList = Arrays.asList(split); |
| | | else dutyDeptPersonCodeList.addAll(Arrays.asList(split)); |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(dutyDeptPersonCodeList)) { |
| | | for (String dutyDeptPersonCode : dutyDeptPersonCodeList) { |
| | | log.info("ãsendSLTDMYDExceptInfoãåé人工å·ï¼{}", dutyDeptPersonCode); |
| | | String data = MessageSend.sendMsg(exceptContent, "7", dutyDeptPersonCode, LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 宿¶å¤çå¤é¾çæ°æ® |
| | |
| | | serviceSLTDInhospReqVO.setCurrent(outpPage); |
| | | serviceSLTDInhospReqVO.setSize(OUTP_PAGE_SIZE); |
| | | log.info("ãdealHisDataãçç«åå¾·âè¯åæ°æ®âéé第{}é¡µæ°æ®", outpPage); |
| | | Boolean b = serviceSLTDHealthcareRecordService.queryMedicationItemList(serviceSLTDInhospReqVO); |
| | | Boolean b = serviceSLTDHealthcareRecordService.queryMedicationItemList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âè¯åæ°æ®âééç»æï¼{}", b); |
| | | outpPage++; |
| | | } |
| | |
| | | * å¤çè¡¥å¿ä»»å¡ |
| | | */ |
| | | public void compensateTask() { |
| | | //è·åå°sendstate=3 å¹¶ä¸ visit_time为å°äºçäºä»å¤©çsubtask |
| | | //è·åå°sendstate=3ã1 å¹¶ä¸ visit_time为å°äºçäºä»å¤©çsubtask |
| | | List<Long> list = Arrays.asList(3L, 1L); |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setSendstate(3L); |
| | | serviceSubtaskVO.setVisitTime(new Date()); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.getCompensateServiceSubtaskList(serviceSubtaskVO); |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | //æ ¹æ®å½åçæ§è¡æ¹å¼ï¼è·åä¸ä¸ç§æ§è¡æ¹å¼ |
| | | ServiceSubtaskPreachform serviceSubtaskPreachform = new ServiceSubtaskPreachform(); |
| | | serviceSubtaskPreachform.setTaskid(serviceSubtask.getTaskid()); |
| | | serviceSubtaskPreachform.setSubid(serviceSubtask.getId()); |
| | | serviceSubtaskPreachform.setOrgid(serviceSubtask.getOrgid()); |
| | | List<ServiceSubtaskPreachform> serviceSubtaskPreachforms = serviceSubtaskPreachformMapper.selectServiceSubtaskPreachformList(serviceSubtaskPreachform); |
| | | //è·åå½åæ§è¡æ¹å¼çåºå· |
| | | Optional<Long> currentSort = serviceSubtaskPreachforms.stream().filter(item -> serviceSubtask.getCurrentPreachform().equals(item.getPreachform())).map(ServiceSubtaskPreachform::getSort).findFirst(); |
| | | Optional<Long> id = serviceSubtaskPreachforms.stream().filter(item -> serviceSubtask.getCurrentPreachform().equals(item.getPreachform())).map(ServiceSubtaskPreachform::getId).findFirst(); |
| | | if (currentSort.isPresent()) { |
| | | //1å
æ£æ¥ä¸ä¸ï¼æ¯ä¸æ¯ææ§è¡ç¶ææ¯å®æçï¼æä¹åå·²ç»æå®çäºï¼æ²¡æå°servuce_subtaskçç¶ææ¹æåï¼è¿é忣æ¥ä¸ä¸ï¼ |
| | | boolean finishState = serviceSubtaskPreachforms.stream().allMatch(item -> item.getSendstate().equals("9")); |
| | | if (finishState) { |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | continue; |
| | | } |
| | | |
| | | //2夿ä¸ä¸ï¼å½åçsortæ¯ä¸æ¯çäºéè¦æ§è¡çæ»ä¸ªæ°ï¼å¦æçäºçè¯ï¼è¯´ææ¯æåä¸ä¸ªï¼ç´æ¥å°servuce_subtaskçç¶ææ¹æ5ï¼æ§è¡å¤±è´¥å°±è¡äº |
| | | Long cs = currentSort.get(); |
| | | if (cs.equals(serviceSubtaskPreachforms.size())) { |
| | | serviceSubtask.setSendstate(7L); |
| | | serviceSubtask.setRemark("å¤çè¡¥å¿ä»»å¡,å½åå¤çæåè¡¥å¿ï¼å
¨é¨æ§è¡å¤±è´¥ï¼è¶
æ¶ï¼"); |
| | | |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | //ä¿®æ¹åéæ¹å¼çç¶æä¸ºå¤±è´¥ |
| | | serviceSubtaskPreachform.setSendstate("5"); |
| | | serviceSubtaskPreachform.setId(id.get()); |
| | | |
| | | serviceSubtaskPreachformMapper.updateServiceSubtaskPreachform(serviceSubtaskPreachform); |
| | | continue; |
| | | } |
| | | |
| | | //3.䏿¯æåä¸ä¸ªï¼è·åå°ä¸ä¸ä¸ªæ§è¡æ¹å¼(å ä¸ºé½æ¯å¨ä»å¤©æ§è¡ï¼é£å°±ç´æ¥ååºå»å°±å®äº) |
| | | sfHandlle(serviceSubtask); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * é¿æä»»å¡åé |
| | | */ |
| | | public void longTaskSendTest(Long subId) { |
| | | //è·åä»»å¡ä¿¡æ¯ |
| | | ServiceTask st = new ServiceTask(); |
| | | st.setDelFlag("0"); |
| | | st.setLongTask(1); |
| | | List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(st); |
| | | log.info("ãlongTaskSendãè·åå°{}ä¸ªé¿æä»»å¡", serviceTasks.size()); |
| | | for (ServiceTask serviceTask : serviceTasks) { |
| | | CommonTaskcallMQ commonTaskcallMQ = new CommonTaskcallMQ(); |
| | | commonTaskcallMQ.setTaskid(serviceTask.getTaskid()); |
| | | commonTaskcallMQ.setPreachform(serviceTask.getPreachform()); |
| | | commonTaskcallMQ.setSendType("2"); |
| | | |
| | | //éè¿ä»»å¡IDæ¿å°æ£è
ä¿¡æ¯,å¹¶ä¸é访æ¶é´å¾æ¯ä»å¤©ä¹åç |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | serviceSubtaskVO.setSendstate(2L); |
| | | serviceSubtaskVO.setIsVisitAgain(1); |
| | | serviceSubtaskVO.setSubId(subId); |
| | | List<ServiceSubtask> serviceSubtaskList = new ArrayList<>(); |
| | | for (Long sendstate : list) { |
| | | serviceSubtaskVO.setSendstate(sendstate); |
| | | serviceSubtaskVO.setVisitTime(new Date()); |
| | | List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.queryServiceSubtaskList(serviceSubtaskVO); |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | sfHandlle(serviceSubtask); |
| | | } |
| | | List<ServiceSubtask> compensateServiceSubtaskList = serviceSubtaskMapper.getCompensateServiceSubtaskList(serviceSubtaskVO); |
| | | serviceSubtaskList.addAll(compensateServiceSubtaskList); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤çè¡¥å¿ä»»å¡ |
| | | */ |
| | | public void compensateTaskTest(Long subId) { |
| | | //è·åå°sendstate=3 å¹¶ä¸ visit_time为å°äºçäºä»å¤©çsubtask |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setSendstate(3L); |
| | | serviceSubtaskVO.setSubId(subId); |
| | | serviceSubtaskVO.setVisitTime(new Date()); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.getCompensateServiceSubtaskList(serviceSubtaskVO); |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | //æ ¹æ®å½åçæ§è¡æ¹å¼ï¼è·åä¸ä¸ç§æ§è¡æ¹å¼ |
| | | ServiceSubtaskPreachform serviceSubtaskPreachform = new ServiceSubtaskPreachform(); |
| | |
| | | //çç«åå¾·ççä¿¡åéæ¹å¼ |
| | | 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"; |
| | | } |
| | | } |
| | |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | String subId = rsaPublicKeyExample.encryptedData(serviceSubtask.getId().toString(), pub_key); |
| | | String url = null; |
| | | url = localIP + ":" + req_path + "/outsideChainwt?param1=" + taskId + |
| | | "¶m2=" + patid + |
| | | "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + |
| | | "¶m5=false" + |
| | | "$param6=" + subId; |
| | | url = localIP + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false" + "$param6=" + subId; |
| | | |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | |
| | | <groupId>mysql</groupId> |
| | | <artifactId>mysql-connector-java</artifactId> |
| | | </dependency> |
| | | <!-- Kingbase8 JDBCé©±å¨ --> |
| | | <dependency> |
| | | <groupId>cn.com.kingbase</groupId> |
| | | <artifactId>kingbase8</artifactId> |
| | | <version>8.6.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-system</artifactId> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * è¯æ¯é项 |
| | | */ |
| | |
| | | /** |
| | | * ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å |
| | | */ |
| | | @ApiModelProperty("ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å") |
| | | @Excel(name = " ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å ") |
| | | @ApiModelProperty("ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å -1èææ£è
") |
| | | @Excel(name = " ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å -1èææ£è
") |
| | | private String viptype; |
| | | |
| | | @ApiModelProperty("åºé¢ç
åºåç§°") |
| | |
| | | * å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | @ApiModelProperty(value = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ 3.ä¸ç
4.å¤é¨å¯¼å
¥ 5æ¥è¯ã6ä½é¢ã7使£ï¼") |
| | | @ApiModelProperty(value = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ 3.ä¸ç
4.å¤é¨å¯¼å
¥ 5æ¥è¯ã6ä½é¢ã7使£ã8æ«ç ï¼") |
| | | private String hospType; |
| | | |
| | | |
| | |
| | | * å¤ç详ç»è¯´æï¼å¤çç§å®¤ï¼ |
| | | */ |
| | | @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åºé¢ï¼") |
| | |
| | | private String param4; |
| | | |
| | | /** |
| | | * åä»»å¡ID subId |
| | | */ |
| | | @Excel(name = "åä»»å¡ID subId ") |
| | | @ApiModelProperty(value = "åä»»å¡ID subId") |
| | | private String param6; |
| | | |
| | | /** |
| | | * æ£è
æ¥æº |
| | | */ |
| | | @Excel(name = "patfrom ") |
| | |
| | | @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; |
| | |
| | | private String description; |
| | | |
| | | /** |
| | | * é®å·ä»ç» |
| | | * é®å·ä»ç»ï¼å½å¤æ³¨ç¨ï¼ |
| | | */ |
| | | @Excel(name = " é®å·ä»ç» ") |
| | | @ApiModelProperty(value = "é®å·ä»ç»") |
| | | @Excel(name = " é®å·ä»ç»ï¼å½å¤æ³¨ç¨ï¼ ") |
| | | @ApiModelProperty(value = "é®å·ä»ç»ï¼å½å¤æ³¨ç¨ï¼") |
| | | private String introduce; |
| | | |
| | | /** |
| | |
| | | @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; |
| | | } |
| | | |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public void addOperationSubTask(String config); |
| | | |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, Integer type); |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.PatArchive; |
| | | import com.smartor.domain.PatMedOperation; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import com.smartor.domain.ServiceTask; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public int dealOperationInfo(); |
| | | |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOperation patMedOperation1, PatArchive patArchive); |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.smartor.domain.PatMedOuthosp; |
| | | import com.smartor.domain.PatMedReq; |
| | | import com.smartor.domain.PatMedRes; |
| | | import com.smartor.domain.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | |
| | | public PatMedOuthosp getDeptCodeByPatId(PatMedOuthosp patMedOuthosp); |
| | | |
| | | public Integer dealOutpatientInfo(); |
| | | |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOuthosp patMedOuthosp, PatArchive patArchive); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime); |
| | | |
| | | public String scanGenerateSubtask(ServiceTask serviceTaskVo); |
| | | } |
| | |
| | | |
| | | |
| | | //å°è£
serviceSubtask |
| | | private ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, Integer type) { |
| | | @Override |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, Integer type) { |
| | | //å¢å serviceTaskå¤ç©º |
| | | // if(Objects.isNull(serviceTask)){ |
| | | // return null; |
| | |
| | | serviceSubtask.setSex(patArchive.getSex()); |
| | | serviceSubtask.setAge(patArchive.getAge()); |
| | | serviceSubtask.setSendstate(2L); |
| | | serviceSubtask.setCampusid(patMedInhosp1.getCampusid()); |
| | | serviceSubtask.setManagementDoctor(patMedInhosp1.getManagementDoctor()); |
| | | serviceSubtask.setManagementDoctorCode(patMedInhosp1.getManagementDoctorCode()); |
| | | serviceSubtask.setStarttime(patMedInhosp1.getStarttime()); |
| | |
| | | } |
| | | |
| | | //å°è£
serviceSubtask |
| | | private ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOperation patMedOperation1, PatArchive patArchive) { |
| | | @Override |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOperation patMedOperation1, PatArchive patArchive) { |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid())) |
| | |
| | | } |
| | | |
| | | //å°è£
serviceSubtask |
| | | private ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOuthosp patMedOuthosp, PatArchive patArchive) { |
| | | @Override |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOuthosp patMedOuthosp, PatArchive patArchive) { |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid())) |
| | |
| | | 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; |
| | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | Map<String, Object> RuKeXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("RuKeXX") : null; |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | |
| | | List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null; |
| | | |
| | |
| | | externalInHospPatientInfo.setZhuZhiYSID(externalInDeptPatientInfo.getZhuZhiYSID()); |
| | | externalInHospPatientInfo.setZhuZhiYSXM(externalInDeptPatientInfo.getZhuZhiYSXM()); |
| | | externalInHospPatientInfo.setRuYuanSJ(externalInDeptPatientInfo.getRuYuanSJ()); |
| | | externalInHospPatientInfo.setJingGuanYSID(externalInDeptPatientInfo.getJingGuanYSID()); |
| | | externalInHospPatientInfo.setJingGuanYSXM(externalInDeptPatientInfo.getJingGuanYSXM()); |
| | | externalInHospPatientInfo.setLianXiDH(ObjectUtils.isNotEmpty(BingRenXX.get("LianXiDH")) ? BingRenXX.get("LianXiDH").toString() : null); |
| | | externalInHospPatientInfo.setDangQianCWID(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianCWID")) ? BingRenXX.get("DangQianCWID").toString() : null); |
| | | externalInHospPatientInfo.setDangQianCWMC(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianCWMC")) ? BingRenXX.get("DangQianCWMC").toString() : null); |
| | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | Map<String, Object> ChuYuanJL = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ChuYuanJL") : null; |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(BingRenXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null; |
| | | List<HashMap<String, Object>> epli = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList") : null; |
| | | Map<String, Object> SuiFangJH = ObjectUtils.isNotEmpty(ChuYuanJL) ? (Map<String, Object>) ChuYuanJL.get("SuiFangJH") : null; |
| | | |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null; |
| | | ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null; |
| | | |
| | | //å°±è¯ä¿¡æ¯ |
| | | ExternalInDeptPatientInfo externalJZInfo = BeanUtil.mapToBean(JiuZhenXX, ExternalInDeptPatientInfo.class, true); |
| | | if(ObjectUtils.isNotEmpty(externalJZInfo)){ |
| | | externalInHospPatientInfo.setJingGuanYSID(externalJZInfo.getJingGuanYSID()); |
| | | externalInHospPatientInfo.setJingGuanYSXM(externalJZInfo.getJingGuanYSXM()); |
| | | } |
| | | List<ExternalInHospPatientAddrInfo> epai2 = null; |
| | | //æ»äº¡æ è®° |
| | | Boolean deathFlag = false; |
| | |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | PatMedInhosp patMedInhosp1 = new PatMedInhosp(); |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) patMedInhosp1 = patMedInhospList.get(0); |
| | | patMedInhosp1.setSchemestatus(2L); |
| | |
| | | patMedInhosp1.setNurseName(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSXM")) ? JiuZhenXX.get("ZeRenHSXM").toString() : null); |
| | | patMedInhosp1.setNurseId(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSID")) ? JiuZhenXX.get("ZeRenHSID").toString() : null); |
| | | patMedInhosp1.setBedNo(ObjectUtils.isNotEmpty(JiuZhenXX.get("DangQianCWMC")) ? JiuZhenXX.get("DangQianCWMC").toString() : null); |
| | | |
| | | patMedInhosp1.setManagementDoctorCode(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSID")) ? JiuZhenXX.get("JingGuanYSID").toString() : null); |
| | | patMedInhosp1.setManagementDoctor(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSXM")) ? JiuZhenXX.get("JingGuanYSXM").toString() : null); |
| | | |
| | | //ç¦»é¢æ¹å¼ä»£ç 1-å»ç©ç¦»é¢ 2-å»å±è½¬é¢ 3-å»å±è½¬ç¤¾åºå«çæå¡æºæ/乡éå«çé¢ |
| | | // 4-éå»å±ç¦»é¢ 5-æ»äº¡ 9-å
¶ä» 10-ä»å
¥å®¤ 20-ææ¯å®¤ |
| | |
| | | patMedInhosp1.setNurseName(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSXM")) ? JiuZhenXX.get("ZeRenHSXM").toString() : null); |
| | | patMedInhosp1.setNurseId(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSID")) ? JiuZhenXX.get("ZeRenHSID").toString() : null); |
| | | patMedInhosp1.setBedNo(ObjectUtils.isNotEmpty(JiuZhenXX.get("DangQianCWMC")) ? JiuZhenXX.get("DangQianCWMC").toString() : null); |
| | | |
| | | patMedInhosp1.setManagementDoctorCode(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSID")) ? JiuZhenXX.get("JingGuanYSID").toString() : null); |
| | | patMedInhosp1.setManagementDoctor(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSXM")) ? JiuZhenXX.get("JingGuanYSXM").toString() : null); |
| | | } |
| | | patMedInhosp1.setUpdateTime(new Date()); |
| | | patMedInhosp1.setTelcode(patArchive.getTelcode()); |
| | |
| | | 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.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.ruoyi.common.core.service.IConfigService; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.DeepSeekApi; |
| | | import com.smartor.common.FtpService; |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.common.ScheduleSubtaskBuilder; |
| | |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.junit.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | 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; |
| | |
| | | @Autowired |
| | | private SvyLibScriptCategoryMapper svyLibScriptCategoryMapper; |
| | | |
| | | @Autowired |
| | | private IPatMedInhospService patMedInhospService; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | |
| | | |
| | | @Value("${ASRCallBackPath}") |
| | | private String ASRCallBackPath; |
| | | |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | @Autowired |
| | | private MtSubmitSmUtil mtSubmitSmUtil; |
| | |
| | | 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 |
| | |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubtaskTemplateVO.getSubId()); |
| | | if (serviceSubtask == null || serviceSubtask.getSendstate() != 2L) |
| | | throw new BaseException("该任å¡å·²åéç»æ£è
ï¼ä¸è½åè¿è¡ä¿®æ¹æ¨¡æ¿"); |
| | | |
| | | serviceSubtaskTemplateVO.getSvyTaskTemplateVO().setIntroduce("该é®å·æ¯æ¿æ¢åçé®é¢ï¼æ¿æ¢åçé®é¢æ¯ï¼" + serviceSubtask.getTemplateid()); |
| | | Integer taskTempid = svyTaskTemplateService.saveOrUpdateTemplate(serviceSubtaskTemplateVO.getSvyTaskTemplateVO()); |
| | | if (taskTempid == null) return false; |
| | | |
| | | //æ¯æ¬¡é½æ°å»ºä¸ä¸ªä¹å¯ä»¥ï¼ä½æ°å»ºä¹åè¦æä¹åçå é¤ |
| | | if (serviceSubtask.getType().equals("2")) { |
| | | svyTaskTemplateService.deleteSvyTaskTemplateBySvyid(serviceSubtask.getTemplateid()); |
| | | } else if (serviceSubtask.getType().equals("1")) |
| | | ivrTaskTemplateService.deleteIvrTaskTemplateByID(serviceSubtask.getTemplateid()); |
| | | |
| | | |
| | | String tempName = svyTaskTemplateService.selectSvyTaskTemplateBySvyid(Long.valueOf(taskTempid)).getSvyname(); |
| | | serviceSubtask.setTemplateid(taskTempid.longValue()); |
| | |
| | | if (ivrTaskTemplateScriptVO.getScriptType().equals("1")) { |
| | | //ç¨æ¥æ è®°ï¼æ¯å¦æå¹é
ä¸ç |
| | | Integer flag = 0; |
| | | //1-AIè¯å« |
| | | SysConfig configVoiceMatchAi = new SysConfig(); |
| | | configVoiceMatchAi.setOrgid(phoneCallReqYQVO.getOrgid()); |
| | | configVoiceMatchAi.setConfigKey("sys.voice.match.ai"); |
| | | SysConfig matchAi = sysConfigMapper.selectConfig(configVoiceMatchAi); |
| | | |
| | | // if (ObjectUtils.isNotEmpty(matchAi) && StringUtils.isNotEmpty(matchAi.getConfigValue()) |
| | | // && matchAi.getConfigValue().equals("1")) { |
| | | // PhoneCallBackYQVO aiMatchResult = AiMatch(phoneCallReqYQVO, phoneCallBackYQVO, |
| | | // ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate, |
| | | // ivrTaskTemplateScripts, scriptId, flag); |
| | | // if(aiMatchResult != null){ |
| | | // return aiMatchResult; |
| | | // } |
| | | // } else { |
| | | //æ¯éæ©é¢ |
| | | for (int j = 0; j < ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size(); j++) { |
| | | log.error("phoneCallReqYQVO.getAsrtext()çå¼ä¸ºï¼{}", phoneCallReqYQVO.getAsrtext()); |
| | | if (StringUtils.isEmpty(phoneCallReqYQVO.getAsrtext())) { |
| | | continue; |
| | | } |
| | | boolean matchedFlag = false; |
| | | //å
å« |
| | | Matcher matcher = null; |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) { |
| | |
| | | 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; |
| | | } |
| | | //说æå¹é
æ£ç¡®äº |
| | | if(matchedFlag){ |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | log.info("å¹é
æ£ç¡®äºå--------------"); |
| | | ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | // } |
| | | //齿²¡æå¹é
å° |
| | | if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) { |
| | | log.info("齿²¡æå¹é
å°-------------------------"); |
| | |
| | | } |
| | | |
| | | @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) { |
| | | String content = ""; |
| | | String ip = localIP; |
| | | ServiceTask serviceTask = new ServiceTask(); |
| | | serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceTaskVo.getTaskid()); |
| | | if (ObjectUtils.isNotEmpty(serviceTask)) { |
| | | try { |
| | | ServiceTaskdept serviceTaskdept = new ServiceTaskdept(); |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVo.getDeptcode())) { |
| | | serviceTaskdept.setDeptType("1"); |
| | | serviceTaskdept.setDeptCode(serviceTaskVo.getDeptcode()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVo.getLeavehospitaldistrictcode())) { |
| | | serviceTaskdept.setDeptType("2"); |
| | | serviceTaskdept.setDeptCode(serviceTaskVo.getLeavehospitaldistrictcode()); |
| | | } |
| | | serviceTaskdept.setServiceType(serviceTask.getServiceType()); |
| | | serviceTaskdept.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskdept.setTaskId(serviceTaskVo.getTaskid()); |
| | | List<ServiceTaskdept> serviceTaskdepts = serviceTaskdeptService.selectServiceTaskdeptList(serviceTaskdept); |
| | | |
| | | if (!CollectionUtils.isEmpty(serviceTaskdepts)) { |
| | | PatArchive patArchive = new PatArchive(); |
| | | patArchive.setId(999999999L); |
| | | patArchive.setName("èææ£è
"); |
| | | //å°è£
serviceSubtask |
| | | ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, serviceTaskdepts.get(0), patArchive); |
| | | int i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | //æ ¹æ®çæå¤é¾ |
| | | if (ObjectUtils.isNotEmpty(serviceSubtask.getTaskid()) && ObjectUtils.isNotEmpty(serviceSubtask.getPatid()) && ObjectUtils.isNotEmpty(serviceSubtask.getId())) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(serviceSubtask.getTaskid().toString(), pub_key); |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | String subId = rsaPublicKeyExample.encryptedData(serviceSubtask.getId().toString(), pub_key); |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(serviceTask.getTaskName()); |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(serviceTask.getOrgid()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | String url = ip + ":" + req_path + "/wt?p=" + format; |
| | | content = url; |
| | | serviceOutPath.setUrl(url); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("ãæ«ç çæä»»å¡ãå¤çå¼å¸¸ï¼{}", e.getMessage()); |
| | | } |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, ServiceTaskdept serviceTaskdept, PatArchive patArchive) { |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid())) |
| | | serviceSubtask.setLibtemplateid(Long.valueOf(serviceTask.getLibtemplateid())); |
| | | // serviceSubtask.setNurseId(patMedInhosp1.getNurseId()); |
| | | // serviceSubtask.setNurseName(patMedInhosp1.getNurseName()); |
| | | // serviceSubtask.setDrcode(patMedInhosp1.getDrcode()); |
| | | // serviceSubtask.setDrname(patMedInhosp1.getDrname()); |
| | | if(StringUtils.isNotEmpty(serviceTaskdept.getDeptType()) && serviceTaskdept.getDeptType().equals("1")){ |
| | | serviceSubtask.setDeptcode(serviceTaskdept.getDeptCode()); |
| | | serviceSubtask.setDeptname(serviceTaskdept.getDeptName()); |
| | | }else { |
| | | serviceSubtask.setLeavehospitaldistrictcode(serviceTaskdept.getDeptCode()); |
| | | serviceSubtask.setLeavehospitaldistrictname(serviceTaskdept.getDeptName()); |
| | | } |
| | | serviceSubtask.setTemplateid(serviceTask.getTemplateid()); |
| | | serviceSubtask.setTemplatename(serviceTask.getTemplatename()); |
| | | serviceSubtask.setPatid(patArchive.getId()); |
| | | serviceSubtask.setSendname(patArchive.getName()); |
| | | serviceSubtask.setSfzh(patArchive.getIdcardno()); |
| | | serviceSubtask.setPhone(patArchive.getTelcode()); |
| | | if (StringUtils.isBlank(patArchive.getTelcode())) serviceSubtask.setPhone(patArchive.getRelativetelcode()); |
| | | serviceSubtask.setSex(patArchive.getSex()); |
| | | serviceSubtask.setAge(patArchive.getAge()); |
| | | serviceSubtask.setSendstate(3L); |
| | | // serviceSubtask.setManagementDoctor(patMedInhosp1.getManagementDoctor()); |
| | | // serviceSubtask.setManagementDoctorCode(patMedInhosp1.getManagementDoctorCode()); |
| | | serviceSubtask.setServiceType(serviceTask.getServiceType()); |
| | | serviceSubtask.setPreachform(serviceTask.getPreachform()); |
| | | serviceSubtask.setHospType("8"); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | // serviceSubtask.setCreateBy(patMedInhosp1.getNurseName()); |
| | | // serviceSubtask.setLeavehospitaldistrictcode(patMedInhosp1.getLeavehospitaldistrictcode()); |
| | | // serviceSubtask.setLeavehospitaldistrictname(patMedInhosp1.getLeavehospitaldistrictname()); |
| | | serviceSubtask.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | serviceTask.setSendDay(1L); |
| | | Date newDate = new Date(); |
| | | serviceSubtask.setLongSendTime(newDate); |
| | | serviceSubtask.setVisitTime(newDate); |
| | | return serviceSubtask; |
| | | } |
| | | |
| | | /** |
| | | * Ai å¹é
é项 |
| | | * @param questionText |
| | | * @param voiceText |
| | | * @param options |
| | | * @return |
| | | */ |
| | | public Integer matchOptionIndex(String questionText, String voiceText, List<IvrTaskTemplateTargetoption> options){ |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("userQuestion",questionText); |
| | | jsonObject.put("userAnswer",voiceText); |
| | | jsonObject.put("options", options); |
| | | String jsonString = jsonObject.toJSONString(); |
| | | String result = null; |
| | | |
| | | String url = "http://localhost:8099/matchOptionIndex"; |
| | | // String url = configService.selectConfigByKey("sys.voice.match.ai.url"); |
| | | if(StringUtils.isNotEmpty(url)){ |
| | | try { |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | |
| | | result = HttpUtils.sendPostByHeader(url, jsonString, headers); |
| | | } catch (Exception e) { |
| | | log.error("AIè¯å«å¤±è´¥", e); |
| | | } |
| | | } |
| | | if(StringUtils.isNotEmpty(result) && result.matches("^-?\\d+$")){ |
| | | return Integer.parseInt(result); |
| | | }else { |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | public PhoneCallBackYQVO AiMatch(PhoneCallReqYQVO phoneCallReqYQVO, PhoneCallBackYQVO phoneCallBackYQVO, |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate, |
| | | List<IvrTaskTemplateScript> ivrTaskTemplateScripts, String scriptId, Integer flag){ |
| | | PhoneCallBackYQVO back = null; |
| | | List<IvrTaskTemplateTargetoption> options = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(); |
| | | String voiceText = phoneCallReqYQVO.getAsrtext(); |
| | | String questionText = StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrtext()) ? ivrTaskTemplateScriptVO.getIvrtext() : ivrTaskTemplateScriptVO.getScriptContent(); |
| | | Integer matched = -1; |
| | | matched = matchOptionIndex(questionText, voiceText, options); |
| | | //说æå¹é
æ£ç¡®äº |
| | | if(matched != null && matched >= 0){ |
| | | IvrTaskTemplateTargetoption chosenOption = options.get(matched); |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | log.info("å¹é
æ£ç¡®äºå--------------"); |
| | | chosenOption.setIsUserOperation(1); |
| | | serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(chosenOption); |
| | | |
| | | //å°æ£è
çåç¾åè¿service_subtask_detailä¸ |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | ivrTaskTemplateScriptVO.setQuestionResult(chosenOption.getOptiondesc()); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate); |
| | | //ä¿®æ¹ä¸ä¸è¯é³è·¯å¾ï¼æ¹æå端å¯ä»¥è®¿é®çï¼åå°æ°æ®åºä¸ï¼ |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail.getQuestionvoice())) { |
| | | String questionvoice = serviceSubtaskDetail.getQuestionvoice(); |
| | | String[] split = questionvoice.split("\\\\"); |
| | | if (split.length > 0) { |
| | | String lastPart = split[split.length - 1]; |
| | | serviceSubtaskDetail.setQuestionvoice(voicePathPrefix + lastPart); |
| | | } |
| | | } |
| | | serviceSubtaskDetailList.add(serviceSubtaskDetail); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | serviceSubTaskDetailReq.setGuid(phoneCallReqYQVO.getGuid()); |
| | | serviceSubTaskDetailReq.setOrgid(phoneCallReqYQVO.getOrgid()); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | |
| | | //夿ä¸ä¸å½åçé®é¢æ¯ä¸æ¯æ»¡æåº¦é®é¢ï¼å¹¶ä¸dutyDeptCodeæ¯å¦æå¼ï¼å¹¶ä¸é项æ¯ä¸æ¯å¼å¸¸é项ï¼å¦æå
¨ç¬¦åï¼å徿»¡æåº¦é®é¢å¼å¸¸è¡¨æ°å¢ |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getDutyDeptCode()) && 1 == chosenOption.getIsabnormal()) { |
| | | ServiceSubtaskDetailTrace subtaskDetailTrace = new ServiceSubtaskDetailTrace(); |
| | | //ç¨taskidãsubidåscriptidå»è·ådetailid |
| | | ServiceSubtaskDetail ssd = new ServiceSubtaskDetail(); |
| | | ssd.setSubId(serviceSubtask.getId()); |
| | | ssd.setTaskid(serviceSubtask.getTaskid()); |
| | | ssd.setScriptid(StringUtils.isNotEmpty(scriptId) ? Long.valueOf(scriptId) : null); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(ssd); |
| | | subtaskDetailTrace.setDetailId(CollectionUtils.isNotEmpty(serviceSubtaskDetails) ? serviceSubtaskDetails.get(0).getId() : null); |
| | | |
| | | subtaskDetailTrace.setSubId(serviceSubtask.getId()); |
| | | subtaskDetailTrace.setTaskid(serviceSubtask.getTaskid()); |
| | | subtaskDetailTrace.setTemplateid(ivrTaskTemplateScriptVO.getId()); |
| | | subtaskDetailTrace.setTemplatequestionnum(ivrTaskTemplateScriptVO.getScriptno()); |
| | | subtaskDetailTrace.setSwitchid(chosenOption.getId()); |
| | | subtaskDetailTrace.setQuestiontext(ivrTaskTemplateScriptVO.getScriptContent()); |
| | | subtaskDetailTrace.setQuestionvoice(null); |
| | | subtaskDetailTrace.setCategoryname(ivrTaskTemplateScriptVO.getScriptAssortname()); |
| | | subtaskDetailTrace.setCategoryid(ivrTaskTemplateScriptVO.getScriptAssortid()); |
| | | //è·åææé项 |
| | | String optionDescStr = Optional.ofNullable(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()).filter(list -> !list.isEmpty()).map(list -> list.stream().map(IvrTaskTemplateTargetoption::getOptiondesc).filter(Objects::nonNull).collect(Collectors.joining("&"))).orElse(""); |
| | | subtaskDetailTrace.setTargetid(chosenOption.getId()); |
| | | subtaskDetailTrace.setTargetvalue(optionDescStr); |
| | | subtaskDetailTrace.setMatchedtext(chosenOption.getOptiondesc()); |
| | | subtaskDetailTrace.setValueType(serviceSubtaskDetails.get(0).getValueType()); |
| | | subtaskDetailTrace.setTemplateType(1); |
| | | |
| | | SvyLibScriptCategory svyLibScriptCategory = svyLibScriptCategoryMapper.selectSvyLibScriptCategoryById(ivrTaskTemplateScriptVO.getScriptAssortid()); |
| | | subtaskDetailTrace.setType(svyLibScriptCategory.getType()); |
| | | subtaskDetailTrace.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | subtaskDetailTrace.setAsrtext(phoneCallReqYQVO.getAsrtext()); |
| | | subtaskDetailTrace.setRecordpath(phoneCallReqYQVO.getRecordpath()); |
| | | subtaskDetailTrace.setPatid(serviceSubtask.getPatid()); |
| | | JSONObject patdescJson = new JSONObject(); |
| | | patdescJson.put("sendname", serviceSubtask.getSendname()); |
| | | patdescJson.put("phone", serviceSubtask.getPhone()); |
| | | patdescJson.put("age", serviceSubtask.getAge()); |
| | | patdescJson.put("sex", serviceSubtask.getSex() != null ? serviceSubtask.getSex() == 1 ? "ç·" : "女" : null); |
| | | subtaskDetailTrace.setPatdesc(patdescJson.toJSONString()); |
| | | subtaskDetailTrace.setTodeptcode(ivrTaskTemplateScriptVO.getDutyDeptCode()); |
| | | subtaskDetailTrace.setTodeptname(ivrTaskTemplateScriptVO.getDutyDeptName()); |
| | | subtaskDetailTrace.setOrgid(serviceSubtask.getOrgid()); |
| | | subtaskDetailTrace.setHandleFlag("0"); |
| | | subtaskDetailTrace.setGuid(phoneCallReqYQVO.getGuid()); |
| | | subtaskDetailTrace.setCreateTime(new Date()); |
| | | subtaskDetailTrace.setUpdateTime(new Date()); |
| | | subtaskDetailTrace.setOrgid(phoneCallReqYQVO.getOrgid()); |
| | | traceService.insertServiceSubtaskDetailTtrace(subtaskDetailTrace); |
| | | } |
| | | |
| | | //夿ä¸ä¸ï¼è¿ä¸ªéé¡¹ç»ææ¯ä¸æ¯è¿æç»§ç»é®ä¸å»çå¿
è¦ï¼ä¾å¦éé¡¹ç»ææ¯å«äººä¸æ³ç»§ç»åçé®é¢ï¼å°±è¦ç»ææ |
| | | if (chosenOption.getIsEnd() == 1) { |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop"); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "noVoice"); |
| | | //å¨redisä¸ä¿åä¸ä¸ç»æè¯ï¼å¨è°ç¨æçµè¯çæ¹æ³æ¶å é¤ |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "- jsy", serviceTask.getJsy(), 120, TimeUnit.MINUTES); |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask.getJsy()); |
| | | //è®°å½ç¶æ |
| | | setFailPreachForm(serviceSubtask, "3", "çµè¯æ¨æå·²å®æ", "9"); |
| | | return phoneCallBackYQVO; |
| | | } |
| | | |
| | | flag = 1; |
| | | //å°å½ååçææ¥ç¶æå é¤ï¼ç»ä¸ä¸é¢è®©ä½ |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop"); |
| | | // //è·åä¸ä¸é¢ |
| | | log.error("è·åä¸ä¸é¢çä¿¡æ¯ï¼{}", ivrTaskTemplateScriptVO); |
| | | if (ivrTaskTemplateScriptVO.getBranchFlag().equals("1") || ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() != null && ivrTaskTemplateScriptVO.getNextScriptno() != 0) { |
| | | Long nextQuestion = null; |
| | | if (ivrTaskTemplateScriptVO.getBranchFlag().equals("1")) { |
| | | nextQuestion = chosenOption.getNextQuestion(); |
| | | //æ´æ°åæ° |
| | | double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | score = BigDecimal.valueOf(score).add(chosenOption.getScore()).doubleValue(); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score); |
| | | } else { |
| | | nextQuestion = ivrTaskTemplateScriptVO.getNextScriptno(); |
| | | //æ´æ°åæ° |
| | | Object obj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | Double score = (obj == null ? new Double(0.00) : new Double(((Double) obj).doubleValue())); |
| | | score = BigDecimal.valueOf(score).add(chosenOption.getScore()).doubleValue(); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "SCORE", score, 120, TimeUnit.MINUTES); |
| | | } |
| | | if (nextQuestion == null || nextQuestion == 0L) { |
| | | //妿ä¸ä¸é¢ä¸ºç©ºï¼æè
为0ï¼åææº |
| | | ServiceSubtask ss = new ServiceSubtask(); |
| | | ss.setId(serviceSubtask.getId()); |
| | | ss.setSendstate(6L); |
| | | ss.setRemark("çµè¯æ¨æå·²å®æ"); |
| | | serviceSubtaskMapper.updateServiceSubtask(ss); |
| | | //è®°å½ç¶æ |
| | | setFailPreachForm(serviceSubtask, "3", "çµè¯æ¨æå·²å®æ", "9"); |
| | | |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop"); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "noVoice"); |
| | | //å¨redisä¸ä¿åä¸ä¸ç»æè¯ï¼å¨è°ç¨æçµè¯çæ¹æ³æ¶å é¤ |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "- jsy", serviceTask.getJsy(), 120, TimeUnit.MINUTES); |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask.getJsy()); |
| | | //å°ç»æåè¿detail表 |
| | | ServiceSubTaskDetailReq ssdReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList2 = new ArrayList<>(); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList2); |
| | | ssdReq.setGuid(phoneCallReqYQVO.getGuid()); |
| | | ssdReq.setOrgid(phoneCallReqYQVO.getOrgid()); |
| | | saveQuestionAnswerPhone(ssdReq); |
| | | return phoneCallBackYQVO; |
| | | } |
| | | |
| | | for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) { |
| | | if (script.getSort() == nextQuestion.intValue()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = StringUtils.isNotEmpty(script.getIvrtext()) ? script.getIvrtext() : script.getScriptContent(); |
| | | log.error("ä¸ä¸é¢é®é¢ï¼{}", scriptContent); |
| | | log.error("ä¸ä¸é¢çå任塿¯ï¼{}", serviceSubtask); |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent)); |
| | | //å°è¯¥æ£è
çRedisä¸çé¢ç®IDï¼è¿è¡ä¿®æ¹ |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES); |
| | | //å 餿 ååº |
| | | redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | } |
| | | } |
| | | } else if (ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getNextScriptno() == 0) { |
| | | ServiceTask serviceTask1 = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | //æ´æ°ä¸ä¸åæ° |
| | | double score = 0.0; |
| | | Object scoreObj = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | if (ObjectUtils.isNotEmpty(scoreObj)) score = (double) scoreObj; |
| | | serviceSubtask.setScore(BigDecimal.valueOf(score)); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setRemark("çµè¯æ¨æå·²å®æ"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | //è®°å½ç¶æ |
| | | setFailPreachForm(serviceSubtask, "3", "çµè¯æ¨æå·²å®æ", "9"); |
| | | //è®¾ç½®ç»æè¯ |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + serviceTask1.getJsy()); |
| | | Long id = serviceSubtask.getId(); |
| | | Map<String, String> map = delRedisValue(null, id.toString()); |
| | | log.error("mapçå¼ä¸ºï¼{}", map); |
| | | if (ObjectUtils.isNotEmpty(map)) |
| | | redisCache.setCacheObject(map.get("cacheName"), map.get("val")); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "PlayEventCallbackPlaystop"); |
| | | //å¨redisä¸ä¿åä¸ä¸ç»æè¯ï¼å¨è°ç¨æçµè¯çæ¹æ³æ¶å é¤ |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "- jsy", serviceTask.getJsy(), 120, TimeUnit.MINUTES); |
| | | // return phoneCallBackYQVO; |
| | | |
| | | } |
| | | } else { |
| | | log.info("没æå¹é
ä¸----------------------------"); |
| | | //flag=0,è¯´ææ²¡ å¹é
ä¸ï¼ä¹è¦ææ£è
说çè¯è®°å½ä¸æ¥ |
| | | if (matched == ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size() - 1 && flag == 0) { |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate); |
| | | //ä¿®æ¹ä¸ä¸è¯é³è·¯å¾ï¼æ¹æå端å¯ä»¥è®¿é®çï¼åå°æ°æ®åºä¸ï¼ |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail.getQuestionvoice())) { |
| | | String questionvoice = serviceSubtaskDetail.getQuestionvoice(); |
| | | String[] split = questionvoice.split("\\\\"); |
| | | if (split.length > 0) { |
| | | String lastPart = split[split.length - 1]; |
| | | serviceSubtaskDetail.setQuestionvoice(voicePathPrefix + lastPart); |
| | | } |
| | | } |
| | | serviceSubtaskDetailList.add(serviceSubtaskDetail); |
| | | //å¦ææ²¡æ å¹é
ä¸ï¼è¿ä¸ªå¿
须为null |
| | | serviceSubtaskDetailList.get(0).setMatchedtext(""); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | serviceSubTaskDetailReq.setGuid(phoneCallReqYQVO.getGuid()); |
| | | serviceSubTaskDetailReq.setOrgid(phoneCallReqYQVO.getOrgid()); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | } |
| | | } |
| | | return back; |
| | | } |
| | | |
| | | @Test |
| | | public void TestMatch(){ |
| | | String questionText = "æ¨å¥½,è¯·é®æ¨æ¯æ£è
æ¬äººè¿æ¯å®¶å±ï¼\n"; |
| | | String voiceText = "æèªå·±"; |
| | | String matchedText = ""; |
| | | List<IvrTaskTemplateTargetoption> options = new ArrayList<>(); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption1 = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption1.setTargetvalue("æ¬äºº"); |
| | | options.add(ivrTaskTemplateTargetoption1); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption2 = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption2.setTargetvalue("å®¶å±"); |
| | | options.add(ivrTaskTemplateTargetoption2); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption3 = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption3.setTargetvalue("å
¶ä»"); |
| | | options.add(ivrTaskTemplateTargetoption3); |
| | | |
| | | Integer matched = matchOptionIndex(questionText,voiceText,options); |
| | | if(ObjectUtils.isNotEmpty(matched)){ |
| | | if(matched >= 0){ |
| | | matchedText = options.get(matched).getTargetvalue(); |
| | | } |
| | | } |
| | | log.info("aiå¹é
æåï¼å¹é
ç»ææ¯:" + matchedText); |
| | | } |
| | | } |
| | |
| | | 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> |
| | | |
| | | |
| | |
| | | d.leavehospitaldistrictcode AS leavehospitaldistrictcode |
| | | FROM |
| | | pat_med_inhosp d |
| | | JOIN pat_archive a ON a.id = d.patid |
| | | LEFT JOIN pat_archive a ON a.id = d.patid |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if> |
| | |
| | | </if> |
| | | |
| | | <if test="pids != null"> |
| | | AND a.id NOT IN |
| | | AND d.patid NOT IN |
| | | <foreach collection="pids" item="pid" open="(" separator="," close=")"> |
| | | #{pid} |
| | | </foreach> |
| | |
| | | |
| | | <!-- ä½é¢æ£è
æ»æ°ç»è®¡ï¼å»éï¼ --> |
| | | <select id="countPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq" resultType="long"> |
| | | SELECT COUNT(DISTINCT a.id) |
| | | SELECT COUNT(DISTINCT d.patid) |
| | | FROM pat_med_inhosp d |
| | | JOIN pat_archive a ON a.id = d.patid |
| | | WHERE 1=1 |
| | | AND d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | AND d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">AND a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">AND a.idcardno = #{idcardno}</if> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="pids != null"> |
| | | AND a.id NOT IN |
| | | AND d.patid NOT IN |
| | | <foreach collection="pids" item="pid" open="(" separator="," close=")"> |
| | | #{pid} |
| | | </foreach> |
| | |
| | | <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> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</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> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="preachform != null ">and preachform = #{preachform}</if> |
| | | <if test="currentPreachform != null ">and current_preachform = #{currentPreachform}</if> |
| | |
| | | SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq, |
| | | SUM(CASE WHEN sendstate = 4 THEN 1 ELSE 0 END) AS wxsf, |
| | | SUM(CASE WHEN sendstate != 4 THEN 1 ELSE 0 END) AS xsf, |
| | | SUM(CASE WHEN (sendstate = 1 OR sendstate = 2 OR sendstate = 3 OR sendstate = 5 OR sendstate = 7 ) THEN 1 ELSE 0 END) AS dsf, |
| | | SUM(CASE WHEN (sendstate = 1 OR sendstate = 2 OR sendstate = 3 OR sendstate = 5 OR sendstate = 7 ) THEN 1 ELSE 0 |
| | | END) AS dsf, |
| | | SUM(CASE WHEN sendstate = 6 THEN 1 ELSE 0 END) AS ywc, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep = '1' THEN 1 ELSE 0 END) AS yc, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep = '2' THEN 1 ELSE 0 END) AS jg, |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | AND campusid = #{campusid} |
| | | </if> |
| | | <if test="guid != null and guid != ''"> |
| | | AND guid = #{guid} |
| | | </if> |
| | |
| | | <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> |
| | |
| | | resultMap="SvyTaskTemplateResult"> |
| | | <include refid="selectSvyTaskTemplateVo"/> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="svycode != null and svycode != ''">and svycode = #{svycode}</if> |
| | | <if test="svyname != null and svyname != ''">and svyname like concat('%', #{svyname}, '%')</if> |
| | | <if test="description != null and description != ''">and description = #{description}</if> |
| | | <if test="introduce != null and introduce != ''">and introduce = #{introduce}</if> |
| | | <if test="submitprompt != null and submitprompt != ''">and submitprompt = #{submitprompt}</if> |
| | | <if test="tag != null and tag != ''">and tag = #{tag}</if> |
| | | <if test="version != null ">and version = #{version}</if> |
| | | <if test="centerlibrarycode != null and centerlibrarycode != ''">and centerlibrarycode = |
| | | #{centerlibrarycode} |
| | | </if> |
| | | <if test="centerlibraryid != null ">and centerlibraryid = #{centerlibraryid}</if> |
| | | <if test="islocal != null ">and islocal = #{islocal}</if> |
| | | <if test="isenable != null and isenable != ''">and isenable = #{isenable}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="taskScriptId != null and taskScriptId != ''">and task_script_id = #{taskScriptId}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="deptNames != null and deptNames != ''">and dept_names = #{deptNames}</if> |
| | | <if test="labelInfo != null and labelInfo != ''">and label_info = #{labelInfo}</if> |
| | | <if test="campus != null and campus != ''">and campus = #{campus}</if> |
| | | <if test="suitway != null and suitway != ''">and suitway = #{suitway}</if> |
| | | <if test="otherdata != null and otherdata != ''">and otherdata = #{otherdata}</if> |
| | | <if test="valueType != null and valueType != ''">and value_type = #{valueType}</if> |
| | | <if test="reply != null and reply != ''">and reply = #{reply}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="deptCode != null ">and dept_code = #{deptCode}</if> |
| | | <if test="longTemp != null ">and long_temp = #{longTemp}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | and del_flag = 0 |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="svycode != null and svycode != ''">and svycode = #{svycode}</if> |
| | | <if test="svyname != null and svyname != ''">and svyname like concat('%', #{svyname}, '%')</if> |
| | | <if test="description != null and description != ''">and description = #{description}</if> |
| | | <if test="introduce != null and introduce != ''">and introduce = #{introduce}</if> |
| | | <if test="submitprompt != null and submitprompt != ''">and submitprompt = #{submitprompt}</if> |
| | | <if test="tag != null and tag != ''">and tag = #{tag}</if> |
| | | <if test="version != null ">and version = #{version}</if> |
| | | <if test="centerlibrarycode != null and centerlibrarycode != ''">and centerlibrarycode = |
| | | #{centerlibrarycode} |
| | | </if> |
| | | <if test="centerlibraryid != null ">and centerlibraryid = #{centerlibraryid}</if> |
| | | <if test="islocal != null ">and islocal = #{islocal}</if> |
| | | <if test="isenable != null and isenable != ''">and isenable = #{isenable}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="taskScriptId != null and taskScriptId != ''">and task_script_id = #{taskScriptId}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="deptNames != null and deptNames != ''">and dept_names = #{deptNames}</if> |
| | | <if test="labelInfo != null and labelInfo != ''">and label_info = #{labelInfo}</if> |
| | | <if test="campus != null and campus != ''">and campus = #{campus}</if> |
| | | <if test="suitway != null and suitway != ''">and suitway = #{suitway}</if> |
| | | <if test="otherdata != null and otherdata != ''">and otherdata = #{otherdata}</if> |
| | | <if test="valueType != null and valueType != ''">and value_type = #{valueType}</if> |
| | | <if test="reply != null and reply != ''">and reply = #{reply}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="deptCode != null ">and dept_code = #{deptCode}</if> |
| | | <if test="longTemp != null ">and long_temp = #{longTemp}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult"> |
| | | <include refid="selectSvyTaskTemplateVo"/> |
| | | where del_flag=0 and id = #{id} |
| | | where del_flag=0 and id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyTaskTemplate" parameterType="com.smartor.domain.SvyTaskTemplate" useGeneratedKeys="true" |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteSvyTaskTemplateBySvyid" parameterType="Long"> |
| | | delete |
| | | from svy_task_template |
| | | update svy_task_template |
| | | set del_flag=1 |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | |
| | | <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> |