生物安全排序

This commit is contained in:
2025-10-13 13:27:02 +08:00
parent f331f35a5c
commit 6f12dd7231
13 changed files with 115 additions and 16 deletions

View File

@@ -33,13 +33,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
<include refid="selectDewormVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<where>
<if test="sheepId != null">and sheep_id = #{sheepId}</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>
<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>
ORDER BY datetime DESC
<!-- 基准排序:日期永远第一序,降序 -->
ORDER BY datetime DESC
<!-- 第二序:仅当用户点击月龄/胎次时追加 -->
<choose>
<when test="orderByColumn == 'monthAge'">, month_age ${isAsc}</when>
<when test="orderByColumn == 'parity'">, parity ${isAsc}</when>
</choose>
</select>
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">