diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java
index a570ab089..f1db8bfea 100755
--- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java
+++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java
@@ -559,9 +559,11 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
if (adviceSaveList != null && !adviceSaveList.isEmpty()) {
for (int i = 0; i < adviceSaveList.size(); i++) {
AdviceSaveDto dto = adviceSaveList.get(i);
- log.info("Request[{}]: requestId={}, dbOpType={}, adviceType={}, encounterId={}, patientId={}",
- i, dto.getRequestId(), dto.getDbOpType(), dto.getAdviceType(),
- dto.getEncounterId(), dto.getPatientId());
+ log.info("Request[{}]: requestId={}, dbOpType={}, adviceType={}, encounterId={}, patientId={}, categoryEnum={}, categoryEnum.class={}, categoryCode={}, categoryCode.class={}",
+ i, dto.getRequestId(), dto.getDbOpType(), dto.getAdviceType(),
+ dto.getEncounterId(), dto.getPatientId(),
+ dto.getCategoryEnum(), dto.getCategoryEnum() != null ? dto.getCategoryEnum().getClass().getName() : "NULL",
+ dto.getCategoryCode(), dto.getCategoryCode() != null ? dto.getCategoryCode().getClass().getName() : "NULL");
}
}
@@ -1562,7 +1564,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
// 🔧 BugFix #498: categoryEnum=22(检查) 走 ServiceRequest,不走 DeviceRequest
// 检查申请单的诊疗定义ID存在 activityId,不在 adviceDefinitionId
// deviceDefId 对应耗材定义ID,不能用诊疗定义ID填充
- if (adviceSaveDto.getCategoryEnum() == 22) {
+ if (Integer.valueOf(22).equals(adviceSaveDto.getCategoryEnum())) {
log.info("handDevice skip - 检查申请单(categoryEnum=22) 走 ServiceRequest 路径,跳过 DeviceRequest 保存");
continue; // 跳过本次循环,不走耗材请求路径
} else if (adviceSaveDto.getAdviceDefinitionId() != null) {
diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue
index 0bfa62f3d..4a19c9da7 100755
--- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue
+++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue
@@ -3801,6 +3801,8 @@ function handleSaveHistory(value) {
uniqueKey: undefined,
dbOpType: value.requestId ? '2' : '1',
minUnitQuantity: value.quantity * value.partPercent,
+ // 🔧 修复:确保 categoryEnum 被传递(耗材必填字段),避免后端 NPE
+ categoryEnum: value.categoryEnum || value.categoryCode,
conditionId: conditionId.value,
conditionDefinitionId: conditionDefinitionId.value,
encounterDiagnosisId: encounterDiagnosisId.value,
diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue
index fce2a50b5..32df0ae9e 100755
--- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue
+++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue
@@ -63,7 +63,7 @@
诊断:{{ config.diagnosisName }}
皮试:{{ row.skinTestFlag_enumText }}
注射药品:{{ row.injectFlag_enumText }}
-
+
总金额:{{ row.totalPrice ? Number(row.totalPrice).toFixed(2) + ' 元' : '0.00 元' }}
@@ -83,7 +83,7 @@
:controls="false"
style="width: 70px"
:ref="(el) => setInputRef('doseQuantity', el)"
- @input="convertValues"
+ @input="() => { convertValues(); calculateTotalAmount(); }"
@keyup.enter.prevent="handleEnter('doseQuantity')"
/>
@@ -110,7 +110,7 @@
:controls="false"
style="width: 70px; margin-left: 32px"
:ref="(el) => setInputRef('dose', el)"
- @input="convertDoseValues"
+ @input="() => { convertDoseValues(); calculateTotalAmount(); }"
@keyup.enter.prevent="handleEnter('dose')"
/>
@@ -119,7 +119,7 @@
v-model="row.doseUnitCode"
style="width: 70px"
placeholder=" "
- @change="convertValues"
+ @change="() => { convertValues(); calculateTotalAmount(); }"
>
-
-
-
-
+
+
@@ -426,6 +430,7 @@