修复bug375:住院医生站点击“签发”按钮后系统提示语错误,显示为“保存成功”并且签发业务功能未实现。

bug376:【门诊医生站】检查页签申请单列表过滤异常,显示了历史检查就诊记录
bug377:【门诊医生站】检查申请单“执行科室”未获取配置默认值且字段交互逻辑不规范
This commit is contained in:
2026-04-16 10:25:12 +08:00
parent 6922aa1d2a
commit 210c463130
10 changed files with 179 additions and 29 deletions

View File

@@ -64,10 +64,29 @@ public class ExamApplyController extends BaseController {
* 查询检查申请单列表
*/
@GetMapping("/list")
public TableDataInfo list(ExamApply examApply) {
public TableDataInfo list(ExamApply examApply, @RequestParam(value = "encounterId", required = false) Long encounterId) {
startPage();
LambdaQueryWrapper<ExamApply> wrapper = new LambdaQueryWrapper<>();
if (examApply.getVisitNo() != null) {
// 优先按本次就诊 encounterId 过滤(通过 wor_service_request 关联)
if (encounterId != null) {
List<ServiceRequest> reqList = serviceRequestService.list(new LambdaQueryWrapper<ServiceRequest>()
.eq(ServiceRequest::getEncounterId, encounterId)
.eq(ServiceRequest::getBasedOnTable, "exam_apply")
.isNotNull(ServiceRequest::getBasedOnId)
);
List<Long> basedOnIds = reqList.stream()
.map(ServiceRequest::getBasedOnId)
.filter(java.util.Objects::nonNull)
.distinct()
.toList();
// 没有本次就诊的检查申请单时,直接返回空列表
if (basedOnIds.isEmpty()) {
return getDataTable(java.util.Collections.emptyList());
}
wrapper.in(ExamApply::getId, basedOnIds);
} else if (examApply.getVisitNo() != null) {
// 兼容旧逻辑:按 visitNo 查询(可能包含历史记录)
wrapper.eq(ExamApply::getVisitNo, examApply.getVisitNo());
}
wrapper.orderByDesc(ExamApply::getApplyTime);
@@ -147,6 +166,8 @@ public class ExamApplyController extends BaseController {
examApply.setOperatorId("system");
}
examApplyService.save(examApply);
// 业务主键为 apply_no自增 id 不会随 save 回填;列表接口依赖 wor_service_request.based_on_id=exam_apply.id 关联本次就诊,此处必须回读 id
examApply = examApplyService.getById(applyNo);
// ========== 2. 批量保存明细 + 写入门诊医嘱 + 写入费用项 ==========
if (dto.getItems() != null && !dto.getItems().isEmpty()) {

View File

@@ -612,13 +612,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|| e.getAdviceType() == 4) // 前端耗材类型值为4
.collect(Collectors.toList());
// 诊疗活动前端adviceType=3诊疗、adviceType=5会诊、adviceType=6手术、adviceType=23检查 → 都属于诊疗后端分类)
// 诊疗活动前端adviceType=3诊疗、adviceType=5会诊、adviceType=6手术、adviceType=23检查、adviceType=26护理 → 都属于诊疗后端分类)
List<AdviceSaveDto> activityList = adviceSaveList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| e.getAdviceType() == 3 // 前端诊疗类型值为3
|| e.getAdviceType() == 5 // 前端会诊类型值为5
|| e.getAdviceType() == 6 // 前端手术类型值为6
|| e.getAdviceType() == 23 // 前端检查类型值为23
|| e.getAdviceType() == 26 // 前端护理类型值为26
|| ItemType.SURGERY.getValue().equals(e.getAdviceType())) // 后端手术类型值为6
.collect(Collectors.toList());

View File

@@ -147,12 +147,19 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
return R.fail("已接诊,请勿重复点击,已为您刷新");
}
// 允许从「待诊/暂离/诊毕」重新接诊(用于队列弹窗的完诊患者重新进入在诊)
Date now = new Date();
int update = encounterMapper.update(null,
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
.eq(Encounter::getStatusEnum, EncounterStatus.PLANNED.getValue()) // 只更新待诊状态的患者
.set(Encounter::getReceptionTime, new Date())
.in(Encounter::getStatusEnum,
EncounterStatus.PLANNED.getValue(),
EncounterStatus.ON_HOLD.getValue(),
EncounterStatus.DISCHARGED.getValue())
.set(Encounter::getReceptionTime, now)
.set(Encounter::getEndTime, null)
.set(Encounter::getStatusEnum, EncounterStatus.IN_PROGRESS.getValue())
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.RECEIVING_CARE.getValue()));
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.RECEIVING_CARE.getValue())
.set(Encounter::getUpdateTime, now));
// 如果更新失败,说明状态已被其他医生修改
if (update <= 0) {

View File

@@ -180,9 +180,11 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
// 药品
List<RegAdviceSaveDto> medicineList = regAdviceSaveList.stream()
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
// 诊疗活动
// 诊疗活动包含护理adviceType=26
List<RegAdviceSaveDto> activityList = regAdviceSaveList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 26))
.collect(Collectors.toList());
// 耗材 🔧 Bug #147 修复
List<RegAdviceSaveDto> deviceList = regAdviceSaveList.stream()
.filter(e -> ItemType.DEVICE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
@@ -844,9 +846,11 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
List<Long> medicineRequestIds
= medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
// 诊疗
// 诊疗包含护理adviceType=26
List<AdviceBatchOpParam> activityList = paramList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 26))
.collect(Collectors.toList());
List<Long> activityRequestIds
= activityList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
// 查询已完成的药品请求
@@ -902,9 +906,11 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
List<Long> medicineRequestIds
= medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
// 诊疗
// 诊疗包含护理adviceType=26
List<AdviceBatchOpParam> activityList = paramList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 26))
.collect(Collectors.toList());
List<Long> activityRequestIds
= activityList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
if (!medicineRequestIds.isEmpty()) {