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.
udi-wms-java/src/main/resources/mybatis/mapper/basic/BasicSkPrescribeDiMapper.xml

62 lines
3.1 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.api.dao.basic.BasicSkPrescribeDiMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicSkPrescribeDiEntity">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="pId" column="pId" jdbcType="BIGINT"/>
<result property="sickerCode" column="sickerCode" jdbcType="VARCHAR"/>
<result property="prescribeCode" column="prescribeCode" jdbcType="VARCHAR"/>
<result property="relId" column="relId" jdbcType="BIGINT"/>
<result property="thrName" column="thrName" jdbcType="VARCHAR"/>
<result property="thrCode" column="thrCode" jdbcType="VARCHAR"/>
<result property="measureCount" column="measureCount" jdbcType="VARCHAR"/>
<result property="measureUnit" column="measureUnit" jdbcType="VARCHAR"/>
<result property="category" column="category" jdbcType="VARCHAR"/>
<result property="frequency" column="frequency" jdbcType="VARCHAR"/>
<result property="count" column="count" jdbcType="INTEGER"/>
<result property="price" column="price" jdbcType="DECIMAL"/>
<result property="ggxh" column="ggxh" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<select id="filterList" parameterType="com.glxp.api.req.basic.BasicSkPrescribeDiRequest"
resultType="com.glxp.api.res.basic.BasicSkPrescribeDiResponse">
SELECT bspid.*, bp.nameCode diCode, bp.zczbhhzbapzbh, bp.manufactory
FROM basic_sk_prescribe_item_detail bspid
left join basic_udirel bu on bspid.relId = bu.id
left join basic_products bp on bu.uuid = bp.uuid
<where>
<if test="sickerCode != '' and sickerCode != null">
AND sickerCode LIKE concat('%', #{sickerCode}, '%')
</if>
<if test="prescribeCode != null and prescribeCode != ''">
AND prescribeCode = #{prescribeCode}
</if>
<if test="adNum != null and adNum != ''">
AND adNum = #{adNum}
</if>
<if test="relId != null and relId != ''">
AND relId = #{relId}
</if>
<if test="thrName != null and thrName != ''">
AND thrName LIKE concat('%', #{thrName}, '%')
</if>
<if test="unionCode != '' and unionCode != null">
and (
bp.nameCode LIKE concat('%', #{unionCode}, '%')
or bp.ybbm LIKE concat('%', #{unionCode}, '%')
or bp.sptm LIKE concat('%', #{unionCode}, '%'))
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%', #{ggxh}, '%')
</if>
</where>
</select>
</mapper>