Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="statusId != null "> and status_id = #{statusId}</if>
|
||||
<if test="breed != null and breed != ''"> and breed = #{breed}</if>
|
||||
</where>
|
||||
ORDER BY id ASC <!-- 修改为升序 -->
|
||||
</select>
|
||||
|
||||
<select id="selectSheepFileById" parameterType="Long" resultMap="SheepFileResult">
|
||||
@@ -260,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
|
||||
<!-- <!– 查询所有公羊(gender=2) –>-->
|
||||
|
||||
@@ -35,26 +35,31 @@
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScChangeCommentList" parameterType="ScChangeComment" resultMap="ScChangeCommentResult">
|
||||
<select id="selectScChangeCommentList" resultMap="ScChangeCommentResult">
|
||||
<include refid="selectScChangeCommentVo"/>
|
||||
<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="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="newComment != null and newComment != ''">
|
||||
and scc.new_comment like concat('%', #{newComment}, '%')
|
||||
<if test="sc.sheepfoldId != null">
|
||||
and bs.sheepfold_id = #{sc.sheepfoldId}
|
||||
</if>
|
||||
<if test="oldComment != null and oldComment != ''">
|
||||
and scc.old_comment like concat('%', #{oldComment}, '%')
|
||||
<if test="sc.newComment != null and sc.newComment != ''">
|
||||
and scc.new_comment like concat('%', #{sc.newComment}, '%')
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''
|
||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and scc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
<if test="sc.oldComment != null and sc.oldComment != ''">
|
||||
and scc.old_comment like concat('%', #{sc.oldComment}, '%')
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and scc.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != ''
|
||||
and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and scc.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != ''
|
||||
and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||
and scc.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY scc.create_time DESC
|
||||
@@ -111,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>
|
||||
@@ -43,34 +43,27 @@
|
||||
LEFT JOIN da_sheepfold sf ON bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScChangeEarList" parameterType="ScChangeEar" resultMap="ScChangeEarResult">
|
||||
<select id="selectScChangeEarList" resultMap="ScChangeEarResult">
|
||||
<include refid="selectScChangeEarVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null">and sce.sheep_id = #{sheepId}</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and (
|
||||
bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
OR
|
||||
bs.electronic_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
)
|
||||
<if test="sc.sheepId != null">and sce.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
(bs.manage_tags like concat('%', #{tag}, '%')
|
||||
or bs.electronic_tags like concat('%', #{tag}, '%'))
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="sheepfoldName != null and sheepfoldName != ''">
|
||||
and sf.sheepfold_name LIKE CONCAT('%', #{sheepfoldName}, '%')
|
||||
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
|
||||
<if test="sc.earType != null">and sce.ear_type = #{sc.earType}</if>
|
||||
<if test="sc.newTag != null and sc.newTag != ''">and sce.newTag like concat('%', #{sc.newTag}, '%')</if>
|
||||
<if test="sc.oldTag != null and sc.oldTag != ''">and sce.oldTag like concat('%', #{sc.oldTag}, '%')</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 sce.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="earType != null ">and sce.ear_type = #{earType}</if>
|
||||
<if test="newTag != null and newTag != ''">
|
||||
and sce.newTag LIKE CONCAT('%', #{newTag}, '%')
|
||||
</if>
|
||||
<if test="oldTag != null and oldTag != ''">
|
||||
and sce.oldTag LIKE CONCAT('%', #{oldTag}, '%')
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and sce.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and sce.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 sce.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sce.create_time DESC
|
||||
@@ -133,4 +126,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>
|
||||
@@ -37,27 +37,26 @@
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScChangeVarietyList" parameterType="ScChangeVariety" resultMap="ScChangeVarietyResult">
|
||||
<select id="selectScChangeVarietyList" resultMap="ScChangeVarietyResult">
|
||||
<include refid="selectScChangeVarietyVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null">and scv.sheep_id = #{sheepId}</if>
|
||||
<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="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="varietyOld != null and varietyOld != ''">
|
||||
and scv.variety_old like concat('%', #{varietyOld}, '%')
|
||||
|
||||
<!-- 其余统一加 sc. 前缀 -->
|
||||
<if test="sc.sheepId != null">and scv.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
|
||||
<if test="sc.varietyOld != null and sc.varietyOld != ''">and scv.variety_old like concat('%', #{sc.varietyOld}, '%')</if>
|
||||
<if test="sc.varietyNew != null and sc.varietyNew != ''">and scv.variety_new like concat('%', #{sc.varietyNew}, '%')</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 scv.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="varietyNew != null and varietyNew != ''">
|
||||
and scv.variety_new like concat('%', #{varietyNew}, '%')
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''
|
||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and scv.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and scv.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 scv.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY scv.create_time DESC
|
||||
@@ -117,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>
|
||||
@@ -44,28 +44,26 @@
|
||||
LEFT JOIN bas_sheep_variety bv ON bs.variety_id = bv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScTransitionInfoList" parameterType="ScTransitionInfo" resultMap="ScTransitionInfoResult">
|
||||
<select id="selectScTransitionInfoList" resultMap="ScTransitionInfoResult">
|
||||
<include refid="selectScTransitionInfoVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
|
||||
<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="eventType != null and eventType != ''">-->
|
||||
<!-- and t.event_type = #{eventType}-->
|
||||
<!-- </if>-->
|
||||
<if test="transType != null">and t.trans_type = #{transType}</if>
|
||||
<if test="params.beginTransitionDate != null and params.beginTransitionDate != ''
|
||||
and params.endTransitionDate != null and params.endTransitionDate != ''">
|
||||
and t.transition_date between #{params.beginTransitionDate} and #{params.endTransitionDate}
|
||||
|
||||
<!-- 其余统一加 sc. 前缀 -->
|
||||
<if test="sc.sheepId != null">and t.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.transType != null">and t.trans_type = #{sc.transType}</if>
|
||||
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
|
||||
<if test="sc.transTo != null and sc.transTo != ''">and t.trans_to = #{sc.transTo}</if>
|
||||
<if test="sc.transFrom != null and sc.transFrom != ''">and t.trans_from = #{sc.transFrom}</if>
|
||||
<if test="sc.status != null">and t.status = #{sc.status}</if>
|
||||
<if test="sc.params != null and sc.params.beginTransitionDate != null and sc.params.beginTransitionDate != '' and sc.params.endTransitionDate != null and sc.params.endTransitionDate != ''">
|
||||
and t.transition_date between #{sc.params.beginTransitionDate} and #{sc.params.endTransitionDate}
|
||||
</if>
|
||||
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if>
|
||||
<if test="transTo != null and transTo != ''">and trans_to = #{transTo}</if>
|
||||
<if test="transFrom != null and transFrom != ''">and trans_from = #{transFrom}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<!-- <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">-->
|
||||
<!-- and t.create_time between #{params.beginCreateTime} and #{params.endCreateTime}-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
ORDER BY t.create_time DESC
|
||||
</select>
|
||||
@@ -154,4 +152,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>
|
||||
Reference in New Issue
Block a user