fix(consultation): 解决会诊流程中的多个功能问题

- 在 deptappthoursManage.js 中添加 status 参数以仅获取已启动的机构
- 为 consultationapplication 组件添加已确认和已签名状态选项
- 扩展操作列宽度并添加打印功能按钮
- 优化 handlePrint 方法以支持行参数和性别枚举转换
- 为 consultationconfirmation 组件添加必填验证和编辑权限控制
- 修复会诊确认医师信息回显逻辑
- 在 inspectionApplication 组件中修复表格行点击事件和检验项目加载
- 禁用非紧急标记的编辑权限以解决Bug #268
- 为 surgeryApplication 组件添加响应码验证和错误处理
- 在 consultation 组件中添加表单验证清除功能
- 为 PackageManagement 组件实现动态机构选项加载
- 重构 PackageSettings 组件的套餐金额显示和只读模式
- 为检查项目设置组件添加套餐筛选和下级类型选择功能
- 实现检验套餐的编辑和查看模式切换功能
This commit is contained in:
2026-03-26 18:22:21 +08:00
parent c509a804ec
commit 91a0b48662
20 changed files with 631 additions and 266 deletions

View File

@@ -1,5 +1,6 @@
package com.openhis.web.clinicalmanage.appservice.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
@@ -7,6 +8,8 @@ import com.core.common.core.domain.model.LoginUser;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Patient;
import com.openhis.administration.service.IPatientService;
import com.openhis.clinical.domain.Surgery;
import com.openhis.clinical.service.ISurgeryService;
import com.openhis.surgicalschedule.domain.OpSchedule;
import com.openhis.surgicalschedule.service.IOpScheduleService;
import com.openhis.web.clinicalmanage.appservice.ISurgicalScheduleAppService;
@@ -47,6 +50,9 @@ public class SurgicalScheduleAppServiceImpl implements ISurgicalScheduleAppServi
@Resource
private SurgicalScheduleAppMapper surgicalScheduleAppMapper;
@Resource
private ISurgeryService surgeryService;
@Resource
private RequestFormManageAppMapper requestFormManageAppMapper;
@@ -183,12 +189,30 @@ public class SurgicalScheduleAppServiceImpl implements ISurgicalScheduleAppServi
// 保存手术安排
boolean saved = opScheduleService.save(opSchedule);
//修改申请单状态为已排期
if (!saved) {
return R.fail("新增手术安排失败");
}
// Bug #247 修复:更新手术申请单状态为已排期 (1)
if (opCreateScheduleDto.getApplyId() != null) {
try {
// 通过手术单号查找手术申请记录并更新状态
LambdaQueryWrapper<com.openhis.clinical.domain.Surgery> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(com.openhis.clinical.domain.Surgery::getSurgeryNo, opSchedule.getOperCode())
.eq(com.openhis.clinical.domain.Surgery::getDeleteFlag, "0");
com.openhis.clinical.domain.Surgery surgery = surgeryService.getOne(queryWrapper);
if (surgery != null) {
surgery.setStatusEnum(1); // 1 = 已排期
surgery.setUpdateTime(new Date());
surgeryService.updateById(surgery);
log.info("更新手术申请单状态为已排期 - surgeryNo: {}, surgeryId: {}", opSchedule.getOperCode(), surgery.getId());
}
} catch (Exception e) {
log.error("更新手术申请单状态失败 - operCode: {}", opSchedule.getOperCode(), e);
// 状态更新失败不影响主流程,只记录日志
}
}
return R.ok("新增手术安排成功");
}