Merge remote-tracking branch 'origin/sub_laptop_1' into sub_laptop_3
This commit is contained in:
@@ -128,19 +128,19 @@ def formula_keys(labor: dict[str, Any] | None) -> list[str]:
|
||||
|
||||
|
||||
def formula_docs(labor: dict[str, Any] | None) -> dict[str, dict]:
|
||||
"""사본 수식 문서 닫힌 묶음(`수식.json` 몫) — 원본 일위대가 문서의 수식 사본 부름이 먼저(만든 때 것) ·
|
||||
M02 값 사본 로직 줄(795-4) = 그 줄 문서 · 그 밖 = 지금 M01 문서(`M02_Doc_Copy.closure`)."""
|
||||
"""사본 수식 문서 닫힌 묶음(`수식.json` 몫) — 원본 일위대가 · 굳힌 참조사본의 수식 사본 부름(만든 때
|
||||
것 · 키 겹침 = 원본 문서 것) 먼저 · 그 밖 = 지금 M01 문서(`M02_Doc_Copy.closure` · 값 사본 로직 줄
|
||||
안 읽음 · 855-F B9-6)."""
|
||||
from M02_MasterTemplete import M02_Doc_Copy as dc
|
||||
from M02_MasterTemplete import M02_Item_Prices as prices
|
||||
from M02_MasterTemplete import M02_Sangeun_Copy as skc
|
||||
|
||||
doc = (labor or {}).get("줄") or {}
|
||||
copies = (labor or {}).get("참조사본") or {}
|
||||
have = (doc.get(dc.KEY) or {}).get("부름") if dc.has(doc) else None
|
||||
rows = [r for r in copy_rows([doc, *copies.values()]) if "호표" in r or "흐름" in r]
|
||||
whole = prices.master()[1]
|
||||
whole = skc.Copy(whole, skc._rows({"로직": rows})) if rows else whole
|
||||
return dc.closure(whole, formula_keys(labor), have)
|
||||
have: dict[str, dict] = {}
|
||||
for one in [*copies.values(), doc]:
|
||||
if dc.has(one):
|
||||
have.update(one[dc.KEY].get("부름") or {})
|
||||
return dc.closure(prices.master()[1], formula_keys(labor), have)
|
||||
|
||||
|
||||
def build_source(item: dict[str, Any]) -> dict[str, Any]:
|
||||
|
||||
@@ -49,7 +49,8 @@ def stamp(doc: dict) -> dict | None:
|
||||
links += [
|
||||
str(m["코드"]) for m in doc.get("자재") or [] if isinstance(m, dict) and m.get("코드")
|
||||
]
|
||||
return skc.snap(list(dict.fromkeys(keys)), list(dict.fromkeys(links)))
|
||||
got = skc.snap(list(dict.fromkeys(keys)), list(dict.fromkeys(links)))
|
||||
return got and skc._plain(got) # 로직 줄 안 담음(855-F B9-6 · 셈 = 수식 부름)
|
||||
|
||||
|
||||
def _file(doc: dict) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user