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