You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.0 KiB
XML

<?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.glxp.udi.admin.dao.inout.DruginfoDao">
<select id="listDrugInfo" parameterType="com.glxp.udi.admin.req.inout.DrugInfoRequest"
resultType="com.glxp.udi.admin.entity.inout.Druginfo">
SELECT *
FROM druginfo WHERE ( coName like concat('%',#{coName},'%')) order by coName,unit
</select>
<select id="filterDrugInfo" parameterType="com.glxp.udi.admin.req.inout.DrugFilterRequest"
resultType="com.glxp.udi.admin.entity.inout.Druginfo">
SELECT *
FROM druginfo
<where>
<if test="coName != ''">
and coName like concat('%',#{coName},'%')
</if>
<if test="unit != ''">
and unit like concat(#{unit},'%')
</if>
<if test="nameCode != ''">
and nameCode like concat(#{nameCode},'%')
</if>
<if test="authCode != ''">
and authCode like concat(#{authCode},'%')
</if>
</where>
</select>
<select id="getSimplyDrugs" parameterType="Map" resultType="com.glxp.udi.admin.entity.inout.Druginfo">
SELECT *
FROM druginfo WHERE (
coName = #{coName} and packRatio = #{packRatio} and packSpec = #{packSpec}) order by packlevel desc
</select>
<select id="getDrugsByUuid" parameterType="Map" resultType="com.glxp.udi.admin.entity.inout.Druginfo">
SELECT *
FROM druginfo WHERE (
uuid = #{uuid} ) order by packlevel desc
</select>
<select id="isExit" parameterType="Map" resultType="java.lang.String">
SELECT 1
FROM productinfo WHERE (
nameCode = #{nameCode} ) limit 1
</select>
<select id="selectByNamecode" parameterType="Map" resultType="com.glxp.udi.admin.entity.inout.Druginfo">
SELECT *
FROM druginfo WHERE (
nameCode = #{nameCode} ) limit 1
</select>
</mapper>