@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
|
@@ -47,14 +47,19 @@ tslib_1.__decorate([
|
|
|
47
47
|
tslib_1.__decorate([
|
|
48
48
|
(0, typeorm_1.Column)({
|
|
49
49
|
nullable: false,
|
|
50
|
-
comment: '상태(WAIT:
|
|
50
|
+
comment: '상태(WAIT: 작업 완료, OVERALL_WAIT: 총괄자 작업 완료, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격(검측 완료), FAIL: 불합격(조치 필요))',
|
|
51
51
|
default: BuildingInspectionStatus.WAIT
|
|
52
52
|
}),
|
|
53
53
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
54
54
|
tslib_1.__metadata("design:type", String)
|
|
55
55
|
], BuildingInspection.prototype, "status", void 0);
|
|
56
56
|
tslib_1.__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ type: '
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0, nullable: false, comment: '불합격 횟수 (재검측 여부 판단용)' }),
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
+
tslib_1.__metadata("design:type", Number)
|
|
60
|
+
], BuildingInspection.prototype, "failCount", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP', nullable: true, comment: '검측 요청일시' }),
|
|
58
63
|
(0, type_graphql_1.Field)(type => String, { nullable: true }),
|
|
59
64
|
tslib_1.__metadata("design:type", String)
|
|
60
65
|
], BuildingInspection.prototype, "requestDate", void 0);
|
|
@@ -163,6 +168,19 @@ exports.BuildingInspection = BuildingInspection = tslib_1.__decorate([
|
|
|
163
168
|
(0, typeorm_1.Index)('ix_building_inspection_2', (buildingInspection) => [buildingInspection.requestDate], {
|
|
164
169
|
where: '"deleted_at" IS NULL'
|
|
165
170
|
}),
|
|
171
|
+
(0, typeorm_1.Index)('ix_building_inspection_3', (buildingInspection) => [
|
|
172
|
+
buildingInspection.buildingLevel,
|
|
173
|
+
buildingInspection.projectType,
|
|
174
|
+
buildingInspection.requestDate
|
|
175
|
+
], { where: '"deleted_at" IS NULL' }),
|
|
176
|
+
(0, typeorm_1.Index)('ix_building_inspection_4', (buildingInspection) => [
|
|
177
|
+
buildingInspection.buildingLevel,
|
|
178
|
+
buildingInspection.projectType,
|
|
179
|
+
buildingInspection.status
|
|
180
|
+
], { where: '"deleted_at" IS NULL' }),
|
|
181
|
+
(0, typeorm_1.Index)('ix_building_inspection_5', (buildingInspection) => [buildingInspection.worklog], {
|
|
182
|
+
where: '"deleted_at" IS NULL'
|
|
183
|
+
}),
|
|
166
184
|
(0, type_graphql_1.ObjectType)()
|
|
167
185
|
], BuildingInspection);
|
|
168
186
|
//# sourceMappingURL=building-inspection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAAsE;AACtE,yDAAgD;AAChD,6DAAsD;AACtD,sDAAkD;AAClD,yEAAiE;AACjE,8HAAuH;AAEvH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,yCAAa,CAAA;IACb,yDAA6B,CAAA;IAC7B,+CAAmB,CAAA;IACnB,+DAAmC,CAAA;IACnC,yCAAa,CAAA;IACb,yCAAa,CAAA;AACf,CAAC,EAPW,wBAAwB,wCAAxB,wBAAwB,QAOnC;AACD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAA,+BAAgB,EAAC,wBAAwB,EAAE;IACzC,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,OAAO;CACrB,CAAC,CAAA;AACF,IAAA,+BAAgB,EAAC,WAAW,EAAE;IAC5B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,SAAS;CACvB,CAAC,CAAA;AAqBK,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CA+F9B,CAAA;AA/FY,gDAAkB;AAGpB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CA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AAC,OAAO,CAAC;;qDACjE;6BA9FP,kBAAkB;IAnB9B,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IAC5C,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,kBAAsC,EAAE,EAAE,CAAC;QAC1C,kBAAkB,CAAC,aAAa;QAChC,kBAAkB,CAAC,KAAK;QACxB,kBAAkB,CAAC,KAAK;KACzB,EACD;QACE,KAAK,EAAE,sBAAsB;KAC9B,CACF;IACA,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,kBAAsC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE;QAC7G,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,kBAAsC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;QAC/G,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,GAAE;GACA,kBAAkB,CA+F9B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToOne,\n PrimaryGeneratedColumn,\n JoinColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\nimport { User } from '@things-factory/auth-base'\nimport { BuildingLevel } from '@dssp/building-complex'\nimport { Checklist } from '../checklist/checklist'\nimport { ProjectManagerOutput } from './building-inspection-type'\nimport { BuildingInspectionDailyWorklog } from '../building-inspection-daily-worklog/building-inspection-daily-worklog'\n\nexport enum BuildingInspectionStatus {\n WAIT = 'WAIT',\n OVERALL_WAIT = 'OVERALL_WAIT',\n REQUEST = 'REQUEST',\n OVERALL_REQUEST = 'OVERALL_REQUEST',\n PASS = 'PASS',\n FAIL = 'FAIL'\n}\nexport enum ProjectType {\n DSSP = 'DSSP',\n DCSP = 'DCSP'\n}\n\nregisterEnumType(BuildingInspectionStatus, {\n name: 'BuildingInspectionStatus',\n description: '검측 상태'\n})\nregisterEnumType(ProjectType, {\n name: 'ProjectType',\n description: '프로젝트 타입'\n})\n\n@Entity({ comment: '시공 검측 (층별 도면의 검측 리스트)' })\n@Index(\n 'ix_building_inspection_0',\n (buildingInspection: BuildingInspection) => [\n buildingInspection.buildingLevel,\n buildingInspection.cellX,\n buildingInspection.cellY\n ],\n {\n where: '\"deleted_at\" IS NULL'\n }\n)\n@Index('ix_building_inspection_1', (buildingInspection: BuildingInspection) => [buildingInspection.checklist], {\n where: '\"deleted_at\" IS NULL'\n})\n@Index('ix_building_inspection_2', (buildingInspection: BuildingInspection) => [buildingInspection.requestDate], {\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType()\nexport class BuildingInspection {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: false, comment: '프로젝트 타입', default: ProjectType.DSSP })\n @Field({ nullable: true })\n projectType?: ProjectType\n\n @Column({\n nullable: false,\n comment:\n '상태(WAIT: 검측 대기, OVERALL_WAIT: 총괄자 검측 대기, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격, FAIL: 불합격)',\n default: BuildingInspectionStatus.WAIT\n })\n @Field({ nullable: true })\n status?: BuildingInspectionStatus\n\n @Column({ type: 'date', default: () => 'CURRENT_DATE', nullable: true, comment: '검측 요청일' })\n @Field(type => String, { nullable: true })\n requestDate?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: '도면 마커' })\n @Field(type => String, { nullable: true })\n drawingMarker?: string\n\n @Column({ nullable: true, comment: 'X좌표' })\n @Field({ nullable: true })\n cellX?: number\n\n @Column({ nullable: true, comment: 'Y좌표' })\n @Field({ nullable: true })\n cellY?: number\n\n @Column({ nullable: true, comment: '메모 - DSSP: 검측 메모, DCSP: 검측 요청서 메모' })\n @Field({ nullable: true })\n memo?: string\n\n // 층 정보 (N:1 상위 테이블 참조)\n @ManyToOne(type => BuildingLevel)\n @Field(() => BuildingLevel, { nullable: true })\n buildingLevel?: BuildingLevel\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.buildingLevel)\n buildingLevelId?: string\n\n // 체크리스트 (1:1 상위 테이블 참조)\n @OneToOne(type => Checklist)\n @JoinColumn()\n @Field(() => Checklist, { nullable: true })\n checklist?: Checklist\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.checklist)\n checklistId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => ProjectManagerOutput, { nullable: true })\n manager?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.manager)\n managerId?: string\n\n // 일일 업무 일지가 생성되면 ID를 넣어줌 (상위 테이블 참조)\n @ManyToOne(type => BuildingInspectionDailyWorklog, { nullable: true })\n @Field(type => BuildingInspectionDailyWorklog, { nullable: true })\n worklog?: BuildingInspectionDailyWorklog\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.worklog)\n worklogId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.updater)\n updaterId?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAAsE;AACtE,yDAAgD;AAChD,6DAAsD;AACtD,sDAAkD;AAClD,yEAAiE;AACjE,8HAAuH;AAEvH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,yCAAa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QAC7G,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,kBAAsC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;QAC/G,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,kBAAsC,EAAE,EAAE,CAAC;QAC1C,kBAAkB,CAAC,aAAa;QAChC,kBAAkB,CAAC,WAAW;QAC9B,kBAAkB,CAAC,WAAW;KAC/B,EACD,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAClC;IACA,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,kBAAsC,EAAE,EAAE,CAAC;QAC1C,kBAAkB,CAAC,aAAa;QAChC,kBAAkB,CAAC,WAAW;QAC9B,kBAAkB,CAAC,MAAM;KAC1B,EACD,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAClC;IACA,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,kBAAsC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE;QAC3G,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,GAAE;GACA,kBAAkB,CAmG9B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToOne,\n PrimaryGeneratedColumn,\n JoinColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\nimport { User } from '@things-factory/auth-base'\nimport { BuildingLevel } from '@dssp/building-complex'\nimport { Checklist } from '../checklist/checklist'\nimport { ProjectManagerOutput } from './building-inspection-type'\nimport { BuildingInspectionDailyWorklog } from '../building-inspection-daily-worklog/building-inspection-daily-worklog'\n\nexport enum BuildingInspectionStatus {\n WAIT = 'WAIT',\n OVERALL_WAIT = 'OVERALL_WAIT',\n REQUEST = 'REQUEST',\n OVERALL_REQUEST = 'OVERALL_REQUEST',\n PASS = 'PASS',\n FAIL = 'FAIL'\n}\nexport enum ProjectType {\n DSSP = 'DSSP',\n DCSP = 'DCSP'\n}\n\nregisterEnumType(BuildingInspectionStatus, {\n name: 'BuildingInspectionStatus',\n description: '검측 상태'\n})\nregisterEnumType(ProjectType, {\n name: 'ProjectType',\n description: '프로젝트 타입'\n})\n\n@Entity({ comment: '시공 검측 (층별 도면의 검측 리스트)' })\n@Index(\n 'ix_building_inspection_0',\n (buildingInspection: BuildingInspection) => [\n buildingInspection.buildingLevel,\n buildingInspection.cellX,\n buildingInspection.cellY\n ],\n {\n where: '\"deleted_at\" IS NULL'\n }\n)\n@Index('ix_building_inspection_1', (buildingInspection: BuildingInspection) => [buildingInspection.checklist], {\n where: '\"deleted_at\" IS NULL'\n})\n@Index('ix_building_inspection_2', (buildingInspection: BuildingInspection) => [buildingInspection.requestDate], {\n where: '\"deleted_at\" IS NULL'\n})\n@Index(\n 'ix_building_inspection_3',\n (buildingInspection: BuildingInspection) => [\n buildingInspection.buildingLevel,\n buildingInspection.projectType,\n buildingInspection.requestDate\n ],\n { where: '\"deleted_at\" IS NULL' }\n)\n@Index(\n 'ix_building_inspection_4',\n (buildingInspection: BuildingInspection) => [\n buildingInspection.buildingLevel,\n buildingInspection.projectType,\n buildingInspection.status\n ],\n { where: '\"deleted_at\" IS NULL' }\n)\n@Index('ix_building_inspection_5', (buildingInspection: BuildingInspection) => [buildingInspection.worklog], {\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType()\nexport class BuildingInspection {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: false, comment: '프로젝트 타입', default: ProjectType.DSSP })\n @Field({ nullable: true })\n projectType?: ProjectType\n\n @Column({\n nullable: false,\n comment:\n '상태(WAIT: 작업 완료, OVERALL_WAIT: 총괄자 작업 완료, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격(검측 완료), FAIL: 불합격(조치 필요))',\n default: BuildingInspectionStatus.WAIT\n })\n @Field({ nullable: true })\n status?: BuildingInspectionStatus\n\n @Column({ type: 'int', default: 0, nullable: false, comment: '불합격 횟수 (재검측 여부 판단용)' })\n @Field({ nullable: true })\n failCount?: number\n\n @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP', nullable: true, comment: '검측 요청일시' })\n @Field(type => String, { nullable: true })\n requestDate?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: '도면 마커' })\n @Field(type => String, { nullable: true })\n drawingMarker?: string\n\n @Column({ nullable: true, comment: 'X좌표' })\n @Field({ nullable: true })\n cellX?: number\n\n @Column({ nullable: true, comment: 'Y좌표' })\n @Field({ nullable: true })\n cellY?: number\n\n @Column({ nullable: true, comment: '메모 - DSSP: 검측 메모, DCSP: 검측 요청서 메모' })\n @Field({ nullable: true })\n memo?: string\n\n // 층 정보 (N:1 상위 테이블 참조)\n @ManyToOne(type => BuildingLevel)\n @Field(() => BuildingLevel, { nullable: true })\n buildingLevel?: BuildingLevel\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.buildingLevel)\n buildingLevelId?: string\n\n // 체크리스트 (1:1 상위 테이블 참조)\n @OneToOne(type => Checklist)\n @JoinColumn()\n @Field(() => Checklist, { nullable: true })\n checklist?: Checklist\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.checklist)\n checklistId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => ProjectManagerOutput, { nullable: true })\n manager?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.manager)\n managerId?: string\n\n // 일일 업무 일지가 생성되면 ID를 넣어줌 (상위 테이블 참조)\n @ManyToOne(type => BuildingInspectionDailyWorklog, { nullable: true })\n @Field(type => BuildingInspectionDailyWorklog, { nullable: true })\n worklog?: BuildingInspectionDailyWorklog\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.worklog)\n worklogId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -7,6 +7,7 @@ const building_inspection_daily_worklog_1 = require("./building-inspection-daily
|
|
|
7
7
|
const building_inspection_daily_worklog_type_1 = require("./building-inspection-daily-worklog-type");
|
|
8
8
|
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
9
9
|
const building_inspection_daily_worklog_query_1 = require("./building-inspection-daily-worklog-query");
|
|
10
|
+
const field_document_auto_file_1 = require("../field-document/field-document-auto-file");
|
|
10
11
|
let BuildingInspectionDailyWorklogMutation = class BuildingInspectionDailyWorklogMutation {
|
|
11
12
|
async createBuildingInspectionDailyWorklog(patch, context) {
|
|
12
13
|
const { user, domain, tx } = context.state;
|
|
@@ -21,6 +22,15 @@ let BuildingInspectionDailyWorklogMutation = class BuildingInspectionDailyWorklo
|
|
|
21
22
|
const buildingInspection = await buildingInspectionRepo.findOne({ where: { id: buildingInspectionId } });
|
|
22
23
|
await buildingInspectionRepo.save(Object.assign(Object.assign({}, buildingInspection), { worklog: result }));
|
|
23
24
|
}
|
|
25
|
+
// 현장 문서 자동 등록 (020108 책임기술인일지)
|
|
26
|
+
await (0, field_document_auto_file_1.autoFileDocument)({
|
|
27
|
+
projectId: patch.projectId,
|
|
28
|
+
code: '020108',
|
|
29
|
+
name: `일일 업무일지 - ${patch.date}`,
|
|
30
|
+
sourceType: 'DAILY_WORKLOG',
|
|
31
|
+
sourceRefId: result.id,
|
|
32
|
+
context
|
|
33
|
+
});
|
|
24
34
|
return result;
|
|
25
35
|
}
|
|
26
36
|
async updateBuildingInspectionDailyWorklog(patch, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-daily-worklog-mutation.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,2FAAoF;AACpF,qGAAiI;AACjI,oFAA+E;AAC/E,uGAA0F;
|
|
1
|
+
{"version":3,"file":"building-inspection-daily-worklog-mutation.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,2FAAoF;AACpF,qGAAiI;AACjI,oFAA+E;AAC/E,uGAA0F;AAC1F,yFAA6E;AAGtE,IAAM,sCAAsC,GAA5C,MAAM,sCAAsC;IAG3C,AAAN,KAAK,CAAC,oCAAoC,CAC1B,KAAwC,EAC/C,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAC1C,MAAM,WAAW,GAAG,EAAE,CAAC,aAAa,CAAC,kEAA8B,CAAC,CAAA;QACpE,MAAM,sBAAsB,GAAG,EAAE,CAAC,aAAa,CAAC,wCAAkB,CAAC,CAAA;QAEnE,IAAI,CAAC,KAAK,CAAC,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAC1D,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAA;QAEhD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,iCAChC,KAAK,KACR,kBAAkB,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAE,EAAE,EAAE,EAAE,KAAK,CAAC,oBAAoB,EAAU,CAAC,CAAC,CAAC,SAAS,EACxG,eAAe,EAAE,KAA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AK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA5DY,wFAAsC;AAG3C;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,kEAA8B,EAAE,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IAE5G,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CADe,0EAAiC;;kGAoCvD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,kEAA8B,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IAE1F,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CADe,4EAAmC;;kGAczD;iDA3DU,sCAAsC;IADlD,IAAA,uBAAQ,EAAC,kEAA8B,CAAC;GAC5B,sCAAsC,CA4DlD","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { BuildingInspectionDailyWorklog } from './building-inspection-daily-worklog'\nimport { BuildingInspectionDailyWorklogPatch, BuildingInspectionDailyWorklogNew } from './building-inspection-daily-worklog-type'\nimport { BuildingInspection } from '../building-inspection/building-inspection'\nimport { generateDailyWorklogDocumentNo } from './building-inspection-daily-worklog-query'\nimport { autoFileDocument } from '../field-document/field-document-auto-file'\n\n@Resolver(BuildingInspectionDailyWorklog)\nexport class BuildingInspectionDailyWorklogMutation {\n @Directive('@transaction')\n @Mutation(returns => BuildingInspectionDailyWorklog, { description: 'Create Daily Worklog by projectId+date' })\n async createBuildingInspectionDailyWorklog(\n @Arg('patch') patch: BuildingInspectionDailyWorklogNew,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionDailyWorklog> {\n const { user, domain, tx } = context.state\n const worklogRepo = tx.getRepository(BuildingInspectionDailyWorklog)\n const buildingInspectionRepo = tx.getRepository(BuildingInspection)\n\n if (!patch.projectId) throw new Error('projectId 가 없습니다.')\n if (!patch.date) throw new Error('date 가 없습니다.')\n\n const result = await worklogRepo.save({\n ...patch,\n overallSupervisory: patch.overallSupervisoryId ? ({ id: patch.overallSupervisoryId } as any) : undefined,\n taskSupervisory: patch.taskSupervisoryId ? ({ id: patch.taskSupervisoryId } as any) : undefined,\n documentNo: await generateDailyWorklogDocumentNo(patch.projectId),\n domain: domain,\n creator: user,\n updater: user\n })\n\n for (const buildingInspectionId of patch.buildingInspectionIds) {\n const buildingInspection = await buildingInspectionRepo.findOne({ where: { id: buildingInspectionId } })\n await buildingInspectionRepo.save({ ...buildingInspection, worklog: result })\n }\n\n // 현장 문서 자동 등록 (020108 책임기술인일지)\n await autoFileDocument({\n projectId: patch.projectId,\n code: '020108',\n name: `일일 업무일지 - ${patch.date}`,\n sourceType: 'DAILY_WORKLOG',\n sourceRefId: result.id,\n context\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => BuildingInspectionDailyWorklog, { description: 'Update Daily Worklog' })\n async updateBuildingInspectionDailyWorklog(\n @Arg('patch') patch: BuildingInspectionDailyWorklogPatch,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionDailyWorklog> {\n const { user, tx } = context.state\n const worklogRepo = tx.getRepository(BuildingInspectionDailyWorklog)\n\n const origin = await worklogRepo.findOne({ where: { id: patch.id } })\n const result = await worklogRepo.save({\n ...origin,\n ...patch,\n updater: user\n })\n\n return result\n }\n}\n"]}
|
|
@@ -10,6 +10,7 @@ export declare class BuildingInspectionHistory implements HistoryEntityInterface
|
|
|
10
10
|
originalId: string;
|
|
11
11
|
projectType?: ProjectType;
|
|
12
12
|
status?: BuildingInspectionStatus;
|
|
13
|
+
failCount?: number;
|
|
13
14
|
requestDate?: string;
|
|
14
15
|
drawingMarker?: string;
|
|
15
16
|
cellX?: number;
|
|
@@ -35,12 +35,17 @@ tslib_1.__decorate([
|
|
|
35
35
|
tslib_1.__decorate([
|
|
36
36
|
(0, typeorm_1.Column)({
|
|
37
37
|
nullable: false,
|
|
38
|
-
comment: '상태(WAIT:
|
|
38
|
+
comment: '상태(WAIT: 작업 완료, OVERALL_WAIT: 총괄자 작업 완료, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격(검측 완료), FAIL: 불합격(조치 필요))',
|
|
39
39
|
default: building_inspection_1.BuildingInspectionStatus.WAIT
|
|
40
40
|
}),
|
|
41
41
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
42
42
|
tslib_1.__metadata("design:type", String)
|
|
43
43
|
], BuildingInspectionHistory.prototype, "status", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0, nullable: false, comment: '불합격 횟수' }),
|
|
46
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
47
|
+
tslib_1.__metadata("design:type", Number)
|
|
48
|
+
], BuildingInspectionHistory.prototype, "failCount", void 0);
|
|
44
49
|
tslib_1.__decorate([
|
|
45
50
|
(0, typeorm_1.Column)({ type: 'date', default: () => 'CURRENT_DATE', nullable: true, comment: '검측 요청일' }),
|
|
46
51
|
(0, type_graphql_1.Field)(type => String, { nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-history.js","sourceRoot":"","sources":["../../../server/service/building-inspection-history/building-inspection-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAAgH;AAChH,8DAAkI;AAClI,yDAAgD;AAChD,6CAA4C;AAC5C,oFAAyG;AACzG,6DAAsD;AACtD,oFAAwE;AACxE,8EAAyE;AACzE,8FAAsF;AACtF,8HAAuH;AAEvH,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAO7B,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;
|
|
1
|
+
{"version":3,"file":"building-inspection-history.js","sourceRoot":"","sources":["../../../server/service/building-inspection-history/building-inspection-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAAgH;AAChH,8DAAkI;AAClI,yDAAgD;AAChD,6CAA4C;AAC5C,oFAAyG;AACzG,6DAAsD;AACtD,oFAAwE;AACxE,8EAAyE;AACzE,8FAAsF;AACtF,8HAAuH;AAEvH,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAO7B,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAkHrC,CAAA;AAlHY,8DAAyB;AAG3B;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qDACC;AAGZ;IADN,IAAA,yCAAuB,GAAE;;6DACA;AAI1B;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,iCAAW,CAAC,IAAI,EAAE,CAAC;IAC1E,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACD;AASzB;IAPC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,KAAK;QACf,OAAO,EACL,yHAAyH;QAC3H,OAAO,EAAE,8CAAwB,CAAC,IAAI;KACvC,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACO;AAIjC;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CA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CAAiB;KACxB,CAAC;;yDAC+B;oCAjHtB,yBAAyB;IALrC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,iCAAiC,EAAE,CAAC,yBAAoD,EAAE,EAAE,CAAC;QAClG,yBAAyB,CAAC,UAAU;KACrC,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;GACvD,yBAAyB,CAkHrC","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\nimport { HistoryActionColumn, HistoryActionType, HistoryEntityInterface, HistoryOriginalIdColumn } from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { BuildingInspection, BuildingInspectionStatus } from '../building-inspection/building-inspection'\nimport { BuildingLevel } from '@dssp/building-complex'\nimport { ProjectType } from '../building-inspection/building-inspection'\nimport { ChecklistHistory } from '../checklist-history/checklist-history'\nimport { ProjectManagerOutput } from '../building-inspection/building-inspection-type'\nimport { BuildingInspectionDailyWorklog } from '../building-inspection-daily-worklog/building-inspection-daily-worklog'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index('ix_buildingInspection_history_0', (buildingInspectionHistory: BuildingInspectionHistory) => [\n buildingInspectionHistory.originalId\n])\n@ObjectType({ description: 'History Entity of BuildingInspection' })\nexport class BuildingInspectionHistory implements HistoryEntityInterface<BuildingInspection> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @Column({ nullable: false, comment: '프로젝트 타입', default: ProjectType.DSSP })\n @Field({ nullable: true })\n projectType?: ProjectType\n\n @Column({\n nullable: false,\n comment:\n '상태(WAIT: 작업 완료, OVERALL_WAIT: 총괄자 작업 완료, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격(검측 완료), FAIL: 불합격(조치 필요))',\n default: BuildingInspectionStatus.WAIT\n })\n @Field({ nullable: true })\n status?: BuildingInspectionStatus\n\n @Column({ type: 'int', default: 0, nullable: false, comment: '불합격 횟수' })\n @Field({ nullable: true })\n failCount?: number\n\n @Column({ type: 'date', default: () => 'CURRENT_DATE', nullable: true, comment: '검측 요청일' })\n @Field(type => String, { nullable: true })\n requestDate?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: '도면 마커' })\n @Field(type => String, { nullable: true })\n drawingMarker?: string\n\n @Column({ nullable: true, comment: 'X좌표' })\n @Field({ nullable: true })\n cellX?: number\n\n @Column({ nullable: true, comment: 'Y좌표' })\n @Field({ nullable: true })\n cellY?: number\n\n @Column({ nullable: true, comment: '메모 - DSSP: 검측 메모, DCSP: 검측 요청서 메모' })\n @Field({ nullable: true })\n memo?: string\n\n // 층 정보 (N:1 상위 테이블 참조)\n @ManyToOne(type => BuildingLevel)\n @Field(() => BuildingLevel, { nullable: true })\n buildingLevel?: BuildingLevel\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.buildingLevel)\n buildingLevelId?: string\n\n // 체크리스트 ID (원본 엔티티 ID 저장)\n @Column({ nullable: true, comment: '체크리스트 ID' })\n @Field({ nullable: true })\n checklistId?: string\n\n // 체크리스트 히스토리 스냅샷 FK (동일 트랜잭션에서 묶기 위함)\n @ManyToOne(type => ChecklistHistory, { nullable: true })\n @Field(type => ChecklistHistory, { nullable: true })\n checklistHistory?: ChecklistHistory\n\n @RelationId((buildingInspectionHistory: BuildingInspectionHistory) => buildingInspectionHistory.checklistHistory)\n checklistHistoryId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => ProjectManagerOutput, { nullable: true })\n manager?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.manager)\n managerId?: string\n\n // 일일 업무 일지가 생성되면 ID를 넣어줌 (상위 테이블 참조)\n @ManyToOne(type => BuildingInspectionDailyWorklog, { nullable: true })\n @Field(type => BuildingInspectionDailyWorklog, { nullable: true })\n worklog?: BuildingInspectionDailyWorklog\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.worklog)\n worklogId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n loggedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((buildingInspection: BuildingInspection) => buildingInspection.updater)\n updaterId?: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : 'smallint',\n enum: HistoryActionType\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -4,9 +4,35 @@ exports.ChecklistItemMutation = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const checklist_item_1 = require("./checklist-item");
|
|
7
|
+
const checklist_item_type_1 = require("./checklist-item-type");
|
|
7
8
|
let ChecklistItemMutation = class ChecklistItemMutation {
|
|
9
|
+
// AI 자동 검측 결과로 체크리스트 항목의 감리자 적합/부적합 값을 일괄 반영 (미판정 항목은 건너뜀)
|
|
10
|
+
async updateChecklistItemsAiJudgment(items, context) {
|
|
11
|
+
const { user, tx } = context.state;
|
|
12
|
+
const checklistItemRepository = tx.getRepository(checklist_item_1.ChecklistItem);
|
|
13
|
+
for (const item of items) {
|
|
14
|
+
if (!item.id || !item.supervisoryConfirmStatus)
|
|
15
|
+
continue;
|
|
16
|
+
// repository.update(부분필드)는 벌크 업데이트라 history 서브스크라이버 event.entity에 id가 없어
|
|
17
|
+
// checklist_item_histories.original_id가 null이 됨 → 전체 엔티티 로드 후 save로 갱신
|
|
18
|
+
const existingItem = await checklistItemRepository.findOneBy({ id: item.id });
|
|
19
|
+
if (!existingItem)
|
|
20
|
+
continue;
|
|
21
|
+
await checklistItemRepository.save(Object.assign(Object.assign({}, existingItem), { supervisoryConfirmStatus: item.supervisoryConfirmStatus, updater: user }));
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
8
25
|
};
|
|
9
26
|
exports.ChecklistItemMutation = ChecklistItemMutation;
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
29
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To update checklist items with AI inspection judgments' }),
|
|
30
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('items', type => [checklist_item_type_1.ChecklistItemAiJudgment])),
|
|
31
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
32
|
+
tslib_1.__metadata("design:type", Function),
|
|
33
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
34
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
35
|
+
], ChecklistItemMutation.prototype, "updateChecklistItemsAiJudgment", null);
|
|
10
36
|
exports.ChecklistItemMutation = ChecklistItemMutation = tslib_1.__decorate([
|
|
11
37
|
(0, type_graphql_1.Resolver)(checklist_item_1.ChecklistItem)
|
|
12
38
|
], ChecklistItemMutation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qDAAgD;
|
|
1
|
+
{"version":3,"file":"checklist-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qDAAgD;AAChD,+DAA+D;AA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AiJudgment } from './checklist-item-type'\n\n@Resolver(ChecklistItem)\nexport class ChecklistItemMutation {\n // AI 자동 검측 결과로 체크리스트 항목의 감리자 적합/부적합 값을 일괄 반영 (미판정 항목은 건너뜀)\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To update checklist items with AI inspection judgments' })\n async updateChecklistItemsAiJudgment(\n @Arg('items', type => [ChecklistItemAiJudgment]) items: ChecklistItemAiJudgment[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { user, tx } = context.state\n const checklistItemRepository = tx.getRepository(ChecklistItem)\n\n for (const item of items) {\n if (!item.id || !item.supervisoryConfirmStatus) continue\n // repository.update(부분필드)는 벌크 업데이트라 history 서브스크라이버 event.entity에 id가 없어\n // checklist_item_histories.original_id가 null이 됨 → 전체 엔티티 로드 후 save로 갱신\n const existingItem = await checklistItemRepository.findOneBy({ id: item.id })\n if (!existingItem) continue\n await checklistItemRepository.save({\n ...existingItem,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus,\n updater: user\n })\n }\n\n return true\n }\n}\n"]}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { ChecklistItem } from './checklist-item';
|
|
1
|
+
import { ChecklistItem, ChecklistItemConfirmStatus } from './checklist-item';
|
|
2
2
|
export declare class ChecklistItemList {
|
|
3
3
|
items: ChecklistItem[];
|
|
4
4
|
total: number;
|
|
5
5
|
}
|
|
6
|
+
export declare class ChecklistItemAiJudgment {
|
|
7
|
+
id: string;
|
|
8
|
+
supervisoryConfirmStatus?: ChecklistItemConfirmStatus;
|
|
9
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChecklistItemList = void 0;
|
|
3
|
+
exports.ChecklistItemAiJudgment = exports.ChecklistItemList = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const checklist_item_1 = require("./checklist-item");
|
|
@@ -18,4 +18,18 @@ tslib_1.__decorate([
|
|
|
18
18
|
exports.ChecklistItemList = ChecklistItemList = tslib_1.__decorate([
|
|
19
19
|
(0, type_graphql_1.ObjectType)()
|
|
20
20
|
], ChecklistItemList);
|
|
21
|
+
let ChecklistItemAiJudgment = class ChecklistItemAiJudgment {
|
|
22
|
+
};
|
|
23
|
+
exports.ChecklistItemAiJudgment = ChecklistItemAiJudgment;
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], ChecklistItemAiJudgment.prototype, "id", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, type_graphql_1.Field)(type => checklist_item_1.ChecklistItemConfirmStatus, { nullable: true, description: 'AI 판정 결과 (T: 적합, F: 부적합, null: 미판정)' }),
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
31
|
+
], ChecklistItemAiJudgment.prototype, "supervisoryConfirmStatus", void 0);
|
|
32
|
+
exports.ChecklistItemAiJudgment = ChecklistItemAiJudgment = tslib_1.__decorate([
|
|
33
|
+
(0, type_graphql_1.InputType)()
|
|
34
|
+
], ChecklistItemAiJudgment);
|
|
21
35
|
//# sourceMappingURL=checklist-item-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-type.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,
|
|
1
|
+
{"version":3,"file":"checklist-item-type.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,qDAA4E;AAGrE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAM7B,CAAA;AANY,8CAAiB;AAE5B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,8BAAa,CAAC,CAAC;;gDACT;AAGtB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;gDACN;4BALF,iBAAiB;IAD7B,IAAA,yBAAU,GAAE;GACA,iBAAiB,CAM7B;AAGM,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAMnC,CAAA;AANY,0DAAuB;AAElC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;mDACR;AAGV;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,2CAA0B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;;yEAC7D;kCAL1C,uBAAuB;IADnC,IAAA,wBAAS,GAAE;GACC,uBAAuB,CAMnC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ChecklistItem, ChecklistItemConfirmStatus } from './checklist-item'\n\n@ObjectType()\nexport class ChecklistItemList {\n @Field(type => [ChecklistItem])\n items: ChecklistItem[]\n\n @Field(type => Int)\n total: number\n}\n\n@InputType()\nexport class ChecklistItemAiJudgment {\n @Field(type => ID)\n id: string\n\n @Field(type => ChecklistItemConfirmStatus, { nullable: true, description: 'AI 판정 결과 (T: 적합, F: 부적합, null: 미판정)' })\n supervisoryConfirmStatus?: ChecklistItemConfirmStatus\n}\n"]}
|
|
@@ -12,6 +12,8 @@ export declare class ChecklistItem {
|
|
|
12
12
|
detailType?: string;
|
|
13
13
|
name?: string;
|
|
14
14
|
inspctionCriteria?: string;
|
|
15
|
+
kcsCriteria?: string;
|
|
16
|
+
siteSpecCriteria?: string;
|
|
15
17
|
constructionConfirmStatus?: ChecklistItemConfirmStatus;
|
|
16
18
|
supervisoryConfirmStatus?: ChecklistItemConfirmStatus;
|
|
17
19
|
checklistItemComments?: ChecklistItemComment[];
|
|
@@ -45,10 +45,20 @@ tslib_1.__decorate([
|
|
|
45
45
|
tslib_1.__metadata("design:type", String)
|
|
46
46
|
], ChecklistItem.prototype, "name", void 0);
|
|
47
47
|
tslib_1.__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준' }),
|
|
48
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준 (레거시 단일 필드)' }),
|
|
49
49
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
50
50
|
tslib_1.__metadata("design:type", String)
|
|
51
51
|
], ChecklistItem.prototype, "inspctionCriteria", void 0);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ nullable: true, comment: 'KCS 시방서 기준 - kcs_matches[0] 오브젝트 전체를 JSON 문자열로 저장 (file_label 등 포함)' }),
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
56
|
+
], ChecklistItem.prototype, "kcsCriteria", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '현장 시방서 기준 - site_spec_matches[0].text' }),
|
|
59
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
60
|
+
tslib_1.__metadata("design:type", String)
|
|
61
|
+
], ChecklistItem.prototype, "siteSpecCriteria", void 0);
|
|
52
62
|
tslib_1.__decorate([
|
|
53
63
|
(0, typeorm_1.Column)({ nullable: true, comment: '시공 관리자 적합 여부 (T: 적합, F: 부적합)' }),
|
|
54
64
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,yDAAgD;AAChD,sDAAkD;AAClD,6FAAuF;AAEvF,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,gDAAQ,CAAA;IACR,sDAAS,CAA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AA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDAClD;wBA9EP,aAAa;IAHzB,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAChC,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAC5H,IAAA,yBAAU,GAAE;GACA,aAAa,CA+EzB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, Int, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Checklist } from '../checklist/checklist'\nimport { ChecklistItemComment } from '../checklist-item-comment/checklist-item-comment'\n\nexport enum ChecklistItemConfirmStatus {\n T = '적합',\n F = '부적합'\n}\n\nregisterEnumType(ChecklistItemConfirmStatus, {\n name: 'ChecklistItemConfirmStatus',\n description: '적합 상태'\n})\n\n@Entity({ comment: '체크 리스트 항목' })\n@Index('ix_checklist_item_0', (checklistItem: ChecklistItem) => [checklistItem.checklist], { where: '\"deleted_at\" IS NULL' })\n@ObjectType()\nexport class ChecklistItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, comment: '시퀀스' })\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n @Column({ nullable: false, comment: '구분 (텍스트)' })\n @Field({ nullable: false })\n mainType?: string\n\n @Column({ nullable: false, comment: '상세 구분 (텍스트)' })\n @Field({ nullable: false })\n detailType?: string\n\n @Column({ nullable: true, comment: '검사 항목' })\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true, comment: '검사 기준 (레거시 단일 필드)' })\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Column({ nullable: true, comment: 'KCS 시방서 기준 - kcs_matches[0] 오브젝트 전체를 JSON 문자열로 저장 (file_label 등 포함)' })\n @Field({ nullable: true })\n kcsCriteria?: string\n\n @Column({ nullable: true, comment: '현장 시방서 기준 - site_spec_matches[0].text' })\n @Field({ nullable: true })\n siteSpecCriteria?: string\n\n @Column({ nullable: true, comment: '시공 관리자 적합 여부 (T: 적합, F: 부적합)' })\n @Field({ nullable: true })\n constructionConfirmStatus?: ChecklistItemConfirmStatus\n\n @Column({ nullable: true, comment: '감리 관리자 적합 여부 (T: 적합, F: 부적합)' })\n @Field({ nullable: true })\n supervisoryConfirmStatus?: ChecklistItemConfirmStatus\n\n // 조치 사항 정보 (하위 테이블 참조)\n @OneToMany(() => ChecklistItemComment, checklistItemComment => checklistItemComment.checklistItem)\n @Field(() => [ChecklistItemComment])\n checklistItemComments?: ChecklistItemComment[]\n\n // 체크리스트 정보 (상위 테이블 참조)\n @ManyToOne(type => Checklist)\n @Field(type => Checklist, { nullable: true })\n checklist?: Checklist\n\n @RelationId((checklistItem: ChecklistItem) => checklistItem.checklist)\n checklistId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklistItem: ChecklistItem) => checklistItem.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklistItem: ChecklistItem) => checklistItem.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChecklistItem } from './checklist-item';
|
|
2
|
+
import { ChecklistItemQuery } from './checklist-item-query';
|
|
2
3
|
import { ChecklistItemMutation } from './checklist-item-mutation';
|
|
3
4
|
export declare const entities: (typeof ChecklistItem)[];
|
|
4
|
-
export declare const resolvers: (typeof ChecklistItemMutation)[];
|
|
5
|
+
export declare const resolvers: (typeof ChecklistItemQuery | typeof ChecklistItemMutation)[];
|
|
@@ -10,6 +10,8 @@ export declare class ChecklistItemHistory implements HistoryEntityInterface<Chec
|
|
|
10
10
|
detailType?: string;
|
|
11
11
|
name?: string;
|
|
12
12
|
inspctionCriteria?: string;
|
|
13
|
+
kcsCriteria?: string;
|
|
14
|
+
siteSpecCriteria?: string;
|
|
13
15
|
constructionConfirmStatus?: ChecklistItemConfirmStatus;
|
|
14
16
|
supervisoryConfirmStatus?: ChecklistItemConfirmStatus;
|
|
15
17
|
checklistId?: string;
|
|
@@ -44,10 +44,20 @@ tslib_1.__decorate([
|
|
|
44
44
|
tslib_1.__metadata("design:type", String)
|
|
45
45
|
], ChecklistItemHistory.prototype, "name", void 0);
|
|
46
46
|
tslib_1.__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준' }),
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준 (레거시 단일 필드)' }),
|
|
48
48
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
49
|
tslib_1.__metadata("design:type", String)
|
|
50
50
|
], ChecklistItemHistory.prototype, "inspctionCriteria", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ nullable: true, comment: 'KCS 시방서 기준 - kcs_matches[0] 오브젝트 전체를 JSON 문자열로 저장' }),
|
|
53
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
54
|
+
tslib_1.__metadata("design:type", String)
|
|
55
|
+
], ChecklistItemHistory.prototype, "kcsCriteria", void 0);
|
|
56
|
+
tslib_1.__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '현장 시방서 기준 - site_spec_matches[0].text' }),
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
60
|
+
], ChecklistItemHistory.prototype, "siteSpecCriteria", void 0);
|
|
51
61
|
tslib_1.__decorate([
|
|
52
62
|
(0, typeorm_1.Column)({ nullable: true, comment: '시공 관리자 적합 여부 (T: 적합, F: 부적합)' }),
|
|
53
63
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-history.js","sourceRoot":"","sources":["../../../server/service/checklist-item-history/checklist-item-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAAgH;AAChH,8DAAkI;AAClI,yDAAgD;AAChD,6CAA4C;AAC5C,qEAA4F;AAC5F,8EAAyE;AAEzE,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAK7B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"file":"checklist-item-history.js","sourceRoot":"","sources":["../../../server/service/checklist-item-history/checklist-item-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAAgH;AAChH,8DAAkI;AAClI,yDAAgD;AAChD,6CAA4C;AAC5C,qEAA4F;AAC5F,8EAAyE;AAEzE,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAK7B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CA6FhC,CAAA;AA7FY,oDAAoB;AAGtB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;gDACC;AAGZ;IADN,IAAA,yCAAuB,GAAE;;wDACA;AAI1B;IAFC,IAAA,gBAAM,EAAC,EAA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GAClD,oBAAoB,CA6FhC","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\nimport { HistoryActionColumn, HistoryActionType, HistoryEntityInterface, HistoryOriginalIdColumn } from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { ChecklistItem, ChecklistItemConfirmStatus } from '../checklist-item/checklist-item'\nimport { ChecklistHistory } from '../checklist-history/checklist-history'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index('ix_checklist_item_history_0', (checklistItemHistory: ChecklistItemHistory) => [checklistItemHistory.originalId])\n@ObjectType({ description: 'History Entity of ChecklistItem' })\nexport class ChecklistItemHistory implements HistoryEntityInterface<ChecklistItem> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @Column({ nullable: true, comment: '시퀀스' })\n @Field({ nullable: true })\n sequence?: number\n\n @Column({ nullable: false, comment: '구분 (텍스트)' })\n @Field({ nullable: false })\n mainType?: string\n\n @Column({ nullable: false, comment: '상세 구분 (텍스트)' })\n @Field({ nullable: false })\n detailType?: string\n\n @Column({ nullable: true, comment: '검사 항목' })\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true, comment: '검사 기준 (레거시 단일 필드)' })\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Column({ nullable: true, comment: 'KCS 시방서 기준 - kcs_matches[0] 오브젝트 전체를 JSON 문자열로 저장' })\n @Field({ nullable: true })\n kcsCriteria?: string\n\n @Column({ nullable: true, comment: '현장 시방서 기준 - site_spec_matches[0].text' })\n @Field({ nullable: true })\n siteSpecCriteria?: string\n\n @Column({ nullable: true, comment: '시공 관리자 적합 여부 (T: 적합, F: 부적합)' })\n @Field({ nullable: true })\n constructionConfirmStatus?: ChecklistItemConfirmStatus\n\n @Column({ nullable: true, comment: '감리 관리자 적합 여부 (T: 적합, F: 부적합)' })\n @Field({ nullable: true })\n supervisoryConfirmStatus?: ChecklistItemConfirmStatus\n\n // 부모 체크리스트 ID (원본 엔티티 ID 저장)\n @Column({ nullable: true, comment: '체크리스트 ID' })\n @Field({ nullable: true })\n checklistId?: string\n\n // 상위 체크리스트 히스토리 스냅샷 FK (동일 트랜잭션 스냅샷 연결)\n @ManyToOne(type => ChecklistHistory, { nullable: true })\n @Field(type => ChecklistHistory, { nullable: true })\n checklistHistory?: ChecklistHistory\n\n @RelationId((checklistItemHistory: ChecklistItemHistory) => checklistItemHistory.checklistHistory)\n checklistHistoryId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n loggedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklistItemHistory: ChecklistItemHistory) => checklistItemHistory.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklistItemHistory: ChecklistItemHistory) => checklistItemHistory.updater)\n updaterId?: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? HistoryActionType : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { User } from '@things-factory/auth-base';
|
|
|
3
3
|
import { ChecklistTemplate } from './checklist-template';
|
|
4
4
|
import { ChecklistTemplateList } from './checklist-template-type';
|
|
5
5
|
export declare class ChecklistTemplateQuery {
|
|
6
|
-
checklistTemplates(params: ListParam
|
|
6
|
+
checklistTemplates(params: ListParam): Promise<ChecklistTemplateList>;
|
|
7
7
|
domain(checklistTemplate: ChecklistTemplate): Promise<Domain>;
|
|
8
8
|
updater(checklistTemplate: ChecklistTemplate): Promise<User>;
|
|
9
9
|
creator(checklistTemplate: ChecklistTemplate): Promise<User>;
|
|
@@ -8,10 +8,8 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
8
8
|
const checklist_template_1 = require("./checklist-template");
|
|
9
9
|
const checklist_template_type_1 = require("./checklist-template-type");
|
|
10
10
|
let ChecklistTemplateQuery = class ChecklistTemplateQuery {
|
|
11
|
-
async checklistTemplates(params
|
|
12
|
-
const { domain } = context.state;
|
|
11
|
+
async checklistTemplates(params) {
|
|
13
12
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
14
|
-
domain,
|
|
15
13
|
params,
|
|
16
14
|
repository: await (0, shell_1.getRepository)(checklist_template_1.ChecklistTemplate),
|
|
17
15
|
searchables: ['name']
|
|
@@ -33,9 +31,8 @@ exports.ChecklistTemplateQuery = ChecklistTemplateQuery;
|
|
|
33
31
|
tslib_1.__decorate([
|
|
34
32
|
(0, type_graphql_1.Query)(returns => checklist_template_type_1.ChecklistTemplateList, { description: 'To fetch multiple ChecklistTemplates' }),
|
|
35
33
|
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
36
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
37
34
|
tslib_1.__metadata("design:type", Function),
|
|
38
|
-
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam
|
|
35
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
39
36
|
tslib_1.__metadata("design:returntype", Promise)
|
|
40
37
|
], ChecklistTemplateQuery.prototype, "checklistTemplates", null);
|
|
41
38
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-template-query.js","sourceRoot":"","sources":["../../../server/service/checklist-template/checklist-template-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8E;AAC9E,iDAAuG;AACvG,yDAAgD;AAChD,6DAAwD;AACxD,uEAAiE;AAG1D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAE3B,AAAN,KAAK,CAAC,kBAAkB,CAAS,MAAiB
|
|
1
|
+
{"version":3,"file":"checklist-template-query.js","sourceRoot":"","sources":["../../../server/service/checklist-template/checklist-template-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8E;AAC9E,iDAAuG;AACvG,yDAAgD;AAChD,6DAAwD;AACxD,uEAAiE;AAG1D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAE3B,AAAN,KAAK,CAAC,kBAAkB,CAAS,MAAiB;QAChD,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,sCAAiB,CAAC;YAClD,WAAW,EAAE,CAAC,MAAM,CAAC;SACtB,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,iBAAoC;QACvD,OAAO,MAAM,IAAA,qBAAa,EAAC,cAAM,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAA;IAClF,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,iBAAoC;QACxD,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAA;IACjF,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,iBAAoC;QACxD,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAA;IACjF,CAAC;CACF,CAAA;AA5BY,wDAAsB;AAE3B;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,+CAAqB,EAAE,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;IACvE,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAS,iBAAS;;gEAUjD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAoB,sCAAiB;;oDAExD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAoB,sCAAiB;;qDAEzD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAoB,sCAAiB;;qDAEzD;iCA3BU,sBAAsB;IADlC,IAAA,uBAAQ,EAAC,sCAAiB,CAAC;GACf,sBAAsB,CA4BlC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistTemplate } from './checklist-template'\nimport { ChecklistTemplateList } from './checklist-template-type'\n\n@Resolver(ChecklistTemplate)\nexport class ChecklistTemplateQuery {\n @Query(returns => ChecklistTemplateList, { description: 'To fetch multiple ChecklistTemplates' })\n async checklistTemplates(@Args() params: ListParam): Promise<ChecklistTemplateList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(ChecklistTemplate),\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() checklistTemplate: ChecklistTemplate): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: checklistTemplate.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() checklistTemplate: ChecklistTemplate): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistTemplate.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklistTemplate: ChecklistTemplate): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistTemplate.creatorId })\n }\n}\n"]}
|
|
@@ -8,6 +8,9 @@ const checklist_template_item_1 = require("./checklist-template-item");
|
|
|
8
8
|
const checklist_template_item_type_1 = require("./checklist-template-item-type");
|
|
9
9
|
const checklist_template_1 = require("../checklist-template/checklist-template");
|
|
10
10
|
const spec_matching_service_1 = require("./spec-matching-service");
|
|
11
|
+
const env_1 = require("@things-factory/env");
|
|
12
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
13
|
+
const projectType = env_1.config.get('projectType', building_inspection_1.ProjectType.DSSP);
|
|
11
14
|
let ChecklistTemplateItemMutation = class ChecklistTemplateItemMutation {
|
|
12
15
|
async updateMultipleChecklistTemplateItems(patches, checklistTemplateId, context) {
|
|
13
16
|
const { domain, user, tx } = context.state;
|
|
@@ -19,8 +22,14 @@ let ChecklistTemplateItemMutation = class ChecklistTemplateItemMutation {
|
|
|
19
22
|
const result = await checklistTemplateItemRepo.save(Object.assign(Object.assign({}, patches[i]), { sequence: i, checklistTemplate, inspctionCriteria: '', criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.REQUEST, creator: user, updater: user }));
|
|
20
23
|
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
21
24
|
}
|
|
22
|
-
//
|
|
23
|
-
|
|
25
|
+
// DSSP가 아닌 경우에는 검측 정보 AI 요청
|
|
26
|
+
if (projectType !== building_inspection_1.ProjectType.DSSP) {
|
|
27
|
+
// 1. inspctionCriteria 데이터 초기화
|
|
28
|
+
const checklistTemplateItemIds = results.map(v => v.id);
|
|
29
|
+
checklistTemplateItemRepo.update({ id: (0, typeorm_1.In)(checklistTemplateItemIds) }, { inspctionCriteria: '', criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.REQUEST });
|
|
30
|
+
// 2. inspctionCriteria 비동기 업데이트 트리거 (ChecklistTemplateItem.name -> 외부 API 호출)
|
|
31
|
+
(0, spec_matching_service_1.queueUpdateInspctionCriteria)(results.map(v => v.id));
|
|
32
|
+
}
|
|
24
33
|
return results;
|
|
25
34
|
}
|
|
26
35
|
async deleteChecklistTemplateItem(id, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-template-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,uEAAwF;AACxF,iFAA2E;AAC3E,iFAA4E;AAC5E,mEAAsE;
|
|
1
|
+
{"version":3,"file":"checklist-template-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,uEAAwF;AACxF,iFAA2E;AAC3E,iFAA4E;AAC5E,mEAAsE;AACtE,6CAA4C;AAC5C,oFAAwE;AAExE,MAAM,WAAW,GAAG,YAAM,CAAC,GAAG,CAAC,aAAa,EAAE,iCAAW,CAAC,IAAI,CAAC,CAAA;AAExD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGlC,AAAN,KAAK,CAAC,oCAAoC,CACc,OAAqC,EAC/D,mBAA2B,EAChD,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAA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,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gFAM9D;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;IAExF,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iFASP;wCAtEU,6BAA6B;IADzC,IAAA,uBAAQ,EAAC,+CAAqB,CAAC;GACnB,6BAA6B,CAuEzC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { ChecklistTemplateItem, CriteriaRequestStatus } from './checklist-template-item'\nimport { ChecklistTemplateItemPatch } from './checklist-template-item-type'\nimport { ChecklistTemplate } from '../checklist-template/checklist-template'\nimport { queueUpdateInspctionCriteria } from './spec-matching-service'\nimport { config } from '@things-factory/env'\nimport { ProjectType } from '../building-inspection/building-inspection'\n\nconst projectType = config.get('projectType', ProjectType.DSSP)\n@Resolver(ChecklistTemplateItem)\nexport class ChecklistTemplateItemMutation {\n @Directive('@transaction')\n @Mutation(returns => [ChecklistTemplateItem], { description: \"To modify multiple ChecklistTemplateItems' information\" })\n async updateMultipleChecklistTemplateItems(\n @Arg('patches', type => [ChecklistTemplateItemPatch]) patches: ChecklistTemplateItemPatch[],\n @Arg('checklistTemplateId') checklistTemplateId: string,\n @Ctx() context: ResolverContext\n ): Promise<ChecklistTemplateItem[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n\n const checklistTemplateItemRepo = tx.getRepository(ChecklistTemplateItem)\n const checklistTemplate = await tx.getRepository(ChecklistTemplate).findOneBy({ id: checklistTemplateId })\n\n await checklistTemplateItemRepo.delete({ checklistTemplate: { id: checklistTemplateId } })\n\n for (let i = 0; i < patches.length; i++) {\n const result = await checklistTemplateItemRepo.save({\n ...patches[i],\n sequence: i,\n checklistTemplate,\n inspctionCriteria: '',\n criteriaRequestStatus: CriteriaRequestStatus.REQUEST,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n\n // DSSP가 아닌 경우에는 검측 정보 AI 요청\n if (projectType !== ProjectType.DSSP) {\n // 1. inspctionCriteria 데이터 초기화\n const checklistTemplateItemIds = results.map(v => v.id)\n checklistTemplateItemRepo.update(\n { id: In(checklistTemplateItemIds) },\n { inspctionCriteria: '', criteriaRequestStatus: CriteriaRequestStatus.REQUEST }\n )\n\n // 2. inspctionCriteria 비동기 업데이트 트리거 (ChecklistTemplateItem.name -> 외부 API 호출)\n queueUpdateInspctionCriteria(results.map(v => v.id))\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete ChecklistTemplateItem' })\n async deleteChecklistTemplateItem(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ChecklistTemplateItem).delete({ id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple ChecklistTemplateItems' })\n async deleteChecklistTemplateItems(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ChecklistTemplateItem).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|