Module: OxTenderAbstract::DocumentTypes

Defined in:
lib/oxtenderabstract/document_types.rb

Overview

Document types and constants for Zakupki API

Constant Summary collapse

SUBSYSTEM_TYPES =

Supported subsystem types

%w[
  PRIZ RPEC RPGZ RJ RDI BTK RPKLKP RPNZ RGK EA UR REC RPP RVP RRK RRA
  RNP RKPO PPRF615 RD615 LKOK OZ OD223 RD223 MSP223 IPVP223 TRU223
  RJ223 RPP223 RPZ223 RI223 RZ223 OV223 TPOZ223 POZ223 RNP223 POM223 ZC
].freeze
DOCUMENT_TYPES_44FZ =

Document types for 44-FZ (federal law)

%w[
  TENDER_PLAN TENDER_TERMS CONTRACT_PLAN TENDER_PROTOCOL
  CONTRACT_EXECUTION_REPORT TENDER_NOTICE TENDER_DOCUMENTATION
].freeze
ELECTRONIC_NOTIFICATION_TYPES_44FZ =

Electronic notification types for 44-FZ

%w[
  epNotificationEF2020 epNotificationEF epNotificationOK2020
  epNotificationEP2020 epNotificationZK2020 epNotificationZP2020
  epNotificationISM2020 fcsNotificationEF fcsNotificationOK
  fcsNotificationEP fcsNotificationZK fcsNotificationZP
  fcsNotificationISM fcsPlacement fcsPlacementResult
].freeze
ELECTRONIC_NOTIFICATION_TYPES_223FZ =

Electronic notification types for 223-FZ

%w[
  epNotification223 notification223 purchaseNotice223
  purchaseNoticeEA223 purchaseNoticeZK223 purchaseNoticeZP223
  purchaseNoticeOK223 purchaseNoticeIS223 contractNotice223
  contractExecutionNotice223 purchasePlan223
].freeze
ELECTRONIC_NOTIFICATION_TYPES_REGIONAL =

Electronic notification types for regional and municipal

%w[
  epNotificationRP epNotificationRPGZ notificationRP
  notificationRPGZ purchaseNoticeRP purchaseNoticeRPGZ
  contractNoticeRP contractNoticeRPGZ
].freeze
ELECTRONIC_NOTIFICATION_TYPES =

All supported electronic notification types

(
  ELECTRONIC_NOTIFICATION_TYPES_44FZ +
  ELECTRONIC_NOTIFICATION_TYPES_223FZ +
  ELECTRONIC_NOTIFICATION_TYPES_REGIONAL
).freeze
DEFAULT_SUBSYSTEM =

Default settings

'PRIZ'
DEFAULT_DOCUMENT_TYPE =
'epNotificationEF2020'
SUBSYSTEM_DESCRIPTIONS =

Subsystem descriptions

{
  'PRIZ' => '44-ФЗ - Основные закупки федеральных органов',
  'OD223' => '223-ФЗ - Закупки отдельных видов юридических лиц',
  'RD223' => '223-ФЗ - Реестр договоров',
  'RPEC' => 'Закупки субъектов РФ',
  'RPGZ' => 'Муниципальные закупки',
  'RGK' => 'Закупки государственных корпораций',
  'BTK' => 'Закупки бюджетных, автономных учреждений',
  'UR' => 'Закупки субъектов естественных монополий',
  'RJ' => 'Закупки для нужд судебной системы',
  'RDI' => 'Закупки для нужд дошкольных образовательных учреждений',
  'RPKLKP' => 'Закупки для нужд подведомственных Калининградской области',
  'RPNZ' => 'Закупки для нужд образовательных учреждений НЗО',
  'EA' => 'Электронные аукционы',
  'REC' => 'Реестр недобросовестных поставщиков',
  'RPP' => 'Реестр поставщиков',
  'RVP' => 'Реестр внутренних поставщиков',
  'RRK' => 'Реестр результатов контроля',
  'RRA' => 'Реестр результатов аудита',
  'RNP' => 'Реестр нарушений при проведении закупок',
  'RKPO' => 'Реестр контрольно-проверочных организаций'
}.freeze
API_CONFIG =

API configuration

{
  wsdl: 'https://int44.zakupki.gov.ru/eis-integration/services/getDocsIP?wsdl',
  timeout: {
    open: 30,
    read: 120
  },
  ssl_verify: false
}.freeze

Class Method Summary collapse

Class Method Details

.description_for_subsystem(subsystem_type) ⇒ Object

Get description for subsystem



98
99
100
# File 'lib/oxtenderabstract/document_types.rb', line 98

def self.description_for_subsystem(subsystem_type)
  SUBSYSTEM_DESCRIPTIONS[subsystem_type] || "Подсистема #{subsystem_type}"
end

.document_types_for_subsystem(subsystem_type) ⇒ Object

Get appropriate document types for subsystem



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/oxtenderabstract/document_types.rb', line 79

def self.document_types_for_subsystem(subsystem_type)
  case subsystem_type
  when 'PRIZ', 'RPEC', 'RPGZ', 'RGK', 'BTK', 'UR', 'RJ', 'RDI'
    ELECTRONIC_NOTIFICATION_TYPES_44FZ
  when 'OD223', 'RD223'
    ELECTRONIC_NOTIFICATION_TYPES_223FZ + ELECTRONIC_NOTIFICATION_TYPES_44FZ
  when /RP/
    ELECTRONIC_NOTIFICATION_TYPES_REGIONAL + ELECTRONIC_NOTIFICATION_TYPES_44FZ
  else
    ELECTRONIC_NOTIFICATION_TYPES_44FZ
  end
end

.subsystem_supports_document_type?(subsystem_type, document_type) ⇒ Boolean

Check if subsystem supports document type

Returns:

  • (Boolean)


93
94
95
# File 'lib/oxtenderabstract/document_types.rb', line 93

def self.subsystem_supports_document_type?(subsystem_type, document_type)
  document_types_for_subsystem(subsystem_type).include?(document_type)
end