生物安全羊只耳号查询

This commit is contained in:
2026-03-06 22:44:16 +08:00
parent 73a6e881e3
commit 6261b65040
35 changed files with 259 additions and 4 deletions

View File

@@ -105,6 +105,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTreatmentStatus" resultMap="TreatmentResult">
select * from sw_treatment where sheep_id = #{sheepId} and status in (0, 1)
</select>
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="Treatment">
SELECT DISTINCT bs.manage_tags
FROM sw_treatment s
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
<where>
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
<if test="sheepNo!=null and sheepNo!= ''">
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
</if>
${params.dataScope}
</where>
ORDER BY bs.manage_tags ASC
</select>
<insert id="insertTreatment" parameterType="Treatment" useGeneratedKeys="true" keyProperty="id">
insert into sw_treatment