Compare commits
6 Commits
feature-惠夏
...
3b3bf34bb4
Author | SHA1 | Date | |
---|---|---|---|
3b3bf34bb4 | |||
48e816f3ae | |||
cd183f6676 | |||
7ecbdcdfa9 | |||
5acb55ba43 | |||
7bdf025bb5 |
@@ -1,3 +1,10 @@
|
||||
# cpicxim-huixiabao
|
||||
|
||||
惠厦保相关项目
|
||||
惠厦保相关项目。
|
||||
|
||||
莲富wifi,管理员账号admin,密码Cpic#1234。wifi ssid HXB,密码 CpicXimHXB#2025。
|
||||
|
||||
GigabitEthernet0/0/11 柜台右一
|
||||
|
||||
GigabitEthernet0/0/9 柜台右二
|
||||
|
||||
|
87
code/cpicxim-XMNHSA-repeater/.vscode/fileheader.template.js
vendored
Normal file
87
code/cpicxim-XMNHSA-repeater/.vscode/fileheader.template.js
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2025-03-16 00:35:09
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /cpicxim-huixiabao/.vscode/fileheader.template.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||
*/
|
||||
/**
|
||||
* This file is generated by VSCode extension: Fileheader Pro
|
||||
*/
|
||||
|
||||
/**
|
||||
* These comments can help you write your own template with type hint
|
||||
* @typedef {Object} FileheaderVariable Fileheader variables
|
||||
* @property {string} birthtime file birth time. will get it from VCS or fallback to filesystem when it is not available
|
||||
* @property {string} mtime file modification time. will get it from VCS or fallback to filesystem when it is not available
|
||||
* @property {string} authorName if the file is tracked by VCS, it will get the author name from VCS. else it will get it from current user name
|
||||
* @property {string} authorEmail if the file is tracked by VCS, it will get the author email from VCS. else it will get it from current user email
|
||||
* @property {string} userName else it will get it from current user name
|
||||
* @property {string} userEmail user email is from VSCode config, and fallback to VCS config
|
||||
* @property {string} companyName
|
||||
* @property {string} projectName name of current project
|
||||
* @property {string} filePath the file path, relative to project root with POSIX path separator
|
||||
* @property {string} dirPath the directory path, relative to project root with POSIX path separator
|
||||
* @property {string} fileName filename with extension
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {string | number | null | undefined | Template | boolean} TemplateInterpolation NOTE: boolean or falsy value will render empty string
|
||||
*
|
||||
* @typedef {{ strings: TemplateStringsArray; interpolations: TemplateInterpolation[]; }} Template
|
||||
* @typedef {(strings: TemplateStringsArray, ...values: any[]) => string} ITemplateFunction
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Please confirm your provider extends from globalThis.FileheaderLanguageProvider
|
||||
*/
|
||||
class CustomLanguageProvider extends globalThis.FileheaderLanguageProvider {
|
||||
/**
|
||||
* @type {string[]}
|
||||
*/
|
||||
languages = [
|
||||
"java",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"javascriptreact",
|
||||
"typescriptreact",
|
||||
];
|
||||
|
||||
/**
|
||||
* @type {string=} the language block comment start string.
|
||||
* this is for future feature: support detect old custom template when custom template changes
|
||||
*/
|
||||
blockCommentStart = "/**";
|
||||
|
||||
/**
|
||||
* @type {string=}
|
||||
*/
|
||||
blockCommentEnd = "*/";
|
||||
|
||||
/**
|
||||
* get your template when document language matched
|
||||
* @param {ITemplateFunction} tpl template function, it is a tagged function, support nested interpolation
|
||||
* @param {FileheaderVariable} variables template variables
|
||||
* @returns {Template}
|
||||
*/
|
||||
getTemplate(tpl, variables) {
|
||||
// prettier-ignore
|
||||
return tpl
|
||||
`/**
|
||||
* @Author: ${variables.authorName} <${variables.authorEmail}>
|
||||
* @Date: ${variables.birthtime}
|
||||
* @LastEditors: ${variables.userName}
|
||||
* @LastModified: ${variables.mtime}
|
||||
* @FilePath: ${variables.filePath}
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2025} by Kane All rights reserved
|
||||
*/`;
|
||||
}
|
||||
}
|
||||
|
||||
// export your provider classes
|
||||
module.exports = [CustomLanguageProvider];
|
@@ -1,15 +1,12 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
/**
|
||||
* @Author: Kane Wang <wangkane@qq.com>
|
||||
* @Date: 2025-03-11 15:08:37
|
||||
* @LastEditors: Kane Wang
|
||||
* @LastModified: 2025-04-18 00:52:16
|
||||
* @FilePath: src/main/java/com/cpic/xim/huixiabao/data/config/HuixiabaoConfig.java
|
||||
* @Description:
|
||||
*
|
||||
* @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.
|
||||
* Copyright (c) 2025 by Kane All rights reserved
|
||||
*/
|
||||
|
||||
package com.cpic.xim.huixiabao.data.config;
|
||||
|
3
code/cpicxim-huixiabao/.idea/.gitignore
generated
vendored
Normal file
3
code/cpicxim-huixiabao/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
13
code/cpicxim-huixiabao/.idea/compiler.xml
generated
Normal file
13
code/cpicxim-huixiabao/.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<?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-huixiabao" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
7
code/cpicxim-huixiabao/.idea/encodings.xml
generated
Normal file
7
code/cpicxim-huixiabao/.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-huixiabao/.idea/jarRepositories.xml
generated
Normal file
20
code/cpicxim-huixiabao/.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-huixiabao/.idea/misc.xml
generated
Normal file
12
code/cpicxim-huixiabao/.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" project-jdk-type="JavaSDK" />
|
||||
</project>
|
6
code/cpicxim-huixiabao/.idea/vcs.xml
generated
Normal file
6
code/cpicxim-huixiabao/.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>
|
@@ -52,13 +52,43 @@
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
|
||||
<version>2.0.0-M2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.18.0</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.18.0</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<version>6.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- log4j -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
@@ -120,9 +150,9 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<configuration>
|
||||
<!-- <configuration>
|
||||
<outputDirectory>${project.build.directory}/../../../输出/back/</outputDirectory>
|
||||
</configuration>
|
||||
</configuration> -->
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@@ -15,13 +15,16 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.cpic.xim.utils.secrecy.*;;
|
||||
import com.cpic.xim.utils.secrecy.*;
|
||||
import com.cpic.xim.huixiabao.web.data.nhs.xyx.HmbXyxInfo;
|
||||
|
||||
|
||||
@Controller
|
||||
@RequestMapping( "/huixiabao" )
|
||||
@@ -43,15 +46,39 @@ public class MediCoverController
|
||||
@RequestBody MediCoverRequestBody request
|
||||
)
|
||||
{
|
||||
MediCoverResponse response = new MediCoverResponse();
|
||||
ObjectMapper jsonMapper = new ObjectMapper();
|
||||
MediCoverResponse response = null;
|
||||
HmbXyxInfo xyxInfo = null;
|
||||
|
||||
String decryptData = AESUtils.decryptData( request.getKey(), privateKey, request.getBizContent() );
|
||||
|
||||
logger.info( "【接收小药箱数据】请求参数<{}>", request.toString() );
|
||||
logger.info( "【接收小药箱数据】解密参数<{}>", decryptData );
|
||||
|
||||
// jsonMapper.readValue( decryptData, null );
|
||||
try
|
||||
{
|
||||
xyxInfo = jsonMapper.readValue( decryptData, HmbXyxInfo.class );
|
||||
}
|
||||
catch ( Exception error )
|
||||
{
|
||||
// 解析json错误。
|
||||
response = new MediCoverResponse( "500",
|
||||
"解析JSON失败:" + error.getMessage(),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
false );
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
response = new MediCoverResponse( "20000",
|
||||
"处理成功",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
true );
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
@@ -1,20 +1,19 @@
|
||||
/**
|
||||
* @Author: Kane
|
||||
* @Date: 2025-03-15 21:01:56
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverRequestBody.java
|
||||
* @Author: Kane Wang <wangkane@qq.com>
|
||||
* @Date: 2025-03-15 18:40:54
|
||||
* @LastEditors: Kane Wang
|
||||
* @LastModified: 2025-03-17 07:21:58
|
||||
* @FilePath: src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverRequestBody.java
|
||||
* @Description:
|
||||
* @
|
||||
* @Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||
*
|
||||
* Copyright (c) 2025 by Kane All rights reserved
|
||||
*/
|
||||
|
||||
package com.cpic.xim.huixiabao.web.controllers.MediCover;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class MediCoverRequestBody
|
||||
{
|
||||
|
||||
@JsonProperty( "transId" )
|
||||
private String transId;
|
||||
|
||||
@@ -45,6 +44,10 @@ public class MediCoverRequestBody
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public MediCoverRequestBody()
|
||||
{
|
||||
}
|
||||
|
||||
public String getTransId()
|
||||
{
|
||||
return transId;
|
||||
|
@@ -1,10 +1,53 @@
|
||||
/**
|
||||
* @Author: Kane
|
||||
* @Date: 2025-03-16 00:12:27
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/data/nhs/HmbXyxInfo.java
|
||||
* @Author: Kane Wang <wangkane@qq.com>
|
||||
* @Date: 2025-03-16 08:41:32
|
||||
* @LastEditors: Kane Wang
|
||||
* @LastModified: 2025-03-16 20:00:26
|
||||
* @FilePath: src/main/java/com/cpic/xim/huixiabao/web/data/nhs/xyx/HmbXyxInfo.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||
* Copyright (c) 2025 by Kane All rights reserved
|
||||
*/
|
||||
package com.cpic.xim.huixiabao.web.data.nhs.xyx;
|
||||
|
||||
import java.util.Vector;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class HmbXyxInfo
|
||||
{
|
||||
public HmbXyxInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public HmbXyxInfo( String topic, Vector<HmbXyxInfoItem> hmbList )
|
||||
{
|
||||
this.topic = topic;
|
||||
this.hmbList = hmbList;
|
||||
}
|
||||
|
||||
public String getTopic()
|
||||
{
|
||||
return topic;
|
||||
}
|
||||
|
||||
public void setTopic( String topic )
|
||||
{
|
||||
this.topic = topic;
|
||||
}
|
||||
|
||||
public Vector<HmbXyxInfoItem> getHmbList()
|
||||
{
|
||||
return hmbList;
|
||||
}
|
||||
|
||||
public void setHmbList( Vector<HmbXyxInfoItem> hmbList )
|
||||
{
|
||||
this.hmbList = hmbList;
|
||||
}
|
||||
|
||||
@JsonProperty( "topic" )
|
||||
private String topic;
|
||||
|
||||
@JsonProperty( "hmbList" )
|
||||
private Vector<HmbXyxInfoItem> hmbList;
|
||||
}
|
@@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class HmbXyxInfoItem
|
||||
{
|
||||
public HmbXyxInfoItem() {}
|
||||
|
||||
public String getPsnName()
|
||||
{
|
||||
|
@@ -11,13 +11,13 @@
|
||||
package com.cpic.xim.web.filters.cros;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
@@ -27,11 +27,12 @@
|
||||
name="prefix" value="/WEB-INF/jsp/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean> -->
|
||||
|
||||
<bean id="multipartResolver"
|
||||
class="org.springframework.web.multipart.support.StandardServletMultipartResolver" />
|
||||
<!-- <bean id="multipartResolver"
|
||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="defaultEncoding" value="UTF-8" />
|
||||
<property name="maxUploadSize" value="-1" />
|
||||
</bean>
|
||||
</bean> -->
|
||||
|
||||
</beans>
|
@@ -19,7 +19,7 @@
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>springmvc</servlet-name>
|
||||
<url-pattern>/huixibao</url-pattern>
|
||||
<url-pattern>/</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<filter>
|
||||
|
Reference in New Issue
Block a user