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; }