a6c03a091e
Moved from gov-agreg/src/pages/achizitii/* to root (drop prefix). - 22 pages migrated, 127 files total - All internal links: /achizitii/X → /X (176 occurrences fixed) - AchizitiiLayout subnav rewritten: /X paths, top-right link to vreaudigital.ro hub - BaseLayout new (vreau.digital branding, OG tags, site URL) - astro.config.mjs: site https://vreau.digital, server output (was static) - docker-compose: port 5096 (vreaudigital is 5095), container vreau-digital - deploy.sh: paths /opt/vreau-digital, log /var/log/vreau-digital-deploy.log Backend shared with gov-agreg: - PostgreSQL satra (same schemas: seap, firms, anaf, anre, ...) - Photon, Martin tiles - Infisical /vreaudigital path (DATABASE_URL etc. shared) build: PASS (npx astro check 0 errors, npm run build 5s vite + 10s server)
33 lines
1.4 KiB
Python
33 lines
1.4 KiB
Python
"""SuDirectAcquisitions — Beletage's own direct acquisitions (won)."""
|
|
from __future__ import annotations
|
|
|
|
from ..xml_utils import (
|
|
find_child_local, find_local, text_under, text_direct,
|
|
int_under, decimal_under, datetime_under, sysitem_name, to_jsonable,
|
|
)
|
|
|
|
|
|
def parse(el) -> dict | None:
|
|
da_id = int_under(el, 'DirectAcquisitionId') or int_under(el, 'DirectAcquisitionID')
|
|
if da_id is None:
|
|
return None
|
|
|
|
cpv_code = sysitem_name(el, 'CpvCode')
|
|
return {
|
|
'da_id': da_id,
|
|
'da_name': text_under(el, 'DirectAcquisitionName'),
|
|
'unique_identification_code': text_under(el, 'UniqueIdentificationCode'),
|
|
'cpv_code': cpv_code,
|
|
'cpv_name': cpv_code, # name == code in this WSDL
|
|
'contract_type': sysitem_name(el, 'SysAcquisitionContractType'),
|
|
'publication_date': datetime_under(el, 'PublicationDate'),
|
|
'finalization_date': datetime_under(el, 'FinalizationDate'),
|
|
'estimated_value': decimal_under(el, 'EstimatedValue') or decimal_under(el, 'EstimatedValueRon'),
|
|
'closing_value': decimal_under(el, 'ClosingValue'),
|
|
'currency': 'RON',
|
|
'da_state': sysitem_name(el, 'SysDirectAcquisitionState'),
|
|
'authority_id': int_under(el, 'ContractingAuthorityID'),
|
|
'authority_name': text_under(el, 'ContractingAuthority'),
|
|
'details': to_jsonable(el),
|
|
}
|