@dssp/dkpi 1.0.0-alpha.77 → 1.0.0-alpha.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.d.ts +27 -0
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js +332 -9
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js.map +1 -1
- package/dist-client/shared/integration-fetch.d.ts +35 -0
- package/dist-client/shared/integration-fetch.js +53 -0
- package/dist-client/shared/integration-fetch.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/schema.graphql +141 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 완공 입력 화면의 "자동 수집" 워크플로용 외부 시스템 연동 수집 함수.
|
|
3
|
+
*
|
|
4
|
+
* 데모 목적: 키스콘·세움터·올바로에서 "연동을 통해 값을 가져온다"는 워크플로를
|
|
5
|
+
* 보여주기 위한 것. 실제 스크래핑/API 연동의 깊이는 이 함수 내부에 캡슐화되어
|
|
6
|
+
* 있으므로, 추후 실연동(integration-kiscon / data-go-kr / integration-allbaro)
|
|
7
|
+
* 으로 교체할 때 이 본문만 바꾸면 화면/저장 흐름은 그대로 유지된다.
|
|
8
|
+
*/
|
|
9
|
+
/** 화면에 표시할 연동 소스 목록 (수집 순서대로) */
|
|
10
|
+
export const INTEGRATION_SOURCES = [
|
|
11
|
+
{ source: 'kiscon', label: '키스콘', icon: '🏗', desc: '건설공사대장 통보' },
|
|
12
|
+
{ source: 'saeumteo', label: '세움터', icon: '🏛', desc: '건축물대장 / 건축HUB' },
|
|
13
|
+
{ source: 'allbaro', label: '올바로', icon: '♻', desc: '건설폐기물 처리실적' }
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* 한 외부 시스템에서 연동으로 값을 수집한다.
|
|
17
|
+
* 데모에서는 연동 수집을 흉내내기 위해 짧은 지연 후 대표값을 반환한다
|
|
18
|
+
* (프로젝트에 이미 있는 값이 있으면 우선 사용).
|
|
19
|
+
*/
|
|
20
|
+
export async function collectFromSource(source, project) {
|
|
21
|
+
// 연동 수집이 "진행되는" 느낌을 주기 위한 짧은 지연 (데모용)
|
|
22
|
+
await new Promise(r => setTimeout(r, 700));
|
|
23
|
+
const bc = (project === null || project === void 0 ? void 0 : project.buildingComplex) || {};
|
|
24
|
+
switch (source) {
|
|
25
|
+
case 'kiscon':
|
|
26
|
+
return {
|
|
27
|
+
source,
|
|
28
|
+
label: '키스콘',
|
|
29
|
+
fields: [
|
|
30
|
+
{ projectKey: 'constructionPeriod', label: '계획공사기간', value: 30, unit: '개월' },
|
|
31
|
+
{ projectKey: 'constructionCost', label: '계획공사비', value: bc.constructionCost || 2500, unit: '억원' }
|
|
32
|
+
]
|
|
33
|
+
};
|
|
34
|
+
case 'saeumteo':
|
|
35
|
+
return {
|
|
36
|
+
source,
|
|
37
|
+
label: '세움터',
|
|
38
|
+
fields: [
|
|
39
|
+
{ projectKey: 'area', label: '연면적', value: bc.area || 114000, unit: '㎡' },
|
|
40
|
+
{ projectKey: 'floorAreaRatio', label: '용적율', value: bc.floorAreaRatio || 250, unit: '%' },
|
|
41
|
+
{ projectKey: 'upperFloorCount', label: '지상층수', value: 25, unit: '층' },
|
|
42
|
+
{ projectKey: 'lowerFloorCount', label: '지하층수', value: 3, unit: '층' }
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
case 'allbaro':
|
|
46
|
+
return {
|
|
47
|
+
source,
|
|
48
|
+
label: '올바로',
|
|
49
|
+
fields: [{ projectKey: 'totalConstructionWasteAmount', label: '총 건설폐기물', value: 15, unit: 'ton' }]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=integration-fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-fetch.js","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AE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE;oBACzE,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,cAAc,IAAI,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;oBAC1F,EAAE,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;oBACtE,EAAE,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE;iBACtE;aACF,CAAA;QAEH,KAAK,SAAS;YACZ,OAAO;gBACL,MAAM;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,8BAA8B,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;aACnG,CAAA;IACL,CAAC;AACH,CAAC","sourcesContent":["/**\n * 완공 입력 화면의 \"자동 수집\" 워크플로용 외부 시스템 연동 수집 함수.\n *\n * 데모 목적: 키스콘·세움터·올바로에서 \"연동을 통해 값을 가져온다\"는 워크플로를\n * 보여주기 위한 것. 실제 스크래핑/API 연동의 깊이는 이 함수 내부에 캡슐화되어\n * 있으므로, 추후 실연동(integration-kiscon / data-go-kr / integration-allbaro)\n * 으로 교체할 때 이 본문만 바꾸면 화면/저장 흐름은 그대로 유지된다.\n */\n\nexport type IntegrationSource = 'kiscon' | 'saeumteo' | 'allbaro'\n\nexport interface IntegrationSourceMeta {\n source: IntegrationSource\n label: string\n icon: string\n desc: string\n}\n\n/** 화면에 표시할 연동 소스 목록 (수집 순서대로) */\nexport const INTEGRATION_SOURCES: IntegrationSourceMeta[] = [\n { source: 'kiscon', label: '키스콘', icon: '🏗', desc: '건설공사대장 통보' },\n { source: 'saeumteo', label: '세움터', icon: '🏛', desc: '건축물대장 / 건축HUB' },\n { source: 'allbaro', label: '올바로', icon: '♻', desc: '건설폐기물 처리실적' }\n]\n\nexport interface CollectedField {\n /** 폼의 projectKey (KPI_METRIC_KEY_MAPPING 의 projectKey 와 일치) */\n projectKey: string\n label: string\n value: number | string\n unit?: string\n}\n\nexport interface CollectionResult {\n source: IntegrationSource\n label: string\n fields: CollectedField[]\n}\n\n/**\n * 한 외부 시스템에서 연동으로 값을 수집한다.\n * 데모에서는 연동 수집을 흉내내기 위해 짧은 지연 후 대표값을 반환한다\n * (프로젝트에 이미 있는 값이 있으면 우선 사용).\n */\nexport async function collectFromSource(source: IntegrationSource, project: any): Promise<CollectionResult> {\n // 연동 수집이 \"진행되는\" 느낌을 주기 위한 짧은 지연 (데모용)\n await new Promise(r => setTimeout(r, 700))\n\n const bc = project?.buildingComplex || {}\n\n switch (source) {\n case 'kiscon':\n return {\n source,\n label: '키스콘',\n fields: [\n { projectKey: 'constructionPeriod', label: '계획공사기간', value: 30, unit: '개월' },\n { projectKey: 'constructionCost', label: '계획공사비', value: bc.constructionCost || 2500, unit: '억원' }\n ]\n }\n\n case 'saeumteo':\n return {\n source,\n label: '세움터',\n fields: [\n { projectKey: 'area', label: '연면적', value: bc.area || 114000, unit: '㎡' },\n { projectKey: 'floorAreaRatio', label: '용적율', value: bc.floorAreaRatio || 250, unit: '%' },\n { projectKey: 'upperFloorCount', label: '지상층수', value: 25, unit: '층' },\n { projectKey: 'lowerFloorCount', label: '지하층수', value: 3, unit: '층' }\n ]\n }\n\n case 'allbaro':\n return {\n source,\n label: '올바로',\n fields: [{ projectKey: 'totalConstructionWasteAmount', label: '총 건설폐기물', value: 15, unit: 'ton' }]\n }\n }\n}\n"]}
|