转群,体尺测量,体况评分,乳况评分,修蹄,去势部分模糊查询+多耳号输入,排序优化

This commit is contained in:
zyh
2026-01-16 12:34:24 +08:00
parent 1b24e93ae9
commit 21cfba87ea
48 changed files with 310 additions and 176 deletions

View File

@@ -41,22 +41,24 @@
left join da_sheepfold sf on bs.sheepfold_id = sf.id
</sql>
<select id="selectScBreastRatingList" parameterType="ScBreastRating" resultMap="ScBreastRatingResult">
<select id="selectScBreastRatingList" resultMap="ScBreastRatingResult">
<include refid="selectScBreastRatingVo"/>
<where>
<if test="manageTags != null and manageTags != ''">
and bs.manage_tags like concat('%', #{manageTags}, '%')
<if test="manageTagsList != null and manageTagsList.size() > 0">
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
bs.manage_tags like concat('%', #{tag}, '%')
</foreach>
</if>
<if test="varietyId != null">and bsv.id = #{varietyId}</if>
<if test="sheepfoldId != null">and sf.id = #{sheepfoldId}</if>
<if test="params.beginEventDate != null and params.endEventDate != null">
and sbr.event_date between #{params.beginEventDate} and #{params.endEventDate}
<if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
<if test="sc.sheepfoldId != null">and sf.id = #{sc.sheepfoldId}</if>
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.endEventDate != null">
and sbr.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
</if>
<if test="params.beginCreateTime != null and params.endCreateTime != null">
and sbr.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.endCreateTime != null">
and sbr.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
</if>
</where>
<if test="true">ORDER BY sbr.create_time DESC</if>
ORDER BY sbr.create_time DESC
</select>
<select id="selectScBreastRatingById" parameterType="Long" resultMap="ScBreastRatingResult">
@@ -127,4 +129,12 @@
#{id}
</foreach>
</delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT bs.manage_tags
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
</select>
</mapper>