feat(M01): 조달 찾기 확정 모양 · 품셈재료 가격 연결 · 건설노임 준용 직종 고르기

- 고르기 API GET /api/m01/pick (나라장터자재 · 시중물가 · 공표 직종) — 조달 찾기 옛 API 대체
- 시중물가 조달›출처 「나라장터:<열쇠>」 연결 · 끊기 뒤 변화 없음 · 조달 값·기준 칸
- 품셈재료 「가격 연결」 모달(이름·규격 미리 찾기 · 관급 표시 · 후보 조건 · 끊기) · 못 이은 줄만 보기
- 건설노임 미공표 줄 「준용」 직종 고르기

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
2026-09-19 23:53:28 +09:00
co-authored by Claude Sonnet 5
parent 796b0f8efc
commit d2a6646fc4
10 changed files with 367 additions and 135 deletions
+14 -5
View File
@@ -242,11 +242,20 @@ def test_main_은_시스템관리자만() -> None:
assert "app.include_router(m01_master_data_router, dependencies=system_admin_only)" in main
def test_조달_찾기는_나라장터자재를_이름_규격으로_찾음(client: TestClient) -> None:
body = _get(client, "/api/m01/procurement", q="육각볼트 M6*20")
assert body["total"] >= 1
item = body["items"][0]
assert item["ref"].startswith("나라장터자재:") and "육각볼트" in item["이름"]
def test_고르기_나라장터_시중물가_직종(client: TestClient) -> None:
nara = _get(client, "/api/m01/pick", kind="procure", q="육각볼트 M6*20")
assert nara["total"] >= 1 and nara["items"][0]["ref"].startswith("나라장터:")
market = _get(client, "/api/m01/pick", kind="price", q="H형강 관급", limit=5)
assert market["items"] and market["items"][0]["관급"] and market["items"][0]["값"] > 0
job = _get(client, "/api/m01/pick", kind="job", q="보통인부")
assert job["items"][0]["값"] > 0
assert all(i["값"] is not None for i in _get(client, "/api/m01/pick", kind="job")["items"])
def test_못_이은_줄만_거름(client: TestClient) -> None:
every = _get(client, "/api/m01/rows", file="재료_품셈재료.json", size=500)
cut = _get(client, "/api/m01/rows", file="재료_품셈재료.json", size=500, unlinked=1)
assert 0 < cut["total"] < every["total"] and not any(r["연결"] for r in cut["rows"])
def test_품셈재료_단가는_연결의_낮은_값과_출처(client: TestClient) -> None: