转场,转群,改耳号,改备注,改品种部分bug修复,字段顺序调整

This commit is contained in:
zyh
2026-02-03 14:41:28 +08:00
parent 4ab62cd1f2
commit 2f6a1a9600
30 changed files with 516 additions and 271 deletions

View File

@@ -25,8 +25,10 @@
SELECT t.*,
bv.variety AS varietyName,
bs.manage_tags AS manageTags,
sf.sheepfold_name AS sheepfoldName,
t.event_type AS eventType,
t.transition_date AS transitionDate,
dr.ranch AS currentRanchName,
CASE t.trans_type
WHEN 0 THEN '内部调拨'
WHEN 1 THEN '内部销售'
@@ -42,6 +44,8 @@
FROM sc_transition_info t
LEFT JOIN bas_sheep bs ON t.sheep_id = bs.id
LEFT JOIN bas_sheep_variety bv ON bs.variety_id = bv.id
LEFT JOIN da_sheepfold sf ON t.sheepfold_id = sf.id
LEFT JOIN da_ranch dr ON bs.ranch_id = dr.id
</sql>
<select id="selectScTransitionInfoList" resultMap="ScTransitionInfoResult">
@@ -61,6 +65,18 @@
<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="sc.technician != null and sc.technician != ''">
and t.technician like concat('%', #{sc.technician}, '%')
</if>
<if test="sc.isDelete != null">
and bs.is_delete = #{sc.isDelete}
</if>
<if test="sc.sheepTypeId != null">
and bs.type_id = #{sc.sheepTypeId}
</if>
<if test="sc.currentRanchId != null">
and bs.ranch_id = #{sc.currentRanchId}
</if>
</where>
ORDER BY t.create_time DESC
</select>
@@ -155,7 +171,6 @@
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
ORDER BY bs.manage_tags LIMIT 50
</select>
</mapper>