Compare commits

..

16 Commits

Author SHA1 Message Date
3310a1de9e Fix Bug #559: 组套添加医嘱后新增医嘱置顶 — 根因:handleSaveGroup 只做了 unshift 但未显式排序,导致已有 requestTime 的旧数据与无 requestTime 的新数据混排时顺序不稳定;修复:unshift 后增加按 requestTime 降序排序,确保无 requestTime 的新增组套医嘱始终显示在列表最上方
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 12:06:26 +08:00
bbeddc3077 Fix Bug #559: 根因+修复方案摘要 2026-05-20 11:07:08 +08:00
Ranyunqiao
3f4ada958c bug 555 558 2026-05-20 11:07:08 +08:00
377bd55c03 Fix Bug #559: 根因+修复方案摘要 2026-05-20 11:02:27 +08:00
30526ee4fc Fix Bug #547: 执行科室配置保存时时间冲突检测范围错误 — 根因:addOrEditOrgLoc 方法使用 getOrgLocListByActivityDefinitionId 跨科室查询同一诊疗的所有配置,导致不同科室间的正常时间重叠被误判为冲突;修复:改为 getOrgLocListByOrgIdAndActivityDefinitionId(orgId, activityDefId) 限定同科室范围;同时优化软删除科室处理,当冲突记录关联的科室已被删除时,使用"科室[ID]已删除"替代静默跳过
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 11:02:27 +08:00
fa0cd2b41d Fix Bug #559: 住院医生站-临床医嘱 组套功能添加医嘱后新增医嘱置顶显示
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 10:15:25 +08:00
1f7aed4a8e Fix Bug #556: 就诊卡号改用busNo映射、执行时间默认当前时间、套餐标识增加packageName联合判断
根因:
1. medicalrecordNumber 绑定到 identifierNo(身份证号)而非 busNo(就诊卡号),导致字段为空
2. executeTime 初始化为 null 且未在 initData/resetForm 中设置默认值
3. loadApplicationToForm 中 isPackage 判断仅用 feePackageId != null,缺少 packageName 联合判断,
   导致 feePackageId 非空但非套餐的项目被误标为"套餐"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 10:10:12 +08:00
9f0e69177c Fix Bug #557: 根因+修复方案摘要 2026-05-20 10:10:12 +08:00
wangjian963
e5b85c733d 549【住院医生站-临床医嘱-检验】打开“检验申请单”弹窗获取项目列表响应极其缓慢
546 【患者管理】-【患者列表】-【新增患者】,新增患者,保存成功,但没有数据
536 [门诊手术安排]“手术申请查询”弹窗底部,分页组件与界底部元素重叠,影响操作。
2026-05-20 10:10:12 +08:00
75970f07b1 Fix Bug #557: ApplicationConfig 全局 Jackson LocalDateTime 反序列化器缺失 — 根因:JavaTimeModule 仅注册了 LocalDateTimeSerializer,未注册 LocalDateTimeDeserializer,导致默认反序列化器期望 ISO-8601 格式(T 分隔符),与前端 el-date-picker 空格分隔格式(YYYY-MM-DD HH:mm:ss)不匹配;修复:新增 LocalDateTimeDeserializer(pattern="yyyy-MM-dd HH:mm:ss")
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:42:13 +08:00
103121d832 Fix Bug #556: 根因+修复方案摘要 2026-05-20 09:42:13 +08:00
c39f0175bb Merge branch 'zhaoyun' of http://192.168.110.253:3000/wangyizhe/his into zhaoyun
# Conflicts:
#	openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java
2026-05-20 09:40:03 +08:00
1767710754 Fix Bug #556: 根因+修复方案摘要
根因:
1. 就诊卡号字段映射错误:三处 (initData/resetForm/handleSave) 使用 identifierNo(身份证号)
   而非 visitNo/busNo(就诊卡号),参照 examinationApplication.vue 第1167行注释确认
2. 执行时间未设置默认值:initData 和 resetForm 中 executeTime 初始化为 null
3. 套餐判断条件过松:loadApplicationToForm 中 feePackageId != null 即判定为套餐,
   普通项目因 feePackageId 有值被误标

修复:
1. 三处 medicalrecordNumber 改为 props.patientInfo.visitNo || props.patientInfo.busNo
2. initData 和 resetForm 中 executeTime 默认填充 formatDateTime(new Date())
3. isPackage 增加 packageName 联合判断,与 loadCategoryItems 逻辑一致

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:39:11 +08:00
ca8b547062 Fix Bug #557: 根因+修复方案摘要
根因:OpSchedule.java 中 6 个时间字段的 @JsonFormat 使用 ISO 格式
(yyyy-MM-dd'T'HH:mm:ss),而前端 el-date-picker 通过 value-format 发送的
是空格分隔格式 (yyyy-MM-dd HH:mm:ss),导致编辑手术安排时 Jackson 反序列化
失败,抛出日期格式解析错误。

修复:将 admissionTime、entryTime、startTime、endTime、anesStart、anesEnd
共6个字段 @JsonFormat 格式从 'T' 分隔改为空格分隔,与 OpCreateScheduleDto
及前端 value-format 保持一致。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:35:28 +08:00
7fa4871977 Fix Bug #556: 修复结果记录
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:25:04 +08:00
a7b09a0248 Fix Bug #556: 就诊卡号/执行时间自动回显 + 去除冗余"套餐"文字
- 执行时间默认填充: initData() 和 resetForm() 中设置 executeTime = formatDateTime(new Date())
- isPackage判定统一: loadApplicationToForm() 中的 isPackage 判断与 loadCategoryItems() 保持一致

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:24:42 +08:00
21 changed files with 244 additions and 346 deletions

View File

@@ -25,3 +25,11 @@
1. `initData()`: Add `formData.executeTime = formatDateTime(new Date())` after line 899
2. `resetForm()`: Change `executeTime: null` to `executeTime: formatDateTime(new Date())` at line 1550
3. `loadApplicationToForm()`: Fix `isPackage` logic at line 2000
修复结果:✅ 成功5行改动
### 修改内容
1. `initData()` (line ~898): 新增 `formData.executeTime = formatDateTime(new Date())` — 新增检验申请单时执行时间自动填充当前时间
2. `resetForm()` (line ~1552): `executeTime: null``executeTime: formatDateTime(new Date())` — 重置表单/新增时执行时间默认当前时间
3. `loadApplicationToForm()` (line ~2002): `isPackage` 判定从 `item.feePackageId != null || item.itemName?.includes('套餐')` 改为 `item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName` — 与 `loadCategoryItems()` 保持一致,只有真正的套餐项目才显示"套餐"标签

36
bug556-analysis.md Normal file
View File

@@ -0,0 +1,36 @@
# Bug #556 分析报告
## Bug 描述
【门诊医生站-检验】新增检验申请单时就诊卡号/执行时间未自动回显,且项目列表冗余显示"套餐"文字
## 根因分析
### 问题1就诊卡号字段为空
**根因**`formData.medicalrecordNumber` 绑定到前端"就诊卡号"字段,但数据来源映射错误。
- `initData()` 第886行`formData.medicalrecordNumber = props.patientInfo.identifierNo || ''`
- `resetForm()` 第1526行`medicalrecordNumber: props.patientInfo.identifierNo || ''`
`identifierNo` 是身份证号/标识号字段,通常为空。实际的就诊卡号/业务编号是 `props.patientInfo.busNo`。代码中 `formData.visitNo` 已经正确映射了 `busNo`,但 `medicalrecordNumber` 映射到了错误的字段。
### 问题2执行时间未自动填充
**根因**`formData.executeTime` 初始值为 `null`第978行`initData()``resetForm()` 中均未赋予默认值。
- 对比:`applyTime``startApplyTimeTimer()` 实时更新定时器第1489行`executeTime` 没有类似初始化。
- 用户期望:新增申请单时执行时间应默认填充当前系统时间。
### 问题3项目列表冗余显示"套餐"文字
**根因**`loadApplicationToForm()` 第2000行的 `isPackage` 判断条件过于宽松。
- 第2000行`const isPackage = item.feePackageId != null || item.itemName?.includes('套餐')`
- 对比:`loadCategoryItems()` 第1190行已经做了正确修复`item.feePackageId != null && ... && item.packageName`
- 差异第2000行只用 `feePackageId != null` 判断,缺少 `packageName` 联合判断。如果后端返回的非套餐项目 `feePackageId` 有值但 `packageName` 为空,仍会被误标为套餐。
## 修复方案
### 修复1就诊卡号映射
`medicalrecordNumber` 的数据源从 `props.patientInfo.identifierNo` 改为 `props.patientInfo.busNo`
涉及位置:`initData()` 第886行、`resetForm()` 第1526行
### 修复2执行时间默认值
`initData()``resetForm()` 中,将 `executeTime` 设置为当前时间。使用 `formatDateTime(new Date())` 格式化为 `YYYY-MM-DD HH:mm:ss`
### 修复3套餐标识判断
`loadApplicationToForm()` 第2000行的 `isPackage` 判断条件与 `loadCategoryItems()` 第1190行保持一致增加 `item.packageName` 联合判断。

View File

@@ -63,21 +63,17 @@ public interface IDoctorStationEmrAppService {
* 获取待写病历列表
*
* @param doctorId 医生ID
* @param pageNo 当前页码
* @param pageSize 每页条数
* @param patientName 患者姓名(可选)
* @return 待写病历分页数据
* @return 待写病历列表
*/
R<?> getPendingEmrList(Long doctorId, Integer pageNo, Integer pageSize, String patientName);
R<?> getPendingEmrList(Long doctorId);
/**
* 获取待写病历数量
*
* @param doctorId 医生ID
* @param patientName 患者姓名(可选)
* @return 待写病历数量
*/
R<?> getPendingEmrCount(Long doctorId, String patientName);
R<?> getPendingEmrCount(Long doctorId);
/**
* 检查患者是否需要写病历

View File

@@ -2205,10 +2205,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
// 收费状态
requestBaseDto.setChargeStatus_enumText(
EnumUtils.getInfoByValue(ChargeItemStatus.class, requestBaseDto.getChargeStatus()));
// 单位字典翻译失败时回退使用原始值(如手术申请硬编码了中文单位名)
if (StringUtils.isNotBlank(requestBaseDto.getUnitCode()) && StringUtils.isBlank(requestBaseDto.getUnitCode_dictText())) {
requestBaseDto.setUnitCode_dictText(requestBaseDto.getUnitCode());
}
}
return R.ok(requestBaseInfo);
}

View File

@@ -29,7 +29,6 @@ import com.openhis.document.service.IEmrTemplateService;
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
import com.openhis.web.doctorstation.dto.EmrTemplateDto;
import com.openhis.web.doctorstation.dto.PatientEmrDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -42,7 +41,6 @@ import java.util.stream.Collectors;
/**
* 医生站-电子病历 应用实现类
*/
@Slf4j
@Service
public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppService {
@@ -62,7 +60,13 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
IDocRecordService docRecordService;
@Resource
private com.openhis.web.doctorstation.mapper.DoctorStationEmrAppMapper doctorStationEmrAppMapper;
private EncounterMapper encounterMapper;
@Resource
private PatientMapper patientMapper;
@Resource
private com.openhis.administration.mapper.EncounterParticipantMapper encounterParticipantMapper;
/**
* 添加病人病历信息
@@ -219,35 +223,52 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
* @return 待写病历列表
*/
@Override
public R<?> getPendingEmrList(Long doctorId, Integer pageNo, Integer pageSize, String patientName) {
List<Map<String, Object>> allRows = doctorStationEmrAppMapper.getPendingEmrList(doctorId, patientName);
int total = allRows.size();
public R<?> getPendingEmrList(Long doctorId) {
// 由于Encounter实体中没有jzPractitionerUserId字段我们需要通过关联查询来获取相关信息
// 使用医生工作站的mapper来查询相关数据
// 这里我们直接使用医生工作站的查询逻辑
// 分页截取
int fromIndex = (pageNo - 1) * pageSize;
int toIndex = Math.min(fromIndex + pageSize, total);
List<Map<String, Object>> pageRows;
if (fromIndex >= total) {
pageRows = new ArrayList<>();
} else {
pageRows = allRows.subList(fromIndex, toIndex);
// 查询当前医生负责的、状态为"就诊中"但还没有写病历的患者
// 需要通过EncounterParticipant表来关联医生信息
List<Encounter> encounters = encounterMapper.selectList(
new LambdaQueryWrapper<Encounter>()
.eq(Encounter::getStatusEnum, EncounterStatus.IN_PROGRESS.getValue())
);
// 过滤出由指定医生负责且还没有写病历的就诊记录
List<Map<String, Object>> pendingEmrs = new ArrayList<>();
for (Encounter encounter : encounters) {
// 检查该就诊记录是否已经有病历
Emr existingEmr = emrService.getOne(
new LambdaQueryWrapper<Emr>().eq(Emr::getEncounterId, encounter.getId())
);
// 检查该就诊是否由指定医生负责
boolean isAssignedToDoctor = isEncounterAssignedToDoctor(encounter.getId(), doctorId);
if (existingEmr == null && isAssignedToDoctor) {
// 如果没有病历且由该医生负责,则添加到待写病历列表
Map<String, Object> pendingEmr = new java.util.HashMap<>();
// 获取患者信息
Patient patient = patientMapper.selectById(encounter.getPatientId());
pendingEmr.put("encounterId", encounter.getId());
pendingEmr.put("patientId", encounter.getPatientId());
pendingEmr.put("patientName", patient != null ? patient.getName() : "未知");
pendingEmr.put("gender", patient != null ? patient.getGenderEnum() : null);
// 使用出生日期计算年龄
pendingEmr.put("age", patient != null && patient.getBirthDate() != null ?
calculateAge(patient.getBirthDate()) : null);
// 使用创建时间作为挂号时间
pendingEmr.put("registerTime", encounter.getCreateTime());
pendingEmr.put("busNo", encounter.getBusNo()); // 病历号
pendingEmrs.add(pendingEmr);
}
}
// 计算年龄列
for (Map<String, Object> row : pageRows) {
Object birthDate = row.get("birthDate");
if (birthDate instanceof Date) {
row.put("age", calculateAge((Date) birthDate));
} else {
row.put("age", null);
}
row.remove("birthDate");
}
Map<String, Object> result = new java.util.HashMap<>();
result.put("rows", pageRows);
result.put("total", total);
return R.ok(result);
return R.ok(pendingEmrs);
}
/**
@@ -257,9 +278,14 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
* @return 待写病历数量
*/
@Override
public R<?> getPendingEmrCount(Long doctorId, String patientName) {
Long count = doctorStationEmrAppMapper.getPendingEmrCount(doctorId, patientName);
return R.ok(count != null ? count.intValue() : 0);
public R<?> getPendingEmrCount(Long doctorId) {
// 获取待写病历列表,然后返回数量
R<?> result = getPendingEmrList(doctorId);
if (result.getCode() == 200) {
List<?> pendingEmrs = (List<?>) result.getData();
return R.ok(pendingEmrs.size());
}
return R.ok(0);
}
/**
@@ -280,6 +306,24 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
return R.ok(needWrite);
}
/**
* 检查就诊是否分配给指定医生
*
* @param encounterId 就诊ID
* @param doctorId 医生ID
* @return 是否分配给指定医生
*/
private boolean isEncounterAssignedToDoctor(Long encounterId, Long doctorId) {
// 查询就诊参与者表,检查是否有指定医生的接诊记录
com.openhis.administration.domain.EncounterParticipant participant =
encounterParticipantMapper.selectOne(
new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.openhis.administration.domain.EncounterParticipant>()
.eq(com.openhis.administration.domain.EncounterParticipant::getEncounterId, encounterId)
.eq(com.openhis.administration.domain.EncounterParticipant::getPractitionerId, doctorId)
);
return participant != null;
}
/**
* 根据出生日期计算年龄

View File

@@ -26,36 +26,34 @@ public class PendingEmrController {
* 获取待写病历列表
*
* @param doctorId 医生ID
* @param pageNo 当前页码
* @param pageSize 每页条数
* @param patientName 患者姓名(可选)
* @return 待写病历分页数据
* @return 待写病历列表
*/
@GetMapping("/pending-list")
public R<?> getPendingEmrList(@RequestParam(required = false) Long doctorId,
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String patientName) {
public R<?> getPendingEmrList(@RequestParam(required = false) Long doctorId) {
// 如果没有传递医生ID则使用当前登录用户ID
if (doctorId == null) {
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId();
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId();
}
return iDoctorStationEmrAppService.getPendingEmrList(doctorId, pageNum, pageSize, patientName);
// 调用服务获取待写病历列表
return iDoctorStationEmrAppService.getPendingEmrList(doctorId);
}
/**
* 获取待写病历数量
*
* @param doctorId 医生ID
* @param patientName 患者姓名(可选)
* @return 待写病历数量
*/
@GetMapping("/pending-count")
public R<?> getPendingEmrCount(@RequestParam(required = false) Long doctorId,
@RequestParam(required = false) String patientName) {
public R<?> getPendingEmrCount(@RequestParam(required = false) Long doctorId) {
// 如果没有传递医生ID则使用当前登录用户ID
if (doctorId == null) {
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId();
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId();
}
return iDoctorStationEmrAppService.getPendingEmrCount(doctorId, patientName);
// 调用服务获取待写病历数量
return iDoctorStationEmrAppService.getPendingEmrCount(doctorId);
}
/**

View File

@@ -1,20 +1,11 @@
package com.openhis.web.doctorstation.mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 医生站-电子病历 应用Mapper
*/
@Repository
public interface DoctorStationEmrAppMapper {
List<Map<String, Object>> getPendingEmrList(@Param("doctorId") Long doctorId,
@Param("patientName") String patientName);
Long getPendingEmrCount(@Param("doctorId") Long doctorId,
@Param("patientName") String patientName);
}

View File

@@ -359,24 +359,6 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
medRequestList.add(item);
}
}
// 校验医嘱是否已执行,已执行的医嘱需要先取消执行后才能退回
List<Long> allRequestIds = performInfoList.stream().map(PerformInfoDto::getRequestId).toList();
List<Procedure> allProcedures = procedureService.list(
new LambdaQueryWrapper<Procedure>()
.in(Procedure::getRequestId, allRequestIds)
.eq(Procedure::getDeleteFlag, "0"));
Set<Long> executedIds = allProcedures.stream()
.filter(p -> EventStatus.COMPLETED.getValue().equals(p.getStatusEnum()))
.map(Procedure::getId)
.collect(Collectors.toSet());
Set<Long> cancelledRefundIds = allProcedures.stream()
.filter(p -> EventStatus.CANCEL.getValue().equals(p.getStatusEnum()) && p.getRefundId() != null)
.map(Procedure::getRefundId)
.collect(Collectors.toSet());
executedIds.removeAll(cancelledRefundIds);
if (!executedIds.isEmpty()) {
return R.fail("该医嘱已执行,请先取消执行后再退回");
}
// 校验药品医嘱是否已发药,已发药的医嘱不允许退回
if (!medRequestList.isEmpty()) {
List<Long> medReqIds = medRequestList.stream().map(PerformInfoDto::getRequestId).toList();

View File

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.enums.DelFlag;
import com.core.common.exception.ServiceException;
import com.core.common.utils.AssignSeqUtil;
import com.core.common.utils.MessageUtils;
@@ -18,8 +17,6 @@ import com.openhis.common.constant.PromptMsgConstant;
import com.openhis.common.enums.*;
import com.openhis.document.domain.RequestForm;
import com.openhis.document.service.IRequestFormService;
import com.openhis.lab.domain.Specimen;
import com.openhis.lab.service.ISpecimenService;
import com.openhis.web.doctorstation.dto.ActivityChildrenJsonParams;
import com.openhis.web.doctorstation.utils.AdviceUtils;
import com.openhis.web.regdoctorstation.appservice.IRequestFormManageAppService;
@@ -70,39 +67,6 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
@Resource
IActivityDefinitionService iActivityDefinitionService;
@Resource
ISpecimenService iSpecimenService;
/**
* 校验当前用户是否有权操作该申请单(申请者本人或管理员)
*/
private R<?> validateRequestFormPermission(RequestForm requestForm) {
if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
return null;
}
Long currentPractitionerId = SecurityUtils.getLoginUser().getPractitionerId();
Long requesterId = requestForm.getRequesterId();
if (currentPractitionerId == null || requesterId == null
|| !currentPractitionerId.equals(requesterId)) {
return R.fail("无操作权限,仅申请开立者或管理员可操作");
}
return null;
}
/**
* 校验关联医嘱是否已采证(存在已采集/已接收标本则不可撤回)
*/
private boolean hasCollectedSpecimen(List<Long> serviceRequestIds) {
if (serviceRequestIds == null || serviceRequestIds.isEmpty()) {
return false;
}
long count = iSpecimenService.count(
new LambdaQueryWrapper<Specimen>()
.in(Specimen::getServiceId, serviceRequestIds)
.ge(Specimen::getCollectionStatusEnum, SpecCollectStatus.COLLECTED.getValue()));
return count > 0;
}
/**
* 保存申请单
*
@@ -564,17 +528,12 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
if (requestForm == null) {
return R.fail("申请单不存在");
}
R<?> permissionResult = validateRequestFormPermission(requestForm);
if (permissionResult != null) {
return permissionResult;
}
String prescriptionNo = requestForm.getPrescriptionNo();
// 查询该申请单下所有 ServiceRequest含子项
List<ServiceRequest> serviceRequests = iServiceRequestService.list(
new LambdaQueryWrapper<ServiceRequest>()
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo)
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo));
if (serviceRequests == null || serviceRequests.isEmpty()) {
return R.fail("未找到关联的诊疗医嘱");
}
@@ -604,7 +563,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
// 4. 删除申请单
iRequestFormService.removeById(requestFormId);
log.info("申请单删除成功requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
log.info("申请单删除成功requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
return R.ok("删除成功");
}
@@ -617,43 +576,32 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
if (requestForm == null) {
return R.fail("申请单不存在");
}
R<?> permissionResult = validateRequestFormPermission(requestForm);
if (permissionResult != null) {
return permissionResult;
}
String prescriptionNo = requestForm.getPrescriptionNo();
// 查询该申请单下所有 ServiceRequest
List<ServiceRequest> serviceRequests = iServiceRequestService.list(
new LambdaQueryWrapper<ServiceRequest>()
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo)
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo));
if (serviceRequests == null || serviceRequests.isEmpty()) {
return R.fail("未找到关联的诊疗医嘱");
}
List<Long> serviceRequestIds = serviceRequests.stream()
.map(ServiceRequest::getId).collect(Collectors.toList());
// 校验:标本已采集则不可撤回
if (hasCollectedSpecimen(serviceRequestIds)) {
return R.fail("标本已采集,无法撤回");
}
// 校验:只有已签发(status=2)的申请单可撤回
boolean allActive = serviceRequests.stream()
.allMatch(sr -> RequestStatus.ACTIVE.getValue().equals(sr.getStatusEnum()));
if (!allActive) {
return R.fail("只有已签发且未采证的申请单可撤回");
return R.fail("只有已签发状态的申请单可撤回");
}
// 将所有 ServiceRequest 状态改回待签发,与申请单展示状态同步
// 将所有 ServiceRequest 状态改回待签发(DRAFT=0)
List<Long> serviceRequestIds = serviceRequests.stream()
.map(ServiceRequest::getId).collect(Collectors.toList());
iServiceRequestService.update(
new ServiceRequest().setStatusEnum(RequestStatus.DRAFT.getValue()),
new LambdaUpdateWrapper<ServiceRequest>()
.in(ServiceRequest::getId, serviceRequestIds));
log.info("申请单撤回成功requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
log.info("申请单撤回成功requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
return R.ok("撤回成功");
}

View File

@@ -31,8 +31,8 @@ public class HomeController {
HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics();
// 获取待写病历数量
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(practitionerId, null);
Long userId = SecurityUtils.getLoginUser().getUserId();
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(userId);
// 将待写病历数量添加到统计数据中
statisticsDto.setPendingEmr((Integer) pendingEmrCount.getData());

View File

@@ -74,6 +74,7 @@ public class TriageQueueAppServiceImpl implements TriageQueueAppService {
.eq(TriageQueueItem::getTenantId, tenantId)
.eq(TriageQueueItem::getQueueDate, qd)
.eq(TriageQueueItem::getDeleteFlag, "0")
.ne(TriageQueueItem::getStatus, TriageQueueStatus.COMPLETED.getValue())
.orderByAsc(TriageQueueItem::getQueueOrder);
// 如果指定了科室,按科室过滤;否则查询所有科室(全科模式)
@@ -91,6 +92,14 @@ public class TriageQueueAppServiceImpl implements TriageQueueAppService {
}
});
}
// 双重保险:再次过滤掉 COMPLETED 状态的患者(防止数据库中有异常数据)
if (list != null && !list.isEmpty()) {
int beforeSize = list.size();
list = list.stream()
.filter(item -> !TriageQueueStatus.COMPLETED.getValue().equals(item.getStatus()))
.collect(java.util.stream.Collectors.toList());
}
return R.ok(list);
}

View File

@@ -4,38 +4,4 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.web.doctorstation.mapper.DoctorStationEmrAppMapper">
<select id="getPendingEmrList" resultType="java.util.HashMap">
SELECT e.id AS "encounterId",
e.patient_id AS "patientId",
p.name AS "patientName",
p.gender_enum AS "gender",
p.birth_date AS "birthDate",
e.create_time AS "registerTime",
e.bus_no AS "busNo"
FROM adm_encounter e
INNER JOIN adm_encounter_participant ep ON e.id = ep.encounter_id AND ep.practitioner_id = #{doctorId}
LEFT JOIN adm_patient p ON e.patient_id = p.id
LEFT JOIN doc_emr emr ON e.id = emr.encounter_id
WHERE e.status_enum = 2
AND emr.id IS NULL
<if test="patientName != null and patientName != ''">
AND p.name LIKE CONCAT('%', #{patientName}, '%')
</if>
ORDER BY e.create_time DESC
</select>
<select id="getPendingEmrCount" resultType="java.lang.Long">
SELECT COUNT(*)
FROM adm_encounter e
INNER JOIN adm_encounter_participant ep ON e.id = ep.encounter_id AND ep.practitioner_id = #{doctorId}
LEFT JOIN doc_emr emr ON e.id = emr.encounter_id
WHERE e.status_enum = 2
AND emr.id IS NULL
<if test="patientName != null and patientName != ''">
AND e.patient_id IN (
SELECT id FROM adm_patient WHERE name LIKE CONCAT('%', #{patientName}, '%')
)
</if>
</select>
</mapper>

View File

@@ -35,27 +35,21 @@
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
AND ws.status_enum = 8
) THEN 6
WHEN EXISTS (
SELECT 1 FROM wor_service_request ws
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
AND ws.status_enum = 5
) THEN 7
WHEN EXISTS (
SELECT 1 FROM wor_service_request ws
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
AND ws.status_enum = 3
) THEN 5
WHEN EXISTS (
SELECT 1 FROM wor_service_request ws
INNER JOIN lab_specimen ls ON ls.service_id = ws.id
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
AND ls.collection_status_enum >= 1
) THEN 4
WHEN EXISTS (
SELECT 1 FROM wor_service_request ws
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
AND ws.status_enum = 2
) THEN 1
WHEN EXISTS (
SELECT 1 FROM wor_service_request ws
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
AND ws.status_enum = 5
) THEN 7
ELSE 0
END AS computed_status
FROM doc_request_form AS drf

View File

@@ -749,26 +749,22 @@ function handleInfectiousDiseaseReport() {
'手足口病': '0311',
};
// 获取所有命中传染病映射的诊断,但跳过已有已提交报卡的诊断
const infectiousDiagnoses = form.value.diagnosisList
.map(d => ({
diagnosis: d,
diseaseCode: d.name && d.hasInfectiousReport !== 1 ? diseaseNameToCode[d.name] : null
}))
.filter(item => item.diseaseCode);
const allSelectedDiseases = infectiousDiagnoses.map(item => item.diseaseCode);
// 获取所有诊断名称对应的报卡编码,但跳过已有已提交报卡的诊断
const allSelectedDiseases = form.value.diagnosisList
.filter(d => d.name && d.hasInfectiousReport !== 1)
.map(d => diseaseNameToCode[d.name] || null)
.filter(code => code);
if (allSelectedDiseases.length === 0) {
return;
}
// 优先使用命中传染病映射的主诊断,否则使用第一条命中的传染病诊断
const mainInfectiousDiagnosis = infectiousDiagnoses.find(item => item.diagnosis.maindiseFlag === 1)?.diagnosis;
const firstInfectiousDiagnosis = infectiousDiagnoses[0].diagnosis;
// 优先使用主诊断(同样跳过已有报卡的)
const mainDiagnosis = form.value.diagnosisList.find(d => d.maindiseFlag === 1 && d.hasInfectiousReport !== 1);
const firstDiagnosis = form.value.diagnosisList.find(d => d.hasInfectiousReport !== 1) || form.value.diagnosisList[0];
const diagnosisToShow = {
...(mainInfectiousDiagnosis || firstInfectiousDiagnosis),
...(mainDiagnosis || firstDiagnosis),
selectedDiseases: allSelectedDiseases
};

View File

@@ -1442,7 +1442,7 @@ async function buildSubmitData() {
const submitData = {
cardNo: formData.cardNo,
visitId: props.patientInfo?.encounterId || formData.encounterId || null,
diagId: formData.diagnosisId || null,
diagId: formData.diagnosisId ? Number(formData.diagnosisId) : null,
patId: formData.patientId || null,
idType: 1, // 默认身份证
idNo: formData.idNo,

View File

@@ -883,7 +883,7 @@ const initData = async () => {
formData.visitNo = props.patientInfo.busNo || ''
formData.patientId = props.patientInfo.patientId || ''
formData.patientName = props.patientInfo.patientName || ''
formData.medicalrecordNumber = props.patientInfo.identifierNo || ''
formData.medicalrecordNumber = props.patientInfo.visitNo || props.patientInfo.busNo || ''
formData.applyDepartment = props.patientInfo.organizationName || ''
formData.applyDocName = userNickName.value || userName.value || ''
formData.applyDocCode = userId.value || ''
@@ -895,6 +895,8 @@ const initData = async () => {
// 申请单号在保存时由后端生成,此处显示"自动生成"
formData.applyNo = '自动生成'
// 执行时间默认填充当前系统时间
formData.executeTime = formatDateTime(new Date())
// 申请日期实时更新(启动定时器)
startApplyTimeTimer()
@@ -1526,7 +1528,7 @@ const resetForm = async () => {
applicationId: null,
applyOrganizationId: props.patientInfo.orgId || '',
patientName: props.patientInfo.patientName || '',
medicalrecordNumber: props.patientInfo.identifierNo || '',
medicalrecordNumber: props.patientInfo.visitNo || props.patientInfo.busNo || '',
natureofCost: 'self',
applyTime: '', // 申请日期由定时器实时更新
applyDepartment: props.patientInfo.organizationName || '',
@@ -1550,7 +1552,7 @@ const resetForm = async () => {
visitNo: '',
specimenName: '血液',
encounterId: props.patientInfo.encounterId || '',
executeTime: null,
executeTime: formatDateTime(new Date()),
applicationType: 0,
})
selectedInspectionItems.value = []
@@ -1600,7 +1602,7 @@ const handleSave = () => {
// 修复【#406】保存前尝试从 props 同步患者信息,避免因加载时序导致信息缺失
if ((!formData.patientName?.trim() || !formData.medicalrecordNumber?.trim()) && props.patientInfo && props.patientInfo.encounterId) {
formData.patientName = props.patientInfo.patientName || ''
formData.medicalrecordNumber = props.patientInfo.identifierNo || ''
formData.medicalrecordNumber = props.patientInfo.visitNo || props.patientInfo.busNo || ''
formData.encounterId = props.patientInfo.encounterId || ''
formData.visitNo = props.patientInfo.busNo || ''
formData.patientId = props.patientInfo.patientId || ''
@@ -2000,7 +2002,7 @@ const loadApplicationToForm = async (row) => {
// Bug #387修复: 套餐项目默认展开,并自动加载明细
selectedInspectionItems.value = detail.labApplyItemList.map(item => {
const itemId = item.activityId || item.itemId || item.id || Math.random().toString(36).substring(2, 11)
const isPackage = item.feePackageId != null || item.itemName?.includes('套餐')
const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName
return {
itemId: itemId,

View File

@@ -89,14 +89,8 @@ const getList = async () => {
const response = await listPendingEmr(queryParams)
// 根据后端返回的数据结构调整
if (response.code === 200) {
const data = response.data
if (data && data.rows !== undefined) {
emrList.value = data.rows || []
total.value = data.total || 0
} else {
emrList.value = Array.isArray(data) ? data : []
total.value = emrList.value.length
}
emrList.value = response.data || []
total.value = Array.isArray(response.data) ? response.data.length : 0
} else {
ElMessage.error(response.msg || '获取待写病历列表失败')
emrList.value = []

View File

@@ -113,17 +113,10 @@ const getList = async () => {
loading.value = true
try {
const response = await listPendingEmr(queryParams)
// 根据后端返回的数据结构调整
if (response.code === 200) {
const data = response.data
if (data && data.rows !== undefined) {
// 新分页格式 {rows, total}
emrList.value = data.rows || []
total.value = data.total || 0
} else {
// 兼容旧格式(数组)
emrList.value = Array.isArray(data) ? data : []
total.value = emrList.value.length
}
emrList.value = response.data || []
total.value = Array.isArray(response.data) ? response.data.length : 0
} else {
ElMessage.error(response.msg || '获取待写病历列表失败')
emrList.value = []

View File

@@ -115,20 +115,20 @@
</template>
</el-table-column>
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
<el-table-column label="操作" align="center" fixed="right" width="280">
<el-table-column label="操作" align="center" fixed="right" width="220">
<template #default="scope">
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
<template v-if="canManageRow(scope.row)">
<!-- 待签发可修改删除 -->
<template v-if="isPendingStatus(scope.row)">
<el-button link type="primary" @click="handleEdit(scope.row)">修改</el-button>
<el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
<template v-else-if="isWithdrawableStatus(scope.row)">
<!-- 已签发可撤回 -->
<template v-else-if="isIssuedStatus(scope.row)">
<el-button link type="warning" @click="handleWithdraw(scope.row)">撤回</el-button>
</template>
</template>
<template v-if="isReportStatus(scope.row)">
<el-button link type="success" @click="handleViewReport(scope.row)">查看报告</el-button>
<!-- 已采证已送检报告已出已作废仅查看详情 -->
<template v-else>
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
</template>
</template>
</el-table-column>
@@ -228,10 +228,7 @@ import {patientInfo} from '../../store/patient.js';
import {getInspection, deleteRequestForm, withdrawRequestForm, getProofResult} from './api';
import {getDepartmentList} from '@/api/public.js';
import LaboratoryTests from '../order/applicationForm/laboratoryTests.vue';
import useUserStore from '@/store/modules/user';
import auth from '@/plugins/auth';
const userStore = useUserStore();
import {saveInspection} from '../order/applicationForm/api.js';
const { proxy } = getCurrentInstance();
@@ -381,25 +378,10 @@ const isPendingStatus = (row) => {
return status === undefined || status === null || status === '' || String(status) === '0';
};
const isWithdrawableStatus = (row) => String(getBillStatus(row)) === '1';
const isIssuedStatus = (row) => String(getBillStatus(row)) === '1';
const isReportStatus = (row) => ['6', '8'].includes(String(getBillStatus(row)));
/**
* 是否可管理该申请单:申请者本人或管理员
*/
const canManageRow = (row) => {
if (auth.hasRole('admin')) {
return true;
}
const currentPractitionerId = userStore.practitionerId;
const requesterId = row?.requesterId;
if (!currentPractitionerId || !requesterId) {
return false;
}
return String(currentPractitionerId) === String(requesterId);
};
const sortByCreateTimeDesc = (a, b) => {
const aTime = a?.createTime ? new Date(a.createTime).getTime() : 0;
const bTime = b?.createTime ? new Date(b.createTime).getTime() : 0;
@@ -604,9 +586,9 @@ const submitEditForm = () => {
*/
const handleDelete = async (row) => {
try {
await proxy.$modal?.confirm?.('确认作废该申请单吗?作废后不可撤销');
await proxy.$modal?.confirm?.(`确定要删除申请单 "${row.prescriptionNo}" 吗?此操作不可恢复。`);
} catch {
return;
return; // 用户取消
}
try {
@@ -623,15 +605,13 @@ const handleDelete = async (row) => {
};
/**
* 撤回检验申请单(已签发且未采证状态撤回)
* 撤回检验申请单(已签发状态撤回至待签发
*/
const handleWithdraw = async (row) => {
try {
await proxy.$modal?.confirm?.(
'确认撤回该申请单吗?撤回后申请单及关联医嘱将恢复为待签发状态,护士站将同步更新。'
);
await proxy.$modal?.confirm?.(`确定要撤回申请单 "${row.prescriptionNo}" 吗?撤回后将恢复为待签发状态。`);
} catch {
return;
return; // 用户取消
}
try {
@@ -760,10 +740,6 @@ defineExpose({
.report-status-tag {
cursor: pointer;
background-color: #f0f9eb !important;
border-color: #67c23a !important;
color: #529b2e !important;
font-weight: 600;
}
@keyframes rotating {

View File

@@ -1671,6 +1671,13 @@ function handleSaveGroup(orderGroupList) {
if (newRows.length > 0) {
prescriptionList.value.splice(originalLength); // 移除循环中追加到末尾的临时行
prescriptionList.value.unshift(...newRows);
// 排序:确保没有 requestTime 的新行始终排在最前面
prescriptionList.value.sort((a, b) => {
if (!a.requestTime && !b.requestTime) return 0;
if (!a.requestTime) return -1;
if (!b.requestTime) return 1;
return new Date(b.requestTime) - new Date(a.requestTime);
});
proxy.$modal.msgSuccess(`成功添加 ${successCount} 个医嘱项`);
}
}

View File

@@ -90,14 +90,14 @@
<div class="candidate-actions">
<el-button
type="primary"
:disabled="selectedCandidates.length === 0 || isQueryingHistory"
:disabled="selectedCandidates.length === 0"
@click="handleAddToQueue"
>
加入队列 >>
</el-button>
<el-button
type="primary"
:disabled="filteredCandidatePoolList.length === 0 || isQueryingHistory"
:disabled="filteredCandidatePoolList.length === 0"
@click="handleAddAllToQueue"
>
一键加入队列
@@ -109,19 +109,6 @@
<div class="right-panel">
<div class="panel-header">
<span class="panel-title"> 智能队列 (全科)</span>
<div class="history-query">
<el-date-picker
v-model="queryDate"
type="date"
placeholder="选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
size="small"
style="width: 150px"
/>
<el-button type="primary" size="small" @click="handleHistoryQuery">查询</el-button>
<el-button size="small" @click="handleTodayQuery">今天</el-button>
</div>
</div>
<div class="table-container">
<el-table
@@ -188,7 +175,7 @@
<div class="queue-actions-left">
<el-button
type="danger"
:disabled="!selectedQueueRow || isQueryingHistory"
:disabled="!selectedQueueRow"
size="small"
@click="handleRemoveFromQueue"
>
@@ -196,7 +183,7 @@
</el-button>
<el-button
type="info"
:disabled="!selectedQueueRow || !canMoveUp || isQueryingHistory"
:disabled="!selectedQueueRow || !canMoveUp"
size="small"
@click="handleMoveUp"
>
@@ -204,7 +191,7 @@
</el-button>
<el-button
type="info"
:disabled="!selectedQueueRow || !canMoveDown || isQueryingHistory"
:disabled="!selectedQueueRow || !canMoveDown"
size="small"
@click="handleMoveDown"
>
@@ -272,35 +259,30 @@
<div class="control-buttons">
<el-button
type="primary"
:disabled="isQueryingHistory"
@click="handleSelectCall"
>
选呼
</el-button>
<el-button
type="success"
:disabled="isQueryingHistory"
@click="handleNextPatient"
>
下一患者
</el-button>
<el-button
type="warning"
:disabled="isQueryingHistory"
@click="handleSkip"
>
跳过
</el-button>
<el-button
type="primary"
:disabled="isQueryingHistory"
@click="handleComplete"
>
完成
</el-button>
<el-button
type="info"
:disabled="isQueryingHistory"
@click="handleRequeue"
>
过号重排
@@ -700,14 +682,6 @@ const showOnlyWaiting = ref(false)
// Bug #411诊室过滤替代原来的科室下拉框selectedDept/departmentList 已移除)
const selectedRoom = ref('all')
// 历史队列查询日期 (默认当天)
const getTodayStr = () => {
const now = new Date()
return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`
}
const queryDate = ref(getTodayStr())
const isQueryingHistory = computed(() => queryDate.value !== getTodayStr())
// 修复【#397】动态获取当前科室名称
const currentDeptName = computed(() => {
return userStore.deptName || userStore.orgName || '心内科'
@@ -927,12 +901,14 @@ const mapFrontendStatusToBackend = (status) => {
}
// 从数据库加载队列
const loadQueueFromDb = async (dateStr) => {
const loadQueueFromDb = async () => {
try {
// Bug #411不再按科室选筛加载后端默认按当前登录人科室查询
const organizationId = undefined
const queryDateStr = dateStr || queryDate.value
const res = await getTriageQueueList({ organizationId, date: queryDateStr }).catch((err) => {
// 只查询今天的患者
const today = new Date()
const todayStr = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`
const res = await getTriageQueueList({ organizationId, date: todayStr }).catch((err) => {
console.error('【心内科】loadQueueFromDb 请求异常:', err)
return { code: 500, msg: err?.message || '请求失败', data: null }
})
@@ -955,6 +931,10 @@ const loadQueueFromDb = async (dateStr) => {
originalQueueList.value = list
.map((it) => {
const frontendStatus = mapBackendStatusToFrontend(it.status)
// 调试日志:检查状态映射
if (list.length <= 5) {
console.log('【心内科】状态映射:后端状态=', it.status, '-> 前端状态=', frontendStatus, '患者=', it.patientName)
}
// 计算等待时间基于创建时间createTime
let waitingTime = '00:00'
if (it.createTime) {
@@ -992,6 +972,14 @@ const loadQueueFromDb = async (dateStr) => {
organizationId: it.organizationId
}
})
.filter((item) => {
// 过滤掉"已完成"状态的患者,不显示在队列中
if (item.status === '已完成') {
console.log('【心内科】过滤掉已完成状态的患者:', item.patientName)
return false
}
return true
})
// 调试日志:检查查找结果
const callingCount = originalQueueList.value.filter(i => i.status === '叫号中').length
@@ -1208,6 +1196,9 @@ const formatSecondsToMmSs = (totalSeconds) => {
const filteredQueueList = computed(() => {
let filtered = originalQueueList.value
// 先过滤掉"已完成"状态的患者(无论什么情况都不显示)
filtered = filtered.filter(item => item.status !== '已完成')
// 再按诊室过滤
if (selectedRoom.value !== 'all') {
filtered = filtered.filter(item => item.room === selectedRoom.value)
@@ -1636,26 +1627,6 @@ const handleRefresh = async () => {
ElMessage.success('已刷新(已从数据库恢复队列)')
}
// 历史队列查询
const handleHistoryQuery = async () => {
if (!queryDate.value) {
ElMessage.warning('请选择查询日期')
return
}
console.log('【心内科】历史队列查询:', queryDate.value)
await loadQueueFromDb(queryDate.value)
if (isQueryingHistory.value) {
ElMessage.success(`已加载 ${queryDate.value} 的队列数据`)
}
}
// 回到今天
const handleTodayQuery = async () => {
queryDate.value = getTodayStr()
await loadQueueFromDb(getTodayStr())
ElMessage.success('已切换到今天队列')
}
// 退出
const handleExit = () => {
ElMessage.info('退出功能待实现')
@@ -2194,21 +2165,12 @@ onUnmounted(() => {
padding: 15px 20px;
border-bottom: 2px solid #409eff;
background-color: #f8f9fa;
display: flex;
justify-content: space-between;
align-items: center;
.panel-title {
font-size: 16px;
font-weight: bold;
color: #333;
}
.history-query {
display: flex;
gap: 8px;
align-items: center;
}
}
.table-container {