and su.type = #{type}
and su.name like #{name}
and su.bar_code = #{barCode}
and su.id != #{editId}
insert into sys_warehouse(id, type, name, info_code, bar_code, location1, location2, valid_flag, create_time, update_time,department)
values (#{id}, #{type}, #{name}, #{infoCode}, #{barCode}, #{location1}, #{location2}, 1, now(), now(),#{department})
update sys_warehouse set type=#{type}, name=#{name}, info_code=#{infoCode}, bar_code=#{barCode}, location1=#{location1}, location2=#{location2},
update_time=now(),department=#{department}
where id=#{id}
update sys_warehouse set valid_flag=0, update_time=now()
where id in
#{item}