Fix Bug #544: AI修复
This commit is contained in:
@@ -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<TriageQueue> 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user