@dssp/supervision 1.0.0-y.0 → 1.0.0
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/package.json +14 -12
- package/things-factory.config.js +7 -1
- package/dist-client/bootstrap.d.ts +0 -1
- package/dist-client/bootstrap.js +0 -2
- package/dist-client/bootstrap.js.map +0 -1
- package/dist-client/graphql/building-inspection.d.ts +0 -1
- package/dist-client/graphql/building-inspection.js +0 -100
- package/dist-client/graphql/building-inspection.js.map +0 -1
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +0 -2
- package/dist-client/index.js.map +0 -1
- package/dist-client/pages/action-plan/action-plan-importer.d.ts +0 -10
- package/dist-client/pages/action-plan/action-plan-importer.js +0 -101
- package/dist-client/pages/action-plan/action-plan-importer.js.map +0 -1
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +0 -63
- package/dist-client/pages/action-plan/action-plan-list-page.js +0 -323
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +0 -22
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +0 -169
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +0 -57
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +0 -825
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +0 -27
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +0 -341
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +0 -29
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +0 -315
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -36
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +0 -368
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +0 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +0 -90
- package/dist-client/pages/building-inspection/building-inspection-list.js +0 -904
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +0 -1
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +0 -4
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +0 -233
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +0 -1
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +0 -27
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +0 -542
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +0 -1
- package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +0 -15
- package/dist-client/pages/building-inspection/component/image-preview-popup.js +0 -351
- package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +0 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +0 -20
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +0 -432
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +0 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +0 -30
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +0 -479
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +0 -1
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +0 -27
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +0 -416
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +0 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +0 -8
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +0 -93
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +0 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +0 -3
- package/dist-client/pages/building-inspection/inspection-create-popup.js +0 -840
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +0 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +0 -60
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +0 -1132
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +0 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +0 -2
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +0 -740
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +0 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +0 -19
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +0 -205
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +0 -1
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +0 -1
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +0 -304
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +0 -1
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +0 -15
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +0 -430
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +0 -1
- package/dist-client/pages/checklist/attachment-list-popup.d.ts +0 -3
- package/dist-client/pages/checklist/attachment-list-popup.js +0 -493
- package/dist-client/pages/checklist/attachment-list-popup.js.map +0 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +0 -15
- package/dist-client/pages/checklist/checklist-view.js +0 -738
- package/dist-client/pages/checklist/checklist-view.js.map +0 -1
- package/dist-client/pages/checklist/comment-list-popup.d.ts +0 -1
- package/dist-client/pages/checklist/comment-list-popup.js +0 -368
- package/dist-client/pages/checklist/comment-list-popup.js.map +0 -1
- package/dist-client/pages/checklist/file-preview-popup.d.ts +0 -1
- package/dist-client/pages/checklist/file-preview-popup.js +0 -77
- package/dist-client/pages/checklist/file-preview-popup.js.map +0 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +0 -50
- package/dist-client/pages/checklist/inspection-info-popup.js +0 -684
- package/dist-client/pages/checklist/inspection-info-popup.js.map +0 -1
- package/dist-client/pages/checklist/inspection-tab-popup.d.ts +0 -18
- package/dist-client/pages/checklist/inspection-tab-popup.js +0 -196
- package/dist-client/pages/checklist/inspection-tab-popup.js.map +0 -1
- package/dist-client/pages/checklist-template/checklist-template-item.d.ts +0 -2
- package/dist-client/pages/checklist-template/checklist-template-item.js +0 -253
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +0 -1
- package/dist-client/pages/checklist-template/checklist-template-list.d.ts +0 -53
- package/dist-client/pages/checklist-template/checklist-template-list.js +0 -349
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +0 -1
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +0 -55
- package/dist-client/pages/checklist-template/checklist-type-management.js +0 -250
- package/dist-client/pages/checklist-template/checklist-type-management.js.map +0 -1
- package/dist-client/pages/issue/issue-importer.d.ts +0 -10
- package/dist-client/pages/issue/issue-importer.js +0 -101
- package/dist-client/pages/issue/issue-importer.js.map +0 -1
- package/dist-client/pages/issue/issue-list-page.d.ts +0 -63
- package/dist-client/pages/issue/issue-list-page.js +0 -323
- package/dist-client/pages/issue/issue-list-page.js.map +0 -1
- package/dist-client/pages/project-report/project-report-importer.d.ts +0 -10
- package/dist-client/pages/project-report/project-report-importer.js +0 -101
- package/dist-client/pages/project-report/project-report-importer.js.map +0 -1
- package/dist-client/pages/project-report/project-report-list-page.d.ts +0 -63
- package/dist-client/pages/project-report/project-report-list-page.js +0 -323
- package/dist-client/pages/project-report/project-report-list-page.js.map +0 -1
- package/dist-client/pages/supervisor/supervisor-importer.d.ts +0 -10
- package/dist-client/pages/supervisor/supervisor-importer.js +0 -101
- package/dist-client/pages/supervisor/supervisor-importer.js.map +0 -1
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +0 -63
- package/dist-client/pages/supervisor/supervisor-list-page.js +0 -323
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +0 -1
- package/dist-client/route.d.ts +0 -1
- package/dist-client/route.js +0 -32
- package/dist-client/route.js.map +0 -1
- package/dist-client/stt/speech-to-text.d.ts +0 -36
- package/dist-client/stt/speech-to-text.js +0 -89
- package/dist-client/stt/speech-to-text.js.map +0 -1
- package/dist-client/stt/stt-utils.d.ts +0 -28
- package/dist-client/stt/stt-utils.js +0 -146
- package/dist-client/stt/stt-utils.js.map +0 -1
- package/dist-client/tsconfig.tsbuildinfo +0 -1
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/controllers/index.js +0 -1
- package/dist-server/controllers/index.js.map +0 -1
- package/dist-server/index.d.ts +0 -3
- package/dist-server/index.js +0 -7
- package/dist-server/index.js.map +0 -1
- package/dist-server/middlewares/index.d.ts +0 -1
- package/dist-server/middlewares/index.js +0 -7
- package/dist-server/middlewares/index.js.map +0 -1
- package/dist-server/migrations/index.d.ts +0 -1
- package/dist-server/migrations/index.js +0 -12
- package/dist-server/migrations/index.js.map +0 -1
- package/dist-server/routes.d.ts +0 -0
- package/dist-server/routes.js +0 -25
- package/dist-server/routes.js.map +0 -1
- package/dist-server/service/action-plan/action-plan-mutation.d.ts +0 -10
- package/dist-server/service/action-plan/action-plan-mutation.js +0 -168
- package/dist-server/service/action-plan/action-plan-mutation.js.map +0 -1
- package/dist-server/service/action-plan/action-plan-query.d.ts +0 -12
- package/dist-server/service/action-plan/action-plan-query.js +0 -97
- package/dist-server/service/action-plan/action-plan-query.js.map +0 -1
- package/dist-server/service/action-plan/action-plan-type.d.ts +0 -23
- package/dist-server/service/action-plan/action-plan-type.js +0 -86
- package/dist-server/service/action-plan/action-plan-type.js.map +0 -1
- package/dist-server/service/action-plan/action-plan.d.ts +0 -27
- package/dist-server/service/action-plan/action-plan.js +0 -116
- package/dist-server/service/action-plan/action-plan.js.map +0 -1
- package/dist-server/service/action-plan/index.d.ts +0 -5
- package/dist-server/service/action-plan/index.js +0 -9
- package/dist-server/service/action-plan/index.js.map +0 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +0 -9
- package/dist-server/service/building-inspection/building-inspection-mutation.js +0 -370
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +0 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +0 -20
- package/dist-server/service/building-inspection/building-inspection-query.js +0 -277
- package/dist-server/service/building-inspection/building-inspection-query.js.map +0 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +0 -80
- package/dist-server/service/building-inspection/building-inspection-type.js +0 -296
- package/dist-server/service/building-inspection/building-inspection-type.js.map +0 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +0 -41
- package/dist-server/service/building-inspection/building-inspection.js +0 -168
- package/dist-server/service/building-inspection/building-inspection.js.map +0 -1
- package/dist-server/service/building-inspection/index.d.ts +0 -7
- package/dist-server/service/building-inspection/index.js +0 -19
- package/dist-server/service/building-inspection/index.js.map +0 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +0 -6
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +0 -56
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +0 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +0 -16
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +0 -171
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +0 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +0 -23
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +0 -90
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +0 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +0 -33
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +0 -132
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +0 -1
- package/dist-server/service/building-inspection-daily-worklog/index.d.ts +0 -5
- package/dist-server/service/building-inspection-daily-worklog/index.js +0 -9
- package/dist-server/service/building-inspection-daily-worklog/index.js.map +0 -1
- package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +0 -16
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js +0 -120
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +0 -1
- package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +0 -5
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js +0 -21
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +0 -1
- package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +0 -34
- package/dist-server/service/building-inspection-history/building-inspection-history.js +0 -157
- package/dist-server/service/building-inspection-history/building-inspection-history.js.map +0 -1
- package/dist-server/service/building-inspection-history/event-subscriber.d.ts +0 -7
- package/dist-server/service/building-inspection-history/event-subscriber.js +0 -21
- package/dist-server/service/building-inspection-history/event-subscriber.js.map +0 -1
- package/dist-server/service/building-inspection-history/index.d.ts +0 -6
- package/dist-server/service/building-inspection-history/index.js +0 -10
- package/dist-server/service/building-inspection-history/index.js.map +0 -1
- package/dist-server/service/checklist/checklist-mutation.d.ts +0 -3
- package/dist-server/service/checklist/checklist-mutation.js +0 -30
- package/dist-server/service/checklist/checklist-mutation.js.map +0 -1
- package/dist-server/service/checklist/checklist-query.d.ts +0 -21
- package/dist-server/service/checklist/checklist-query.js +0 -177
- package/dist-server/service/checklist/checklist-query.js.map +0 -1
- package/dist-server/service/checklist/checklist-type.d.ts +0 -5
- package/dist-server/service/checklist/checklist-type.js +0 -21
- package/dist-server/service/checklist/checklist-type.js.map +0 -1
- package/dist-server/service/checklist/checklist.d.ts +0 -66
- package/dist-server/service/checklist/checklist.js +0 -259
- package/dist-server/service/checklist/checklist.js.map +0 -1
- package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist/event-subscriber.js +0 -21
- package/dist-server/service/checklist/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist/index.d.ts +0 -5
- package/dist-server/service/checklist/index.js +0 -9
- package/dist-server/service/checklist/index.js.map +0 -1
- package/dist-server/service/checklist-history/checklist-history-query.d.ts +0 -11
- package/dist-server/service/checklist-history/checklist-history-query.js +0 -77
- package/dist-server/service/checklist-history/checklist-history-query.js.map +0 -1
- package/dist-server/service/checklist-history/checklist-history-type.d.ts +0 -5
- package/dist-server/service/checklist-history/checklist-history-type.js +0 -21
- package/dist-server/service/checklist-history/checklist-history-type.js.map +0 -1
- package/dist-server/service/checklist-history/checklist-history.d.ts +0 -50
- package/dist-server/service/checklist-history/checklist-history.js +0 -239
- package/dist-server/service/checklist-history/checklist-history.js.map +0 -1
- package/dist-server/service/checklist-history/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist-history/event-subscriber.js +0 -21
- package/dist-server/service/checklist-history/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist-history/index.d.ts +0 -6
- package/dist-server/service/checklist-history/index.js +0 -10
- package/dist-server/service/checklist-history/index.js.map +0 -1
- package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +0 -2
- package/dist-server/service/checklist-item/checklist-item-mutation.js +0 -13
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +0 -1
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +0 -18
- package/dist-server/service/checklist-item/checklist-item-query.js +0 -138
- package/dist-server/service/checklist-item/checklist-item-query.js.map +0 -1
- package/dist-server/service/checklist-item/checklist-item-type.d.ts +0 -5
- package/dist-server/service/checklist-item/checklist-item-type.js +0 -21
- package/dist-server/service/checklist-item/checklist-item-type.js.map +0 -1
- package/dist-server/service/checklist-item/checklist-item.d.ts +0 -27
- package/dist-server/service/checklist-item/checklist-item.js +0 -114
- package/dist-server/service/checklist-item/checklist-item.js.map +0 -1
- package/dist-server/service/checklist-item/index.d.ts +0 -4
- package/dist-server/service/checklist-item/index.js +0 -9
- package/dist-server/service/checklist-item/index.js.map +0 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.d.ts +0 -16
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +0 -83
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +0 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +0 -8
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +0 -114
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +0 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.d.ts +0 -7
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +0 -49
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +0 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.d.ts +0 -14
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +0 -53
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +0 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment.d.ts +0 -12
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js +0 -57
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +0 -1
- package/dist-server/service/checklist-item-comment/index.d.ts +0 -5
- package/dist-server/service/checklist-item-comment/index.js +0 -10
- package/dist-server/service/checklist-item-comment/index.js.map +0 -1
- package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +0 -16
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js +0 -123
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +0 -1
- package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +0 -5
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js +0 -21
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +0 -1
- package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +0 -25
- package/dist-server/service/checklist-item-history/checklist-item-history.js +0 -123
- package/dist-server/service/checklist-item-history/checklist-item-history.js.map +0 -1
- package/dist-server/service/checklist-item-history/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist-item-history/event-subscriber.js +0 -21
- package/dist-server/service/checklist-item-history/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist-item-history/index.d.ts +0 -6
- package/dist-server/service/checklist-item-history/index.js +0 -10
- package/dist-server/service/checklist-item-history/index.js.map +0 -1
- package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +0 -6
- package/dist-server/service/checklist-template/checklist-template-mutation.js +0 -64
- package/dist-server/service/checklist-template/checklist-template-mutation.js.map +0 -1
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +0 -10
- package/dist-server/service/checklist-template/checklist-template-query.js +0 -65
- package/dist-server/service/checklist-template/checklist-template-query.js.map +0 -1
- package/dist-server/service/checklist-template/checklist-template-type.d.ts +0 -10
- package/dist-server/service/checklist-template/checklist-template-type.js +0 -39
- package/dist-server/service/checklist-template/checklist-template-type.js.map +0 -1
- package/dist-server/service/checklist-template/checklist-template.d.ts +0 -17
- package/dist-server/service/checklist-template/checklist-template.js +0 -78
- package/dist-server/service/checklist-template/checklist-template.js.map +0 -1
- package/dist-server/service/checklist-template/index.d.ts +0 -5
- package/dist-server/service/checklist-template/index.js +0 -9
- package/dist-server/service/checklist-template/index.js.map +0 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +0 -7
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +0 -71
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +0 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +0 -11
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js +0 -78
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +0 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +0 -18
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +0 -65
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +0 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +0 -25
- package/dist-server/service/checklist-template-item/checklist-template-item.js +0 -101
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +0 -1
- package/dist-server/service/checklist-template-item/index.d.ts +0 -5
- package/dist-server/service/checklist-template-item/index.js +0 -9
- package/dist-server/service/checklist-template-item/index.js.map +0 -1
- package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +0 -2
- package/dist-server/service/checklist-template-item/spec-matching-service.js +0 -50
- package/dist-server/service/checklist-template-item/spec-matching-service.js.map +0 -1
- package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +0 -6
- package/dist-server/service/checklist-type/checklist-type-mutation.js +0 -64
- package/dist-server/service/checklist-type/checklist-type-mutation.js.map +0 -1
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +0 -10
- package/dist-server/service/checklist-type/checklist-type-query.js +0 -65
- package/dist-server/service/checklist-type/checklist-type-query.js.map +0 -1
- package/dist-server/service/checklist-type/checklist-type-type.d.ts +0 -11
- package/dist-server/service/checklist-type/checklist-type-type.js +0 -43
- package/dist-server/service/checklist-type/checklist-type-type.js.map +0 -1
- package/dist-server/service/checklist-type/checklist-type.d.ts +0 -19
- package/dist-server/service/checklist-type/checklist-type.js +0 -78
- package/dist-server/service/checklist-type/checklist-type.js.map +0 -1
- package/dist-server/service/checklist-type/index.d.ts +0 -5
- package/dist-server/service/checklist-type/index.js +0 -9
- package/dist-server/service/checklist-type/index.js.map +0 -1
- package/dist-server/service/index.d.ts +0 -18
- package/dist-server/service/index.js +0 -78
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/service/issue/index.d.ts +0 -5
- package/dist-server/service/issue/index.js +0 -9
- package/dist-server/service/issue/index.js.map +0 -1
- package/dist-server/service/issue/issue-mutation.d.ts +0 -10
- package/dist-server/service/issue/issue-mutation.js +0 -168
- package/dist-server/service/issue/issue-mutation.js.map +0 -1
- package/dist-server/service/issue/issue-query.d.ts +0 -12
- package/dist-server/service/issue/issue-query.js +0 -97
- package/dist-server/service/issue/issue-query.js.map +0 -1
- package/dist-server/service/issue/issue-type.d.ts +0 -23
- package/dist-server/service/issue/issue-type.js +0 -86
- package/dist-server/service/issue/issue-type.js.map +0 -1
- package/dist-server/service/issue/issue.d.ts +0 -26
- package/dist-server/service/issue/issue.js +0 -111
- package/dist-server/service/issue/issue.js.map +0 -1
- package/dist-server/service/project-report/index.d.ts +0 -5
- package/dist-server/service/project-report/index.js +0 -9
- package/dist-server/service/project-report/index.js.map +0 -1
- package/dist-server/service/project-report/project-report-mutation.d.ts +0 -10
- package/dist-server/service/project-report/project-report-mutation.js +0 -168
- package/dist-server/service/project-report/project-report-mutation.js.map +0 -1
- package/dist-server/service/project-report/project-report-query.d.ts +0 -12
- package/dist-server/service/project-report/project-report-query.js +0 -97
- package/dist-server/service/project-report/project-report-query.js.map +0 -1
- package/dist-server/service/project-report/project-report-type.d.ts +0 -23
- package/dist-server/service/project-report/project-report-type.js +0 -86
- package/dist-server/service/project-report/project-report-type.js.map +0 -1
- package/dist-server/service/project-report/project-report.d.ts +0 -28
- package/dist-server/service/project-report/project-report.js +0 -121
- package/dist-server/service/project-report/project-report.js.map +0 -1
- package/dist-server/service/supervisor/index.d.ts +0 -5
- package/dist-server/service/supervisor/index.js +0 -9
- package/dist-server/service/supervisor/index.js.map +0 -1
- package/dist-server/service/supervisor/supervisor-mutation.d.ts +0 -10
- package/dist-server/service/supervisor/supervisor-mutation.js +0 -168
- package/dist-server/service/supervisor/supervisor-mutation.js.map +0 -1
- package/dist-server/service/supervisor/supervisor-query.d.ts +0 -12
- package/dist-server/service/supervisor/supervisor-query.js +0 -97
- package/dist-server/service/supervisor/supervisor-query.js.map +0 -1
- package/dist-server/service/supervisor/supervisor-type.d.ts +0 -23
- package/dist-server/service/supervisor/supervisor-type.js +0 -86
- package/dist-server/service/supervisor/supervisor-type.js.map +0 -1
- package/dist-server/service/supervisor/supervisor.d.ts +0 -28
- package/dist-server/service/supervisor/supervisor.js +0 -121
- package/dist-server/service/supervisor/supervisor.js.map +0 -1
- package/dist-server/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-plan.js","sourceRoot":"","sources":["../../../server/service/action-plan/action-plan.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,0CAAsC;AAEtC,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAA,+BAAgB,EAAC,gBAAgB,EAAE;IACjC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,mCAAmC;CACjD,CAAC,CAAA;AAQK,IAAM,UAAU,GAAhB,MAAM,UAAU;CAoEtB,CAAA;AApEY,gCAAU;AAGZ;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;0CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;;4CACzC;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;AAIb;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AA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CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CACzC;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CACzC;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACxB;qBAnEP,UAAU;IANtB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE;QAC3F,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;GACxC,UAAU,CAoEtB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Issue } from '../issue/issue'\n\nexport enum ActionPlanStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(ActionPlanStatus, {\n name: 'ActionPlanStatus',\n description: 'state enumeration of a actionPlan'\n})\n\n@Entity()\n@Index('ix_action_plan_0', (actionPlan: ActionPlan) => [actionPlan.domain, actionPlan.name], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: 'Entity for ActionPlan' })\nexport class ActionPlan {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((actionPlan: ActionPlan) => actionPlan.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActionPlanStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: string\n\n @Field(() => Issue)\n @ManyToOne(() => Issue, issue => issue.actionPlans)\n issue: Issue\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n content: 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((actionPlan: ActionPlan) => actionPlan.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((actionPlan: ActionPlan) => actionPlan.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ActionPlan } from './action-plan';
|
|
2
|
-
import { ActionPlanQuery } from './action-plan-query';
|
|
3
|
-
import { ActionPlanMutation } from './action-plan-mutation';
|
|
4
|
-
export declare const entities: (typeof ActionPlan)[];
|
|
5
|
-
export declare const resolvers: (typeof ActionPlanQuery | typeof ActionPlanMutation)[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolvers = exports.entities = void 0;
|
|
4
|
-
const action_plan_1 = require("./action-plan");
|
|
5
|
-
const action_plan_query_1 = require("./action-plan-query");
|
|
6
|
-
const action_plan_mutation_1 = require("./action-plan-mutation");
|
|
7
|
-
exports.entities = [action_plan_1.ActionPlan];
|
|
8
|
-
exports.resolvers = [action_plan_query_1.ActionPlanQuery, action_plan_mutation_1.ActionPlanMutation];
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/action-plan/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAC1C,2DAAqD;AACrD,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,wBAAU,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,CAAC,mCAAe,EAAE,yCAAkB,CAAC,CAAA","sourcesContent":["import { ActionPlan } from './action-plan'\nimport { ActionPlanQuery } from './action-plan-query'\nimport { ActionPlanMutation } from './action-plan-mutation'\n\nexport const entities = [ActionPlan]\nexport const resolvers = [ActionPlanQuery, ActionPlanMutation]\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BuildingInspection } from './building-inspection';
|
|
2
|
-
import { NewBuildingInspection, UpdateBuildingInspection, UpdateBuildingInspectionSubmitType } from './building-inspection-type';
|
|
3
|
-
export declare class BuildingInspectionMutation {
|
|
4
|
-
createBuildingInspection(patch: NewBuildingInspection, context: ResolverContext): Promise<BuildingInspection>;
|
|
5
|
-
updateBuildingInspectionChecklist(buildingInspection: UpdateBuildingInspectionSubmitType, context: ResolverContext): Promise<boolean>;
|
|
6
|
-
updateBuildingInspection(patch: UpdateBuildingInspection, context: ResolverContext): Promise<BuildingInspection>;
|
|
7
|
-
deleteBuildingInspections(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
8
|
-
applyToAllBuildingInspection(buildingInspectionId: string, context: ResolverContext): Promise<boolean>;
|
|
9
|
-
}
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BuildingInspectionMutation = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const type_graphql_1 = require("type-graphql");
|
|
6
|
-
const typeorm_1 = require("typeorm");
|
|
7
|
-
const building_inspection_1 = require("./building-inspection");
|
|
8
|
-
const building_inspection_type_1 = require("./building-inspection-type");
|
|
9
|
-
const building_inspection_2 = require("./building-inspection");
|
|
10
|
-
const checklist_1 = require("../checklist/checklist");
|
|
11
|
-
const checklist_item_1 = require("../checklist-item/checklist-item");
|
|
12
|
-
const shell_1 = require("@things-factory/shell");
|
|
13
|
-
const building_complex_1 = require("@dssp/building-complex");
|
|
14
|
-
const env_1 = require("@things-factory/env");
|
|
15
|
-
const checklist_2 = require("../checklist/checklist");
|
|
16
|
-
const projectType = env_1.config.get('projectType', building_inspection_1.ProjectType.DSSP);
|
|
17
|
-
let BuildingInspectionMutation = class BuildingInspectionMutation {
|
|
18
|
-
async createBuildingInspection(patch, context) {
|
|
19
|
-
const { user, tx } = context.state;
|
|
20
|
-
const { buildingLevelId, checklist, checklistItem, cellX, cellY, managerId } = patch;
|
|
21
|
-
const buildingInspectionRepository = tx.getRepository(building_inspection_1.BuildingInspection);
|
|
22
|
-
const checklistRepository = tx.getRepository(checklist_1.Checklist);
|
|
23
|
-
const checklistItemRepository = tx.getRepository(checklist_item_1.ChecklistItem);
|
|
24
|
-
// 1. 벨리데이션
|
|
25
|
-
if (!checklist.constructionType)
|
|
26
|
-
throw new Error('공종 타입이 없습니다.');
|
|
27
|
-
if (!checklist.constructionDetailType)
|
|
28
|
-
throw new Error('상세 공종 타입이 없습니다.');
|
|
29
|
-
if (!checklist.name)
|
|
30
|
-
throw new Error('체크리스트 이름이 없습니다.');
|
|
31
|
-
if (checklistItem.length === 0)
|
|
32
|
-
throw new Error('체크리스트 아이템이 없습니다.');
|
|
33
|
-
if (projectType === building_inspection_1.ProjectType.DSSP) {
|
|
34
|
-
if (!cellX || !cellY)
|
|
35
|
-
throw new Error('셀 좌표가 없습니다.');
|
|
36
|
-
if (!managerId)
|
|
37
|
-
throw new Error('담당자가 없습니다.');
|
|
38
|
-
if (!buildingLevelId)
|
|
39
|
-
throw new Error('층 아이디가 없습니다.');
|
|
40
|
-
if (!checklist.location)
|
|
41
|
-
throw new Error('위치가 없습니다.');
|
|
42
|
-
}
|
|
43
|
-
else if (projectType === building_inspection_1.ProjectType.DCSP) {
|
|
44
|
-
if (!checklist.inspectionDrawingType)
|
|
45
|
-
throw new Error('검측 도면 타입이 없습니다.');
|
|
46
|
-
if (checklist.inspectionParts.length === 0)
|
|
47
|
-
throw new Error('검측 부위가 없습니다.');
|
|
48
|
-
if (!buildingLevelId)
|
|
49
|
-
throw new Error('층 아이디가 없습니다.');
|
|
50
|
-
if (!checklist.location)
|
|
51
|
-
throw new Error('위치가 없습니다.');
|
|
52
|
-
}
|
|
53
|
-
// 2. checklist 저장
|
|
54
|
-
const checklistDocumentNo = await getRecentDocumentNoByBuildingLevelId(buildingLevelId, checklist_1.DocumentNoType.CHECKLIST, tx);
|
|
55
|
-
const inspectionRequestDocumentNo = checklistDocumentNo.replace(`검측 제${checklist_1.DocumentNoType.CHECKLIST}-`, `검측 제${checklist_1.DocumentNoType.INSPECTION_REQUEST}-`);
|
|
56
|
-
const inspectionResultDocumentNo = checklistDocumentNo.replace(`검측 제${checklist_1.DocumentNoType.CHECKLIST}-`, `검측 제${checklist_1.DocumentNoType.INSPECTION_RESULT}-`);
|
|
57
|
-
const savedChecklist = await checklistRepository.save(Object.assign(Object.assign({}, checklist), { projectType, checklistReferenceType: checklist_2.ChecklistReferenceType.INSPECTION, documentNo: checklistDocumentNo, inspectionRequestDocumentNo,
|
|
58
|
-
inspectionResultDocumentNo, creator: user, updater: user }));
|
|
59
|
-
// 3. checklistItem 저장
|
|
60
|
-
const checklistItems = checklistItem.map((item, idx) => ({
|
|
61
|
-
name: item.name,
|
|
62
|
-
mainType: item.mainType,
|
|
63
|
-
detailType: item.detailType,
|
|
64
|
-
inspctionCriteria: item.inspctionCriteria,
|
|
65
|
-
sequence: idx,
|
|
66
|
-
checklist: savedChecklist,
|
|
67
|
-
creator: user,
|
|
68
|
-
updater: user
|
|
69
|
-
}));
|
|
70
|
-
await checklistItemRepository.save(checklistItems);
|
|
71
|
-
// 4. buildingInspection 저장
|
|
72
|
-
const result = await buildingInspectionRepository.save({
|
|
73
|
-
status: building_inspection_2.BuildingInspectionStatus.WAIT,
|
|
74
|
-
buildingLevel: { id: buildingLevelId },
|
|
75
|
-
checklist: savedChecklist,
|
|
76
|
-
projectType,
|
|
77
|
-
manager: managerId ? { id: managerId } : null,
|
|
78
|
-
cellX,
|
|
79
|
-
cellY,
|
|
80
|
-
creator: user,
|
|
81
|
-
updater: user
|
|
82
|
-
});
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
// 검측 상태 변경 & 체크리스트 갱신
|
|
86
|
-
async updateBuildingInspectionChecklist(buildingInspection, context) {
|
|
87
|
-
const { user, tx } = context.state;
|
|
88
|
-
const { id: buildingInspectionId, memo, checklist, checklistItem } = buildingInspection;
|
|
89
|
-
const buildingInspectionRepo = tx.getRepository(building_inspection_1.BuildingInspection);
|
|
90
|
-
const checklistRepo = tx.getRepository(checklist_1.Checklist);
|
|
91
|
-
const checklistItemRepo = tx.getRepository(checklist_item_1.ChecklistItem);
|
|
92
|
-
const oldBuildingInspection = await buildingInspectionRepo.findOneBy({ id: buildingInspectionId });
|
|
93
|
-
const status = oldBuildingInspection.status;
|
|
94
|
-
const isConstructor = status == building_inspection_2.BuildingInspectionStatus.WAIT ||
|
|
95
|
-
status == building_inspection_2.BuildingInspectionStatus.OVERALL_WAIT ||
|
|
96
|
-
status == building_inspection_2.BuildingInspectionStatus.FAIL;
|
|
97
|
-
let inspectionStatus = null;
|
|
98
|
-
let signedUserType = null; // 싸인을 한 유저 타입
|
|
99
|
-
let inspectionRequestData = {};
|
|
100
|
-
let inspectionResultData = {};
|
|
101
|
-
// 1. 벨리데이션
|
|
102
|
-
if (!buildingInspectionId)
|
|
103
|
-
throw new Error('검측 아이디가 없습니다.');
|
|
104
|
-
if (!status)
|
|
105
|
-
throw new Error('검측 상태가 없습니다.');
|
|
106
|
-
if (status == building_inspection_2.BuildingInspectionStatus.PASS)
|
|
107
|
-
throw new Error('검측 상태가 수정할 수 있는 상태가 아닙니다.');
|
|
108
|
-
if (isConstructor) {
|
|
109
|
-
// 시공자 타입별 밸리데이션
|
|
110
|
-
if (checklistItem.length !== checklistItem.filter(v => v.constructionConfirmStatus).length) {
|
|
111
|
-
throw new Error('아이템을 모두 체크해야 합니다.');
|
|
112
|
-
}
|
|
113
|
-
if (status == building_inspection_2.BuildingInspectionStatus.OVERALL_WAIT && !checklist.overallConstructorSignature) {
|
|
114
|
-
throw new Error('총괄 시공책임자 사인이 없습니다.');
|
|
115
|
-
}
|
|
116
|
-
if (status == building_inspection_2.BuildingInspectionStatus.WAIT && !checklist.taskConstructorSignature) {
|
|
117
|
-
throw new Error('공종별 시공관리자 사인이 없습니다.');
|
|
118
|
-
}
|
|
119
|
-
// 시공자 상태 데이터
|
|
120
|
-
const isPassed = checklistItem.length === checklistItem.filter(v => v.constructionConfirmStatus === 'T').length;
|
|
121
|
-
if (!isPassed) {
|
|
122
|
-
// 1. 검측이 불햡격 = 상태는 불합격으로, 시공자 싸인은 모두 초기화
|
|
123
|
-
inspectionStatus = building_inspection_2.BuildingInspectionStatus.FAIL;
|
|
124
|
-
checklist.overallConstructorSignature = null;
|
|
125
|
-
checklist.taskConstructorSignature = null;
|
|
126
|
-
}
|
|
127
|
-
else if (isPassed && (status === building_inspection_2.BuildingInspectionStatus.WAIT || status === building_inspection_2.BuildingInspectionStatus.FAIL)) {
|
|
128
|
-
// 2. 검측이 합격이면서 공종 시공자 스탭 = 상태는 총괄 시공자 스탭으로
|
|
129
|
-
inspectionStatus = building_inspection_2.BuildingInspectionStatus.OVERALL_WAIT;
|
|
130
|
-
signedUserType = 'taskConstructor';
|
|
131
|
-
}
|
|
132
|
-
else if (isPassed && status === building_inspection_2.BuildingInspectionStatus.OVERALL_WAIT) {
|
|
133
|
-
// 3. 검측이 합격이면서 총괄 시공자 스탭 = 상태는 공종 감리자 스탭으로, 감리자 싸인은 모두 초기화
|
|
134
|
-
inspectionStatus = building_inspection_2.BuildingInspectionStatus.REQUEST;
|
|
135
|
-
checklist.overallSupervisorySignature = null;
|
|
136
|
-
checklist.taskSupervisorySignature = null;
|
|
137
|
-
signedUserType = 'overallConstructor';
|
|
138
|
-
inspectionRequestData = {
|
|
139
|
-
inspectionRequestMemo: checklist.inspectionRequestMemo,
|
|
140
|
-
inspectionRequestUpdatedAt: new Date()
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// 감리자 타입별 밸리데이션
|
|
146
|
-
if (checklistItem.length !== checklistItem.filter(v => v.supervisoryConfirmStatus).length) {
|
|
147
|
-
throw new Error('아이템을 모두 체크해야 합니다.');
|
|
148
|
-
}
|
|
149
|
-
if (status == building_inspection_2.BuildingInspectionStatus.OVERALL_REQUEST && !checklist.overallSupervisorySignature) {
|
|
150
|
-
throw new Error('총괄 감리책임자 사인이 없습니다.');
|
|
151
|
-
}
|
|
152
|
-
if (status == building_inspection_2.BuildingInspectionStatus.REQUEST && !checklist.taskSupervisorySignature) {
|
|
153
|
-
throw new Error('공종별 감리 책임자 사인이 없습니다.');
|
|
154
|
-
}
|
|
155
|
-
// 감리자 상태 데이터
|
|
156
|
-
const isPassed = checklistItem.length === checklistItem.filter(v => v.supervisoryConfirmStatus === 'T').length;
|
|
157
|
-
if (!isPassed) {
|
|
158
|
-
// 1. 검측이 불햡격 = 상태는 불합격으로, 시공자 싸인은 모두 초기화
|
|
159
|
-
inspectionStatus = building_inspection_2.BuildingInspectionStatus.FAIL;
|
|
160
|
-
checklist.overallConstructorSignature = null;
|
|
161
|
-
checklist.taskConstructorSignature = null;
|
|
162
|
-
}
|
|
163
|
-
else if (isPassed && status === building_inspection_2.BuildingInspectionStatus.REQUEST) {
|
|
164
|
-
// 2. 검측이 합격이면서 공종 감리자 스탭 = 상태는 총괄 감리자 스탭으로
|
|
165
|
-
inspectionStatus = building_inspection_2.BuildingInspectionStatus.OVERALL_REQUEST;
|
|
166
|
-
signedUserType = 'taskSupervisory';
|
|
167
|
-
}
|
|
168
|
-
else if (isPassed && status === building_inspection_2.BuildingInspectionStatus.OVERALL_REQUEST) {
|
|
169
|
-
// 3. 검측이 합격이면서 총괄 감리자 스탭 = 상태는 합격으로
|
|
170
|
-
inspectionStatus = building_inspection_2.BuildingInspectionStatus.PASS;
|
|
171
|
-
signedUserType = 'overallSupervisory';
|
|
172
|
-
inspectionResultData = {
|
|
173
|
-
inspectionResultStatus: checklist.inspectionResultStatus,
|
|
174
|
-
inspectionResultMemo: checklist.inspectionResultMemo,
|
|
175
|
-
inspectionResultType: checklist.inspectionResultType,
|
|
176
|
-
inspectionResultUpdatedAt: new Date()
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
// 2. buildingInspection 저장
|
|
181
|
-
await buildingInspectionRepo.save(Object.assign(Object.assign({}, oldBuildingInspection), { status: inspectionStatus, memo: memo, updater: user }));
|
|
182
|
-
// 3. checklist 저장
|
|
183
|
-
const oldChecklist = await checklistRepo.findOneBy({ id: checklist.id });
|
|
184
|
-
const inspectionDateField = isConstructor ? 'constructionInspectionDate' : 'supervisorInspectionDate';
|
|
185
|
-
const signedUser = signedUserType ? { [signedUserType]: user } : {};
|
|
186
|
-
await checklistRepo.save(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, oldChecklist), { [inspectionDateField]: new Date(), overallConstructorSignature: checklist.overallConstructorSignature, taskConstructorSignature: checklist.taskConstructorSignature, overallSupervisorySignature: checklist.overallSupervisorySignature, taskSupervisorySignature: checklist.taskSupervisorySignature }), signedUser), inspectionRequestData), inspectionResultData), { updater: user }));
|
|
187
|
-
// 4. checklistItem 저장
|
|
188
|
-
for (let item of checklistItem) {
|
|
189
|
-
const confirmStatusField = isConstructor ? 'constructionConfirmStatus' : 'supervisoryConfirmStatus';
|
|
190
|
-
await checklistItemRepo.update(item.id, {
|
|
191
|
-
[confirmStatusField]: item[confirmStatusField],
|
|
192
|
-
updater: user
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
return true;
|
|
196
|
-
}
|
|
197
|
-
async updateBuildingInspection(patch, context) {
|
|
198
|
-
const { user, tx } = context.state;
|
|
199
|
-
const buildingInspectionRepo = tx.getRepository(building_inspection_1.BuildingInspection);
|
|
200
|
-
// 벨리데이션
|
|
201
|
-
if (!patch.id)
|
|
202
|
-
throw new Error('검측 아이디가 없습니다.');
|
|
203
|
-
const buildingInspection = await buildingInspectionRepo.findOneBy({ id: patch.id });
|
|
204
|
-
// 완료 상태인 검측데이터면 삭제 못함
|
|
205
|
-
if (buildingInspection.status === building_inspection_2.BuildingInspectionStatus.PASS) {
|
|
206
|
-
throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.');
|
|
207
|
-
}
|
|
208
|
-
const result = await buildingInspectionRepo.save(Object.assign(Object.assign(Object.assign({}, buildingInspection), patch), { updater: user }));
|
|
209
|
-
return result;
|
|
210
|
-
}
|
|
211
|
-
async deleteBuildingInspections(ids, context) {
|
|
212
|
-
const { tx } = context.state;
|
|
213
|
-
const buildingInspectionRepository = tx.getRepository(building_inspection_1.BuildingInspection);
|
|
214
|
-
const checklistRepository = tx.getRepository(checklist_1.Checklist);
|
|
215
|
-
const checklistItemRepository = tx.getRepository(checklist_item_1.ChecklistItem);
|
|
216
|
-
const buildingInspections = await buildingInspectionRepository.createQueryBuilder('bi').whereInIds(ids).getMany();
|
|
217
|
-
// 완료 상태인 검측데이터가 한개라도 있으면 삭제 못함
|
|
218
|
-
if (buildingInspections.filter(bi => bi.status === building_inspection_2.BuildingInspectionStatus.PASS).length > 0) {
|
|
219
|
-
throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.');
|
|
220
|
-
}
|
|
221
|
-
// 검측 데이터 제거
|
|
222
|
-
await buildingInspectionRepository.softDelete({
|
|
223
|
-
id: (0, typeorm_1.In)(ids)
|
|
224
|
-
});
|
|
225
|
-
// 검측 데이터의 체크 리스트 제거
|
|
226
|
-
const checklistIds = buildingInspections.map(bi => bi.checklistId);
|
|
227
|
-
await checklistRepository.softDelete({
|
|
228
|
-
id: (0, typeorm_1.In)(checklistIds)
|
|
229
|
-
});
|
|
230
|
-
// 검측 데이터의 체크 리스트 아이템 제거
|
|
231
|
-
await checklistItemRepository
|
|
232
|
-
.createQueryBuilder()
|
|
233
|
-
.softDelete()
|
|
234
|
-
.where('checklist_id IN (:...checklistIds)', { checklistIds })
|
|
235
|
-
.execute();
|
|
236
|
-
return true;
|
|
237
|
-
}
|
|
238
|
-
async applyToAllBuildingInspection(buildingInspectionId, context) {
|
|
239
|
-
const { user, tx } = context.state;
|
|
240
|
-
const buildingInspectionRepository = tx.getRepository(building_inspection_1.BuildingInspection);
|
|
241
|
-
const buildingInspection = await buildingInspectionRepository.findOne({
|
|
242
|
-
where: { id: buildingInspectionId },
|
|
243
|
-
relations: ['buildingLevel', 'buildingLevel.building', 'checklist', 'checklist.checklistItems']
|
|
244
|
-
});
|
|
245
|
-
const checklist = buildingInspection.checklist;
|
|
246
|
-
const checklistItems = checklist.checklistItems;
|
|
247
|
-
const buildingLevels = await (0, shell_1.getRepository)(building_complex_1.BuildingLevel).find({
|
|
248
|
-
where: { building: { id: buildingInspection.buildingLevel.building.id } }
|
|
249
|
-
});
|
|
250
|
-
// 해당 검측 정보가 속한 동의 모든 층에 같은 검측 데이터 등록
|
|
251
|
-
for (let buildingLevel of buildingLevels) {
|
|
252
|
-
// 같은 셀에 이미 검측 정보가 있으면 패스
|
|
253
|
-
const existInspection = await buildingInspectionRepository.findOneBy({
|
|
254
|
-
buildingLevel: { id: buildingLevel.id },
|
|
255
|
-
cellX: buildingInspection.cellX,
|
|
256
|
-
cellY: buildingInspection.cellY
|
|
257
|
-
});
|
|
258
|
-
if (existInspection)
|
|
259
|
-
continue;
|
|
260
|
-
// 새로운 체크리스트 데이터
|
|
261
|
-
const newChecklist = {
|
|
262
|
-
name: checklist.name,
|
|
263
|
-
location: `${buildingInspection.buildingLevel.building.name} ${buildingLevel.floor}층`,
|
|
264
|
-
constructionType: checklist.constructionType,
|
|
265
|
-
constructionDetailType: checklist.constructionDetailType,
|
|
266
|
-
inspectionDrawingType: checklist.inspectionDrawingType,
|
|
267
|
-
inspectionParts: checklist.inspectionParts
|
|
268
|
-
};
|
|
269
|
-
// 새로운 체크리스트 아이템 데이터
|
|
270
|
-
const newChecklistItems = checklistItems.map(item => ({
|
|
271
|
-
name: item.name,
|
|
272
|
-
mainType: item.mainType,
|
|
273
|
-
detailType: item.detailType,
|
|
274
|
-
inspctionCriteria: item.inspctionCriteria
|
|
275
|
-
}));
|
|
276
|
-
await this.createBuildingInspection({
|
|
277
|
-
buildingLevelId: buildingLevel.id,
|
|
278
|
-
checklist: newChecklist,
|
|
279
|
-
checklistItem: newChecklistItems,
|
|
280
|
-
cellX: buildingInspection.cellX,
|
|
281
|
-
cellY: buildingInspection.cellY,
|
|
282
|
-
managerId: buildingInspection.managerId
|
|
283
|
-
}, context);
|
|
284
|
-
}
|
|
285
|
-
return true;
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
exports.BuildingInspectionMutation = BuildingInspectionMutation;
|
|
289
|
-
tslib_1.__decorate([
|
|
290
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
291
|
-
(0, type_graphql_1.Mutation)(returns => building_inspection_1.BuildingInspection, { description: 'To create Building Inspection information' }),
|
|
292
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('patch')),
|
|
293
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
294
|
-
tslib_1.__metadata("design:type", Function),
|
|
295
|
-
tslib_1.__metadata("design:paramtypes", [building_inspection_type_1.NewBuildingInspection, Object]),
|
|
296
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
297
|
-
], BuildingInspectionMutation.prototype, "createBuildingInspection", null);
|
|
298
|
-
tslib_1.__decorate([
|
|
299
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
300
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To create Building Inspection And Checklist information' }),
|
|
301
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('buildingInspection')),
|
|
302
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
303
|
-
tslib_1.__metadata("design:type", Function),
|
|
304
|
-
tslib_1.__metadata("design:paramtypes", [building_inspection_type_1.UpdateBuildingInspectionSubmitType, Object]),
|
|
305
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
306
|
-
], BuildingInspectionMutation.prototype, "updateBuildingInspectionChecklist", null);
|
|
307
|
-
tslib_1.__decorate([
|
|
308
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
309
|
-
(0, type_graphql_1.Mutation)(returns => building_inspection_1.BuildingInspection, { description: 'To update Building Inspection information' }),
|
|
310
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('patch')),
|
|
311
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
312
|
-
tslib_1.__metadata("design:type", Function),
|
|
313
|
-
tslib_1.__metadata("design:paramtypes", [building_inspection_type_1.UpdateBuildingInspection, Object]),
|
|
314
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
315
|
-
], BuildingInspectionMutation.prototype, "updateBuildingInspection", null);
|
|
316
|
-
tslib_1.__decorate([
|
|
317
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
318
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple Checklists' }),
|
|
319
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
320
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
321
|
-
tslib_1.__metadata("design:type", Function),
|
|
322
|
-
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
323
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
324
|
-
], BuildingInspectionMutation.prototype, "deleteBuildingInspections", null);
|
|
325
|
-
tslib_1.__decorate([
|
|
326
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
327
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To apply to all building inspection' }),
|
|
328
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('buildingInspectionId')),
|
|
329
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
330
|
-
tslib_1.__metadata("design:type", Function),
|
|
331
|
-
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
332
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
333
|
-
], BuildingInspectionMutation.prototype, "applyToAllBuildingInspection", null);
|
|
334
|
-
exports.BuildingInspectionMutation = BuildingInspectionMutation = tslib_1.__decorate([
|
|
335
|
-
(0, type_graphql_1.Resolver)(building_inspection_1.BuildingInspection)
|
|
336
|
-
], BuildingInspectionMutation);
|
|
337
|
-
async function getRecentDocumentNoByBuildingLevelId(buildingLevelId, type, tx) {
|
|
338
|
-
const project = await tx
|
|
339
|
-
.createQueryBuilder()
|
|
340
|
-
.select('p.documentNaming', 'documentNaming')
|
|
341
|
-
.addSelect('bc.id', 'buildingComplexId')
|
|
342
|
-
.from('projects', 'p')
|
|
343
|
-
.innerJoin('building_complexes', 'bc', 'bc.id = p.building_complex_id')
|
|
344
|
-
.innerJoin('buildings', 'b', 'b.building_complex_id = bc.id')
|
|
345
|
-
.innerJoin('building_levels', 'bl', 'bl.building_id = b.id')
|
|
346
|
-
.where('bl.id = :buildingLevelId', { buildingLevelId })
|
|
347
|
-
.getRawOne();
|
|
348
|
-
const latestChecklist = await tx
|
|
349
|
-
.getRepository(checklist_1.Checklist)
|
|
350
|
-
.createQueryBuilder('c')
|
|
351
|
-
.innerJoin('c.buildingInspection', 'bi')
|
|
352
|
-
.innerJoin('bi.buildingLevel', 'bl')
|
|
353
|
-
.innerJoin('bl.building', 'b')
|
|
354
|
-
.where('b.building_complex_id = :buildingComplexId', { buildingComplexId: project.buildingComplexId })
|
|
355
|
-
.andWhere('c.document_no LIKE :pattern', { pattern: `${project.documentNaming} 검측 제${type}-%` })
|
|
356
|
-
.orderBy('c.created_at', 'DESC')
|
|
357
|
-
.getOne();
|
|
358
|
-
// 4. 시퀀스 번호 생성 (5자리)
|
|
359
|
-
let sequence = '00001';
|
|
360
|
-
if (latestChecklist) {
|
|
361
|
-
const documentNoPattern = new RegExp(`${project.documentNaming} 검측 제${type}-(\\d{5})호`);
|
|
362
|
-
const match = latestChecklist.documentNo.match(documentNoPattern);
|
|
363
|
-
if (match) {
|
|
364
|
-
sequence = (Number(match[1]) + 1).toString().padStart(5, '0');
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
// 5. 최종 문서 번호 생성
|
|
368
|
-
return `${project.documentNaming} 검측 제${type}-${sequence}호`;
|
|
369
|
-
}
|
|
370
|
-
//# sourceMappingURL=building-inspection-mutation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-mutation.js","sourceRoot":"","sources":["../../../server/service/building-inspection/building-inspection-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,+DAAuE;AACvE,yEAAgI;AAChI,+DAAgE;AAChE,sDAAkE;AAClE,qEAAgE;AAChE,iDAAqD;AACrD,6DAAsD;AACtD,6CAA4C;AAC5C,sDAA+D;AAE/D,MAAM,W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iB,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;SACrG,QAAQ,CAAC,6BAA6B,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,cAAc,QAAQ,IAAI,IAAI,EAAE,CAAC;SAC/F,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;SAC/B,MAAM,EAAE,CAAA;IAEX,qBAAqB;IACrB,IAAI,QAAQ,GAAG,OAAO,CAAA;IACtB,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,QAAQ,IAAI,YAAY,CAAC,CAAA;QACvF,MAAM,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACjE,IAAI,KAAK,EAAE,CAAC;YACV,QAAQ,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;QAC/D,CAAC;IACH,CAAC;IAED,iBAAiB;IACjB,OAAO,GAAG,OAAO,CAAC,cAAc,QAAQ,IAAI,IAAI,QAAQ,GAAG,CAAA;AAC7D,CAAC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { BuildingInspection, ProjectType } from './building-inspection'\nimport { NewBuildingInspection, UpdateBuildingInspection, UpdateBuildingInspectionSubmitType } from './building-inspection-type'\nimport { BuildingInspectionStatus } from './building-inspection'\nimport { Checklist, DocumentNoType } from '../checklist/checklist'\nimport { ChecklistItem } from '../checklist-item/checklist-item'\nimport { getRepository } from '@things-factory/shell'\nimport { BuildingLevel } from '@dssp/building-complex'\nimport { config } from '@things-factory/env'\nimport { ChecklistReferenceType } from '../checklist/checklist'\n\nconst projectType = config.get('projectType', ProjectType.DSSP)\n\n@Resolver(BuildingInspection)\nexport class BuildingInspectionMutation {\n @Directive('@transaction')\n @Mutation(returns => BuildingInspection, { description: 'To create Building Inspection information' })\n async createBuildingInspection(\n @Arg('patch') patch: NewBuildingInspection,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspection> {\n const { user, tx } = context.state\n const { buildingLevelId, checklist, checklistItem, cellX, cellY, managerId } = patch\n const buildingInspectionRepository = tx.getRepository(BuildingInspection)\n const checklistRepository = tx.getRepository(Checklist)\n const checklistItemRepository = tx.getRepository(ChecklistItem)\n\n // 1. 벨리데이션\n if (!checklist.constructionType) throw new Error('공종 타입이 없습니다.')\n if (!checklist.constructionDetailType) throw new Error('상세 공종 타입이 없습니다.')\n if (!checklist.name) throw new Error('체크리스트 이름이 없습니다.')\n if (checklistItem.length === 0) throw new Error('체크리스트 아이템이 없습니다.')\n\n if (projectType === ProjectType.DSSP) {\n if (!cellX || !cellY) throw new Error('셀 좌표가 없습니다.')\n if (!managerId) throw new Error('담당자가 없습니다.')\n if (!buildingLevelId) throw new Error('층 아이디가 없습니다.')\n if (!checklist.location) throw new Error('위치가 없습니다.')\n } else if (projectType === ProjectType.DCSP) {\n if (!checklist.inspectionDrawingType) throw new Error('검측 도면 타입이 없습니다.')\n if (checklist.inspectionParts.length === 0) throw new Error('검측 부위가 없습니다.')\n if (!buildingLevelId) throw new Error('층 아이디가 없습니다.')\n if (!checklist.location) throw new Error('위치가 없습니다.')\n }\n\n // 2. checklist 저장\n const checklistDocumentNo = await getRecentDocumentNoByBuildingLevelId(buildingLevelId, DocumentNoType.CHECKLIST, tx)\n const inspectionRequestDocumentNo = checklistDocumentNo.replace(\n `검측 제${DocumentNoType.CHECKLIST}-`,\n `검측 제${DocumentNoType.INSPECTION_REQUEST}-`\n )\n const inspectionResultDocumentNo = checklistDocumentNo.replace(\n `검측 제${DocumentNoType.CHECKLIST}-`,\n `검측 제${DocumentNoType.INSPECTION_RESULT}-`\n )\n\n const savedChecklist = await checklistRepository.save({\n ...checklist,\n projectType,\n checklistReferenceType: ChecklistReferenceType.INSPECTION,\n documentNo: checklistDocumentNo,\n inspectionRequestDocumentNo,\n inspectionResultDocumentNo,\n creator: user,\n updater: user\n })\n\n // 3. checklistItem 저장\n const checklistItems = checklistItem.map((item, idx) => ({\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria,\n sequence: idx,\n checklist: savedChecklist,\n creator: user,\n updater: user\n }))\n await checklistItemRepository.save(checklistItems)\n\n // 4. buildingInspection 저장\n const result = await buildingInspectionRepository.save({\n status: BuildingInspectionStatus.WAIT,\n buildingLevel: { id: buildingLevelId },\n checklist: savedChecklist,\n projectType,\n manager: managerId ? { id: managerId } : null,\n cellX,\n cellY,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n // 검측 상태 변경 & 체크리스트 갱신\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To create Building Inspection And Checklist information' })\n async updateBuildingInspectionChecklist(\n @Arg('buildingInspection') buildingInspection: UpdateBuildingInspectionSubmitType,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { user, tx } = context.state\n const { id: buildingInspectionId, memo, checklist, checklistItem } = buildingInspection\n const buildingInspectionRepo = tx.getRepository(BuildingInspection)\n const checklistRepo = tx.getRepository(Checklist)\n const checklistItemRepo = tx.getRepository(ChecklistItem)\n const oldBuildingInspection = await buildingInspectionRepo.findOneBy({ id: buildingInspectionId })\n const status = oldBuildingInspection.status\n const isConstructor: boolean =\n status == BuildingInspectionStatus.WAIT ||\n status == BuildingInspectionStatus.OVERALL_WAIT ||\n status == BuildingInspectionStatus.FAIL\n let inspectionStatus = null\n let signedUserType = null // 싸인을 한 유저 타입\n let inspectionRequestData = {}\n let inspectionResultData = {}\n\n // 1. 벨리데이션\n if (!buildingInspectionId) throw new Error('검측 아이디가 없습니다.')\n if (!status) throw new Error('검측 상태가 없습니다.')\n if (status == BuildingInspectionStatus.PASS) throw new Error('검측 상태가 수정할 수 있는 상태가 아닙니다.')\n\n if (isConstructor) {\n // 시공자 타입별 밸리데이션\n if (checklistItem.length !== checklistItem.filter(v => v.constructionConfirmStatus).length) {\n throw new Error('아이템을 모두 체크해야 합니다.')\n }\n if (status == BuildingInspectionStatus.OVERALL_WAIT && !checklist.overallConstructorSignature) {\n throw new Error('총괄 시공책임자 사인이 없습니다.')\n }\n if (status == BuildingInspectionStatus.WAIT && !checklist.taskConstructorSignature) {\n throw new Error('공종별 시공관리자 사인이 없습니다.')\n }\n\n // 시공자 상태 데이터\n const isPassed = checklistItem.length === checklistItem.filter(v => v.constructionConfirmStatus === 'T').length\n\n if (!isPassed) {\n // 1. 검측이 불햡격 = 상태는 불합격으로, 시공자 싸인은 모두 초기화\n inspectionStatus = BuildingInspectionStatus.FAIL\n checklist.overallConstructorSignature = null\n checklist.taskConstructorSignature = null\n } else if (isPassed && (status === BuildingInspectionStatus.WAIT || status === BuildingInspectionStatus.FAIL)) {\n // 2. 검측이 합격이면서 공종 시공자 스탭 = 상태는 총괄 시공자 스탭으로\n inspectionStatus = BuildingInspectionStatus.OVERALL_WAIT\n signedUserType = 'taskConstructor'\n } else if (isPassed && status === BuildingInspectionStatus.OVERALL_WAIT) {\n // 3. 검측이 합격이면서 총괄 시공자 스탭 = 상태는 공종 감리자 스탭으로, 감리자 싸인은 모두 초기화\n inspectionStatus = BuildingInspectionStatus.REQUEST\n checklist.overallSupervisorySignature = null\n checklist.taskSupervisorySignature = null\n signedUserType = 'overallConstructor'\n inspectionRequestData = {\n inspectionRequestMemo: checklist.inspectionRequestMemo,\n inspectionRequestUpdatedAt: new Date()\n }\n }\n } else {\n // 감리자 타입별 밸리데이션\n if (checklistItem.length !== checklistItem.filter(v => v.supervisoryConfirmStatus).length) {\n throw new Error('아이템을 모두 체크해야 합니다.')\n }\n if (status == BuildingInspectionStatus.OVERALL_REQUEST && !checklist.overallSupervisorySignature) {\n throw new Error('총괄 감리책임자 사인이 없습니다.')\n }\n if (status == BuildingInspectionStatus.REQUEST && !checklist.taskSupervisorySignature) {\n throw new Error('공종별 감리 책임자 사인이 없습니다.')\n }\n\n // 감리자 상태 데이터\n const isPassed = checklistItem.length === checklistItem.filter(v => v.supervisoryConfirmStatus === 'T').length\n if (!isPassed) {\n // 1. 검측이 불햡격 = 상태는 불합격으로, 시공자 싸인은 모두 초기화\n inspectionStatus = BuildingInspectionStatus.FAIL\n checklist.overallConstructorSignature = null\n checklist.taskConstructorSignature = null\n } else if (isPassed && status === BuildingInspectionStatus.REQUEST) {\n // 2. 검측이 합격이면서 공종 감리자 스탭 = 상태는 총괄 감리자 스탭으로\n inspectionStatus = BuildingInspectionStatus.OVERALL_REQUEST\n signedUserType = 'taskSupervisory'\n } else if (isPassed && status === BuildingInspectionStatus.OVERALL_REQUEST) {\n // 3. 검측이 합격이면서 총괄 감리자 스탭 = 상태는 합격으로\n inspectionStatus = BuildingInspectionStatus.PASS\n signedUserType = 'overallSupervisory'\n inspectionResultData = {\n inspectionResultStatus: checklist.inspectionResultStatus,\n inspectionResultMemo: checklist.inspectionResultMemo,\n inspectionResultType: checklist.inspectionResultType,\n inspectionResultUpdatedAt: new Date()\n }\n }\n }\n\n // 2. buildingInspection 저장\n await buildingInspectionRepo.save({\n ...oldBuildingInspection,\n status: inspectionStatus,\n memo: memo,\n updater: user\n })\n\n // 3. checklist 저장\n const oldChecklist = await checklistRepo.findOneBy({ id: checklist.id })\n const inspectionDateField = isConstructor ? 'constructionInspectionDate' : 'supervisorInspectionDate'\n const signedUser = signedUserType ? { [signedUserType]: user } : {}\n\n await checklistRepo.save({\n ...oldChecklist,\n [inspectionDateField]: new Date(),\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature,\n ...signedUser,\n ...inspectionRequestData,\n ...inspectionResultData,\n updater: user\n })\n\n // 4. checklistItem 저장\n for (let item of checklistItem) {\n const confirmStatusField = isConstructor ? 'constructionConfirmStatus' : 'supervisoryConfirmStatus'\n await checklistItemRepo.update(item.id, {\n [confirmStatusField]: item[confirmStatusField],\n updater: user\n })\n }\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => BuildingInspection, { description: 'To update Building Inspection information' })\n async updateBuildingInspection(\n @Arg('patch') patch: UpdateBuildingInspection,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspection> {\n const { user, tx } = context.state\n const buildingInspectionRepo = tx.getRepository(BuildingInspection)\n\n // 벨리데이션\n if (!patch.id) throw new Error('검측 아이디가 없습니다.')\n\n const buildingInspection = await buildingInspectionRepo.findOneBy({ id: patch.id })\n\n // 완료 상태인 검측데이터면 삭제 못함\n if (buildingInspection.status === BuildingInspectionStatus.PASS) {\n throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.')\n }\n\n const result = await buildingInspectionRepo.save({\n ...buildingInspection,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Checklists' })\n async deleteBuildingInspections(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n const buildingInspectionRepository = tx.getRepository(BuildingInspection)\n const checklistRepository = tx.getRepository(Checklist)\n const checklistItemRepository = tx.getRepository(ChecklistItem)\n\n const buildingInspections = await buildingInspectionRepository.createQueryBuilder('bi').whereInIds(ids).getMany()\n\n // 완료 상태인 검측데이터가 한개라도 있으면 삭제 못함\n if (buildingInspections.filter(bi => bi.status === BuildingInspectionStatus.PASS).length > 0) {\n throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.')\n }\n\n // 검측 데이터 제거\n await buildingInspectionRepository.softDelete({\n id: In(ids)\n })\n\n // 검측 데이터의 체크 리스트 제거\n const checklistIds = buildingInspections.map(bi => bi.checklistId)\n await checklistRepository.softDelete({\n id: In(checklistIds)\n })\n\n // 검측 데이터의 체크 리스트 아이템 제거\n await checklistItemRepository\n .createQueryBuilder()\n .softDelete()\n .where('checklist_id IN (:...checklistIds)', { checklistIds })\n .execute()\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To apply to all building inspection' })\n async applyToAllBuildingInspection(\n @Arg('buildingInspectionId') buildingInspectionId: string,\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { user, tx } = context.state\n const buildingInspectionRepository = tx.getRepository(BuildingInspection)\n\n const buildingInspection = await buildingInspectionRepository.findOne({\n where: { id: buildingInspectionId },\n relations: ['buildingLevel', 'buildingLevel.building', 'checklist', 'checklist.checklistItems']\n })\n\n const checklist = buildingInspection.checklist\n const checklistItems = checklist.checklistItems\n const buildingLevels = await getRepository(BuildingLevel).find({\n where: { building: { id: buildingInspection.buildingLevel.building.id } }\n })\n\n // 해당 검측 정보가 속한 동의 모든 층에 같은 검측 데이터 등록\n for (let buildingLevel of buildingLevels) {\n // 같은 셀에 이미 검측 정보가 있으면 패스\n const existInspection = await buildingInspectionRepository.findOneBy({\n buildingLevel: { id: buildingLevel.id },\n cellX: buildingInspection.cellX,\n cellY: buildingInspection.cellY\n })\n if (existInspection) continue\n\n // 새로운 체크리스트 데이터\n const newChecklist = {\n name: checklist.name,\n location: `${buildingInspection.buildingLevel.building.name} ${buildingLevel.floor}층`,\n constructionType: checklist.constructionType,\n constructionDetailType: checklist.constructionDetailType,\n inspectionDrawingType: checklist.inspectionDrawingType,\n inspectionParts: checklist.inspectionParts\n }\n\n // 새로운 체크리스트 아이템 데이터\n const newChecklistItems = checklistItems.map(item => ({\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }))\n\n await this.createBuildingInspection(\n {\n buildingLevelId: buildingLevel.id,\n checklist: newChecklist,\n checklistItem: newChecklistItems,\n cellX: buildingInspection.cellX,\n cellY: buildingInspection.cellY,\n managerId: buildingInspection.managerId\n },\n context\n )\n }\n\n return true\n }\n}\n\nasync function getRecentDocumentNoByBuildingLevelId(buildingLevelId: string, type: DocumentNoType, tx: any): Promise<string> {\n const project = await tx\n .createQueryBuilder()\n .select('p.documentNaming', 'documentNaming')\n .addSelect('bc.id', 'buildingComplexId')\n .from('projects', 'p')\n .innerJoin('building_complexes', 'bc', 'bc.id = p.building_complex_id')\n .innerJoin('buildings', 'b', 'b.building_complex_id = bc.id')\n .innerJoin('building_levels', 'bl', 'bl.building_id = b.id')\n .where('bl.id = :buildingLevelId', { buildingLevelId })\n .getRawOne()\n\n const latestChecklist = await tx\n .getRepository(Checklist)\n .createQueryBuilder('c')\n .innerJoin('c.buildingInspection', 'bi')\n .innerJoin('bi.buildingLevel', 'bl')\n .innerJoin('bl.building', 'b')\n .where('b.building_complex_id = :buildingComplexId', { buildingComplexId: project.buildingComplexId })\n .andWhere('c.document_no LIKE :pattern', { pattern: `${project.documentNaming} 검측 제${type}-%` })\n .orderBy('c.created_at', 'DESC')\n .getOne()\n\n // 4. 시퀀스 번호 생성 (5자리)\n let sequence = '00001'\n if (latestChecklist) {\n const documentNoPattern = new RegExp(`${project.documentNaming} 검측 제${type}-(\\\\d{5})호`)\n const match = latestChecklist.documentNo.match(documentNoPattern)\n if (match) {\n sequence = (Number(match[1]) + 1).toString().padStart(5, '0')\n }\n }\n\n // 5. 최종 문서 번호 생성\n return `${project.documentNaming} 검측 제${type}-${sequence}호`\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Attachment } from '@things-factory/attachment-base';
|
|
2
|
-
import { ListParam } from '@things-factory/shell';
|
|
3
|
-
import { BuildingInspection } from './building-inspection';
|
|
4
|
-
import { BuildingInspectionList, BuildingInspectionsOfBuildingLevel, BuildingInspectionsOfProject, BuildingInspectionSummary, ProjectManagerOutput } from './building-inspection-type';
|
|
5
|
-
import { BuildingLevel } from '@dssp/building-complex';
|
|
6
|
-
import { Checklist } from '../checklist/checklist';
|
|
7
|
-
export declare class BuildingInspectionQuery {
|
|
8
|
-
buildingInspection(id: string, context: ResolverContext): Promise<BuildingInspection>;
|
|
9
|
-
buildingInspections(params: ListParam, context: ResolverContext): Promise<BuildingInspectionList>;
|
|
10
|
-
buildingInspectionsOfProject(params: BuildingInspectionsOfProject, context: ResolverContext): Promise<BuildingInspectionList>;
|
|
11
|
-
buildingInspectionsOfBuildingLevel(params: BuildingInspectionsOfBuildingLevel, context: ResolverContext): Promise<BuildingInspectionList>;
|
|
12
|
-
buildingInspectionSummaryOfBuildingLevel(buildingLevelId: string, context: ResolverContext): Promise<BuildingInspectionSummary>;
|
|
13
|
-
buildingInspectionDateSummaryOfLevelAndPeriod(buildingLevelId: string, startDate: string, endDate: string, context: ResolverContext): Promise<BuildingInspectionSummary[]>;
|
|
14
|
-
buildingInspectionSummary(buildingLevel: BuildingLevel): Promise<BuildingInspectionSummary>;
|
|
15
|
-
buildingInspectionSummaryOfProject(projectId: string, context: ResolverContext): Promise<BuildingInspectionSummary>;
|
|
16
|
-
checklist(buildingInspection: BuildingInspection): Promise<Checklist>;
|
|
17
|
-
buildingLevel(buildingInspection: BuildingInspection): Promise<BuildingLevel>;
|
|
18
|
-
attachments(buildingInspection: BuildingInspection): Promise<Attachment[] | undefined>;
|
|
19
|
-
manager(buildingInspection: BuildingInspection): Promise<ProjectManagerOutput>;
|
|
20
|
-
}
|