Fix: #338 就诊状态校验缺失,#339 药房locationId筛选失效
1. Bug #338: 门诊划价时校验患者就诊状态,仅允许已接诊(1002/1003/1004)患者保存医嘱 2. Bug #339: 添加药房locationId过滤条件 3. 补充practitionerId和founderOrgId自动填充逻辑
This commit is contained in:
@@ -793,6 +793,18 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix: 确保practitionerId不为null
|
||||
if (adviceSaveDto.getPractitionerId() == null) {
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
log.info("handMedication - 自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId());
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix: 确保founderOrgId不为null
|
||||
if (adviceSaveDto.getFounderOrgId() == null) {
|
||||
adviceSaveDto.setFounderOrgId(SecurityUtils.getLoginUser().getOrgId());
|
||||
log.info("handMedication - 自动补全founderOrgId: founderOrgId={}", adviceSaveDto.getFounderOrgId());
|
||||
}
|
||||
|
||||
boolean firstTimeSave = false;// 第一次保存
|
||||
medicationRequest = new MedicationRequest();
|
||||
medicationRequest.setId(adviceSaveDto.getRequestId()); // 主键id
|
||||
@@ -1160,6 +1172,18 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix: 确保practitionerId不为null
|
||||
if (adviceSaveDto.getPractitionerId() == null) {
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
log.info("自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId());
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix: 确保founderOrgId不为null
|
||||
if (adviceSaveDto.getFounderOrgId() == null) {
|
||||
adviceSaveDto.setFounderOrgId(SecurityUtils.getLoginUser().getOrgId());
|
||||
log.info("自动补全founderOrgId: founderOrgId={}", adviceSaveDto.getFounderOrgId());
|
||||
}
|
||||
|
||||
deviceRequest = new DeviceRequest();
|
||||
deviceRequest.setId(adviceSaveDto.getRequestId()); // 主键id
|
||||
deviceRequest.setStatusEnum(is_save ? RequestStatus.DRAFT.getValue() : RequestStatus.ACTIVE.getValue()); // 请求状态
|
||||
@@ -1387,6 +1411,18 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix: 确保practitionerId不为null
|
||||
if (adviceSaveDto.getPractitionerId() == null) {
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
log.info("handService - 自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId());
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix: 确保founderOrgId不为null
|
||||
if (adviceSaveDto.getFounderOrgId() == null) {
|
||||
adviceSaveDto.setFounderOrgId(SecurityUtils.getLoginUser().getOrgId());
|
||||
log.info("handService - 自动补全founderOrgId: founderOrgId={}", adviceSaveDto.getFounderOrgId());
|
||||
}
|
||||
|
||||
// 🔧 Bug Fix #238: 诊疗项目执行科室非空校验
|
||||
if (adviceSaveDto.getAdviceType() != null && adviceSaveDto.getAdviceType() == 3) {
|
||||
Long effectiveOrgId = adviceSaveDto.getEffectiveOrgId();
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
T8.gender_enum AS gender_enum,
|
||||
T8.id_card AS id_card,
|
||||
T1.status_enum AS status_enum,
|
||||
T1.create_time AS register_time,
|
||||
T1.create_time AS registerTime,
|
||||
T10.total_price,
|
||||
T11."name" AS account_name,
|
||||
T12."name" AS enterer_name,
|
||||
@@ -178,7 +178,7 @@
|
||||
AND T10.context_enum = #{register}
|
||||
) AS T9
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY T9.register_time DESC
|
||||
ORDER BY T9.registerTime DESC
|
||||
</select>
|
||||
|
||||
<select id="getTmpActivityList" resultType="com.openhis.web.personalization.dto.ActivityDeviceDto">
|
||||
|
||||
Reference in New Issue
Block a user