feat(M02): 일위대가 · 면적산출 함께 가져오기 길 (43-9a)
- copy 길 pair=true — 같은 원본 열의 면적산출(시트 · 알약 연결) + 일위대가(담은로직 · 입력값 · 수량 · 자재) 함께 덮어씀 · 도면 그대로 - 면적 먼저(일위대가 계산값이 새 칸 값 읽음) · 원본 면적 없음 · 실무문서 = 일위대가만 - 권한 · 남의 층 감사 기록은 기존 _root 그대로 - 화면 함수 copyLaborAreaFrom(열, 원본, from) — 카드 잇기는 43-9b - 새 항목 칸 셋 자동 생성은 기존 집계표 저장 길 확인 · 시험 test_m02_pair_copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -363,15 +363,22 @@ def post_copy(
|
||||
owner: str | None = None,
|
||||
from_layer: Literal["system", "company", "personal", "practice"] | None = None,
|
||||
from_owner: str | None = None,
|
||||
pair: bool = False,
|
||||
session: Session = Depends(verify_session),
|
||||
):
|
||||
"""항목 하나 복사해 가져오기(덮어씀 · 번호 · 열 그대로) — 원본 = 같은 층(`from_layer` 없음) ·
|
||||
다른 층(원본 읽기 권한) · 실무문서 조합(`practice` · 일위대가만 · 시스템 관리자만)."""
|
||||
다른 층(원본 읽기 권한) · 실무문서 조합(`practice` · 일위대가만 · 시스템 관리자만) ·
|
||||
`pair` = 일위대가 · 면적산출 함께(43-9a · 답 `{area?, labor}` · 실무문서는 일위대가만)."""
|
||||
folder = _root(session, layer, owner, write=True)
|
||||
part = "structure" if kind == "structures" else kind
|
||||
if from_layer == "practice":
|
||||
if part != "labor" or not access.is_system_admin(session):
|
||||
if part not in (("labor", "area") if pair else ("labor",)) or not access.is_system_admin(
|
||||
session
|
||||
):
|
||||
raise HTTPException(status_code=403, detail="실무문서는 시스템 관리자가 일위대가로만")
|
||||
return _call(folder, _copy_practice, column, source)
|
||||
got = _call(folder, _copy_practice, column, source)
|
||||
return {"labor": got} if pair else got
|
||||
origin = _root(session, from_layer, from_owner) if from_layer else None
|
||||
if pair and part != "structure":
|
||||
return _call(folder, store.copy_pair, column, source, origin)
|
||||
return _call(folder, store.copy_from, part, column, source, origin)
|
||||
|
||||
Reference in New Issue
Block a user