delete from lab_resultmed and jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh} and xmdh = #{xmdh} and ywdh = #{ywdh} insert into lab_resultmed (jyrq, yq, ybh, xmdh, xh, ywdh, mic, rad, csjg, jgbz, bz, txtresult) values (#{jyrq}, #{yq}, #{ybh}, #{xmdh}, #{xh}, #{ywdh}, #{mic}, #{rad}, #{csjg}, #{jgbz}, #{bz}, #{txtresult}) insert into lab_resultmed (jyrq, yq, ybh,xmdh, xh, ywdh, mic,rad, csjg, jgbz, bz,txtresult) SELECT jyrq, yq, ybh,xmdh, xh, ywdh, mic,rad, csjg, jgbz, bz,txtresult FROM ( SELECT #{item.jyrq} as jyrq, #{item.yq} as yq, #{item.ybh} as ybh, #{item.xmdh} as xmdh, #{item.xh} as xh, #{item.ywdh} as ywdh, #{item.mic} as mic, #{item.rad} as rad, #{item.csjg} as csjg, #{item.jgbz} as jgbz, #{item.bz} as bz,#{item.txtresult} as txtresult ) AS temp update lab_resultmed set xh=#{xh},ywdh=#{ywdh}, mic=#{mic},rad=#{rad}, csjg=#{csjg}, jgbz=#{jgbz},bz=#{bz},txtresult=#{txtresult} and jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh} and xmdh = #{xmdh} and ywdh = #{ywdh}