feat(menu): 优化菜单路径唯一性校验并更新前端界面
- 在SysLoginController中添加optionMap数据返回 - 添加JSQLParser依赖支持MyBatis Plus功能 - 实现selectMenuByPathExcludeId方法用于排除当前菜单的路径唯一性校验 - 在SysMenuServiceImpl中添加日志记录并优化路径唯一性判断逻辑 - 在SysMenuMapper.xml中添加LIMIT 1限制并实现排除ID查询 - 在前端路由中注释患者管理相关路由配置 - 在用户store中添加optionMap配置项并优先从optionMap获取医院名称 - 重构检查项目设置页面的操作按钮样式为统一的圆形按钮设计 - 更新检查项目设置页面的导航栏样式和交互体验 - 优化门诊记录页面的搜索条件和表格展示功能 - 添加性别和状态筛选条件并改进数据加载逻辑
This commit is contained in:
113
迁移记录-DB变更记录/门诊记录接口404排查指南.md
Normal file
113
迁移记录-DB变更记录/门诊记录接口404排查指南.md
Normal file
@@ -0,0 +1,113 @@
|
||||
# 门诊记录接口404问题排查指南
|
||||
|
||||
## 问题描述
|
||||
门诊记录页面报404错误,路径:`/openhis/patient-manage/records/outpatient-record-page`
|
||||
|
||||
## 修改内容
|
||||
|
||||
已创建 `OutpatientRecordController.java`:
|
||||
- 位置:`openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java`
|
||||
- 请求路径:`/patient-manage/records`
|
||||
|
||||
## 排查步骤
|
||||
|
||||
### 1. 清理并重新编译后端项目
|
||||
|
||||
在命令行执行:
|
||||
```bash
|
||||
cd e:\his\openhis-server-new
|
||||
mvn clean install -DskipTests
|
||||
```
|
||||
|
||||
或者在 IDE 中:
|
||||
1. 点击 Maven 中的 `clean` 命令
|
||||
2. 等待清理完成
|
||||
3. 点击 `install` 或 `compile` 命令
|
||||
|
||||
### 2. 停止并重启后端服务
|
||||
|
||||
**重要:必须完全停止当前运行的后端服务,然后重新启动**
|
||||
|
||||
如果使用 IDE 运行:
|
||||
1. 停止当前运行的 Spring Boot 应用
|
||||
2. 重新运行 `OpenHisApplication.main()`
|
||||
|
||||
如果使用命令行运行:
|
||||
```bash
|
||||
# 停止当前服务 (Ctrl+C)
|
||||
cd e:\his\openhis-server-new\openhis-application
|
||||
mvn spring-boot:run
|
||||
```
|
||||
|
||||
### 3. 验证Controller是否被加载
|
||||
|
||||
访问测试接口:
|
||||
```
|
||||
http://localhost:18080/openhis/patient-manage/records/test
|
||||
```
|
||||
|
||||
如果返回:
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "操作成功",
|
||||
"data": "OutpatientRecordController 工作正常"
|
||||
}
|
||||
```
|
||||
|
||||
说明 Controller 已成功加载。
|
||||
|
||||
### 4. 检查后端启动日志
|
||||
|
||||
查看启动日志中是否有类似以下内容:
|
||||
```
|
||||
Mapped "{[/patient-manage/records/test]}" onto ...
|
||||
Mapped "{[/patient-manage/records/init]}" onto ...
|
||||
Mapped "{[/patient-manage/records/outpatient-record-page]}" onto ...
|
||||
Mapped "{[/patient-manage/records/doctor-names]}" onto ...
|
||||
```
|
||||
|
||||
如果没有这些映射日志,说明 Controller 没有被扫描到。
|
||||
|
||||
### 5. 检查包扫描配置
|
||||
|
||||
确认 `OpenHisApplication.java` 中:
|
||||
```java
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class},
|
||||
scanBasePackages = {"com.core", "com.openhis"})
|
||||
```
|
||||
|
||||
这会扫描 `com.openhis` 包及其子包,包括:
|
||||
- `com.openhis.web.patientmanage.controller`
|
||||
|
||||
### 6. 检查编译输出
|
||||
|
||||
确认编译后的 class 文件存在于:
|
||||
```
|
||||
e:\his\openhis-server-new\openhis-application\target\classes\com\openhis\web\patientmanage\controller\OutpatientRecordController.class
|
||||
```
|
||||
|
||||
如果不存在,说明编译有问题。
|
||||
|
||||
## 常见问题
|
||||
|
||||
### Q: 重启后还是404
|
||||
**A:** 确保完全停止了旧的进程。使用任务管理器检查是否有 `java.exe` 进程在运行,如果有则全部结束。
|
||||
|
||||
### Q: 编译成功但接口不工作
|
||||
**A:** 检查是否访问的是正确的端口和路径:
|
||||
- 端口:18080
|
||||
- 路径:/openhis/patient-manage/records/outpatient-record-page
|
||||
|
||||
### Q: 日志中没有映射信息
|
||||
**A:** 可能是注解使用错误。已修正为:
|
||||
- `@RequiredArgsConstructor` 替代 `@AllArgsConstructor`
|
||||
- `private final` 字段直接注入
|
||||
|
||||
## 验证步骤
|
||||
|
||||
1. 访问:`http://localhost:18080/openhis/patient-manage/records/test`
|
||||
2. 访问:`http://localhost:18080/openhis/patient-manage/records/doctor-names`
|
||||
3. 访问:`http://localhost:18080/openhis/patient-manage/records/outpatient-record-page`
|
||||
|
||||
如果都能正常返回,刷新前端页面即可。
|
||||
Reference in New Issue
Block a user