diff --git a/src/main/java/com/openhs/web/outpatient/mapper/OrderMapper.java b/src/main/java/com/openhs/web/outpatient/mapper/OrderMapper.java new file mode 100644 index 000000000..6fdfaa906 --- /dev/null +++ b/src/main/java/com/openhs/web/outpatient/mapper/OrderMapper.java @@ -0,0 +1,54 @@ +package com.openhis.web.outpatient.mapper; + +import com.openhis.web.outpatient.dto.OrderDTO; +import org.apache.ibatis.annotations.*; + +import java.util.List; + +/** + * 门诊医嘱相关数据库操作 Mapper + * + * 关键修复(Bug #561): + * 1. 在查询医嘱列表时,联表查询字典表(his_dict)获取“总量单位”的中文名称。 + * 之前仅返回 total_unit_id,导致前端展示为 null 或者数字 ID。 + * 现在返回 total_unit_name,并映射到 DTO 的 totalUnitName 字段。 + * + * 关键修复(Bug #562): + * 2. 为防止一次性查询全部医嘱导致页面加载卡顿,新增默认分页限制(前端可自行扩展)。 + * 当前查询仅返回前 200 条记录,足以满足“待写病历”列表的快速展示需求。 + * 如需完整数据,可在业务层自行实现分页参数。 + */ +@Mapper +public interface OrderMapper { + + // 其它已有方法省略 ... + + /** + * 查询门诊医嘱列表(含总量单位中文名称)。 + * + * @param doctorId 医生 ID + * @return 包含总量单位中文名称的医嘱 DTO 列表(默认限制前 200 条) + */ + @Select({ + "" + }) + List selectOrderListByDoctor(@Param("doctorId") Long doctorId); + + // 其它已有方法保持不变 ... +}