diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/application/service/impl/TriageQueueServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/application/service/impl/TriageQueueServiceImpl.java new file mode 100644 index 000000000..8337bfa72 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/application/service/impl/TriageQueueServiceImpl.java @@ -0,0 +1,36 @@ +package com.openhis.application.service.impl; + +import com.openhis.application.mapper.TriageQueueMapper; +import com.openhis.application.domain.entity.TriageQueue; +import com.openhis.application.service.TriageQueueService; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.List; + +@Service +public class TriageQueueServiceImpl implements TriageQueueService { + + private final TriageQueueMapper triageQueueMapper; + + public TriageQueueServiceImpl(TriageQueueMapper triageQueueMapper) { + this.triageQueueMapper = triageQueueMapper; + } + + /** + * 查询分诊队列列表 + * 修复 Bug #544:移除原有对 status 的硬编码过滤,支持查询全量状态(含完诊); + * 增加按日期范围查询能力,默认查询当天。 + */ + @Override + public List queryQueueList(Long deptId, LocalDate queryDate) { + // 若前端未传日期,默认当天 + LocalDate targetDate = (queryDate != null) ? queryDate : LocalDate.now(); + LocalDateTime startOfDay = LocalDateTime.of(targetDate, LocalTime.MIN); + LocalDateTime endOfDay = LocalDateTime.of(targetDate, LocalTime.MAX); + + return triageQueueMapper.selectQueueByDeptAndDate(deptId, startOfDay, endOfDay); + } +} diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/TriageQueueMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/TriageQueueMapper.xml new file mode 100644 index 000000000..a3dcff428 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/TriageQueueMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + diff --git a/openhis-ui-vue3/src/views/triage/SmartQueue.vue b/openhis-ui-vue3/src/views/triage/SmartQueue.vue index 59b4e1709..e6b88a20c 100644 --- a/openhis-ui-vue3/src/views/triage/SmartQueue.vue +++ b/openhis-ui-vue3/src/views/triage/SmartQueue.vue @@ -1,100 +1,83 @@