feat(786-1): 별도계상 줄 품목 고르기 없앰 — 후보 고정 줄 하나 · SC 합 밖 고정 줄
- Row.judge: 별도계상 줄은 M01 · 사전 · 장부 후보 안 찾고 고정 줄 하나(품목 「프로젝트에서」 표지) · 갈래 수 그대로 - Make: 별도계상 고정 줄 = 단가 0 · 메모 「별도계상 · 품목은 프로젝트에서」(합 밖) - Picks.ts: apartPick 표지 셈 - 시험 642_3 · 642_5 · 642_6 Picks 몫을 새 꼴로 고침(옛 단언: 레미콘 자재 목록 별도계상 칸) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,7 +87,23 @@ def test_북부청_줄_판_판정과_후보(bukbu):
|
||||
assert all(set(x["갈래"]) <= set(row.KINDS) and x["후보"] is not None for x in lines)
|
||||
first = {x["행"]: x for x in out[1]} # 제1호표(설계 2-10 기대표)
|
||||
assert first[6]["갈래"] == ["재료"] and first[6]["근거"] == "별도계상"
|
||||
assert first[6]["판정"] == "제안 있음" and all(p["별도계상"] for p in first[6]["후보"])
|
||||
assert first[6]["판정"] == "제안 있음" and len(first[6]["후보"]) == 1
|
||||
apart = [x for x in lines if x["근거"] == "별도계상"] # 786-1 별도계상 64 줄 = 고정 줄 하나
|
||||
assert len(apart) == 64 and all(
|
||||
x["갈래"] == ["재료"] and x["판정"] == "제안 있음" for x in apart
|
||||
)
|
||||
for x in apart:
|
||||
(p,) = x["후보"]
|
||||
assert (p["갈래"], p["키"], p["별도계상"], p["품목"]) == (
|
||||
"고정",
|
||||
None,
|
||||
True,
|
||||
"프로젝트에서",
|
||||
)
|
||||
assert p["단위"] and p["단가"] == {"노무비": 0, "재료비": 0, "경비": 0} and "장부" not in x
|
||||
assert all(
|
||||
p["갈래"] != "고정" or "품목" not in p for x in lines for p in x["후보"] if x not in apart
|
||||
)
|
||||
assert first[7]["번"] == 46 and first[7]["판정"] == "2차 필요"
|
||||
assert first[10]["갈래"] == ["재료"] and first[10]["근거"].startswith("사전 자재단가")
|
||||
rate = next(x for x in lines if x["갈래"] == ["율"])
|
||||
|
||||
@@ -85,8 +85,11 @@ def test_판정_검산_옮기기(client):
|
||||
a, b = _base(rebar, 0), _base(rebar, 1)
|
||||
b["입력값"] = {**b["입력값"], "구분": "토목"} # 엇갈림 = 사용자 고름
|
||||
a["몫"] = 0.5
|
||||
mat = first["줄"][0] # 레미콘 별도계상
|
||||
cement = {**mat["후보"][0], "별도계상": True}
|
||||
mat = first["줄"][0] # 레미콘 별도계상 — 786-1 후보 = 고정 줄 하나(품목은 프로젝트에서)
|
||||
assert mat["판정"] == "제안 있음" and len(mat["후보"]) == 1
|
||||
cement = mat["후보"][0]
|
||||
assert (cement["갈래"], cement["키"], cement["별도계상"]) == ("고정", None, True)
|
||||
assert cement["품목"] == "프로젝트에서"
|
||||
stuck = {"갈래": "기초", "키": "GC000211", "입력값": {"유형": "보통"}}
|
||||
ex3 = _base(form) # 예시 3 GC000211 보통 · 4회 · 높이감률 · 구멍땜 = 입력 필요
|
||||
url = f"{API}/hopyo/{KEY}/check"
|
||||
@@ -155,9 +158,16 @@ def test_판정_검산_옮기기(client):
|
||||
if (x.get("고정") or {}).get("출처", {}).get("줄") == form["차례"]
|
||||
)
|
||||
assert "본뜬" not in held # 막힌 줄 = 고정 줄(엑셀 숫자)
|
||||
cement_row = next(m for m in sc1["자재"] if m["코드"] == cement["키"])
|
||||
assert labor.mark_of(cement_row, "별도계상") == "별도계상"
|
||||
assert cement_row["수량"]["손"] == mat["수량"]["엑셀"]
|
||||
held_apart = next(
|
||||
x for x in sc1["담은로직"] if (x.get("본뜬") or {}).get("차례") == mat["차례"]
|
||||
)
|
||||
fx = held_apart["고정"] # 별도계상 줄 = 합 밖 고정 줄(단가 0 · 자재 목록에 안 넣음)
|
||||
assert fx["이름"] == mat["이름"] and fx["규격"] == "별도계상" and not any(fx["단가"].values())
|
||||
assert held_apart["수량"]["손"] == mat["수량"]["엑셀"]
|
||||
assert held_apart["메모"].startswith("별도계상 · 품목은 프로젝트에서")
|
||||
without = {**sc1, "담은로직": [x for x in sc1["담은로직"] if x is not held_apart]}
|
||||
got_sum, base_sum = labor.server(sc1)["계산값"], labor.server(without)["계산값"]
|
||||
assert got_sum["반영합"] == base_sum["반영합"] # 서버 정본 셈 — 별도계상 줄은 합에 안 듦
|
||||
|
||||
sk = _doc("sangeun", out["단가산출"][0]["키"])
|
||||
assert sk["바탕"] is None and [x["로직"] for x in sk["더한줄"]] == ["GC001140"]
|
||||
|
||||
@@ -125,6 +125,29 @@ def test_호표_제안_모두_확인은_다풀린_제안만(judged):
|
||||
assert got[2]["수"] == 1 and list(got[2]["body"]["호표"]["1"]) == ["0"]
|
||||
|
||||
|
||||
def test_별도계상_줄은_고름없이_확인_옮김(judged):
|
||||
"""786-1 — 별도계상 줄 = 고정 줄 하나 · 막는 칸 없음 · [확인] 하면 옮기기 몸에 들어감."""
|
||||
row = judged[1][0] # 레미콘 별도계상
|
||||
got = _run(
|
||||
[
|
||||
{"fn": "rowDefaults", "args": [row]},
|
||||
{"fn": "suggestReady", "args": [row]},
|
||||
{"fn": "confirmable", "args": [{"$": 0}]},
|
||||
{"fn": "blockedOf", "args": [{"$": 0}]},
|
||||
{"fn": "apartPick", "args": [row["후보"][0]]},
|
||||
{"fn": "emptyDraft", "args": []},
|
||||
{"fn": "putLine", "args": [{"$": 5}, 1, 0, {"고른": {"$": 0}, "확인": True}]},
|
||||
{"fn": "moveBody", "args": [{"$": 6}, FILE]},
|
||||
]
|
||||
)
|
||||
(p,) = got[0]
|
||||
assert p["갈래"] == "고정" and p["별도계상"] is True and p["품목"] == "프로젝트에서"
|
||||
assert got[1] is True and got[2] is True and got[3] == [] and got[4] is True
|
||||
assert got[7]["막힘"] == [] and got[7]["수"] == 1
|
||||
(moved,) = got[7]["body"]["호표"]["1"]["0"]
|
||||
assert moved["갈래"] == "고정" and moved["별도계상"] is True and "필요" not in moved
|
||||
|
||||
|
||||
def test_예시1_단산10_입력필요0(judged):
|
||||
row = _row(judged, 2, 10)
|
||||
got = _run(
|
||||
|
||||
Reference in New Issue
Block a user