| | |
| | | <file url="file://$PROJECT_DIR$/ruoyi-admin/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospProvisionalController.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskPreachformController.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskmedicalController.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-admin/src/main/resources" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-admin/src/main/resources/logback.xml" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/dx" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/dx/MessageSend.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/dx/SmsServiceSoap.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/dx2/Hello.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/dx2/HelloResponse.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/dx2/I5GReply.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/domain/ServiceTaskmedical.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/VO/ServiceTaskmedicalVO.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/PatMedOuthospProvisionalMapper.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskPreachformMapper.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/ServiceTaskmedicalMapper.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/IPatMedOuthospProvisionalService.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/IServiceSubtaskPreachformService.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/IServiceTaskmedicalService.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospProvisionalServiceImpl.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskPreachformServiceImpl.java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceTaskmedicalServiceImpl.java" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/resources" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/ServiceTaskmedicalMapper.xml" charset="GBK" /> |
| | | <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" /> |
| | | <file url="PROJECT" charset="GBK" /> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="RedisConfiguration"> |
| | | <option name="serverConfigurations"> |
| | | <list> |
| | | <ServerConfiguration> |
| | | <option name="label" value="local" /> |
| | | <option name="password" value="Smartor" /> |
| | | <option name="sercurityInfo"> |
| | | <SercurityInfo /> |
| | | </option> |
| | | <option name="serverUrl" value="localhost:6020" /> |
| | | <option name="userName" value="" /> |
| | | </ServerConfiguration> |
| | | </list> |
| | | </option> |
| | | </component> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module version="4"> |
| | | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true"> |
| | | <exclude-output /> |
| | | <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | </component> |
| | | </module> |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.github.pagehelper.ISelect; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | SysUser user = getLoginUser().getUser(); |
| | | patMedInhosp.setOrgid(user.getOrgid()); |
| | | List<PatMedInhosp> list = patMedInhospService.selectPatMedInhospList(patMedInhosp); |
| | | long count = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | patMedInhospService.selectPatMedInhospList(patMedInhosp); |
| | | } |
| | | }); |
| | | // startPage ä¹å PageHelper å·²ç»èªå¨æ§è¡è¿ä¸æ¬¡ count æ¥è¯¢ï¼ç´æ¥å¤ç¨ Page éç totalï¼ |
| | | // é¿å
ç¨ PageUtils.count æå¸¦ JOIN çç»è®¡è¯å¥åè·ä¸é |
| | | long count = new PageInfo<>(list).getTotal(); |
| | | return getDataTable2(count, list); |
| | | } |
| | | |
| | |
| | | if (StringUtils.isEmpty(systype)) path = sysConfigService.selectConfigByKey("sys.qddz"); |
| | | else path = sysConfigService.selectConfigByKey("sys.qddz.yd"); |
| | | |
| | | if (active.equals("nhfy")){ |
| | | //ååéä¸çï¼å
ä¸èµ°å
ç»ï¼ç´æ¥è·³å°ç»é页 |
| | | path = sysConfigService.selectConfigByKey("sys.qddz.yd"); |
| | | log.info("ãNHFYSSOç»å½ãéå®åå°åï¼{}", path); |
| | | return buildRedirect(path); |
| | | } |
| | | log.info("qddzçæ¥è¯¢å¼ä¸ºï¼pathï¼{}", path); |
| | | |
| | | if (StringUtils.isEmpty(path)) { |
| | | throw new BaseException("请é
ç½®å端å°å"); |
| | | } |
| | |
| | | return buildRedirect(path + "/login"); |
| | | } |
| | | |
| | | String redirectUrl = path + "/loginSSO?token=" + loginToken + "&orgid=" + orgid + "&campusid=" + campusid + "&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); |
| | | } |
| | |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # å
¬å¸æ¬å° |
| | | url: jdbc:mysql://haiershi.a1.luyouxia.net:23844/smartor_lishui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=120000&socketTimeout=240000 |
| | | url: jdbc:mysql://haiershi.a1.luyouxia.net:23844/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=120000&socketTimeout=240000 |
| | | username: smartor |
| | | password: Smartor.2023 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | # æ¥å¿è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/logsï¼Linuxé
ç½® /home/ruoyi/logs,ä¸å¡«å级ç®å½logsï¼ |
| | | path: D:/ruoyi/ls/logs |
| | | path: D:/health/logs |
| | | # å符ç¼ç |
| | | charset: |
| | | console: UTF-8 |
| | | file: UTF-8 |
| | | # æ¥å¿æä»¶é
ç½® |
| | | file: |
| | | name: ${logging.path}/ruoyi.log |
| | | name: ${logging.path}/sys-info.log |
| | | max-size: 100MB |
| | | max-history: 30 |
| | | # æ¥å¿çº§å«é
ç½® |
| | |
| | | com.ruoyi: info |
| | | com.smartor: info |
| | | org.springframework: warn |
| | | org.apache.ibatis: warn |
| | | org.apache.ibatis: debug |
| | | # æ§å¶å°è¾åºçº§å« |
| | | root: info |
| | | # æ¥å¿æ ¼å¼é
ç½® |
| | |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | profiles: |
| | | active: ls |
| | | active: nhfy |
| | | |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | |
| | | sms_appkey: |
| | | sms_flag: |
| | | |
| | | shurl: |
| | | shversion: |
| | | #䏿±çµè¯å°å |
| | | shurl: http://192.168.99.224:8098/ |
| | | shversion: 6.1.x |
| | |
| | | <!-- é
ç½®é»è®¤çæ§è¡å¨.SIMPLEå°±æ¯æ®éæ§è¡å¨;REUSEæ§è¡å¨ä¼éç¨é¢å¤çè¯å¥(prepared statements);BATCHæ§è¡å¨å°éç¨è¯å¥å¹¶æ§è¡æ¹éæ´æ° --> |
| | | <setting name="defaultExecutorType" value="SIMPLE"/> |
| | | <!-- æå® MyBatis æç¨æ¥å¿çå
·ä½å®ç°(æ¯å¦æå°SQL) --> |
| | | <!-- <setting name="logImpl" value="STDOUT_LOGGING"/>--> |
| | | <setting name="logImpl" value="STDOUT_LOGGING"/> |
| | | <!-- 使ç¨é©¼å³°å½åæ³è½¬æ¢å段 --> |
| | | <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> --> |
| | | </settings> |
| | |
| | | |
| | | // è·åååºç |
| | | int responseCode = connection.getResponseCode(); |
| | | log.info("postFormRequest ååºç ï¼{}ï¼urlï¼{}", responseCode, fullUrl); |
| | | |
| | | // 读åååº |
| | | // 读åååºï¼é200æ¶errorStreamå¯è½ä¸ºnullï¼é¿å
NPEï¼ |
| | | StringBuilder response = new StringBuilder(); |
| | | if (responseCode == HttpURLConnection.HTTP_OK) { |
| | | reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
| | | } else { |
| | | reader = new BufferedReader(new InputStreamReader(connection.getErrorStream())); |
| | | InputStream respStream = responseCode == HttpURLConnection.HTTP_OK |
| | | ? connection.getInputStream() |
| | | : connection.getErrorStream(); |
| | | if (respStream == null) { |
| | | log.warn("postFormRequest ååºä½ä¸ºç©ºï¼ååºç ï¼{}ï¼urlï¼{}", responseCode, fullUrl); |
| | | return ""; |
| | | } |
| | | reader = new BufferedReader(new InputStreamReader(respStream)); |
| | | |
| | | String line; |
| | | while ((line = reader.readLine()) != null) { |
| | |
| | | headers.put("app-key", APP_KEY); |
| | | Map<String, String> requestParams = new HashMap<>(); |
| | | requestParams.put("token", token); |
| | | String reqData = HttpUtil.postFormRequest(sltdPubPath + "/checkSsoTokenId", requestParams, headers, null); |
| | | String url = active != null && active.contains("nhfy") |
| | | ? sltdPubPath + "/hbos-thirdparty-integration/standard/ih/getHisLoginUserInfo" |
| | | : sltdPubPath + "/checkSsoTokenId"; |
| | | log.info("ãSLTD token éªè¯ã请æ±å°åï¼{}ï¼tokené¿åº¦ï¼{}ï¼tokenç»å°¾ï¼{}", url, token.length(), |
| | | token.length() > 4 ? token.substring(token.length() - 4) : token); |
| | | String reqData = HttpUtil.postFormRequest(url, requestParams, headers, null); |
| | | log.info("ãSLTD token éªè¯ãååºç»æï¼{}", reqData); |
| | | |
| | | if (StringUtils.isEmpty(reqData)) { |
| | |
| | | } |
| | | |
| | | Map<String, Object> map = JSONObject.parseObject(reqData, Map.class); |
| | | if (ObjectUtils.isEmpty(map) || (Integer) map.get("code") != 200) { |
| | | log.error("ãSLTD token éªè¯ãååºç å¼å¸¸ï¼éªè¯å¤±è´¥"); |
| | | if (ObjectUtils.isEmpty(map)) { |
| | | log.error("ãSLTD token éªè¯ãååºè§£æä¸ºç©ºï¼éªè¯å¤±è´¥ï¼ååºå
容ï¼{}", reqData); |
| | | return null; |
| | | } |
| | | |
| | | Map<String, Object> data = (Map<String, Object>) map.get("data"); |
| | | return (String) data.get("accountNo"); |
| | | Object codeObj = map.get("code"); |
| | | int code = codeObj instanceof Number ? ((Number) codeObj).intValue() : -1; |
| | | if (code != 200) { |
| | | log.error("ãSLTD token éªè¯ãååºç å¼å¸¸ï¼éªè¯å¤±è´¥ï¼code={}, message={}, ååºå
容ï¼{}", |
| | | code, map.get("message"), reqData); |
| | | return null; |
| | | } |
| | | |
| | | Object dataObj = map.get("data"); |
| | | if (!(dataObj instanceof Map)) { |
| | | log.error("ãSLTD token éªè¯ãååºç¼ºå°dataèç¹ï¼éªè¯å¤±è´¥ï¼data={}", dataObj); |
| | | return null; |
| | | } |
| | | |
| | | Object accountNo = ((Map<?, ?>) dataObj).get("accountNo"); |
| | | if (accountNo == null || StringUtils.isEmpty(String.valueOf(accountNo))) { |
| | | log.error("ãSLTD token éªè¯ãååºdata䏿²¡æaccountNoï¼éªè¯å¤±è´¥ï¼data={}", dataObj); |
| | | return null; |
| | | } |
| | | return String.valueOf(accountNo); |
| | | } |
| | | |
| | | public String loginByUserName(String userName) { |
| | |
| | | @Value("${isAdmin}") |
| | | private List<Long> isAdmin; |
| | | |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | |
| | | @Override |
| | | public SysUser selectUserByUserNameAndDeptId(String userName) { |
| | | String[] split = userName.split("&"); |
| | | if (split[2].contains("null")) { |
| | | //ååéä¸ä¹ä¸éªè¯dept_idäº |
| | | if (split[2].contains("null") || active.equals("nhfy")) { |
| | | split[2] = null; |
| | | } |
| | | SysUser sysUser = userMapper.selectUserByUserNameByCondition(split[0], split[1], split[2]); |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import com.smartor.domain.PatMedInhospVO; |
| | |
| | | public String getTagnameBypatid(Long patid); |
| | | |
| | | /** |
| | | * æ¹éæ¥è¯¢æ£è
æ ç¾ï¼GROUP_CONCAT æ¼æ¥åçæ ç¾ä¸²ï¼ |
| | | * |
| | | * @param patids æ£è
æ¡£æ¡idéåï¼è°ç¨æ¹é¡»ä¿è¯é空ä¸å·²å»é |
| | | * @return æ¯è¡å« patidãtagname 两个 key |
| | | */ |
| | | public List<Map<String, Object>> getTagnameByPatids(@Param("patids") List<Long> patids); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½å表 |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | |
| | | } |
| | | |
| | | List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhospList) { |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | fillTagname(patMedInhospList); |
| | | return patMedInhospList; |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå¡«å
æ£è
æ ç¾ |
| | | * <p> |
| | | * åå®ç°æ¯æ¯è¡è°ä¸æ¬¡ getTagnameBypatidï¼SQL å¾è¿æ¬¡æ°é pageSize 线æ§å¢é¿ï¼ |
| | | * è¿éæ patid å»éå忹䏿¬¡æ¥åï¼ç»æä¸éè¡æ¥è¯¢å®å
¨ä¸è´ï¼æ£è
æ æ ç¾æ¶ä»ä¸º nullï¼ã |
| | | * |
| | | * @param patMedInhospList å¾
å¡«å
çä½é¢è®°å½ï¼å
许为空 |
| | | */ |
| | | private void fillTagname(List<PatMedInhosp> patMedInhospList) { |
| | | if (CollectionUtils.isEmpty(patMedInhospList)) { |
| | | return; |
| | | } |
| | | // LinkedHashSet å»éåæ¶ä¿æé¡ºåºï¼é¿å
IN å表åºç°éå¤ patid |
| | | Set<Long> patids = new LinkedHashSet<>(); |
| | | for (PatMedInhosp patMedInhosp : patMedInhospList) { |
| | | if (patMedInhosp.getPatid() != null) { |
| | | patids.add(patMedInhosp.getPatid()); |
| | | } |
| | | } |
| | | if (patids.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | Map<Long, String> tagnameMap = new HashMap<>(); |
| | | List<Long> patidList = new ArrayList<>(patids); |
| | | // åçï¼é²æ¢ IN åæ°è¿å¤ |
| | | int batchSize = 1000; |
| | | for (int i = 0; i < patidList.size(); i += batchSize) { |
| | | List<Long> batch = patidList.subList(i, Math.min(i + batchSize, patidList.size())); |
| | | List<Map<String, Object>> rows = patMedInhospMapper.getTagnameByPatids(batch); |
| | | if (CollectionUtils.isEmpty(rows)) { |
| | | continue; |
| | | } |
| | | for (Map<String, Object> row : rows) { |
| | | Object patid = row.get("patid"); |
| | | Object tagname = row.get("tagname"); |
| | | if (patid != null) { |
| | | tagnameMap.put(((Number) patid).longValue(), tagname == null ? null : tagname.toString()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (PatMedInhosp patMedInhosp : patMedInhospList) { |
| | | if (patMedInhosp.getPatid() != null) { |
| | | patMedInhosp.setTagname(tagnameMap.get(patMedInhosp.getPatid())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å½ä¸åå
¥é¢åºä½æåºåæ° |
| | | * <p> |
| | | * asc / 1 -> ascï¼åºä½æ£åºï¼ï¼desc / 2 -> descï¼åºä½ååºï¼ï¼å
¶ä½ï¼å«ä¸ä¼ ï¼-> nullï¼ä¸æåºï¼ã |
| | |
| | | AND d.del_flag = 0 |
| | | </select> |
| | | |
| | | <!-- æ¹é忣è
æ ç¾ï¼æ¿ä»£éè¡è°ç¨ getTagnameBypatidï¼æ¯è¡å« patidãtagname 两个 key --> |
| | | <select id="getTagnameByPatids" resultType="java.util.HashMap"> |
| | | SELECT d.patid AS patid, |
| | | GROUP_CONCAT(d.tagname, ', ') AS tagname |
| | | FROM pat_archivetag d |
| | | WHERE d.del_flag = 0 |
| | | AND d.patid IN |
| | | <foreach collection="patids" item="patid" open="(" separator="," close=")"> |
| | | #{patid} |
| | | </foreach> |
| | | GROUP BY d.patid |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedInhospByInhospid" parameterType="Long" resultMap="PatMedInhospResult"> |
| | | <include refid="selectPatMedInhospVo"/> |
| | |
| | | </if> |
| | | <if test="templateid != null and templateid != ''">and service_task.templateid = #{templateid}</if> |
| | | <if test="longTask != null and longTask != ''">and service_task.long_task = #{longTask}</if> |
| | | <if test="serviceType != null and serviceType != ''">and service_task.service_type = #{serviceType}</if> |
| | | <if test="templatename != null and templatename != ''">and service_task.templatename like concat('%', |
| | | #{templatename}, |
| | | '%') |
| | |
| | | </if> |
| | | <if test="checktime != null ">and service_task.checktime = #{checktime}</if> |
| | | <if test="sendDay != null ">and service_task.send_day = #{sendDay}</if> |
| | | <if test="type != null and type != ''">and service_task.type = #{type}</if> |
| | | <if test="typename != null and typename != ''">and service_task.typename like concat('%', #{typename}, |
| | | '%') |
| | | </if> |