select sm.id,
sm.sheep_id,
bs.manage_tags,
sm.height,
sm.bust,
sm.body_length,
sm.pipe_length,
sm.chest_depth,
sm.hip_height,
sm.rump_width,
sm.rump_heignt,
sm.hip_width,
sm.hip_cross_height,
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
insert into sc_body_measure
sheep_id,
height,
bust,
body_length,
pipe_length,
chest_depth,
hip_height,
rump_width,
rump_heignt,
hip_width,
hip_cross_height,
comment,
technician,
create_by,
create_time,
#{sheepId},
#{height},
#{bust},
#{bodyLength},
#{pipeLength},
#{chestDepth},
#{hipHeight},
#{rumpWidth},
#{rumpHeignt},
#{hipWidth},
#{hipCrossHeight},
#{comment},
#{technician},
#{createBy},
#{createTime},
update sc_body_measure
sheep_id = #{sheepId},
height = #{height},
bust = #{bust},
body_length = #{bodyLength},
pipe_length = #{pipeLength},
chest_depth = #{chestDepth},
hip_height = #{hipHeight},
rump_width = #{rumpWidth},
rump_heignt = #{rumpHeignt},
hip_width = #{hipWidth},
hip_cross_height = #{hipCrossHeight},
comment = #{comment},
technician = #{technician},
create_by = #{createBy},
create_time = #{createTime},
where id = #{id}
delete
from sc_body_measure
where id = #{id}
delete from sc_body_measure where id in
#{id}