diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraesAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java
similarity index 97%
rename from openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraesAppServiceImpl.java
rename to openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java
index 0f7e7dd6..a3113190 100644
--- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraesAppServiceImpl.java
+++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java
@@ -13,7 +13,7 @@ import javax.annotation.Resource;
import java.util.List;
@Service
-public class DoctorPhraesAppServiceImpl implements IDoctorPhraseAppService {
+public class DoctorPhraseAppServiceImpl implements IDoctorPhraseAppService {
@Resource
private IDoctorPhraseService doctorPhraseService;
diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java
index df260baa..0a15e4fe 100644
--- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java
+++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java
@@ -1,12 +1,14 @@
package com.openhis.template.domain;
import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
+import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
@Data
@@ -28,8 +30,13 @@ public class DoctorPhrase {
private Integer phraseType;
/** 业务分类(主诉/现病史等) */
+ @NotBlank(message = "业务分类不能为空")
private String phraseCategory;
+ // 非数据库字段,用于前端展示名称
+ @TableField(exist = false)
+ private String businessTypeName;
+
/** 模板内容 */
private String phraseContent;
diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/enums/DoctorPhraseBizTypeEnum.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/enums/DoctorPhraseBizTypeEnum.java
new file mode 100644
index 00000000..71808efa
--- /dev/null
+++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/enums/DoctorPhraseBizTypeEnum.java
@@ -0,0 +1,40 @@
+package com.openhis.template.enums;
+
+// 枚举类不需要任何Lombok注解(@Data/@AllArgsConstructor/@NoArgsConstructor都删掉)
+public enum DoctorPhraseBizTypeEnum {
+ // 1. 枚举项:直接传值(不用code:xxx,直接写字符串)
+ MAIN_COMPLAINT("MAIN_COMPLAINT", "主诉"),
+ PRESENT_HISTORY("PRESENT_HISTORY", "现病史"),
+ PRE_OPERATION("PRE_OPERATION", "术前"),
+ POST_OPERATION("POST_OPERATION", "术后"),
+ PAST_HISTORY("PAST_HISTORY", "既往史");
+
+ // 2. 定义枚举的成员变量(private final 保证不可变)
+ private final String code; // 数据库存储的编码
+ private final String name; // 前端展示的名称
+
+ // 3. 手动写私有构造器(枚举构造器必须私有,且要给变量赋值)
+ DoctorPhraseBizTypeEnum(String code, String name) {
+ this.code = code;
+ this.name = name;
+ }
+
+ // 4. 提供getter方法(枚举没有setter,因为枚举项是常量,不能改)
+ public String getCode() {
+ return code;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ // 【可选】添加工具方法:根据code找对应的枚举(前端传code时,后端快速匹配)
+ public static DoctorPhraseBizTypeEnum getByCode(String code) {
+ for (DoctorPhraseBizTypeEnum enumObj : values()) {
+ if (enumObj.getCode().equals(code)) {
+ return enumObj;
+ }
+ }
+ return null; // 或抛异常:throw new IllegalArgumentException("无效的业务分类编码:" + code);
+ }
+}
\ No newline at end of file
diff --git a/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue b/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue
index 41fb025d..cea611dd 100644
--- a/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue
+++ b/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue
@@ -7,65 +7,46 @@
-
- 查询
- 重置
- 增加
+
+
+
+ 查询
+
+
+ 重置
+
+
+ 增加
-
+
{{ scope.row.sortNo }}
-
+
{{ scope.row.phraseName }}
-
+
{{ scope.row.phraseContent }}
-
+
@@ -73,21 +54,13 @@
{{ getScopeName(scope.row.phraseType) }}
+
-
-
-
+
+
{{ getBusinessTypeName(scope.row.phraseCategory) }}
@@ -96,37 +69,23 @@
-
- 保存
+
+
+
+ 保存
-
- 取消
+
+
+
+ 取消
-
+
编辑
-
+
删除
@@ -136,54 +95,34 @@
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
+
-
-
-
-
+
-
+
@@ -202,8 +141,8 @@