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

43 lines
1.9 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">
<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>