加入post代码。
This commit is contained in:
		
							
								
								
									
										8
									
								
								code/cpicxim-XMNHSA-repeater/.idea/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								code/cpicxim-XMNHSA-repeater/.idea/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
# 默认忽略的文件
 | 
			
		||||
/shelf/
 | 
			
		||||
/workspace.xml
 | 
			
		||||
# 基于编辑器的 HTTP 客户端请求
 | 
			
		||||
/httpRequests/
 | 
			
		||||
# Datasource local storage ignored files
 | 
			
		||||
/dataSources/
 | 
			
		||||
/dataSources.local.xml
 | 
			
		||||
							
								
								
									
										5
									
								
								code/cpicxim-XMNHSA-repeater/.idea/codeStyles/codeStyleConfig.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								code/cpicxim-XMNHSA-repeater/.idea/codeStyles/codeStyleConfig.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
<component name="ProjectCodeStyleConfiguration">
 | 
			
		||||
  <state>
 | 
			
		||||
    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
 | 
			
		||||
  </state>
 | 
			
		||||
</component>
 | 
			
		||||
							
								
								
									
										18
									
								
								code/cpicxim-XMNHSA-repeater/.idea/compiler.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								code/cpicxim-XMNHSA-repeater/.idea/compiler.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project version="4">
 | 
			
		||||
  <component name="CompilerConfiguration">
 | 
			
		||||
    <annotationProcessing>
 | 
			
		||||
      <profile name="Maven default annotation processors profile" enabled="true">
 | 
			
		||||
        <sourceOutputDir name="target/generated-sources/annotations" />
 | 
			
		||||
        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
 | 
			
		||||
        <outputRelativeToContentRoot value="true" />
 | 
			
		||||
        <module name="cpicxim-XMNHSA-repeater" />
 | 
			
		||||
      </profile>
 | 
			
		||||
    </annotationProcessing>
 | 
			
		||||
  </component>
 | 
			
		||||
  <component name="JavacSettings">
 | 
			
		||||
    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
 | 
			
		||||
      <module name="cpicxim-XMNHSA-repeater" options="-extdirs D:\develop\cpicxim\cpicxim-huixiabao\code\cpicxim-XMNHSA-repeater\lib" />
 | 
			
		||||
    </option>
 | 
			
		||||
  </component>
 | 
			
		||||
</project>
 | 
			
		||||
							
								
								
									
										7
									
								
								code/cpicxim-XMNHSA-repeater/.idea/encodings.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								code/cpicxim-XMNHSA-repeater/.idea/encodings.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project version="4">
 | 
			
		||||
  <component name="Encoding">
 | 
			
		||||
    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
 | 
			
		||||
    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
 | 
			
		||||
  </component>
 | 
			
		||||
</project>
 | 
			
		||||
							
								
								
									
										20
									
								
								code/cpicxim-XMNHSA-repeater/.idea/jarRepositories.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								code/cpicxim-XMNHSA-repeater/.idea/jarRepositories.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project version="4">
 | 
			
		||||
  <component name="RemoteRepositoriesConfiguration">
 | 
			
		||||
    <remote-repository>
 | 
			
		||||
      <option name="id" value="central" />
 | 
			
		||||
      <option name="name" value="Maven Central repository" />
 | 
			
		||||
      <option name="url" value="https://repo1.maven.org/maven2" />
 | 
			
		||||
    </remote-repository>
 | 
			
		||||
    <remote-repository>
 | 
			
		||||
      <option name="id" value="jboss.community" />
 | 
			
		||||
      <option name="name" value="JBoss Community repository" />
 | 
			
		||||
      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
 | 
			
		||||
    </remote-repository>
 | 
			
		||||
    <remote-repository>
 | 
			
		||||
      <option name="id" value="central" />
 | 
			
		||||
      <option name="name" value="Central Repository" />
 | 
			
		||||
      <option name="url" value="https://maven.aliyun.com/repository/public" />
 | 
			
		||||
    </remote-repository>
 | 
			
		||||
  </component>
 | 
			
		||||
</project>
 | 
			
		||||
							
								
								
									
										12
									
								
								code/cpicxim-XMNHSA-repeater/.idea/misc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								code/cpicxim-XMNHSA-repeater/.idea/misc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project version="4">
 | 
			
		||||
  <component name="ExternalStorageConfigurationManager" enabled="true" />
 | 
			
		||||
  <component name="MavenProjectsManager">
 | 
			
		||||
    <option name="originalFiles">
 | 
			
		||||
      <list>
 | 
			
		||||
        <option value="$PROJECT_DIR$/pom.xml" />
 | 
			
		||||
      </list>
 | 
			
		||||
    </option>
 | 
			
		||||
  </component>
 | 
			
		||||
  <component name="ProjectRootManager" version="2" project-jdk-name="22 (2)" project-jdk-type="JavaSDK" />
 | 
			
		||||
</project>
 | 
			
		||||
							
								
								
									
										6
									
								
								code/cpicxim-XMNHSA-repeater/.idea/vcs.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								code/cpicxim-XMNHSA-repeater/.idea/vcs.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project version="4">
 | 
			
		||||
  <component name="VcsDirectoryMappings">
 | 
			
		||||
    <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
 | 
			
		||||
  </component>
 | 
			
		||||
</project>
 | 
			
		||||
@@ -1,8 +1,12 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @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.
 | 
			
		||||
@@ -17,8 +21,8 @@ public class AppMain
 | 
			
		||||
{
 | 
			
		||||
    public static void main( String[] args )
 | 
			
		||||
    {
 | 
			
		||||
        EncryptionModeEnum encType = EncryptionModeEnum.SM4;
 | 
			
		||||
        SignTypeEnum signType = SignTypeEnum.SM3;
 | 
			
		||||
        EncryptionModeEnum encType  = EncryptionModeEnum.SM4;
 | 
			
		||||
        SignTypeEnum       signType = SignTypeEnum.SM3;
 | 
			
		||||
 | 
			
		||||
        System.out.println( "Hello World!" );
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,12 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @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.
 | 
			
		||||
@@ -43,9 +47,10 @@ public class HuixiabaoConfig
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static final int MAX_COUNT_PER_REQUEST = 500;
 | 
			
		||||
    private static final String url = "https://172.18.1.150:9040";
 | 
			
		||||
    private static final String appid = "hxb-tb";
 | 
			
		||||
 | 
			
		||||
    private static final String url       = "https://172.18.1.150:9040";
 | 
			
		||||
    private static final String appid     = "hxb-tb";
 | 
			
		||||
    private static final String appSecret = "60F468FB46170DD4CF6CBECE215DBFC0";
 | 
			
		||||
    private static final String signKey = "1A2F447BD0F930798D8031B137EC6E25";
 | 
			
		||||
    private static final String encKey = "08307695B1668EB9FD6210250FED874F";
 | 
			
		||||
    private static final String signKey   = "1A2F447BD0F930798D8031B137EC6E25";
 | 
			
		||||
    private static final String encKey    = "08307695B1668EB9FD6210250FED874F";
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,12 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @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.
 | 
			
		||||
@@ -29,6 +33,7 @@ public class CpicximToXMNHS
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 从数据库中获取未发送过的小药箱数据。
 | 
			
		||||
     * 
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    public Vector<HmbXyxInfo> getNeverTransHmbList()
 | 
			
		||||
@@ -41,26 +46,32 @@ public class CpicximToXMNHS
 | 
			
		||||
 | 
			
		||||
    public void postHmbList( Vector<HmbXyxInfo> items )
 | 
			
		||||
    {
 | 
			
		||||
        String url = HuixiabaoConfig.getUrl();
 | 
			
		||||
        String appId = HuixiabaoConfig.getAppid();
 | 
			
		||||
        String url       = HuixiabaoConfig.getUrl();
 | 
			
		||||
        String appId     = HuixiabaoConfig.getAppid();
 | 
			
		||||
        String appSecret = HuixiabaoConfig.getAppSecret();
 | 
			
		||||
        String funId = "xxx";
 | 
			
		||||
        String encKey = HuixiabaoConfig.getEncKey();
 | 
			
		||||
        String signKey = HuixiabaoConfig.getSignKey();
 | 
			
		||||
        String funId     = "xxx";
 | 
			
		||||
        String encKey    = HuixiabaoConfig.getEncKey();
 | 
			
		||||
        String signKey   = HuixiabaoConfig.getSignKey();
 | 
			
		||||
 | 
			
		||||
        SignTypeEnum signType = SignTypeEnum.SM3;
 | 
			
		||||
        EncryptionModeEnum encType = EncryptionModeEnum.SM4;
 | 
			
		||||
        SignTypeEnum       signType = SignTypeEnum.SM3;
 | 
			
		||||
        EncryptionModeEnum encType  = EncryptionModeEnum.SM4;
 | 
			
		||||
 | 
			
		||||
        // 发送用工具对象
 | 
			
		||||
        DefaultZephyrClient client = new DefaultZephyrClient( url, funId, appId, appSecret,
 | 
			
		||||
                signType, signKey, encType, encKey );
 | 
			
		||||
        DefaultZephyrRequest req = new DefaultZephyrRequest();
 | 
			
		||||
        DefaultZephyrResponse resp = null;
 | 
			
		||||
        DefaultZephyrClient   client = new DefaultZephyrClient( url,
 | 
			
		||||
                                                                funId,
 | 
			
		||||
                                                                appId,
 | 
			
		||||
                                                                appSecret,
 | 
			
		||||
                                                                signType,
 | 
			
		||||
                                                                signKey,
 | 
			
		||||
                                                                encType,
 | 
			
		||||
                                                                encKey );
 | 
			
		||||
        DefaultZephyrRequest  req    = new DefaultZephyrRequest();
 | 
			
		||||
        DefaultZephyrResponse resp   = null;
 | 
			
		||||
 | 
			
		||||
        // 数据
 | 
			
		||||
        JSONObject requestObject = new JSONObject();
 | 
			
		||||
        JSONObject xyxInfo = new JSONObject();
 | 
			
		||||
        JSONArray xyxInfoList = new JSONArray();
 | 
			
		||||
        JSONObject xyxInfo       = new JSONObject();
 | 
			
		||||
        JSONArray  xyxInfoList   = new JSONArray();
 | 
			
		||||
 | 
			
		||||
        requestObject.put( "topic", "hmbXyxInfo" );
 | 
			
		||||
        requestObject.put( "hmbList", xyxInfoList );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,12 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @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.
 | 
			
		||||
@@ -42,7 +46,9 @@ public class AppTest
 | 
			
		||||
    @Test
 | 
			
		||||
    public void testLog()
 | 
			
		||||
    {
 | 
			
		||||
        for ( int i = 0; i < 10000; i++ )
 | 
			
		||||
        for (
 | 
			
		||||
              int i = 0; i < 10000; i++
 | 
			
		||||
        )
 | 
			
		||||
        {
 | 
			
		||||
            // System.out.print("test!");
 | 
			
		||||
            logger.error( "test!!!!" );
 | 
			
		||||
@@ -52,23 +58,30 @@ public class AppTest
 | 
			
		||||
    @Test
 | 
			
		||||
    public void nhsTest()
 | 
			
		||||
    {
 | 
			
		||||
        String url = "172.18.1.150:9040";
 | 
			
		||||
        String appId = "待定";
 | 
			
		||||
        String url       = "172.18.1.150:9040";
 | 
			
		||||
        String appId     = "待定";
 | 
			
		||||
        String appSecret = "待定";
 | 
			
		||||
        String funId = "xxx";
 | 
			
		||||
        String encKey = "A5B6E00DA599G56C41ABFE23A74E6E60";
 | 
			
		||||
        String signKey = "待定";
 | 
			
		||||
        String funId     = "xxx";
 | 
			
		||||
        String encKey    = "A5B6E00DA599G56C41ABFE23A74E6E60";
 | 
			
		||||
        String signKey   = "待定";
 | 
			
		||||
 | 
			
		||||
        SignTypeEnum signType = SignTypeEnum.SM3;
 | 
			
		||||
        EncryptionModeEnum encType = EncryptionModeEnum.SM4;
 | 
			
		||||
        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;
 | 
			
		||||
            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" );
 | 
			
		||||
@@ -88,11 +101,11 @@ public class AppTest
 | 
			
		||||
    public void jsonTest()
 | 
			
		||||
    {
 | 
			
		||||
        JSONObject requestObject = new JSONObject();
 | 
			
		||||
        JSONObject item = new JSONObject();
 | 
			
		||||
        JSONArray hmbList = new JSONArray();
 | 
			
		||||
        JSONObject item          = new JSONObject();
 | 
			
		||||
        JSONArray  hmbList       = new JSONArray();
 | 
			
		||||
 | 
			
		||||
        requestObject.put( "topic", "hmbXyxInfo" );
 | 
			
		||||
        requestObject.put("hmbList", hmbList );
 | 
			
		||||
        requestObject.put( "hmbList", hmbList );
 | 
			
		||||
 | 
			
		||||
        item.put( "psnName", "王炜" );
 | 
			
		||||
        item.put( "cerno", "350402198106130016" );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user