From f125c8dc85015017a7d7087b40bd58364fd1844d Mon Sep 17 00:00:00 2001 From: duzhongxu <15039018447@163.com> Date: Wed, 22 Apr 2026 15:35:25 +0800 Subject: [PATCH] =?UTF-8?q?372=20=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99=E3=80=91=E5=8C=BB=E5=98=B1=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=A7=91=E5=AE=A4=E6=98=BE=E7=A4=BAID?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=EF=BC=8C=E4=B8=94=E7=BC=BA=E4=B9=8F=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=8C=B9=E9=85=8D=E9=80=BB=E8=BE=91=20373=20=E3=80=90?= =?UTF-8?q?=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F=E7=AB=99=E3=80=91=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E6=90=9C=E7=B4=A2=E7=BC=BA=E5=A4=B1=E2=80=9CII?= =?UTF-8?q?=E7=BA=A7=E6=8A=A4=E7=90=86=E2=80=9D=E9=A1=B9=E7=9B=AE=EF=BC=88?= =?UTF-8?q?=E4=B8=8E=E8=AF=8A=E7=96=97=E7=9B=AE=E5=BD=95=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=8D=E7=AC=A6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DoctorStationAdviceController.java | 2 +- ...DoctorStationChineseMedicalController.java | 2 +- .../web/doctorstation/dto/AdviceBaseDto.java | 1 + .../components/prescriptionlist.vue | 3 +- .../bargain/component/prescriptionlist.vue | 9 +- .../prescription/prescriptionlist.vue | 14 +- .../home/components/order/OrderForm.vue | 53 +++++- .../home/components/order/index.vue | 168 +++++++++++++++--- 8 files changed, 213 insertions(+), 39 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java index 6d39727c..6aa58de6 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java @@ -53,7 +53,7 @@ public class DoctorStationAdviceController { @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(value = "categoryCode", required = false) String categoryCode) { return R.ok(iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, - adviceDefinitionIdParamList, organizationId, pageNo, pageSize, Whether.NO.getValue(), adviceTypes, null, categoryCode)); + adviceDefinitionIdParamList, organizationId, pageNo, pageSize, null, adviceTypes, null, categoryCode)); } /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationChineseMedicalController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationChineseMedicalController.java index 5864da78..ac97cfc0 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationChineseMedicalController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationChineseMedicalController.java @@ -118,7 +118,7 @@ public class DoctorStationChineseMedicalController { organizationId = SecurityUtils.getLoginUser().getOrgId(); } return R.ok(iDoctorStationChineseMedicalAppService.getTcmAdviceBaseInfo(adviceBaseDto, searchKey, locationId, - adviceDefinitionIdParamList, organizationId, pageNo, pageSize, Whether.NO.getValue())); + adviceDefinitionIdParamList, organizationId, pageNo, pageSize, null)); } /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceBaseDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceBaseDto.java index 0d548de3..47a075ea 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceBaseDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceBaseDto.java @@ -198,6 +198,7 @@ public class AdviceBaseDto { /** * 所属科室 */ + @JsonSerialize(using = ToStringSerializer.class) private Long orgId; /** diff --git a/openhis-ui-vue3/src/views/basicmanage/ordersCombination/components/prescriptionlist.vue b/openhis-ui-vue3/src/views/basicmanage/ordersCombination/components/prescriptionlist.vue index cf338672..48d343a2 100644 --- a/openhis-ui-vue3/src/views/basicmanage/ordersCombination/components/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/basicmanage/ordersCombination/components/prescriptionlist.vue @@ -819,7 +819,8 @@ function selectAdviceBase(key, row) { combinationList.value[rowIndex.value].positionName = stock.locationName; } } else { - combinationList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId; + // 🔧 修复执行科室逻辑:优先使用项目维护的所属科室(row.orgId),其次使用positionId + combinationList.value[rowIndex.value].orgId = row.orgId || JSON.parse(JSON.stringify(row)).positionId; combinationList.value[rowIndex.value].unitPrice = row.priceList[0].price; } expandOrder.value = [key]; diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index aa662dca..9101399f 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -702,7 +702,14 @@ async function selectAdviceBase(key, row) { }; // 后续字段处理保持原样 - prescriptionList.value[rowIndex.value].orgId = undefined; + // 🔧 修复执行科室逻辑:诊疗项目优先使用项目维护的所属科室(row.orgId) + // 如果所属科室为空,则回退到患者当前所在科室 + if (row.adviceType === 3 && row.orgId) { + // 项目有所属科室,直接使用 + prescriptionList.value[rowIndex.value].orgId = row.orgId; + } else { + prescriptionList.value[rowIndex.value].orgId = undefined; + } prescriptionList.value[rowIndex.value].dose = undefined; prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value; prescriptionList.value[rowIndex.value].doseUnitCode = 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 bb239650..8d02ead1 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -3305,8 +3305,9 @@ function syncGroupFields(row) { } // 同步执行科室 - if (row.positionId || row.orgId) { - prescriptionList.value[rowIndex.value].orgId = row.positionId || row.orgId; + if (row.orgId || row.positionId) { + // 🔧 修复:优先使用项目所属科室(orgId),其次positionId + prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId; } // 同步皮试标记 @@ -3390,9 +3391,8 @@ function setValue(row) { showPopover: false, // 确保查询框关闭 }; console.log('[BugFix] setValue - prescriptionList[rowIndex].adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText); - // 🔧 Bug #218 修复:保留组套中的值,不要强制设为undefined - // 只有当值未定义时才使用默认值 - prescriptionList.value[rowIndex.value].orgId = row.positionId || row.orgId; + // 🔧 修复执行科室逻辑:优先使用项目维护的所属科室(row.orgId),其次使用positionId,最后回退到患者科室 + prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId || props.patientInfo?.orgId; prescriptionList.value[rowIndex.value].dose = row.dose || row.doseQuantity; prescriptionList.value[rowIndex.value].quantity = row.quantity || 1; prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value; @@ -3619,8 +3619,8 @@ function handleSaveGroup(orderGroupList) { unitCode: item.unitCode, unitCode_dictText: item.unitCodeName || '', statusEnum: 1, - // 🔧 Bug #218 修复:优先使用 item.positionId,其次使用 orderDetailInfos.positionId - orgId: item.positionId || item.orderDetailInfos?.positionId || mergedDetail.positionId, + // 🔧 修复执行科室逻辑:优先使用 orgId(所属科室),其次 positionId + orgId: item.orderDetailInfos?.orgId || mergedDetail.orgId || item.positionId || item.orderDetailInfos?.positionId || mergedDetail.positionId, dbOpType: prescriptionList.value[rowIndex.value].requestId ? '2' : '1', conditionId: conditionId.value, conditionDefinitionId: conditionDefinitionId.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 1249c2e6..4834dbb8 100644 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue @@ -395,11 +395,12 @@ clearable v-model="row.orgId" style="width: 200px" - :data="config.organization" + :data="orgTreeData" :props="{ value: 'id', label: 'name', children: 'children' }" value-key="id" check-strictly default-expand-all + :fallback-option="orgFallbackOption" @change="handleOrgChange" placeholder="请选择执行科室" /> @@ -422,7 +423,7 @@