From 29cca0e4ddd55a71100153f4279da2057f2de8f4 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Fri, 26 Dec 2025 21:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.vscode/settings.json | 2 +- .../RegulatoryManagementBackend/pom.xml | 9 +- .../AddNewRegulatoryController.java | 21 ++++ .../regulatory/AddNewRegulatoryRequest.java | 110 ++++++++++++++++++ 4 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryController.java create mode 100644 code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryRequest.java diff --git a/code/backend/RegulatoryManagementBackend/.vscode/settings.json b/code/backend/RegulatoryManagementBackend/.vscode/settings.json index 5e37972..7721ac5 100644 --- a/code/backend/RegulatoryManagementBackend/.vscode/settings.json +++ b/code/backend/RegulatoryManagementBackend/.vscode/settings.json @@ -1,4 +1,4 @@ { - "java.configuration.updateBuildConfiguration": "interactive", + "java.configuration.updateBuildConfiguration": "automatic", "java.compile.nullAnalysis.mode": "automatic" } diff --git a/code/backend/RegulatoryManagementBackend/pom.xml b/code/backend/RegulatoryManagementBackend/pom.xml index f48bbb7..8c1a58d 100644 --- a/code/backend/RegulatoryManagementBackend/pom.xml +++ b/code/backend/RegulatoryManagementBackend/pom.xml @@ -19,8 +19,8 @@ 18 18 6.2.11 - 2.24.3 - 2.18.3 + 2.25.3 + 2.20.1 @@ -76,6 +76,7 @@ log4j-api ${log4j.version} + com.fasterxml.jackson.core @@ -90,7 +91,7 @@ com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + 2.20 @@ -107,7 +108,7 @@ commons-io commons-io - 2.18.0 + 2.21.0 diff --git a/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryController.java b/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryController.java new file mode 100644 index 0000000..a47b489 --- /dev/null +++ b/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryController.java @@ -0,0 +1,21 @@ +/** + * @Author: Kane Wang + * @Date: 2025-12-26 17:16:22 + * @LastEditors: Kane Wang + * @LastModified: 2025-12-26 17:16:22 + * @FilePath: src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryController.java + * @Description: 新增制度的控制器 + * + * Copyright (c) 2025 by Kane All rights reserved + */ +package com.cpic.xim.web.controllers.regulatory; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/regulatory") +public class AddNewRegulatoryController +{ + +} diff --git a/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryRequest.java b/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryRequest.java new file mode 100644 index 0000000..3a0b30d --- /dev/null +++ b/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryRequest.java @@ -0,0 +1,110 @@ +/** + * @Author: Kane Wang + * @Date: 2025-12-26 17:25:13 + * @LastEditors: Kane Wang + * @LastModified: 2025-12-26 17:39:30 + * @FilePath: src/main/java/com/cpic/xim/web/controllers/regulatory/AddNewRegulatoryRequest.java + * @Description: + * + * Copyright (c) 2025 by Kane All rights reserved + */ +package com.cpic.xim.web.controllers.regulatory; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.cpic.xim.utils.files.UploadedFile; +import java.util.Vector; + +public class AddNewRegulatoryRequest +{ + + public AddNewRegulatoryRequest() + { + this.regulatoryName = ""; + this.departmentName = ""; + this.releaseYear = ""; + this.comment = ""; + this.regulatoryFiles = new Vector(); + } + + + + public AddNewRegulatoryRequest( + String regulatoryName, + String departmentName, + String releaseYear, + String comment, + Vector regulatoryFiles + ) + { + this.regulatoryName = regulatoryName; + this.departmentName = departmentName; + this.releaseYear = releaseYear; + this.comment = comment; + this.regulatoryFiles = regulatoryFiles; + } + + public String getRegulatoryName() + { + return regulatoryName; + } + + public void setRegulatoryName( String regulatoryName ) + { + this.regulatoryName = regulatoryName; + } + + public String getDepartmentName() + { + return departmentName; + } + + public void setDepartmentName( String departmentName ) + { + this.departmentName = departmentName; + } + + public String getReleaseYear() + { + return releaseYear; + } + + public void setReleaseYear( String releaseYear ) + { + this.releaseYear = releaseYear; + } + + public String getComment() + { + return comment; + } + + public void setComment( String comment ) + { + this.comment = comment; + } + + public Vector getRegulatoryFiles() + { + return regulatoryFiles; + } + + public void setRegulatoryFiles( Vector regulatoryFiles ) + { + this.regulatoryFiles = regulatoryFiles; + } + + @JsonProperty("regulatory_name") + private String regulatoryName; + + @JsonProperty("department_name") + private String departmentName; + + @JsonProperty("release_year") + private String releaseYear; + + @JsonProperty("comment") + private String comment; + + @JsonProperty("regulatory_files") + private Vector regulatoryFiles; +}