This commit is contained in:
2025-07-23 18:33:08 +08:00
parent a934780e6f
commit 896d12b9b1
12 changed files with 123 additions and 482 deletions

View File

@@ -7,12 +7,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="Deworm" id="DewormResult">
<result property="id" column="id" />
<result property="sheepId" column="sheep_id" />
<result property="sheepNo" column="sheep_no"/>
<result property="usageId" column="usage_id" />
<result property="variety" column="variety" />
<result property="sheepType" column="sheep_type" />
<result property="gender" column="gender" />
<result property="monthAge" column="month_age" />
<result property="parity" column="parity" />
<result property="breed" column="breed"/>
<result property="datetime" column="datetime" />
<result property="technical" column="technical" />
<result property="comment" column="comment" />
@@ -23,7 +25,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDewormVo">
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_deworm
select s.id, sheep_id, usage_id, variety, sheep_type, s.gender, month_age, s.parity,breed, datetime, technical, s.comment, s.update_by, s.update_time, s.create_by, s.create_time,
bs.manage_tags sheep_no
from sw_deworm s
left join bas_sheep bs on s.sheep_id = bs.id
</sql>
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
@@ -37,43 +42,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">
<include refid="selectDewormVo"/>
where id = #{id}
where s.id = #{id}
</select>
<insert id="insertDeworm" parameterType="Deworm" useGeneratedKeys="true" keyProperty="id">
<insert id="insertDeworm" parameterType="java.util.List">
insert into sw_deworm
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sheepId != null">sheep_id,</if>
<if test="usageId != null">usage_id,</if>
<if test="variety != null">variety,</if>
<if test="sheepType != null">sheep_type,</if>
<if test="gender != null">gender,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="datetime != null">datetime,</if>
<if test="technical != null">technical,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepId != null">#{sheepId},</if>
<if test="usageId != null">#{usageId},</if>
<if test="variety != null">#{variety},</if>
<if test="sheepType != null">#{sheepType},</if>
<if test="gender != null">#{gender},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="datetime != null">#{datetime},</if>
<if test="technical != null">#{technical},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
(sheep_id, usage_id, variety, sheep_type, gender, month_age,
parity, breed,datetime, technical, comment,
update_by, update_time, create_by, create_time)
values
<foreach collection="list" item="d" separator=",">
(#{d.sheepId}, #{d.usageId}, #{d.variety}, #{d.sheepType},
#{d.gender}, #{d.monthAge}, #{d.parity},#{d.breed}, #{d.datetime},
#{d.technical}, #{d.comment},
#{d.updateBy}, #{d.updateTime}, #{d.createBy}, #{d.createTime})
</foreach>
</insert>
<update id="updateDeworm" parameterType="Deworm">

View File

@@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="gender" column="gender" />
<result property="monthAge" column="month_age" />
<result property="parity" column="parity" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="breed" column="breed" />
<result property="technical" column="technical" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectHealthVo">
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, technical, comment, update_by, update_time, create_by, create_time from sw_health
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, breed, technical, comment, update_by, update_time, create_by, create_time from sw_health
</sql>
<select id="selectHealthList" parameterType="Health" resultMap="HealthResult">
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gender != null">gender,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="breed != null">breed,</if>
<if test="technical != null">technical,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gender != null">#{gender},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="breed != null">#{breed},</if>
<if test="technical != null">#{technical},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
@@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gender != null">gender = #{gender},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="breed != null">breed = #{breed},</if>
<if test="technical != null">technical = #{technical},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>

View File

@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="gender" column="gender" />
<result property="monthAge" column="month_age" />
<result property="parity" column="parity" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="breed" column="breed" />
<result property="datetime" column="datetime" />
<result property="technical" column="technical" />
<result property="comment" column="comment" />
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectImmunityVo">
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, breed, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity
</sql>
<select id="selectImmunityList" parameterType="Immunity" resultMap="ImmunityResult">
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gender != null">gender,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="breed != null">breed,</if>
<if test="datetime != null">datetime,</if>
<if test="technical != null">technical,</if>
<if test="comment != null">comment,</if>
@@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gender != null">#{gender},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="breed != null">#{breed},</if>
<if test="datetime != null">#{datetime},</if>
<if test="technical != null">#{technical},</if>
<if test="comment != null">#{comment},</if>
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gender != null">gender = #{gender},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="breed != null">breed = #{breed},</if>
<if test="datetime != null">datetime = #{datetime},</if>
<if test="technical != null">technical = #{technical},</if>
<if test="comment != null">comment = #{comment},</if>