修改根据耳号进行查询
This commit is contained in:
@@ -32,10 +32,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectImmunityList" parameterType="Immunity" resultMap="ImmunityResult">
|
||||
<include refid="selectImmunityVo"/>
|
||||
select s.id, datetime, sheep_id, usage_id, variety, sheep_type, s.gender, month_age, s.parity, breed, technical,
|
||||
s.comment, s.update_by, s.update_time, s.create_by, s.create_time,
|
||||
bs.manage_tags sheep_no
|
||||
from sw_immunity s
|
||||
left join bas_sheep bs on s.sheep_id = bs.id
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepType != null "> and sheep_type = #{sheepType}</if>
|
||||
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||
</where>
|
||||
|
||||
Reference in New Issue
Block a user