refactor(stmate-test): 원본에 없는 「자재 기준자료 엑셀 내보내기·불러오기」 걷음

- 원본 wM_JajeXLS = 재료비 수량집계표 엑셀 내보내기 한 방향뿐(REA 37 · TWM_JAJEXLS 0x5658bc) — 추측으로 만든 자재 기준자료 왕복 메뉴·API·시험 삭제
- 남김: 「재료비 수량집계표를 엑셀파일로 만들기」(conv_jaje · scr_jaje)
- 낡은 시험 test_jaje_xlsx_roundtrip_and_edit · conv_api 의 jaje 왕복 삭제 — 원본에 없는 기능

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 17:43:12 +09:00
co-authored by Claude Opus 5.5
parent f0ba52afa3
commit b9847c7db8
6 changed files with 3 additions and 134 deletions
+1 -6
View File
@@ -56,7 +56,7 @@ def test_boq_xlsx_download_reimports(work):
assert Source(r["saved_stc"]).files["PRJLST.DBF"] == Source(str(STC)).files["PRJLST.DBF"]
def test_code_and_split_and_jaje_api(work):
def test_code_and_split_api(work):
r = A.api_code_change(
A.CodeChgReq(source_path=str(STC), mapping={"M00001": "M99991"}, target_folder_name="cc")
)
@@ -68,10 +68,5 @@ def test_code_and_split_and_jaje_api(work):
assert p.get(0, "K_ORD") == "1" and p.get(0, "TCOST2") == p.get(0, "TCOST1") == _prj(
str(STC)
).get(0, "TCOST1")
x = A.api_jaje_xlsx(A.SrcReq(source_path=str(STC))).body
r3 = A.api_jaje_import(
A.JajeImportReq(source_path=str(STC), xlsx=A.FileIn(b64=base64.b64encode(x).decode()))
)
assert r3["count"] == 0
with pytest.raises(Exception):
A.api_jb_read(A.JbReq(path=str(STC))) # 설치 폴더 JB_* 만
-23
View File
@@ -19,15 +19,12 @@ from conv_xls_apply import import_boq, register # noqa: E402
from conv_xls_boq import boq_from_xlsx, fill_from_costn, load_book, read_initial # noqa: E402
from conv_xls_out import ( # noqa: E402
export_boq_xlsx,
export_jaje_xlsx,
import_jaje_xlsx,
)
from conv_xls_res import comp_from_san, comp_from_sheets, costn_from_lists, memos_from_sheet # noqa: E402
from dbf_rw import DbfTable # noqa: E402
from smt_parser import extract_costn_memos, parse_dbf_bytes # noqa: E402
from stc_project import write_output # noqa: E402
from stc_read import Source # noqa: E402
from stc_save import apply_save # noqa: E402
DOCS = ROOT / "resources/knowledge/original/실무문서"
SO = (
@@ -196,26 +193,6 @@ def test_own_boq_xlsx_roundtrip(stc):
assert not bad, f"{tb} {bad[:5]}"
def test_jaje_xlsx_roundtrip_and_edit(tmp_path):
import openpyxl
files, _xl, _tb = _pair("봉화")
x = export_jaje_xlsx(files)
assert import_jaje_xlsx(files, x) == []
p = tmp_path / "j.xlsx"
p.write_bytes(x)
wb = openpyxl.load_workbook(p)
ws = wb.worksheets[0]
code = ws.cell(2, 1).value
old = float(ws.cell(2, 10).value or 0)
ws.cell(2, 10).value = old + 100
wb.save(p)
ups = import_jaje_xlsx(files, p.read_bytes())
assert ups == [{"CODE": code, "AMT_61": old + 100, "MAMT1": old + 100, "TAMT1": old + 100}]
out, log = apply_save(files, {"costn_updates": ups})
assert {x["field"] for x in log if x["table"] == "COSTN.DBF"} <= {"AMT_61", "MAMT1", "TAMT1"}
# 영월 BDQTY 는 복호 칸이 어긋남(UNIT1 깨짐 · TPRPT 전부 4) — 비교 제외
@pytest.mark.parametrize("name", ["봉화", "대흥", "울진", "영덕변경"])
def test_comp_rows_follow_xls_2_bdrec(name):