From c6ac8d1cb1d3e81c8acf2ca677ed960f0b851d17 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Fri, 29 May 2026 13:52:27 +0800 Subject: [PATCH] =?UTF-8?q?565=20[=E5=BA=93=E6=88=BF=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E8=B0=83=E6=8B=A8]=20=E8=B0=83=E6=8B=A8=E5=8D=95=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E4=B8=AD=E2=80=9C=E6=BA=90=E4=BB=93=E5=BA=93=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=95=B0=E9=87=8F=E2=80=9D=E6=9C=AA=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E5=BA=93=E5=AD=98=E5=80=BC=EF=BC=8C=E5=A7=8B?= =?UTF-8?q?=E7=BB=88=E6=98=BE=E7=A4=BA=E4=B8=BA0=20600=20=E3=80=90?= =?UTF-8?q?=E4=BD=8F=E9=99=A2=E6=8A=A4=E5=A3=AB=E7=AB=99-=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E6=89=A7=E8=A1=8C=E3=80=91=E6=95=B0=E6=8D=AE=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7=EF=BC=9A=E5=8C=BB=E5=98=B1=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=90=8E=EF=BC=8C=E5=9C=A8=E2=80=9C=E5=B7=B2?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E2=80=9D=E5=88=97=E8=A1=A8=E4=B8=AD=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=9F=A5=E8=AF=A2=E5=88=B0=E8=AF=A5=E5=8C=BB=E5=98=B1?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 68 ------------------- .../impl/AdviceProcessAppServiceImpl.java | 5 +- .../mapper/common/CommonAppMapper.xml | 2 +- .../transferManagent/index.vue | 55 +++++++-------- 4 files changed, 32 insertions(+), 98 deletions(-) delete mode 100755 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100755 index 341809732..000000000 --- a/.gitignore +++ /dev/null @@ -1,68 +0,0 @@ -# 忽略所有编译器、IDE相关的文件 -**/.idea/ -**/.vscode/ -**/*.swp -**/*.swo -**/*.bak -**/*.tmp -**/.vs/ - -# 忽略 Java 项目编译文件 -**/*.class -**/*.jar -**/*.war -**/*.ear -**/target/ -**/bin/ - -# 忽略 Maven、Gradle、Ant 相关文件 -**/.mvn/ -**/.gradle/ -**/build/ -**/out/ - -# 忽略 Eclipse、IntelliJ IDEA 和 NetBeans 临时文件 -**/*.log -**/*.project -**/*.classpath - -# 忽略 Java 配置文件 -**/*.iml - -# 忽略 Node.js 和 Vue 项目相关文件 -**/node_modules/ -**/npm-debug.log -**/yarn-error.log -**/yarn-debug.log -**/dist/ -**/*.lock -**/*.tgz - -# 忽略 Vue 项目相关构建文件 -**/.vuepress/dist/ - -# 忽略 IDE 配置文件 -**/*.launch -**/*.settings/ - -# 忽略操作系统生成的文件 -**/.DS_Store -**/Thumbs.db -**/Desktop.ini - - - -/openhis-miniapp/unpackage - -# 忽略设计书 -PostgreSQL/openHis_DB设计书.xlsx - -public.sql -发版记录/2025-11-12/~$发版日志.docx -发版记录/2025-11-12/~$S-管理系统-调价管理.docx -发版记录/2025-11-12/发版日志.docx -.gitignore -openhis-server-new/openhis-application/src/main/resources/application-dev.yml -.env.test.local -playwright-report/ -test-results/ diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java index 6af610f4e..807c5e14b 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java @@ -185,12 +185,13 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null); - // 手动拼接requestStatus条件:COMPLETED(3)时同时包含CHECK_VERIFIED(10) + // 手动拼接requestStatus条件:COMPLETED(3)时同时包含CHECK_VERIFIED(10)和PENDING_RECEIVE(11) // UNION查询外层列名为request_status(T1.status_enum AS request_status),不是status_enum if (requestStatus != null) { if (RequestStatus.COMPLETED.getValue().equals(requestStatus)) { queryWrapper.in("request_status", - RequestStatus.COMPLETED.getValue(), RequestStatus.CHECK_VERIFIED.getValue()); + RequestStatus.COMPLETED.getValue(), RequestStatus.CHECK_VERIFIED.getValue(), + RequestStatus.PENDING_RECEIVE.getValue()); } else { queryWrapper.eq("request_status", requestStatus); } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/common/CommonAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/common/CommonAppMapper.xml index 95599294b..f9cb6e213 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/common/CommonAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/common/CommonAppMapper.xml @@ -262,7 +262,7 @@ AND T1.inventory_status_enum != 3 AND T1.delete_flag = '0' - + AND T1.lot_number = #{lotNumber} diff --git a/openhis-ui-vue3/src/views/medicationmanagement/transferManagent/transferManagent/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/transferManagent/transferManagent/index.vue index 80513e545..2359d0b84 100755 --- a/openhis-ui-vue3/src/views/medicationmanagement/transferManagent/transferManagent/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/transferManagent/transferManagent/index.vue @@ -1180,6 +1180,9 @@ function selectRow(rowValue, index) { form.purchaseinventoryList[index].partPercent = rowValue.partPercent; form.purchaseinventoryList[index].unitList = rowValue.unitList[0]; form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber; + // 补全单位字典文本,formatInventory 依赖此字段格式化库存显示 + form.purchaseinventoryList[index].unitCode_dictText = rowValue.unitCode_dictText; + form.purchaseinventoryList[index].minUnitCode_dictText = rowValue.minUnitCode_dictText; form.purchaseinventoryList[index].itemQuantity = 0; form.purchaseinventoryList[index].totalPrice = 0; // 维护一个大小单位的map,用来判断当前选中单位是大/小单位 @@ -1194,21 +1197,13 @@ function selectRow(rowValue, index) { value: rowValue.minUnitCode, }, ]; - if (route.query.supplyBusNo) { - handleLocationClick( - receiptHeaderForm.sourceLocationId1, - receiptHeaderForm.purposeLocationId1, - form.purchaseinventoryList[index].itemId, - index - ); - } else { - handleLocationClick( - form.purchaseinventoryList[index].sourceLocationId, - form.purchaseinventoryList[index].purposeLocationId, - form.purchaseinventoryList[index].itemId, - index - ); - } + // 新单/编辑单统一使用行级仓库ID,不再分支判断 route.query.supplyBusNo + handleLocationClick( + form.purchaseinventoryList[index].sourceLocationId, + form.purchaseinventoryList[index].purposeLocationId, + form.purchaseinventoryList[index].itemId, + index + ); editBatchTransfer(index); // todo } @@ -1220,23 +1215,29 @@ function handleLocationClick(id, purposeLocationId, itemId, index) { objLocationId: purposeLocationId, lotNumber: form.purchaseinventoryList[index].lotNumber, }).then((res) => { - if (res.data && res.data[0]) { - form.purchaseinventoryList[index].itemTable = res.data[0].itemTable || ''; - form.purchaseinventoryList[index].supplierId = res.data[0].supplierId || ''; - form.purchaseinventoryList[index].startTime = formatDateymd(res.data[0].productionDate) || ''; - form.purchaseinventoryList[index].endTime = formatDateymd(res.data[0].expirationDate) || ''; + if (res.data && res.data.length) { + // SQL 按 locationId 分组后可能有两条记录(源/目的),根据 locationId 精确匹配而非盲目取 res.data[0] + const srcId = String(id); + const purId = String(purposeLocationId); + const sourceRow = res.data.find(item => String(item.locationId) === srcId) || {}; + const purposeRow = res.data.find(item => String(item.locationId) === purId) || {}; - form.purchaseinventoryList[index].price = res.data[0].price; - form.purchaseinventoryList[index].totalSourceQuantity = res.data[0].orgQuantity; - form.purchaseinventoryList[index].totalPurposeQuantity = res.data[0].objQuantity; + form.purchaseinventoryList[index].itemTable = sourceRow.itemTable || ''; + form.purchaseinventoryList[index].supplierId = sourceRow.supplierId || ''; + form.purchaseinventoryList[index].startTime = formatDateymd(sourceRow.productionDate) || ''; + form.purchaseinventoryList[index].endTime = formatDateymd(sourceRow.expirationDate) || ''; + + form.purchaseinventoryList[index].price = sourceRow.price; + form.purchaseinventoryList[index].totalSourceQuantity = sourceRow.orgQuantity || 0; + form.purchaseinventoryList[index].totalPurposeQuantity = purposeRow.objQuantity || 0; form.purchaseinventoryList[index].totalSourceQuantityDisplay = formatInventory( - res.data[0].orgQuantity, + sourceRow.orgQuantity || 0, form.purchaseinventoryList[index].partPercent, form.purchaseinventoryList[index].unitCode_dictText, form.purchaseinventoryList[index].minUnitCode_dictText ); form.purchaseinventoryList[index].totalPurposeQuantityDisplay = formatInventory( - res.data[0].objQuantity, + purposeRow.objQuantity || 0, form.purchaseinventoryList[index].partPercent, form.purchaseinventoryList[index].unitCode_dictText, form.purchaseinventoryList[index].minUnitCode_dictText @@ -1340,8 +1341,8 @@ function formatInventory(quantity, partPercent, unitCode, minUnitCode) { return isNegative ? '-' + result : result; } - // 整除情况 - const result = absQuantity / partPercent; + // 整除时也需拼接单位后缀,否则显示为纯数字缺少单位信息 + const result = (absQuantity / partPercent) + ' ' + unitCode; return isNegative ? '-' + result : result; }