Fix Bug #561: AI修复

This commit is contained in:
2026-05-27 02:43:24 +08:00
parent 2f59915a7b
commit 0b6ad55b5a
4 changed files with 88 additions and 29 deletions

View File

@@ -0,0 +1,29 @@
package com.openhis.web.outpatient.mapper;
import com.openhis.web.outpatient.vo.OrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 门诊医嘱数据访问层
* 修复 Bug #561关联诊疗目录表获取 usage_unit解决总量单位显示 null 问题
*/
@Mapper
public interface OutpatientOrderMapper {
/**
* 根据患者ID查询医嘱列表
*
* @param patientId 患者ID
* @return 医嘱VO列表
*/
@Select("SELECT o.id, o.patient_id, o.catalog_id, o.total_quantity, " +
"c.usage_unit AS total_unit, c.name AS item_name " +
"FROM his_outpatient_order o " +
"LEFT JOIN his_medical_catalog c ON o.catalog_id = c.id " +
"WHERE o.patient_id = #{patientId} AND o.status = 0")
List<OrderVO> selectOrdersByPatientId(@Param("patientId") Long patientId);
}

View File

@@ -0,0 +1,18 @@
package com.openhis.web.outpatient.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* 门诊医嘱视图对象
* 修复 Bug #561新增 totalUnit 字段映射诊疗目录配置的使用单位
*/
@Data
public class OrderVO {
private Long id;
private Long patientId;
private Long catalogId;
private String itemName;
private BigDecimal totalQuantity;
private String totalUnit; // 对应 his_medical_catalog.usage_unit
}