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

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

@@ -40,21 +40,22 @@
left join bas_sheep_variety bv on bs.variety_id = bv.id
</sql>
<select id="selectScCastrateList" parameterType="ScCastrate" resultMap="ScCastrateResult">
<select id="selectScCastrateList" resultMap="ScCastrateResult">
<include refid="selectScCastrateVo"/>
<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="sheepfold != null ">and bs.sheepfold_id = #{sheepfold}</if>
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if>
<if test="technician != null and technician != ''">and sc.technician like concat('%', #{technician}, '%')
<if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
<if test="sc.technician != null and sc.technician != ''">and sc.technician like concat('%', #{sc.technician}, '%')</if>
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
and sc.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
</if>
<if test="params.beginCreateTime != null and params.endCreateTime != null">
and sc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="params.beginEventDate != null and params.endEventDate != null">
and sc.event_date between #{params.beginEventDate} and #{params.endEventDate}
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
and sc.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
</if>
</where>
ORDER BY sc.create_time DESC
@@ -115,4 +116,13 @@
#{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>