Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -102,7 +102,30 @@
|
||||
and sm.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sm.create_time DESC
|
||||
<if test="orderBy != null and orderBy != '' and sortDirection != null and sortDirection != ''">
|
||||
ORDER BY
|
||||
<choose>
|
||||
<when test="orderBy == 'weaningWeight'">bs.weaning_weight</when>
|
||||
<when test="orderBy == 'bodyLength'">sm.body_length</when>
|
||||
<when test="orderBy == 'birthWeight'">bs.birth_weight</when>
|
||||
<when test="orderBy == 'currentWeight'">bs.current_weight</when>
|
||||
<when test="orderBy == 'lactationDay'">bs.lactation_day</when>
|
||||
<when test="orderBy == 'gestationDay'">bs.gestation_day</when>
|
||||
<when test="orderBy == 'postMatingDay'">post_mating_day</when>
|
||||
<when test="orderBy == 'parity'">bs.parity</when>
|
||||
<when test="orderBy == 'height'">sm.height</when>
|
||||
<when test="orderBy == 'bust'">sm.bust</when>
|
||||
<when test="orderBy == 'pipeLength'">sm.pipe_length</when>
|
||||
<when test="orderBy == 'chestDepth'">sm.chest_depth</when>
|
||||
<when test="orderBy == 'hipHeight'">sm.hip_height</when>
|
||||
<when test="orderBy == 'rumpWidth'">sm.rump_width</when>
|
||||
<when test="orderBy == 'rumpHeignt'">sm.rump_heignt</when>
|
||||
<when test="orderBy == 'hipWidth'">sm.hip_width</when>
|
||||
<when test="orderBy == 'hipCrossHeight'">sm.hip_cross_height</when>
|
||||
<otherwise>${orderBy}</otherwise>
|
||||
</choose>
|
||||
${sortDirection}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectScBodyMeasureById" parameterType="Long" resultMap="ScBodyMeasureResult">
|
||||
|
||||
@@ -58,7 +58,12 @@
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sbs.create_time DESC
|
||||
<if test="orderBy != null and orderBy != '' and sortDirection != null and sortDirection != ''">
|
||||
ORDER BY sbs.${orderBy} ${sortDirection}
|
||||
</if>
|
||||
<if test="(orderBy == null or orderBy == '') or (sortDirection == null or sortDirection == '')">
|
||||
ORDER BY sbs.create_time DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectScBodyScoreById" parameterType="Long" resultMap="ScBodyScoreResult">
|
||||
|
||||
@@ -56,7 +56,13 @@
|
||||
and sbr.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sbr.create_time DESC
|
||||
<if test="orderBy != null and orderBy != '' and sortDirection != null and sortDirection != ''">
|
||||
ORDER BY sbr.${orderBy} ${sortDirection}
|
||||
</if>
|
||||
<if test="(orderBy == null or orderBy == '') or (sortDirection == null or sortDirection == '')">
|
||||
ORDER BY sbr.create_time DESC
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectScBreastRatingById" parameterType="Long" resultMap="ScBreastRatingResult">
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<result property="oldComment" column="old_comment"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="eventDate" column="event_date"/>
|
||||
<result property="technician" column="technician"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScChangeCommentVo">
|
||||
@@ -25,7 +27,9 @@
|
||||
scc.new_comment,
|
||||
scc.old_comment,
|
||||
scc.create_by,
|
||||
scc.create_time
|
||||
scc.create_time,
|
||||
scc.event_date,
|
||||
scc.technician
|
||||
from sc_change_comment scc
|
||||
left join bas_sheep bs on scc.sheep_id = bs.id
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
@@ -48,6 +52,10 @@
|
||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and scc.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 scc.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY scc.create_time DESC
|
||||
</select>
|
||||
@@ -65,6 +73,8 @@
|
||||
<if test="oldComment != null and oldComment != ''">old_comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="eventDate != null">event_date,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null and sheepId != ''">#{sheepId},</if>
|
||||
@@ -72,6 +82,8 @@
|
||||
<if test="oldComment != null and oldComment != ''">#{oldComment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="eventDate != null">#{eventDate},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -16,24 +16,28 @@
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="eventDate" column="event_date"/>
|
||||
<result property="technician" column="technician"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScChangeEarVo">
|
||||
select sce.id as sce_id,
|
||||
select sce.id as sce_id,
|
||||
sce.sheep_id,
|
||||
bs.manage_tags as manage_tags,
|
||||
bs.manage_tags as manage_tags,
|
||||
sf.sheepfold_name as sheepfold_name,
|
||||
case
|
||||
when sce.ear_type = 0 then '改电子耳号'
|
||||
when sce.ear_type = 1 then '改管理耳号'
|
||||
else ''
|
||||
end as event_type,
|
||||
end as event_type,
|
||||
sce.ear_type,
|
||||
sce.newTag,
|
||||
sce.oldTag as oldTag,
|
||||
sce.oldTag as oldTag,
|
||||
sce.comment,
|
||||
sce.create_by,
|
||||
sce.create_time
|
||||
sce.create_time,
|
||||
sce.event_date,
|
||||
sce.technician
|
||||
from sc_change_ear sce
|
||||
LEFT JOIN bas_sheep bs ON sce.sheep_id = bs.id
|
||||
LEFT JOIN da_sheepfold sf ON bs.sheepfold_id = sf.id
|
||||
@@ -44,7 +48,11 @@
|
||||
<where>
|
||||
<if test="sheepId != null">and sce.sheep_id = #{sheepId}</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
and (
|
||||
bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
OR
|
||||
bs.electronic_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="sheepfoldName != null and sheepfoldName != ''">
|
||||
@@ -60,6 +68,10 @@
|
||||
<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>
|
||||
</where>
|
||||
ORDER BY sce.create_time DESC
|
||||
</select>
|
||||
@@ -79,6 +91,8 @@
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="eventDate != null">event_date,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
@@ -88,6 +102,8 @@
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="eventDate != null">#{eventDate},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="eventDate" column="event_date"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScChangeVarietyVo">
|
||||
@@ -27,7 +29,9 @@
|
||||
scv.variety_new,
|
||||
scv.comment,
|
||||
scv.create_by,
|
||||
scv.create_time
|
||||
scv.create_time,
|
||||
scv.technician,
|
||||
scv.event_date
|
||||
from sc_change_variety scv
|
||||
left join bas_sheep bs on scv.sheep_id = bs.id
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
@@ -51,6 +55,10 @@
|
||||
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>
|
||||
</where>
|
||||
ORDER BY scv.create_time DESC
|
||||
</select>
|
||||
@@ -69,6 +77,8 @@
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if> <!-- 新增 -->
|
||||
<if test="eventDate != null">event_date,</if> <!-- 新增 -->
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
@@ -77,6 +87,8 @@
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if> <!-- 新增 -->
|
||||
<if test="eventDate != null">#{eventDate},</if> <!-- 新增 -->
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and s.manage_tags like concat('%', #{manageTags}, '%')
|
||||
</if>
|
||||
<if test="eventType != null">and tg.event_type = #{eventType}</if>
|
||||
<!-- <if test="eventType != null">and tg.event_type = #{eventType}</if>-->
|
||||
<if test="params.beginTransDate != null and params.beginTransDate != '' and params.endTransDate != null and params.endTransDate != ''">
|
||||
and tg.trans_date between #{params.beginTransDate} and #{params.endTransDate}
|
||||
</if>
|
||||
@@ -67,9 +67,9 @@
|
||||
<if test="status != null">and status = #{status}</if>
|
||||
<if test="varietyId != null">and tg.variety_id = #{varietyId}</if>
|
||||
<if test="sheepTypeId != null">and st.id = #{sheepTypeId}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and tg.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<!-- <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">-->
|
||||
<!-- and tg.create_time between #{params.beginCreateTime} and #{params.endCreateTime}-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
ORDER BY tg.create_time DESC
|
||||
</select>
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
</if>
|
||||
<if test="eventType != null and eventType != ''">
|
||||
and t.event_type = #{eventType}
|
||||
</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 != ''">
|
||||
@@ -63,9 +63,9 @@
|
||||
<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>
|
||||
<!-- <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>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="eventDate" column="eventDate"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScCastrateVo">
|
||||
@@ -31,7 +32,8 @@
|
||||
sc.comment,
|
||||
sc.technician,
|
||||
sc.create_by,
|
||||
sc.create_time
|
||||
sc.create_time,
|
||||
sc.event_date as eventDate
|
||||
from sc_castrate sc
|
||||
left join bas_sheep bs on sc.sheep_id = bs.id
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
@@ -51,6 +53,9 @@
|
||||
<if test="params.beginCreateTime != null and params.endCreateTime != null">
|
||||
and sc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.endEventDate != null">
|
||||
and sc.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sc.create_time DESC
|
||||
</select>
|
||||
@@ -70,6 +75,7 @@
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="eventDate != null">event_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
@@ -79,6 +85,7 @@
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="eventDate != null">#{eventDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="eventDate" column="eventDate"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScFixHoofVo">
|
||||
@@ -28,7 +29,8 @@
|
||||
fh.comment,
|
||||
fh.technician,
|
||||
fh.create_by,
|
||||
fh.create_time
|
||||
fh.create_time,
|
||||
fh.event_date as eventDate
|
||||
from sc_fix_hoof fh
|
||||
left join bas_sheep bs on fh.sheep_id = bs.id
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
@@ -47,6 +49,10 @@
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and fh.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fh.create_time DESC
|
||||
</select>
|
||||
@@ -64,6 +70,7 @@
|
||||
variety_id,
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
<if test="eventDate != null and eventDate != ''">event_date,</if>
|
||||
create_by,
|
||||
create_time)
|
||||
VALUES
|
||||
@@ -72,6 +79,7 @@
|
||||
<if test="varietyId != null">#{varietyId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
<if test="eventDate != null and eventDate != ''">#{eventDate},</if>
|
||||
#{createBy},
|
||||
#{createTime})
|
||||
</insert>
|
||||
|
||||
Reference in New Issue
Block a user