refactor: deploy-lucee + deploy-check — два независимых набора кода ВМ

This commit is contained in:
2026-06-27 19:37:35 +04:00
parent 623cd9140f
commit ec5e23589b
60 changed files with 4805 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
"""spec_current — текущее состояние спецификации."""
from .connection import query
def list_by_contract(contract_id):
"""Return list of dicts with name_hash, name, price, qty, sum, date_start."""
return query(
"""SELECT name_hash, name, price, qty, sum, date_start
FROM spec_current WHERE contract_id = %s ORDER BY name""",
(contract_id,),
)
def get_elements_json(document_id):
"""Get elements_json for a document."""
rows = query(
"SELECT elements_json FROM documents WHERE id = %s", (document_id,)
)
return rows[0]["elements_json"] if rows and rows[0]["elements_json"] else None