diff --git a/code/cpicxim-XMNHSA-repeater/.mvn/jvm.config b/code/cpicxim-XMNHSA-repeater/.mvn/jvm.config new file mode 100644 index 0000000..e69de29 diff --git a/code/cpicxim-XMNHSA-repeater/.mvn/maven.config b/code/cpicxim-XMNHSA-repeater/.mvn/maven.config new file mode 100644 index 0000000..e69de29 diff --git a/code/cpicxim-XMNHSA-repeater/.vscode/settings.json b/code/cpicxim-XMNHSA-repeater/.vscode/settings.json new file mode 100644 index 0000000..e0f15db --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/pom.xml b/code/cpicxim-XMNHSA-repeater/pom.xml new file mode 100644 index 0000000..d336526 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/pom.xml @@ -0,0 +1,200 @@ + + + 4.0.0 + + com.cpic.xim + cpicxim-XMNHSA-repeater + 1.0-SNAPSHOT + + cpicxim-XMNHSA-repeater + + http://www.example.com + + + UTF-8 + 18 + + + + + + org.junit + junit-bom + 5.11.0 + pom + import + + + + + + + org.junit.jupiter + junit-jupiter-api + test + + + + org.junit.jupiter + junit-jupiter-params + test + + + + + com.fasterxml.jackson.core + jackson-databind + 2.14.2 + + + + com.fasterxml.jackson.core + jackson-core + 2.13.4 + + + + com.fasterxml.jackson.core + jackson-annotations + 2.13.4 + + + + + org.apache.logging.log4j + log4j-core + 2.20.0 + + + org.apache.logging.log4j + log4j-slf4j2-impl + 2.20.0 + + + org.apache.logging.log4j + log4j-api + 2.20.0 + + + + + org.apache.poi + poi + 5.2.3 + + + org.apache.poi + poi-ooxml + 5.2.3 + + + + + org.mybatis + mybatis + 3.5.19 + + + + cn.hsa.zephyr + zephyr-api-sdk + 2.0.1 + system + ${project.basedir}/lib/zephyr-api-sdk.jar + + + + com.alibaba + fastjson + + 2.0.56 + + + + com.mysql + mysql-connector-j + 9.2.0 + + + + + + compile + + + + + maven-clean-plugin + 3.4.0 + + + + maven-resources-plugin + 3.3.1 + + + maven-compiler-plugin + 3.13.0 + + + ${project.basedir}\lib + + + + + maven-surefire-plugin + 3.3.0 + + true + + + + maven-install-plugin + 3.1.2 + + + maven-deploy-plugin + 3.1.2 + + + + maven-site-plugin + 3.12.1 + + + maven-project-info-reports-plugin + 3.6.1 + + + org.apache.maven.plugins + maven-assembly-plugin + + + jar-with-dependencies + + + + AppMain + + + + + + make-assmenbly + package + + single + + + + + + + + \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/AppMain.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/AppMain.java new file mode 100644 index 0000000..16407a0 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/AppMain.java @@ -0,0 +1,25 @@ +/* + * @Author: Kane + * @Date: 2025-03-11 09:27:40 + * @LastEditors: Kane + * @FilePath: /cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/AppMain.java + * @Description: + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +package com.cpic.xim.huixiabao; + +import com.cpic.xim.huixiabao.data.config.HuixiabaoConfig; +import cn.hsa.zephyr.apisdk.internal.util.encrypt.EncryptionModeEnum; +import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum; + +public class AppMain +{ + public static void main( String[] args ) + { + EncryptionModeEnum encType = EncryptionModeEnum.SM4; + SignTypeEnum signType = SignTypeEnum.SM3; + + System.out.println( "Hello World!" ); + } +} diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/config/HuixiabaoConfig.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/config/HuixiabaoConfig.java new file mode 100644 index 0000000..3b9e866 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/config/HuixiabaoConfig.java @@ -0,0 +1,38 @@ +/* + * @Author: Kane + * @Date: 2025-03-11 09:30:38 + * @LastEditors: Kane + * @FilePath: /cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/config/HuixiabaoConfig.java + * @Description: 存放惠厦保相关的配置文件,以后要改成json文件存放。 + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ + +package com.cpic.xim.huixiabao.data.config; + +public class HuixiabaoConfig +{ + + public String getAppid() + { + return appid; + } + public String getAppSecret() + { + return appSecret; + } + public String getSignKey() + { + return signKey; + } + public String getEncKey() + { + return encKey; + } + + private String url = "https://172.18.1.150:9040"; + private String appid = "hxb-tb"; + private String appSecret = "60F468FB46170DD4CF6CBECE215DBFC0"; + private String signKey = "1A2F447BD0F930798D8031B137EC6E25"; + private String encKey = "08307695B1668EB9FD6210250FED874F"; +} diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/HmbListItem.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/HmbListItem.java new file mode 100644 index 0000000..6709ddb --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/HmbListItem.java @@ -0,0 +1,86 @@ +/* + * @Author: Kane + * @Date: 2025-03-06 14:33:27 + * @LastEditors: Kane + * @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/data/pojo/HmbListItem.java + * @Description: + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +package com.cpic.xim.huixiabao.data.pojo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude( JsonInclude.Include.NON_EMPTY ) +@JsonPropertyOrder( alphabetic = true ) +public class HmbListItem +{ + + public String getPsnName() + { + return psnName; + } + + public void setPsnName( String psnName ) + { + this.psnName = psnName; + } + + public String getCertNo() + { + return certNo; + } + + public void setCertNo( String certNo ) + { + this.certNo = certNo; + } + + public String getServiceId() + { + return serviceId; + } + + public void setServiceId( String serviceId ) + { + this.serviceId = serviceId; + } + + public String getStatus() + { + return status; + } + + public void setStatus( String status ) + { + this.status = status; + } + + public String getXyxNo() + { + return xyxNo; + } + + public void setXyxNo( String xyxNo ) + { + this.xyxNo = xyxNo; + } + + @JsonProperty("psnName") + private String psnName; + + @JsonProperty("certno") + private String certNo; + + @JsonProperty("serviceId") + private String serviceId; + + @JsonProperty("status") + private String status; + + @JsonProperty("xyxNo") + private String xyxNo; + +} \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/HmbXyxInfoRequest.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/HmbXyxInfoRequest.java new file mode 100644 index 0000000..29a3e23 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/HmbXyxInfoRequest.java @@ -0,0 +1,59 @@ +/* + * @Author: Kane + * @Date: 2025-03-06 14:27:05 + * @LastEditors: Kane + * @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/data/pojo/HmbXyxInfoRequest.java + * @Description: + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +package com.cpic.xim.huixiabao.data.pojo; + +import java.util.Vector; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude( JsonInclude.Include.NON_EMPTY ) +@JsonPropertyOrder( alphabetic = true ) +public class HmbXyxInfoRequest +{ + public HmbXyxInfoRequest() + { + this.topic = "hmbXyxInfo"; + this.hmbList = new Vector<>(); + } + + public HmbXyxInfoRequest( String topic, Vector hmbList ) + { + this.topic = topic; + this.topic = "hmbXyxInfo"; + this.hmbList = hmbList; + } + + public String getTopic() + { + return topic; + } + + public void setTopic( String topic ) + { + this.topic = topic; + } + + public Vector getHmbList() + { + return hmbList; + } + + public void setHmbList( Vector hmbList ) + { + this.hmbList = hmbList; + } + + @JsonProperty("topic") + private String topic; // 业务类型 + + @JsonProperty("hmbList") + private Vector hmbList; +} \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/NHACommenRequestBody.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/NHACommenRequestBody.java new file mode 100644 index 0000000..0b6de44 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/NHACommenRequestBody.java @@ -0,0 +1,82 @@ +/* + * @Author: Kane + * @Date: 2025-03-06 14:17:24 + * @LastEditors: Kane + * @FilePath: /cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/data/pojo/NHACommenRequestBody.java + * @Description: 易联众请求共通报文结构 + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +package com.cpic.xim.huixiabao.data.pojo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class NHACommenRequestBody +{ + + public String getChs_fjs_appid() + { + return chs_fjs_appid; + } + public void setChs_fjs_appid( String chs_fjs_appid ) + { + this.chs_fjs_appid = chs_fjs_appid; + } + public String getChs_fjs_appsecret() + { + return chs_fjs_appsecret; + } + public void setChs_fjs_appsecret( String chs_fjs_appsecret ) + { + this.chs_fjs_appsecret = chs_fjs_appsecret; + } + public String getChs_fjs_token() + { + return chs_fjs_token; + } + public void setChs_fjs_token( String chs_fjs_token ) + { + this.chs_fjs_token = chs_fjs_token; + } + public String getChs_fjs_funid() + { + return chs_fjs_funid; + } + public void setChs_fjs_funid( String chs_fjs_funid ) + { + this.chs_fjs_funid = chs_fjs_funid; + } + public String getChs_fjs_encdata() + { + return chs_fjs_encdata; + } + public void setChs_fjs_encdata( String chs_fjs_encdata ) + { + this.chs_fjs_encdata = chs_fjs_encdata; + } + public String getChs_fjs_sign() + { + return chs_fjs_sign; + } + public void setChs_fjs_sign( String chs_fjs_sign ) + { + this.chs_fjs_sign = chs_fjs_sign; + } + public int getChs_fjs_timestamp() + { + return chs_fjs_timestamp; + } + public void setChs_fjs_timestamp( int chs_fjs_timestamp ) + { + this.chs_fjs_timestamp = chs_fjs_timestamp; + } + + private String chs_fjs_appid; // 渠道id + private String chs_fjs_appsecret; // 渠道私钥 + private String chs_fjs_token; // 请求时携带的动态令牌 + private String chs_fjs_funid; // 服务编号 + private String chs_fjs_encdata; // 加密后的数据 + private String chs_fjs_sign; // 签名数据串 + private String data; // 未加密的数据 + private int chs_fjs_timestamp; // 时间戳 +} diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java new file mode 100644 index 0000000..c476153 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java @@ -0,0 +1,28 @@ +/* + * @Author: Kane + * @Date: 2025-03-11 11:10:09 + * @LastEditors: Kane + * @FilePath: /cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java + * @Description: + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +package com.cpic.xim.huixiabao.nhs; + +import java.util.Vector; +import com.cpic.xim.huixiabao.data.pojo.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class CpicximToXMNHS +{ + private static Logger logger = LoggerFactory.getLogger( CpicximToXMNHS.class ); + + public Vector getNeverTransHmbList() + { + + Vector items = new Vector(); + + return items; + } +} \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/src/main/resources/log4j2.xml b/code/cpicxim-XMNHSA-repeater/src/main/resources/log4j2.xml new file mode 100644 index 0000000..9e4d4f2 --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/main/resources/log4j2.xml @@ -0,0 +1,40 @@ + + + + + + + + + [%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n + + + + + + + + + + [%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/src/test/java/com/cpic/xim/huixiabao/AppTest.java b/code/cpicxim-XMNHSA-repeater/src/test/java/com/cpic/xim/huixiabao/AppTest.java new file mode 100644 index 0000000..7fb50fb --- /dev/null +++ b/code/cpicxim-XMNHSA-repeater/src/test/java/com/cpic/xim/huixiabao/AppTest.java @@ -0,0 +1,84 @@ +/* + * @Author: Kane + * @Date: 2025-03-11 09:27:40 + * @LastEditors: Kane + * @FilePath: /cpicxim-XMNHSA-repeater/src/test/java/com/cpic/xim/huixiabao/AppTest.java + * @Description: + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +package com.cpic.xim.huixiabao; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.alibaba.fastjson.JSONObject; +import cn.hsa.zephyr.apisdk.DefaultZephyrClient; +import cn.hsa.zephyr.apisdk.internal.exception.ZephyrApiException; +import cn.hsa.zephyr.apisdk.internal.util.encrypt.EncryptionModeEnum; +import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum; +import cn.hsa.zephyr.apisdk.request.DefaultZephyrRequest; +import cn.hsa.zephyr.apisdk.response.DefaultZephyrResponse; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + private Logger logger = LoggerFactory.getLogger( AppTest.class ); + + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } + + @Test + public void testLog() + { + for ( int i = 0; i < 10000; i++ ) + { + // System.out.print("test!"); + logger.error( "test!!!!" ); + } + } + + public void nhsTest() + { + String url = ""; + String appId = "待定"; + String appSecret = "待定"; + String funId = "xxx"; + String encKey = "A5B6E00DA599G56C41ABFE23A74E6E60"; + String signKey = "待定"; + + SignTypeEnum signType = SignTypeEnum.SM3; + EncryptionModeEnum encType = EncryptionModeEnum.SM4; + + try + { + DefaultZephyrClient client = new DefaultZephyrClient( url, funId, appId, appSecret, + signType, signKey, encType, encKey ); + DefaultZephyrRequest req = new DefaultZephyrRequest(); + JSONObject jsonObject1 = new JSONObject(); + DefaultZephyrResponse resp = null; + + jsonObject1.put( "code", "XXXXXXXXXXXXXXXXXX" ); + jsonObject1.put( "scene_code", "XXX" ); + + req.setData( jsonObject1 ); + resp = client.execute( req ); + + System.out.println( resp.getData() ); + } + catch ( ZephyrApiException e ) + { + e.printStackTrace(); + } + } +} diff --git a/文档/地址.xlsx b/文档/地址.xlsx new file mode 100644 index 0000000..bb3c568 Binary files /dev/null and b/文档/地址.xlsx differ diff --git a/文档/接口/医保局接口sdk与示例/java-sdk使用例子.txt b/文档/接口/医保局接口sdk与示例/java-sdk使用例子.txt new file mode 100644 index 0000000..6eb72af --- /dev/null +++ b/文档/接口/医保局接口sdk与示例/java-sdk使用例子.txt @@ -0,0 +1,23 @@ + public static void main(String[] args) { + String url = ""; + String appId = "待定"; + String appSecret = "待定"; + String funId = "xxx"; + SignTypeEnum signType = SignTypeEnum.SM3; + String signKey = "待定"; + EncryptionModeEnum encType = EncryptionModeEnum.SM4; + String encKey = "A5B6E00DA599G56C41ABFE23A74E6E60"; + try { + DefaultZephyrClient client = new DefaultZephyrClient(url, funId, appId, appSecret, + signType, signKey, encType, encKey); + DefaultZephyrRequest req = new DefaultZephyrRequest(); + JSONObject jsonObject1 = new JSONObject(); + jsonObject1.put("code", "XXXXXXXXXXXXXXXXXX"); + jsonObject1.put("scene_code", "XXX"); + req.setData(jsonObject1); + DefaultZephyrResponse resp = client.execute(req); + System.out.println(resp.getData()); + } catch (ZephyrApiException e) { + e.printStackTrace(); + } + } \ No newline at end of file diff --git a/文档/接口/医保局接口sdk与示例/测试环境配置说明.txt b/文档/接口/医保局接口sdk与示例/测试环境配置说明.txt new file mode 100644 index 0000000..526d4ba --- /dev/null +++ b/文档/接口/医保局接口sdk与示例/测试环境配置说明.txt @@ -0,0 +1,6 @@ + +appid:hxb-tb +appSecret:60F468FB46170DD4CF6CBECE215DBFC0 +signKey:1A2F447BD0F930798D8031B137EC6E25 +encKey:08307695B1668EB9FD6210250FED874F +