phi_platform_his/pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_his/src/main/java/com/hx/phip/his/common/CodeInfo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_his/src/main/java/com/hx/phip/his/entity/ResponsesData.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_his/src/main/java/com/hx/phip/his/tools/UserProjectUtil.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_user/pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_user/src/main/java/com/hx/phip/config/HisParameter.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_user/src/main/resources/application-local.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
phi_platform_user/src/main/resources/application-prod.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
phi_platform_his/pom.xml
New file @@ -0,0 +1,59 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.hx.gitee</groupId> <artifactId>phi_platform_his</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <parent> <groupId>com.hx</groupId> <artifactId>phi_platform</artifactId> <version>1.0-SNAPSHOT</version> </parent> <dependencies> <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.hx.gitee</groupId> <artifactId>hx-common</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>com.hx.gitee</groupId> <artifactId>phi_common</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> </dependencies> <build> <!-- <finalName>cases_common</finalName>--> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </build> </project> phi_platform_his/src/main/java/com/hx/phip/his/common/CodeInfo.java
New file @@ -0,0 +1,16 @@ package com.hx.phip.his.common; /**编码信息表示 * */ public class CodeInfo { /*请求成功-his接口*/ public static String SUCCESS = "1000"; /**预约系统接口*/ public static String PRE_SUCCESS = "100"; } phi_platform_his/src/main/java/com/hx/phip/his/entity/ResponsesData.java
New file @@ -0,0 +1,75 @@ package com.hx.phip.his.entity; /**HIS返回实体 * */ public class ResponsesData { /*状态码 1000是请求成功 引用系统的CodeInfo类*/ private String code; /*提示信息*/ private String message; /*数据体 */ private String data; /*数据体 */ private String result; /*数据体 */ private String content; /*返回ID*/ private String id; public ResponsesData() { } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getData() { return data; } public void setData(String data) { this.data = data; } public String getResult() { return result; } public void setResult(String result) { this.result = result; } public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String toString() { return "ResponsesData{" + "code='" + code + '\'' + ", message='" + message + '\'' + ", data='" + data + '\'' + ", result='" + result + '\'' + ", id='" + id + '\'' + '}'; } } phi_platform_his/src/main/java/com/hx/phip/his/tools/UserProjectUtil.java
New file @@ -0,0 +1,90 @@ package com.hx.phip.his.tools; import com.hx.exception.ServiceException; import com.hx.phip.his.common.CodeInfo; import com.hx.phip.his.entity.ResponsesData; import com.hx.util.HttpMethodUtil; import com.hx.util.HttpUtil; import com.hx.util.StringUtils; import java.util.HashMap; import java.util.Map; /**HIS服务订单项目数据接口(用户项目) * @author CJH * @date 2021-09-11 */ public class UserProjectUtil { /**获取授权机构下的可执行条目信息 - 订单中的项目条目 * @param customerId 客户id * @param ids 订单id数组字符串(HIS) * @param page 页数 * @param size 条数 * @param status 状态(pending,executing,completion,cancelled) * @param keyword 查询 * @param token 秘钥 * @return ResponsesData */ public static ResponsesData projectItems(String url, String customerId, String ids , Integer page, Integer size, String status, String keyword, String token){ Map<String,Object> keysWords = new HashMap<>(); keysWords.put("customerId",customerId); if(!StringUtils.isEmpty(ids)){ keysWords.put("ids",ids); } keysWords.put("page",page); keysWords.put("size",size); keysWords.put("status",status); if(!StringUtils.isEmpty(keyword)){ keysWords.put("keyword",keyword); } Map<String,String> header = new HashMap<>(); header.put("x-access-token",token); ResponsesData responsesData = new ResponsesData(); responsesData.setCode("1000"); String data = HttpMethodUtil.HttpURLUtilJson(url,null,keysWords,header,"GET"); System.out.println("返回数据:"+data.toString()); responsesData.setData(data.toString()); return responsesData; } /**获取授权机构下的客户项目执行数据 * @param customerId 客户id * @param itemIds 可执行订单条目IDid数组字符串(HIS) * @param page 页数 * @param size 条数 * @param token 秘钥 * @return ResponsesData */ public static ResponsesData projectItemDetail(String url,String customerId,String itemIds ,Integer page,Integer size,String token){ Map<String,Object> keysWords = new HashMap<>(); keysWords.put("customerId",customerId); keysWords.put("itemIds",itemIds); //keysWords.put("id",itemIds); keysWords.put("page",page); keysWords.put("size",size); //url = UrlHandleTtil.replaceParameter(url,keysWords); Map<String,String> header = new HashMap<>(); header.put("x-access-token",token); System.out.println("url:"+url); String data = HttpMethodUtil.HttpURLUtilJson(url,null,keysWords,header,"GET"); System.out.println("项目执行详情:"+data.toString()); if(data == null){ throw new ServiceException("获取授权机构下的客户项目执行数据!"); } ResponsesData responsesData = new ResponsesData(); responsesData.setCode(CodeInfo.SUCCESS); responsesData.setResult(data.toString()); return responsesData; } } phi_platform_user/pom.xml
@@ -47,6 +47,12 @@ <dependency> <groupId>com.hx.gitee</groupId> <artifactId>phi_platform_his</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>com.hx.gitee</groupId> <artifactId>phi_common</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> phi_platform_user/src/main/java/com/hx/phip/config/HisParameter.java
New file @@ -0,0 +1,56 @@ package com.hx.phip.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** * HIS接口参数 */ @Component public class HisParameter { @Value("${systemConfig.baseUrl}") private String baseUrl; @Value("${systemConfig.appid}") private String poiAppId; @Value("${systemConfig.secret}") private String poiSecret; @Value("${systemConfig.code}") private String poiCode; public HisParameter() { } public String getBaseUrl() { return baseUrl; } public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } public String getPoiAppId() { return poiAppId; } public void setPoiAppId(String poiAppId) { this.poiAppId = poiAppId; } public String getPoiSecret() { return poiSecret; } public void setPoiSecret(String poiSecret) { this.poiSecret = poiSecret; } public String getPoiCode() { return poiCode; } public void setPoiCode(String poiCode) { this.poiCode = poiCode; } } phi_platform_user/src/main/resources/application-local.properties
@@ -79,6 +79,11 @@ platform.pattern = test systemConfig.baseUrl=https://serv.phiskin.com systemConfig.appid=9d1a7c45-89d6-4241-b84a-32b36edc1283 systemConfig.secret=MDhkYmZiYjctNWU0ZS00YTM3LTgwNGYtYmMzYmRmMWQxZTYx systemConfig.code=phiskin-open #appId rsa.appId = 99sdfa5454a4f5asd4f55saf4 #\u5C0F\u7A0B\u5E8F\u5728\u4F01\u4E1A\u5FAE\u4FE1\u7684\u5E94\u7528\u79D8\u94A5\uFF08HIS\u52A9\u624B\u5C0F\u7A0B\u5E8F\uFF09 phi_platform_user/src/main/resources/application-prod.properties
@@ -77,6 +77,11 @@ platform.pattern = prod systemConfig.baseUrl=https://serv.phiskin.com systemConfig.appid=9d1a7c45-89d6-4241-b84a-32b36edc1283 systemConfig.secret=MDhkYmZiYjctNWU0ZS00YTM3LTgwNGYtYmMzYmRmMWQxZTYx systemConfig.code=phiskin-open #appId rsa.appId = 99sdfa5454a4f5asd4f55saf4 #\u5C0F\u7A0B\u5E8F\u5728\u4F01\u4E1A\u5FAE\u4FE1\u7684\u5E94\u7528\u79D8\u94A5\uFF08HIS\u52A9\u624B\u5C0F\u7A0B\u5E8F\uFF09 pom.xml
@@ -13,6 +13,7 @@ <module>phi_platform_common</module> <module>phi_platform_model</module> <module>phi_platform_user</module> <module>phi_platform_his</module> </modules>