@dssp/supervision 1.0.0-y.0 → 1.0.1
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/graphql/building-inspection.js +3 -1
- package/dist-client/graphql/building-inspection.js.map +1 -1
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -2
- package/dist-client/pages/action-plan/action-plan-list-page.js +1 -2
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +2 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +53 -39
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +1108 -526
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.d.ts +59 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js +868 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +2 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +17 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +8 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js +17 -7
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-management.d.ts +82 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js +1527 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +0 -3
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +20 -75
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/field-document/field-document-constants.d.ts +18 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +25 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +546 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +42 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +738 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.js +0 -3
- package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +5 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +62 -3
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +8 -2
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +3 -2
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +131 -34
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +5 -4
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +4 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +844 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +8 -5
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +2 -2
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -1
- package/dist-client/pages/checklist/attachment-list-popup.js +1 -2
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +1 -0
- package/dist-client/pages/checklist/checklist-view.js +219 -31
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/comment-list-popup.js +1 -2
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -2
- package/dist-client/pages/checklist/inspection-info-popup.js +1 -2
- package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -1
- package/dist-client/pages/checklist/inspection-tab-popup.js +1 -1
- package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -1
- package/dist-client/pages/checklist/kcs-criteria-popup.d.ts +16 -0
- package/dist-client/pages/checklist/kcs-criteria-popup.js +179 -0
- package/dist-client/pages/checklist/kcs-criteria-popup.js.map +1 -0
- package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
- package/dist-client/pages/checklist-database/checklist-database.js +540 -0
- package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js +25 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js +2 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +223 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js +404 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
- package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
- package/dist-client/pages/issue/issue-list-page.js +1 -2
- package/dist-client/pages/issue/issue-list-page.js.map +1 -1
- package/dist-client/pages/project-checklist/project-checklist-management.d.ts +62 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js +1145 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
- package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
- package/dist-client/pages/project-report/project-report-list-page.js +1 -2
- package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
- package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +12 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/stt/speech-to-text.d.ts +13 -8
- package/dist-client/stt/speech-to-text.js +282 -40
- package/dist-client/stt/speech-to-text.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
- package/dist-server/service/action-plan/action-plan-query.js +5 -11
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.js +41 -7
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +7 -3
- package/dist-server/service/building-inspection/building-inspection-query.js +154 -25
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +10 -1
- package/dist-server/service/building-inspection/building-inspection-type.js +35 -1
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +1 -0
- package/dist-server/service/building-inspection/building-inspection.js +20 -2
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +10 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -1
- package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js +6 -1
- package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js +26 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -1
- package/dist-server/service/checklist-item/checklist-item-type.js +15 -1
- package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item.d.ts +2 -0
- package/dist-server/service/checklist-item/checklist-item.js +11 -1
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
- package/dist-server/service/checklist-item/index.d.ts +2 -1
- package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +2 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js +11 -1
- package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +11 -2
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +6 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- package/dist-server/service/checklist-template-item/spec-matching-service.js +1 -0
- package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
- package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template/index.js +9 -0
- package/dist-server/service/construction-checklist-template/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +56 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template-item/index.js +9 -0
- package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
- package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
- package/dist-server/service/field-document/field-document-auto-file.js +47 -0
- package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
- package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
- package/dist-server/service/field-document/field-document-mutation.js +139 -0
- package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
- package/dist-server/service/field-document/field-document-query.d.ts +14 -0
- package/dist-server/service/field-document/field-document-query.js +120 -0
- package/dist-server/service/field-document/field-document-query.js.map +1 -0
- package/dist-server/service/field-document/field-document-summary-service.d.ts +10 -0
- package/dist-server/service/field-document/field-document-summary-service.js +79 -0
- package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
- package/dist-server/service/field-document/field-document-type.d.ts +24 -0
- package/dist-server/service/field-document/field-document-type.js +88 -0
- package/dist-server/service/field-document/field-document-type.js.map +1 -0
- package/dist-server/service/field-document/field-document.d.ts +29 -0
- package/dist-server/service/field-document/field-document.js +127 -0
- package/dist-server/service/field-document/field-document.js.map +1 -0
- package/dist-server/service/field-document/index.d.ts +5 -0
- package/dist-server/service/field-document/index.js +9 -0
- package/dist-server/service/field-document/index.js.map +1 -0
- package/dist-server/service/index.d.ts +7 -2
- package/dist-server/service/index.js +20 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/issue-mutation.js +5 -6
- package/dist-server/service/issue/issue-mutation.js.map +1 -1
- package/dist-server/service/issue/issue-query.d.ts +2 -2
- package/dist-server/service/issue/issue-query.js +5 -11
- package/dist-server/service/issue/issue-query.js.map +1 -1
- package/dist-server/service/project-checklist/index.d.ts +5 -0
- package/dist-server/service/project-checklist/index.js +9 -0
- package/dist-server/service/project-checklist/index.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js +118 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
- package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
- package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
- package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
- package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
- package/dist-server/service/project-checklist/project-checklist.js +90 -0
- package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
- package/dist-server/service/project-checklist/spec-matching-service.d.ts +17 -0
- package/dist-server/service/project-checklist/spec-matching-service.js +140 -0
- package/dist-server/service/project-checklist/spec-matching-service.js.map +1 -0
- package/dist-server/service/project-checklist-item/index.d.ts +4 -0
- package/dist-server/service/project-checklist-item/index.js +9 -0
- package/dist-server/service/project-checklist-item/index.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +19 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js +92 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
- package/dist-server/service/project-report/project-report-mutation.js +5 -6
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
- package/dist-server/service/project-report/project-report-query.d.ts +2 -2
- package/dist-server/service/project-report/project-report-query.js +5 -11
- package/dist-server/service/project-report/project-report-query.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
- package/dist-server/service/supervisor/supervisor-query.js +5 -11
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -12
- package/things-factory.config.js +7 -1
|
@@ -18,8 +18,7 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
18
18
|
where: { id, projectType }
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
async buildingInspections(params
|
|
22
|
-
const { domain } = context.state;
|
|
21
|
+
async buildingInspections(params) {
|
|
23
22
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
24
23
|
params,
|
|
25
24
|
repository: await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection),
|
|
@@ -29,8 +28,7 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
29
28
|
return { items, total };
|
|
30
29
|
}
|
|
31
30
|
async buildingInspectionsOfProject(params, context) {
|
|
32
|
-
const {
|
|
33
|
-
const { projectId, limit } = params;
|
|
31
|
+
const { projectId, limit, statusFilter } = params;
|
|
34
32
|
const queryBuilder = (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
35
33
|
.createQueryBuilder('bi')
|
|
36
34
|
.innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')
|
|
@@ -38,10 +36,25 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
38
36
|
.innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')
|
|
39
37
|
.innerJoin('projects', 'p', 'bc.id = p.building_complex_id')
|
|
40
38
|
.innerJoin('checklists', 'c', 'bi.checklist_id = c.id')
|
|
41
|
-
.where('
|
|
42
|
-
.andWhere('
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
.where('bi.project_type = :projectType', { projectType })
|
|
40
|
+
.andWhere('p.id = :projectId', { projectId });
|
|
41
|
+
// 상태 필터
|
|
42
|
+
if (statusFilter === 'WAIT') {
|
|
43
|
+
queryBuilder.andWhere("bi.status IN ('WAIT', 'OVERALL_WAIT')").andWhere('(bi.fail_count = 0 OR bi.fail_count IS NULL)');
|
|
44
|
+
}
|
|
45
|
+
else if (statusFilter === 'RE_WAIT') {
|
|
46
|
+
queryBuilder.andWhere("bi.status IN ('WAIT', 'OVERALL_WAIT')").andWhere('bi.fail_count > 0');
|
|
47
|
+
}
|
|
48
|
+
else if (statusFilter === 'REQUEST') {
|
|
49
|
+
queryBuilder.andWhere("bi.status IN ('REQUEST', 'OVERALL_REQUEST')");
|
|
50
|
+
}
|
|
51
|
+
else if (statusFilter === 'FAIL') {
|
|
52
|
+
queryBuilder.andWhere("bi.status = 'FAIL'");
|
|
53
|
+
}
|
|
54
|
+
else if (statusFilter === 'PASS') {
|
|
55
|
+
queryBuilder.andWhere("bi.status = 'PASS'");
|
|
56
|
+
}
|
|
57
|
+
queryBuilder.orderBy('bi.createdAt', 'DESC');
|
|
45
58
|
if (limit) {
|
|
46
59
|
queryBuilder.limit(limit);
|
|
47
60
|
}
|
|
@@ -56,12 +69,12 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
56
69
|
.innerJoin('checklists', 'c', 'bi.checklist_id = c.id')
|
|
57
70
|
.where('bl.id = :buildingLevelId', { buildingLevelId })
|
|
58
71
|
.andWhere('bi.project_type = :projectType', { projectType })
|
|
59
|
-
.orderBy('bi.
|
|
72
|
+
.orderBy('bi.updatedAt', 'DESC');
|
|
60
73
|
if (startDate) {
|
|
61
|
-
queryBuilder.andWhere('bi.request_date >= :startDate', { startDate });
|
|
74
|
+
queryBuilder.andWhere('bi.request_date >= :startDate::date', { startDate });
|
|
62
75
|
}
|
|
63
76
|
if (endDate) {
|
|
64
|
-
queryBuilder.andWhere('bi.request_date
|
|
77
|
+
queryBuilder.andWhere('bi.request_date < (:endDate::date + interval \'1 day\')', { endDate });
|
|
65
78
|
}
|
|
66
79
|
if (limit) {
|
|
67
80
|
queryBuilder.limit(limit);
|
|
@@ -73,10 +86,11 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
73
86
|
async buildingInspectionSummaryOfBuildingLevel(buildingLevelId, context) {
|
|
74
87
|
const buildingInspectionSummary = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
75
88
|
.createQueryBuilder('bi')
|
|
76
|
-
.select(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`)
|
|
89
|
+
.select(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`)
|
|
77
90
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.REQUEST}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`)
|
|
78
91
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
79
92
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
93
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS "reWait"`)
|
|
80
94
|
.where('bi.building_level_id = :buildingLevelId', { buildingLevelId })
|
|
81
95
|
.andWhere('bi.project_type = :projectType', { projectType })
|
|
82
96
|
.groupBy('bi.building_level_id')
|
|
@@ -85,7 +99,8 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
85
99
|
wait: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.wait) || 0,
|
|
86
100
|
request: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.request) || 0,
|
|
87
101
|
pass: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.pass) || 0,
|
|
88
|
-
fail: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.fail) || 0
|
|
102
|
+
fail: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.fail) || 0,
|
|
103
|
+
reWait: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.reWait) || 0
|
|
89
104
|
};
|
|
90
105
|
}
|
|
91
106
|
// 층 별로 검수 개수 써머리
|
|
@@ -93,18 +108,98 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
93
108
|
const buildingInspectionSummary = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
94
109
|
.createQueryBuilder('bi')
|
|
95
110
|
.select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS "requestDate"`)
|
|
96
|
-
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`)
|
|
111
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`)
|
|
97
112
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.REQUEST}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`)
|
|
98
113
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
99
114
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
115
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS "reWait"`)
|
|
100
116
|
.where('bi.building_level_id = :buildingLevelId', { buildingLevelId })
|
|
101
|
-
.andWhere('bi.request_date
|
|
117
|
+
.andWhere('bi.request_date >= :startDate::date', { startDate })
|
|
118
|
+
.andWhere('bi.request_date < (:endDate::date + interval \'1 day\')', { endDate })
|
|
102
119
|
.andWhere('bi.project_type = :projectType', { projectType })
|
|
103
120
|
.groupBy('bi.building_level_id')
|
|
104
|
-
.addGroupBy(
|
|
121
|
+
.addGroupBy(`TO_CHAR(bi.request_date, 'YYYY-MM-DD')`)
|
|
122
|
+
.getRawMany();
|
|
123
|
+
return buildingInspectionSummary;
|
|
124
|
+
}
|
|
125
|
+
// 프로젝트 별로 날짜별 검수 개수 써머리
|
|
126
|
+
async buildingInspectionDateSummaryOfProject(projectId, startDate, endDate, context) {
|
|
127
|
+
const buildingInspectionSummary = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
128
|
+
.createQueryBuilder('bi')
|
|
129
|
+
.select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS "requestDate"`)
|
|
130
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`)
|
|
131
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.REQUEST}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`)
|
|
132
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
133
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
134
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS "reWait"`)
|
|
135
|
+
.innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')
|
|
136
|
+
.innerJoin('buildings', 'b', 'bl.building_id = b.id')
|
|
137
|
+
.innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')
|
|
138
|
+
.innerJoin('projects', 'p', 'bc.id = p.building_complex_id')
|
|
139
|
+
.where('p.id = :projectId', { projectId })
|
|
140
|
+
.andWhere('bi.request_date >= :startDate::date', { startDate })
|
|
141
|
+
.andWhere('bi.request_date < (:endDate::date + interval \'1 day\')', { endDate })
|
|
142
|
+
.andWhere('bi.project_type = :projectType', { projectType })
|
|
143
|
+
.groupBy(`TO_CHAR(bi.request_date, 'YYYY-MM-DD')`)
|
|
144
|
+
.getRawMany();
|
|
145
|
+
return buildingInspectionSummary;
|
|
146
|
+
}
|
|
147
|
+
// 동 별로 검수 개수 써머리
|
|
148
|
+
async buildingInspectionSummaryOfBuilding(buildingId, context) {
|
|
149
|
+
const result = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
150
|
+
.createQueryBuilder('bi')
|
|
151
|
+
.select(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`)
|
|
152
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.REQUEST}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`)
|
|
153
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
154
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
155
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS "reWait"`)
|
|
156
|
+
.innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')
|
|
157
|
+
.where('bl.building_id = :buildingId', { buildingId })
|
|
158
|
+
.andWhere('bi.project_type = :projectType', { projectType })
|
|
159
|
+
.getRawOne();
|
|
160
|
+
return {
|
|
161
|
+
wait: (result === null || result === void 0 ? void 0 : result.wait) || 0,
|
|
162
|
+
request: (result === null || result === void 0 ? void 0 : result.request) || 0,
|
|
163
|
+
pass: (result === null || result === void 0 ? void 0 : result.pass) || 0,
|
|
164
|
+
fail: (result === null || result === void 0 ? void 0 : result.fail) || 0,
|
|
165
|
+
reWait: (result === null || result === void 0 ? void 0 : result.reWait) || 0
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
// 동 별로 날짜별 검수 개수 써머리
|
|
169
|
+
async buildingInspectionDateSummaryOfBuilding(buildingId, startDate, endDate, context) {
|
|
170
|
+
const buildingInspectionSummary = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
171
|
+
.createQueryBuilder('bi')
|
|
172
|
+
.select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS "requestDate"`)
|
|
173
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`)
|
|
174
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.REQUEST}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`)
|
|
175
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
176
|
+
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
177
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS "reWait"`)
|
|
178
|
+
.innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')
|
|
179
|
+
.where('bl.building_id = :buildingId', { buildingId })
|
|
180
|
+
.andWhere('bi.request_date >= :startDate::date', { startDate })
|
|
181
|
+
.andWhere('bi.request_date < (:endDate::date + interval \'1 day\')', { endDate })
|
|
182
|
+
.andWhere('bi.project_type = :projectType', { projectType })
|
|
183
|
+
.groupBy(`TO_CHAR(bi.request_date, 'YYYY-MM-DD')`)
|
|
105
184
|
.getRawMany();
|
|
106
185
|
return buildingInspectionSummary;
|
|
107
186
|
}
|
|
187
|
+
// 동 별로 검측 목록
|
|
188
|
+
async buildingInspectionsOfBuilding(params, context) {
|
|
189
|
+
const { buildingId, limit } = params;
|
|
190
|
+
const queryBuilder = (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
191
|
+
.createQueryBuilder('bi')
|
|
192
|
+
.innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')
|
|
193
|
+
.innerJoin('checklists', 'c', 'bi.checklist_id = c.id')
|
|
194
|
+
.where('bl.building_id = :buildingId', { buildingId })
|
|
195
|
+
.andWhere('bi.project_type = :projectType', { projectType })
|
|
196
|
+
.orderBy('bi.updatedAt', 'DESC');
|
|
197
|
+
if (limit) {
|
|
198
|
+
queryBuilder.limit(limit);
|
|
199
|
+
}
|
|
200
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
201
|
+
return { items, total };
|
|
202
|
+
}
|
|
108
203
|
// 층 별로 검수 개수 써머리
|
|
109
204
|
async buildingInspectionSummary(buildingLevel) {
|
|
110
205
|
const buildingInspectionSummary = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
@@ -124,20 +219,19 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
124
219
|
fail: (buildingInspectionSummary === null || buildingInspectionSummary === void 0 ? void 0 : buildingInspectionSummary.fail) || 0
|
|
125
220
|
};
|
|
126
221
|
}
|
|
127
|
-
async buildingInspectionSummaryOfProject(projectId
|
|
128
|
-
const { domain } = context.state;
|
|
222
|
+
async buildingInspectionSummaryOfProject(projectId) {
|
|
129
223
|
const result = await (0, shell_1.getRepository)(building_inspection_1.BuildingInspection)
|
|
130
224
|
.createQueryBuilder('bi')
|
|
131
225
|
.select(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`)
|
|
132
226
|
.addSelect(`COUNT(CASE WHEN bi.status='${building_inspection_1.BuildingInspectionStatus.REQUEST}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`)
|
|
133
227
|
.addSelect(`COUNT(CASE WHEN bi.status = '${building_inspection_1.BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
134
228
|
.addSelect(`COUNT(CASE WHEN bi.status = '${building_inspection_1.BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
229
|
+
.addSelect(`COUNT(CASE WHEN (bi.status='${building_inspection_1.BuildingInspectionStatus.WAIT}' OR bi.status='${building_inspection_1.BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS "reWait"`)
|
|
135
230
|
.innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')
|
|
136
231
|
.innerJoin('buildings', 'b', 'bl.building_id = b.id')
|
|
137
232
|
.innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')
|
|
138
233
|
.innerJoin('projects', 'p', 'bc.id = p.building_complex_id')
|
|
139
|
-
.where('p.
|
|
140
|
-
.andWhere('p.id = :projectId', { projectId })
|
|
234
|
+
.where('p.id = :projectId', { projectId })
|
|
141
235
|
.andWhere('bi.project_type = :projectType', { projectType })
|
|
142
236
|
.groupBy('p.id')
|
|
143
237
|
.getRawOne();
|
|
@@ -145,7 +239,8 @@ let BuildingInspectionQuery = class BuildingInspectionQuery {
|
|
|
145
239
|
wait: (result === null || result === void 0 ? void 0 : result.wait) || 0,
|
|
146
240
|
request: (result === null || result === void 0 ? void 0 : result.request) || 0,
|
|
147
241
|
pass: (result === null || result === void 0 ? void 0 : result.pass) || 0,
|
|
148
|
-
fail: (result === null || result === void 0 ? void 0 : result.fail) || 0
|
|
242
|
+
fail: (result === null || result === void 0 ? void 0 : result.fail) || 0,
|
|
243
|
+
reWait: (result === null || result === void 0 ? void 0 : result.reWait) || 0
|
|
149
244
|
};
|
|
150
245
|
}
|
|
151
246
|
async checklist(buildingInspection) {
|
|
@@ -189,9 +284,8 @@ tslib_1.__decorate([
|
|
|
189
284
|
tslib_1.__decorate([
|
|
190
285
|
(0, type_graphql_1.Query)(returns => building_inspection_type_1.BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' }),
|
|
191
286
|
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
192
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
193
287
|
tslib_1.__metadata("design:type", Function),
|
|
194
|
-
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam
|
|
288
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
195
289
|
tslib_1.__metadata("design:returntype", Promise)
|
|
196
290
|
], BuildingInspectionQuery.prototype, "buildingInspections", null);
|
|
197
291
|
tslib_1.__decorate([
|
|
@@ -228,6 +322,42 @@ tslib_1.__decorate([
|
|
|
228
322
|
tslib_1.__metadata("design:paramtypes", [String, String, String, Object]),
|
|
229
323
|
tslib_1.__metadata("design:returntype", Promise)
|
|
230
324
|
], BuildingInspectionQuery.prototype, "buildingInspectionDateSummaryOfLevelAndPeriod", null);
|
|
325
|
+
tslib_1.__decorate([
|
|
326
|
+
(0, type_graphql_1.Query)(returns => [building_inspection_type_1.BuildingInspectionSummary], { nullable: true, description: 'To fetch BuildingInspection Date Summary of Project' }),
|
|
327
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('projectId')),
|
|
328
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('startDate')),
|
|
329
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('endDate')),
|
|
330
|
+
tslib_1.__param(3, (0, type_graphql_1.Ctx)()),
|
|
331
|
+
tslib_1.__metadata("design:type", Function),
|
|
332
|
+
tslib_1.__metadata("design:paramtypes", [String, String, String, Object]),
|
|
333
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
334
|
+
], BuildingInspectionQuery.prototype, "buildingInspectionDateSummaryOfProject", null);
|
|
335
|
+
tslib_1.__decorate([
|
|
336
|
+
(0, type_graphql_1.Query)(returns => building_inspection_type_1.BuildingInspectionSummary, { nullable: true, description: 'To fetch BuildingInspection Summary of Building' }),
|
|
337
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('buildingId')),
|
|
338
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
339
|
+
tslib_1.__metadata("design:type", Function),
|
|
340
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
341
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
342
|
+
], BuildingInspectionQuery.prototype, "buildingInspectionSummaryOfBuilding", null);
|
|
343
|
+
tslib_1.__decorate([
|
|
344
|
+
(0, type_graphql_1.Query)(returns => [building_inspection_type_1.BuildingInspectionSummary], { nullable: true, description: 'To fetch BuildingInspection Date Summary of Building' }),
|
|
345
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('buildingId')),
|
|
346
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('startDate')),
|
|
347
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('endDate')),
|
|
348
|
+
tslib_1.__param(3, (0, type_graphql_1.Ctx)()),
|
|
349
|
+
tslib_1.__metadata("design:type", Function),
|
|
350
|
+
tslib_1.__metadata("design:paramtypes", [String, String, String, Object]),
|
|
351
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
352
|
+
], BuildingInspectionQuery.prototype, "buildingInspectionDateSummaryOfBuilding", null);
|
|
353
|
+
tslib_1.__decorate([
|
|
354
|
+
(0, type_graphql_1.Query)(returns => building_inspection_type_1.BuildingInspectionList, { description: 'To fetch BuildingInspections of Building' }),
|
|
355
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('params')),
|
|
356
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
357
|
+
tslib_1.__metadata("design:type", Function),
|
|
358
|
+
tslib_1.__metadata("design:paramtypes", [building_inspection_type_1.BuildingInspectionsOfBuilding, Object]),
|
|
359
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
360
|
+
], BuildingInspectionQuery.prototype, "buildingInspectionsOfBuilding", null);
|
|
231
361
|
tslib_1.__decorate([
|
|
232
362
|
(0, type_graphql_1.FieldResolver)(type => building_inspection_type_1.BuildingInspectionSummary),
|
|
233
363
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
@@ -238,9 +368,8 @@ tslib_1.__decorate([
|
|
|
238
368
|
tslib_1.__decorate([
|
|
239
369
|
(0, type_graphql_1.Query)(returns => building_inspection_type_1.BuildingInspectionSummary, { description: '프로젝트의 검측상태 별 카운트' }),
|
|
240
370
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('projectId')),
|
|
241
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
242
371
|
tslib_1.__metadata("design:type", Function),
|
|
243
|
-
tslib_1.__metadata("design:paramtypes", [String
|
|
372
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
244
373
|
tslib_1.__metadata("design:returntype", Promise)
|
|
245
374
|
], BuildingInspectionQuery.prototype, "buildingInspectionSummaryOfProject", null);
|
|
246
375
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-query.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,qEAA4D;AAC5D,iDAA+F;AAC/F,+DAAiG;AACjG,yEAMmC;AACnC,6DAAsD;AACtD,sDAAkD;AAClD,6CAA4C;AAC5C,yDAAgD;AAEhD,MAAM,WAAW,GAAG,YAAM,CAAC,GAAG,CAAC,aAAa,EAAE,iCAAW,CAAC,IAAI,CAAC,CAAA;AAGxD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAE5B,AAAN,KAAK,CAAC,kBAAkB,CAAY,EAAU,EAAS,OAAwB;QAC7E,OAAO,MAAM,IAAA,qBAAa,EAAC,wCAAkB,CAAC,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;SAC3B,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,mBAAmB,CAAS,MAAiB,EAAS,OAAwB;QAClF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,wCAAkB,CAAC;YACnD,WAAW,EAAE,CAAC,MAAM,CAAC;SACtB,CAA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,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;4DAEjE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAU,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;0DAS/D;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,+CAAoB,CAAC;IAC7B,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;sDAa3D;kCA/OU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,uBAAuB,CAgPnC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Arg, Args, Ctx } from 'type-graphql'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { getRepository, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\nimport { BuildingInspection, BuildingInspectionStatus, ProjectType } from './building-inspection'\nimport {\n BuildingInspectionList,\n BuildingInspectionsOfBuildingLevel,\n BuildingInspectionsOfProject,\n BuildingInspectionSummary,\n ProjectManagerOutput\n} from './building-inspection-type'\nimport { BuildingLevel } from '@dssp/building-complex'\nimport { Checklist } from '../checklist/checklist'\nimport { config } from '@things-factory/env'\nimport { User } from '@things-factory/auth-base'\n\nconst projectType = config.get('projectType', ProjectType.DSSP)\n\n@Resolver(BuildingInspection)\nexport class BuildingInspectionQuery {\n @Query(returns => BuildingInspection!, { nullable: true, description: 'To fetch a BuildingInspection' })\n async buildingInspection(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<BuildingInspection> {\n return await getRepository(BuildingInspection).findOne({\n where: { id, projectType }\n })\n }\n\n @Query(returns => BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' })\n async buildingInspections(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<BuildingInspectionList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(BuildingInspection),\n searchables: ['name']\n }).andWhere('project_type = :projectType', { projectType })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' })\n async buildingInspectionsOfProject(\n @Arg('params') params: BuildingInspectionsOfProject,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionList> {\n const { domain } = context.state\n const { projectId, limit } = params\n\n const queryBuilder = getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('buildings', 'b', 'bl.building_id = b.id')\n .innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')\n .innerJoin('projects', 'p', 'bc.id = p.building_complex_id')\n .innerJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .where('p.domain = :domain', { domain: domain.id })\n .andWhere('bi.project_type = :projectType', { projectType })\n .andWhere('p.id = :projectId', { projectId })\n .orderBy('bi.created_at', 'DESC')\n\n if (limit) {\n queryBuilder.limit(limit)\n }\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' })\n async buildingInspectionsOfBuildingLevel(\n @Arg('params') params: BuildingInspectionsOfBuildingLevel,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionList> {\n const { buildingLevelId, limit, startDate, endDate } = params\n\n const queryBuilder = getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .where('bl.id = :buildingLevelId', { buildingLevelId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .orderBy('bi.updated_at', 'DESC')\n\n if (startDate) {\n queryBuilder.andWhere('bi.request_date >= :startDate', { startDate })\n }\n\n if (endDate) {\n queryBuilder.andWhere('bi.request_date <= :endDate', { endDate })\n }\n\n if (limit) {\n queryBuilder.limit(limit)\n }\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n // 층 별로 검수 개수 써머리\n @Query(returns => BuildingInspectionSummary!, { nullable: true, description: 'To fetch a BuildingInspection Summary' })\n async buildingInspectionSummaryOfBuildingLevel(\n @Arg('buildingLevelId') buildingLevelId: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .where('bi.building_level_id = :buildingLevelId', { buildingLevelId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('bi.building_level_id')\n .getRawOne()\n\n return {\n wait: buildingInspectionSummary?.wait || 0,\n request: buildingInspectionSummary?.request || 0,\n pass: buildingInspectionSummary?.pass || 0,\n fail: buildingInspectionSummary?.fail || 0\n }\n }\n\n // 층 별로 검수 개수 써머리\n @Query(returns => [BuildingInspectionSummary]!, { nullable: true, description: 'To fetch a BuildingInspection Summary' })\n async buildingInspectionDateSummaryOfLevelAndPeriod(\n @Arg('buildingLevelId') buildingLevelId: string,\n @Arg('startDate') startDate: string,\n @Arg('endDate') endDate: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary[]> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS \"requestDate\"`)\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .where('bi.building_level_id = :buildingLevelId', { buildingLevelId })\n .andWhere('bi.request_date BETWEEN :startDate AND :endDate', { startDate, endDate })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('bi.building_level_id')\n .addGroupBy('bi.request_date')\n .getRawMany()\n\n return buildingInspectionSummary\n }\n\n // 층 별로 검수 개수 써머리\n @FieldResolver(type => BuildingInspectionSummary)\n async buildingInspectionSummary(@Root() buildingLevel: BuildingLevel): Promise<BuildingInspectionSummary> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .where('bi.building_level_id = :buildingLevelId', { buildingLevelId: buildingLevel.id })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('bi.building_level_id')\n .getRawOne()\n\n return {\n wait: buildingInspectionSummary?.wait || 0,\n request: buildingInspectionSummary?.request || 0,\n pass: buildingInspectionSummary?.pass || 0,\n fail: buildingInspectionSummary?.fail || 0\n }\n }\n\n @Query(returns => BuildingInspectionSummary, { description: '프로젝트의 검측상태 별 카운트' })\n async buildingInspectionSummaryOfProject(\n @Arg('projectId') projectId: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary> {\n const { domain } = context.state\n\n const result = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status = '${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status = '${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('buildings', 'b', 'bl.building_id = b.id')\n .innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')\n .innerJoin('projects', 'p', 'bc.id = p.building_complex_id')\n .where('p.domain = :domain', { domain: domain.id })\n .andWhere('p.id = :projectId', { projectId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('p.id')\n .getRawOne()\n\n return {\n wait: result?.wait || 0,\n request: result?.request || 0,\n pass: result?.pass || 0,\n fail: result?.fail || 0\n }\n }\n\n @FieldResolver(type => Checklist)\n async checklist(@Root() buildingInspection: BuildingInspection): Promise<Checklist> {\n return await getRepository(Checklist).findOneBy({ id: buildingInspection.checklistId })\n }\n\n @FieldResolver(type => BuildingLevel)\n async buildingLevel(@Root() buildingInspection: BuildingInspection): Promise<BuildingLevel> {\n return await getRepository(BuildingLevel).findOneBy({ id: buildingInspection.buildingLevelId })\n }\n\n @FieldResolver(type => [Attachment])\n async attachments(@Root() buildingInspection: BuildingInspection): Promise<Attachment[] | undefined> {\n const attachment: Attachment[] = await getRepository(Attachment).find({\n where: {\n refType: BuildingInspection.name,\n refBy: buildingInspection.id\n }\n })\n\n return attachment\n }\n\n @FieldResolver(type => ProjectManagerOutput)\n async manager(@Root() buildingInspection: BuildingInspection): Promise<ProjectManagerOutput> {\n const queryBuilder = getRepository(User)\n .createQueryBuilder('u')\n .select('m.id', 'id')\n .addSelect('m.phone', 'phone')\n .addSelect('m.position', 'position')\n .addSelect('u.id', 'userId')\n .addSelect('u.name', 'name')\n .addSelect('u.updated_at', 'updatedAt')\n .leftJoin('managers', 'm', 'u.id = m.user_id')\n .where('u.id = :userId', { userId: buildingInspection.managerId })\n\n return await queryBuilder.getRawOne()\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"building-inspection-query.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,qEAA4D;AAC5D,iDAA+F;AAC/F,+DAAiG;AACjG,yEAOmC;AACnC,6DAAsD;AACtD,sDAAkD;AAClD,6CAA4C;AAC5C,yDAAgD;AAEhD,MAAM,WAAW,GAAG,YAAM,CAAC,GAAG,CAAC,aAAa,EAAE,iCAAW,CAAC,IAAI,CAAC,CAAA;AAGxD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAE5B,AAAN,KAAK,CAAC,kBAAkB,CAAY,EAAU,EAAS,OAAwB;QAC7E,OAAO,MAAM,IAAA,qBAAa,EAAC,wCAAkB,CAAC,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;SAC3B,CAAC,CAAA;IACJ,C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CAAC,EAAE,CAAC,gCAAa,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;4DAEjE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAU,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;0DAS/D;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,+CAAoB,CAAC;IAC7B,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;sDAa3D;kCA9XU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,uBAAuB,CA+XnC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Arg, Args, Ctx } from 'type-graphql'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { getRepository, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\nimport { BuildingInspection, BuildingInspectionStatus, ProjectType } from './building-inspection'\nimport {\n BuildingInspectionList,\n BuildingInspectionsOfBuilding,\n BuildingInspectionsOfBuildingLevel,\n BuildingInspectionsOfProject,\n BuildingInspectionSummary,\n ProjectManagerOutput\n} from './building-inspection-type'\nimport { BuildingLevel } from '@dssp/building-complex'\nimport { Checklist } from '../checklist/checklist'\nimport { config } from '@things-factory/env'\nimport { User } from '@things-factory/auth-base'\n\nconst projectType = config.get('projectType', ProjectType.DSSP)\n\n@Resolver(BuildingInspection)\nexport class BuildingInspectionQuery {\n @Query(returns => BuildingInspection!, { nullable: true, description: 'To fetch a BuildingInspection' })\n async buildingInspection(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<BuildingInspection> {\n return await getRepository(BuildingInspection).findOne({\n where: { id, projectType }\n })\n }\n\n @Query(returns => BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' })\n async buildingInspections(@Args() params: ListParam): Promise<BuildingInspectionList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(BuildingInspection),\n searchables: ['name']\n }).andWhere('project_type = :projectType', { projectType })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' })\n async buildingInspectionsOfProject(\n @Arg('params') params: BuildingInspectionsOfProject,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionList> {\n const { projectId, limit, statusFilter } = params\n\n const queryBuilder = getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('buildings', 'b', 'bl.building_id = b.id')\n .innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')\n .innerJoin('projects', 'p', 'bc.id = p.building_complex_id')\n .innerJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .where('bi.project_type = :projectType', { projectType })\n .andWhere('p.id = :projectId', { projectId })\n\n // 상태 필터\n if (statusFilter === 'WAIT') {\n queryBuilder.andWhere(\"bi.status IN ('WAIT', 'OVERALL_WAIT')\").andWhere('(bi.fail_count = 0 OR bi.fail_count IS NULL)')\n } else if (statusFilter === 'RE_WAIT') {\n queryBuilder.andWhere(\"bi.status IN ('WAIT', 'OVERALL_WAIT')\").andWhere('bi.fail_count > 0')\n } else if (statusFilter === 'REQUEST') {\n queryBuilder.andWhere(\"bi.status IN ('REQUEST', 'OVERALL_REQUEST')\")\n } else if (statusFilter === 'FAIL') {\n queryBuilder.andWhere(\"bi.status = 'FAIL'\")\n } else if (statusFilter === 'PASS') {\n queryBuilder.andWhere(\"bi.status = 'PASS'\")\n }\n\n queryBuilder.orderBy('bi.createdAt', 'DESC')\n\n if (limit) {\n queryBuilder.limit(limit)\n }\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => BuildingInspectionList, { description: 'To fetch multiple BuildingInspections' })\n async buildingInspectionsOfBuildingLevel(\n @Arg('params') params: BuildingInspectionsOfBuildingLevel,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionList> {\n const { buildingLevelId, limit, startDate, endDate } = params\n\n const queryBuilder = getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .where('bl.id = :buildingLevelId', { buildingLevelId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .orderBy('bi.updatedAt', 'DESC')\n\n if (startDate) {\n queryBuilder.andWhere('bi.request_date >= :startDate::date', { startDate })\n }\n\n if (endDate) {\n queryBuilder.andWhere('bi.request_date < (:endDate::date + interval \\'1 day\\')', { endDate })\n }\n\n if (limit) {\n queryBuilder.limit(limit)\n }\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n // 층 별로 검수 개수 써머리\n @Query(returns => BuildingInspectionSummary!, { nullable: true, description: 'To fetch a BuildingInspection Summary' })\n async buildingInspectionSummaryOfBuildingLevel(\n @Arg('buildingLevelId') buildingLevelId: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS \"reWait\"`\n )\n .where('bi.building_level_id = :buildingLevelId', { buildingLevelId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('bi.building_level_id')\n .getRawOne()\n\n return {\n wait: buildingInspectionSummary?.wait || 0,\n request: buildingInspectionSummary?.request || 0,\n pass: buildingInspectionSummary?.pass || 0,\n fail: buildingInspectionSummary?.fail || 0,\n reWait: buildingInspectionSummary?.reWait || 0\n }\n }\n\n // 층 별로 검수 개수 써머리\n @Query(returns => [BuildingInspectionSummary]!, { nullable: true, description: 'To fetch a BuildingInspection Summary' })\n async buildingInspectionDateSummaryOfLevelAndPeriod(\n @Arg('buildingLevelId') buildingLevelId: string,\n @Arg('startDate') startDate: string,\n @Arg('endDate') endDate: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary[]> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS \"requestDate\"`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS \"reWait\"`\n )\n .where('bi.building_level_id = :buildingLevelId', { buildingLevelId })\n .andWhere('bi.request_date >= :startDate::date', { startDate })\n .andWhere('bi.request_date < (:endDate::date + interval \\'1 day\\')', { endDate })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('bi.building_level_id')\n .addGroupBy(`TO_CHAR(bi.request_date, 'YYYY-MM-DD')`)\n .getRawMany()\n\n return buildingInspectionSummary\n }\n\n // 프로젝트 별로 날짜별 검수 개수 써머리\n @Query(returns => [BuildingInspectionSummary]!, { nullable: true, description: 'To fetch BuildingInspection Date Summary of Project' })\n async buildingInspectionDateSummaryOfProject(\n @Arg('projectId') projectId: string,\n @Arg('startDate') startDate: string,\n @Arg('endDate') endDate: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary[]> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS \"requestDate\"`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS \"reWait\"`\n )\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('buildings', 'b', 'bl.building_id = b.id')\n .innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')\n .innerJoin('projects', 'p', 'bc.id = p.building_complex_id')\n .where('p.id = :projectId', { projectId })\n .andWhere('bi.request_date >= :startDate::date', { startDate })\n .andWhere('bi.request_date < (:endDate::date + interval \\'1 day\\')', { endDate })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy(`TO_CHAR(bi.request_date, 'YYYY-MM-DD')`)\n .getRawMany()\n\n return buildingInspectionSummary\n }\n\n // 동 별로 검수 개수 써머리\n @Query(returns => BuildingInspectionSummary!, { nullable: true, description: 'To fetch BuildingInspection Summary of Building' })\n async buildingInspectionSummaryOfBuilding(\n @Arg('buildingId') buildingId: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary> {\n const result = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS \"reWait\"`\n )\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .where('bl.building_id = :buildingId', { buildingId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .getRawOne()\n\n return {\n wait: result?.wait || 0,\n request: result?.request || 0,\n pass: result?.pass || 0,\n fail: result?.fail || 0,\n reWait: result?.reWait || 0\n }\n }\n\n // 동 별로 날짜별 검수 개수 써머리\n @Query(returns => [BuildingInspectionSummary]!, { nullable: true, description: 'To fetch BuildingInspection Date Summary of Building' })\n async buildingInspectionDateSummaryOfBuilding(\n @Arg('buildingId') buildingId: string,\n @Arg('startDate') startDate: string,\n @Arg('endDate') endDate: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionSummary[]> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS \"requestDate\"`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND (bi.fail_count = 0 OR bi.fail_count IS NULL) THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS \"reWait\"`\n )\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .where('bl.building_id = :buildingId', { buildingId })\n .andWhere('bi.request_date >= :startDate::date', { startDate })\n .andWhere('bi.request_date < (:endDate::date + interval \\'1 day\\')', { endDate })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy(`TO_CHAR(bi.request_date, 'YYYY-MM-DD')`)\n .getRawMany()\n\n return buildingInspectionSummary\n }\n\n // 동 별로 검측 목록\n @Query(returns => BuildingInspectionList, { description: 'To fetch BuildingInspections of Building' })\n async buildingInspectionsOfBuilding(\n @Arg('params') params: BuildingInspectionsOfBuilding,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionList> {\n const { buildingId, limit } = params\n\n const queryBuilder = getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .where('bl.building_id = :buildingId', { buildingId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .orderBy('bi.updatedAt', 'DESC')\n\n if (limit) {\n queryBuilder.limit(limit)\n }\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n // 층 별로 검수 개수 써머리\n @FieldResolver(type => BuildingInspectionSummary)\n async buildingInspectionSummary(@Root() buildingLevel: BuildingLevel): Promise<BuildingInspectionSummary> {\n const buildingInspectionSummary = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .where('bi.building_level_id = :buildingLevelId', { buildingLevelId: buildingLevel.id })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('bi.building_level_id')\n .getRawOne()\n\n return {\n wait: buildingInspectionSummary?.wait || 0,\n request: buildingInspectionSummary?.request || 0,\n pass: buildingInspectionSummary?.pass || 0,\n fail: buildingInspectionSummary?.fail || 0\n }\n }\n\n @Query(returns => BuildingInspectionSummary, { description: '프로젝트의 검측상태 별 카운트' })\n async buildingInspectionSummaryOfProject(@Arg('projectId') projectId: string): Promise<BuildingInspectionSummary> {\n const result = await getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .select(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`\n )\n .addSelect(\n `COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`\n )\n .addSelect(`COUNT(CASE WHEN bi.status = '${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)\n .addSelect(`COUNT(CASE WHEN bi.status = '${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)\n .addSelect(\n `COUNT(CASE WHEN (bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}') AND bi.fail_count > 0 THEN 1 ELSE NULL END) AS \"reWait\"`\n )\n .innerJoin('building_levels', 'bl', 'bi.building_level_id = bl.id')\n .innerJoin('buildings', 'b', 'bl.building_id = b.id')\n .innerJoin('building_complexes', 'bc', 'b.building_complex_id = bc.id')\n .innerJoin('projects', 'p', 'bc.id = p.building_complex_id')\n .where('p.id = :projectId', { projectId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .groupBy('p.id')\n .getRawOne()\n\n return {\n wait: result?.wait || 0,\n request: result?.request || 0,\n pass: result?.pass || 0,\n fail: result?.fail || 0,\n reWait: result?.reWait || 0\n }\n }\n\n @FieldResolver(type => Checklist)\n async checklist(@Root() buildingInspection: BuildingInspection): Promise<Checklist> {\n return await getRepository(Checklist).findOneBy({ id: buildingInspection.checklistId })\n }\n\n @FieldResolver(type => BuildingLevel)\n async buildingLevel(@Root() buildingInspection: BuildingInspection): Promise<BuildingLevel> {\n return await getRepository(BuildingLevel).findOneBy({ id: buildingInspection.buildingLevelId })\n }\n\n @FieldResolver(type => [Attachment])\n async attachments(@Root() buildingInspection: BuildingInspection): Promise<Attachment[] | undefined> {\n const attachment: Attachment[] = await getRepository(Attachment).find({\n where: {\n refType: BuildingInspection.name,\n refBy: buildingInspection.id\n }\n })\n\n return attachment\n }\n\n @FieldResolver(type => ProjectManagerOutput)\n async manager(@Root() buildingInspection: BuildingInspection): Promise<ProjectManagerOutput> {\n const queryBuilder = getRepository(User)\n .createQueryBuilder('u')\n .select('m.id', 'id')\n .addSelect('m.phone', 'phone')\n .addSelect('m.position', 'position')\n .addSelect('u.id', 'userId')\n .addSelect('u.name', 'name')\n .addSelect('u.updated_at', 'updatedAt')\n .leftJoin('managers', 'm', 'u.id = m.user_id')\n .where('u.id = :userId', { userId: buildingInspection.managerId })\n\n return await queryBuilder.getRawOne()\n }\n}\n"]}
|
|
@@ -12,7 +12,9 @@ export declare class ChecklistItemInputType {
|
|
|
12
12
|
name: string;
|
|
13
13
|
mainType: string;
|
|
14
14
|
detailType: string;
|
|
15
|
-
inspctionCriteria
|
|
15
|
+
inspctionCriteria?: string;
|
|
16
|
+
kcsCriteria?: string;
|
|
17
|
+
siteSpecCriteria?: string;
|
|
16
18
|
}
|
|
17
19
|
export declare class NewBuildingInspection {
|
|
18
20
|
buildingLevelId?: string;
|
|
@@ -41,6 +43,7 @@ export declare class ChecklistItemSubmitInputType {
|
|
|
41
43
|
export declare class UpdateBuildingInspectionSubmitType {
|
|
42
44
|
id: string;
|
|
43
45
|
memo?: string;
|
|
46
|
+
requestDate?: string;
|
|
44
47
|
checklist: ChecklistSubmitInputType;
|
|
45
48
|
checklistItem: ChecklistItemSubmitInputType[];
|
|
46
49
|
}
|
|
@@ -52,6 +55,11 @@ export declare class UpdateBuildingInspection {
|
|
|
52
55
|
export declare class BuildingInspectionsOfProject {
|
|
53
56
|
projectId: string;
|
|
54
57
|
limit: number;
|
|
58
|
+
statusFilter?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare class BuildingInspectionsOfBuilding {
|
|
61
|
+
buildingId: string;
|
|
62
|
+
limit: number;
|
|
55
63
|
}
|
|
56
64
|
export declare class BuildingInspectionsOfBuildingLevel {
|
|
57
65
|
buildingLevelId: string;
|
|
@@ -65,6 +73,7 @@ export declare class BuildingInspectionSummary {
|
|
|
65
73
|
request: number;
|
|
66
74
|
pass: number;
|
|
67
75
|
fail: number;
|
|
76
|
+
reWait?: number;
|
|
68
77
|
}
|
|
69
78
|
export declare class BuildingInspectionList {
|
|
70
79
|
items: BuildingInspection[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectManagerOutput = exports.BuildingInspectionList = exports.BuildingInspectionSummary = exports.BuildingInspectionsOfBuildingLevel = exports.BuildingInspectionsOfProject = exports.UpdateBuildingInspection = exports.UpdateBuildingInspectionSubmitType = exports.ChecklistItemSubmitInputType = exports.ChecklistSubmitInputType = exports.NewBuildingInspection = exports.ChecklistItemInputType = exports.ChecklistInputType = void 0;
|
|
3
|
+
exports.ProjectManagerOutput = exports.BuildingInspectionList = exports.BuildingInspectionSummary = exports.BuildingInspectionsOfBuildingLevel = exports.BuildingInspectionsOfBuilding = exports.BuildingInspectionsOfProject = exports.UpdateBuildingInspection = exports.UpdateBuildingInspectionSubmitType = exports.ChecklistItemSubmitInputType = exports.ChecklistSubmitInputType = exports.NewBuildingInspection = exports.ChecklistItemInputType = exports.ChecklistInputType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const building_inspection_1 = require("./building-inspection");
|
|
@@ -54,6 +54,14 @@ tslib_1.__decorate([
|
|
|
54
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
55
|
tslib_1.__metadata("design:type", String)
|
|
56
56
|
], ChecklistItemInputType.prototype, "inspctionCriteria", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
60
|
+
], ChecklistItemInputType.prototype, "kcsCriteria", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
+
tslib_1.__metadata("design:type", String)
|
|
64
|
+
], ChecklistItemInputType.prototype, "siteSpecCriteria", void 0);
|
|
57
65
|
exports.ChecklistItemInputType = ChecklistItemInputType = tslib_1.__decorate([
|
|
58
66
|
(0, type_graphql_1.InputType)()
|
|
59
67
|
], ChecklistItemInputType);
|
|
@@ -158,6 +166,10 @@ tslib_1.__decorate([
|
|
|
158
166
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
159
167
|
tslib_1.__metadata("design:type", String)
|
|
160
168
|
], UpdateBuildingInspectionSubmitType.prototype, "memo", void 0);
|
|
169
|
+
tslib_1.__decorate([
|
|
170
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
171
|
+
tslib_1.__metadata("design:type", String)
|
|
172
|
+
], UpdateBuildingInspectionSubmitType.prototype, "requestDate", void 0);
|
|
161
173
|
tslib_1.__decorate([
|
|
162
174
|
(0, type_graphql_1.Field)(type => ChecklistSubmitInputType, { nullable: false }),
|
|
163
175
|
tslib_1.__metadata("design:type", ChecklistSubmitInputType)
|
|
@@ -198,9 +210,27 @@ tslib_1.__decorate([
|
|
|
198
210
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
199
211
|
tslib_1.__metadata("design:type", Number)
|
|
200
212
|
], BuildingInspectionsOfProject.prototype, "limit", void 0);
|
|
213
|
+
tslib_1.__decorate([
|
|
214
|
+
(0, type_graphql_1.Field)({ nullable: true, description: '상태 필터 (WAIT, REQUEST, FAIL, RE_WAIT, PASS)' }),
|
|
215
|
+
tslib_1.__metadata("design:type", String)
|
|
216
|
+
], BuildingInspectionsOfProject.prototype, "statusFilter", void 0);
|
|
201
217
|
exports.BuildingInspectionsOfProject = BuildingInspectionsOfProject = tslib_1.__decorate([
|
|
202
218
|
(0, type_graphql_1.InputType)()
|
|
203
219
|
], BuildingInspectionsOfProject);
|
|
220
|
+
let BuildingInspectionsOfBuilding = class BuildingInspectionsOfBuilding {
|
|
221
|
+
};
|
|
222
|
+
exports.BuildingInspectionsOfBuilding = BuildingInspectionsOfBuilding;
|
|
223
|
+
tslib_1.__decorate([
|
|
224
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
225
|
+
tslib_1.__metadata("design:type", String)
|
|
226
|
+
], BuildingInspectionsOfBuilding.prototype, "buildingId", void 0);
|
|
227
|
+
tslib_1.__decorate([
|
|
228
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
229
|
+
tslib_1.__metadata("design:type", Number)
|
|
230
|
+
], BuildingInspectionsOfBuilding.prototype, "limit", void 0);
|
|
231
|
+
exports.BuildingInspectionsOfBuilding = BuildingInspectionsOfBuilding = tslib_1.__decorate([
|
|
232
|
+
(0, type_graphql_1.InputType)()
|
|
233
|
+
], BuildingInspectionsOfBuilding);
|
|
204
234
|
let BuildingInspectionsOfBuildingLevel = class BuildingInspectionsOfBuildingLevel {
|
|
205
235
|
};
|
|
206
236
|
exports.BuildingInspectionsOfBuildingLevel = BuildingInspectionsOfBuildingLevel;
|
|
@@ -246,6 +276,10 @@ tslib_1.__decorate([
|
|
|
246
276
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: '검측 실패 수' }),
|
|
247
277
|
tslib_1.__metadata("design:type", Number)
|
|
248
278
|
], BuildingInspectionSummary.prototype, "fail", void 0);
|
|
279
|
+
tslib_1.__decorate([
|
|
280
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: '재검측 대기 수 (failCount > 0 인 WAIT/OVERALL_WAIT)' }),
|
|
281
|
+
tslib_1.__metadata("design:type", Number)
|
|
282
|
+
], BuildingInspectionSummary.prototype, "reWait", void 0);
|
|
249
283
|
exports.BuildingInspectionSummary = BuildingInspectionSummary = tslib_1.__decorate([
|
|
250
284
|
(0, type_graphql_1.ObjectType)()
|
|
251
285
|
], BuildingInspectionSummary);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-type.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,+DAA0D;AAC1D,sDAAqF;AAG9E,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAkB9B,CAAA;AAlBY,gDAAkB;AAE7B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACf;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACD;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACK;AAG/B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACI;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAClB;6BAjBf,kBAAkB;IAD9B,IAAA,wBAAS,GAAE;GACC,kBAAkB,CAkB9B;AAGM,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAYlC,CAAA;AAZY,wDAAsB;AAEjC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oDACf;AAGZ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;AAE/B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oDACH;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;+BAjBP,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAkBhC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { BuildingInspection } from './building-inspection'\nimport { InspectionResultStatus, InspectionResultType } from '../checklist/checklist'\n\n@InputType()\nexport class ChecklistInputType {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n constructionType?: string\n\n @Field({ nullable: true })\n constructionDetailType?: string\n\n @Field({ nullable: true })\n location?: string\n\n @Field({ nullable: true })\n inspectionDrawingType?: string\n\n @Field(type => [String], { nullable: true })\n inspectionParts?: string[]\n}\n\n@InputType()\nexport class ChecklistItemInputType {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: false })\n mainType: string\n\n @Field({ nullable: false })\n detailType: string\n\n @Field({ nullable: true })\n inspctionCriteria: string\n}\n\n@InputType()\nexport class NewBuildingInspection {\n @Field({ nullable: true })\n buildingLevelId?: string\n\n @Field(type => ChecklistInputType, { nullable: false })\n checklist: ChecklistInputType\n\n @Field(type => [ChecklistItemInputType], { nullable: false })\n checklistItem: ChecklistItemInputType[]\n\n @Field({ nullable: true })\n cellX?: number\n\n @Field({ nullable: true })\n cellY?: number\n\n @Field({ nullable: true })\n managerId?: string\n}\n\n@InputType()\nexport class ChecklistSubmitInputType {\n @Field({ nullable: false })\n id: string\n\n @Field({ nullable: true })\n overallConstructorSignature?: string\n\n @Field({ nullable: true })\n taskConstructorSignature?: string\n\n @Field({ nullable: true })\n overallSupervisorySignature?: string\n\n @Field({ nullable: true })\n taskSupervisorySignature?: string\n\n @Field({ nullable: true })\n inspectionRequestMemo?: string\n\n @Field({ nullable: true })\n inspectionResultMemo?: string\n\n @Field({ nullable: true })\n inspectionResultStatus?: InspectionResultStatus\n\n @Field({ nullable: true })\n inspectionResultType?: InspectionResultType\n}\n\n@InputType()\nexport class ChecklistItemSubmitInputType {\n @Field({ nullable: false })\n id: string\n\n @Field({ nullable: true })\n constructionConfirmStatus?: string\n\n @Field({ nullable: true })\n supervisoryConfirmStatus?: string\n}\n\n@InputType()\nexport class UpdateBuildingInspectionSubmitType {\n @Field({ nullable: false })\n id: string\n\n @Field({ nullable: true })\n memo?: string\n\n @Field(type => ChecklistSubmitInputType, { nullable: false })\n checklist: ChecklistSubmitInputType\n\n @Field(type => [ChecklistItemSubmitInputType], { nullable: false })\n checklistItem: ChecklistItemSubmitInputType[]\n}\n@InputType()\nexport class UpdateBuildingInspection {\n @Field({ nullable: false })\n id: string\n\n @Field(type => String, { nullable: true })\n drawingMarker?: string\n\n @Field(type => String, { nullable: true })\n memo?: string\n}\n\n@InputType()\nexport class BuildingInspectionsOfProject {\n @Field({ nullable: false })\n projectId: string\n\n @Field({ nullable: true })\n limit: number\n}\n\n@InputType()\nexport class BuildingInspectionsOfBuildingLevel {\n @Field({ nullable: false })\n buildingLevelId: string\n\n @Field({ nullable: true })\n limit: number\n\n @Field({ nullable: true })\n startDate?: string\n\n @Field({ nullable: true })\n endDate?: string\n}\n\n@ObjectType()\nexport class BuildingInspectionSummary {\n @Field(type => String, { nullable: true, description: '요청일자' })\n requestDate?: string\n\n @Field(type => Int, { description: '검측 대기 수' })\n wait: number\n\n @Field(type => Int, { description: '검측 요청 수' })\n request: number\n\n @Field(type => Int, { description: '검측 통과 수' })\n pass: number\n\n @Field(type => Int, { description: '검측 실패 수' })\n fail: number\n}\n\n@ObjectType()\nexport class BuildingInspectionList {\n @Field(type => [BuildingInspection])\n items: BuildingInspection[]\n\n @Field(type => Int)\n total: number\n}\n\n@ObjectType()\nexport class ProjectManagerOutput {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n phone?: string\n\n @Field({ nullable: true })\n position?: string\n\n @Field(type => ID)\n userId?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n updatedAt?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"building-inspection-type.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,+DAA0D;AAC1D,sDAAqF;AAG9E,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAkB9B,CAAA;AAlBY,gDAAkB;AAE7B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACf;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACD;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACK;AAG/B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACI;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAClB;6BAjBf,kBAAkB;IAD9B,IAAA,wBAAS,GAAE;GACC,kBAAkB,CAkB9B;AAGM,IAAM,sBAAsB,GAA5B,MAAM,sBAAs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oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;+BAjBP,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAkBhC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { BuildingInspection } from './building-inspection'\nimport { InspectionResultStatus, InspectionResultType } from '../checklist/checklist'\n\n@InputType()\nexport class ChecklistInputType {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n constructionType?: string\n\n @Field({ nullable: true })\n constructionDetailType?: string\n\n @Field({ nullable: true })\n location?: string\n\n @Field({ nullable: true })\n inspectionDrawingType?: string\n\n @Field(type => [String], { nullable: true })\n inspectionParts?: string[]\n}\n\n@InputType()\nexport class ChecklistItemInputType {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: false })\n mainType: string\n\n @Field({ nullable: false })\n detailType: string\n\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Field({ nullable: true })\n kcsCriteria?: string\n\n @Field({ nullable: true })\n siteSpecCriteria?: string\n}\n\n@InputType()\nexport class NewBuildingInspection {\n @Field({ nullable: true })\n buildingLevelId?: string\n\n @Field(type => ChecklistInputType, { nullable: false })\n checklist: ChecklistInputType\n\n @Field(type => [ChecklistItemInputType], { nullable: false })\n checklistItem: ChecklistItemInputType[]\n\n @Field({ nullable: true })\n cellX?: number\n\n @Field({ nullable: true })\n cellY?: number\n\n @Field({ nullable: true })\n managerId?: string\n}\n\n@InputType()\nexport class ChecklistSubmitInputType {\n @Field({ nullable: false })\n id: string\n\n @Field({ nullable: true })\n overallConstructorSignature?: string\n\n @Field({ nullable: true })\n taskConstructorSignature?: string\n\n @Field({ nullable: true })\n overallSupervisorySignature?: string\n\n @Field({ nullable: true })\n taskSupervisorySignature?: string\n\n @Field({ nullable: true })\n inspectionRequestMemo?: string\n\n @Field({ nullable: true })\n inspectionResultMemo?: string\n\n @Field({ nullable: true })\n inspectionResultStatus?: InspectionResultStatus\n\n @Field({ nullable: true })\n inspectionResultType?: InspectionResultType\n}\n\n@InputType()\nexport class ChecklistItemSubmitInputType {\n @Field({ nullable: false })\n id: string\n\n @Field({ nullable: true })\n constructionConfirmStatus?: string\n\n @Field({ nullable: true })\n supervisoryConfirmStatus?: string\n}\n\n@InputType()\nexport class UpdateBuildingInspectionSubmitType {\n @Field({ nullable: false })\n id: string\n\n @Field({ nullable: true })\n memo?: string\n\n @Field({ nullable: true })\n requestDate?: string\n\n @Field(type => ChecklistSubmitInputType, { nullable: false })\n checklist: ChecklistSubmitInputType\n\n @Field(type => [ChecklistItemSubmitInputType], { nullable: false })\n checklistItem: ChecklistItemSubmitInputType[]\n}\n@InputType()\nexport class UpdateBuildingInspection {\n @Field({ nullable: false })\n id: string\n\n @Field(type => String, { nullable: true })\n drawingMarker?: string\n\n @Field(type => String, { nullable: true })\n memo?: string\n}\n\n@InputType()\nexport class BuildingInspectionsOfProject {\n @Field({ nullable: false })\n projectId: string\n\n @Field({ nullable: true })\n limit: number\n\n @Field({ nullable: true, description: '상태 필터 (WAIT, REQUEST, FAIL, RE_WAIT, PASS)' })\n statusFilter?: string\n}\n\n@InputType()\nexport class BuildingInspectionsOfBuilding {\n @Field({ nullable: false })\n buildingId: string\n\n @Field({ nullable: true })\n limit: number\n}\n\n@InputType()\nexport class BuildingInspectionsOfBuildingLevel {\n @Field({ nullable: false })\n buildingLevelId: string\n\n @Field({ nullable: true })\n limit: number\n\n @Field({ nullable: true })\n startDate?: string\n\n @Field({ nullable: true })\n endDate?: string\n}\n\n@ObjectType()\nexport class BuildingInspectionSummary {\n @Field(type => String, { nullable: true, description: '요청일자' })\n requestDate?: string\n\n @Field(type => Int, { description: '검측 대기 수' })\n wait: number\n\n @Field(type => Int, { description: '검측 요청 수' })\n request: number\n\n @Field(type => Int, { description: '검측 통과 수' })\n pass: number\n\n @Field(type => Int, { description: '검측 실패 수' })\n fail: number\n\n @Field(type => Int, { nullable: true, description: '재검측 대기 수 (failCount > 0 인 WAIT/OVERALL_WAIT)' })\n reWait?: number\n}\n\n@ObjectType()\nexport class BuildingInspectionList {\n @Field(type => [BuildingInspection])\n items: BuildingInspection[]\n\n @Field(type => Int)\n total: number\n}\n\n@ObjectType()\nexport class ProjectManagerOutput {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n phone?: string\n\n @Field({ nullable: true })\n position?: string\n\n @Field(type => ID)\n userId?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n updatedAt?: string\n}\n"]}
|