2 Commits

Author SHA1 Message Date
76c324b0df feat(organization): 添加科室管理查询过滤功能
- 修复api.js中params参数拼写错误
- 添加科室名称、类型、分类的查询表单
- 实现搜索和重置功能
- 集成分页组件并修正页码参数映射
- 在后端服务中添加查询条件过滤逻辑
- 支持按科室名称、类型、分类进行条件查询
- 实现动态排序功能并修复分页查询逻辑
2025-12-30 17:01:37 +08:00
a65e8dd2cc feat(organization): 添加科室管理查询过滤功能
- 修复api.js中params参数拼写错误
- 添加科室名称、类型、分类的查询表单
- 实现搜索和重置功能
- 集成分页组件并修正页码参数映射
- 在后端服务中添加查询条件过滤逻辑
- 支持按科室名称、类型、分类进行条件查询
- 实现动态排序功能并修复分页查询逻辑
2025-12-30 17:01:34 +08:00
2 changed files with 2 additions and 12 deletions

View File

@@ -58,18 +58,6 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
// 创建Page对象
Page<Organization> page = new Page<>(pageNo, pageSize);
// 处理动态排序(仅当排序字段有效时才添加排序条件)
if (sortField != null && !sortField.isEmpty()) {
// 校验排序字段是否为Organization实体中的有效字段防止非法字段
if (isValidField(Organization.class, sortField)) {
// 驼峰转下划线处理
String underlineField = camelToUnderline(sortField);
// 默认为升序若指定desc则按降序
boolean isAsc = sortOrder == null || "asc".equalsIgnoreCase(sortOrder);
queryWrapper.last("ORDER BY " + underlineField + " " + (isAsc ? "ASC" : "DESC"));
}
}
// 执行分页查询
page = organizationService.page(page, queryWrapper);

View File

@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.ToString;
import java.util.ArrayList;
import java.util.List;
@@ -57,6 +58,7 @@ public class OrganizationDto {
private Integer displayOrder;
/** 子集合 */
@ToString.Exclude
private List<OrganizationDto> children = new ArrayList<>();
/** 挂号科室标记 */