123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?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.diagbot.mapper.TranLisConfigMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.diagbot.entity.TranLisConfig">
- <id column="id" property="id" />
- <result column="is_deleted" property="isDeleted" />
- <result column="gmt_create" property="gmtCreate" />
- <result column="gmt_modified" property="gmtModified" />
- <result column="creator" property="creator" />
- <result column="modifier" property="modifier" />
- <result column="hospital_code" property="hospitalCode" />
- <result column="meal_name" property="mealName" />
- <result column="item_name" property="itemName" />
- <result column="unique_id" property="uniqueId" />
- <result column="unique_name" property="uniqueName" />
- </resultMap>
- <select id="getLisConfigByhospitalIds" resultType="com.diagbot.dto.LisConfigDTO">
- SELECT CONCAT(IFNULL(meal_name,""),"--",IFNULL(item_name,"")) AS
- assembly ,a.*
- FROM tran_lis_config a WHERE a.is_deleted = 'N'
- <if test="hospitalCode!=null">
- AND hospital_code = #{hospitalCode}
- </if>
- <if test="assemblys!=null">
- AND CONCAT(IFNULL(meal_name,""),"--",IFNULL(item_name,"")) IN
- <foreach collection="assemblys" item="assemblys" open="(" close=")" separator=",">
- #{assemblys}
- </foreach>
- </if>
- </select>
- <select id="getLisConfigByNamesAndHosCode" resultType="com.diagbot.dto.LisConfigDTO">
- SELECT *
- FROM tran_lis_config a WHERE a.is_deleted = 'N'
- <if test="hosCode!=null">
- AND hospital_code = #{hosCode}
- </if>
- <if test="mealName!=null">
- AND meal_name = #{mealName}
- </if>
- <if test="itemName!=null">
- AND item_name = #{itemName}
- </if>
- </select>
- </mapper>
|