insert into temp_sdlist_glt(zllbid,sdzlid,zllb,sdfs,fs,zllrzt,bz,sfbsbz,sdjlid)
values(#{ZLLBID},#{SDZLID},#{ZLLB},#{SDFS},#{FS},#{ZLLRZT},#{BZ},#{SFBSBZ},#{SDJLID})
delete from temp_sdlist_glt
update temp_sdlist_glt a
set zllb = (select zlmc from sdzlsx where zllbid = a.zllbid and rownum = 1)
update sdzlmx
set yxbz = '0'
where sdzlmxid = #{SDZLMXID}
and wdsx = #{WDSX}
and yxbz = '1'
delete from dzzz where sdztid = #{SDZTID} and zllbid = #{ZLLBID}
update sdzl a
set zys = (select count(1) from sdzlmx where sdzlid = a.sdzlid and yxbz = '1' and wdsx = '1')
where sdzlid = #{SDZLID}
update sdzl a
set zllrzt = (select decode(count(1),0,'0','11') from sdzlmx where sdzlid = a.sdzlid and yxbz = '1' and wdsx = '1')
where sdzlid = #{SDZLID}