省口腔同步需求
commit
7401fe1bee
@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.medical.record;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@MapperScan("com.medical.record.mapper") // 扫描Mapper接口
|
||||||
|
public class RecordSystemApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(RecordSystemApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.medical.record.config;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
|
import io.swagger.v3.oas.models.info.Info;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class SwaggerConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public OpenAPI customOpenAPI() {
|
||||||
|
return new OpenAPI()
|
||||||
|
.info(new Info()
|
||||||
|
.title("同步接口")
|
||||||
|
.version("1.0")
|
||||||
|
.description("同步接口系统接口文档"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.medical.record.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public class AuthResponse {
|
||||||
|
private String msg;
|
||||||
|
private String result;
|
||||||
|
private String data;
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(String result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(String data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package com.medical.record.dto;
|
||||||
|
|
||||||
|
public class MedicalAttachmentFile {
|
||||||
|
private String fileName;
|
||||||
|
private Long fileSize;
|
||||||
|
private String fileSuffix;
|
||||||
|
private String md5;
|
||||||
|
private String catalogue;
|
||||||
|
private String catalogueId;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String timeStapPrice;
|
||||||
|
|
||||||
|
public MedicalAttachmentFile() {}
|
||||||
|
|
||||||
|
public MedicalAttachmentFile(String fileName, Long fileSize, String fileSuffix, String md5,
|
||||||
|
String catalogue, String catalogueId) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
this.fileSize = fileSize;
|
||||||
|
this.fileSuffix = fileSuffix;
|
||||||
|
this.md5 = md5;
|
||||||
|
this.catalogue = catalogue;
|
||||||
|
this.catalogueId = catalogueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Getters and Setters
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String fileName) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFileSize() {
|
||||||
|
return fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileSize(Long fileSize) {
|
||||||
|
this.fileSize = fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileSuffix() {
|
||||||
|
return fileSuffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileSuffix(String fileSuffix) {
|
||||||
|
this.fileSuffix = fileSuffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMd5() {
|
||||||
|
return md5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMd5(String md5) {
|
||||||
|
this.md5 = md5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCatalogue() {
|
||||||
|
return catalogue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCatalogue(String catalogue) {
|
||||||
|
this.catalogue = catalogue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCatalogueId() {
|
||||||
|
return catalogueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCatalogueId(String catalogueId) {
|
||||||
|
this.catalogueId = catalogueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTimeStapPrice() {
|
||||||
|
return timeStapPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeStapPrice(String timeStapPrice) {
|
||||||
|
this.timeStapPrice = timeStapPrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package com.medical.record.dto;
|
||||||
|
|
||||||
|
public class MedicalRecordException extends Exception {
|
||||||
|
public MedicalRecordException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.medical.record.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@JacksonXmlRootElement(localName = "datas")
|
||||||
|
public class MedicalRecordXml {
|
||||||
|
@JacksonXmlProperty(localName = "file")
|
||||||
|
@JacksonXmlElementWrapper(useWrapping = false)
|
||||||
|
private List<MedicalAttachmentFile> files;
|
||||||
|
|
||||||
|
@JacksonXmlProperty(localName = "data")
|
||||||
|
private MedicalRecordData data;
|
||||||
|
|
||||||
|
public MedicalRecordXml() {}
|
||||||
|
|
||||||
|
public MedicalRecordXml(List<MedicalAttachmentFile> files, MedicalRecordData data) {
|
||||||
|
this.files = files;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MedicalAttachmentFile> getFiles() {
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFiles(List<MedicalAttachmentFile> files) {
|
||||||
|
this.files = files;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MedicalRecordData getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(MedicalRecordData data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.medical.record.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public class UploadResponse {
|
||||||
|
private String msg;
|
||||||
|
private String result;
|
||||||
|
private RecordData data;
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(String result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RecordData getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(RecordData data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public static class RecordData {
|
||||||
|
private String recordId;
|
||||||
|
|
||||||
|
public String getRecordId() {
|
||||||
|
return recordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecordId(String recordId) {
|
||||||
|
this.recordId = recordId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
server:
|
||||||
|
port: 8891
|
||||||
|
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
url: jdbc:sqlserver://localhost:1433;databaseName=medical_record_db;encrypt=true;trustServerCertificate=true;
|
||||||
|
username: SA
|
||||||
|
password: YourStrong@Passw0rd
|
||||||
|
hikari:
|
||||||
|
minimum-idle: 5
|
||||||
|
maximum-pool-size: 15
|
||||||
|
auto-commit: true
|
||||||
|
connection-timeout: 30000
|
||||||
|
idle-timeout: 300000
|
||||||
|
max-lifetime: 1200000
|
||||||
|
|
||||||
|
# MyBatis-Plus配置
|
||||||
|
mybatis-plus:
|
||||||
|
configuration:
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
mapper-locations: classpath*:/mapper/**/*.xml
|
||||||
|
type-aliases-package: com.medical.record.entity
|
||||||
|
global-config:
|
||||||
|
db-config:
|
||||||
|
id-type: auto
|
||||||
|
logic-delete-field: deleted
|
||||||
|
logic-delete-value: 1
|
||||||
|
logic-not-delete-value: 0
|
||||||
|
# ==========================================
|
||||||
|
# SLF4J + Logback 日志配置
|
||||||
|
# ==========================================
|
||||||
|
logging:
|
||||||
|
# 日志级别
|
||||||
|
level:
|
||||||
|
root: INFO
|
||||||
|
com.medical.record: DEBUG
|
||||||
|
com.medical.record.client: DEBUG # 第三方接口调用日志
|
||||||
|
com.medical.record.service: DEBUG
|
||||||
|
com.medical.record.mapper: DEBUG # SQL日志
|
||||||
|
org.springframework.web: INFO
|
||||||
|
org.apache.http: INFO
|
||||||
|
com.baomidou.mybatisplus: INFO
|
||||||
|
|
||||||
|
# 控制台输出格式
|
||||||
|
pattern:
|
||||||
|
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%logger{50}] - %msg%n"
|
||||||
|
file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%logger{50}] - %msg%n"
|
||||||
|
|
||||||
|
# 文件输出配置
|
||||||
|
file:
|
||||||
|
# 日志文件路径(生产环境必须配置)
|
||||||
|
path: D:/logs/medical-record
|
||||||
|
name: ${logging.file.path}/medical-record.log
|
||||||
|
# 日志文件大小限制
|
||||||
|
max-size: 100MB
|
||||||
|
# 保留天数
|
||||||
|
max-history: 30
|
||||||
|
# 总大小限制(达到后自动清理)
|
||||||
|
total-size-cap: 3GB
|
||||||
|
|
||||||
|
# 日志分组(便于管理)
|
||||||
|
group:
|
||||||
|
medical:
|
||||||
|
- "com.medical.record"
|
||||||
|
- "com.medical.record.controller"
|
||||||
|
- "com.medical.record.service"
|
||||||
|
external:
|
||||||
|
- "org.apache.http"
|
||||||
|
- "com.medical.record.client"
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h1>hello word!!!</h1>
|
||||||
|
<p>this is a html page</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.medical.record;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
class RecordSystemApplicationTests {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void contextLoads() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue