10 Commits

Author SHA1 Message Date
关羽
e5d949a740 Fix Bug #486: [住院医生工作站-临床医嘱] 医嘱检索框不支持全局模糊搜索,未选"医嘱类型"时检索结果为空
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:02:35 +08:00
赵云
6451c308c2 Fix Bug #498: 【住院医生工作站-检查申请】检查申请列表操作项过于单一,缺失修改/作废/打印/看报告等核心临床操作
- 根据申请单状态动态展示操作按钮(详情/修改/删除/撤回/打印/看报告)
- 待签发状态:显示修改、删除按钮
- 已签发状态:显示撤回按钮
- 已校对/待接收状态:显示打印按钮
- 已接收/已检查/已出报告状态:显示打印、看报告按钮
- 新增修改申请单弹窗和报告查看弹窗
- 新增删除、撤回申请单 API 调用

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 14:23:32 +08:00
关羽
772ec5537c Fix Bug #504: 【住院医生工作站-临床医嘱】护士退回药品医嘱后,医生修改并保存时提示"未匹配到库存信息"
根因分析:
1. SQL查询 getRegRequestBaseInfo 未返回 medication_id/adviceDefinitionId 字段,
   退回医嘱的 adviceDefinitionId 为 null,导致库存校验查询无法匹配到库存记录
2. 退回医嘱可能缺少 locationId,严格的 locationId 匹配导致校验失败

修复方案:
1. AdviceManageAppMapper.xml:在三个UNION查询中分别添加 medication_id/device_def_id/activity_id AS advice_definition_id
2. AdviceUtils.checkInventory():
   - 过滤 null adviceDefinitionId,避免SQL查询异常
   - 所有adviceDefinitionId为null时跳过库存校验
   - 退回医嘱单个adviceDefinitionId为null时跳过该校验项
   - 添加 locationId 容错匹配(为null时跳过location匹配)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 12:28:19 +08:00
赵云
af6494c806 Fix Bug #508: [住院护士站-住院记账-补费] 点击"划价组套"按钮无任何响应,无法选择组套项目
划价组套选择对话框嵌套在补费弹窗内部,缺少 append-to-body 属性导致
Dialog 被渲染在外层弹窗 DOM 内,z-index 层级被遮挡而不可见。
添加 append-to-body 使其挂载到 body 下,确保正常显示。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:48:31 +08:00
荀彧
2901dafe10 Fix Bug #507: [住院护士站-住院记账-补费] 项目单位未获取、执行科室显示内码且缺乏默认/模糊搜索逻辑
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:22:27 +08:00
华佗
ffc2562aea Fix Bug #505: 【业务逻辑缺陷】药品医嘱已由药房发药,护士仍能在"医嘱校对"模块执行"退回"操作
前后端双重校验防止已发药医嘱被退回:
1. 后端 InpatientAdviceDto 新增 dispenseStatus 字段,Mapper SQL LEFT JOIN med_medication_dispense 获取发药状态
2. 后端 adviceReject 方法增加前置校验,已发药(COMPLETED)的医嘱直接拒绝退回
3. 前端 prescriptionList.vue handleCancel 方法增加 dispenseStatus 校验,已发药医嘱点击退回时弹窗提示
2026-05-10 11:17:35 +08:00
赵云
5da537f863 Fix Bug #501: 【住院护士站-医嘱执行】医嘱执行页面点击“取消执行”报错 2026-05-10 11:13:25 +08:00
赵云
facbe7cd44 Fix Bug #501: 【住院护士站-医嘱执行】医嘱执行页面点击"取消执行"报错
取消执行时 procedureIds 数组可能为空导致后端 SQL 异常,改为从
exePerformRecordList 直接提取 procedureId,并增加空数据校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:11:45 +08:00
赵云
283d25642a Fix Bug #500: 【门诊医生站】检查申请右侧"检查项目分类"切换时,界面出现明显抖动/闪烁
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:11:45 +08:00
关羽
7b17a66214 Fix Bug #503: 【住院发退药】发药明细与发药汇总单数据触发时机不一致,存在业务脱节风险
在 selectEncounterInfoListPage 和 selectMedicineDispenseOrderPage 两个查询中增加
summary_no IS NOT NULL 过滤条件,使发药明细单仅在护士执行"汇总发药申请"后才显示记录,
与发药汇总单保持一致的触发时机。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:07:21 +08:00
4 changed files with 27 additions and 16 deletions

View File

@@ -83,9 +83,14 @@ public class AdviceUtils {
* @return 提示信息
*/
public String checkInventory(List<AdviceSaveDto> adviceSaveList) {
// 医嘱定义ID集合
// 医嘱定义ID集合过滤null值避免SQL查询异常
List<Long> adviceDefinitionIdList
= adviceSaveList.stream().map(AdviceSaveDto::getAdviceDefinitionId).collect(Collectors.toList());
= adviceSaveList.stream().map(AdviceSaveDto::getAdviceDefinitionId)
.filter(id -> id != null).collect(Collectors.toList());
// 🔧 Bug #504 修复如果所有adviceDefinitionId都为null跳过库存校验
if (adviceDefinitionIdList.isEmpty()) {
return null;
}
// 医嘱库存集合
List<AdviceInventoryDto> adviceInventoryList
= doctorStationAdviceAppMapper.getAdviceInventory(null, adviceDefinitionIdList,
@@ -99,6 +104,10 @@ public class AdviceUtils {
= this.subtractInventory(adviceInventoryList, adviceDraftInventoryList);
// 检查库存
for (AdviceSaveDto saveDto : adviceSaveList) {
// 🔧 Bug #504 修复退回医嘱可能adviceDefinitionId为空跳过校验
if (saveDto.getAdviceDefinitionId() == null) {
continue;
}
boolean matched = false;
for (AdviceInventoryDto inventoryDto : adviceInventory) {
// 匹配条件adviceDefinitionId, adviceTableName, locationId, lotNumber 同时相等
@@ -108,10 +117,12 @@ public class AdviceUtils {
|| saveDto.getLotNumber().equals(inventoryDto.getLotNumber());
boolean tableNameMatch = StringUtils.isEmpty(saveDto.getAdviceTableName())
|| inventoryDto.getItemTable().equals(saveDto.getAdviceTableName());
// if (saveDto.)
// 🔧 Bug #504 修复退回医嘱可能locationId为空跳过location匹配
boolean locationMatch = saveDto.getLocationId() == null
|| inventoryDto.getLocationId().equals(saveDto.getLocationId());
if (inventoryDto.getItemId().equals(saveDto.getAdviceDefinitionId())
&& tableNameMatch
&& inventoryDto.getLocationId().equals(saveDto.getLocationId()) && lotNumberMatch) {
&& locationMatch && lotNumberMatch) {
matched = true;
// 检查库存是否充足
BigDecimal minUnitQuantity = saveDto.getMinUnitQuantity();

View File

@@ -216,7 +216,8 @@
ccd.name AS condition_definition_name,
T1.therapy_enum AS therapyEnum,
T1.sort_number AS sort_number,
T1.based_on_id AS based_on_id
T1.based_on_id AS based_on_id,
T1.medication_id AS advice_definition_id
FROM med_medication_request AS T1
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id
AND T2.delete_flag = '0'
@@ -268,7 +269,8 @@
'' AS condition_definition_name,
2 AS therapyEnum,
99 AS sort_number,
T1.based_on_id AS based_on_id
T1.based_on_id AS based_on_id,
T1.device_def_id AS advice_definition_id
FROM wor_device_request AS T1
LEFT JOIN adm_device_definition AS T2 ON T2.ID = T1.device_def_id
AND T2.delete_flag = '0'
@@ -317,7 +319,8 @@
'' AS condition_definition_name,
COALESCE(T1.therapy_enum, 2) AS therapyEnum,
99 AS sort_number,
T1.based_on_id AS based_on_id
T1.based_on_id AS based_on_id,
T1.activity_id AS advice_definition_id
FROM wor_service_request AS T1
LEFT JOIN wor_activity_definition AS T2
ON T2.ID = T1.activity_id

View File

@@ -195,9 +195,8 @@ const recursionFun = (targetDepartment) => {
name = obj.name;
}
const subObjArray = obj['children'];
if (!subObjArray) continue;
for (let i = 0; i < subObjArray.length; i++) {
const item = subObjArray[i];
for (let index = 0; index < subObjArray.length; index++) {
const item = subObjArray[index];
if (item.id == targetDepartment) {
name = item.name;
}

View File

@@ -879,14 +879,12 @@ function handleDiagnosisChange(item) {
function handleFocus(row, index) {
rowIndex.value = index;
row.showPopover = true;
// el-popover 懒渲染,需要等两帧组件才会挂载
const adviceType = row.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
// 用 adviceType + categoryCode 组合查找匹配的选项
const selectValue = (adviceType == 1 && row.categoryCode) ? '1-' + row.categoryCode : adviceType;
const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType);
// 诊疗(3)和手术(6)没有categoryCode传空字符串给refresh由子组件转为undefined不发送
// 药品(1)才有categoryCode如'1'=中成药,'2'=西药,'4'=中草药)
const categoryCode = selectedItem ? selectedItem.categoryCode : (adviceQueryParams.value.categoryCode || '');
// 修复Bug #486当行没有显式选择医嘱类型时不传categoryCode让搜索在全药库中进行
const categoryCode = selectedItem ? selectedItem.categoryCode : (row.adviceType !== undefined ? (adviceQueryParams.value.categoryCode || '') : '');
const searchKey = row.adviceName || '';
nextTick(() => {
@@ -923,8 +921,8 @@ function handleChange(value) {
// 用 adviceType + categoryCode 组合查找匹配的选项
const selectValue = (adviceType == 1 && row?.categoryCode) ? '1-' + row.categoryCode : adviceType;
const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType);
// 诊疗/手术的categoryCode为空字符串由子组件转为undefined不发送
const categoryCode = selectedItem ? selectedItem.categoryCode : (adviceQueryParams.value.categoryCode || '');
// 修复Bug #486当行没有显式选择医嘱类型时不传categoryCode让搜索在全药库中进行
const categoryCode = selectedItem ? selectedItem.categoryCode : (row?.adviceType !== undefined ? (adviceQueryParams.value.categoryCode || '') : '');
tableRef.refresh(adviceType, categoryCode, value);
}
}