diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000..bb56dafc18
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,31 @@
+# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
+
+# Ignore git directory.
+/.git/
+
+# Ignore bundler config.
+/.bundle
+
+# Ignore all environment files (except templates).
+/.env*
+!/.env*.erb
+
+# Ignore all default key files.
+/config/master.key
+/config/credentials/*.key
+
+# Ignore all logfiles and tempfiles.
+/log/*
+/tmp/*
+!/log/.keep
+!/tmp/.keep
+
+# Ignore pidfiles, but keep the directory.
+/tmp/pids/*
+!/tmp/pids/.keep
+
+# Ignore storage (uploaded files in development and any SQLite databases).
+/storage/*
+!/storage/.keep
+/tmp/storage/*
+!/tmp/storage/.keep
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc8c165135..451d38915a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,23 @@
+### 1.13.0
+**Species+**
+* Fix security issue
+* Remove .spp suffix from Hybrids
+* Add CITES RST download from the public interface
+* Add new Identification materials documents (csv and pdf)
+* Fix GA missing functions on develop and staging envs
+* Include non standard (EN, ES, FR) languages to autocomplete mview
+* Fix commission notes documents loading
+* Allow matches anywhere in trade permit number string, instead of just the start
+* Add Chinese common names
+* Add first draft of dockerizing the app
+
+**Trade Monitoring Tool**
+* Update csvs
+* Fix downloads when no appendix is submitted
+
+**Checklist**
+* Include EU(Regions) to the geo entity types
+
### 1.12.0
* Allow intersessional decisions to be created without start events or documents
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..c0dbdd9db1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,35 @@
+# Dockerfile
+FROM ruby:2.3.1
+
+# The ruby:2.3.1 image is ancient, based of debian jessie which no longer
+# receives active security updates. Therefore we must declare the debian
+# archive as a source instead.
+RUN rm /etc/apt/sources.list && \
+ echo "deb http://archive.debian.org/debian-security jessie/updates main" \
+ >> /etc/apt/sources.list.d/jessie.list && \
+ echo "deb http://archive.debian.org/debian jessie main" \
+ >> /etc/apt/sources.list.d/jessie.list \
+;
+
+# Rails and SAPI has some additional dependencies, e.g. rake requires a JS
+# runtime, so attempt to get these from apt, where possible
+RUN apt-get update && apt-get install -y --force-yes \
+ libsodium-dev libgmp3-dev libssl-dev \
+ libpq-dev postgresql-client \
+ nodejs \
+ texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra \
+;
+# NB: Postgres client from Debian is 9.4 - not sure if this is acceptable
+
+RUN mkdir /SAPI
+WORKDIR /SAPI
+
+COPY Gemfile /SAPI/Gemfile
+COPY Gemfile.lock /SAPI/Gemfile.lock
+RUN gem install bundler -v 1.17.3
+RUN bundle install
+
+COPY . /SAPI
+
+EXPOSE 3000
+CMD ["rails", "server", "-b", "0.0.0.0"]
diff --git a/Gemfile b/Gemfile
index 8624050c80..c3520a1bca 100644
--- a/Gemfile
+++ b/Gemfile
@@ -116,7 +116,6 @@ group :development do
gem 'jslint_on_rails'
gem 'git_pretty_accept'
gem 'rubocop', '~> 0.40.0', require: false
- gem 'letter_opener'
gem 'rbnacl', '>= 3.2', '< 5.0'
gem 'rbnacl-libsodium'
gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 050cc86168..1cc78f2727 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -265,8 +265,6 @@ GEM
activesupport (>= 3.0.0)
launchy (2.4.3)
addressable (~> 2.3)
- letter_opener (1.4.1)
- launchy (~> 2.2)
listen (0.7.2)
lumberjack (1.0.2)
mail (2.5.5)
@@ -573,7 +571,6 @@ DEPENDENCIES
json_spec (= 1.1.5)
kaminari
launchy
- letter_opener
memcache-client
nested-hstore
nested_form (~> 0.3.2)
diff --git a/app/assets/javascripts/cites_trade/application.js b/app/assets/javascripts/cites_trade/application.js
index 9e7336df88..e722056765 100644
--- a/app/assets/javascripts/cites_trade/application.js
+++ b/app/assets/javascripts/cites_trade/application.js
@@ -786,15 +786,12 @@ $(document).ready(function(){
$.cookie('cites_trade.csv_separator', csv_separator)
query += '&filters[csv_separator]=' + csv_separator;
- // google analytics function only defined on production
- if (typeof(ga) === 'function') {
- ga('send', {
- hitType: 'event',
- eventCategory: 'Downloads: ' + report_type,
- eventAction: 'Format: CSV',
- eventLabel: csv_separator
- });
- }
+ ga('send', {
+ hitType: 'event',
+ eventCategory: 'Downloads: ' + report_type,
+ eventAction: 'Format: CSV',
+ eventLabel: csv_separator
+ });
downloadResults( decodeURIComponent( query ) );
return
}
diff --git a/app/assets/javascripts/species/controllers/downloads_controller.js.coffee b/app/assets/javascripts/species/controllers/downloads_controller.js.coffee
index 7682ecd1ee..f488c2dfe8 100644
--- a/app/assets/javascripts/species/controllers/downloads_controller.js.coffee
+++ b/app/assets/javascripts/species/controllers/downloads_controller.js.coffee
@@ -1,7 +1,7 @@
Species.DownloadsController = Ember.Controller.extend Species.Spinner,
needs: [
'downloadsForCmsListings',
- 'downloadsForCitesListings', 'downloadsForCitesRestrictions',
+ 'downloadsForCitesListings', 'downloadsForCitesRestrictions', 'downloadsForCitesProcesses',
'downloadsForEuListings', 'downloadsForEuDecisions'
]
downloadsPopupVisible: false
@@ -23,6 +23,9 @@ Species.DownloadsController = Ember.Controller.extend Species.Spinner,
legislationIsCitesRestrictions: ( ->
@get('citesLegislation') == 'restrictions'
).property('citesLegislation')
+ legislationIsCitesProcesses: ( ->
+ @get('citesLegislation') == 'processes'
+ ).property('citesLegislation')
legislationIsEuListings: ( ->
@get('euLegislation') == 'listings'
).property('euLegislation')
diff --git a/app/assets/javascripts/species/controllers/downloads_for_cites_listings_controller.js.coffee b/app/assets/javascripts/species/controllers/downloads_for_cites_listings_controller.js.coffee
index 120ea591d8..5f8f9a993e 100644
--- a/app/assets/javascripts/species/controllers/downloads_for_cites_listings_controller.js.coffee
+++ b/app/assets/javascripts/species/controllers/downloads_for_cites_listings_controller.js.coffee
@@ -25,7 +25,7 @@ Species.DownloadsForCitesListingsController = Ember.Controller.extend
}
).filter((e) ->
e.taxonConcepts.length > 0
- )
+ )
else
@get('higherTaxaController.contentByRank')
).property('higherTaxaController.contentByRank.@each', 'taxonConceptQuery')
@@ -103,4 +103,4 @@ Species.DownloadsForCitesListingsController = Ember.Controller.extend
@set('selectedTaxonConcepts', [])
deleteGeoEntitySelection: (context) ->
- @get('selectedGeoEntities').removeObject(context)
\ No newline at end of file
+ @get('selectedGeoEntities').removeObject(context)
diff --git a/app/assets/javascripts/species/controllers/downloads_for_cites_processes_controller.js.coffee b/app/assets/javascripts/species/controllers/downloads_for_cites_processes_controller.js.coffee
new file mode 100644
index 0000000000..8012dcbd8a
--- /dev/null
+++ b/app/assets/javascripts/species/controllers/downloads_for_cites_processes_controller.js.coffee
@@ -0,0 +1,123 @@
+Species.DownloadsForCitesProcessesController = Ember.Controller.extend
+ designation: 'cites'
+
+ needs: ['geoEntities','higherTaxaCitesEu', 'downloads']
+
+ higherTaxaController: ( ->
+ @get('controllers.higherTaxaCitesEu')
+ ).property()
+
+ geoEntityQuery: null
+ taxonConceptQuery: null
+ selectedGeoEntities: []
+ selectedTaxonConcepts: []
+ timeScope: 'current'
+ timeScopeIsCurrent: ( ->
+ @get('timeScope') == 'current'
+ ).property('timeScope')
+ years: [1975..new Date().getFullYear()]
+ selectedYears: []
+ processType: 'Both'
+ documentTypeIsCitesSuspensions: ( ->
+ @get('documentType') == 'CitesSuspensions'
+ ).property('documentType')
+
+ autoCompleteTaxonConcepts: ( ->
+ if @get('taxonConceptQuery') && @get('taxonConceptQuery').length > 0
+ re = new RegExp("^"+@get('taxonConceptQuery'),"i")
+ @get('higherTaxaController.contentByRank')
+ .map((e) =>
+ {
+ rankName: e.rankName
+ taxonConcepts: e.taxonConcepts.filter((item) =>
+ re.test item.get('fullName')
+ )
+ }
+ ).filter((e) ->
+ e.taxonConcepts.length > 0
+ )
+ else
+ @get('higherTaxaController.contentByRank')
+ ).property('higherTaxaController.contentByRank.@each', 'taxonConceptQuery')
+
+ autoCompleteRegions: ( ->
+ if @get('geoEntityQuery') && @get('geoEntityQuery').length > 0
+ re = new RegExp("(^|\\(| )"+@get('geoEntityQuery'),"i")
+ @get('controllers.geoEntities.regions')
+ .filter (item, index, enumerable) =>
+ re.test item.get('name')
+ else
+ @get('controllers.geoEntities.regions')
+ ).property('controllers.geoEntities.regions.@each', 'geoEntityQuery')
+
+ autoCompleteCountries: ( ->
+ if @get('geoEntityQuery') && @get('geoEntityQuery').length > 0
+ re = new RegExp("(^|\\(| )"+@get('geoEntityQuery'),"i")
+ @get('controllers.geoEntities.countries')
+ .filter (item, index, enumerable) =>
+ re.test item.get('name')
+ else
+ @get('controllers.geoEntities.countries')
+ ).property('controllers.geoEntities.countries.@each', 'geoEntityQuery')
+
+ selectedGeoEntitiesIds: ( ->
+ @get('selectedGeoEntities').mapProperty('id')
+ ).property('selectedGeoEntities.@each')
+
+ selectedTaxonConceptsIds: ( ->
+ @get('selectedTaxonConcepts').mapProperty('id')
+ ).property('selectedTaxonConcepts.@each')
+
+ toParams: ( ->
+ {
+ data_type: 'Processes'
+ filters:
+ process_type: @get('processType')
+ designation: @get('designation')
+ geo_entities_ids: @get('selectedGeoEntitiesIds')
+ taxon_concepts_ids: @get('selectedTaxonConceptsIds')
+ set: @get('timeScope')
+ years: @get('selectedYears')
+ csv_separator: @get('controllers.downloads.csvSeparator')
+ }
+ ).property(
+ 'selectedGeoEntitiesIds.@each', 'selectedTaxonConceptsIds.@each',
+ 'timeScope', 'selectedYears.@each', 'processType', 'controllers.downloads.csvSeparator'
+ )
+
+ downloadUrl: ( ->
+ '/species/exports/download?' + $.param(@get('toParams'))
+ ).property('toParams')
+
+ actions:
+ startDownload: () ->
+ @set('downloadInProgress', true)
+ @set('downloadMessage', 'Downloading...')
+ $.ajax({
+ type: 'GET'
+ dataType: 'json'
+ url: @get('downloadUrl')
+ }).done((data) =>
+ @set('downloadInProgress', false)
+ if data.total > 0
+ @set('downloadMessage', null)
+ ga('send', {
+ hitType: 'event',
+ eventCategory: 'Downloads: ' + @get('processType'),
+ eventAction: 'Format: CSV',
+ eventLabel: @get('controllers.downloads.csvSeparator')
+ })
+ window.location = @get('downloadUrl')
+ return
+ else
+ @set('downloadMessage', 'No results')
+ )
+
+ deleteTaxonConceptSelection: (context) ->
+ @set('selectedTaxonConcepts', [])
+
+ deleteGeoEntitySelection: (context) ->
+ @get('selectedGeoEntities').removeObject(context)
+
+ deleteYearSelection: (context) ->
+ @get('selectedYears').removeObject(Number(context))
diff --git a/app/assets/javascripts/species/controllers/elibrary_search_controller.js.coffee b/app/assets/javascripts/species/controllers/elibrary_search_controller.js.coffee
index 0ebb2e3508..846b0ab3dd 100644
--- a/app/assets/javascripts/species/controllers/elibrary_search_controller.js.coffee
+++ b/app/assets/javascripts/species/controllers/elibrary_search_controller.js.coffee
@@ -33,7 +33,8 @@ Species.ElibrarySearchController = Ember.Controller.extend Species.Spinner,
allDocumentTypes = @get('controllers.events.documentTypes')
.concat @get('controllers.events.interSessionalDocumentTypes')
.concat @get('controllers.events.identificationDocumentTypes')
-
+ if @get('isSignedIn')
+ allDocumentTypes = allDocumentTypes.concat(@get('controllers.events.interSessionalNonPublicDocumentTypes'))
@set('selectedDocumentType', allDocumentTypes.findBy('id', filtersHash.document_type))
general_subtype_type = @get_general_subtype_type(filtersHash)
@@ -71,10 +72,10 @@ Species.ElibrarySearchController = Ember.Controller.extend Species.Spinner,
general_subtype: isGeneralSubType
}
- getDocTypeParam: ->
+ getDocTypeParam: ->
id = @get('selectedDocumentType.id')
- if id != '__all__' then id else null
+ if id != '__all__' then id else null
filteredDocumentTypes: ( ->
if @get('selectedEventType')
diff --git a/app/assets/javascripts/species/templates/downloads_for_cites.handlebars b/app/assets/javascripts/species/templates/downloads_for_cites.handlebars
index 14df63ce5d..b30c018532 100644
--- a/app/assets/javascripts/species/templates/downloads_for_cites.handlebars
+++ b/app/assets/javascripts/species/templates/downloads_for_cites.handlebars
@@ -4,11 +4,16 @@
LISTINGS
{{/view}}
-
+
{{#view Species.ToggleButton option="restrictions" valueBinding="controller.citesLegislation"}}
QUOTAS/SUSPENSIONS
{{/view}}
+
+ {{#view Species.ToggleButton option="processes" valueBinding="controller.citesLegislation"}}
+ Processes
+ {{/view}}
+
{{#view Species.DownloadsForLegislation
isVisibleBinding="controller.legislationIsCitesListings"
@@ -136,3 +141,84 @@
{{/view}}
+{{#view Species.DownloadsForLegislation
+ isVisibleBinding="controller.legislationIsCitesProcesses"
+ controllerBinding="controllers.downloadsForCitesProcesses"
+}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ {{#view Species.ToggleButton option="current" valueBinding="controller.timeScope"}}
+ CURRENT
+ {{/view}}
+
+ -
+ {{#view Species.ToggleButton option="all" valueBinding="controller.timeScope"}}
+ ALL
+ {{/view}}
+
+
+
+
+ {{#if timeScopeIsCurrent}}
+ Only current data has
been selected.
+ {{else}}
+ {{#unless documentTypeIsCitesSuspensions}}
+
+ {{/unless}}
+ {{/if}}
+
+
+
+
+ {{view Species.StartDownloadButton controllerBinding="controller"}}
+
+ {{#if controller.downloadInProgress}}
+
+ {{/if}}
+ {{controller.downloadMessage}}
+
+
+{{/view}}
diff --git a/app/assets/javascripts/species/templates/taxon_concept.handlebars b/app/assets/javascripts/species/templates/taxon_concept.handlebars
index e403f38597..47d8e14822 100644
--- a/app/assets/javascripts/species/templates/taxon_concept.handlebars
+++ b/app/assets/javascripts/species/templates/taxon_concept.handlebars
@@ -8,7 +8,7 @@
{{/if}}
{{fullName}}
-
{{authorYear}}
+
{{authorYear}}
-
diff --git a/app/assets/stylesheets/species/all.scss b/app/assets/stylesheets/species/all.scss
index bc037efabc..006060dde8 100755
--- a/app/assets/stylesheets/species/all.scss
+++ b/app/assets/stylesheets/species/all.scss
@@ -651,6 +651,30 @@ body.inner #footer .holder{
width: 140px;
}
.doc-type .typy-columns .col .row { margin: 0 0 5px }
+
+//
+.process-type {
+ overflow: hidden;
+ padding: 16px 0 13px 20px;
+}
+.process-type .heading {
+ color: $color-navy-dark;
+ font-weight: bold;
+ display: block;
+ margin: 0 0 4px;
+ text-transform: uppercase;
+}
+.process-type .heading.more { margin: 0 0 4px 11px; }
+.process-type .typy-columns { overflow: hidden; }
+.process-type .typy-columns .col {
+ float: left;
+ width: 25%;
+}
+.process-type .typy-columns .col-wide {
+ float: left;
+ width: 50%;
+}
+
.info-columns {
width: 100%;
padding: 20px 0 16px;
@@ -809,6 +833,9 @@ body.inner #footer .holder{
word-spacing: -3px;
text-align: left;
}
+.heading-holder .authors {
+ line-height: 30px;
+}
.heading-holder .species-name {
word-spacing: 0;
}
diff --git a/app/controllers/admin/taxon_listing_changes_controller.rb b/app/controllers/admin/taxon_listing_changes_controller.rb
index b287a6f416..cb13ddd8bd 100644
--- a/app/controllers/admin/taxon_listing_changes_controller.rb
+++ b/app/controllers/admin/taxon_listing_changes_controller.rb
@@ -95,7 +95,7 @@ def load_change_types
find_by_name(ChangeType::EXCEPTION)
@species_listings = @designation.species_listings.order(:abbreviation)
@geo_entities = GeoEntity.order(:name_en).joins(:geo_entity_type).
- where(:is_current => true, :geo_entity_types => { :name => 'COUNTRY' })
+ where(:is_current => true, :geo_entity_types => { :name => ['COUNTRY', 'REGION'] })
@hash_annotations =
if @designation.is_eu?
Annotation.for_eu
diff --git a/app/controllers/species/exports_controller.rb b/app/controllers/species/exports_controller.rb
index cc83073f9b..4a2b3c7798 100644
--- a/app/controllers/species/exports_controller.rb
+++ b/app/controllers/species/exports_controller.rb
@@ -16,6 +16,8 @@ def download
result = Species::ListingsExportFactory.new(@filters).export
when 'EuDecisions'
result = Species::EuDecisionsExport.new(@filters).export
+ when 'Processes'
+ result = Species::CitesProcessesExport.new(@filters).export
end
respond_to do |format|
format.html {
diff --git a/app/models/checklist/pdf/index_query.rb b/app/models/checklist/pdf/index_query.rb
index a5daf45405..ce1f1d74e6 100644
--- a/app/models/checklist/pdf/index_query.rb
+++ b/app/models/checklist/pdf/index_query.rb
@@ -9,7 +9,7 @@ def initialize(rel, options)
# we want common names and synonyms returned as separate records
# and sorted alphabetically
shared_columns = [:full_name, :rank_name, :family_name, :class_name,
- :cites_accepted, :cites_listing,
+ :cites_accepted, :cites_listing, :name_status,
:ann_symbol, :hash_ann_symbol]
shared_columns << :english_names_ary if @english_common_names
shared_columns << :spanish_names_ary if @spanish_common_names
@@ -85,7 +85,7 @@ def to_sql(limit, offset)
#{inner_query}
)
SELECT * FROM name_matches WHERE sort_name IS NOT NULL
- ORDER BY UPPER(sort_name) COLLATE "en_GB"
+ ORDER BY UPPER(sort_name) COLLATE "en_US"
LIMIT #{limit} OFFSET #{offset}
SQL
end
diff --git a/app/models/document_batch.rb b/app/models/document_batch.rb
index f7a8cd5e8a..9c2dc5886c 100644
--- a/app/models/document_batch.rb
+++ b/app/models/document_batch.rb
@@ -40,7 +40,8 @@ def initialize_documents(documents_attributes, files)
for idx in 0..(files.length - 1) do
document_params = {
type: documents_attributes[idx.to_s][:type],
- filename: files[idx]
+ filename: files[idx],
+ title: document_title(files[idx])
}
@documents.push(Document.new(common_attributes.merge(document_params)))
end
@@ -56,4 +57,8 @@ def common_attributes
}
end
+ def document_title(file)
+ original_filename = file.is_a?(Hash) ? file[:filename].original_filename : file.original_filename
+ original_filename.sub(/.\w+$/, '')
+ end
end
diff --git a/app/models/geo_entity_type.rb b/app/models/geo_entity_type.rb
index 02c5b6aa2d..98d31533da 100644
--- a/app/models/geo_entity_type.rb
+++ b/app/models/geo_entity_type.rb
@@ -18,7 +18,7 @@ class GeoEntityType < ActiveRecord::Base
DEFAULT_SET = '3'
SETS = {
"1" => [CITES_REGION], # CITES Checklist
- "2" => [COUNTRY, TERRITORY], # CITES Checklist
+ "2" => [COUNTRY, REGION, TERRITORY], # CITES Checklist
"3" => [CITES_REGION, COUNTRY, TERRITORY], # Species+
"4" => [COUNTRY, REGION, TERRITORY, TRADE_ENTITY], # CITES Trade
"5" => [COUNTRY, TERRITORY] # E-library
diff --git a/app/models/m_taxon_concept.rb b/app/models/m_taxon_concept.rb
index d8dff81e16..99c72c9b6b 100644
--- a/app/models/m_taxon_concept.rb
+++ b/app/models/m_taxon_concept.rb
@@ -185,7 +185,7 @@ def self.descendants_ids(taxon_concept)
def spp
if ['GENUS', 'FAMILY', 'SUBFAMILY', 'ORDER'].include?(rank_name)
- 'spp.'
+ 'spp.' unless name_status == 'H' # Hybrids are not species groups
else
nil
end
diff --git a/app/models/m_taxon_concept_filter_by_scientific_name_with_descendants.rb b/app/models/m_taxon_concept_filter_by_scientific_name_with_descendants.rb
index 7d1e522f4c..a3dac71f63 100644
--- a/app/models/m_taxon_concept_filter_by_scientific_name_with_descendants.rb
+++ b/app/models/m_taxon_concept_filter_by_scientific_name_with_descendants.rb
@@ -2,7 +2,7 @@ class MTaxonConceptFilterByScientificNameWithDescendants
def initialize(relation, scientific_name, match_options = {})
@relation = relation || MTaxonConcept.all
- @scientific_name = scientific_name.upcase.strip
+ @scientific_name = scientific_name.mb_chars.upcase.strip
@match_synonyms = match_options[:synonyms] || true
@match_common_names = match_options[:common_names] || false
@match_subspecies = match_options[:subspecies] || false
diff --git a/app/models/species/cites_processes_export.rb b/app/models/species/cites_processes_export.rb
index a4a74a1e77..6df8af062b 100644
--- a/app/models/species/cites_processes_export.rb
+++ b/app/models/species/cites_processes_export.rb
@@ -5,12 +5,46 @@ def query
.joins("LEFT JOIN taxon_concepts ON taxon_concept_id = taxon_concepts.id
LEFT JOIN geo_entities ON geo_entity_id = geo_entities.id
LEFT JOIN events ON start_event_id = events.id")
- .order('taxon_concepts.full_name','cites_processes.type DESC','geo_entities.name_en')
+ rel = apply_filters(rel)
+ rel = rel.order('taxon_concepts.full_name','cites_processes.type DESC','geo_entities.name_en')
+
rel.select(sql_columns)
end
private
+ def apply_filters(rel)
+ rel = rel.where(resolution: resolution) unless @filters['process_type'] == 'Both'
+ rel = rel.where("DATE_PART('YEAR', start_date) IN (?)", @filters['years']) if @filters['years']&.any?
+ rel = rel.where("status != 'Closed'") if @filters['set'] == 'current'
+ rel = rel.where('geo_entities.id IN (?)', geo_entities_ids) if @filters['geo_entities_ids']&.any?
+
+ # Query 'data' json field for taxon concepts that have the submitted taxon_concept_id in their ancestry,
+ # or are the taxon_concept indicated by the txon_concept_id.
+ if @filters['taxon_concepts_ids']&.any?
+ taxon_concept = TaxonConcept.find(@filters['taxon_concepts_ids'].first)
+ rel = rel.where("taxon_concepts.data -> :rank_id_key = :taxon_concept_id OR taxon_concept_id = :taxon_concept_id",
+ rank_id_key: "#{taxon_concept.rank.name.downcase}_id", taxon_concept_id: taxon_concept.id.to_s)
+ end
+
+ rel
+ end
+
+ def geo_entities_ids
+ GeoEntity.nodes_and_descendants(@filters['geo_entities_ids']).pluck(:id)
+ end
+
+ def resolution
+ case @filters['process_type']
+ when 'Rst'
+ ['Significant Trade']
+ when 'CaptiveBreeding'
+ ['Captive Breeding']
+ else
+ ['Significant Trade', 'Captive Breeding']
+ end
+ end
+
def resource_name
'cites_processes'
end
diff --git a/app/models/trade/permit_matcher.rb b/app/models/trade/permit_matcher.rb
index f36ad1458c..8576bdedab 100644
--- a/app/models/trade/permit_matcher.rb
+++ b/app/models/trade/permit_matcher.rb
@@ -27,7 +27,7 @@ def initialize_query
@query = Trade::Permit.order(:number)
if @permit_query
@query = @query.where([
- "UPPER(number) LIKE :number", :number => "#{@permit_query}%"
+ "UPPER(number) LIKE :number", :number => "%#{@permit_query}%"
])
end
end
diff --git a/app/models/trade/shipment_report_queries.rb b/app/models/trade/shipment_report_queries.rb
index 2916c62a06..ae24c1b5e3 100644
--- a/app/models/trade/shipment_report_queries.rb
+++ b/app/models/trade/shipment_report_queries.rb
@@ -6,9 +6,9 @@ def raw_query(options)
year,
appendix,
taxon_concept_id,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
reported_taxon_concept_id,
- full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name) AS reported_taxon,
+ full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon,
taxon_concept_class_name AS class_name,
taxon_concept_order_name AS order_name,
taxon_concept_family_name AS family_name,
@@ -78,13 +78,13 @@ def self.full_db_query_by_kingdom(year, kingdom)
shipments.id AS id,
year AS year,
appendix AS appendix,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_status_name_status) AS taxon,
taxon_concept_id AS taxon_id,
taxon_concept_class_name AS class,
taxon_concept_order_name AS order,
taxon_concept_family_name AS family,
taxon_concept_genus_name AS genus,
- full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name) AS reported_taxon,
+ full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_status_name_status) AS reported_taxon,
reported_taxon_concept_id AS reported_taxon_id,
terms.name_en AS term,
CASE WHEN quantity = 0 THEN NULL ELSE quantity END,
@@ -136,13 +136,13 @@ def self.full_db_query_by_year(year)
shipments.id AS id,
year AS year,
appendix AS appendix,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
taxon_concept_id AS taxon_id,
taxon_concept_class_name AS class,
taxon_concept_order_name AS order,
taxon_concept_family_name AS family,
taxon_concept_genus_name AS genus,
- full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name) AS reported_taxon,
+ full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon,
reported_taxon_concept_id AS reported_taxon_id,
terms.name_en AS term,
CASE WHEN quantity = 0 THEN NULL ELSE quantity END,
@@ -192,13 +192,13 @@ def self.full_db_query_single_file(limit, offset)
shipments.id AS id,
year AS year,
appendix AS appendix,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
taxon_concept_id AS taxon_id,
taxon_concept_class_name AS class,
taxon_concept_order_name AS order,
taxon_concept_family_name AS family,
taxon_concept_genus_name AS genus,
- full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name) AS reported_taxon,
+ full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon,
reported_taxon_concept_id AS reported_taxon_id,
terms.name_en AS term,
CASE WHEN quantity = 0 THEN NULL ELSE quantity END,
@@ -248,13 +248,13 @@ def self.full_db_query(limit, offset)
shipments.id AS id,
year AS year,
appendix AS appendix,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
taxon_concept_id AS taxon_id,
taxon_concept_class_name AS class,
taxon_concept_order_name AS order,
taxon_concept_family_name AS family,
taxon_concept_genus_name AS genus,
- full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name) AS reported_taxon,
+ full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon,
reported_taxon_concept_id AS reported_taxon_id,
terms.name_en AS term,
CASE WHEN quantity = 0 THEN NULL ELSE quantity END,
@@ -314,13 +314,13 @@ def self.partial_db_query(limit, offset, updated_at: nil, created_at: nil)
shipments.id AS id,
year AS year,
appendix AS appendix,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
taxon_concept_id AS taxon_id,
taxon_concept_class_name AS class,
taxon_concept_order_name AS order,
taxon_concept_family_name AS family,
taxon_concept_genus_name AS genus,
- full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name) AS reported_taxon,
+ full_name_with_spp(reported_taxon_ranks.name, reported_taxon_concept_full_name, reported_taxon_concept_name_status) AS reported_taxon,
reported_taxon_concept_id AS reported_taxon_id,
terms.name_en AS term,
CASE WHEN quantity = 0 THEN NULL ELSE quantity END,
@@ -375,7 +375,7 @@ def comptab_query(options)
year,
appendix,
taxon_concept_id,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
taxon_concept_class_name AS class_name,
taxon_concept_order_name AS order_name,
taxon_concept_family_name AS family_name,
@@ -428,6 +428,7 @@ def comptab_query(options)
appendix,
taxon_concept_family_name,
taxon_concept_id,
+ taxon_concept_name_status,
taxon_concept_full_name,
class_name,
order_name,
@@ -476,7 +477,8 @@ def gross_net_query(options)
year,
appendix,
taxon_concept_id,
- full_name_with_spp(ranks.name, taxon_concept_full_name) AS taxon,
+ full_name_with_spp(ranks.name, taxon_concept_full_name, taxon_concept_name_status) AS taxon,
+ taxon_concept_name_status,
importer_id,
importers.iso_code2 AS importer,
exporter_id,
@@ -519,6 +521,7 @@ def gross_net_query(options)
appendix,
taxon_concept_id,
taxon_concept_full_name,
+ taxon_concept_name_status,
ranks.name,
importer_id,
importers.iso_code2,
@@ -570,6 +573,7 @@ def gross_exports_subquery
appendix,
taxon_concept_id,
taxon,
+ taxon_concept_name_status,
term_id,
term,
term_name_en,
@@ -624,6 +628,7 @@ def gross_imports_subquery
appendix,
taxon_concept_id,
taxon,
+ taxon_concept_name_status,
term_id,
term,
term_name_en,
diff --git a/app/views/layouts/cites_trade.html.erb b/app/views/layouts/cites_trade.html.erb
index e51f6f6483..acb608b660 100644
--- a/app/views/layouts/cites_trade.html.erb
+++ b/app/views/layouts/cites_trade.html.erb
@@ -26,6 +26,12 @@
<%= render "cites_trade/hotjar" %>
+ <% else %>
+
<% end %>
diff --git a/app/views/layouts/pages.html.erb b/app/views/layouts/pages.html.erb
index 271162f06a..8e4b108d85 100644
--- a/app/views/layouts/pages.html.erb
+++ b/app/views/layouts/pages.html.erb
@@ -36,6 +36,12 @@
<%= render "species/hotjar" %>
+ <% else %>
+
<% end %>
@@ -56,7 +62,8 @@
- Species+ / CITES Checklist API
- EU Captive breeding database
- EU Wildlife Trade Legislation
- - EU analysis
+ - EU analysis
+ - CITES Wildlife TradeView
diff --git a/app/views/layouts/species.html.erb b/app/views/layouts/species.html.erb
index 51f969d627..c78b690c8a 100644
--- a/app/views/layouts/species.html.erb
+++ b/app/views/layouts/species.html.erb
@@ -33,6 +33,12 @@
<%= render "species/hotjar" %>
+ <% else %>
+
<% end %>
diff --git a/config/database.yml.sample b/config/database.yml.sample
index 9ccf47c5f8..64521c8416 100644
--- a/config/database.yml.sample
+++ b/config/database.yml.sample
@@ -1,47 +1,29 @@
-# SQLite version 3.x
-# gem install sqlite3
-#
-# Ensure the SQLite 3 gem is defined in your Gemfile
-# gem 'sqlite3'
-development:
+
+default: &default
+ host: <%= ENV.fetch("SAPI_DATABASE_HOST", 'localhost') %>
adapter: postgresql
+ encoding: unicode
+ # For details on connection pooling, see Rails configuration guide
+ # https://guides.rubyonrails.org/configuring.html#database-pooling
+ pool: <%= ENV.fetch("SAPI_RAILS_MAX_THREADS") { 5 } %>
+ username: <%= ENV.fetch("SAPI_DATABASE_USERNAME", 'postgres') %>
+ port: <%= ENV.fetch("SAPI_DATABASE_PORT", 5432) %>
+
+development:
+ <<: *default
database: sapi_development
- pool: 5
- username: postgres
- password:
timeout: 5000
- port: 5432
- host: localhost
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
test:
- adapter: postgresql
+ <<: *default
database: sapi_test
- pool: 5
- username: postgres
- password:
timeout: 5000
- port: 5432
- host: localhost
staging:
- adapter: postgresql
+ <<: *default
database: sapi_development
- pool: 10
- username: postgres
- password:
- host: localhost
port: 5432
- template: template0
production:
- adapter: postgresql
+ <<: *default
database: sapi_development
- pool: 10
- username: postgres
- password:
- host: localhost
- port: 5432
- template: template0
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 143771cc18..cb760648ed 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -18,12 +18,15 @@
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = {
- host: Rails.application.secrets.mailer['host']
+ host: Rails.application.secrets.mailer['host'] || 'http://localhost:3000'
}
ActionMailer::Base.default from: Rails.application.secrets.mailer['from']
- config.action_mailer.delivery_method = :letter_opener
+ # config.action_mailer.delivery_method = :letter_opener
+ # Mail server configuration. Development use mailcatcher.
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.smtp_settings = { address: Rails.application.secrets.mailer['address'], port: 1025 }
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
diff --git a/config/secrets.yml b/config/secrets.yml
index ccaf687f77..9598e19f7a 100644
--- a/config/secrets.yml
+++ b/config/secrets.yml
@@ -9,7 +9,7 @@ common: &defaults
from: <%= ENV["MAILER_USERNAME"] %>
redis:
namespace: 'SAPI'
- url: 'redis://127.0.0.1:6379/1'
+ url: <%= ENV["SAPI_SIDEKIQ_REDIS_URL"] || 'redis://127.0.0.1:6379/1' %>
aws:
bucket_name: <%= ENV["AWS_BUCKET_NAME"] %>
access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
diff --git a/db/helpers/000_helpers.sql b/db/helpers/000_helpers.sql
index aeefbc3ec2..5393152a89 100644
--- a/db/helpers/000_helpers.sql
+++ b/db/helpers/000_helpers.sql
@@ -18,18 +18,21 @@ CREATE OR REPLACE FUNCTION squish_null(TEXT) RETURNS TEXT
COMMENT ON FUNCTION squish_null(TEXT) IS
'Squishes whitespace characters in a string and returns null for empty string';
-CREATE OR REPLACE FUNCTION full_name_with_spp(rank_name VARCHAR(255), full_name VARCHAR(255)) RETURNS VARCHAR(255)
+-- This function previously had a different signature - ensure that the old version is gone
+DROP FUNCTION IF EXISTS full_name_with_spp(rank_name VARCHAR(255), full_name VARCHAR(255));
+
+CREATE OR REPLACE FUNCTION full_name_with_spp(rank_name VARCHAR(255), full_name VARCHAR(255), name_status CHAR(1)) RETURNS VARCHAR(255)
LANGUAGE sql IMMUTABLE
AS $$
SELECT CASE
- WHEN $1 IN ('ORDER', 'FAMILY', 'SUBFAMILY', 'GENUS')
+ WHEN $1 IN ('ORDER', 'FAMILY', 'SUBFAMILY', 'GENUS') AND $3 != 'H'
THEN $2 || ' spp.'
ELSE $2
END;
$$;
-COMMENT ON FUNCTION full_name_with_spp(rank_name VARCHAR(255), full_name VARCHAR(255)) IS
- 'Returns full name with ssp where applicable depending on rank.';
+COMMENT ON FUNCTION full_name_with_spp(rank_name VARCHAR(255), full_name VARCHAR(255), name_status CHAR(1)) IS
+ 'Returns full name with ssp where applicable depending on rank. This is not applied for higher than species level hybrids';
DROP FUNCTION IF EXISTS ancestor_listing_auto_note(rank_name VARCHAR(255), full_name VARCHAR(255), change_type_name VARCHAR(255));
@@ -54,7 +57,7 @@ RETURNS TEXT
change_types.display_name_en,
change_types.name
) || '' '' ||
- full_name_with_spp(ranks.name, ''' || taxon_concept.full_name || ''')
+ full_name_with_spp(ranks.name, ''' || taxon_concept.full_name || ''', ''' || taxon_concept.name_status || ''')
FROM ranks, change_types
WHERE ranks.id = ' || taxon_concept.rank_id || '
AND change_types.id = ' || listing_change.change_type_id
@@ -186,7 +189,7 @@ CREATE OR REPLACE FUNCTION create_trade_sandbox_view(
CASE
WHEN aru.point_of_view = ''E''
THEN trading_partner
- ELSE geo_entities.iso_code2
+ ELSE geo_entities.iso_code2
END AS importer,
taxon_concepts.full_name AS accepted_taxon_name,
taxon_concepts.data->''rank_name'' AS rank,
diff --git a/db/migrate/20230803181442_remove_language_restrictions_from_autocomplete_view.rb b/db/migrate/20230803181442_remove_language_restrictions_from_autocomplete_view.rb
new file mode 100644
index 0000000000..192839d594
--- /dev/null
+++ b/db/migrate/20230803181442_remove_language_restrictions_from_autocomplete_view.rb
@@ -0,0 +1,15 @@
+class RemoveLanguageRestrictionsFromAutocompleteView < ActiveRecord::Migration
+ def up
+ execute "DROP VIEW IF EXISTS auto_complete_taxon_concepts_view"
+ execute "CREATE VIEW auto_complete_taxon_concepts_view AS #{view_sql('20230803181442', 'auto_complete_taxon_concepts_view')}"
+ execute File.read(File.expand_path('../../mviews/011_rebuild_auto_complete_taxon_concepts_mview.sql', __FILE__))
+ execute "SELECT * FROM rebuild_auto_complete_taxon_concepts_mview()"
+ end
+
+ def down
+ execute "DROP VIEW IF EXISTS auto_complete_taxon_concepts_view"
+ execute "CREATE VIEW auto_complete_taxon_concepts_view AS #{view_sql('20220808123526', 'auto_complete_taxon_concepts_view')}"
+ execute File.read(File.expand_path('../../mviews/011_rebuild_auto_complete_taxon_concepts_mview.sql', __FILE__))
+ execute "SELECT * FROM rebuild_auto_complete_taxon_concepts_mview()"
+ end
+end
diff --git a/db/migrate/20230915113624_add_trigram_index_to_trade_permit_numbers.rb b/db/migrate/20230915113624_add_trigram_index_to_trade_permit_numbers.rb
new file mode 100644
index 0000000000..72876244d5
--- /dev/null
+++ b/db/migrate/20230915113624_add_trigram_index_to_trade_permit_numbers.rb
@@ -0,0 +1,20 @@
+class AddTrigramIndexToTradePermitNumbers < ActiveRecord::Migration
+ def up
+ # Index to optimise LIKE queries
+ if Rails.env.staging? or Rails.env.production?
+ puts "Please add extension by hand: CREATE EXTENSION pg_trgm"
+ else
+ execute "CREATE EXTENSION IF NOT EXISTS pg_trgm"
+ end
+ execute 'CREATE INDEX trade_permits_number_trigm_idx ON trade_permits USING gin (upper(number) gin_trgm_ops)'
+ end
+
+ def down
+ execute 'DROP INDEX trade_permits_number_trigm_idx'
+ if Rails.env.staging? or Rails.env.production?
+ puts "Please drop extension by hand: DROP EXTENSION pg_trgm"
+ else
+ execute "DROP EXTENSION pg_trgm"
+ end
+ end
+end
diff --git a/db/mviews/007a_rebuild_cites_species_listing_mview.sql b/db/mviews/007a_rebuild_cites_species_listing_mview.sql
index 207c5e76f2..f3dde8cc90 100644
--- a/db/mviews/007a_rebuild_cites_species_listing_mview.sql
+++ b/db/mviews/007a_rebuild_cites_species_listing_mview.sql
@@ -48,7 +48,8 @@ SELECT
ARRAY_AGG(
DISTINCT full_name_with_spp(
COALESCE(inclusion_taxon_concepts_mview.rank_name, original_taxon_concepts_mview.rank_name),
- COALESCE(inclusion_taxon_concepts_mview.full_name, original_taxon_concepts_mview.full_name)
+ COALESCE(inclusion_taxon_concepts_mview.full_name, original_taxon_concepts_mview.full_name),
+ COALESCE(inclusion_taxon_concepts_mview.name_status, original_taxon_concepts_mview.name_status)
)
),
','
diff --git a/db/mviews/007b_rebuild_eu_species_listing_mview.sql b/db/mviews/007b_rebuild_eu_species_listing_mview.sql
index eb2602f3cc..6ac7516812 100644
--- a/db/mviews/007b_rebuild_eu_species_listing_mview.sql
+++ b/db/mviews/007b_rebuild_eu_species_listing_mview.sql
@@ -47,7 +47,8 @@ SELECT
ARRAY_AGG(
DISTINCT full_name_with_spp(
COALESCE(inclusion_taxon_concepts_mview.rank_name, original_taxon_concepts_mview.rank_name),
- COALESCE(inclusion_taxon_concepts_mview.full_name, original_taxon_concepts_mview.full_name)
+ COALESCE(inclusion_taxon_concepts_mview.full_name, original_taxon_concepts_mview.full_name),
+ COALESCE(inclusion_taxon_concepts_mview.name_status, original_taxon_concepts_mview.name_status)
)
),
','
diff --git a/db/mviews/007c_rebuild_cms_species_listing_mview.sql b/db/mviews/007c_rebuild_cms_species_listing_mview.sql
index 7bd68727d9..3dbcdea8c3 100644
--- a/db/mviews/007c_rebuild_cms_species_listing_mview.sql
+++ b/db/mviews/007c_rebuild_cms_species_listing_mview.sql
@@ -27,7 +27,7 @@ SELECT
taxon_concepts_mview.cms_listed,
taxon_concepts_mview.cms_listing_original AS cms_listing_original,
ARRAY_TO_STRING(
- ARRAY_AGG(DISTINCT full_name_with_spp(original_taxon_concepts_mview.rank_name, original_taxon_concepts_mview.full_name)),
+ ARRAY_AGG(DISTINCT full_name_with_spp(original_taxon_concepts_mview.rank_name, original_taxon_concepts_mview.full_name, original_taxon_concepts_mview.name_status)),
','
) AS original_taxon_concept_full_name_with_spp,
ARRAY_TO_STRING(
diff --git a/db/views/auto_complete_taxon_concepts_view/20230803181442.sql b/db/views/auto_complete_taxon_concepts_view/20230803181442.sql
new file mode 100644
index 0000000000..65ba0f159b
--- /dev/null
+++ b/db/views/auto_complete_taxon_concepts_view/20230803181442.sql
@@ -0,0 +1,199 @@
+WITH synonyms_segmented(taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name, matched_name_segment) AS (
+ SELECT
+ atc.id,
+ atc.full_name,
+ atc.author_year,
+ tc.id,
+ tc.full_name,
+ UPPER(REGEXP_SPLIT_TO_TABLE(tc.full_name, ' '))
+ FROM taxon_concepts tc
+ JOIN taxon_relationships tr
+ ON tr.other_taxon_concept_id = tc.id
+ JOIN taxon_relationship_types trt
+ ON trt.id = tr.taxon_relationship_type_id
+ AND trt.name = 'HAS_SYNONYM'
+ JOIN taxon_concepts atc
+ ON atc.id = tr.taxon_concept_id
+ WHERE tc.name_status = 'S' AND atc.name_status = 'A'
+), scientific_names_segmented(taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name, matched_name_segment) AS (
+ SELECT
+ id,
+ taxon_concepts.full_name,
+ taxon_concepts.author_year,
+ id,
+ taxon_concepts.full_name,
+ UPPER(REGEXP_SPLIT_TO_TABLE(full_name, ' '))
+ FROM taxon_concepts
+), unlisted_subspecies_segmented(taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name, matched_name_segment) AS (
+ SELECT
+ parents.id,
+ parents.full_name,
+ parents.author_year,
+ taxon_concepts.id,
+ taxon_concepts.full_name,
+ UPPER(REGEXP_SPLIT_TO_TABLE(taxon_concepts.full_name, ' '))
+ FROM taxon_concepts
+ JOIN ranks ON ranks.id = taxon_concepts.rank_id
+ AND ranks.name IN ('SUBSPECIES', 'VARIETY')
+ JOIN taxon_concepts parents
+ ON parents.id = taxon_concepts.parent_id
+ WHERE taxon_concepts.name_status NOT IN ('S', 'T', 'N')
+ AND parents.name_status = 'A'
+
+ EXCEPT
+
+ SELECT
+ parents.id,
+ parents.full_name,
+ parents.author_year,
+ taxon_concepts.id,
+ taxon_concepts.full_name,
+ UPPER(REGEXP_SPLIT_TO_TABLE(taxon_concepts.full_name, ' '))
+ FROM taxon_concepts
+ JOIN ranks ON ranks.id = taxon_concepts.rank_id
+ AND ranks.name IN ('SUBSPECIES') -- VARIETY not here on purpose
+ JOIN taxon_concepts parents
+ ON parents.id = taxon_concepts.parent_id
+ JOIN taxonomies ON taxonomies.id = taxon_concepts.taxonomy_id
+ WHERE taxon_concepts.name_status NOT IN ('S', 'T', 'N')
+ AND parents.name_status = 'A'
+ AND CASE
+ WHEN taxonomies.name = 'CMS'
+ THEN (taxon_concepts.listing->'cms_historically_listed')::BOOLEAN
+ ELSE (taxon_concepts.listing->'cites_historically_listed')::BOOLEAN
+ OR (taxon_concepts.listing->'eu_historically_listed')::BOOLEAN
+ END
+), taxon_common_names AS (
+ SELECT
+ taxon_commons.*,
+ common_names.name
+ FROM taxon_commons
+ JOIN common_names
+ ON common_names.id = taxon_commons.common_name_id
+), common_names_segmented(taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name, matched_name_segment) AS (
+ SELECT
+ taxon_concept_id,
+ taxon_concepts.full_name,
+ taxon_concepts.author_year,
+ NULL::INT,
+ taxon_common_names.name,
+ UPPER(REGEXP_SPLIT_TO_TABLE(taxon_common_names.name, E'\\s|'''))
+ FROM taxon_common_names
+ JOIN taxon_concepts
+ ON taxon_common_names.taxon_concept_id = taxon_concepts.id
+), taxon_common_names_dehyphenated AS (
+ SELECT
+ taxon_concept_id,
+ taxon_concepts.full_name,
+ taxon_concepts.author_year,
+ NULL::INT,
+ taxon_common_names.name,
+ UPPER(REPLACE(taxon_common_names.name, '-', ' '))
+ FROM taxon_common_names
+ JOIN taxon_concepts
+ ON taxon_common_names.taxon_concept_id = taxon_concepts.id
+ WHERE STRPOS(taxon_common_names.name, '-') > 0
+), common_names_segmented_dehyphenated AS (
+ SELECT taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name, matched_name_segment
+ FROM common_names_segmented
+ UNION
+ SELECT taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name, REGEXP_SPLIT_TO_TABLE(matched_name_segment, E'-')
+ FROM common_names_segmented
+ WHERE STRPOS(matched_name_segment, '-') > 0
+ UNION
+ SELECT * FROM taxon_common_names_dehyphenated
+), all_names_segmented_cleaned AS (
+ SELECT * FROM (
+ SELECT taxon_concept_id, full_name, author_year, matched_taxon_concept_id, matched_name,
+ CASE
+ WHEN POSITION(matched_name_segment IN
+ UPPER(matched_name)
+ ) = 1 THEN UPPER(matched_name)
+ ELSE matched_name_segment
+ END, type_of_match
+ FROM (
+ SELECT *, 'SELF' AS type_of_match
+ FROM scientific_names_segmented
+ UNION
+ SELECT *, 'SYNONYM'
+ FROM synonyms_segmented
+ UNION
+ SELECT *, 'SUBSPECIES'
+ FROM unlisted_subspecies_segmented
+ UNION
+ SELECT *, 'COMMON_NAME'
+ FROM common_names_segmented_dehyphenated
+ ) all_names_segmented
+ ) all_names_segmented_no_prefixes
+ WHERE LENGTH(matched_name_segment) >= 3
+), taxa_with_visibility_flags AS (
+ SELECT taxon_concepts.id,
+ CASE
+ WHEN taxonomies.name = 'CITES_EU' THEN TRUE
+ ELSE FALSE
+ END AS taxonomy_is_cites_eu,
+ name_status,
+ ranks.name AS rank_name,
+ ranks.display_name_en AS rank_display_name_en,
+ ranks.display_name_es AS rank_display_name_es,
+ ranks.display_name_fr AS rank_display_name_fr,
+ ranks.taxonomic_position AS rank_order,
+ taxon_concepts.taxonomic_position,
+ CASE
+ WHEN
+ name_status = 'A'
+ AND (
+ ranks.name != 'SUBSPECIES'
+ AND ranks.name != 'VARIETY'
+ OR taxonomies.name = 'CITES_EU'
+ AND (
+ (listing->'cites_historically_listed')::BOOLEAN
+ OR (listing->'eu_historically_listed')::BOOLEAN
+ )
+ OR taxonomies.name = 'CMS'
+ AND (listing->'cms_historically_listed')::BOOLEAN
+ )
+ THEN TRUE
+ ELSE FALSE
+ END AS show_in_species_plus_ac,
+ CASE
+ WHEN
+ name_status = 'A'
+ AND (
+ ranks.name != 'SUBSPECIES'
+ AND ranks.name != 'VARIETY'
+ OR (listing->'cites_show')::BOOLEAN
+ )
+ THEN TRUE
+ ELSE FALSE
+ END AS show_in_checklist_ac,
+ CASE
+ WHEN
+ taxonomies.name = 'CITES_EU'
+ AND ARRAY['A', 'H', 'N']::VARCHAR[] && ARRAY[name_status]
+ THEN TRUE
+ ELSE FALSE
+ END AS show_in_trade_ac,
+ CASE
+ WHEN
+ taxonomies.name = 'CITES_EU'
+ AND ARRAY['A', 'H', 'N', 'T']::VARCHAR[] && ARRAY[name_status]
+ THEN TRUE
+ ELSE FALSE
+ END AS show_in_trade_internal_ac
+ FROM taxon_concepts
+ JOIN ranks ON ranks.id = rank_id
+ JOIN taxonomies ON taxonomies.id = taxon_concepts.taxonomy_id
+)
+SELECT
+ t1.*,
+ matched_name_segment AS name_for_matching,
+ matched_taxon_concept_id AS matched_id,
+ matched_name,
+ full_name,
+ author_year,
+ type_of_match
+FROM taxa_with_visibility_flags t1
+JOIN all_names_segmented_cleaned t2
+ON t1.id = t2.taxon_concept_id
+WHERE LENGTH(matched_name_segment) >= 3;
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000000..1e82790097
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,93 @@
+# docker-compose.yml
+version: '3.8'
+
+networks:
+ sapi:
+ driver: bridge
+
+services:
+ db:
+ container_name: sapi-db
+ image: postgres:10
+ healthcheck:
+ test: ["CMD", "pg_isready", "-U", "postgres"]
+ timeout: 45s
+ interval: 10s
+ retries: 10
+ volumes:
+ - 'pgdata:/var/lib/postgresql/data'
+ ports:
+ - "${SAPI_CONTAINER_DB_PORT:-5432}:5432"
+ networks:
+ - sapi
+ environment:
+ POSTGRES_HOST_AUTH_METHOD: "trust"
+ POSTGRES_DB: "sapi_development"
+
+ rails:
+ container_name: sapi-rails
+ build:
+ context: ./
+ dockerfile: Dockerfile
+ command: /bin/bash -l -c "rm -f ./tmp/pids/server.pid && bundle install && bundle exec rails s -p 3000 -b '0.0.0.0'"
+ volumes:
+ - '.:/SAPI'
+ - bundler_gems:/usr/local/bundle
+ ports:
+ - '${SAPI_CONTAINER_RAILS_PORT:-3000}:3000'
+ networks:
+ - sapi
+ stdin_open: true
+ tty: true
+ environment:
+ MAILER_ADDRESS: sapi-mailcatcher
+ SAPI_DATABASE_HOST: sapi-db
+ SAPI_SIDEKIQ_REDIS_URL: redis://sapi-redis:6379/0
+ depends_on:
+ - redis
+ - db
+ - mailcatcher
+
+ redis:
+ container_name: sapi-redis
+ image: redis:7.2.0
+ ports:
+ - "${SAPI_CONTAINER_REDIS_PORT:-6379}:6379"
+ networks:
+ - sapi
+ command: redis-server --save 20 1 --loglevel warning
+ volumes:
+ - redis_data:/data
+
+ sidekiq:
+ container_name: sapi-sidekiq
+ build:
+ context: .
+ dockerfile: Dockerfile
+ networks:
+ - sapi
+ depends_on:
+ - db
+ - redis
+ - mailcatcher
+ command: /bin/bash -l -c "bundle install && bundle exec sidekiq -C config/sidekiq.yml"
+ volumes:
+ - '.:/SAPI'
+ - bundler_gems:/usr/local/bundle
+ environment:
+ MAILER_ADDRESS: sapi-mailcatcher
+ SAPI_DATABASE_HOST: sapi-db
+ SAPI_SIDEKIQ_REDIS_URL: redis://sapi-redis:6379/0
+
+ mailcatcher:
+ container_name: sapi-mailcatcher
+ image: sj26/mailcatcher
+ ports:
+ - "${SAPI_CONTAINER_MAILCATCHER_PORT:-1080}:1080"
+ networks:
+ - sapi
+
+volumes:
+ pgdata:
+ bundler_gems:
+ redis_data:
diff --git a/lib/files/chinese_common_names.csv b/lib/files/chinese_common_names.csv
new file mode 100644
index 0000000000..5e48c8bb9f
--- /dev/null
+++ b/lib/files/chinese_common_names.csv
@@ -0,0 +1,1765 @@
+ComName,LangShort,RecId,Rank,Designation,ReferenceID
+叉角羚,ZHO,5062,SPECIES,CITES_EU,
+旋角羚,ZHO,4464,SPECIES,CITES_EU,
+印度野牛,ZHO,5874,SPECIES,CITES_EU,
+野牦牛,ZHO,7471,SPECIES,CITES_EU,
+柬埔寨野牛,ZHO,11180,SPECIES,CITES_EU,
+西里伯斯水牛,ZHO,4425,SPECIES,CITES_EU,
+民都洛水牛,ZHO,8124,SPECIES,CITES_EU,
+夸氏水牛,ZHO,10958,SPECIES,CITES_EU,
+捻角山羊,ZHO,3780,SPECIES,CITES_EU,
+中华鬣羚,ZHO,3881,SPECIES,CITES_EU,
+红鬣羚,ZHO,3939,SPECIES,CITES_EU,
+苏门答腊鬣羚,ZHO,7979,SPECIES,CITES_EU,
+喜马拉雅鬣羚,ZHO,10594,SPECIES,CITES_EU,
+詹氏小羚羊,ZHO,4194,SPECIES,CITES_EU,
+居氏羚,ZHO,3080,SPECIES,CITES_EU,
+细角羚,ZHO,9611,SPECIES,CITES_EU,
+大貂羚安哥拉亚种,ZHO,12301,SUBSPECIES,CITES_EU,
+赤斑羚,ZHO,4344,SPECIES,CITES_EU,
+长尾斑羚,ZHO,7159,SPECIES,CITES_EU,
+喜马拉雅斑羚,ZHO,9378,SPECIES,CITES_EU,
+中华斑羚,ZHO,6231,SPECIES,CITES_EU,
+苍羚,ZHO,10002,SPECIES,CITES_EU,
+弯角大羚羊,ZHO,11205,SPECIES,CITES_EU,
+阿拉伯大羚羊,ZHO,4154,SPECIES,CITES_EU,
+安纳托利亚绵盘羊,ZHO,33589,SPECIES,CITES_EU,
+西藏盘羊,ZHO,98423,SPECIES,CITES_EU,
+卡拉套盘羊,ZHO,30824,SPECIES,CITES_EU,
+维氏绵盘羊,ZHO,4814,SPECIES,CITES_EU,
+鬣羊,ZHO,3905,SPECIES,CITES_EU,
+扭角羚,ZHO,3135,SPECIES,CITES_EU,
+高加索羱羊,ZHO,67978,SPECIES,CITES_EU,
+布氏小羚羊,ZHO,8418,SPECIES,CITES_EU,
+骝毛小羚羊,ZHO,4497,SPECIES,CITES_EU,
+奥氏小羚羊,ZHO,8002,SPECIES,CITES_EU,
+黄背小羚羊,ZHO,10119,SPECIES,CITES_EU,
+斑背小羚羊,ZHO,7092,SPECIES,CITES_EU,
+白腿大羚羊指名亚种,ZHO,12162,SUBSPECIES,CITES_EU,
+驴羚,ZHO,4050,SPECIES,CITES_EU,
+阿尔泰盘羊,ZHO,7093,SPECIES,CITES_EU,
+阿拉伯绵盘羊,ZHO,35596,SPECIES,CITES_EU,
+塔吉克绵盘羊,ZHO,98436,SPECIES,CITES_EU,
+加拿大盘羊,ZHO,3036,SPECIES,CITES_EU,
+哈萨克盘羊,ZHO,98883,SPECIES,CITES_EU,
+阿富汗绵盘羊,ZHO,98424,SPECIES,CITES_EU,
+戈壁盘羊,ZHO,98884,SPECIES,CITES_EU,
+雅布赖盘羊,ZHO,32866,SPECIES,CITES_EU,
+天山盘羊,ZHO,98885,SPECIES,CITES_EU,
+帕米尔盘羊,ZHO,98886,SPECIES,CITES_EU,
+旁遮普绵盘羊,ZHO,98952,SPECIES,CITES_EU,
+乌兹别克盘羊,ZHO,98887,SPECIES,CITES_EU,
+褐麂羚,ZHO,101271,SPECIES,CITES_EU,
+蓝小羚羊,ZHO,9997,SPECIES,CITES_EU,
+岩羚羊阿布鲁左亚种,ZHO,12328,SUBSPECIES,CITES_EU,
+北方高鼻羚羊,ZHO,9751,SPECIES,CITES_EU,
+高鼻羚羊,ZHO,8765,SPECIES,CITES_EU,
+印度羚,ZHO,4985,SPECIES,CITES_EU,
+大蓝羚,ZHO,65574,SPECIES,CITES_EU,
+印度水牛,ZHO,6811,SPECIES,CITES_EU,
+野山羊,ZHO,65582,SUBSPECIES,CITES_EU,
+北山羊,ZHO,65566,SPECIES,CITES_EU,
+印度瞪羚,ZHO,65567,SPECIES,CITES_EU,
+鹿羚,ZHO,5673,SPECIES,CITES_EU,
+岩羊,ZHO,65584,SPECIES,CITES_EU,
+四角羚,ZHO,9831,SPECIES,CITES_EU,
+藏羚,ZHO,8117,SPECIES,CITES_EU,
+安南锭角羚,ZHO,10395,SPECIES,CITES_EU,
+原驼,ZHO,10716,SPECIES,CITES_EU,
+鲟形目 ,ZHO,102,ORDER,CITES_EU,
+卡岛豚鹿,ZHO,4889,SPECIES,CITES_EU,
+巴岛豚鹿,ZHO,10380,SPECIES,CITES_EU,
+豚鹿印支亚种,ZHO,12317,SUBSPECIES,CITES_EU,
+南美泽鹿,ZHO,3625,SPECIES,CITES_EU,
+马鹿克什米尔亚种,ZHO,12225,SUBSPECIES,CITES_EU,
+黇鹿波斯亚种,ZHO,12218,SUBSPECIES,CITES_EU,
+马鹿大夏亚种,ZHO,12260,SUBSPECIES,CITES_EU,
+北普度鹿,ZHO,5742,SPECIES,CITES_EU,
+豚鹿,ZHO,3218,SPECIES,CITES_EU,
+马鹿柏柏尔亚种,ZHO,12327,SUBSPECIES,CITES_EU,
+赤短角鹿哥斯达黎加亚种,ZHO,12217,SUBSPECIES,CITES_EU,
+白尾鹿玛雅亚种,ZHO,12333,SUBSPECIES,CITES_EU,
+ 南美山鹿属,ZHO,1938,GENUS,CITES_EU,
+黑麂,ZHO,8941,SPECIES,CITES_EU,
+越南大麂,ZHO,34430,SPECIES,CITES_EU,
+南美草原鹿,ZHO,8832,SPECIES,CITES_EU,
+普度鹿,ZHO,10291,SPECIES,CITES_EU,
+泽鹿,ZHO,10612,SPECIES,CITES_EU,
+坡鹿,ZHO,4547,SPECIES,CITES_EU,
+长颈鹿,ZHO,98186,SPECIES,CITES_EU,
+倭河马,ZHO,11049,SPECIES,CITES_EU,
+河马,ZHO,9229,SPECIES,CITES_EU,
+麝属,ZHO,1558,GENUS,CITES_EU,
+鹿豚,ZHO,3372,SPECIES,CITES_EU,
+伯拉巴图鹿豚,ZHO,8703,SPECIES,CITES_EU,
+西里伯斯鹿豚,ZHO,7226,SPECIES,CITES_EU,
+托吉安鹿豚,ZHO,6992,SPECIES,CITES_EU,
+姬猪,ZHO,7791,SPECIES,CITES_EU,
+草原西貒,ZHO,8725,SPECIES,CITES_EU,
+小熊猫,ZHO,7583,SPECIES,CITES_EU,
+薮犬,ZHO,7041,SPECIES,CITES_EU,
+狼,ZHO,4442,SPECIES,CITES_EU,
+食蟹狐狼,ZHO,5656,SPECIES,CITES_EU,
+鬃狼,ZHO,6975,SPECIES,CITES_EU,
+豺,ZHO,5289,SPECIES,CITES_EU,
+厄瓜多尔狐狼,ZHO,8023,SPECIES,CITES_EU,
+达尔文狐狼,ZHO,7195,SPECIES,CITES_EU,
+阿根廷狐狼,ZHO,8142,SPECIES,CITES_EU,
+巴拉圭狐狼,ZHO,8201,SPECIES,CITES_EU,
+亚洲胡狼,ZHO,9412,SPECIES,CITES_EU,
+孟加拉狐,ZHO,7752,SPECIES,CITES_EU,
+赤狐阿富汗亚种,ZHO,12245,SUBSPECIES,CITES_EU,
+赤狐西藏亚种,ZHO,12177,SUBSPECIES,CITES_EU,
+赤狐旁遮普亚种,ZHO,12174,SUBSPECIES,CITES_EU,
+阿富汗狐,ZHO,9199,SPECIES,CITES_EU,
+耳廓狐,ZHO,8895,SPECIES,CITES_EU,
+马岛獴,ZHO,9088,SPECIES,CITES_EU,
+尖吻灵猫,ZHO,7930,SPECIES,CITES_EU,
+马岛灵猫,ZHO,8387,SPECIES,CITES_EU,
+猎豹,ZHO,8935,SPECIES,CITES_EU,
+狞猫,ZHO,4645,SPECIES,CITES_EU,
+金猫,ZHO,8985,SPECIES,CITES_EU,
+黑足猫,ZHO,6355,SPECIES,CITES_EU,
+细腰猫,ZHO,98337,SPECIES,CITES_EU,
+乔氏猫,ZHO,3167,SPECIES,CITES_EU,
+南小斑虎猫,ZHO,98882,SPECIES,CITES_EU,
+安第斯山猫,ZHO,98335,SPECIES,CITES_EU,
+虎猫,ZHO,10120,SPECIES,CITES_EU,
+北小斑虎猫,ZHO,3399,SPECIES,CITES_EU,
+长尾虎猫,ZHO,4427,SPECIES,CITES_EU,
+伊比利亚猞猁,ZHO,8879,SPECIES,CITES_EU,
+巽他云豹,ZHO,35601,SPECIES,CITES_EU,
+云豹,ZHO,10199,SPECIES,CITES_EU,
+狮,ZHO,6353,SPECIES,CITES_EU,
+美洲豹,ZHO,6385,SPECIES,CITES_EU,
+豹,ZHO,8619,SPECIES,CITES_EU,
+虎,ZHO,6047,SPECIES,CITES_EU,
+雪豹,ZHO,32743,SPECIES,CITES_EU,
+云猫,ZHO,7454,SPECIES,CITES_EU,
+豹猫指名亚种,ZHO,12271,SUBSPECIES,CITES_EU,
+扁头猫,ZHO,9833,SPECIES,CITES_EU,
+锈斑猫,ZHO,9151,SPECIES,CITES_EU,
+黑珊瑚目 ,ZHO,50,ORDER,CITES_EU,
+美洲狮,ZHO,6330,SPECIES,CITES_EU,
+灰獴,ZHO,10277,SPECIES,CITES_EU,
+短尾獴,ZHO,7168,SPECIES,CITES_EU,
+红颊獴,ZHO,6973,SPECIES,CITES_EU,
+红颊獴云南亚种,ZHO,12195,SUBSPECIES,CITES_EU,
+赤獴,ZHO,6814,SPECIES,CITES_EU,
+食蟹獴,ZHO,11150,SPECIES,CITES_EU,
+纹颈獴,ZHO,8897,SPECIES,CITES_EU,
+鬣狗,ZHO,10154,SPECIES,CITES_EU,
+土狼,ZHO,7432,SPECIES,CITES_EU,
+巴塔哥尼亚獾臭鼬,ZHO,9154,SPECIES,CITES_EU,
+扎伊尔小爪水獭,ZHO,12219,SUBSPECIES,CITES_EU,
+小爪水獭,ZHO,37340,SPECIES,CITES_EU,
+海獭南方亚种,ZHO,12273,SUBSPECIES,CITES_EU,
+秘鲁水獭,ZHO,7817,SPECIES,CITES_EU,
+长尾水獭,ZHO,4391,SPECIES,CITES_EU,
+智利水獭,ZHO,5716,SPECIES,CITES_EU,
+欧亚水獭,ZHO,10941,SPECIES,CITES_EU,
+日本水獭,ZHO,3348,SPECIES,CITES_EU,
+江獭,ZHO,7181,SPECIES,CITES_EU,
+大水獭,ZHO,6787,SPECIES,CITES_EU,
+黑眉蛛猴,ZHO,12214,SUBSPECIES,CITES_EU,
+黑足鼬,ZHO,10039,SPECIES,CITES_EU,
+狐鼬,ZHO,6048,SPECIES,CITES_EU,
+黄喉貂,ZHO,8053,SPECIES,CITES_EU,
+石貂北方亚种,ZHO,12265,SUBSPECIES,CITES_EU,
+格氏貂,ZHO,7173,SPECIES,CITES_EU,
+蜜獾,ZHO,9613,SPECIES,CITES_EU,
+香鼬,ZHO,10866,SPECIES,CITES_EU,
+白鼬南疆亚种,ZHO,12172,SUBSPECIES,CITES_EU,
+黄腹鼬,ZHO,3096,SPECIES,CITES_EU,
+黄鼬,ZHO,6268,SPECIES,CITES_EU,
+海象,ZHO,9179,SPECIES,CITES_EU,
+北美毛皮海狮,ZHO,8609,SPECIES,CITES_EU,
+毛皮海狮属,ZHO,1177,GENUS,CITES_EU,
+僧海豹属,ZHO,1136,GENUS,CITES_EU,
+南象海豹,ZHO,5907,SPECIES,CITES_EU,
+白鼻浣熊,ZHO,9172,SPECIES,CITES_EU,
+南浣熊巴西亚种,ZHO,12253,SUBSPECIES,CITES_EU,
+蜜熊,ZHO,10012,SPECIES,CITES_EU,
+大熊猫,ZHO,3057,SPECIES,CITES_EU,
+马来熊,ZHO,8151,SPECIES,CITES_EU,
+懒熊,ZHO,7567,SPECIES,CITES_EU,
+南美熊,ZHO,10071,SPECIES,CITES_EU,
+棕熊,ZHO,9829,SPECIES,CITES_EU,
+棕熊喜马拉雅亚种,ZHO,12206,SUBSPECIES,CITES_EU,
+黑熊,ZHO,3570,SPECIES,CITES_EU,
+赤蛛猴,ZHO,68346,SUBSPECIES,CITES_EU,
+斑林狸,ZHO,7442,SPECIES,CITES_EU,
+獭灵猫,ZHO,10884,SPECIES,CITES_EU,
+缟椰子猫,ZHO,6327,SPECIES,CITES_EU,
+条纹林狸,ZHO,3285,SPECIES,CITES_EU,
+熊狸,ZHO,10356,SPECIES,CITES_EU,
+非洲灵猫,ZHO,10223,SPECIES,CITES_EU,
+花面狸,ZHO,4655,SPECIES,CITES_EU,
+椰子狸,ZHO,4282,SPECIES,CITES_EU,
+杰氏椰子猫,ZHO,6090,SPECIES,CITES_EU,
+马拉巴尔灵猫,ZHO,3685,SPECIES,CITES_EU,
+大灵猫,ZHO,11288,SPECIES,CITES_EU,
+小灵猫,ZHO,8845,SPECIES,CITES_EU,
+北极露脊鲸,ZHO,7903,SPECIES,CITES_EU,
+露脊鲸属,ZHO,923,GENUS,CITES_EU,
+小须鲸,ZHO,8288,SPECIES,CITES_EU,
+南极须鲸,ZHO,6477,SPECIES,CITES_EU,
+塞鲸,ZHO,3975,SPECIES,CITES_EU,
+布氏鲸,ZHO,6352,SPECIES,CITES_EU,
+蓝鲸,ZHO,10905,SPECIES,CITES_EU,
+大村鲸,ZHO,4329,SPECIES,CITES_EU,
+长须鲸,ZHO,9445,SPECIES,CITES_EU,
+大翅鲸,ZHO,3052,SPECIES,CITES_EU,
+伊洛瓦底江豚,ZHO,9382,SPECIES,CITES_EU,
+矮鳍海豚,ZHO,11005,SPECIES,CITES_EU,
+驼海豚属,ZHO,2686,GENUS,CITES_EU,
+白海豚属,ZHO,1286,GENUS,CITES_EU,
+灰鲸,ZHO,5138,SPECIES,CITES_EU,
+白鱀豚,ZHO,4061,SPECIES,CITES_EU,
+侏露脊鲸,ZHO,8608,SPECIES,CITES_EU,
+窄脊江豚,ZHO,68342,SPECIES,CITES_EU,
+印太江豚,ZHO,9803,SPECIES,CITES_EU,
+加湾鼠海豚,ZHO,5652,SPECIES,CITES_EU,
+抹香鲸,ZHO,10761,SPECIES,CITES_EU,
+恒河豚属,ZHO,944,GENUS,CITES_EU,
+贝喙鲸属,ZHO,2499,GENUS,CITES_EU,
+巨齿鲸属,ZHO,2683,GENUS,CITES_EU,
+白线蝠,ZHO,11224,SPECIES,CITES_EU,
+鬃毛利齿狐蝠,ZHO,9506,SPECIES,CITES_EU,
+鲁克狐蝠,ZHO,4040,SPECIES,CITES_EU,
+冲绳狐蝠,ZHO,3627,SPECIES,CITES_EU,
+马里亚那狐蝠,ZHO,8325,SPECIES,CITES_EU,
+东加罗林狐蝠,ZHO,10438,SPECIES,CITES_EU,
+帛琉狐蝠,ZHO,3198,SPECIES,CITES_EU,
+绒狐蝠,ZHO,3370,SPECIES,CITES_EU,
+萨摩亚狐蝠,ZHO,8274,SPECIES,CITES_EU,
+海岛狐蝠,ZHO,9577,SPECIES,CITES_EU,
+科雷斯狐蝠,ZHO,5781,SPECIES,CITES_EU,
+雅浦狐蝠,ZHO,7938,SPECIES,CITES_EU,
+利齿狐蝠属,ZHO,1427,GENUS,CITES_EU,
+狐蝠属,ZHO,1185,GENUS,CITES_EU,
+大犰狳,ZHO,4416,SPECIES,CITES_EU,
+纳氏毛犰狳,ZHO,5522,SPECIES,CITES_EU,
+阿根廷裸尾犰狳,ZHO,9146,SPECIES,CITES_EU,
+长尾狭足袋鼩,ZHO,8373,SPECIES,CITES_EU,
+沙丘狭足袋鼩,ZHO,5227,SPECIES,CITES_EU,
+蓬毛兔袋鼠,ZHO,10717,SPECIES,CITES_EU,
+纹兔袋鼠,ZHO,7642,SPECIES,CITES_EU,
+辔甲尾袋鼠,ZHO,6067,SPECIES,CITES_EU,
+灰树袋鼠,ZHO,3236,SPECIES,CITES_EU,
+拟熊树袋鼠,ZHO,3121,SPECIES,CITES_EU,
+南灰袋貂,ZHO,4886,SPECIES,CITES_EU,
+密米卡灰袋貂,ZHO,4443,SPECIES,CITES_EU,
+灰袋貂,ZHO,5013,SPECIES,CITES_EU,
+马努斯斑袋貂,ZHO,6401,SPECIES,CITES_EU,
+斑袋貂,ZHO,6082,SPECIES,CITES_EU,
+巴布亚斑袋貂,ZHO,8763,SPECIES,CITES_EU,
+草原袋鼠属,ZHO,814,GENUS,CITES_EU,
+昆士兰毛吻袋熊,ZHO,5983,SPECIES,CITES_EU,
+粗毛兔,ZHO,8697,SPECIES,CITES_EU,
+火山兔,ZHO,10330,SPECIES,CITES_EU,
+原针鼹属,ZHO,1772,GENUS,CITES_EU,
+纹袋狸,ZHO,6211,SPECIES,CITES_EU,
+兔耳袋狸,ZHO,7185,SPECIES,CITES_EU,
+非洲野驴,ZHO,3255,SPECIES,CITES_EU,
+格氏斑马,ZHO,4156,SPECIES,CITES_EU,
+亚洲野驴指名亚种,ZHO,12227,SUBSPECIES,CITES_EU,
+亚洲野驴印度亚种,ZHO,12335,SUBSPECIES,CITES_EU,
+亚洲野驴戈壁亚种,ZHO,101272,SUBSPECIES,CITES_EU,
+野马,ZHO,9902,SPECIES,CITES_EU,
+亚洲野驴,ZHO,11193,SPECIES,CITES_EU,
+藏野驴,ZHO,7035,SPECIES,CITES_EU,
+山斑马哈氏亚种,ZHO,12300,SUBSPECIES,CITES_EU,
+山斑马指名亚种,ZHO,12266,SUBSPECIES,CITES_EU,
+蚺科,ZHO,377,FAMILY,CITES_EU,
+白犀指名亚种,ZHO,12296,SUBSPECIES,CITES_EU,
+南美貘,ZHO,3928,SPECIES,CITES_EU,
+印度穿山甲,ZHO,9849,SPECIES,CITES_EU,
+菲律宾穿山甲,ZHO,5098,SPECIES,CITES_EU,
+大穿山甲,ZHO,11136,SPECIES,CITES_EU,
+马来穿山甲,ZHO,5034,SPECIES,CITES_EU,
+中华穿山甲,ZHO,5373,SPECIES,CITES_EU,
+南非穿山甲,ZHO,6617,SPECIES,CITES_EU,
+长尾穿山甲,ZHO,6723,SPECIES,CITES_EU,
+树穿山甲,ZHO,4085,SPECIES,CITES_EU,
+穿山甲属,ZHO,2224,GENUS,CITES_EU,
+倭三趾树懒,ZHO,54736,SPECIES,CITES_EU,
+褐喉三趾树懒,ZHO,5257,SPECIES,CITES_EU,
+食蚁兽,ZHO,4631,SPECIES,CITES_EU,
+墨西哥食蚁兽,ZHO,4209,SPECIES,CITES_EU,
+雷蛇科,ZHO,248,FAMILY,CITES_EU,
+长毛吼猴,ZHO,5936,SPECIES,CITES_EU,
+懒吼猴,ZHO,10519,SPECIES,CITES_EU,
+仙人掌科 ,ZHO,12491,FAMILY,CITES_EU,
+绒毛蛛猴,ZHO,10078,SPECIES,CITES_EU,
+北绒毛蛛猴,ZHO,5882,SPECIES,CITES_EU,
+黄尾绒毛猴,ZHO,4996,SPECIES,CITES_EU,
+节尾猴,ZHO,8992,SPECIES,CITES_EU,
+白耳狨,ZHO,4190,SPECIES,CITES_EU,
+黄冠狨,ZHO,7641,SPECIES,CITES_EU,
+狮面狨属,ZHO,2522,GENUS,CITES_EU,
+黑白狨,ZHO,5931,SPECIES,CITES_EU,
+斑狨,ZHO,6142,SPECIES,CITES_EU,
+白足狨,ZHO,8966,SPECIES,CITES_EU,
+马氏狨,ZHO,4273,SPECIES,CITES_EU,
+棉顶狨,ZHO,4999,SPECIES,CITES_EU,
+中美洲松鼠猴,ZHO,6620,SPECIES,CITES_EU,
+敏白眉猴,ZHO,5226,SPECIES,CITES_EU,
+黛安娜长尾猴,ZHO,10615,SPECIES,CITES_EU,
+宽白眉长尾猴,ZHO,6568,SPECIES,CITES_EU,
+狮尾猴,ZHO,11089,SPECIES,CITES_EU,
+北非猕猴,ZHO,6923,SPECIES,CITES_EU,
+鬼狒,ZHO,6623,SPECIES,CITES_EU,
+山魈,ZHO,7079,SPECIES,CITES_EU,
+长鼻猴,ZHO,10415,SPECIES,CITES_EU,
+彭氏疣猴,ZHO,4754,SPECIES,CITES_EU,
+塔纳疣猴,ZHO,6368,SPECIES,CITES_EU,
+门岛叶猴,ZHO,8236,SPECIES,CITES_EU,
+白臀叶猴属,ZHO,1718,GENUS,CITES_EU,
+金丝猴属,ZHO,1836,GENUS,CITES_EU,
+克什米尔灰叶猴,ZHO,4844,SPECIES,CITES_EU,
+南平原灰叶猴,ZHO,10264,SPECIES,CITES_EU,
+北平原灰叶猴,ZHO,11082,SPECIES,CITES_EU,
+德赖灰叶猴,ZHO,7895,SPECIES,CITES_EU,
+黑足灰叶猴,ZHO,4349,SPECIES,CITES_EU,
+缨冠灰叶猴,ZHO,9670,SPECIES,CITES_EU,
+喜山长尾叶猴,ZHO,3541,SPECIES,CITES_EU,
+豚尾叶猴,ZHO,7516,SPECIES,CITES_EU,
+金叶猴,ZHO,9479,SPECIES,CITES_EU,
+戴帽叶猴,ZHO,6140,SPECIES,CITES_EU,
+肖氏乌叶猴,ZHO,10221,SPECIES,CITES_EU,
+指猴,ZHO,10504,SPECIES,CITES_EU,
+山地大猩猩,ZHO,3913,SPECIES,CITES_EU,
+大猩猩,ZHO,7116,SPECIES,CITES_EU,
+黑猩猩属,ZHO,1562,GENUS,CITES_EU,
+苏门答腊猩猩,ZHO,8203,SPECIES,CITES_EU,
+婆罗洲猩猩,ZHO,7106,SPECIES,CITES_EU,
+达班努里猩猩,ZHO,101289,SPECIES,CITES_EU,
+真鲨科,ZHO,398,FAMILY,CITES_EU,
+跗蛙科,ZHO,100265,FAMILY,CITES_EU,
+蜂猴属,ZHO,1973,GENUS,CITES_EU,
+秃猴属,ZHO,1189,GENUS,CITES_EU,
+白鼻僧面猴,ZHO,5859,SPECIES,CITES_EU,
+亚洲象,ZHO,5690,SPECIES,CITES_EU,
+非洲象,ZHO,4521,SPECIES,CITES_EU,
+毛丝鼠属,ZHO,1942,GENUS,CITES_EU,
+兔豚鼠,ZHO,8987,SPECIES,CITES_EU,
+刺豚鼠,ZHO,4693,SPECIES,CITES_EU,
+墨西哥树豪猪,ZHO,5368,SPECIES,CITES_EU,
+多刺卷尾豪猪,ZHO,7122,SPECIES,CITES_EU,
+刺巢鼠,ZHO,9566,SPECIES,CITES_EU,
+费氏拟鼠,ZHO,10382,SPECIES,CITES_EU,
+伪沼鼠,ZHO,4523,SPECIES,CITES_EU,
+中澳白尾鼠,ZHO,5898,SPECIES,CITES_EU,
+墨西哥草原犬鼠,ZHO,7981,SPECIES,CITES_EU,
+巨松鼠属,ZHO,1534,GENUS,CITES_EU,
+长尾旱獭,ZHO,5312,SPECIES,CITES_EU,
+喜马拉雅旱獭,ZHO,9329,SPECIES,CITES_EU,
+鲸目,ZHO,136,ORDER,CITES_EU,
+儒艮,ZHO,3515,SPECIES,CITES_EU,
+亚马孙海牛,ZHO,9454,SPECIES,CITES_EU,
+美洲海牛,ZHO,4548,SPECIES,CITES_EU,
+非洲海牛,ZHO,4306,SPECIES,CITES_EU,
+奥岛鸭,ZHO,10928,SPECIES,CITES_EU,
+褐鸭,ZHO,6426,SPECIES,CITES_EU,
+莱岛鸭,ZHO,9799,SPECIES,CITES_EU,
+坎岛鸭,ZHO,3253,SPECIES,CITES_EU,
+白翅栖鸭,ZHO,9079,SPECIES,CITES_EU,
+夏威夷黑雁,ZHO,4174,SPECIES,CITES_EU,
+粉头鸭,ZHO,9052,SPECIES,CITES_EU,
+马岛鸭,ZHO,5867,SPECIES,CITES_EU,
+花脸鸭,ZHO,10921,SPECIES,CITES_EU,
+加拿大黑雁阿留申亚种,ZHO,12303,SUBSPECIES,CITES_EU,
+红胸黑雁,ZHO,11171,SPECIES,CITES_EU,
+扁嘴天鹅,ZHO,5645,SPECIES,CITES_EU,
+黑颈天鹅,ZHO,4108,SPECIES,CITES_EU,
+西印度树鸭,ZHO,4624,SPECIES,CITES_EU,
+白头硬尾鸭,ZHO,7880,SPECIES,CITES_EU,
+瘤鸭,ZHO,7522,SPECIES,CITES_EU,
+黑腹树鸭,ZHO,10553,SPECIES,CITES_EU,
+茶色树鸭,ZHO,5686,SPECIES,CITES_EU,
+钩嘴铜色蜂鸟,ZHO,10946,SPECIES,CITES_EU,
+双纹石鸻,ZHO,3318,SPECIES,CITES_EU,
+遗鸥,ZHO,9314,SPECIES,CITES_EU,
+极北杓鹬,ZHO,5141,SPECIES,CITES_EU,
+细嘴杓鹬,ZHO,7401,SPECIES,CITES_EU,
+小青脚鹬,ZHO,7520,SPECIES,CITES_EU,
+鲸头鹳,ZHO,3272,SPECIES,CITES_EU,
+东方白鹳,ZHO,5126,SPECIES,CITES_EU,
+裸颈鹳,ZHO,6057,SPECIES,CITES_EU,
+白鹮鹳,ZHO,10149,SPECIES,CITES_EU,
+黑鹳,ZHO,5581,SPECIES,CITES_EU,
+鼠狐猴科,ZHO,390,FAMILY,CITES_EU,
+隐鹮,ZHO,7558,SPECIES,CITES_EU,
+朱鹮,ZHO,9080,SPECIES,CITES_EU,
+美洲红鹮,ZHO,6234,SPECIES,CITES_EU,
+秃鹮,ZHO,7519,SPECIES,CITES_EU,
+白琵鹭,ZHO,8745,SPECIES,CITES_EU,
+尼科巴鸠,ZHO,7286,SPECIES,CITES_EU,
+红喉皇鸠,ZHO,11206,SPECIES,CITES_EU,
+吕宋鸡鸠,ZHO,4623,SPECIES,CITES_EU,
+凤冠鸠属,ZHO,2606,GENUS,CITES_EU,
+粉红鸽,ZHO,5950,SPECIES,CITES_EU,
+棕颈犀鸟,ZHO,4768,SPECIES,CITES_EU,
+双角犀鸟,ZHO,5527,SPECIES,CITES_EU,
+盔犀鸟,ZHO,5769,SPECIES,CITES_EU,
+淡喉皱盔犀鸟,ZHO,8271,SPECIES,CITES_EU,
+皱盔犀鸟属,ZHO,1127,GENUS,CITES_EU,
+凤头犀鸟属,ZHO,1064,GENUS,CITES_EU,
+斑犀鸟属,ZHO,1777,GENUS,CITES_EU,
+白冠犀鸟属,ZHO,2204,GENUS,CITES_EU,
+犀鸟属,ZHO,1753,GENUS,CITES_EU,
+斑嘴犀鸟属,ZHO,1340,GENUS,CITES_EU,
+拟皱盔犀鸟属,ZHO,1106,GENUS,CITES_EU,
+冠蕉鹃属,ZHO,1785,GENUS,CITES_EU,
+西班牙雕,ZHO,9871,SPECIES,CITES_EU,
+白肩雕,ZHO,6741,SPECIES,CITES_EU,
+古巴钩嘴鸢,ZHO,32735,SPECIES,CITES_EU,
+白尾海雕,ZHO,10804,SPECIES,CITES_EU,
+角雕,ZHO,3792,SPECIES,CITES_EU,
+菲律宾雕,ZHO,9919,SPECIES,CITES_EU,
+加州神鹫,ZHO,10054,SPECIES,CITES_EU,
+安第斯神鹫,ZHO,4494,SPECIES,CITES_EU,
+王鹫,ZHO,3507,SPECIES,CITES_EU,
+塞舌尔隼,ZHO,7466,SPECIES,CITES_EU,
+印度猎隼,ZHO,8607,SPECIES,CITES_EU,
+马岛隼,ZHO,9441,SPECIES,CITES_EU,
+游隼,ZHO,6244,SPECIES,CITES_EU,
+毛里求斯隼,ZHO,3922,SPECIES,CITES_EU,
+矛隼,ZHO,7821,SPECIES,CITES_EU,
+红嘴凤冠雉,ZHO,4267,SPECIES,CITES_EU,
+阿拉戈盔嘴雉,ZHO,8933,SPECIES,CITES_EU,
+角冠雉,ZHO,7743,SPECIES,CITES_EU,
+白翅冠雉,ZHO,11162,SPECIES,CITES_EU,
+黑额鸣冠雉,ZHO,7468,SPECIES,CITES_EU,
+鸣冠雉,ZHO,7109,SPECIES,CITES_EU,
+蓝嘴凤冠雉,ZHO,5251,SPECIES,CITES_EU,
+黄瘤凤冠雉,ZHO,3747,SPECIES,CITES_EU,
+肉垂凤冠雉,ZHO,9428,SPECIES,CITES_EU,
+大凤冠雉,ZHO,4524,SPECIES,CITES_EU,
+纯色小冠雉,ZHO,7506,SPECIES,CITES_EU,
+盔凤冠雉,ZHO,10359,SPECIES,CITES_EU,
+紫冠雉,ZHO,4262,SPECIES,CITES_EU,
+山冠雉,ZHO,3745,SPECIES,CITES_EU,
+塚雉,ZHO,10947,SPECIES,CITES_EU,
+彩雉,ZHO,7308,SPECIES,CITES_EU,
+山齿鹑里氏亚种,ZHO,12330,SUBSPECIES,CITES_EU,
+白马鸡,ZHO,3446,SPECIES,CITES_EU,
+褐马鸡,ZHO,7364,SPECIES,CITES_EU,
+棕尾虹雉,ZHO,8334,SPECIES,CITES_EU,
+绿尾虹雉,ZHO,10702,SPECIES,CITES_EU,
+白尾梢虹雉,ZHO,7602,SPECIES,CITES_EU,
+爱氏鹇,ZHO,9556,SPECIES,CITES_EU,
+蓝腹鹇,ZHO,10320,SPECIES,CITES_EU,
+巴拉望孔雀雉,ZHO,10731,SPECIES,CITES_EU,
+冠眼斑雉,ZHO,5408,SPECIES,CITES_EU,
+白颈长尾雉,ZHO,7610,SPECIES,CITES_EU,
+黑颈长尾雉,ZHO,3223,SPECIES,CITES_EU,
+黑长尾雉,ZHO,6085,SPECIES,CITES_EU,
+里海雪鸡,ZHO,8323,SPECIES,CITES_EU,
+藏雪鸡,ZHO,8463,SPECIES,CITES_EU,
+灰腹角雉,ZHO,6141,SPECIES,CITES_EU,
+黄腹角雉,ZHO,4647,SPECIES,CITES_EU,
+黑头角雉,ZHO,8927,SPECIES,CITES_EU,
+大眼斑雉,ZHO,5736,SPECIES,CITES_EU,
+灰原鸡,ZHO,4931,SPECIES,CITES_EU,
+血雉,ZHO,4510,SPECIES,CITES_EU,
+绿孔雀,ZHO,4975,SPECIES,CITES_EU,
+灰孔雀雉,ZHO,5067,SPECIES,CITES_EU,
+眼斑孔雀雉,ZHO,3281,SPECIES,CITES_EU,
+凤冠孔雀雉,ZHO,9013,SPECIES,CITES_EU,
+加里曼丹孔雀雉,ZHO,3408,SPECIES,CITES_EU,
+白冠长尾雉,ZHO,6877,SPECIES,CITES_EU,
+草原松鸡阿特沃特亚种,ZHO,12239,SUBSPECIES,CITES_EU,
+黑鹇,ZHO,3839,SPECIES,CITES_EU,
+眼斑火鸡,ZHO,3270,SPECIES,CITES_EU,
+蓝孔雀,ZHO,65568,SPECIES,CITES_EU,
+勺鸡,ZHO,65601,SPECIES,CITES_EU,
+红胸角雉,ZHO,7972,SPECIES,CITES_EU,
+沙丘鹤古巴亚种,ZHO,101391,SUBSPECIES,CITES_EU,
+沙丘鹤佛罗里达亚种,ZHO,101393,SUBSPECIES,CITES_EU,
+白枕鹤,ZHO,65824,SPECIES,CITES_EU,
+黑冕鹤,ZHO,3929,SPECIES,CITES_EU,
+美洲鹤,ZHO,10857,SPECIES,CITES_EU,
+丹顶鹤,ZHO,3364,SPECIES,CITES_EU,
+白头鹤,ZHO,7494,SPECIES,CITES_EU,
+黑颈鹤,ZHO,8211,SPECIES,CITES_EU,
+白鹤,ZHO,65822,SPECIES,CITES_EU,
+海龟科,ZHO,258,FAMILY,CITES_EU,
+印度鹭鸨,ZHO,5869,SPECIES,CITES_EU,
+波斑鸨,ZHO,9020,SPECIES,CITES_EU,
+非洲波斑鸨,ZHO,6280,SPECIES,CITES_EU,
+南亚鸨,ZHO,4697,SPECIES,CITES_EU,
+豪岛秧鸡,ZHO,65832,SPECIES,CITES_EU,
+鹭鹤,ZHO,7378,SPECIES,CITES_EU,
+云雀,ZHO,99579,SPECIES,CITES_EU,
+凤头百灵,ZHO,99544,SPECIES,CITES_EU,
+林百灵,ZHO,99545,SPECIES,CITES_EU,
+草原百灵,ZHO,99546,SPECIES,CITES_EU,
+噪薮鸟,ZHO,7349,SPECIES,CITES_EU,
+斑伞鸟,ZHO,4605,SPECIES,CITES_EU,
+白翅伞鸟,ZHO,11218,SPECIES,CITES_EU,
+冠伞鸟属,ZHO,683,GENUS,CITES_EU,
+亚马孙伞鸟,ZHO,5218,SPECIES,CITES_EU,
+长耳垂伞鸟,ZHO,5825,SPECIES,CITES_EU,
+黑冠黄雀鹀,ZHO,3989,SPECIES,CITES_EU,
+黄嘴蜡嘴鹀,ZHO,10623,SPECIES,CITES_EU,
+冠蜡嘴鹀,ZHO,10795,SPECIES,CITES_EU,
+七彩靓唐纳雀,ZHO,7873,SPECIES,CITES_EU,
+黄鹀,ZHO,99547,SPECIES,CITES_EU,
+圃鹀,ZHO,99548,SPECIES,CITES_EU,
+古巴黑雀,ZHO,100665,SPECIES,CITES_EU,
+古巴草雀,ZHO,100666,SPECIES,CITES_EU,
+绿梅花雀,ZHO,11165,SPECIES,CITES_EU,
+禾雀,ZHO,5023,SPECIES,CITES_EU,
+黑喉草雀指名亚种,ZHO,12259,SUBSPECIES,CITES_EU,
+黑头红金翅雀,ZHO,7062,SPECIES,CITES_EU,
+黄脸金翅雀,ZHO,11086,SPECIES,CITES_EU,
+赤胸朱顶雀,ZHO,10029,SPECIES,CITES_EU,
+红额金翅雀,ZHO,4277,SPECIES,CITES_EU,
+白腰朱顶雀,ZHO,9288,SPECIES,CITES_EU,
+极北朱顶雀,ZHO,5310,SPECIES,CITES_EU,
+黄雀,ZHO,10927,SPECIES,CITES_EU,
+普通朱雀,ZHO,9607,SPECIES,CITES_EU,
+红交嘴雀,ZHO,10694,SPECIES,CITES_EU,
+红腹灰雀,ZHO,5890,SPECIES,CITES_EU,
+欧洲丝雀,ZHO,10284,SPECIES,CITES_EU,
+白眼河燕,ZHO,10629,SPECIES,CITES_EU,
+橙头黑鹂,ZHO,9374,SPECIES,CITES_EU,
+黄冠吸蜜鸟卡西迪亚种,ZHO,12185,SUBSPECIES,CITES_EU,
+白颈岩鹛,ZHO,8874,SPECIES,CITES_EU,
+灰颈岩鹛,ZHO,9392,SPECIES,CITES_EU,
+白腰鹊鸲,ZHO,6207,SPECIES,CITES_EU,
+鲁氏仙鹟,ZHO,11124,SPECIES,CITES_EU,
+短翅刺莺西澳亚种,ZHO,12321,SUBSPECIES,CITES_EU,
+西刺莺,ZHO,11038,SPECIES,CITES_EU,
+画眉,ZHO,3995,SPECIES,CITES_EU,
+台湾画眉,ZHO,7155,SPECIES,CITES_EU,
+银耳相思鸟,ZHO,3688,SPECIES,CITES_EU,
+红嘴相思鸟,ZHO,9438,SPECIES,CITES_EU,
+灰胸薮鹛,ZHO,5626,SPECIES,CITES_EU,
+罗岛苇莺,ZHO,7925,SPECIES,CITES_EU,
+欧亚鸲,ZHO,99550,SPECIES,CITES_EU,
+红胸姬鹟,ZHO,99552,SPECIES,CITES_EU,
+绿篱莺,ZHO,99575,SPECIES,CITES_EU,
+蓝喉歌鸲,ZHO,99553,SPECIES,CITES_EU,
+欧歌鸲,ZHO,99554,SPECIES,CITES_EU,
+新疆歌鸲,ZHO,99555,SPECIES,CITES_EU,
+白背矶鸫,ZHO,99557,SPECIES,CITES_EU,
+黑顶林莺,ZHO,99570,SPECIES,CITES_EU,
+庭园林莺,ZHO,99571,SPECIES,CITES_EU,
+白喉林莺,ZHO,99572,SPECIES,CITES_EU,
+横斑林莺,ZHO,99577,SPECIES,CITES_EU,
+毛里求斯寿带,ZHO,10393,SPECIES,CITES_EU,
+欧乌鸫,ZHO,99558,SPECIES,CITES_EU,
+欧歌鸫,ZHO,99559,SPECIES,CITES_EU,
+金黄鹂,ZHO,99560,SPECIES,CITES_EU,
+鳄目,ZHO,120,ORDER,CITES_EU,
+煤山雀,ZHO,99576,SPECIES,CITES_EU,
+泰国八色鸫,ZHO,10969,SPECIES,CITES_EU,
+吕宋八色鸫,ZHO,5663,SPECIES,CITES_EU,
+蓝尾八色鸫,ZHO,4015,SPECIES,CITES_EU,
+仙八色鸫,ZHO,8659,SPECIES,CITES_EU,
+黄冠鹎,ZHO,4614,SPECIES,CITES_EU,
+长冠八哥,ZHO,8470,SPECIES,CITES_EU,
+鹩哥,ZHO,8171,SPECIES,CITES_EU,
+鹪鹩,ZHO,99561,SPECIES,CITES_EU,
+诺岛绣眼鸟,ZHO,7837,SPECIES,CITES_EU,
+白腹军舰鸟,ZHO,3475,SPECIES,CITES_EU,
+卷羽鹈鹕,ZHO,9986,SPECIES,CITES_EU,
+粉嘴鲣鸟,ZHO,6600,SPECIES,CITES_EU,
+巨嘴拟啄木鸟,ZHO,6000,SPECIES,CITES_EU,
+白腹黑啄木鸟理查亚种,ZHO,12279,SUBSPECIES,CITES_EU,
+黑颈簇舌巨嘴鸟,ZHO,4248,SPECIES,CITES_EU,
+绿簇舌巨嘴鸟,ZHO,6674,SPECIES,CITES_EU,
+厚嘴巨嘴鸟,ZHO,9305,SPECIES,CITES_EU,
+巨嘴鸟,ZHO,7413,SPECIES,CITES_EU,
+红嘴巨嘴鸟,ZHO,7305,SPECIES,CITES_EU,
+凹嘴巨嘴鸟,ZHO,6239,SPECIES,CITES_EU,
+橘黄巨嘴鸟,ZHO,9286,SPECIES,CITES_EU,
+栗耳簇舌巨嘴鸟,ZHO,5279,SPECIES,CITES_EU,
+红胸巨嘴鸟,ZHO,6586,SPECIES,CITES_EU,
+点嘴小巨嘴鸟,ZHO,10450,SPECIES,CITES_EU,
+巨䴙䴘,ZHO,5335,SPECIES,CITES_EU,
+短尾信天翁,ZHO,5122,SPECIES,CITES_EU,
+戈氏凤头鹦鹉,ZHO,9618,SPECIES,CITES_EU,
+菲律宾凤头鹦鹉,ZHO,4740,SPECIES,CITES_EU,
+橙冠凤头鹦鹉,ZHO,4019,SPECIES,CITES_EU,
+小葵花鹦鹉,ZHO,8684,SPECIES,CITES_EU,
+棕树凤头鹦鹉,ZHO,8306,SPECIES,CITES_EU,
+红蓝鹦鹉,ZHO,3735,SPECIES,CITES_EU,
+翠蓝鹦鹉,ZHO,9144,SPECIES,CITES_EU,
+红颈鹦哥,ZHO,5156,SPECIES,CITES_EU,
+黄枕鹦哥Amazona,ZHO,3721,SPECIES,CITES_EU,
+黄肩鹦哥,ZHO,10032,SPECIES,CITES_EU,
+红尾鹦哥,ZHO,8961,SPECIES,CITES_EU,
+淡紫冠鹦哥,ZHO,5511,SPECIES,CITES_EU,
+圣文森特鹦哥,ZHO,9807,SPECIES,CITES_EU,
+帝鹦哥,ZHO,8804,SPECIES,CITES_EU,
+古巴白额鹦哥,ZHO,7836,SPECIES,CITES_EU,
+黄头鹦哥,ZHO,11033,SPECIES,CITES_EU,
+红眶鹦哥,ZHO,4520,SPECIES,CITES_EU,
+红眉鹦哥,ZHO,6713,SPECIES,CITES_EU,
+图库曼鹦哥,ZHO,7498,SPECIES,CITES_EU,
+圣卢西亚鹦哥,ZHO,9547,SPECIES,CITES_EU,
+红胸鹦哥,ZHO,11137,SPECIES,CITES_EU,
+红冠鹦哥,ZHO,6777,SPECIES,CITES_EU,
+波多黎各鹦哥,ZHO,9524,SPECIES,CITES_EU,
+琉璃金刚鹦鹉属,ZHO,1511,GENUS,CITES_EU,
+大绿金刚鹦鹉,ZHO,11207,SPECIES,CITES_EU,
+蓝喉金刚鹦鹉,ZHO,6768,SPECIES,CITES_EU,
+绯红金刚鹦鹉,ZHO,4650,SPECIES,CITES_EU,
+军绿金刚鹦鹉,ZHO,5570,SPECIES,CITES_EU,
+红额金刚鹦鹉,ZHO,6826,SPECIES,CITES_EU,
+小蓝金刚鹦鹉,ZHO,8978,SPECIES,CITES_EU,
+诺福克红额鹦鹉,ZHO,5080,SPECIES,CITES_EU,
+查岛鹦鹉,ZHO,9599,SPECIES,CITES_EU,
+红额鹦鹉,ZHO,9710,SPECIES,CITES_EU,
+新喀岛鹦鹉,ZHO,3982,SPECIES,CITES_EU,
+红脸果鹦鹉考氏亚种,ZHO,12231,SUBSPECIES,CITES_EU,
+翎冠鹦鹉,ZHO,4199,SPECIES,CITES_EU,
+金鹦哥,ZHO,4599,SPECIES,CITES_EU,
+橙腹鹦鹉,ZHO,6873,SPECIES,CITES_EU,
+黄耳鹦哥,ZHO,3587,SPECIES,CITES_EU,
+西地鹦鹉,ZHO,65853,SPECIES,CITES_EU,
+夜鹦鹉,ZHO,10484,SPECIES,CITES_EU,
+地鹦鹉,ZHO,4833,SPECIES,CITES_EU,
+红顶鹦哥,ZHO,8157,SPECIES,CITES_EU,
+蓝头金刚鹦鹉,ZHO,5863,SPECIES,CITES_EU,
+蓝翅金刚鹦鹉,ZHO,9169,SPECIES,CITES_EU,
+金肩鹦鹉,ZHO,65863,SPECIES,CITES_EU,
+黑冠鹦鹉,ZHO,65864,SPECIES,CITES_EU,
+极乐鹦鹉,ZHO,65865,SPECIES,CITES_EU,
+毛里求斯鹦鹉,ZHO,9805,SPECIES,CITES_EU,
+非洲灰鹦鹉,ZHO,9644,SPECIES,CITES_EU,
+蓝喉鹦哥,ZHO,8710,SPECIES,CITES_EU,
+厚嘴鹦哥属,ZHO,1056,GENUS,CITES_EU,
+鸮面鹦鹉,ZHO,4179,SPECIES,CITES_EU,
+小美洲鸵,ZHO,3450,SPECIES,CITES_EU,
+小美洲鸵指名亚种,ZHO,12316,SUBSPECIES,CITES_EU,
+大美洲鸵,ZHO,7527,SPECIES,CITES_EU,
+秘鲁企鹅,ZHO,9843,SPECIES,CITES_EU,
+南非企鹅,ZHO,11043,SPECIES,CITES_EU,
+苏铁科 ,ZHO,12499,FAMILY,CITES_EU,
+林斑小鸮,ZHO,11059,SPECIES,CITES_EU,
+巨角鸮,ZHO,9727,SPECIES,CITES_EU,
+圣诞岛鹰鸮,ZHO,5056,SPECIES,CITES_EU,
+马岛草鸮,ZHO,10923,SPECIES,CITES_EU,
+非洲鸵鸟,ZHO,8790,SPECIES,CITES_EU,
+孤䳍,ZHO,4667,SPECIES,CITES_EU,
+凤尾绿咬鹃,ZHO,7239,SPECIES,CITES_EU,
+鼍(扬子鳄),ZHO,6693,SPECIES,CITES_EU,
+中美短吻鼍,ZHO,12251,SUBSPECIES,CITES_EU,
+南美短吻鼍,ZHO,5390,SPECIES,CITES_EU,
+亚马孙鼍,ZHO,10978,SPECIES,CITES_EU,
+窄吻鳄,ZHO,6436,SPECIES,CITES_EU,
+尖吻鳄,ZHO,5306,SPECIES,CITES_EU,
+中介鳄,ZHO,11271,SPECIES,CITES_EU,
+菲律宾鳄,ZHO,8374,SPECIES,CITES_EU,
+佩滕鳄,ZHO,7747,SPECIES,CITES_EU,
+尼罗鳄,ZHO,10745,SPECIES,CITES_EU,
+恒河鳄,ZHO,10096,SPECIES,CITES_EU,
+湾鳄,ZHO,8560,SPECIES,CITES_EU,
+菱斑鳄,ZHO,9850,SPECIES,CITES_EU,
+暹罗鳄,ZHO,9073,SPECIES,CITES_EU,
+短吻鳄,ZHO,7296,SPECIES,CITES_EU,
+马来鳄,ZHO,7061,SPECIES,CITES_EU,
+食鱼鳄,ZHO,4299,SPECIES,CITES_EU,
+楔齿蜥属,ZHO,2611,GENUS,CITES_EU,
+埃氏角吻蜥,ZHO,98193,SPECIES,CITES_EU,
+卡鲁角吻蜥,ZHO,98194,SPECIES,CITES_EU,
+坦氏角吻蜥,ZHO,98196,SPECIES,CITES_EU,
+锡兰卷尾蜥,ZHO,98198,SPECIES,CITES_EU,
+敦巴拉卷尾蜥,ZHO,98199,SPECIES,CITES_EU,
+粗糙角吻蜥,ZHO,98192,SPECIES,CITES_EU,
+斯氏角吻蜥,ZHO,98195,SPECIES,CITES_EU,
+琴头蜥,ZHO,98201,SPECIES,CITES_EU,
+长鬣蜥,ZHO,8022,SPECIES,CITES_EU,
+棘尾蜥属,ZHO,1897,GENUS,CITES_EU,
+刺尾蜥属,ZHO,1242,GENUS,CITES_EU,
+锡兰树蜥,ZHO,99506,SPECIES,CITES_EU,
+德氏树蜥,ZHO,99507,SPECIES,CITES_EU,
+滑头树蜥,ZHO,99508,SPECIES,CITES_EU,
+滑鳞树蜥,ZHO,99509,SPECIES,CITES_EU,
+马氏树蜥,ZHO,99510,SPECIES,CITES_EU,
+黑唇树蜥,ZHO,98190,SPECIES,CITES_EU,
+佩氏树蜥,ZHO,98191,SPECIES,CITES_EU,
+栉(磷)蜥属,ZHO,100125,GENUS,CITES_EU,
+澳洲长鬣蜥属,ZHO,100129,GENUS,CITES_EU,
+隐鼓蜥属,ZHO,100131,GENUS,CITES_EU,
+安氏树鳄蛇蜥,ZHO,68243,SPECIES,CITES_EU,
+坎氏树鳄蛇蜥,ZHO,68076,SPECIES,CITES_EU,
+饰缘树鳄蛇蜥,ZHO,68150,SPECIES,CITES_EU,
+弗氏树鳄蛇蜥,ZHO,68149,SPECIES,CITES_EU,
+米拉多拉树鳄蛇蜥,ZHO,68277,SPECIES,CITES_EU,
+树鳄蛇蜥属,ZHO,1703,GENUS,CITES_EU,
+残肢变色龙,ZHO,7227,SPECIES,CITES_EU,
+塞舌尔避役属,ZHO,1783,GENUS,CITES_EU,
+侏儒避役属,ZHO,1354,GENUS,CITES_EU,
+变色龙属,ZHO,2450,GENUS,CITES_EU,
+诡避役属,ZHO,2713,GENUS,CITES_EU,
+避役属,ZHO,1639,GENUS,CITES_EU,
+叉角避役属,ZHO,1917,GENUS,CITES_EU,
+双角避役属,ZHO,2393,GENUS,CITES_EU,
+姆兰杰避役属,ZHO,1804,GENUS,CITES_EU,
+长吻侏儒避役属,ZHO,68416,GENUS,CITES_EU,
+枯叶侏儒避役属,ZHO,67967,GENUS,CITES_EU,
+短尾枯叶侏儒避役属,ZHO,67968,GENUS,CITES_EU,
+三角避役属,ZHO,2236,GENUS,CITES_EU,
+绳蜥属,ZHO,1870,GENUS,CITES_EU,
+拟绳蜥属,ZHO,68401,GENUS,CITES_EU,
+卡卢绳蜥属,ZHO,68405,GENUS,CITES_EU,
+拉马绳蜥属,ZHO,68400,GENUS,CITES_EU,
+尼努塔绳蜥属,ZHO,68404,GENUS,CITES_EU,
+环甲绳蜥属,ZHO,68403,GENUS,CITES_EU,
+伪绳蜥属,ZHO,30353,GENUS,CITES_EU,
+史矛革绳蜥属,ZHO,68399,GENUS,CITES_EU,
+睑虎属,ZHO,98203,GENUS,CITES_EU,
+琉球睑虎,ZHO,99500,SPECIES,CITES_EU,
+东方睑虎,ZHO,99501,SPECIES,CITES_EU,
+千石睑虎,ZHO,99502,SPECIES,CITES_EU,
+亮纹睑虎,ZHO,99503,SPECIES,CITES_EU,
+富山睑虎,ZHO,99504,SPECIES,CITES_EU,
+久米睑虎,ZHO,99505,SPECIES,CITES_EU,
+幻彩东虎,ZHO,68009,SPECIES,CITES_EU,
+尤宁岛壁虎,ZHO,98331,SPECIES,CITES_EU,
+青蓝柳趾虎,ZHO,66401,SPECIES,CITES_EU,
+印度弓趾虎,ZHO,100648,SPECIES,CITES_EU,
+大壁虎,ZHO,98217,SPECIES,CITES_EU,
+蛇岛弓趾虎,ZHO,7262,SPECIES,CITES_EU,
+绿壁虎属,ZHO,2118,GENUS,CITES_EU,
+安德罗伊马岛地虎,ZHO,98218,SPECIES,CITES_EU,
+玛索比马岛地虎,ZHO,68011,SPECIES,CITES_EU,
+残趾虎属,ZHO,2548,GENUS,CITES_EU,
+棒虎属,ZHO,68446,GENUS,CITES_EU,
+查扎利亚守宫,ZHO,100253,SPECIES,CITES_EU,
+平尾虎属,ZHO,756,GENUS,CITES_EU,
+藁趾虎属,ZHO,100120,GENUS,CITES_EU,
+胫趾虎属,ZHO,68395,GENUS,CITES_EU,
+武趾虎属,ZHO,2115,GENUS,CITES_EU,
+南林虎属,ZHO,68394,GENUS,CITES_EU,
+珠尾虎属,ZHO,100121,GENUS,CITES_EU,
+隐叶尾虎属,ZHO,100123,GENUS,CITES_EU,
+叶尾虎属,ZHO,100056,GENUS,CITES_EU,
+大叶尾虎属,ZHO,100057,GENUS,CITES_EU,
+阿马斯氏球趾虎,ZHO,98518,SPECIES,CITES_EU,
+巴拉科阿球趾虎,ZHO,98519,SPECIES,CITES_EU,
+双型球趾虎,ZHO,98520,SPECIES,CITES_EU,
+马坦萨斯球趾虎,ZHO,98521,SPECIES,CITES_EU,
+黑斑球趾虎阿氏亚种,ZHO,98528,SUBSPECIES,CITES_EU,
+黑斑球趾虎格氏亚种,ZHO,98529,SUBSPECIES,CITES_EU,
+黑斑球趾虎库山亚种,ZHO,98530,SUBSPECIES,CITES_EU,
+黑斑球趾虎奥库哈亚种,ZHO,98531,SUBSPECIES,CITES_EU,
+黑斑球趾虎将军亚种,ZHO,98532,SUBSPECIES,CITES_EU,
+礁岩球趾虎古巴亚种,ZHO,98534,SUBSPECIES,CITES_EU,
+奥氏球趾虎,ZHO,98522,SPECIES,CITES_EU,
+胡椒球趾虎,ZHO,98523,SPECIES,CITES_EU,
+鲁氏球趾虎,ZHO,98524,SPECIES,CITES_EU,
+锡沃内球趾虎,ZHO,98525,SPECIES,CITES_EU,
+宽带球趾虎,ZHO,98526,SPECIES,CITES_EU,
+刺尾虎属,ZHO,100058,GENUS,CITES_EU,
+纹虎属,ZHO,68397,GENUS,CITES_EU,
+图库趾虎属,ZHO,68396,GENUS,CITES_EU,
+长叶尾虎属,ZHO,100059,GENUS,CITES_EU,
+厚叶尾虎属,ZHO,100060,GENUS,CITES_EU,
+树壁虎属,ZHO,68393,GENUS,CITES_EU,
+珠毒蜥危地马拉亚种,ZHO,12256,SUBSPECIES,CITES_EU,
+毒蜥属,ZHO,2215,GENUS,CITES_EU,
+低冠蜥属,ZHO,903,GENUS,CITES_EU,
+圆尾蜥属,ZHO,2545,GENUS,CITES_EU,
+叩壁蜥,ZHO,4390,SPECIES,CITES_EU,
+钝鼻蜥,ZHO,3950,SPECIES,CITES_EU,
+陆鬣蜥属,ZHO,2047,GENUS,CITES_EU,
+栉尾蜥属,ZHO,2303,GENUS,CITES_EU,
+美洲鬣蜥属,ZHO,1950,GENUS,CITES_EU,
+辛氏蜥,ZHO,10443,SPECIES,CITES_EU,
+利氏壁蜥,ZHO,5162,SPECIES,CITES_EU,
+依比兹壁蜥,ZHO,4967,SPECIES,CITES_EU,
+龙树科 ,ZHO,12538,FAMILY,CITES_EU,
+角蜥属,ZHO,700,GENUS,CITES_EU,
+阿圭罗氏安乐蜥,ZHO,98508,SPECIES,CITES_EU,
+巴拉科阿安乐蜥,ZHO,98509,SPECIES,CITES_EU,
+西部须安乐蜥,ZHO,98510,SPECIES,CITES_EU,
+避役安乐蜥,ZHO,98511,SPECIES,CITES_EU,
+骑士安乐蜥,ZHO,98512,SPECIES,CITES_EU,
+埃斯坎布雷安乐蜥,ZHO,98513,SPECIES,CITES_EU,
+淡喉安乐蜥,ZHO,98514,SPECIES,CITES_EU,
+侏儒骑士安乐蜥,ZHO,98515,SPECIES,CITES_EU,
+东方须安乐蜥,ZHO,98516,SPECIES,CITES_EU,
+阿德莱达柔蜥,ZHO,100209,SPECIES,CITES_EU,
+所罗门蜥,ZHO,10549,SPECIES,CITES_EU,
+胎生蜥属,ZHO,100061,GENUS,CITES_EU,
+多线柔蜥,ZHO,100124,SPECIES,CITES_EU,
+黑黄柔蜥,ZHO,100126,SPECIES,CITES_EU,
+棕枕柔蜥,ZHO,100127,SPECIES,CITES_EU,
+粗皮柔蜥,ZHO,100128,SPECIES,CITES_EU,
+蓝色柔蜥中介亚种,ZHO,100130,SUBSPECIES,CITES_EU,
+蓝色柔蜥指名亚种,ZHO,100132,SUBSPECIES,CITES_EU,
+亚马孙鞭尾蜥,ZHO,4712,SPECIES,CITES_EU,
+闪光蜥属,ZHO,2026,GENUS,CITES_EU,
+萨尔瓦托蜥属,ZHO,68448,GENUS,CITES_EU,
+双领蜥属,ZHO,1155,GENUS,CITES_EU,
+孟加拉巨蜥,ZHO,4626,SPECIES,CITES_EU,
+黄色巨蜥,ZHO,4634,SPECIES,CITES_EU,
+疣粒巨蜥,ZHO,9436,SPECIES,CITES_EU,
+科摩多巨蜥,ZHO,7119,SPECIES,CITES_EU,
+暗纹巨蜥,ZHO,6506,SPECIES,CITES_EU,
+巨蜥属,ZHO,1274,GENUS,CITES_EU,
+鳄蜥,ZHO,3605,SPECIES,CITES_EU,
+懒螣属,ZHO,997,GENUS,CITES_EU,
+红尾蚺阿根廷亚种,ZHO,12244,SUBSPECIES,CITES_EU,
+莫纳虹蚺,ZHO,65736,SPECIES,CITES_EU,
+牙买加虹蚺,ZHO,65739,SPECIES,CITES_EU,
+马达加斯加螣,ZHO,4824,SPECIES,CITES_EU,
+雷蛇,ZHO,8791,SPECIES,CITES_EU,
+岛螣,ZHO,4687,SPECIES,CITES_EU,
+隼形目,ZHO,128,ORDER,CITES_EU,
+拟蚺蛇,ZHO,5724,SPECIES,CITES_EU,
+南美水蛇,ZHO,7280,SPECIES,CITES_EU,
+印度食卵蛇,ZHO,5146,SPECIES,CITES_EU,
+滑鼠蛇,ZHO,6039,SPECIES,CITES_EU,
+绿滇西蛇,ZHO,3868,SPECIES,CITES_EU,
+波加丹蛇,ZHO,4177,SPECIES,CITES_EU,
+渔游蛇,ZHO,4357,SPECIES,CITES_EU,
+施氏渔游蛇,ZHO,65781,SPECIES,CITES_EU,
+提氏渔游蛇,ZHO,65782,SPECIES,CITES_EU,
+盔头蛇,ZHO,4907,SPECIES,CITES_EU,
+舟山眼镜蛇,ZHO,11179,SPECIES,CITES_EU,
+孟加拉眼镜蛇,ZHO,10754,SPECIES,CITES_EU,
+缅甸眼镜蛇,ZHO,6995,SPECIES,CITES_EU,
+眼镜蛇,ZHO,5151,SPECIES,CITES_EU,
+中亚眼镜蛇,ZHO,7211,SPECIES,CITES_EU,
+菲律宾眼镜蛇,ZHO,9550,SPECIES,CITES_EU,
+印度眼镜蛇,ZHO,11007,SPECIES,CITES_EU,
+萨马眼镜蛇,ZHO,4192,SPECIES,CITES_EU,
+泰国眼镜蛇,ZHO,6524,SPECIES,CITES_EU,
+南洋眼镜蛇,ZHO,10451,SPECIES,CITES_EU,
+苏门答腊眼镜蛇,ZHO,9440,SPECIES,CITES_EU,
+眼镜王蛇,ZHO,4751,SPECIES,CITES_EU,
+科利马珊瑚蛇,ZHO,8875,SPECIES,CITES_EU,
+黑纹珊瑚蛇,ZHO,7924,SPECIES,CITES_EU,
+罗阿坦珊瑚蛇,ZHO,36391,SPECIES,CITES_EU,
+亚洲岩蟒,ZHO,4236,SPECIES,CITES_EU,
+猫科,ZHO,473,FAMILY,CITES_EU,
+草原蝰,ZHO,6926,SPECIES,CITES_EU,
+肯尼亚树蝰,ZHO,67271,SPECIES,CITES_EU,
+肯尼亚咝蝰,ZHO,67301,SPECIES,CITES_EU,
+魏氏蝰,ZHO,93876,SPECIES,CITES_EU,
+莽山原矛头蝮,ZHO,101403,SPECIES,CITES_EU,
+蛛尾拟角蝰,ZHO,98233,SPECIES,CITES_EU,
+南美响尾蛇,ZHO,5113,SPECIES,CITES_EU,
+圆斑蝰,ZHO,6235,SPECIES,CITES_EU,
+两爪鳖,ZHO,5881,SPECIES,CITES_EU,
+短颈龟,ZHO,6060,SPECIES,CITES_EU,
+麦氏长颈龟,ZHO,7441,SPECIES,CITES_EU,
+亚马逊蛇颈龟,ZHO,102986,SPECIES,CITES_EU,
+鹤科,ZHO,279,FAMILY,CITES_EU,
+拟鳄龟,ZHO,67966,SPECIES,CITES_EU,
+大鳄龟,ZHO,6736,SPECIES,CITES_EU,
+泥龟,ZHO,5246,SPECIES,CITES_EU,
+棱皮龟,ZHO,4062,SPECIES,CITES_EU,
+牟氏水龟,ZHO,3972,SPECIES,CITES_EU,
+科阿韦拉箱龟,ZHO,6708,SPECIES,CITES_EU,
+斑点水龟,ZHO,10440,SPECIES,CITES_EU,
+布氏拟龟,ZHO,8912,SPECIES,CITES_EU,
+木雕水龟,ZHO,3312,SPECIES,CITES_EU,
+巴伯图龟,ZHO,5839,SPECIES,CITES_EU,
+恩斯特图龟,ZHO,8254,SPECIES,CITES_EU,
+吉本斯图龟,ZHO,4047,SPECIES,CITES_EU,
+珀尔河图龟,ZHO,10979,SPECIES,CITES_EU,
+花图龟,ZHO,3071,SPECIES,CITES_EU,
+钻纹龟,ZHO,5107,SPECIES,CITES_EU,
+箱龟属,ZHO,891,GENUS,CITES_EU,
+欧洲池龟,ZHO,3361,SPECIES,CITES_EU,
+图龟属,ZHO,2291,GENUS,CITES_EU,
+马来潮龟,ZHO,5189,SPECIES,CITES_EU,
+潮龟,ZHO,10403,SPECIES,CITES_EU,
+红冠潮龟,ZHO,11078,SPECIES,CITES_EU,
+布氏闭壳龟,ZHO,65766,SPECIES,CITES_EU,
+黄额闭壳龟,ZHO,10210,SPECIES,CITES_EU,
+图纹闭壳龟,ZHO,65767,SPECIES,CITES_EU,
+黑池龟,ZHO,9941,SPECIES,CITES_EU,
+安南龟,ZHO,3838,SPECIES,CITES_EU,
+三脊棱龟,ZHO,8918,SPECIES,CITES_EU,
+眼斑沼龟,ZHO,8223,SPECIES,CITES_EU,
+印度泛棱背龟,ZHO,8019,SPECIES,CITES_EU,
+咸水龟,ZHO,4927,SPECIES,CITES_EU,
+三棱潮龟,ZHO,5182,SPECIES,CITES_EU,
+缅甸潮龟,ZHO,4397,SPECIES,CITES_EU,
+闭壳龟属,ZHO,1428,GENUS,CITES_EU,
+摄龟属,ZHO,1899,GENUS,CITES_EU,
+日本地龟,ZHO,5942,SPECIES,CITES_EU,
+地龟,ZHO,3261,SPECIES,CITES_EU,
+冠背草龟,ZHO,5556,SPECIES,CITES_EU,
+庙龟,ZHO,7457,SPECIES,CITES_EU,
+扁东方龟,ZHO,4484,SPECIES,CITES_EU,
+大东方龟,ZHO,4232,SPECIES,CITES_EU,
+锯缘东方龟,ZHO,10493,SPECIES,CITES_EU,
+苏拉威西地龟,ZHO,10665,SPECIES,CITES_EU,
+呵叻食螺龟,ZHO,101415,SPECIES,CITES_EU,
+大头马来龟,ZHO,8473,SPECIES,CITES_EU,
+马来龟,ZHO,8709,SPECIES,CITES_EU,
+日本拟水龟,ZHO,3514,SPECIES,CITES_EU,
+艾氏拟水龟,ZHO,4004,SPECIES,CITES_EU,
+大头乌龟,ZHO,6295,SPECIES,CITES_EU,
+腊戍拟水龟,ZHO,4114,SPECIES,CITES_EU,
+乌龟,ZHO,8423,SPECIES,CITES_EU,
+花龟,ZHO,8113,SPECIES,CITES_EU,
+缺颌花龟,ZHO,9043,SPECIES,CITES_EU,
+费氏花龟,ZHO,10050,SPECIES,CITES_EU,
+拟眼斑水龟,ZHO,4331,SPECIES,CITES_EU,
+黄喉拟水龟,ZHO,8477,SPECIES,CITES_EU,
+黑颈乌龟,ZHO,10537,SPECIES,CITES_EU,
+黑山龟,ZHO,10982,SPECIES,CITES_EU,
+印度沼龟,ZHO,6253,SPECIES,CITES_EU,
+果龟,ZHO,5381,SPECIES,CITES_EU,
+巨龟,ZHO,3413,SPECIES,CITES_EU,
+泛棱背龟属,ZHO,2218,GENUS,CITES_EU,
+木纹龟属,ZHO,100257,GENUS,CITES_EU,
+眼斑水龟,ZHO,4130,SPECIES,CITES_EU,
+四眼斑水龟,ZHO,11259,SPECIES,CITES_EU,
+粗颈龟,ZHO,9766,SPECIES,CITES_EU,
+雷岛粗颈龟,ZHO,3666,SPECIES,CITES_EU,
+蔗林龟,ZHO,9467,SPECIES,CITES_EU,
+科拉动胸龟,ZHO,100473,SPECIES,CITES_EU,
+沃格特动胸龟,ZHO,100472,SPECIES,CITES_EU,
+窄桥匣龟,ZHO,100260,SPECIES,CITES_EU,
+动胸龟属,ZHO,100261,GENUS,CITES_EU,
+沙氏麝香龟,ZHO,100263,SPECIES,CITES_EU,
+三棱麝香龟,ZHO,100264,SPECIES,CITES_EU,
+小麝香龟属,ZHO,30159,GENUS,CITES_EU,
+马达加斯加大头侧颈龟,ZHO,6722,SPECIES,CITES_EU,
+亚马孙大头侧颈龟,ZHO,6028,SPECIES,CITES_EU,
+南美侧颈龟属,ZHO,1654,GENUS,CITES_EU,
+辐纹陆龟,ZHO,6950,SPECIES,CITES_EU,
+马达加斯加陆龟,ZHO,9752,SPECIES,CITES_EU,
+象龟,ZHO,68363,SPECIES,CITES_EU,
+印度星龟,ZHO,9554,SPECIES,CITES_EU,
+缅甸星龟,ZHO,6341,SPECIES,CITES_EU,
+黄缘沙龟,ZHO,9575,SPECIES,CITES_EU,
+饼干龟,ZHO,5628,SPECIES,CITES_EU,
+几何沙龟,ZHO,6976,SPECIES,CITES_EU,
+马达加斯加蛛网龟,ZHO,4096,SPECIES,CITES_EU,
+苍珊瑚科 ,ZHO,528,FAMILY,CITES_EU,
+扁尾蛛网龟,ZHO,10810,SPECIES,CITES_EU,
+埃及陆龟,ZHO,7530,SPECIES,CITES_EU,
+刺鳖深色亚种,ZHO,12286,SUBSPECIES,CITES_EU,
+小头鳖,ZHO,6337,SPECIES,CITES_EU,
+缅甸小头鳖,ZHO,10248,SPECIES,CITES_EU,
+恒河鳖,ZHO,6115,SPECIES,CITES_EU,
+宏鳖,ZHO,7674,SPECIES,CITES_EU,
+莱氏鳖,ZHO,9277,SPECIES,CITES_EU,
+黑鳖,ZHO,3239,SPECIES,CITES_EU,
+亚洲鳖,ZHO,4713,SPECIES,CITES_EU,
+北美州鳖属,ZHO,1392,GENUS,CITES_EU,
+小头鳖属,ZHO,1351,GENUS,CITES_EU,
+努比亚盘鳖,ZHO,68014,SPECIES,CITES_EU,
+塞内加尔盘鳖,ZHO,68015,SPECIES,CITES_EU,
+欧氏圆鳖,ZHO,68017,SPECIES,CITES_EU,
+赞比亚圆鳖,ZHO,68018,SPECIES,CITES_EU,
+马来鳖,ZHO,7800,SPECIES,CITES_EU,
+斯里兰卡缘板鳖,ZHO,5271,SPECIES,CITES_EU,
+缘板鳖,ZHO,11037,SPECIES,CITES_EU,
+缅甸缘板鳖,ZHO,10001,SPECIES,CITES_EU,
+孔雀鳖,ZHO,4514,SPECIES,CITES_EU,
+山瑞鳖,ZHO,9161,SPECIES,CITES_EU,
+鼋属,ZHO,2442,GENUS,CITES_EU,
+砂鳖,ZHO,7613,SPECIES,CITES_EU,
+小鳖,ZHO,9858,SPECIES,CITES_EU,
+东北鳖,ZHO,4370,SPECIES,CITES_EU,
+大食斑鳖,ZHO,67987,SPECIES,CITES_EU,
+斑鳖,ZHO,9827,SPECIES,CITES_EU,
+非洲鱉,ZHO,8781,SPECIES,CITES_EU,
+霓股异香蛙,ZHO,6626,SPECIES,CITES_EU,
+侯氏异香蛙,ZHO,4162,SPECIES,CITES_EU,
+梅氏异香蛙,ZHO,4779,SPECIES,CITES_EU,
+萨氏异香蛙,ZHO,9758,SPECIES,CITES_EU,
+锈色异香蛙,ZHO,68384,SPECIES,CITES_EU,
+巴尔胎生蟾蜍属,ZHO,1438,GENUS,CITES_EU,
+泽氏斑蟾,ZHO,7380,SPECIES,CITES_EU,
+金蟾蜍,ZHO,4590,SPECIES,CITES_EU,
+胎生蟾属,ZHO,1956,GENUS,CITES_EU,
+利比里亚胎生蟾蜍属,ZHO,1361,GENUS,CITES_EU,
+查氏蟾蜍,ZHO,102974,SPECIES,CITES_EU,
+睫眉蟾蜍,ZHO,102975,SPECIES,CITES_EU,
+盖氏智利蟾,ZHO,10869,SPECIES,CITES_EU,
+亮彩毒蛙属,ZHO,1840,GENUS,CITES_EU,
+疣背毒蛙属,ZHO,696,GENUS,CITES_EU,
+安第斯毒蛙属,ZHO,1934,GENUS,CITES_EU,
+箭毒蛙属,ZHO,1430,GENUS,CITES_EU,
+地毒蛙属,ZHO,2210,GENUS,CITES_EU,
+圆斑毒蛙属,ZHO,2675,GENUS,CITES_EU,
+天蓝微蹼毒蛙,ZHO,8305,SPECIES,CITES_EU,
+侏毒蛙属,ZHO,1124,GENUS,CITES_EU,
+食卵毒蛙属,ZHO,1114,GENUS,CITES_EU,
+安第斯帕鲁罗毒蛙,ZHO,101406,SPECIES,CITES_EU,
+帕伦克帕鲁罗毒蛙,ZHO,101407,SPECIES,CITES_EU,
+叶毒蛙属,ZHO,2311,GENUS,CITES_EU,
+网纹毒蛙属,ZHO,2610,GENUS,CITES_EU,
+六趾蛙,ZHO,4945,SPECIES,CITES_EU,
+印度虎纹蛙,ZHO,7105,SPECIES,CITES_EU,
+红眼雨蛙属,ZHO,1507,GENUS,CITES_EU,
+曼蛙属,ZHO,2576,GENUS,CITES_EU,
+安通吉尔暴蛙,ZHO,6833,SPECIES,CITES_EU,
+古氏暴蛙,ZHO,67985,SPECIES,CITES_EU,
+岛暴蛙,ZHO,68012,SPECIES,CITES_EU,
+波波拨土蛙,ZHO,67982,SPECIES,CITES_EU,
+戈氏拨土蛙,ZHO,3932,SPECIES,CITES_EU,
+石纹拨土蛙,ZHO,67981,SPECIES,CITES_EU,
+棘拨土蛙,ZHO,67984,SPECIES,CITES_EU,
+龟蟾属,ZHO,737,GENUS,CITES_EU,
+的的喀喀水蛙,ZHO,68002,SPECIES,CITES_EU,
+钝口螈,ZHO,6985,SPECIES,CITES_EU,
+墨西哥钝口螈,ZHO,6110,SPECIES,CITES_EU,
+大鲵属,ZHO,887,GENUS,CITES_EU,
+美洲大鲵,ZHO,5347,SPECIES,CITES_EU,
+安吉小鲵,ZHO,5806,SPECIES,CITES_EU,
+桔斑螈,ZHO,5003,SPECIES,CITES_EU,
+镇海棘螈,ZHO,98234,SPECIES,CITES_EU,
+高山棘螈,ZHO,98235,SPECIES,CITES_EU,
+老挝螈,ZHO,10017,SPECIES,CITES_EU,
+瘰螈属,ZHO,2624,GENUS,CITES_EU,
+疣螈属,ZHO,793,GENUS,CITES_EU,
+琉球棘螈,ZHO,9466,SPECIES,CITES_EU,
+北非真螈,ZHO,8686,SPECIES,CITES_EU,
+长臂猿科,ZHO,458,FAMILY,CITES_EU,
+镰状真鲨,ZHO,67979,SPECIES,CITES_EU,
+长鳍真鲨,ZHO,3712,SPECIES,CITES_EU,
+长尾鲨属,ZHO,68004,GENUS,CITES_EU,
+姥鲨,ZHO,5323,SPECIES,CITES_EU,
+噬人鲨,ZHO,11210,SPECIES,CITES_EU,
+尖吻鲭鲨,ZHO,98243,SPECIES,CITES_EU,
+长鳍鲭鲨,ZHO,98244,SPECIES,CITES_EU,
+鼠鲨,ZHO,11266,SPECIES,CITES_EU,
+蝠鲼属,ZHO,68406,GENUS,CITES_EU,
+白斑江魟,ZHO,68491,SPECIES,CITES_EU,
+亨氏江魟,ZHO,68486,SPECIES,CITES_EU,
+加布提江魟,ZHO,68494,SPECIES,CITES_EU,
+利奥波德三世江魟,ZHO,68488,SPECIES,CITES_EU,
+马奎斯江魟,ZHO,102972,SPECIES,CITES_EU,
+斑江魟,ZHO,68490,SPECIES,CITES_EU,
+华氏江魟,ZHO,68498,SPECIES,CITES_EU,
+巴西副江魟,ZHO,68483,SPECIES,CITES_EU,
+江魟属,ZHO,68470,GENUS,CITES_EU,
+密星江魟,ZHO,68476,SPECIES,CITES_EU,
+马氏江魟,ZHO,68477,SPECIES,CITES_EU,
+南美江魟,ZHO,68478,SPECIES,CITES_EU,
+奥氏江魟,ZHO,68479,SPECIES,CITES_EU,
+施罗德氏江魟,ZHO,68480,SPECIES,CITES_EU,
+锉棘江魟,ZHO,68481,SPECIES,CITES_EU,
+耶氏江魟,ZHO,68482,SPECIES,CITES_EU,
+鲸鲨,ZHO,6257,SPECIES,CITES_EU,
+大狐猴科,ZHO,535,FAMILY,CITES_EU,
+蓝吻犁头鳐属,ZHO,98247,GENUS,CITES_EU,
+婆罗蜥科,ZHO,67969,FAMILY,CITES_EU,
+短吻鲟,ZHO,5777,SPECIES,CITES_EU,
+鲟,ZHO,3464,SPECIES,CITES_EU,
+欧洲鳗鲡,ZHO,3973,SPECIES,CITES_EU,
+丘裂鳍亚口鱼,ZHO,9311,SPECIES,CITES_EU,
+湄公河原鲃,ZHO,10586,SPECIES,CITES_EU,
+刚果盲鲃,ZHO,7292,SPECIES,CITES_EU,
+巨巴西骨舌鱼,ZHO,7323,SPECIES,CITES_EU,
+美丽硬骨舌鱼,ZHO,6338,SPECIES,CITES_EU,
+丽纹硬骨舌鱼,ZHO,34573,SPECIES,CITES_EU,
+波纹唇鱼(苏眉),ZHO,10242,SPECIES,CITES_EU,
+克拉里昂刺蝶鱼,ZHO,67999,SPECIES,CITES_EU,
+林博氏刺蝶魚,ZHO,100122,SPECIES,CITES_EU,
+加利福尼亚湾石首鱼,ZHO,9147,SPECIES,CITES_EU,
+斑马下钩鲶,ZHO,68475,SPECIES,CITES_EU,
+巨无齿鱼芒,ZHO,5186,SPECIES,CITES_EU,
+海马属,ZHO,780,GENUS,CITES_EU,
+澳大利亚肺鱼,ZHO,9765,SPECIES,CITES_EU,
+矛尾鱼属,ZHO,1776,GENUS,CITES_EU,
+梅花参属,ZHO,101069,GENUS,CITES_EU,
+暗色刺参,ZHO,9244,SPECIES,CITES_EU,
+黄乳海参,ZHO,98281,SPECIES,CITES_EU,
+印度洋黑乳海参,ZHO,98282,SPECIES,CITES_EU,
+黑乳海参,ZHO,98283,SPECIES,CITES_EU,
+墨西哥灰捕鸟蛛,ZHO,9233,SPECIES,CITES_EU,
+短尾蛛属,ZHO,2197,GENUS,CITES_EU,
+饰纹捕鸟蛛属,ZHO,67073,GENUS,CITES_EU,
+狭长缎尾蛛,ZHO,101269,SPECIES,CITES_EU,
+球缎尾蛛,ZHO,101270,SPECIES,CITES_EU,
+乌蛛属,ZHO,101424,GENUS,CITES_EU,
+多色加勒比蛛,ZHO,100331,SPECIES,CITES_EU,
+喀麦隆巨蝎,ZHO,98881,SPECIES,CITES_EU,
+独裁巨蝎,ZHO,8370,SPECIES,CITES_EU,
+冈比亚巨蝎,ZHO,3661,SPECIES,CITES_EU,
+将军巨蝎,ZHO,5811,SPECIES,CITES_EU,
+柔氏巨蝎,ZHO,68385,SPECIES,CITES_EU,
+考锹甲属,ZHO,2478,GENUS,CITES_EU,
+撒旦犀金龟,ZHO,5770,SPECIES,CITES_EU,
+回纹彩袄蛱蝶玻利维亚亚种,ZHO,12161,SUBSPECIES,CITES_EU,
+晶闪蝶拉邵梅亚种,ZHO,12336,SUBSPECIES,CITES_EU,
+赤靴蛱蝶巴克利亚种,ZHO,12339,SUBSPECIES,CITES_EU,
+吕宋凤蝶指名亚种,ZHO,98426,SUBSPECIES,CITES_EU,
+吕宋凤蝶民都洛亚种,ZHO,98270,SUBSPECIES,CITES_EU,
+亚力山大鸟翼凤蝶,ZHO,9492,SPECIES,CITES_EU,
+荷马凤蝶,ZHO,6885,SPECIES,CITES_EU,
+伯切尔番凤蝶,ZHO,98271,SPECIES,CITES_EU,
+斯里兰卡曙凤蝶,ZHO,7397,SPECIES,CITES_EU,
+印度曙凤蝶,ZHO,10882,SPECIES,CITES_EU,
+褐凤蝶属,ZHO,1034,GENUS,CITES_EU,
+鸟翼凤蝶属,ZHO,1861,GENUS,CITES_EU,
+科西嘉凤蝶,ZHO,6303,SPECIES,CITES_EU,
+阿波罗绢蝶,ZHO,10671,SPECIES,CITES_EU,
+喙凤蝶属,ZHO,2512,GENUS,CITES_EU,
+红颈凤蝶属,ZHO,1467,GENUS,CITES_EU,
+裳凤蝶属,ZHO,2166,GENUS,CITES_EU,
+欧洲医蛭,ZHO,3213,SPECIES,CITES_EU,
+侧纹医蛭,ZHO,6167,SPECIES,CITES_EU,
+普通石蛏,ZHO,5497,SPECIES,CITES_EU,
+雕刻射蚌,ZHO,11211,SPECIES,CITES_EU,
+走蚌,ZHO,5526,SPECIES,CITES_EU,
+冠前嵴蚌,ZHO,7896,SPECIES,CITES_EU,
+闪光前嵴蚌,ZHO,10414,SPECIES,CITES_EU,
+沙氏前嵴蚌,ZHO,7939,SPECIES,CITES_EU,
+全斜沟前嵴蚌,ZHO,12292,SUBSPECIES,CITES_EU,
+舵瘤前嵴蚌,ZHO,12198,SUBSPECIES,CITES_EU,
+瘤前嵴蚌,ZHO,12226,SUBSPECIES,CITES_EU,
+膨大前嵴蚌,ZHO,8972,SPECIES,CITES_EU,
+瓦氏前嵴蚌,ZHO,7834,SPECIES,CITES_EU,
+楔状水蚌,ZHO,3456,SPECIES,CITES_EU,
+水蚌,ZHO,8818,SPECIES,CITES_EU,
+希氏美丽蚌,ZHO,6473,SPECIES,CITES_EU,
+球美丽蚌,ZHO,12212,SUBSPECIES,CITES_EU,
+多彩美丽蚌,ZHO,4564,SPECIES,CITES_EU,
+阿氏强膨蚌,ZHO,10365,SPECIES,CITES_EU,
+行瘤前嵴蚌,ZHO,12222,SUBSPECIES,CITES_EU,
+棒形侧底蚌,ZHO,3479,SPECIES,CITES_EU,
+绿美丽蚌,ZHO,4006,SPECIES,CITES_EU,
+皱疤丰底蚌,ZHO,6972,SPECIES,CITES_EU,
+古柏丰底蚌,ZHO,5411,SPECIES,CITES_EU,
+满侧底蚌,ZHO,4643,SPECIES,CITES_EU,
+大河蚌,ZHO,3226,SPECIES,CITES_EU,
+中间方蚌,ZHO,5748,SPECIES,CITES_EU,
+稀少方蚌,ZHO,6902,SPECIES,CITES_EU,
+柱状扁弓蚌,ZHO,5895,SPECIES,CITES_EU,
+V线珠蚌,ZHO,3317,SPECIES,CITES_EU,
+德科马坦比哥珠蚌,ZHO,12232,SUBSPECIES,CITES_EU,
+横条多毛蚌,ZHO,6780,SPECIES,CITES_EU,
+狐猴科,ZHO,557,FAMILY,CITES_EU,
+大凤螺,ZHO,9310,SPECIES,CITES_EU,
+小玛瑙螺属,ZHO,1326,GENUS,CITES_EU,
+美丽尖柱螺,ZHO,6394,SPECIES,CITES_EU,
+彩条蜗牛属,ZHO,67992,GENUS,CITES_EU,
+有鳞狐猴科,ZHO,388,FAMILY,CITES_EU,
+瘦长红珊瑚,ZHO,5439,SPECIES,CITES_EU,
+日本红珊瑚,ZHO,6035,SPECIES,CITES_EU,
+皮滑红珊瑚,ZHO,7854,SPECIES,CITES_EU,
+巧红珊瑚,ZHO,7377,SPECIES,CITES_EU,
+美洲闪鳞蛇科,ZHO,220,FAMILY,CITES_EU,
+水獭亚科,ZHO,665,SUBFAMILY,CITES_EU,
+小花龙舌兰(姬乱雪),ZHO,23356,SPECIES,CITES_EU,
+皇后龙舌兰,ZHO,13995,SPECIES,CITES_EU,
+间型酒瓶兰,ZHO,19336,SPECIES,CITES_EU,
+克雷塔罗丝兰,ZHO,27919,SPECIES,CITES_EU,
+肉锥花属,ZHO,100658,GENUS,CITES_EU,
+块茎密枝玉,ZHO,100667,SPECIES,CITES_EU,
+雪花莲属,ZHO,13395,GENUS,CITES_EU,
+黄花石蒜属,ZHO,13098,GENUS,CITES_EU,
+德氏漆,ZHO,16458,SPECIES,CITES_EU,
+织冠漆,ZHO,24976,SPECIES,CITES_EU,
+象腿漆,ZHO,23206,SPECIES,CITES_EU,
+安博棒锤树,ZHO,20895,SPECIES,CITES_EU,
+红花棒锤树,ZHO,20879,SPECIES,CITES_EU,
+德氏棒锤树,ZHO,24774,SPECIES,CITES_EU,
+矮红花棒锤树(温莎瓶干),ZHO,26458,SPECIES,CITES_EU,
+火地亚属,ZHO,13235,GENUS,CITES_EU,
+棒锤树属,ZHO,13443,GENUS,CITES_EU,
+蛇根木(印度萝芙木),ZHO,18974,SPECIES,CITES_EU,
+绿花白皮玉,ZHO,100668,SPECIES,CITES_EU,
+人参,ZHO,19207,SPECIES,CITES_EU,
+西洋参,ZHO,16143,SPECIES,CITES_EU,
+智利南洋杉,ZHO,25968,SPECIES,CITES_EU,
+酒瓶兰属,ZHO,67990,GENUS,CITES_EU,
+桃儿七,ZHO,17338,SPECIES,CITES_EU,
+风铃木属,ZHO,99802,GENUS,CITES_EU,
+金铃木属,ZHO,99734,GENUS,CITES_EU,
+粉铃木属,ZHO,99653,GENUS,CITES_EU,
+哈氏老人须,ZHO,27576,SPECIES,CITES_EU,
+卡氏老人须,ZHO,29061,SPECIES,CITES_EU,
+旱生老人须,ZHO,27858,SPECIES,CITES_EU,
+岩牡丹属,ZHO,13629,GENUS,CITES_EU,
+星冠,ZHO,24757,SPECIES,CITES_EU,
+多孔螅科 ,ZHO,245,FAMILY,CITES_EU,
+花笼,ZHO,25895,SPECIES,CITES_EU,
+精美球,ZHO,19242,SPECIES,CITES_EU,
+孔雀花属,ZHO,12629,GENUS,CITES_EU,
+林氏鹿角掌,ZHO,98421,SUBSPECIES,CITES_EU,
+珠毛柱,ZHO,18004,SPECIES,CITES_EU,
+小极光球,ZHO,27568,SPECIES,CITES_EU,
+须弥山,ZHO,14439,SPECIES,CITES_EU,
+白斜子,ZHO,25367,SPECIES,CITES_EU,
+圆锥花座球,ZHO,14450,SPECIES,CITES_EU,
+晚刺花座球,ZHO,26732,SPECIES,CITES_EU,
+苍白花座球,ZHO,17592,SPECIES,CITES_EU,
+疏刺花座球,ZHO,22677,SPECIES,CITES_EU,
+帝冠,ZHO,27815,SPECIES,CITES_EU,
+金毛翁,ZHO,20749,SPECIES,CITES_EU,
+布氏月华玉,ZHO,26931,SPECIES,CITES_EU,
+银河玉,ZHO,23835,SPECIES,CITES_EU,
+雏鹭球,ZHO,15492,SPECIES,CITES_EU,
+斑鸠球,ZHO,20271,SPECIES,CITES_EU,
+天狼,ZHO,20139,SPECIES,CITES_EU,
+斧突球属,ZHO,12843,GENUS,CITES_EU,
+布氏白虹山,ZHO,67963,SPECIES,CITES_EU,
+突氏玄武玉,ZHO,29634,SUBSPECIES,CITES_EU,
+短刺白虹山,ZHO,44177,SPECIES,CITES_EU,
+新墨西哥鯱玉,ZHO,46037,SPECIES,CITES_EU,
+白琅玉,ZHO,25351,SPECIES,CITES_EU,
+苍白玉,ZHO,20415,SPECIES,CITES_EU,
+藤荣球,ZHO,17824,SPECIES,CITES_EU,
+月想曲,ZHO,27661,SPECIES,CITES_EU,
+尼氏鯱玉,ZHO,29372,SPECIES,CITES_EU,
+月童,ZHO,29522,SPECIES,CITES_EU,
+毛刺球,ZHO,25178,SPECIES,CITES_EU,
+塞氏鯱玉,ZHO,22530,SPECIES,CITES_EU,
+犹他球,ZHO,50438,SPECIES,CITES_EU,
+怀氏虹山,ZHO,18383,SPECIES,CITES_EU,
+鳞茎玉属,ZHO,13121,GENUS,CITES_EU,
+姣丽球属,ZHO,13183,GENUS,CITES_EU,
+尤伯球属,ZHO,13064,GENUS,CITES_EU,
+多柱树,ZHO,16008,SPECIES,CITES_EU,
+云木香,ZHO,28010,SPECIES,CITES_EU,
+棒叶敦菊木,ZHO,100797,SPECIES,CITES_EU,
+疣基厚敦菊,ZHO,28080,SPECIES,CITES_EU,
+蟹甲厚敦菊,ZHO,19760,SPECIES,CITES_EU,
+刺烛厚敦菊(黑魔殿),ZHO,26151,SPECIES,CITES_EU,
+反折厚敦菊,ZHO,24239,SPECIES,CITES_EU,
+红景天属,ZHO,99655,GENUS,CITES_EU,
+毛花奇峰木(布圣塔),ZHO,100669,SPECIES,CITES_EU,
+厚叶奇峰木,ZHO,100670,SPECIES,CITES_EU,
+网状奇峰木(万物想),ZHO,100671,SPECIES,CITES_EU,
+柔毛沙葫芦,ZHO,23918,SPECIES,CITES_EU,
+沙葫芦,ZHO,14421,SPECIES,CITES_EU,
+智利肖柏,ZHO,27947,SPECIES,CITES_EU,
+皮尔格柏,ZHO,28405,SPECIES,CITES_EU,
+姆兰杰南非柏,ZHO,98273,SPECIES,CITES_EU,
+桫椤属,ZHO,12686,GENUS,CITES_EU,
+印度苏铁,ZHO,27663,SPECIES,CITES_EU,
+金毛狗脊,ZHO,16729,SPECIES,CITES_EU,
+蚌壳蕨属,ZHO,13237,GENUS,CITES_EU,
+鹦鹉螺科 ,ZHO,67995,FAMILY,CITES_EU,
+三角叶薯蓣,ZHO,14671,SPECIES,CITES_EU,
+捕蝇草,ZHO,21371,SPECIES,CITES_EU,
+柿属,ZHO,12881,GENUS,CITES_EU,
+安波沃本大戟(安波麒麟),ZHO,19248,SPECIES,CITES_EU,
+开塞恩坦马里大戟,ZHO,22857,SPECIES,CITES_EU,
+克氏大戟,ZHO,28895,SPECIES,CITES_EU,
+筒叶大戟(筒叶麒麟),ZHO,23193,SPECIES,CITES_EU,
+德氏大戟(皱叶麒麟),ZHO,25352,SPECIES,CITES_EU,
+费氏大戟(潘郎麒麟),ZHO,19831,SPECIES,CITES_EU,
+莫氏大戟,ZHO,27263,SPECIES,CITES_EU,
+小序大戟,ZHO,29181,SPECIES,CITES_EU,
+扁枝大戟,ZHO,19109,SPECIES,CITES_EU,
+图拉大戟,ZHO,24431,SPECIES,CITES_EU,
+大戟属,ZHO,13194,GENUS,CITES_EU,
+蒙古栎,ZHO,65569,SPECIES,CITES_EU,
+簇生福桂花,ZHO,21123,SPECIES,CITES_EU,
+普氏福桂花,ZHO,23450,SPECIES,CITES_EU,
+柱状福桂花(观峰玉),ZHO,17151,SPECIES,CITES_EU,
+刺羽龙骨葵(刺月界),ZHO,100672,SPECIES,CITES_EU,
+多裂龙骨葵(黑皮月界),ZHO,100673,SPECIES,CITES_EU,
+硬皮龙骨葵,ZHO,100674,SPECIES,CITES_EU,
+粗茎天竺葵,ZHO,100675,SPECIES,CITES_EU,
+羽叶天竺葵,ZHO,100676,SPECIES,CITES_EU,
+买麻藤,ZHO,18269,SPECIES,CITES_EU,
+枫桃,ZHO,16118,SPECIES,CITES_EU,
+玫瑰安妮樟,ZHO,19724,SPECIES,CITES_EU,
+巴西黑黄檀,ZHO,24815,SPECIES,CITES_EU,
+缅茄属,ZHO,100266,GENUS,CITES_EU,
+巴拿马天蓬树,ZHO,22966,SPECIES,CITES_EU,
+黄檀属,ZHO,12737,GENUS,CITES_EU,
+二翅豆属,ZHO,13170,GENUS,CITES_EU,
+德米古夷苏木,ZHO,68201,SPECIES,CITES_EU,
+佩莱古夷苏木,ZHO,68309,SPECIES,CITES_EU,
+特氏古夷苏木,ZHO,68058,SPECIES,CITES_EU,
+巴西苏木,ZHO,94093,SPECIES,CITES_EU,
+大美木豆,ZHO,18339,SPECIES,CITES_EU,
+多穗阔变豆,ZHO,98507,SPECIES,CITES_EU,
+紫檀属,ZHO,13162,GENUS,CITES_EU,
+檀香紫檀,ZHO,28106,SPECIES,CITES_EU,
+南方决明,ZHO,16631,SPECIES,CITES_EU,
+微白芦荟,ZHO,26370,SPECIES,CITES_EU,
+白花芦荟(雪女王),ZHO,27959,SPECIES,CITES_EU,
+阿氏芦荟,ZHO,18433,SPECIES,CITES_EU,
+贝氏芦荟(斑蛇龙),ZHO,17547,SPECIES,CITES_EU,
+美丽芦荟,ZHO,19310,SPECIES,CITES_EU,
+喜钙芦荟,ZHO,19134,SPECIES,CITES_EU,
+扁芦荟,ZHO,24707,SPECIES,CITES_EU,
+德尔斐芦荟,ZHO,14136,SPECIES,CITES_EU,
+德氏芦荟,ZHO,21376,SPECIES,CITES_EU,
+脆芦荟,ZHO,21791,SPECIES,CITES_EU,
+十二卷状芦荟(琉璃姬孔雀),ZHO,19507,SPECIES,CITES_EU,
+海伦芦荟,ZHO,15573,SPECIES,CITES_EU,
+艳芦荟,ZHO,19801,SPECIES,CITES_EU,
+平列叶芦荟,ZHO,16430,SPECIES,CITES_EU,
+小芦荟,ZHO,22225,SPECIES,CITES_EU,
+皮氏芦荟(女王锦),ZHO,21733,SPECIES,CITES_EU,
+多叶芦荟,ZHO,19220,SPECIES,CITES_EU,
+劳氏芦荟,ZHO,17663,SPECIES,CITES_EU,
+索赞芦荟,ZHO,20290,SPECIES,CITES_EU,
+变色芦荟,ZHO,22489,SPECIES,CITES_EU,
+沃氏芦荟,ZHO,18553,SPECIES,CITES_EU,
+芦荟属,ZHO,13461,GENUS,CITES_EU,
+盖裂木,ZHO,29641,VARIETY,CITES_EU,
+格氏猴面包树,ZHO,67986,SPECIES,CITES_EU,
+洋椿属,ZHO,13009,GENUS,CITES_EU,
+卡雅楝属,ZHO,67594,GENUS,CITES_EU,
+矮桃花心木,ZHO,21792,SPECIES,CITES_EU,
+大叶桃花心木,ZHO,25938,SPECIES,CITES_EU,
+桃花心木,ZHO,16833,SPECIES,CITES_EU,
+卡西猪笼草,ZHO,21851,SPECIES,CITES_EU,
+拉贾猪笼草,ZHO,26024,SPECIES,CITES_EU,
+猪笼草属,ZHO,12759,GENUS,CITES_EU,
+水曲柳,ZHO,65604,SPECIES,CITES_EU,
+马达加斯加船形兰,ZHO,28489,SPECIES,CITES_EU,
+大花蕾立兰,ZHO,56608,SPECIES,CITES_EU,
+浅裂蕾立兰,ZHO,52536,SPECIES,CITES_EU,
+血色石斛,ZHO,23775,SPECIES,CITES_EU,
+墨西哥兜兰,ZHO,44303,SPECIES,CITES_EU,
+兜兰属,ZHO,12962,GENUS,CITES_EU,
+鸽兰,ZHO,15428,SPECIES,CITES_EU,
+美洲兜兰属,ZHO,12877,GENUS,CITES_EU,
+云南火焰兰,ZHO,24119,SPECIES,CITES_EU,
+肉苁蓉,ZHO,24527,SPECIES,CITES_EU,
+拟散尾葵,ZHO,45512,SPECIES,CITES_EU,
+马岛葵,ZHO,18772,SPECIES,CITES_EU,
+三角槟榔(三角椰),ZHO,52629,SPECIES,CITES_EU,
+狐猴葵,ZHO,23004,SPECIES,CITES_EU,
+达氏仙茅棕(玛瑙椰子),ZHO,16814,SPECIES,CITES_EU,
+繁序雷文葵,ZHO,29149,SPECIES,CITES_EU,
+河岸雷文葵(国王椰子),ZHO,22816,SPECIES,CITES_EU,
+林扇葵,ZHO,24197,SPECIES,CITES_EU,
+长苞椰,ZHO,24839,SPECIES,CITES_EU,
+巨籽棕,ZHO,13888,SPECIES,CITES_EU,
+尼泊尔绿绒蒿,ZHO,21243,SPECIES,CITES_EU,
+紫红叶蒴莲,ZHO,23467,SPECIES,CITES_EU,
+鳄鱼蔓,ZHO,16980,SPECIES,CITES_EU,
+小叶蒴莲,ZHO,68027,SPECIES,CITES_EU,
+多刺蒴莲(刺腺蔓),ZHO,18543,SPECIES,CITES_EU,
+黄花艳桐,ZHO,23709,SPECIES,CITES_EU,
+粉花艳桐,ZHO,15625,SPECIES,CITES_EU,
+危地马拉冷杉,ZHO,17704,SPECIES,CITES_EU,
+红松,ZHO,18210,SPECIES,CITES_EU,
+弯叶罗汉松,ZHO,22858,SPECIES,CITES_EU,
+百日青,ZHO,27490,SPECIES,CITES_EU,
+回欢草属,ZHO,12558,GENUS,CITES_EU,
+阿旺尼亚草属,ZHO,13696,GENUS,CITES_EU,
+锯齿离子苋,ZHO,20727,SPECIES,CITES_EU,
+矮蜡苋树(延寿城),ZHO,100677,SPECIES,CITES_EU,
+仙客来属,ZHO,13292,GENUS,CITES_EU,
+春福寿草,ZHO,28650,SPECIES,CITES_EU,
+白毛茛,ZHO,28204,SPECIES,CITES_EU,
+非洲李,ZHO,22086,SPECIES,CITES_EU,
+巴尔米木,ZHO,24310,SPECIES,CITES_EU,
+非洲沙针,ZHO,24847,SPECIES,CITES_EU,
+山地瓶子草,ZHO,22715,SPECIES,CITES_EU,
+阿拉巴马瓶子草,ZHO,29612,SUBSPECIES,CITES_EU,
+琼斯瓶子草,ZHO,29622,SUBSPECIES,CITES_EU,
+瓶子草属,ZHO,13356,GENUS,CITES_EU,
+库洛胡黄连,ZHO,22147,SPECIES,CITES_EU,
+蕨苏铁,ZHO,14479,SPECIES,CITES_EU,
+波温铁属,ZHO,13650,GENUS,CITES_EU,
+红豆杉,ZHO,19267,SPECIES,CITES_EU,
+东北红豆杉,ZHO,18868,SPECIES,CITES_EU,
+密叶红豆杉,ZHO,23774,SPECIES,CITES_EU,
+苏门答腊红豆杉,ZHO,26038,SPECIES,CITES_EU,
+喜马拉雅红豆杉,ZHO,22249,SPECIES,CITES_EU,
+沉香属,ZHO,13257,GENUS,CITES_EU,
+棱柱木属,ZHO,13598,GENUS,CITES_EU,
+拟沉香属,ZHO,12597,GENUS,CITES_EU,
+水青树,ZHO,21337,SPECIES,CITES_EU,
+甘松,ZHO,29093,SPECIES,CITES_EU,
+象足葡萄瓮,ZHO,22256,SPECIES,CITES_EU,
+拉扎葡萄瓮,ZHO,26162,SPECIES,CITES_EU,
+蒙氏葡萄瓮,ZHO,22154,SPECIES,CITES_EU,
+百岁叶,ZHO,15306,SPECIES,CITES_EU,
+角状泽米属,ZHO,13147,GENUS,CITES_EU,
+非州苏铁属,ZHO,13006,GENUS,CITES_EU,
+小苏铁,ZHO,16025,SPECIES,CITES_EU,
+哥伦比亚苏铁,ZHO,68389,SPECIES,CITES_EU,
+兰科 ,ZHO,12509,FAMILY,CITES_EU,
+菲律宾姜花,ZHO,22289,SPECIES,CITES_EU,
+埃塞俄比亚野姜,ZHO,67974,SPECIES,CITES_EU,
+萨米维腊木,ZHO,23851,SPECIES,CITES_EU,
+愈疮木属,ZHO,13581,GENUS,CITES_EU,
+脊索动物门,ZHO,29,PHYLUM,CITES_EU,
+哺乳纲,ZHO,34,CLASS,CITES_EU,
+偶蹄目,ZHO,90,ORDER,CITES_EU,
+叉角羚科,ZHO,363,FAMILY,CITES_EU,
+牛科,ZHO,540,FAMILY,CITES_EU,
+骆驼科,ZHO,282,FAMILY,CITES_EU,
+鹿科,ZHO,217,FAMILY,CITES_EU,
+长颈鹿科,ZHO,98184,FAMILY,CITES_EU,
+河马科,ZHO,430,FAMILY,CITES_EU,
+麝科,ZHO,545,FAMILY,CITES_EU,
+猪科,ZHO,183,FAMILY,CITES_EU,
+食肉目,ZHO,101,ORDER,CITES_EU,
+小熊猫科,ZHO,370,FAMILY,CITES_EU,
+犬科,ZHO,346,FAMILY,CITES_EU,
+马岛狸科,ZHO,329,FAMILY,CITES_EU,
+鸨科,ZHO,424,FAMILY,CITES_EU,
+獴科,ZHO,367,FAMILY,CITES_EU,
+鬣狗科,ZHO,432,FAMILY,CITES_EU,
+臭鼬科,ZHO,348,FAMILY,CITES_EU,
+鼬科,ZHO,551,FAMILY,CITES_EU,
+鼬亚科,ZHO,666,SUBFAMILY,CITES_EU,
+海象科,ZHO,425,FAMILY,CITES_EU,
+海狗科,ZHO,352,FAMILY,CITES_EU,
+海豹科,ZHO,519,FAMILY,CITES_EU,
+浣熊科,ZHO,460,FAMILY,CITES_EU,
+极乐鸟科,ZHO,417,FAMILY,CITES_EU,
+灵猫科,ZHO,548,FAMILY,CITES_EU,
+露脊鲸科,ZHO,507,FAMILY,CITES_EU,
+须鲸科,ZHO,481,FAMILY,CITES_EU,
+海豚科,ZHO,479,FAMILY,CITES_EU,
+灰鲸科,ZHO,549,FAMILY,CITES_EU,
+亚马孙河豚科,ZHO,362,FAMILY,CITES_EU,
+侏露脊鲸科,ZHO,392,FAMILY,CITES_EU,
+鼠海豚科,ZHO,378,FAMILY,CITES_EU,
+抹香鲸科,ZHO,332,FAMILY,CITES_EU,
+淡水豚科,ZHO,181,FAMILY,CITES_EU,
+喙鲸科,ZHO,184,FAMILY,CITES_EU,
+翼手目,ZHO,72,ORDER,CITES_EU,
+叶口蝠科,ZHO,514,FAMILY,CITES_EU,
+狐蝠科,ZHO,360,FAMILY,CITES_EU,
+带甲目,ZHO,124,ORDER,CITES_EU,
+犰狳科,ZHO,433,FAMILY,CITES_EU,
+脊尾袋鼠目,ZHO,114,ORDER,CITES_EU,
+袋鼬科,ZHO,361,FAMILY,CITES_EU,
+袋貂目,ZHO,100,ORDER,CITES_EU,
+硕袋鼠科,ZHO,472,FAMILY,CITES_EU,
+袋貂科,ZHO,308,FAMILY,CITES_EU,
+泊托袋鼠科,ZHO,239,FAMILY,CITES_EU,
+袋熊科,ZHO,567,FAMILY,CITES_EU,
+兔形目,ZHO,81,ORDER,CITES_EU,
+兔科,ZHO,265,FAMILY,CITES_EU,
+单孔目,ZHO,135,ORDER,CITES_EU,
+针鼹科,ZHO,356,FAMILY,CITES_EU,
+袋狸目,ZHO,87,ORDER,CITES_EU,
+袋狸科,ZHO,212,FAMILY,CITES_EU,
+兔袋狸科,ZHO,386,FAMILY,CITES_EU,
+奇蹄目,ZHO,116,ORDER,CITES_EU,
+马科,ZHO,310,FAMILY,CITES_EU,
+红鹳科,ZHO,524,FAMILY,CITES_EU,
+鳞甲目,ZHO,141,ORDER,CITES_EU,
+穿山甲科,ZHO,315,FAMILY,CITES_EU,
+长毛目,ZHO,58,ORDER,CITES_EU,
+树懒科,ZHO,232,FAMILY,CITES_EU,
+食蚁兽科,ZHO,496,FAMILY,CITES_EU,
+平胸龟科,ZHO,531,FAMILY,CITES_EU,
+蛛猴科,ZHO,256,FAMILY,CITES_EU,
+悬猴科,ZHO,401,FAMILY,CITES_EU,
+猴科,ZHO,353,FAMILY,CITES_EU,
+指猴科,ZHO,455,FAMILY,CITES_EU,
+人科,ZHO,295,FAMILY,CITES_EU,
+灵长目,ZHO,132,ORDER,CITES_EU,
+锯鳐科,ZHO,484,FAMILY,CITES_EU,
+懒猴科,ZHO,260,FAMILY,CITES_EU,
+狐尾猴科,ZHO,451,FAMILY,CITES_EU,
+长鼻目,ZHO,134,ORDER,CITES_EU,
+象科,ZHO,437,FAMILY,CITES_EU,
+啮齿目,ZHO,70,ORDER,CITES_EU,
+毛丝鼠科,ZHO,447,FAMILY,CITES_EU,
+兔豚鼠科,ZHO,247,FAMILY,CITES_EU,
+刺豚鼠科,ZHO,314,FAMILY,CITES_EU,
+美洲豪猪科,ZHO,358,FAMILY,CITES_EU,
+鼠科,ZHO,475,FAMILY,CITES_EU,
+松鼠科,ZHO,453,FAMILY,CITES_EU,
+鹦形目,ZHO,147,ORDER,CITES_EU,
+海牛目,ZHO,143,ORDER,CITES_EU,
+儒艮科,ZHO,414,FAMILY,CITES_EU,
+海牛科,ZHO,536,FAMILY,CITES_EU,
+鸟纲,ZHO,32,CLASS,CITES_EU,
+雁形目,ZHO,84,ORDER,CITES_EU,
+鸭科,ZHO,470,FAMILY,CITES_EU,
+雨燕目,ZHO,126,ORDER,CITES_EU,
+鸻形目,ZHO,145,ORDER,CITES_EU,
+石鸻科,ZHO,306,FAMILY,CITES_EU,
+鸥科,ZHO,480,FAMILY,CITES_EU,
+鹬科,ZHO,251,FAMILY,CITES_EU,
+鹳形目,ZHO,140,ORDER,CITES_EU,
+鲸头鹳科,ZHO,500,FAMILY,CITES_EU,
+鹳科,ZHO,503,FAMILY,CITES_EU,
+蟒科,ZHO,521,FAMILY,CITES_EU,
+鹮科,ZHO,420,FAMILY,CITES_EU,
+鸽形目,ZHO,121,ORDER,CITES_EU,
+鸠鸽科,ZHO,237,FAMILY,CITES_EU,
+佛法僧目,ZHO,139,ORDER,CITES_EU,
+犀鸟科,ZHO,416,FAMILY,CITES_EU,
+鹃形目,ZHO,138,ORDER,CITES_EU,
+蕉鹃科,ZHO,530,FAMILY,CITES_EU,
+鹰科,ZHO,186,FAMILY,CITES_EU,
+美洲鹫科,ZHO,395,FAMILY,CITES_EU,
+隼科,ZHO,292,FAMILY,CITES_EU,
+鸡形目,ZHO,89,ORDER,CITES_EU,
+凤冠雉科,ZHO,242,FAMILY,CITES_EU,
+塚雉科,ZHO,366,FAMILY,CITES_EU,
+雉科,ZHO,321,FAMILY,CITES_EU,
+鹤形目,ZHO,107,ORDER,CITES_EU,
+圆犁头鳐科 ,ZHO,98254,FAMILY,CITES_EU,
+秧鸡科,ZHO,354,FAMILY,CITES_EU,
+鹭鹤科,ZHO,413,FAMILY,CITES_EU,
+雀形目,ZHO,111,ORDER,CITES_EU,
+百灵科,ZHO,497,FAMILY,CITES_EU,
+薮鸟科,ZHO,203,FAMILY,CITES_EU,
+伞鸟科,ZHO,326,FAMILY,CITES_EU,
+鹀科,ZHO,384,FAMILY,CITES_EU,
+梅花雀科,ZHO,440,FAMILY,CITES_EU,
+燕雀科,ZHO,495,FAMILY,CITES_EU,
+燕科,ZHO,539,FAMILY,CITES_EU,
+拟鹂科,ZHO,575,FAMILY,CITES_EU,
+吸蜜鸟科,ZHO,562,FAMILY,CITES_EU,
+鹟科,ZHO,379,FAMILY,CITES_EU,
+黄鹂科,ZHO,318,FAMILY,CITES_EU,
+犁头鳐科 ,ZHO,100267,FAMILY,CITES_EU,
+山雀科,ZHO,492,FAMILY,CITES_EU,
+八色鸫科,ZHO,349,FAMILY,CITES_EU,
+鹎科,ZHO,490,FAMILY,CITES_EU,
+椋鸟科,ZHO,456,FAMILY,CITES_EU,
+鹪鹩科,ZHO,336,FAMILY,CITES_EU,
+绣眼鸟科,ZHO,369,FAMILY,CITES_EU,
+鹈形目,ZHO,76,ORDER,CITES_EU,
+军舰鸟科,ZHO,552,FAMILY,CITES_EU,
+鹈鹕科,ZHO,387,FAMILY,CITES_EU,
+鲣鸟科,ZHO,347,FAMILY,CITES_EU,
+啄木鸟目,ZHO,99,ORDER,CITES_EU,
+拟啄木鸟科,ZHO,215,FAMILY,CITES_EU,
+啄木鸟科,ZHO,462,FAMILY,CITES_EU,
+巨嘴鸟科,ZHO,293,FAMILY,CITES_EU,
+䴙䴘目,ZHO,95,ORDER,CITES_EU,
+䴙䴘科,ZHO,264,FAMILY,CITES_EU,
+鹱形目,ZHO,131,ORDER,CITES_EU,
+信天翁科,ZHO,261,FAMILY,CITES_EU,
+凤头鹦鹉科,ZHO,513,FAMILY,CITES_EU,
+吸蜜鹦鹉科,ZHO,196,FAMILY,CITES_EU,
+鹦鹉科,ZHO,561,FAMILY,CITES_EU,
+美洲鸵目,ZHO,75,ORDER,CITES_EU,
+美洲鸵科,ZHO,556,FAMILY,CITES_EU,
+企鹅目,ZHO,113,ORDER,CITES_EU,
+企鹅科,ZHO,468,FAMILY,CITES_EU,
+犀科,ZHO,278,FAMILY,CITES_EU,
+鸱鸮科,ZHO,421,FAMILY,CITES_EU,
+草鸮科,ZHO,554,FAMILY,CITES_EU,
+鸵形目,ZHO,65,ORDER,CITES_EU,
+鸵鸟科,ZHO,373,FAMILY,CITES_EU,
+䳍形目,ZHO,79,ORDER,CITES_EU,
+䳍科,ZHO,405,FAMILY,CITES_EU,
+咬鹃目,ZHO,125,ORDER,CITES_EU,
+咬鹃科,ZHO,316,FAMILY,CITES_EU,
+爬行纲,ZHO,35,CLASS,CITES_EU,
+鼍科,ZHO,333,FAMILY,CITES_EU,
+鳄科,ZHO,290,FAMILY,CITES_EU,
+食鱼鳄科,ZHO,423,FAMILY,CITES_EU,
+喙头目,ZHO,94,ORDER,CITES_EU,
+楔齿蜥科,ZHO,399,FAMILY,CITES_EU,
+蜥蜴目,ZHO,144,ORDER,CITES_EU,
+鬣蜥科,ZHO,320,FAMILY,CITES_EU,
+蛇蜥科,ZHO,219,FAMILY,CITES_EU,
+避役科,ZHO,243,FAMILY,CITES_EU,
+绳蜥科,ZHO,391,FAMILY,CITES_EU,
+睑虎科,ZHO,98202,FAMILY,CITES_EU,
+壁虎科,ZHO,222,FAMILY,CITES_EU,
+毒蜥科,ZHO,394,FAMILY,CITES_EU,
+美洲鬣蜥科,ZHO,499,FAMILY,CITES_EU,
+蜥蜴科,ZHO,224,FAMILY,CITES_EU,
+树鼩目,ZHO,130,ORDER,CITES_EU,
+角蜥科,ZHO,100222,FAMILY,CITES_EU,
+多色蜥科,ZHO,102989,FAMILY,CITES_EU,
+石龙子科,ZHO,435,FAMILY,CITES_EU,
+美洲蜥蜴科,ZHO,385,FAMILY,CITES_EU,
+巨蜥科,ZHO,526,FAMILY,CITES_EU,
+异蜥科,ZHO,269,FAMILY,CITES_EU,
+蛇目,ZHO,91,ORDER,CITES_EU,
+石珊瑚目 ,ZHO,78,ORDER,CITES_EU,
+游蛇科,ZHO,286,FAMILY,CITES_EU,
+眼镜蛇科,ZHO,285,FAMILY,CITES_EU,
+双髻鲨科,ZHO,538,FAMILY,CITES_EU,
+蝰科,ZHO,304,FAMILY,CITES_EU,
+龟鳖目,ZHO,109,ORDER,CITES_EU,
+两爪鳖科,ZHO,469,FAMILY,CITES_EU,
+蛇颈龟科,ZHO,434,FAMILY,CITES_EU,
+鸮形目,ZHO,69,ORDER,CITES_EU,
+鳄龟科,ZHO,187,FAMILY,CITES_EU,
+泥龟科,ZHO,313,FAMILY,CITES_EU,
+棱皮龟科,ZHO,506,FAMILY,CITES_EU,
+龟科,ZHO,244,FAMILY,CITES_EU,
+地龟科,ZHO,345,FAMILY,CITES_EU,
+动胸龟科,ZHO,100258,FAMILY,CITES_EU,
+侧颈龟科,ZHO,382,FAMILY,CITES_EU,
+柱星螅科 ,ZHO,439,FAMILY,CITES_EU,
+鳖科,ZHO,267,FAMILY,CITES_EU,
+两栖纲,ZHO,31,CLASS,CITES_EU,
+无尾目,ZHO,83,ORDER,CITES_EU,
+香蛙科,ZHO,229,FAMILY,CITES_EU,
+蟾蜍科,ZHO,289,FAMILY,CITES_EU,
+箭毒蛙科,ZHO,374,FAMILY,CITES_EU,
+叉舌蛙科,ZHO,467,FAMILY,CITES_EU,
+雨蛙科,ZHO,576,FAMILY,CITES_EU,
+曼蛙科,ZHO,563,FAMILY,CITES_EU,
+姬蛙科,ZHO,396,FAMILY,CITES_EU,
+龟蟾科,ZHO,195,FAMILY,CITES_EU,
+水蛙科,ZHO,68000,FAMILY,CITES_EU,
+有尾目,ZHO,129,ORDER,CITES_EU,
+钝口螈科,ZHO,291,FAMILY,CITES_EU,
+隐鳃鲵科,ZHO,523,FAMILY,CITES_EU,
+小鲵科,ZHO,324,FAMILY,CITES_EU,
+蝾螈科,ZHO,383,FAMILY,CITES_EU,
+板鳃亚纲,ZHO,33,CLASS,CITES_EU,
+真鲨目,ZHO,67964,ORDER,CITES_EU,
+貘科,ZHO,568,FAMILY,CITES_EU,
+鼠鲨目,ZHO,60,ORDER,CITES_EU,
+长尾鲨科,ZHO,68003,FAMILY,CITES_EU,
+姥鲨科,ZHO,272,FAMILY,CITES_EU,
+鼠鲨科,ZHO,505,FAMILY,CITES_EU,
+鲼目,ZHO,68367,ORDER,CITES_EU,
+鲼科,ZHO,68391,FAMILY,CITES_EU,
+江魟科,ZHO,68469,FAMILY,CITES_EU,
+须鲨目,ZHO,80,ORDER,CITES_EU,
+鲸鲨科,ZHO,406,FAMILY,CITES_EU,
+锯鳐目,ZHO,71,ORDER,CITES_EU,
+西貒科,ZHO,517,FAMILY,CITES_EU,
+犁头鳐目,ZHO,98245,ORDER,CITES_EU,
+蓝吻犁头鳐科,ZHO,98246,FAMILY,CITES_EU,
+陆龟科,ZHO,199,FAMILY,CITES_EU,
+辐鳍亚纲,ZHO,68369,CLASS,CITES_EU,
+鲟科,ZHO,466,FAMILY,CITES_EU,
+鳗鲡目,ZHO,68,ORDER,CITES_EU,
+鳗鲡科,ZHO,487,FAMILY,CITES_EU,
+鲤形目,ZHO,110,ORDER,CITES_EU,
+胭脂鱼科,ZHO,288,FAMILY,CITES_EU,
+鲤科,ZHO,325,FAMILY,CITES_EU,
+骨舌鱼目,ZHO,108,ORDER,CITES_EU,
+巨骨舌鱼科,ZHO,573,FAMILY,CITES_EU,
+骨舌鱼科,ZHO,461,FAMILY,CITES_EU,
+鲈形目,ZHO,96,ORDER,CITES_EU,
+隆头鱼科,ZHO,553,FAMILY,CITES_EU,
+盖刺鱼科,ZHO,491,FAMILY,CITES_EU,
+石首鱼科,ZHO,227,FAMILY,CITES_EU,
+鲇形目,ZHO,119,ORDER,CITES_EU,
+骨鲶科,ZHO,68473,FAMILY,CITES_EU,
+鱼芒科,ZHO,214,FAMILY,CITES_EU,
+海龙鱼目,ZHO,55,ORDER,CITES_EU,
+海龙鱼科,ZHO,274,FAMILY,CITES_EU,
+肺鱼亚纲,ZHO,68386,CLASS,CITES_EU,
+角齿肺鱼目,ZHO,112,ORDER,CITES_EU,
+角齿肺鱼科,ZHO,68392,FAMILY,CITES_EU,
+腔棘亚纲,ZHO,68387,CLASS,CITES_EU,
+腔棘鱼目,ZHO,57,ORDER,CITES_EU,
+矛尾鱼科,ZHO,305,FAMILY,CITES_EU,
+棘皮动物门,ZHO,40,PHYLUM,CITES_EU,
+海参纲,ZHO,41,CLASS,CITES_EU,
+楯手目,ZHO,115,ORDER,CITES_EU,
+刺参科,ZHO,355,FAMILY,CITES_EU,
+海参目,ZHO,98278,ORDER,CITES_EU,
+海参科,ZHO,98279,FAMILY,CITES_EU,
+节肢动物门,ZHO,26,PHYLUM,CITES_EU,
+蛛形纲,ZHO,27,CLASS,CITES_EU,
+蛛形目,ZHO,82,ORDER,CITES_EU,
+捕鸟蛛科,ZHO,427,FAMILY,CITES_EU,
+蝎形目,ZHO,63,ORDER,CITES_EU,
+蝎科,ZHO,412,FAMILY,CITES_EU,
+昆虫纲,ZHO,28,CLASS,CITES_EU,
+鞘翅目,ZHO,56,ORDER,CITES_EU,
+锹甲科,ZHO,393,FAMILY,CITES_EU,
+金龟科,ZHO,494,FAMILY,CITES_EU,
+鳞翅目,ZHO,88,ORDER,CITES_EU,
+蛱蝶科,ZHO,431,FAMILY,CITES_EU,
+凤蝶科,ZHO,365,FAMILY,CITES_EU,
+环节动物门,ZHO,24,PHYLUM,CITES_EU,
+蛭纲,ZHO,25,CLASS,CITES_EU,
+无吻蛭目,ZHO,127,ORDER,CITES_EU,
+医蛭科,ZHO,309,FAMILY,CITES_EU,
+软体动物门 ,ZHO,42,PHYLUM,CITES_EU,
+双壳纲,ZHO,43,CLASS,CITES_EU,
+贻贝目,ZHO,123,ORDER,CITES_EU,
+贻贝科,ZHO,477,FAMILY,CITES_EU,
+珠蚌目,ZHO,133,ORDER,CITES_EU,
+蚌科,ZHO,299,FAMILY,CITES_EU,
+帘蛤目,ZHO,104,ORDER,CITES_EU,
+砗磲科,ZHO,534,FAMILY,CITES_EU,
+头足纲,ZHO,67993,CLASS,CITES_EU,
+鹦鹉螺目,ZHO,67994,ORDER,CITES_EU,
+腹足纲,ZHO,44,CLASS,CITES_EU,
+中腹足目,ZHO,106,ORDER,CITES_EU,
+凤螺科,ZHO,569,FAMILY,CITES_EU,
+柄眼目,ZHO,74,ORDER,CITES_EU,
+小玛瑙螺科,ZHO,476,FAMILY,CITES_EU,
+坚齿螺科,ZHO,510,FAMILY,CITES_EU,
+扁雕蜗牛科,ZHO,67991,FAMILY,CITES_EU,
+刺胞亚门,ZHO,37,PHYLUM,CITES_EU,
+珊瑚虫纲,ZHO,38,CLASS,CITES_EU,
+蜂鸟科,ZHO,204,FAMILY,CITES_EU,
+柳珊瑚目,ZHO,117,ORDER,CITES_EU,
+红珊瑚科,ZHO,191,FAMILY,CITES_EU,
+苍珊瑚目,ZHO,118,ORDER,CITES_EU,
+林蚺科,ZHO,223,FAMILY,CITES_EU,
+多茎目,ZHO,49,ORDER,CITES_EU,
+水螅纲,ZHO,39,CLASS,CITES_EU,
+多孔螅目,ZHO,137,ORDER,CITES_EU,
+笙珊瑚科,ZHO,422,FAMILY,CITES_EU,
+柱星螅目,ZHO,59,ORDER,CITES_EU,
+龙舌兰科,ZHO,12543,FAMILY,CITES_EU,
+番杏科,ZHO,100653,FAMILY,CITES_EU,
+石蒜科,ZHO,12534,FAMILY,CITES_EU,
+漆树科,ZHO,12497,FAMILY,CITES_EU,
+夹竹桃科,ZHO,12501,FAMILY,CITES_EU,
+五加科,ZHO,12473,FAMILY,CITES_EU,
+南洋杉科,ZHO,12547,FAMILY,CITES_EU,
+天门冬科,ZHO,67989,FAMILY,CITES_EU,
+小蘖科,ZHO,12521,FAMILY,CITES_EU,
+紫葳科,ZHO,99652,FAMILY,CITES_EU,
+凤梨科,ZHO,12535,FAMILY,CITES_EU,
+熊科,ZHO,255,FAMILY,CITES_EU,
+多柱树科,ZHO,12517,FAMILY,CITES_EU,
+菊科,ZHO,12442,FAMILY,CITES_EU,
+景天科,ZHO,12493,FAMILY,CITES_EU,
+葫芦科,ZHO,12550,FAMILY,CITES_EU,
+柏科,ZHO,12528,FAMILY,CITES_EU,
+桫椤科,ZHO,12463,FAMILY,CITES_EU,
+蚌壳蕨科,ZHO,12449,FAMILY,CITES_EU,
+小羊驼,ZHO,3436,SPECIES,CITES_EU,
+薯蓣科,ZHO,12505,FAMILY,CITES_EU,
+茅膏菜科,ZHO,12492,FAMILY,CITES_EU,
+柿树科,ZHO,12443,FAMILY,CITES_EU,
+大戟科,ZHO,12515,FAMILY,CITES_EU,
+壳斗科,ZHO,12542,FAMILY,CITES_EU,
+福桂花科,ZHO,12459,FAMILY,CITES_EU,
+牻牛儿苗科,ZHO,100655,FAMILY,CITES_EU,
+买麻藤科,ZHO,12522,FAMILY,CITES_EU,
+胡桃科,ZHO,12504,FAMILY,CITES_EU,
+樟科,ZHO,12518,FAMILY,CITES_EU,
+豆科,ZHO,12469,FAMILY,CITES_EU,
+百合科,ZHO,12507,FAMILY,CITES_EU,
+木兰科,ZHO,12477,FAMILY,CITES_EU,
+锦葵科,ZHO,67980,FAMILY,CITES_EU,
+楝科,ZHO,12446,FAMILY,CITES_EU,
+猪笼草科,ZHO,12478,FAMILY,CITES_EU,
+木樨科,ZHO,65602,FAMILY,CITES_EU,
+列当科,ZHO,12472,FAMILY,CITES_EU,
+棕榈科,ZHO,12526,FAMILY,CITES_EU,
+罂粟科,ZHO,12488,FAMILY,CITES_EU,
+西番莲科,ZHO,12548,FAMILY,CITES_EU,
+胡麻科,ZHO,12527,FAMILY,CITES_EU,
+松科,ZHO,12514,FAMILY,CITES_EU,
+罗汉松科,ZHO,12462,FAMILY,CITES_EU,
+马齿苋科,ZHO,12456,FAMILY,CITES_EU,
+报春花科,ZHO,12471,FAMILY,CITES_EU,
+毛茛科,ZHO,12545,FAMILY,CITES_EU,
+蔷薇科,ZHO,12495,FAMILY,CITES_EU,
+茜草科,ZHO,12455,FAMILY,CITES_EU,
+檀香科,ZHO,12529,FAMILY,CITES_EU,
+瓶子草科,ZHO,12524,FAMILY,CITES_EU,
+玄参科,ZHO,12465,FAMILY,CITES_EU,
+蕨苏铁科,ZHO,12540,FAMILY,CITES_EU,
+紫杉科,ZHO,12484,FAMILY,CITES_EU,
+瑞香科,ZHO,12544,FAMILY,CITES_EU,
+水青树科,ZHO,12494,FAMILY,CITES_EU,
+败酱科,ZHO,12468,FAMILY,CITES_EU,
+葡萄科,ZHO,12549,FAMILY,CITES_EU,
+百岁叶科,ZHO,12531,FAMILY,CITES_EU,
+泽米科,ZHO,12502,FAMILY,CITES_EU,
+姜科,ZHO,12525,FAMILY,CITES_EU,
+蒺藜科,ZHO,12447,FAMILY,CITES_EU,
diff --git a/lib/modules/downloads_cache.rb b/lib/modules/downloads_cache.rb
index 0fb84e545d..158c1942bd 100644
--- a/lib/modules/downloads_cache.rb
+++ b/lib/modules/downloads_cache.rb
@@ -5,7 +5,7 @@ module DownloadsCache
'taxon_concepts_names', 'synonyms_and_trade_names',
'orphaned_taxon_concepts', 'taxon_concepts_distributions', 'common_names',
'species_reference_output', 'standard_reference_output',
- 'documents'
+ 'documents', 'cites_processes'
]
DOWNLOAD_DIRS = LISTINGS_DOWNLOAD_DIRS + [
'quotas', 'cites_suspensions', 'eu_decisions', 'shipments', 'comptab',
@@ -87,6 +87,10 @@ def self.clear_documents
clear_dirs(['documents'])
end
+ def self.clear_cites_processes
+ clear_dirs(['cites_processes'])
+ end
+
# cleared after destroy
def self.clear_quotas
clear_dirs(['quotas'])
diff --git a/lib/modules/import/rst/importer.rb b/lib/modules/import/rst/importer.rb
index b9f0980457..21e39283af 100644
--- a/lib/modules/import/rst/importer.rb
+++ b/lib/modules/import/rst/importer.rb
@@ -2,6 +2,9 @@ module Import::Rst::Importer
class << self
def import(data)
+ # Array of CitesRstProcesses in current import we can use to
+ # destroy records no longer being returned from the RST API.
+ active_ids = []
data.map do |item|
taxon_concept = map_taxon_concept(item)
unless taxon_concept
@@ -29,7 +32,10 @@ def import(data)
start_date: item['startDate'],
document: "https://rst.cites.org/public/case-details/#{item['id']}"
)
+ active_ids << rst_process.id
end
+
+ destroy_invalid_rst_processes(active_ids)
end
private
@@ -49,5 +55,16 @@ def map_event(item)
Rails.logger.info "Event #{item['meeting']['name']} for case #{item['id']} not found" unless event
event
end
+
+ def destroy_invalid_rst_processes(active_ids)
+ CitesRstProcess.where.not(id: active_ids).find_each do |rst_process|
+ case_id = rst_process.case_id
+ if rst_process.destroy
+ Rails.logger.info "RST process with case_id #{case_id} destroyed"
+ else
+ Rails.logger.info "RST process with case_id #{case_id} could not be destroyed"
+ end
+ end
+ end
end
end
diff --git a/lib/modules/search_param_sanitiser.rb b/lib/modules/search_param_sanitiser.rb
index 0faf45074c..2a04e21415 100644
--- a/lib/modules/search_param_sanitiser.rb
+++ b/lib/modules/search_param_sanitiser.rb
@@ -6,7 +6,7 @@ def sanitise_string(s)
end
def sanitise_upcase_string(s)
- s && s.strip.upcase
+ s && s.strip.mb_chars.upcase
end
def sanitise_symbol(s, default = nil)
diff --git a/lib/modules/trade/download_data_retriever.rb b/lib/modules/trade/download_data_retriever.rb
index f18a149980..3e7e414e6f 100644
--- a/lib/modules/trade/download_data_retriever.rb
+++ b/lib/modules/trade/download_data_retriever.rb
@@ -48,13 +48,22 @@ def self.search_download(params)
SQL
when 'species'
appendix = params[:appendix]
- <<-SQL
- SELECT #{ATTRIBUTES.join(',')}
- FROM non_compliant_shipments_view
- WHERE year = #{year}
- AND taxon_concept_id IN (#{id})
- AND appendix = '#{appendix}'
- SQL
+ if appendix.present?
+ <<-SQL
+ SELECT #{ATTRIBUTES.join(',')}
+ FROM non_compliant_shipments_view
+ WHERE year = #{year}
+ AND taxon_concept_id IN (#{id})
+ AND appendix = '#{appendix}'
+ SQL
+ else
+ <<-SQL
+ SELECT #{ATTRIBUTES.join(',')}
+ FROM non_compliant_shipments_view
+ WHERE year = #{year}
+ AND taxon_concept_id IN (#{id})
+ SQL
+ end
when 'commodity'
<<-SQL
SELECT #{ATTRIBUTES.join(',')}
diff --git a/lib/modules/trade/grouping/base.rb b/lib/modules/trade/grouping/base.rb
index 9943824abb..d105b9147e 100644
--- a/lib/modules/trade/grouping/base.rb
+++ b/lib/modules/trade/grouping/base.rb
@@ -35,6 +35,20 @@ def json_by_attribute(data, opts={})
raise NotImplementedError
end
+ def read_taxonomy_conversion
+ conversion = {}
+ taxonomy = CSV.read(TAXONOMIC_GROUPING, {headers: true})
+ taxonomy.each do |csv|
+ conversion[csv['group']] ||= []
+ data = {
+ taxon_name: csv['taxon_name'],
+ rank: csv['taxonomic_level']
+ }
+ conversion[csv['group']] << data
+ end
+ conversion
+ end
+
protected
def shipments_table
@@ -80,20 +94,6 @@ def limit
private
- def read_taxonomy_conversion
- conversion = {}
- taxonomy = CSV.read(TAXONOMIC_GROUPING, {headers: true})
- taxonomy.each do |csv|
- conversion[csv['group']] ||= []
- data = {
- taxon_name: csv['taxon_name'],
- rank: csv['taxonomic_level']
- }
- conversion[csv['group']] << data
- end
- conversion
- end
-
def sanitise_group(group)
return nil unless group
attributes[group.to_sym]
diff --git a/lib/modules/trade/grouping/compliance.rb b/lib/modules/trade/grouping/compliance.rb
index d2a1a581e3..5ecef93c4f 100644
--- a/lib/modules/trade/grouping/compliance.rb
+++ b/lib/modules/trade/grouping/compliance.rb
@@ -271,7 +271,11 @@ def only_importer_countries(importers, keys, year)
end
def group_query
- columns = @attributes.compact.uniq.join(',')
+ columns = if @attributes
+ @attributes.compact.uniq.join(',')
+ else
+ attributes.values.join(',')
+ end
<<-SQL
SELECT #{columns}, COUNT(*) AS cnt, 100.0*COUNT(*)/(SUM(COUNT(*)) OVER (PARTITION BY year)) AS percent
FROM non_compliant_shipments_view
diff --git a/lib/tasks/db_migrate_plpgsql.rake b/lib/tasks/db_migrate_plpgsql.rake
index 42d1ccae00..46685d251e 100644
--- a/lib/tasks/db_migrate_plpgsql.rake
+++ b/lib/tasks/db_migrate_plpgsql.rake
@@ -2,14 +2,20 @@ namespace :db do
namespace :migrate do
desc "Run custom sql scripts"
task :sql => :environment do
- ['helpers', 'mviews', 'plpgsql'].each do |dir|
- files = Dir.glob(Rails.root.join("db/#{dir}/*.sql"))
- files.sort.each do |file|
- puts file
- ActiveRecord::Base.connection.execute(File.read(file))
+ ActiveRecord::Base.transaction do
+ connection = ActiveRecord::Base.connection
+
+ ['helpers', 'mviews', 'plpgsql'].each do |dir|
+ files = Dir.glob(Rails.root.join("db/#{dir}/*.sql"))
+
+ files.sort.each do |file|
+ puts "Executing #{file}"
+ connection.execute(File.read(file))
+ end
end
end
end
+
desc "Rebuild all computed values"
task :rebuild => :migrate do
Sapi.rebuild
@@ -23,9 +29,11 @@ namespace :db do
Sapi::create_indexes
end
end
+
task :migrate do
Rake::Task['db:migrate:sql'].invoke
end
+
desc "Drop sandboxes in progress"
task :drop_sandboxes => :environment do
Trade::AnnualReportUpload.where(:is_done => false).each do |aru|
@@ -42,5 +50,4 @@ namespace :db do
puts "Deleting annual report uploads & dropping sandboxes"
Trade::AnnualReportUpload.all.each { |aru| aru.destroy }
end
-
end