diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java index 5fbd84ed..4579fd36 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java @@ -272,7 +272,13 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra if (statusEnumParam != null && !statusEnumParam.isEmpty()) { try { Integer statusEnum = Integer.parseInt(statusEnumParam); - queryWrapper.eq("status_enum", statusEnum); + if (statusEnum == -1) { + // -1 表示排除退号记录(正常挂号) + queryWrapper.ne("status_enum", 6); + } else { + // 其他值表示精确匹配 + queryWrapper.eq("status_enum", statusEnum); + } } catch (NumberFormatException e) { // 忽略无效的参数值 } diff --git a/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue b/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue index 2e018b02..ef940879 100644 --- a/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue +++ b/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue @@ -1156,8 +1156,7 @@ function handleQueryTypeChange() { queryParams.value.statusEnum = 6; } else if (queryType.value === 'normal') { // 查询正常挂号(排除退号状态) - queryParams.value.statusEnum = undefined; // 或者设置为非6的状态 - // 如果需要排除退号,可以在后端处理,这里先不设置 + queryParams.value.statusEnum = -1; // 使用特殊值表示排除退号记录 } else { // 查询全部 queryParams.value.statusEnum = undefined; @@ -1174,8 +1173,8 @@ function handleQuery() { if (queryType.value === 'returned') { queryParams.value.statusEnum = 6; // 退号状态 } else if (queryType.value === 'normal') { - // 正常挂号,不设置statusEnum或排除6 - queryParams.value.statusEnum = undefined; + // 正常挂号,排除退号记录 + queryParams.value.statusEnum = -1; // 使用特殊值表示排除退号记录 } else { // 全部 queryParams.value.statusEnum = undefined;