Merge branch 'iipbs/as/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/as/dev
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type { AcntgSeMngTreeDto, AcntgService } from "../model/acntg-interface";
|
||||
|
||||
async function findTree(): Promise<AcntgSeMngTreeDto[]> {
|
||||
const response = await client.get<AcntgSeMngTreeDto[]>(
|
||||
`${ENDPOINT.AS_COMMON_SERVICE.ACNTG_SE}/tree`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export const acntgService = {
|
||||
findTree,
|
||||
} satisfies AcntgService;
|
||||
@@ -0,0 +1,2 @@
|
||||
export type { AcntgSeMngTreeDto, AcntgService } from "./model/acntg-interface";
|
||||
export { acntgService } from "./api/acntg-service";
|
||||
@@ -0,0 +1,23 @@
|
||||
/** 회계구분 트리 노드 DTO */
|
||||
export interface AcntgSeMngTreeDto {
|
||||
/** 들여쓰기 포함 표시명 (앞 공백 수 = 레벨 인디케이터) */
|
||||
indAcntgSeCdNm: string;
|
||||
/** 회계구분코드 */
|
||||
acntgSeCd: string;
|
||||
/** 회계구분코드명 */
|
||||
acntgSeCdNm: string;
|
||||
/** 상위 회계구분코드 (null = 최상위) */
|
||||
upAcntgSeCd: string | null;
|
||||
/** 사용여부 */
|
||||
useYn: string;
|
||||
/** 트리 레벨 (1 = 총사업비, 2 = 1.공사비/2.보상비/3.부대경비, …) */
|
||||
treeLevel: number;
|
||||
/** 최상위~현재 노드까지 "|" 구분 경로 */
|
||||
treePath: string;
|
||||
}
|
||||
|
||||
/** 회계구분 서비스 인터페이스 */
|
||||
export interface AcntgService {
|
||||
/** 회계구분 트리 전체 조회 */
|
||||
findTree(): Promise<AcntgSeMngTreeDto[]>;
|
||||
}
|
||||
Reference in New Issue
Block a user