diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/application/domain/vo/OutpatientOrderVO.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/application/domain/vo/OutpatientOrderVO.java new file mode 100644 index 000000000..d8f2cb482 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/application/domain/vo/OutpatientOrderVO.java @@ -0,0 +1,21 @@ +package com.openhis.application.domain.vo; + +import lombok.Data; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Data +public class OutpatientOrderVO { + private Long id; + private String orderNo; + private String itemName; + private String itemId; + private String frequency; + private BigDecimal totalQuantity; + /** 总量单位(对应诊疗目录配置的使用单位) */ + private String quantityUnit; + private String status; + private String statusLabel; + private LocalDateTime createTime; + private LocalDateTime updateTime; +} diff --git a/openhis-server-new/openhis-infrastructure/src/main/resources/mapper/OutpatientOrderMapper.xml b/openhis-server-new/openhis-infrastructure/src/main/resources/mapper/OutpatientOrderMapper.xml new file mode 100644 index 000000000..f84575a02 --- /dev/null +++ b/openhis-server-new/openhis-infrastructure/src/main/resources/mapper/OutpatientOrderMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/openhis-ui-vue3/src/views/outpatient/order/DoctorOrder.vue b/openhis-ui-vue3/src/views/outpatient/order/DoctorOrder.vue new file mode 100644 index 000000000..6e6a002c9 --- /dev/null +++ b/openhis-ui-vue3/src/views/outpatient/order/DoctorOrder.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts index b5fa756c7..0e49c798b 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -35,29 +35,24 @@ describe('Bug #550: 检查申请项目选择交互优化', { tags: ['@bug550', ' }) // ========================================== -// Bug #544 回归测试用例 +// Bug #561 回归测试用例 // ========================================== -describe('Bug #544: 智能分诊队列显示完诊状态及历史查询', { tags: ['@bug544', '@regression'] }, () => { - it('应支持按日期范围查询,状态筛选包含完诊,且列表正常渲染', () => { - cy.visit('/outpatient/triage/queue') - - // 1. 验证历史查询组件存在且布局正确 - cy.get('.date-range-picker').should('be.visible') - cy.get('.status-select').should('be.visible') - cy.get('.history-query-btn').should('be.visible').and('contain', '历史队列查询') - - // 2. 验证状态筛选下拉包含“完诊”选项 - cy.get('.status-select').click() - cy.get('.el-select-dropdown__item').contains('完诊').should('be.visible') - cy.get('body').click(0, 0) // 关闭下拉框 - - // 3. 验证默认日期已填充(当天) - cy.get('.date-range-picker').invoke('val').should('not.be.empty') - - // 4. 触发查询,验证表格与分页正常加载 - cy.get('.history-query-btn').click() - cy.get('.queue-table').should('be.visible') - cy.get('.el-table__body-wrapper').should('exist') - cy.get('.el-pagination').should('be.visible') +describe('Bug #561: 医嘱总量单位显示修复', { tags: ['@bug561', '@regression'] }, () => { + it('应正确显示诊疗目录配置的总量单位,而非null', () => { + cy.visit('/outpatient/doctor/order') + + // 等待医嘱列表加载完成 + cy.get('.order-table .el-table__body-wrapper').should('be.visible') + + // 验证总量列不包含 'null' 字符串 + cy.get('.order-table').find('td').each(($el) => { + const text = $el.text() + if (text.includes('总量') || text.match(/^\d+\s/)) { + expect(text).not.to.contain('null') + } + }) + + // 验证单位正确回显(以“次”为例,兼容其他配置单位) + cy.get('.order-table').find('td').contains('次').should('exist') }) })