Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 237c9f4196 | |||
| f73c42c994 | |||
| 283a0a1696 | |||
| 9a8be43091 | |||
| 9ca5424a28 | |||
| 4647d557fe | |||
| f3381c73df | |||
| 4af387d834 | |||
| 835531ef68 | |||
| afc631cc91 | |||
| 0c09e9cd2c | |||
| 5b28c59217 | |||
| 33700f4726 |
@@ -1,22 +1,27 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
:: ҽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
:: 医保程序地址
|
||||||
|
set WINEXE_CHSPATH=D:/Project/yinyitong-win/yinyitong.exe
|
||||||
|
:: 医保程序地址
|
||||||
set CHSPATH=D:/Project/CHS
|
set CHSPATH=D:/Project/CHS
|
||||||
:: jar<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
:: jar名称
|
||||||
set NAME=yinyitong-dll-hang
|
set NAME=yinyitong-dll-hang
|
||||||
:: <EFBFBD>˿ں<EFBFBD>
|
:: 端口号
|
||||||
set PROT=5946
|
set PROT=5946
|
||||||
|
|
||||||
echo <EFBFBD>ر<EFBFBD>%PROT%<EFBFBD>˿ڽ<EFBFBD><EFBFBD><EFBFBD>
|
echo 1、关闭端口进程:%PROT%
|
||||||
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%PROT%"') do taskkill /pid %%m -t -f
|
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%PROT%"') do taskkill /pid %%m -t -f
|
||||||
|
|
||||||
echo <EFBFBD><EFBFBD><EFBFBD><EFBFBD>%NAME%
|
echo 2、启动本地程序
|
||||||
|
cd /d %CHSPATH%/
|
||||||
|
start javaw.exe -Dfile.encoding=utf-8 -Djava.library.path="%CHSPATH%;%CHSPATH%/CHSInterfaceYn" -Dlog.path=%~dp0 -jar %~dp0\%NAME%.jar --server.port=%PROT%
|
||||||
|
|
||||||
cd %CHSPATH%
|
:: 延迟5秒
|
||||||
|
timeout /NOBREAK /T 5 >nul
|
||||||
|
|
||||||
start javaw.exe -Dfile.encoding=UTF-8 -Djava.library.path=%CHSPATH% -Dlog.path=%~dp0 -jar %~dp0\%NAME%.jar --server.port=%PROT%
|
echo 3、启动银医通
|
||||||
|
start %WINEXE_CHSPATH%
|
||||||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
|
|
||||||
exit
|
exit
|
||||||
::pause
|
::pause
|
||||||
|
|
||||||
|
|||||||
148
pom.xml
148
pom.xml
@@ -19,18 +19,11 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<hutool.version>5.8.36</hutool.version>
|
<hutool.version>5.8.36</hutool.version>
|
||||||
<pdfbox.version>3.0.2</pdfbox.version>
|
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
|
||||||
<jna.version>5.17.0</jna.version>
|
<jna.version>5.17.0</jna.version>
|
||||||
|
<pdfbox.version>3.0.2</pdfbox.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
@@ -41,11 +34,19 @@
|
|||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 数据校验-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
@@ -59,11 +60,22 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 调用DLL -->
|
<!-- 调用DLL -->
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna</artifactId>
|
||||||
|
<version>${jna.version}</version>
|
||||||
|
</dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<groupId>net.java.dev.jna</groupId>
|
||||||
<artifactId>jna-jpms</artifactId>
|
<artifactId>jna-jpms</artifactId>
|
||||||
<version>${jna.version}</version>
|
<version>${jna.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna-platform</artifactId>
|
||||||
|
<version>${jna.version}</version>
|
||||||
|
</dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<groupId>net.java.dev.jna</groupId>
|
||||||
<artifactId>jna-platform-jpms</artifactId>
|
<artifactId>jna-platform-jpms</artifactId>
|
||||||
@@ -88,7 +100,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>${fastjson.version}</version>
|
<version>1.2.83</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- thymeleaf-->
|
<!-- thymeleaf-->
|
||||||
@@ -129,12 +141,6 @@
|
|||||||
<version>3.1.28</version> <!-- 可以根据实际情况调整版本 -->
|
<version>3.1.28</version> <!-- 可以根据实际情况调整版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 数据校验-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.validation</groupId>
|
|
||||||
<artifactId>validation-api</artifactId>
|
|
||||||
<version>2.0.1.Final</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--微信支付-->
|
<!--微信支付-->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -149,7 +155,6 @@
|
|||||||
<artifactId>jdom2</artifactId>
|
<artifactId>jdom2</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.xml.bind</groupId>
|
<groupId>jakarta.xml.bind</groupId>
|
||||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
@@ -159,8 +164,18 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
|
||||||
|
<!--<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<includes>
|
||||||
|
<include>**/**</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>-->
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- 只保留一个 spring-boot-maven-plugin -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
@@ -175,59 +190,106 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- 拷贝依赖到 lib 目录 -->
|
<!-- 生成API文档插件 -->
|
||||||
|
<!--<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</plugin>-->
|
||||||
|
|
||||||
|
<!--打jar包,排除资源文件和依赖jar,同时外部的lib、resource目录加入到classpath中, 用命令java -jar运行jar时就不需要用-Dloader.path指定外部资源路径了! 不需要spring-boot-maven-plugin插件 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<!--MANIFEST.MF 中 Class-Path 加入前缀!用命令java -jar运行jar时就不用-Dloader.path指定外部资源路径了-->
|
||||||
|
<classpathPrefix>lib/</classpathPrefix>
|
||||||
|
<!--jar包名字是否包含唯一版本标识-->
|
||||||
|
<useUniqueVersions>false</useUniqueVersions>
|
||||||
|
<!--指定含main方法的主类入口-->
|
||||||
|
<mainClass>com.dpkj.HangDllApplication</mainClass>
|
||||||
|
</manifest>
|
||||||
|
<manifestEntries>
|
||||||
|
<!--MANIFEST.MF 中 Class-Path 加入资源文件目录!用命令java -jar时就不用-Dloader.path指定外部资源路径了 -->
|
||||||
|
<Class-Path>resources/</Class-Path>
|
||||||
|
</manifestEntries>
|
||||||
|
</archive>
|
||||||
|
<!-- 打包时从jar包里排除资源文件 -->
|
||||||
|
<excludes>
|
||||||
|
<!--<exclude>*.yml</exclude>
|
||||||
|
<exclude>*.xml</exclude>
|
||||||
|
<exclude>templates/**</exclude>
|
||||||
|
<exclude>win32-x86-64/**</exclude>
|
||||||
|
<exclude>win32-x86/**</exclude>-->
|
||||||
|
</excludes>
|
||||||
|
<!-- 指定项目打成jar包输出位置 -->
|
||||||
|
<outputDirectory>${project.build.directory}/output</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- 拷贝依赖jar包!插件maven-jar-plugin只是打包排除文件, 而把依赖jar包拷贝到外部lib目录就需要maven-dependency-plugin插件 -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-dependencies</id>
|
<id>copy-dependencies</id>
|
||||||
<phase>prepare-package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>copy-dependencies</goal>
|
<goal>copy-dependencies</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
<outputDirectory>${project.build.directory}/output/lib/</outputDirectory>
|
||||||
<overWriteReleases>false</overWriteReleases>
|
|
||||||
<overWriteSnapshots>false</overWriteSnapshots>
|
|
||||||
<overWriteIfNewer>true</overWriteIfNewer>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!--拷贝资源文件! 插件maven-jar-plugin只负责打包时排除文件, 而把资源文件拷贝到外部resource目录就需要maven-dependency-plugin插件-->
|
||||||
<!-- Javadoc 插件 -->
|
<!--<plugin>
|
||||||
<plugin>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<executions>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<execution>
|
||||||
<version>3.0.0</version>
|
<id>copy-resources</id>
|
||||||
</plugin>
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<!–拷贝此目录下的所有文件到指定的外部目录。只负责拷贝,而不是从jar包中排除!–>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<!– 把“<resource><directory>”指定目录中的文件输出到此处指定目录 –>
|
||||||
|
<outputDirectory>${project.build.directory}/output/resources</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>-->
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
<!-- 打包时将 resource 下的文件一起打包 -->
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/**</include>
|
|
||||||
</includes>
|
|
||||||
<filtering>false</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>dev</id>
|
<id>dev</id>
|
||||||
|
<activation>
|
||||||
|
<!--默认激活配置-->
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
<properties>
|
<properties>
|
||||||
|
<!--测试环境-->
|
||||||
|
<profile.name>dev</profile.name>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>pro</id>
|
<id>pro</id>
|
||||||
<properties>
|
<properties>
|
||||||
|
<!--正式环境-->
|
||||||
|
<profile.name>pro</profile.name>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import java.net.UnknownHostException;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class Application {
|
public class HangDllApplication {
|
||||||
|
|
||||||
public static void main(String[] args) throws UnknownHostException {
|
public static void main(String[] args) throws UnknownHostException {
|
||||||
ConfigurableApplicationContext application = SpringApplication.run(Application.class, args);
|
ConfigurableApplicationContext application = SpringApplication.run(HangDllApplication.class, args);
|
||||||
Environment env = application.getEnvironment();
|
Environment env = application.getEnvironment();
|
||||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||||
String port = env.getProperty("server.port");
|
String port = env.getProperty("server.port");
|
||||||
22
src/main/java/com/dpkj/common/config/ChsConfig.java
Normal file
22
src/main/java/com/dpkj/common/config/ChsConfig.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package com.dpkj.common.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2024/4/28 14:55
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "dpkj.chs")
|
||||||
|
public class ChsConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保机构编码
|
||||||
|
*/
|
||||||
|
private String orgcode;
|
||||||
|
|
||||||
|
}
|
||||||
22
src/main/java/com/dpkj/common/config/HisConfig.java
Normal file
22
src/main/java/com/dpkj/common/config/HisConfig.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package com.dpkj.common.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2024/4/28 14:55
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "dpkj.his")
|
||||||
|
public class HisConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用者ID
|
||||||
|
*/
|
||||||
|
private String operationId;
|
||||||
|
|
||||||
|
}
|
||||||
45
src/main/java/com/dpkj/common/vo/ResultData.java
Normal file
45
src/main/java/com/dpkj/common/vo/ResultData.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package com.dpkj.common.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口返回数据格式
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ResultData implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求时间
|
||||||
|
*/
|
||||||
|
private String requestTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求内容
|
||||||
|
*/
|
||||||
|
private String requestContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应时间
|
||||||
|
*/
|
||||||
|
private String responseTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应内容
|
||||||
|
*/
|
||||||
|
private String responseContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者ID
|
||||||
|
*/
|
||||||
|
private String patientId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理后的响应内容
|
||||||
|
*/
|
||||||
|
private Object result;
|
||||||
|
}
|
||||||
@@ -75,7 +75,7 @@ public class ReceiptPrintController {
|
|||||||
int dinyHeight = 0;
|
int dinyHeight = 0;
|
||||||
if (templateName.equals("department")) {
|
if (templateName.equals("department")) {
|
||||||
// 由于是使用的门诊小票-T2,那么默认的高度为1100,强行设置,通过动态修改渲染的图片的高度
|
// 由于是使用的门诊小票-T2,那么默认的高度为1100,强行设置,通过动态修改渲染的图片的高度
|
||||||
height = 900;//根据实际情况调整
|
height = 1000;//根据实际情况调整
|
||||||
|
|
||||||
// 单行最大长度为10
|
// 单行最大长度为10
|
||||||
int singleLineMaxLength = 10;
|
int singleLineMaxLength = 10;
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ public class ReceiptPrintRequest implements Serializable {
|
|||||||
private Integer width = 690;
|
private Integer width = 690;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成的模板的高度,默认为:1050
|
* 生成的模板的高度,默认为:1100
|
||||||
*/
|
*/
|
||||||
private Integer height = 1050;
|
private Integer height = 1100;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.dpkj.modules.chs.hischs.constant;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2025/6/18 15:57
|
||||||
|
* @Description: 医保状态记录常量类
|
||||||
|
*/
|
||||||
|
public class ChsPayStateConst {
|
||||||
|
|
||||||
|
private static Map<String, Integer> chsPayState = new HashMap<String, Integer>(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除所有
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static void clear() {
|
||||||
|
chsPayState.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按key删除
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static void remove(String key) {
|
||||||
|
chsPayState.remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static void put(String key, Integer val) {
|
||||||
|
chsPayState.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static Integer get(String key) {
|
||||||
|
return chsPayState.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
package com.dpkj.modules.chs.hischs.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.dpkj.common.vo.Result;
|
||||||
|
import com.dpkj.common.vo.ResultData;
|
||||||
|
import com.dpkj.modules.chs.hischs.constant.ChsPayStateConst;
|
||||||
|
import com.dpkj.modules.chs.hischs.service.IHispayService;
|
||||||
|
import com.dpkj.modules.chs.hischs.vo.OutpatientBeginModel;
|
||||||
|
import com.dpkj.modules.chs.hischs.vo.OutpatientFinalModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2025/3/22 16:25
|
||||||
|
* @Description: 医保模块-HIS医保
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/chs/hispay")
|
||||||
|
public class HispayController {
|
||||||
|
|
||||||
|
private final IHispayService hispayService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过医保卡或医保电子凭证读卡
|
||||||
|
*
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/5/20
|
||||||
|
*/
|
||||||
|
@PostMapping("findReadCode")
|
||||||
|
public Result<?> findReadCode() {
|
||||||
|
try {
|
||||||
|
JSONObject res = hispayService.readCode();
|
||||||
|
return Result.ok("成功", res);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error("[HispayController][getPatientInfo][按医保电子凭证读卡] ERR:{}", e.getMessage());
|
||||||
|
return Result.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过医保卡获取患者信息
|
||||||
|
*
|
||||||
|
* @param data :
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/5/28
|
||||||
|
*/
|
||||||
|
@PostMapping("findReadCard")
|
||||||
|
public Result<?> findReadCard(@RequestBody JSONObject data) {
|
||||||
|
try {
|
||||||
|
String password = data.getString("password");
|
||||||
|
if (StrUtil.isEmpty(password)) {
|
||||||
|
throw new RuntimeException("密码不可为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject res = hispayService.readCard(password);
|
||||||
|
return Result.ok("成功", res);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error("[HispayController][readCardByCard][按医保卡读卡] ERR:{}", e.getMessage());
|
||||||
|
return Result.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊缴费-预算
|
||||||
|
*
|
||||||
|
* @param data :
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/5/27
|
||||||
|
*/
|
||||||
|
@PostMapping("chsCodeAsOutpatientBegin")
|
||||||
|
public Result<?> chsCodeAsOutpatientBegin(@RequestBody @Validated OutpatientBeginModel data) {
|
||||||
|
try {
|
||||||
|
// 清空状态常量
|
||||||
|
ChsPayStateConst.clear();
|
||||||
|
|
||||||
|
log.info("[HispayController][chsCodeAsOutpatientBegin][门诊缴费-预算-电子医保凭证] 参数:{}", data);
|
||||||
|
ResultData res = hispayService.chsCodeAsOutpatientBegin(data);
|
||||||
|
return Result.ok("成功", res);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.info("[HispayController][chsCodeAsOutpatientBegin][门诊缴费-预算-电子医保凭证] 失败:{}", e.getMessage());
|
||||||
|
return Result.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊缴费-结算
|
||||||
|
*
|
||||||
|
* @param data :
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/5/27
|
||||||
|
*/
|
||||||
|
@PostMapping("chsCodeAsOutpatientFinal")
|
||||||
|
public Result<?> chsCodeAsOutpatientFinal(@RequestBody @Validated OutpatientFinalModel data) {
|
||||||
|
try {
|
||||||
|
log.info("[HispayController][chsCodeAsOutpatientFinal][门诊缴费-结算-电子医保凭证] 参数:{}", data);
|
||||||
|
ResultData res = hispayService.chsCodeAsOutpatientFinal(data);
|
||||||
|
return Result.ok("成功", res);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.info("[HispayController][chsCodeAsOutpatientFinal][门诊缴费-结算-电子医保凭证] 失败:{}", e.getMessage());
|
||||||
|
return Result.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医保支付状态
|
||||||
|
*
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
@PostMapping("getChsPayState")
|
||||||
|
public Result<?> getChsPayState(@RequestBody OutpatientBeginModel data) {
|
||||||
|
String no = data.getPrescriptionNo();
|
||||||
|
if (StrUtil.isEmpty(no)) {
|
||||||
|
return Result.error("收据号不可为空");
|
||||||
|
}
|
||||||
|
Integer num = ChsPayStateConst.get(no);
|
||||||
|
return Result.ok("成功", num);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.dpkj.modules.chs.hischs.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.dpkj.common.vo.ResultData;
|
||||||
|
import com.dpkj.modules.chs.hischs.vo.OutpatientBeginModel;
|
||||||
|
import com.dpkj.modules.chs.hischs.vo.OutpatientFinalModel;
|
||||||
|
|
||||||
|
public interface IHispayService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过医保电子凭证读卡
|
||||||
|
*
|
||||||
|
* @return com.alibaba.fastjson.JSONObject
|
||||||
|
* @author 萧道子 2025/5/28
|
||||||
|
*/
|
||||||
|
JSONObject readCode();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过医保卡-读卡
|
||||||
|
*
|
||||||
|
* @return com.alibaba.fastjson.JSONObject
|
||||||
|
* @author 萧道子 2025/5/28
|
||||||
|
*/
|
||||||
|
JSONObject readCard(String password);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊缴费-预算 电子凭证支付
|
||||||
|
*
|
||||||
|
* @param data :
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/5/27
|
||||||
|
*/
|
||||||
|
ResultData chsCodeAsOutpatientBegin(OutpatientBeginModel data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊缴费-结算 电子凭证支付
|
||||||
|
*
|
||||||
|
* @param data :
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/5/27
|
||||||
|
*/
|
||||||
|
ResultData chsCodeAsOutpatientFinal(OutpatientFinalModel data);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,269 @@
|
|||||||
|
package com.dpkj.modules.chs.hischs.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.core.util.XmlUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.dpkj.common.config.HisConfig;
|
||||||
|
import com.dpkj.common.vo.ResultData;
|
||||||
|
import com.dpkj.modules.chs.hischs.constant.ChsPayStateConst;
|
||||||
|
import com.dpkj.modules.chs.hischs.service.IHispayService;
|
||||||
|
import com.dpkj.modules.chs.hischs.vo.OutpatientBeginModel;
|
||||||
|
import com.dpkj.modules.chs.hischs.vo.OutpatientFinalModel;
|
||||||
|
import com.jacob.activeX.ActiveXComponent;
|
||||||
|
import com.jacob.com.Dispatch;
|
||||||
|
import com.jacob.com.Variant;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2025/3/22 16:29
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
// @AllArgsConstructor
|
||||||
|
public class HispayServiceImpl implements IHispayService {
|
||||||
|
|
||||||
|
// COM对象
|
||||||
|
private static ActiveXComponent dispatch;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void postConstruct() {
|
||||||
|
dispatch = instanceActive();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取HIS医保实例
|
||||||
|
*
|
||||||
|
* @return com.jacob.activeX.ActiveXComponent
|
||||||
|
* @author 萧道子 2025/5/21
|
||||||
|
*/
|
||||||
|
private static ActiveXComponent instanceActive() {
|
||||||
|
try {
|
||||||
|
// 初始化
|
||||||
|
// ComThread.InitSTA(); //容易导致线程发生阻塞
|
||||||
|
ActiveXComponent activeXComponent = new ActiveXComponent("PayClient.clsPayClient");
|
||||||
|
log.info("[HispayServiceImpl][instanceActive][HIS医保COM库] 加载成功");
|
||||||
|
return activeXComponent;
|
||||||
|
} catch (UnsatisfiedLinkError e) {
|
||||||
|
log.error("[HispayServiceImpl][instanceActive][HIS医保COM库] 加载失败:{}", e.getMessage());
|
||||||
|
throw new RuntimeException("HIS医保COM库加载失败:" + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 释放资源
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/5/21
|
||||||
|
*/
|
||||||
|
private void releaseActive() {
|
||||||
|
// ComThread.Release(); //容易导致线程发生阻塞
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理参数
|
||||||
|
*
|
||||||
|
* @param params : 请求参数
|
||||||
|
* @param password : 密码
|
||||||
|
* @return java.lang.String
|
||||||
|
* @author 萧道子 2025/5/27
|
||||||
|
*/
|
||||||
|
private String processParameters(JSONObject params, String password) {
|
||||||
|
JSONObject req = new JSONObject() {{
|
||||||
|
put("timestamp", ""); // 请求发送时间 DateUtil.format(DateUtil.date(), "yyyyMMddHHmmss")
|
||||||
|
put("requestid", ""); // 唯一请求id IDGenerator.getSnowflakeIdToStr()
|
||||||
|
put("operid", ""); // 调用者代码 hisConfig.getOperationId()
|
||||||
|
put("password", password); // 密码
|
||||||
|
put("params", params);
|
||||||
|
}};
|
||||||
|
Document document = XmlUtil.mapToXml(req, "request");
|
||||||
|
return XmlUtil.toStr(document, "UTF-8", false, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验结果
|
||||||
|
*
|
||||||
|
* @param resStr :
|
||||||
|
* @return com.alibaba.fastjson.JSONObject
|
||||||
|
* @author 萧道子 2025/5/28
|
||||||
|
*/
|
||||||
|
private JSONObject verifyResult(String resStr) {
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(resStr)) {
|
||||||
|
throw new RuntimeException("信息获取失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> resMap = XmlUtil.xmlToMap(resStr);
|
||||||
|
JSONObject resJson = new JSONObject(resMap);
|
||||||
|
|
||||||
|
if (StrUtil.equals(resJson.getString("resultCode"), "1")) {
|
||||||
|
throw new RuntimeException(resJson.getString("resultMessage"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!resJson.containsKey("result")) {
|
||||||
|
throw new RuntimeException("result数据为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
return resJson.getJSONObject("result");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject readCode() {
|
||||||
|
/** 1、组装参数 */
|
||||||
|
JSONObject val = new JSONObject()
|
||||||
|
.fluentPut("cardtype", "9") // 1.就诊卡,2.医保卡,5.门诊号,6.患者姓名和电话号码,8.电子健康码/卡,9.医保电子凭证
|
||||||
|
.fluentPut("cardno", "") // 患者就诊卡号
|
||||||
|
.fluentPut("sfzh", "") // 身份证号
|
||||||
|
.fluentPut("hzxm", "") // 患者姓名
|
||||||
|
.fluentPut("phone", ""); // 患者电话号码
|
||||||
|
String params = processParameters(val, null);
|
||||||
|
log.debug("[HispayServiceImpl][readCode][医保读卡-电子凭证] 接口入参:{}", params);
|
||||||
|
|
||||||
|
/** 2、调用COM函数 */
|
||||||
|
Variant vres = new Variant("", true);
|
||||||
|
Variant call = Dispatch.call(dispatch, "fRun", "BMZXX010", params, vres);
|
||||||
|
|
||||||
|
String resStr = vres.getStringRef();
|
||||||
|
log.debug("[HispayServiceImpl][readCode][医保读卡-电子凭证] call返回值:{} 结果:{}", call, resStr);
|
||||||
|
|
||||||
|
|
||||||
|
/** 3、处理读卡结果 */
|
||||||
|
JSONObject result = verifyResult(resStr);
|
||||||
|
if (!result.containsKey("item")) {
|
||||||
|
throw new RuntimeException("item数据为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.getJSONObject("item");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject readCard(String password) {
|
||||||
|
|
||||||
|
/** 1、组装参数 */
|
||||||
|
JSONObject val = new JSONObject()
|
||||||
|
.fluentPut("cardtype", "2") // 1.就诊卡,2.医保卡,5.门诊号,6.患者姓名和电话号码,8.电子健康码/卡,9.医保电子凭证
|
||||||
|
.fluentPut("cardno", "") // 患者就诊卡号
|
||||||
|
.fluentPut("sfzh", "") // 身份证号
|
||||||
|
.fluentPut("hzxm", "") // 患者姓名
|
||||||
|
.fluentPut("phone", ""); // 患者电话号码
|
||||||
|
String params = processParameters(val, password);
|
||||||
|
log.debug("[HispayServiceImpl][readCard][医保读卡-医保卡] 接口入参:{}", params);
|
||||||
|
|
||||||
|
/** 2、调用COM函数 */
|
||||||
|
Variant vres = new Variant("", true);
|
||||||
|
Variant call = Dispatch.call(dispatch, "fRun", "BMZXX010", params, vres);
|
||||||
|
|
||||||
|
String resStr = vres.getStringRef();
|
||||||
|
log.debug("[HispayServiceImpl][readCard][医保读卡-医保卡] call返回值:{} 结果:{}", call, resStr);
|
||||||
|
|
||||||
|
/** 3、处理读卡结果 */
|
||||||
|
JSONObject result = verifyResult(resStr);
|
||||||
|
if (!result.containsKey("item")) {
|
||||||
|
throw new RuntimeException("item数据为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.getJSONObject("item");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private ResultData outpatientBudget(OutpatientBeginModel data) {
|
||||||
|
|
||||||
|
/** 1、组装参数 */
|
||||||
|
JSONObject val = new JSONObject()
|
||||||
|
.fluentPut("patid", data.getPatientId()) // 病人ID
|
||||||
|
.fluentPut("cfxhhj", data.getPrescriptionNo()) // 划价单据,格式:单据1,单据2,单据3
|
||||||
|
.fluentPut("czksfbz", "0") // 是否扣院内账户,0不使用院内账户,1使用院内账户(默认不使用院内账户)
|
||||||
|
.fluentPut("zfjsbz", "0") // 是否自费结算,0根据医保代码缴费,1自费结算(默认自费结算)
|
||||||
|
.fluentPut("ybrc", ""); // 医保入参,xml节点
|
||||||
|
String params = processParameters(val, data.getPassword());
|
||||||
|
log.debug("[HispayServiceImpl][outpatientBudget][门诊缴费-预算] 接口入参:{}", params);
|
||||||
|
|
||||||
|
String requestTime = DateUtil.now();
|
||||||
|
|
||||||
|
/** 2、调用COM函数 */
|
||||||
|
Variant resVariant = new Variant("", true);
|
||||||
|
Variant call = Dispatch.call(dispatch, "fRun", "BMZJF001", params, resVariant);
|
||||||
|
|
||||||
|
String responseTime = DateUtil.now();
|
||||||
|
String resStr = resVariant.getStringRef();
|
||||||
|
log.debug("[HispayServiceImpl][outpatientBudget][门诊缴费-预算] call返回值:{} 结果:{}", call, resStr);
|
||||||
|
|
||||||
|
|
||||||
|
/** 3、处理结果 */
|
||||||
|
JSONObject result = verifyResult(resStr);
|
||||||
|
|
||||||
|
return new ResultData()
|
||||||
|
.setRequestTime(requestTime)
|
||||||
|
.setRequestContent(params)
|
||||||
|
.setResponseTime(responseTime)
|
||||||
|
.setPatientId(data.getPatientId())
|
||||||
|
.setResponseContent(resStr)
|
||||||
|
.setResult(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultData chsCodeAsOutpatientBegin(OutpatientBeginModel data) {
|
||||||
|
// 用户读卡-生成token
|
||||||
|
JSONObject userInfo = readCode();
|
||||||
|
String patientId = userInfo.getString("patid");
|
||||||
|
data.setPatientId(patientId);
|
||||||
|
|
||||||
|
// 更新常量状态 已读卡
|
||||||
|
ChsPayStateConst.put(data.getPrescriptionNo(), 1);
|
||||||
|
|
||||||
|
return outpatientBudget(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultData chsCodeAsOutpatientFinal(OutpatientFinalModel data) {
|
||||||
|
|
||||||
|
/** 1、组装参数 */
|
||||||
|
String requestTime = DateUtil.now();
|
||||||
|
data.setPaytime(requestTime);
|
||||||
|
JSONObject val = ((JSONObject) JSON.toJSON(data))
|
||||||
|
.fluentPut("czksfbz", "0") // 是否扣院内账户,与预算保持一致
|
||||||
|
.fluentPut("zfjsbz", "0") // 是否自费结算,与预算保持一致,0根据病人医保代码结算,1自费结算
|
||||||
|
.fluentPut("ybrc", "")
|
||||||
|
.fluentPut("ptlsh", "")
|
||||||
|
.fluentPut("jysm", "");
|
||||||
|
String params = processParameters(val, null);
|
||||||
|
log.debug("[HispayServiceImpl][chsCodeAsOutpatientFinal][门诊缴费-结算] 接口入参:{}", params);
|
||||||
|
|
||||||
|
/** 2、调用COM函数 */
|
||||||
|
Variant resVariant = new Variant("", true);
|
||||||
|
Variant call = Dispatch.call(dispatch, "fRun", "BMZJF002", params, resVariant);
|
||||||
|
|
||||||
|
String responseTime = DateUtil.now();
|
||||||
|
String resStr = resVariant.getStringRef();
|
||||||
|
log.debug("[HispayServiceImpl][chsCodeAsOutpatientFinal][门诊缴费-结算] call返回值:{} 结果:{}", call, resStr);
|
||||||
|
|
||||||
|
/** 3、处理结果 */
|
||||||
|
JSONObject result = verifyResult(resStr);
|
||||||
|
|
||||||
|
return new ResultData()
|
||||||
|
.setRequestTime(requestTime)
|
||||||
|
.setRequestContent(params)
|
||||||
|
.setResponseTime(responseTime)
|
||||||
|
.setPatientId(data.getPatid())
|
||||||
|
.setResponseContent(resStr)
|
||||||
|
.setResult(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.dpkj.modules.chs.hischs.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2025/5/27 16:52
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientBeginModel implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病人ID
|
||||||
|
*/
|
||||||
|
// @NotEmpty(message = "患者ID不可为空!")
|
||||||
|
private String patientId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方单号 - 多个逗号拼接
|
||||||
|
*/
|
||||||
|
@NotEmpty(message = "处方单号不可为空!")
|
||||||
|
private String prescriptionNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病人ID
|
||||||
|
*/
|
||||||
|
// @NotEmpty(message = "密码不可为空!")
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.dpkj.modules.chs.hischs.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2025/5/27 16:52
|
||||||
|
* @Description: 结算
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientFinalModel implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@NotEmpty(message = "患者ID不可为空!")
|
||||||
|
private String patid;
|
||||||
|
|
||||||
|
@NotEmpty(message = "收据号不可为空!")
|
||||||
|
private String sjh;
|
||||||
|
|
||||||
|
@NotEmpty(message = "总金额不可为空!")
|
||||||
|
private String zje;
|
||||||
|
|
||||||
|
@NotEmpty(message = "应付金额不可为空!")
|
||||||
|
private String ysje;
|
||||||
|
|
||||||
|
@NotEmpty(message = "支付方式不可为空!")
|
||||||
|
private String paytype;
|
||||||
|
|
||||||
|
@NotEmpty(message = "支付金额不可为空!")
|
||||||
|
private String paymoney;
|
||||||
|
|
||||||
|
@NotEmpty(message = "支付流水号不可为空!")
|
||||||
|
private String paylsh;
|
||||||
|
|
||||||
|
@NotEmpty(message = "医保报销金额不可为空!")
|
||||||
|
private String ybzf;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
// @NotEmpty(message = "支付时间不可为空!")
|
||||||
|
private String paytime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -18,7 +18,6 @@ import com.dpkj.modules.scanface.wx.vo.WxFacePayAuthinfoResp;
|
|||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayReq;
|
import com.dpkj.modules.scanface.wx.vo.WxFacePayReq;
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayResp;
|
import com.dpkj.modules.scanface.wx.vo.WxFacePayResp;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.github.binarywang.wxpay.bean.request.WxPayOrderReverseRequest;
|
import com.github.binarywang.wxpay.bean.request.WxPayOrderReverseRequest;
|
||||||
import com.github.binarywang.wxpay.bean.result.WxPayMicropayResult;
|
import com.github.binarywang.wxpay.bean.result.WxPayMicropayResult;
|
||||||
import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult;
|
import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult;
|
||||||
@@ -34,16 +33,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.HashMap;
|
import java.math.BigDecimal;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
|
||||||
import java.util.concurrent.ScheduledFuture;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.TimeoutException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 微信刷脸支付
|
* @description: 微信刷脸支付
|
||||||
@@ -79,6 +71,10 @@ public class WxFacePayController {
|
|||||||
public Result<String> doFacePay(@RequestBody WxFaceOrderVo wxFaceOrderVo) throws Exception {
|
public Result<String> doFacePay(@RequestBody WxFaceOrderVo wxFaceOrderVo) throws Exception {
|
||||||
Result<String> result = new Result<>();
|
Result<String> result = new Result<>();
|
||||||
try {
|
try {
|
||||||
|
//元转分
|
||||||
|
int money = new BigDecimal(wxFaceOrderVo.getTotalAmount()).multiply(new BigDecimal(100)).intValue();
|
||||||
|
wxFaceOrderVo.setTotalAmount(String.valueOf(money));
|
||||||
|
|
||||||
//1 初始化
|
//1 初始化
|
||||||
this.initWxpayface();
|
this.initWxpayface();
|
||||||
|
|
||||||
@@ -95,6 +91,7 @@ public class WxFacePayController {
|
|||||||
WxPayMicropayResult micropayResult = new WxPayMicropayResult();
|
WxPayMicropayResult micropayResult = new WxPayMicropayResult();
|
||||||
if (StringUtil.isNotBlank(authinfoResp.getFace_code())) {
|
if (StringUtil.isNotBlank(authinfoResp.getFace_code())) {
|
||||||
//5、调用后台人脸支付API发起支付
|
//5、调用后台人脸支付API发起支付
|
||||||
|
System.out.println("---------调用后台人脸支付API发起支付");
|
||||||
wxFaceOrderVo.setOutTradeNo(getOutTradeNo());
|
wxFaceOrderVo.setOutTradeNo(getOutTradeNo());
|
||||||
micropayResult = this.toCreateWxOrder(authinfoResp, wxFaceOrderVo, wxFacePayResp0);
|
micropayResult = this.toCreateWxOrder(authinfoResp, wxFaceOrderVo, wxFacePayResp0);
|
||||||
|
|
||||||
@@ -139,7 +136,7 @@ public class WxFacePayController {
|
|||||||
@RequestMapping(value = "/initWxpayface", method = RequestMethod.POST)
|
@RequestMapping(value = "/initWxpayface", method = RequestMethod.POST)
|
||||||
public WxFacePayResp initWxpayface() throws JsonProcessingException, UnsupportedEncodingException, WxpayFaceSDKDll.DllRegistrationException {
|
public WxFacePayResp initWxpayface() throws JsonProcessingException, UnsupportedEncodingException, WxpayFaceSDKDll.DllRegistrationException {
|
||||||
// 构建请求参数的JSON字符串
|
// 构建请求参数的JSON字符串
|
||||||
WxFacePayReq wxFacePayReq = new WxFacePayReq("initWxpayface", "1", System.currentTimeMillis() / 1000, 1);
|
WxFacePayReq wxFacePayReq = new WxFacePayReq("initWxpayface", "1", System.currentTimeMillis() / 1000, 3);
|
||||||
WxFacePayResp wxFacePayResp = weChatPayFaceService.doWxPayIniMethod(wxFacePayReq);
|
WxFacePayResp wxFacePayResp = weChatPayFaceService.doWxPayIniMethod(wxFacePayReq);
|
||||||
log.info("[WxFacePayController][initWxpayface][132] [1、程序启动时初始化:]:{}", wxFacePayResp.toString());
|
log.info("[WxFacePayController][initWxpayface][132] [1、程序启动时初始化:]:{}", wxFacePayResp.toString());
|
||||||
return wxFacePayResp;
|
return wxFacePayResp;
|
||||||
@@ -184,6 +181,7 @@ public class WxFacePayController {
|
|||||||
public WxFacePayAuthinfoResp getWxpayfaceCode(@RequestBody WxFaceOrderVo wxFaceOrderVo, WxFacePayAuthinfoResp wxFacePayResp0) throws Exception {
|
public WxFacePayAuthinfoResp getWxpayfaceCode(@RequestBody WxFaceOrderVo wxFaceOrderVo, WxFacePayAuthinfoResp wxFacePayResp0) throws Exception {
|
||||||
//4、进行人脸识别getWxpayfaceCode(获取支付凭证)
|
//4、进行人脸识别getWxpayfaceCode(获取支付凭证)
|
||||||
String outTradeNo = getOutTradeNo();//获取流水号
|
String outTradeNo = getOutTradeNo();//获取流水号
|
||||||
|
|
||||||
// 构建请求参数的JSON字符串
|
// 构建请求参数的JSON字符串
|
||||||
WxFacePayReq wxFacePayReq = new WxFacePayReq("getWxpayfaceCode", "1", System.currentTimeMillis() / 1000);
|
WxFacePayReq wxFacePayReq = new WxFacePayReq("getWxpayfaceCode", "1", System.currentTimeMillis() / 1000);
|
||||||
wxFacePayReq.setAuthinfo(wxFacePayResp0.getAuthinfo())
|
wxFacePayReq.setAuthinfo(wxFacePayResp0.getAuthinfo())
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import com.dpkj.common.vo.Result;
|
|||||||
import com.dpkj.modules.scanface.wx.dll.WxpayFaceSDKDll;
|
import com.dpkj.modules.scanface.wx.dll.WxpayFaceSDKDll;
|
||||||
import com.dpkj.modules.scanface.wx.service.CallWxpayFaceService;
|
import com.dpkj.modules.scanface.wx.service.CallWxpayFaceService;
|
||||||
import com.dpkj.modules.scanface.wx.service.WeChatPayFaceService;
|
import com.dpkj.modules.scanface.wx.service.WeChatPayFaceService;
|
||||||
import com.dpkj.modules.scanface.wx.service.impl.CallWxpayFaceServiceImpl;
|
|
||||||
import com.dpkj.modules.scanface.wx.service.impl.WeChatPayFaceServiceImpl;
|
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayAuthinfoResp;
|
import com.dpkj.modules.scanface.wx.vo.WxFacePayAuthinfoResp;
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayReq;
|
import com.dpkj.modules.scanface.wx.vo.WxFacePayReq;
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayResp;
|
import com.dpkj.modules.scanface.wx.vo.WxFacePayResp;
|
||||||
@@ -15,15 +13,11 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.thymeleaf.util.StringUtils;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.security.Provider;
|
import java.security.Provider;
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import com.dpkj.modules.scanface.wx.vo.WxFacePayResp;
|
|||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 调用微信刷脸方法
|
* @description: 调用微信刷脸方法
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class CallWxpayFaceServiceImpl implements CallWxpayFaceService {
|
|||||||
reqPointer.setString(0, reqJson);
|
reqPointer.setString(0, reqJson);
|
||||||
//请求数据长度
|
//请求数据长度
|
||||||
int reqSize = reqPointer.getString(0).length();
|
int reqSize = reqPointer.getString(0).length();
|
||||||
System.out.println("-----------调用微信刷脸DLL请求数据----------"+reqPointer.getString(0));
|
log.info("000-----------调用微信刷脸DLL请求数据----------",reqPointer.getString(0));
|
||||||
|
|
||||||
//接收响应
|
//接收响应
|
||||||
long[] pRespBuf = new long[1];
|
long[] pRespBuf = new long[1];
|
||||||
@@ -56,21 +56,20 @@ public class CallWxpayFaceServiceImpl implements CallWxpayFaceService {
|
|||||||
// 调用本地方法
|
// 调用本地方法
|
||||||
WxpayFaceSDKDll.Dll dll = WxpayFaceSDKDll.instance();
|
WxpayFaceSDKDll.Dll dll = WxpayFaceSDKDll.instance();
|
||||||
int result = dll.wxpayCallFaceService(reqPointer.getString(0), reqSize, pRespBuf, respSize);
|
int result = dll.wxpayCallFaceService(reqPointer.getString(0), reqSize, pRespBuf, respSize);
|
||||||
//使用C:\Windows\System32目录下 int result = WxpayFaceSDK.INSTANCE.wxpayCallFaceService(reqPointer.getString(0), reqSize, pRespBuf, respSize);
|
|
||||||
|
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
Pointer pointer = new Pointer(pRespBuf[0]);
|
Pointer pointer = new Pointer(pRespBuf[0]);
|
||||||
byte[] byteArray = pointer.getByteArray(0, respSize[0]);
|
byte[] byteArray = pointer.getByteArray(0, respSize[0]);
|
||||||
resStr = new String(byteArray, StandardCharsets.UTF_8);
|
resStr = new String(byteArray, StandardCharsets.UTF_8);
|
||||||
|
|
||||||
System.out.println("-----------调用微信刷脸DLL请求结果: " + resStr);
|
log.info("000-----------调用微信刷脸DLL请求结果: " , resStr);
|
||||||
dll.wxpayReleaseResponse(new String[2]);
|
dll.wxpayReleaseResponse(new String[2]);
|
||||||
//释放 C:\Windows\System32目录下 WxpayFaceSDK.INSTANCE.wxpayReleaseResponse(new String[2]);
|
//释放 C:\Windows\System32目录下 WxpayFaceSDK.INSTANCE.wxpayReleaseResponse(new String[2]);
|
||||||
} else {
|
} else {
|
||||||
Pointer pointer = new Pointer(pRespBuf[0]);
|
Pointer pointer = new Pointer(pRespBuf[0]);
|
||||||
byte[] byteArray = pointer.getByteArray(0, respSize[0]);
|
byte[] byteArray = pointer.getByteArray(0, respSize[0]);
|
||||||
resStr = new String(byteArray, StandardCharsets.UTF_8);
|
resStr = new String(byteArray, StandardCharsets.UTF_8);
|
||||||
System.err.println("-----------调用人脸服务失败: " +resStr);
|
log.error("000-----------调用人脸DLL服务失败: " ,resStr);
|
||||||
}
|
}
|
||||||
return resStr;
|
return resStr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,10 @@ import com.dpkj.modules.scanface.wx.util.WXPayUtil;
|
|||||||
import com.dpkj.modules.scanface.wx.util.WxRandomUtils;
|
import com.dpkj.modules.scanface.wx.util.WxRandomUtils;
|
||||||
import com.dpkj.modules.scanface.wx.util.XmlParserUtil;
|
import com.dpkj.modules.scanface.wx.util.XmlParserUtil;
|
||||||
import com.dpkj.modules.scanface.wx.util.XmlUtils;
|
import com.dpkj.modules.scanface.wx.util.XmlUtils;
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayAuthinfoResp;
|
import com.dpkj.modules.scanface.wx.vo.*;
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayMicroPayResp;
|
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayOrderResp;
|
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayReq;
|
|
||||||
import com.dpkj.modules.scanface.wx.vo.WxFacePayResp;
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
||||||
import com.sun.jna.Memory;
|
import com.sun.jna.Memory;
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -27,16 +24,10 @@ import org.springframework.http.HttpMethod;
|
|||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.SortedMap;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 调用微信刷脸方法
|
* @description: 调用微信刷脸方法
|
||||||
|
|||||||
@@ -3,19 +3,12 @@ package com.dpkj.modules.scanface.wx.util;
|
|||||||
import org.jdom2.Content;
|
import org.jdom2.Content;
|
||||||
import org.jdom2.Document;
|
import org.jdom2.Document;
|
||||||
import org.jdom2.Element;
|
import org.jdom2.Element;
|
||||||
|
|
||||||
import javax.xml.bind.DatatypeConverter;
|
import javax.xml.bind.DatatypeConverter;
|
||||||
|
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.SortedMap;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 生成签名
|
* @description: 生成签名
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.dpkj.modules.scanface.wx.util;
|
package com.dpkj.modules.scanface.wx.util;
|
||||||
|
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
import javax.xml.xpath.XPath;
|
import javax.xml.xpath.XPath;
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ public class WxFaceOrderVo {
|
|||||||
private String outTradeNo;
|
private String outTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户支付金额 分
|
* 用户支付金额 单位元
|
||||||
|
* 调用微信时需要转为分
|
||||||
*/
|
*/
|
||||||
private String totalAmount;
|
private String totalAmount;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,30 @@
|
|||||||
|
server:
|
||||||
|
port: 5948
|
||||||
|
servlet:
|
||||||
|
context-path: /api
|
||||||
|
tomcat:
|
||||||
|
max-swallow-size: -1
|
||||||
|
error:
|
||||||
|
include-exception: true
|
||||||
|
include-stacktrace: ALWAYS
|
||||||
|
include-message: ALWAYS
|
||||||
|
compression:
|
||||||
|
enabled: true
|
||||||
|
min-response-size: 1024
|
||||||
|
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
||||||
|
|
||||||
|
spring:
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 10MB
|
||||||
|
max-request-size: 10MB
|
||||||
|
resource:
|
||||||
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.dpkj: debug
|
||||||
|
|
||||||
dpkj:
|
dpkj:
|
||||||
#后端项目访问地址 #https://yinyitong.yzqingyan.cn/ http://172.16.11.13:15946/ ttps://yinyitong.yzqingyan.cn
|
#后端项目访问地址 #https://yinyitong.yzqingyan.cn/ http://172.16.11.13:15946/ ttps://yinyitong.yzqingyan.cn
|
||||||
serverurl: http://localhost:5946/api/
|
serverurl: http://localhost:5946/api/
|
||||||
@@ -5,8 +32,6 @@ dpkj:
|
|||||||
chs:
|
chs:
|
||||||
# 医保机构编码
|
# 医保机构编码
|
||||||
orgcode: H53082800070
|
orgcode: H53082800070
|
||||||
# 医保读卡之后保存信息的文件名
|
|
||||||
file-name: outfile1191.txt
|
|
||||||
file:
|
file:
|
||||||
# 文件保存地址
|
# 文件保存地址
|
||||||
path: G:\Temp\img
|
path: G:\Temp\img
|
||||||
|
|||||||
@@ -1,12 +1,38 @@
|
|||||||
|
server:
|
||||||
|
port: 5946
|
||||||
|
servlet:
|
||||||
|
context-path: /api
|
||||||
|
tomcat:
|
||||||
|
max-swallow-size: -1
|
||||||
|
error:
|
||||||
|
include-exception: true
|
||||||
|
include-stacktrace: ALWAYS
|
||||||
|
include-message: ALWAYS
|
||||||
|
compression:
|
||||||
|
enabled: true
|
||||||
|
min-response-size: 1024
|
||||||
|
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
||||||
|
|
||||||
|
spring:
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 10MB
|
||||||
|
max-request-size: 10MB
|
||||||
|
resource:
|
||||||
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.dpkj: debug
|
||||||
|
|
||||||
|
|
||||||
dpkj:
|
dpkj:
|
||||||
#后端项目访问地址 #https://yinyitong.yzqingyan.cn/ http://172.16.11.13:15946/ ttps://yinyitong.yzqingyan.cn
|
#后端项目访问地址 #https://yinyitong.yzqingyan.cn/ http://172.16.11.13:15946/ ttps://yinyitong.yzqingyan.cn
|
||||||
serverurl: http://www.lczyyy.com/api/
|
serverurl: http://10.121.1.44/api/
|
||||||
# 医保配置
|
# 医保配置
|
||||||
chs:
|
chs:
|
||||||
# 医保机构编码
|
# 医保机构编码
|
||||||
orgcode: H53082800070
|
orgcode: H53082800070
|
||||||
# 医保读卡之后保存信息的文件名
|
|
||||||
file-name: outfile1191.txt
|
|
||||||
file:
|
file:
|
||||||
# 文件保存地址
|
# 文件保存地址
|
||||||
path: D:\Project\Express\upload
|
path: D:\Project\Express\upload
|
||||||
@@ -28,40 +54,40 @@ dpkj:
|
|||||||
#dll文件路径
|
#dll文件路径
|
||||||
dll-path: C:/opt/ant-abcp/bpaas_api.dll
|
dll-path: C:/opt/ant-abcp/bpaas_api.dll
|
||||||
#IOT 应用管理-appid
|
#IOT 应用管理-appid
|
||||||
app-id: 2021005138656502
|
app-id: 2021005151604729
|
||||||
#IOT应用版本
|
#IOT应用版本
|
||||||
app-version: 1.0.0.0
|
app-version: 1.0.0.0
|
||||||
#签约商家的 PID,以 2088 开头,企业主体
|
#签约商家的 PID,以 2088 开头,企业主体
|
||||||
merchant-id: 2088641941653700
|
merchant-id: 2088170977486823
|
||||||
#商家机具终端编号,每台设备保持唯一
|
#商家机具终端编号,每台设备保持唯一
|
||||||
device-num: P060003750
|
device-num: P060003750
|
||||||
#服务商的 PID
|
#服务商的 PID
|
||||||
partner-id: 2088641941653700
|
partner-id: 2088170977486823
|
||||||
# 核心入参 serviceId
|
# 核心入参 serviceId
|
||||||
service-id: pay
|
service-id: pay
|
||||||
#微信模块
|
#微信模块
|
||||||
wx:
|
wx:
|
||||||
configs: #清研家
|
configs: #中医院
|
||||||
- app-id: wxe8334dd2140bb0e1
|
- app-id: wxc12fa4977f66974d
|
||||||
# 公众号的appsecret
|
# 公众号的appsecret
|
||||||
secret: f83420d79cc6ecd1d7fe9684ac9cdfe4
|
secret: a51dbcac25a73d7e4812a43cf550c5fc
|
||||||
# 接口配置里的Token值
|
# 接口配置里的Token值
|
||||||
token: dpkjylwjvote
|
token: DPKJYINYITONG
|
||||||
# 接口配置里的EncodingAESKey值
|
# 接口配置里的EncodingAESKey值
|
||||||
aes-key: go2uM3ASe2rEyeoNsZHoPCiKGgpku0Bi49P5IypdQWT
|
aes-key: yIBgBrHwRGjO2L3CLIE9hmnlf1FrXQQ7qJZVIg4r6Dx
|
||||||
mch-config: #商户信息 清研家关联的商户:驿路万家-扬州清研软件科技
|
mch-config: #商户信息 中医院
|
||||||
app-id: wxe8334dd2140bb0e1
|
app-id: wxc12fa4977f66974d
|
||||||
secret: f83420d79cc6ecd1d7fe9684ac9cdfe4
|
secret: a51dbcac25a73d7e4812a43cf550c5fc
|
||||||
#调用接口所需service_id
|
#调用接口所需service_id
|
||||||
service-id: service_id
|
service-id: service_id
|
||||||
#商户号
|
#商户号
|
||||||
mch-id: 1557642321
|
mch-id: 1603658732
|
||||||
#商户秘钥
|
#商户秘钥
|
||||||
mch-key: yndpkj15288216506YndpkjKsjytZx12
|
mch-key: lczyywxc12fa4977f66974dyytzz1234
|
||||||
#报文解密 APIv3密钥
|
#报文解密 APIv3密钥
|
||||||
v3-key: yndpkj15288216506YndpkjKsjytZx12
|
v3-key: lczyywxc12fa4977f66974dyytzz1234
|
||||||
#微信: 商户APIv2密钥
|
#微信: 商户APIv2密钥
|
||||||
key-api: yndpkj15288216506YndpkjKsjytZx12
|
key-api: lczyywxc12fa4977f66974dyytzz1234
|
||||||
#p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath;开头)
|
#p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath;开头)
|
||||||
key-path: classpath:test\apiclient_cert.p12
|
key-path: classpath:test\apiclient_cert.p12
|
||||||
private-key-path: classpath:test\apiclient_key.pem
|
private-key-path: classpath:test\apiclient_key.pem
|
||||||
@@ -79,9 +105,9 @@ dpkj:
|
|||||||
url:
|
url:
|
||||||
# 后端接口地址
|
# 后端接口地址
|
||||||
# server: https://102760424tfyw.vicp.fun/api
|
# server: https://102760424tfyw.vicp.fun/api
|
||||||
server: ${dpkj.server-url}
|
server: ${dpkj.url.server-url}
|
||||||
# h5地址
|
# h5地址
|
||||||
h5: ${dpkj.h5-url}
|
h5: ${dpkj.url.h5-url}
|
||||||
|
|
||||||
|
|
||||||
# 身份证读取等待时间
|
# 身份证读取等待时间
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spring:
|
|||||||
active: pro
|
active: pro
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 5946
|
port: 5948 #5946
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /api
|
context-path: /api
|
||||||
tomcat:
|
tomcat:
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 生成 error html格式日志开始 -->
|
<!-- 生成 error html格式日志开始 -->
|
||||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
<!--<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
<!–设置日志级别,过滤掉info日志,只输入error日志–>
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
</filter>
|
</filter>
|
||||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||||
@@ -40,15 +40,15 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</encoder>
|
</encoder>
|
||||||
<file>${LOG_HOME}/error-log.html</file>
|
<file>${LOG_HOME}/error-log.html</file>
|
||||||
</appender>
|
</appender>-->
|
||||||
<!-- 生成 error html格式日志结束 -->
|
<!-- 生成 error html格式日志结束 -->
|
||||||
|
|
||||||
<!-- 每天生成一个html格式的日志开始 -->
|
<!-- 每天生成一个html格式的日志开始 -->
|
||||||
<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<!-- <appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--日志文件输出的文件名 -->
|
<!–日志文件输出的文件名 –>
|
||||||
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||||
<!--日志文件保留天数 -->
|
<!–日志文件保留天数 –>
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<MaxFileSize>10MB</MaxFileSize>
|
<MaxFileSize>10MB</MaxFileSize>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||||
</layout>
|
</layout>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>-->
|
||||||
<!-- 每天生成一个html格式的日志结束 -->
|
<!-- 每天生成一个html格式的日志结束 -->
|
||||||
|
|
||||||
<!--myibatis log configure -->
|
<!--myibatis log configure -->
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
<appender-ref ref="STDOUT"/>
|
<appender-ref ref="STDOUT"/>
|
||||||
<appender-ref ref="FILE"/>
|
<appender-ref ref="FILE"/>
|
||||||
<appender-ref ref="HTML"/>
|
<!-- <appender-ref ref="HTML"/>-->
|
||||||
<appender-ref ref="FILE_HTML"/>
|
<!-- <appender-ref ref="FILE_HTML"/>-->
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -70,10 +70,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-bottom: 1px dashed #000;margin: 3px 0;"></div>
|
<div style="border-bottom: 1px dashed #000;margin: 3px 0;"></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">打印时间:<span th:text="${printTime}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">打印时间:<span th:text="${printTime}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 27px;">
|
<div style="margin-left: 20px;margin-right: 20px;font-size: 29px;word-break: break-all;">
|
||||||
<span>温馨提示:请取走缴费凭证,并妥善保管。<br/>如果对缴费存在疑问,请到人工窗口咨询!</span>
|
<span>温馨提示:请妥善保管好您的缴费凭条,如果对缴费存在疑问,请到人工窗口咨询。</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-bottom: 1px dashed #000;margin: 3px 0;"></div>
|
<div style="border-bottom: 1px dashed #000;margin: 3px 0;"></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">打印时间:<span th:text="${printTime}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">打印时间:<span th:text="${printTime}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 27px;">
|
<div style="margin-left: 20px;margin-right: 20px;font-size: 29px;word-break: break-all;">
|
||||||
<span>温馨提示:请取走缴费凭证,并妥善保管。<br/>如果对缴费存在疑问,请到人工窗口咨询!</span>
|
<span>温馨提示:请妥善保管好您的缴费凭条,如果对缴费存在疑问,请到人工窗口咨询。</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-bottom: 1px dashed #000;margin: 3px 0;"></div>
|
<div style="border-bottom: 1px dashed #000;margin: 3px 0;"></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">打印时间:<span th:text="${printTime}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">打印时间:<span th:text="${printTime}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 27px;">
|
<div style="margin-left: 20px;margin-right: 20px;font-size: 29px;word-break: break-all;">
|
||||||
<span>温馨提示:请取走缴费凭证,并妥善保管。<br/>如果对缴费存在疑问,请到人工窗口咨询!</span>
|
<span>温馨提示:请妥善保管好您的缴费凭条,如果对缴费存在疑问,请到人工窗口咨询。</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -25,22 +25,24 @@
|
|||||||
<div style="margin-left: 20px;">就诊科室:<span th:text="${department}"></span></div>
|
<div style="margin-left: 20px;">就诊科室:<span th:text="${department}"></span></div>
|
||||||
<div style="margin-left: 20px;">出诊级别:<span th:text="${visitLevel}"></span></div>
|
<div style="margin-left: 20px;">出诊级别:<span th:text="${visitLevel}"></span></div>
|
||||||
<div style="margin-left: 20px;">就诊医生:<span th:text="${doctor}"></span></div>
|
<div style="margin-left: 20px;">就诊医生:<span th:text="${doctor}"></span></div>
|
||||||
|
<div style="margin-left: 20px;">就诊时间:<span th:text="${treatTime}"></span></div>
|
||||||
<div style="margin-left: 20px;">号  序:<span th:text="${sequence}"></span></div>
|
<div style="margin-left: 20px;">号  序:<span th:text="${sequence}"></span></div>
|
||||||
<div style="margin-left: 20px;">挂号日期:<span th:text="${registerDate}"></span></div>
|
<div style="margin-left: 20px;">总 费 用:<span th:text="${totalFee}"></span>元</div>
|
||||||
<div style="margin-left: 20px;">总 费 用:<span th:text="${totalFee}"></span> 元</div>
|
<div style="margin-left: 20px;">挂号时间:<span th:text="${registerDate}"></span></div>
|
||||||
<div style="margin-left: 20px;">支付方式:<span th:text="${paymentMethod}"></span></div>
|
<div style="margin-left: 20px;">支付方式:<span th:text="${paymentMethod}"></span></div>
|
||||||
<div style="margin-left: 20px;">交易流水:<span style="font-size: 26px;"
|
<div style="margin-left: 20px;">交易流水:<span th:text="${transactionNumber}"></span></div>
|
||||||
th:text="${transactionNumber}"></span></div>
|
|
||||||
<div style="width:100%;text-align: center;">
|
<div style="width:100%;text-align: center;">
|
||||||
<img th:src="${qrCodeBase64}"
|
<img th:src="${qrCodeBase64}"
|
||||||
alt="#"/>
|
alt="#"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-bottom: 1px dashed #000;margin-bottom: 3px;"></div>
|
<div style="border-bottom: 1px dashed #000;margin-bottom: 3px;"></div>
|
||||||
<div style="margin-left: 20px;font-size: 29px;">终端编号:<span th:text="${terminalNumber}"></span></div>
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">终端编号:<span
|
||||||
<div style="margin-left: 20px;font-size: 29px;">打印时间:<span th:text="${printTime}"></span></div>
|
th:text="${terminalNumber}"></span></div>
|
||||||
<div style="margin-left: 20px;font-size: 27px;">
|
<div style="margin-left: 20px;font-size: 29px;word-break: break-all;">打印时间:<span th:text="${printTime}"></span>
|
||||||
<span>温馨提示:请取走挂号凭证,并妥善保管。<br/>如果对缴费存在疑问,请到人工窗口咨询!</span>
|
</div>
|
||||||
|
<div style="margin-left: 20px;margin-right: 20px;font-size: 29px;word-break: break-all;">
|
||||||
|
<span>温馨提示:请妥善保管好您的缴费凭条,如果对缴费存在疑问,请到人工窗口咨询。</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
BIN
src/main/resources/win32-x86/PayClient.dll
Normal file
BIN
src/main/resources/win32-x86/PayClient.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user