Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
2026-04-02 17:54:31 +08:00
19 changed files with 905 additions and 87 deletions

View File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.web.datadictionary.mapper.LabActivityDefinitionManageMapper">
<!-- 检验项目分页查询(操作 lab_activity_definition 表,无物理外键) -->
<select id="getLabActivityDefinitionPage" parameterType="java.util.Map"
resultType="com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto">
SELECT
T1.id,
T1.category_code,
T1.bus_no,
T1.name,
T1.py_str,
T1.wb_str,
T1.type_enum,
T1.permitted_unit_code,
T1.org_id,
T1.location_id,
T1.yb_flag,
T1.yb_no,
T1.yb_match_flag,
T1.status_enum,
T1.body_site_code,
T1.specimen_code,
T1.description_text,
T1.rule_id,
T1.tenant_id,
T1.chrgitm_lv,
T1.children_json,
T1.pricing_flag,
T1.sort_order,
T1.service_range,
T1.inspection_type_id,
T1.fee_package_id,
T1.sub_item_id,
T3.name AS test_type,
T5.package_name,
T6.name AS sub_item_name
FROM lab_activity_definition T1
/* 检验类型关联(逻辑关联,无外键) */
LEFT JOIN inspection_type T3
ON T1.inspection_type_id = T3.id
AND T3.valid_flag = 1
/* 费用套餐关联(逻辑关联,无外键) */
LEFT JOIN inspection_basic_information T5
ON T1.fee_package_id = T5.basic_information_id
AND T5.del_flag = false
/* 下级医技类型关联(逻辑关联,无外键) */
LEFT JOIN inspection_type T6
ON T1.sub_item_id = T6.id
AND T6.valid_flag = 1
<where>
T1.delete_flag = '0'
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
<choose>
<when test="ew.customSqlSegment.contains('tenant_id')">
${ew.customSqlSegment.replaceFirst('tenant_id', 'T1.tenant_id').replaceFirst('status_enum', 'T1.status_enum').replaceFirst('WHERE', 'AND')}
</when>
<otherwise>
${ew.customSqlSegment.replaceFirst('status_enum', 'T1.status_enum').replaceFirst('WHERE', 'AND')}
</otherwise>
</choose>
</if>
</where>
ORDER BY T1.id DESC
</select>
<!-- 检验项目详情 -->
<select id="getLabActivityDefinitionOne" resultType="com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto">
SELECT
T1.id,
T1.category_code,
T1.bus_no,
T1.name,
T1.py_str,
T1.wb_str,
T1.type_enum,
T1.permitted_unit_code,
T1.org_id,
T1.location_id,
T1.yb_flag,
T1.yb_no,
T1.yb_match_flag,
T1.status_enum,
T1.body_site_code,
T1.specimen_code,
T1.description_text,
T1.rule_id,
T1.tenant_id,
T1.chrgitm_lv,
T1.children_json,
T1.pricing_flag,
T1.sort_order,
T1.service_range,
T1.inspection_type_id,
T1.fee_package_id,
T1.sub_item_id,
T3.name AS test_type,
T5.package_name,
T6.name AS sub_item_name
FROM lab_activity_definition T1
LEFT JOIN inspection_type T3
ON T1.inspection_type_id = T3.id
AND T3.valid_flag = 1
LEFT JOIN inspection_basic_information T5
ON T1.fee_package_id = T5.basic_information_id
AND T5.del_flag = false
LEFT JOIN inspection_type T6
ON T1.sub_item_id = T6.id
AND T6.valid_flag = 1
<where>
T1.delete_flag = '0'
<if test="id != null">
AND T1.id = #{id}
</if>
<if test="tenantId != null">
AND T1.tenant_id = #{tenantId}
</if>
</where>
</select>
<!-- 检验项目下拉列表(轻量级) -->
<select id="getLabActivityDefinitionSimpleList" resultType="com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto">
SELECT
T1.id,
T1.bus_no,
T1.name,
T1.permitted_unit_code
FROM lab_activity_definition T1
WHERE T1.delete_flag = '0'
AND T1.status_enum = #{statusEnum}
AND T1.tenant_id = #{tenantId}
<if test="searchKey != null and searchKey != ''">
AND (
T1.name LIKE CONCAT('%', #{searchKey}, '%')
OR T1.bus_no LIKE CONCAT('%', #{searchKey}, '%')
OR T1.py_str LIKE CONCAT('%', #{searchKey}, '%')
)
</if>
ORDER BY T1.id DESC
<if test="searchKey != null and searchKey != ''">
LIMIT 1500
</if>
<if test="searchKey == null or searchKey == ''">
LIMIT 500
</if>
</select>
</mapper>