体尺测量,体况评分,乳房评分缺失字段的添加,改品种页面展示原品种

This commit is contained in:
zyh
2025-08-14 15:54:50 +08:00
parent 07468b9c00
commit dc34bfcbd4
302 changed files with 102 additions and 27779 deletions

View File

@@ -8,6 +8,18 @@
<result property="id" column="id"/>
<result property="sheepId" column="sheep_id"/>
<result property="manageTags" column="manage_tags"/>
<result property="sheepfoldId" column="sheepfold_id"/>
<result property="sheepfoldName" column="sheepfold_name"/>
<result property="varietyId" column="variety_id"/>
<result property="varietyName" column="variety_name"/>
<result property="eventType" column="event_type"/>
<result property="sheepTypeName" column="sheep_type_name"/>
<result property="measureDate" column="measure_date"/>
<result property="gender" column="gender"/>
<result property="parity" column="parity"/>
<result property="birthWeight" column="birth_weight"/>
<result property="weaningWeight" column="weaning_weight"/>
<result property="currentWeight" column="current_weight"/>
<result property="height" column="height"/>
<result property="bust" column="bust"/>
<result property="bodyLength" column="body_length"/>
@@ -18,6 +30,10 @@
<result property="rumpHeignt" column="rump_heignt"/>
<result property="hipWidth" column="hip_width"/>
<result property="hipCrossHeight" column="hip_cross_height"/>
<result property="breedStatusName" column="breed_status_name"/>
<result property="lactationDay" column="lactation_day"/>
<result property="gestationDay" column="gestation_day"/>
<result property="postMatingDay" column="post_mating_day"/>
<result property="comment" column="comment"/>
<result property="technician" column="technician"/>
<result property="createBy" column="create_by"/>
@@ -28,6 +44,18 @@
select sm.id,
sm.sheep_id,
bs.manage_tags,
ds.id as sheepfold_id,
ds.sheepfold_name,
bsv.id as variety_id,
bsv.variety as variety_name,
'体尺测量' as event_type,
bst.name as sheep_type_name,
sm.measure_date,
bs.gender,
bs.parity,
bs.birth_weight as birth_weight,
bs.weaning_weight as weaning_weight,
bs.current_weight as current_weight,
sm.height,
sm.bust,
sm.body_length,
@@ -38,21 +66,38 @@
sm.rump_heignt,
sm.hip_width,
sm.hip_cross_height,
bbs.breed as breed_status_name,
bs.lactation_day as lactation_day,
bs.gestation_day as gestation_day,
case when bs.mating_date is not null
then DATEDIFF(NOW(), bs.mating_date)
else null
end as post_mating_day,
sm.comment,
sm.technician,
sm.create_by,
sm.create_time
from sc_body_measure sm
left join bas_sheep bs on sm.sheep_id = bs.id
LEFT JOIN bas_sheep bs ON sm.sheep_id = bs.id
LEFT JOIN bas_breed_status bbs ON bs.breed_status_id = bbs.id
LEFT JOIN da_sheepfold ds ON bs.sheepfold_id = ds.id
LEFT JOIN bas_sheep_type bst ON bs.type_id = bst.id
LEFT JOIN bas_sheep_variety bsv ON bs.variety_id = bsv.id
</sql>
<select id="selectScBodyMeasureList" parameterType="ScBodyMeasure" resultMap="ScBodyMeasureResult">
<include refid="selectScBodyMeasureVo"/>
<where>
<if test="sheepId != null ">and sm.sheep_id = #{sheepId}</if>
<if test="params.beginMeasureDate != null and params.endMeasureDate != null">
and sm.measure_date between #{params.beginMeasureDate} and #{params.endMeasureDate}
</if>
<if test="manageTags != null and manageTags != ''">
and bs.manage_tags like concat('%', #{manageTags}, '%')
</if>
<if test="sheepfoldId != null">AND bs.sheepfold_id = #{sheepfoldId}</if>
<if test="varietyId != null">AND bsv.id = #{varietyId}</if>
<if test="sheepTypeId != null">and bs.type_id = #{sheepTypeId}</if>
<if test="params.beginCreateTime != null and params.endCreateTime != null">
and sm.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
@@ -68,6 +113,7 @@
insert into sc_body_measure
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sheepId != null">sheep_id,</if>
<if test="measureDate != null">measure_date,</if>
<if test="height != null">height,</if>
<if test="bust != null">bust,</if>
<if test="bodyLength != null">body_length,</if>
@@ -85,6 +131,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepId != null">#{sheepId},</if>
<if test="measureDate != null">#{measureDate},</if>
<if test="height != null">#{height},</if>
<if test="bust != null">#{bust},</if>
<if test="bodyLength != null">#{bodyLength},</if>
@@ -106,6 +153,7 @@
update sc_body_measure
<trim prefix="SET" suffixOverrides=",">
<if test="sheepId != null">sheep_id = #{sheepId},</if>
<if test="measureDate != null">measure_date = #{measureDate},</if>
<if test="height != null">height = #{height},</if>
<if test="bust != null">bust = #{bust},</if>
<if test="bodyLength != null">body_length = #{bodyLength},</if>