@dssp/supervision 1.0.0-alpha.27 → 1.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/pages/action-plan/action-plan-importer.d.ts +1 -1
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +2 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +36 -11
- 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 +6 -2
- package/dist-client/pages/building-inspection/building-inspection-list.js +113 -13
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +9 -4
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +122 -45
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -1
- package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +39 -17
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +2 -2
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +1 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -1
- package/dist-client/pages/checklist/inspection-tab-popup.d.ts +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.d.ts +1 -1
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +1 -1
- package/dist-client/pages/issue/issue-importer.d.ts +1 -1
- package/dist-client/pages/issue/issue-list-page.d.ts +1 -1
- package/dist-client/pages/project-report/project-report-importer.d.ts +1 -1
- package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -1
- package/dist-client/pages/supervisor/supervisor-importer.d.ts +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +3 -0
- package/dist-server/service/building-inspection/building-inspection.js +10 -0
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +3 -5
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +29 -71
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +2 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +52 -2
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +10 -3
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +35 -8
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +2 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +6 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { User } from '@things-factory/auth-base';
|
|
2
2
|
import { BuildingLevel } from '@dssp/building-complex';
|
|
3
3
|
import { Checklist } from '../checklist/checklist';
|
|
4
|
+
import { BuildingInspectionDailyWorklog } from '../building-inspection-daily-worklog/building-inspection-daily-worklog';
|
|
4
5
|
export declare enum BuildingInspectionStatus {
|
|
5
6
|
WAIT = "WAIT",
|
|
6
7
|
OVERALL_WAIT = "OVERALL_WAIT",
|
|
@@ -28,6 +29,8 @@ export declare class BuildingInspection {
|
|
|
28
29
|
checklistId?: string;
|
|
29
30
|
manager?: User;
|
|
30
31
|
managerId?: string;
|
|
32
|
+
worklog?: BuildingInspectionDailyWorklog;
|
|
33
|
+
worklogId?: string;
|
|
31
34
|
createdAt?: Date;
|
|
32
35
|
updatedAt?: Date;
|
|
33
36
|
deletedAt?: Date;
|
|
@@ -8,6 +8,7 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
8
8
|
const building_complex_1 = require("@dssp/building-complex");
|
|
9
9
|
const checklist_1 = require("../checklist/checklist");
|
|
10
10
|
const building_inspection_type_1 = require("./building-inspection-type");
|
|
11
|
+
const building_inspection_daily_worklog_1 = require("../building-inspection-daily-worklog/building-inspection-daily-worklog");
|
|
11
12
|
var BuildingInspectionStatus;
|
|
12
13
|
(function (BuildingInspectionStatus) {
|
|
13
14
|
BuildingInspectionStatus["WAIT"] = "WAIT";
|
|
@@ -105,6 +106,15 @@ tslib_1.__decorate([
|
|
|
105
106
|
(0, typeorm_1.RelationId)((buildingInspection) => buildingInspection.manager),
|
|
106
107
|
tslib_1.__metadata("design:type", String)
|
|
107
108
|
], BuildingInspection.prototype, "managerId", void 0);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, typeorm_1.ManyToOne)(type => building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog, { nullable: true }),
|
|
111
|
+
(0, type_graphql_1.Field)(type => building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog, { nullable: true }),
|
|
112
|
+
tslib_1.__metadata("design:type", building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog)
|
|
113
|
+
], BuildingInspection.prototype, "worklog", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, typeorm_1.RelationId)((buildingInspection) => buildingInspection.worklog),
|
|
116
|
+
tslib_1.__metadata("design:type", String)
|
|
117
|
+
], BuildingInspection.prototype, "worklogId", void 0);
|
|
108
118
|
tslib_1.__decorate([
|
|
109
119
|
(0, typeorm_1.CreateDateColumn)(),
|
|
110
120
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -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;
|
|
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,+BAAg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,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;mDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,kBAAsC,EAAE,EAAE,CAAC,kBAAkB,CAAC,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"]}
|
|
@@ -5,4 +5,4 @@ import { BuildingInspectionSummary, ChecklistInputType, ChecklistItemInputType,
|
|
|
5
5
|
import { BuildingInspectionHistory } from './building-inspection-history';
|
|
6
6
|
export declare const entities: (typeof BuildingInspection | typeof BuildingInspectionHistory)[];
|
|
7
7
|
export declare const resolvers: (typeof BuildingInspectionQuery | typeof BuildingInspectionMutation)[];
|
|
8
|
-
export declare const types: (typeof ChecklistInputType | typeof ChecklistItemInputType | typeof ChecklistSubmitInputType | typeof ChecklistItemSubmitInputType | typeof BuildingInspectionSummary | typeof
|
|
8
|
+
export declare const types: (typeof ChecklistInputType | typeof ChecklistItemInputType | typeof ChecklistSubmitInputType | typeof ChecklistItemSubmitInputType | typeof BuildingInspectionSummary | typeof BuildingInspectionStatus | typeof ProjectType)[];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { BuildingInspectionDailyWorklog } from './building-inspection-daily-worklog';
|
|
2
|
-
import { BuildingInspectionDailyWorklogPatch } from './building-inspection-daily-worklog-type';
|
|
2
|
+
import { BuildingInspectionDailyWorklogPatch, BuildingInspectionDailyWorklogNew } from './building-inspection-daily-worklog-type';
|
|
3
3
|
export declare class BuildingInspectionDailyWorklogMutation {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
deleteBuildingInspectionDailyWorklog(id: string, context: ResolverContext): Promise<boolean>;
|
|
7
|
-
deleteBuildingInspectionDailyWorklogs(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
4
|
+
createBuildingInspectionDailyWorklog(patch: BuildingInspectionDailyWorklogNew, context: ResolverContext): Promise<BuildingInspectionDailyWorklog>;
|
|
5
|
+
updateBuildingInspectionDailyWorklog(patch: BuildingInspectionDailyWorklogPatch, context: ResolverContext): Promise<BuildingInspectionDailyWorklog>;
|
|
8
6
|
}
|
|
@@ -3,95 +3,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BuildingInspectionDailyWorklogMutation = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
|
-
const typeorm_1 = require("typeorm");
|
|
7
6
|
const building_inspection_daily_worklog_1 = require("./building-inspection-daily-worklog");
|
|
8
7
|
const building_inspection_daily_worklog_type_1 = require("./building-inspection-daily-worklog-type");
|
|
8
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
9
|
+
const building_inspection_daily_worklog_query_1 = require("./building-inspection-daily-worklog-query");
|
|
9
10
|
let BuildingInspectionDailyWorklogMutation = class BuildingInspectionDailyWorklogMutation {
|
|
10
|
-
async
|
|
11
|
-
const {
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const _createRecords = patches.filter((patch) => { var _a; return ((_a = patch.cuFlag) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === '+'; });
|
|
23
|
-
const _updateRecords = patches.filter((patch) => { var _a; return ((_a = patch.cuFlag) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'M'; });
|
|
24
|
-
const repo = tx.getRepository(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog);
|
|
25
|
-
if (_createRecords.length > 0) {
|
|
26
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
27
|
-
const newRecord = _createRecords[i];
|
|
28
|
-
const result = await repo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
29
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (_updateRecords.length > 0) {
|
|
33
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
34
|
-
const updateRecord = _updateRecords[i];
|
|
35
|
-
const target = await repo.findOneBy({ id: updateRecord.id });
|
|
36
|
-
const result = await repo.save(Object.assign(Object.assign(Object.assign({}, target), updateRecord), { updater: user }));
|
|
37
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
38
|
-
}
|
|
11
|
+
async createBuildingInspectionDailyWorklog(patch, context) {
|
|
12
|
+
const { user, domain, tx } = context.state;
|
|
13
|
+
const worklogRepo = tx.getRepository(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog);
|
|
14
|
+
const buildingInspectionRepo = tx.getRepository(building_inspection_1.BuildingInspection);
|
|
15
|
+
if (!patch.projectId)
|
|
16
|
+
throw new Error('projectId 가 없습니다.');
|
|
17
|
+
if (!patch.date)
|
|
18
|
+
throw new Error('date 가 없습니다.');
|
|
19
|
+
const result = await worklogRepo.save(Object.assign(Object.assign({}, patch), { documentNo: await (0, building_inspection_daily_worklog_query_1.generateDailyWorklogDocumentNo)(patch.projectId), domain: domain, creator: user, updater: user }));
|
|
20
|
+
for (const buildingInspectionId of patch.buildingInspectionIds) {
|
|
21
|
+
const buildingInspection = await buildingInspectionRepo.findOne({ where: { id: buildingInspectionId } });
|
|
22
|
+
await buildingInspectionRepo.save(Object.assign(Object.assign({}, buildingInspection), { worklog: result }));
|
|
39
23
|
}
|
|
40
|
-
return
|
|
41
|
-
}
|
|
42
|
-
async deleteBuildingInspectionDailyWorklog(id, context) {
|
|
43
|
-
const { tx } = context.state;
|
|
44
|
-
await tx.getRepository(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog).delete({ id });
|
|
45
|
-
return true;
|
|
24
|
+
return result;
|
|
46
25
|
}
|
|
47
|
-
async
|
|
48
|
-
const { tx } = context.state;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
return
|
|
26
|
+
async updateBuildingInspectionDailyWorklog(patch, context) {
|
|
27
|
+
const { user, tx } = context.state;
|
|
28
|
+
const worklogRepo = tx.getRepository(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog);
|
|
29
|
+
const origin = await worklogRepo.findOne({ where: { id: patch.id } });
|
|
30
|
+
const result = await worklogRepo.save(Object.assign(Object.assign(Object.assign({}, origin), patch), { updater: user }));
|
|
31
|
+
return result;
|
|
53
32
|
}
|
|
54
33
|
};
|
|
55
34
|
exports.BuildingInspectionDailyWorklogMutation = BuildingInspectionDailyWorklogMutation;
|
|
56
35
|
tslib_1.__decorate([
|
|
57
36
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
58
|
-
(0, type_graphql_1.Mutation)(returns => building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog, { description: '
|
|
59
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('
|
|
60
|
-
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
61
|
-
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
62
|
-
tslib_1.__metadata("design:type", Function),
|
|
63
|
-
tslib_1.__metadata("design:paramtypes", [String, building_inspection_daily_worklog_type_1.BuildingInspectionDailyWorklogPatch, Object]),
|
|
64
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
65
|
-
], BuildingInspectionDailyWorklogMutation.prototype, "updateBuildingInspectionDailyWorklog", null);
|
|
66
|
-
tslib_1.__decorate([
|
|
67
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
68
|
-
(0, type_graphql_1.Mutation)(returns => [building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog], {
|
|
69
|
-
description: "To modify multiple BuildingInspectionDailyWorklogs' information"
|
|
70
|
-
}),
|
|
71
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [building_inspection_daily_worklog_type_1.BuildingInspectionDailyWorklogPatch])),
|
|
72
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
73
|
-
tslib_1.__metadata("design:type", Function),
|
|
74
|
-
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
75
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
76
|
-
], BuildingInspectionDailyWorklogMutation.prototype, "updateMultipleBuildingInspectionDailyWorklog", null);
|
|
77
|
-
tslib_1.__decorate([
|
|
78
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
79
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete BuildingInspectionDailyWorklog' }),
|
|
80
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
37
|
+
(0, type_graphql_1.Mutation)(returns => building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog, { description: 'Create Daily Worklog by projectId+date' }),
|
|
38
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patch')),
|
|
81
39
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
82
40
|
tslib_1.__metadata("design:type", Function),
|
|
83
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
41
|
+
tslib_1.__metadata("design:paramtypes", [building_inspection_daily_worklog_type_1.BuildingInspectionDailyWorklogNew, Object]),
|
|
84
42
|
tslib_1.__metadata("design:returntype", Promise)
|
|
85
|
-
], BuildingInspectionDailyWorklogMutation.prototype, "
|
|
43
|
+
], BuildingInspectionDailyWorklogMutation.prototype, "createBuildingInspectionDailyWorklog", null);
|
|
86
44
|
tslib_1.__decorate([
|
|
87
45
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
88
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
89
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('
|
|
46
|
+
(0, type_graphql_1.Mutation)(returns => building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog, { description: 'Update Daily Worklog' }),
|
|
47
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patch')),
|
|
90
48
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
91
49
|
tslib_1.__metadata("design:type", Function),
|
|
92
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
50
|
+
tslib_1.__metadata("design:paramtypes", [building_inspection_daily_worklog_type_1.BuildingInspectionDailyWorklogPatch, Object]),
|
|
93
51
|
tslib_1.__metadata("design:returntype", Promise)
|
|
94
|
-
], BuildingInspectionDailyWorklogMutation.prototype, "
|
|
52
|
+
], BuildingInspectionDailyWorklogMutation.prototype, "updateBuildingInspectionDailyWorklog", null);
|
|
95
53
|
exports.BuildingInspectionDailyWorklogMutation = BuildingInspectionDailyWorklogMutation = tslib_1.__decorate([
|
|
96
54
|
(0, type_graphql_1.Resolver)(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog)
|
|
97
55
|
], BuildingInspectionDailyWorklogMutation);
|
|
@@ -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,
|
|
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;AAGnF,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,UAAU,EAAE,MAAM,IAAA,wEAA8B,EAAC,KAAK,CAAC,SAAS,CAAC,EACjE,M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AC,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;iDA/CU,sCAAsC;IADlD,IAAA,uBAAQ,EAAC,kEAA8B,CAAC;GAC5B,sCAAsC,CAgDlD","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'\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 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 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"]}
|
|
@@ -6,7 +6,9 @@ export declare class BuildingInspectionDailyWorklogQuery {
|
|
|
6
6
|
* 프로젝트와 날짜로 일일업무일지 조회. 없으면 새 문서번호를 생성해 빈 데이터를 반환
|
|
7
7
|
*/
|
|
8
8
|
buildingInspectionDailyWorklogByProjectIdAndDate(projectId: string, date: string, context: ResolverContext): Promise<BuildingInspectionDailyWorklog>;
|
|
9
|
+
dailyWorklogDatesOfProject(projectId: string, startDate: string, endDate: string, context: ResolverContext): Promise<BuildingInspectionDailyWorklog[]>;
|
|
9
10
|
domain(worklog: BuildingInspectionDailyWorklog): Promise<Domain>;
|
|
10
11
|
updater(worklog: BuildingInspectionDailyWorklog): Promise<User>;
|
|
11
12
|
creator(worklog: BuildingInspectionDailyWorklog): Promise<User>;
|
|
12
13
|
}
|
|
14
|
+
export declare function generateDailyWorklogDocumentNo(projectId: string): Promise<string>;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BuildingInspectionDailyWorklogQuery = void 0;
|
|
4
|
+
exports.generateDailyWorklogDocumentNo = generateDailyWorklogDocumentNo;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const type_graphql_1 = require("type-graphql");
|
|
6
7
|
const shell_1 = require("@things-factory/shell");
|
|
7
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
9
|
const building_inspection_daily_worklog_1 = require("./building-inspection-daily-worklog");
|
|
9
10
|
const checklist_1 = require("../checklist/checklist");
|
|
11
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
12
|
+
const env_1 = require("@things-factory/env");
|
|
13
|
+
const moment_timezone_1 = tslib_1.__importDefault(require("moment-timezone"));
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const projectType = env_1.config.get('projectType', building_inspection_1.ProjectType.DSSP);
|
|
10
16
|
let BuildingInspectionDailyWorklogQuery = class BuildingInspectionDailyWorklogQuery {
|
|
11
17
|
/**
|
|
12
18
|
* 프로젝트와 날짜로 일일업무일지 조회. 없으면 새 문서번호를 생성해 빈 데이터를 반환
|
|
@@ -14,11 +20,45 @@ let BuildingInspectionDailyWorklogQuery = class BuildingInspectionDailyWorklogQu
|
|
|
14
20
|
async buildingInspectionDailyWorklogByProjectIdAndDate(projectId, date, context) {
|
|
15
21
|
const repository = (0, shell_1.getRepository)(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog);
|
|
16
22
|
const worklogs = await repository.findOne({ where: { projectId, date } });
|
|
23
|
+
// 워크로그가 존재하면 해당 데이터를 반환
|
|
17
24
|
if (worklogs)
|
|
18
25
|
return worklogs;
|
|
26
|
+
// 존재하지 않으면 새 문서번호와 검측되지 않은 검측 데이터를 반환
|
|
27
|
+
const requestDate = (0, moment_timezone_1.default)(date).format('YYYY-MM-DD');
|
|
19
28
|
const documentNo = await generateDailyWorklogDocumentNo(projectId);
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
const buildingInspections = await (0, shell_1.getRepository)('projects')
|
|
30
|
+
.createQueryBuilder('p')
|
|
31
|
+
.select('bi.id', 'buildingInspectionId')
|
|
32
|
+
.addSelect('c.location', 'location')
|
|
33
|
+
.addSelect('c.construction_type', 'constructionType')
|
|
34
|
+
.leftJoin('building_complexes', 'bc', 'p.building_complex_id = bc.id')
|
|
35
|
+
.leftJoin('buildings', 'b', 'b.building_complex_id = bc.id')
|
|
36
|
+
.leftJoin('building_levels', 'bl', 'bl.building_id = b.id')
|
|
37
|
+
.leftJoin('building_inspections', 'bi', 'bi.building_level_id = bl.id')
|
|
38
|
+
.leftJoin('checklists', 'c', 'bi.checklist_id = c.id')
|
|
39
|
+
.where('p.id = :projectId', { projectId })
|
|
40
|
+
.andWhere('bi.project_type = :projectType', { projectType })
|
|
41
|
+
.andWhere('bi.worklog_id IS NULL')
|
|
42
|
+
.andWhere('c.inspection_result_updated_at IS NOT NULL') // 검측 결과 요청서가 생성된 경우
|
|
43
|
+
.andWhere('bi.request_date <= :requestDate', { requestDate })
|
|
44
|
+
.getRawMany();
|
|
45
|
+
// 선택된 검측 정보들의 정보 셋팅하여 신규 일일 업무일지에 기본 셋팅
|
|
46
|
+
const worklogsData = buildingInspections.map(inspection => ({
|
|
47
|
+
constructionType: inspection.constructionType,
|
|
48
|
+
supervisoryTitle: inspection.constructionType,
|
|
49
|
+
supervisorContent: `${inspection.location} - ${inspection.constructionType} 검측 완료`
|
|
50
|
+
}));
|
|
51
|
+
const buildingInspectionsIds = buildingInspections.map(inspection => ({
|
|
52
|
+
id: inspection.buildingInspectionId
|
|
53
|
+
}));
|
|
54
|
+
return { documentNo, worklogs: worklogsData, buildingInspections: buildingInspectionsIds };
|
|
55
|
+
}
|
|
56
|
+
async dailyWorklogDatesOfProject(projectId, startDate, endDate, context) {
|
|
57
|
+
const result = await (0, shell_1.getRepository)(building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog).find({
|
|
58
|
+
where: { projectId, date: (0, typeorm_1.Between)(startDate, endDate) },
|
|
59
|
+
order: { date: 'ASC' }
|
|
60
|
+
});
|
|
61
|
+
return result;
|
|
22
62
|
}
|
|
23
63
|
async domain(worklog) {
|
|
24
64
|
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: worklog.domainId });
|
|
@@ -40,6 +80,16 @@ tslib_1.__decorate([
|
|
|
40
80
|
tslib_1.__metadata("design:paramtypes", [String, String, Object]),
|
|
41
81
|
tslib_1.__metadata("design:returntype", Promise)
|
|
42
82
|
], BuildingInspectionDailyWorklogQuery.prototype, "buildingInspectionDailyWorklogByProjectIdAndDate", null);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, type_graphql_1.Query)(returns => [building_inspection_daily_worklog_1.BuildingInspectionDailyWorklog]),
|
|
85
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('projectId')),
|
|
86
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('startDate')),
|
|
87
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('endDate')),
|
|
88
|
+
tslib_1.__param(3, (0, type_graphql_1.Ctx)()),
|
|
89
|
+
tslib_1.__metadata("design:type", Function),
|
|
90
|
+
tslib_1.__metadata("design:paramtypes", [String, String, String, Object]),
|
|
91
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
92
|
+
], BuildingInspectionDailyWorklogQuery.prototype, "dailyWorklogDatesOfProject", null);
|
|
43
93
|
tslib_1.__decorate([
|
|
44
94
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
45
95
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-daily-worklog-query.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"building-inspection-daily-worklog-query.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.ts"],"names":[],"mappings":";;;AA6FA,wEAmBC;;AAhHD,+CAA6E;AAC7E,iDAA6D;AAC7D,yDAAgD;AAChD,2FAAoF;AACpF,sDAAuD;AACvD,oFAAwE;AACxE,6CAA4C;AAC5C,8EAAoC;AACpC,qCAAiC;AAEjC,MAAM,WAAW,GAAG,YAAM,CAAC,GAAG,CAAC,aAAa,EAAE,iCAAW,CAAC,IAAI,CAAC,CAAA;AAGxD,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IAC9C;;OAEG;IAEG,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CAAmC;IAD/C,IAAA,uBAAQ,EAAC,kEAA8B,CAAC;GAC5B,mCAAmC,CA8E/C;AAEM,KAAK,UAAU,8BAA8B,CAAC,SAAiB;IACpE,sDAAsD;IACtD,MAAM,OAAO,GAAG,MAAM,IAAA,qBAAa,EAAM,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;IAC1F,MAAM,MAAM,GAAW,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,KAAI,EAAE,CAAA;IAEpD,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAa,EAAC,kEAA8B,CAAC;SAC/D,kBAAkB,CAAC,GAAG,CAAC;SACvB,KAAK,CAAC,2BAA2B,EAAE,EAAE,SAAS,EAAE,CAAC;SACjD,QAAQ,CAAC,6BAA6B,EAAE,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,0BAAc,CAAC,aAAa,IAAI,EAAE,CAAC;SACvG,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;SAC/B,MAAM,EAAE,CAAA;IAEX,IAAI,QAAQ,GAAG,OAAO,CAAA;IACtB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QACpD,IAAI,KAAK;YAAE,QAAQ,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAC1E,CAAC;IAED,OAAO,GAAG,MAAM,WAAW,QAAQ,GAAG,CAAA;AACxC,CAAC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Arg, Ctx } from 'type-graphql'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { BuildingInspectionDailyWorklog } from './building-inspection-daily-worklog'\nimport { DocumentNoType } from '../checklist/checklist'\nimport { ProjectType } from '../building-inspection/building-inspection'\nimport { config } from '@things-factory/env'\nimport moment from 'moment-timezone'\nimport { Between } from 'typeorm'\n\nconst projectType = config.get('projectType', ProjectType.DSSP)\n\n@Resolver(BuildingInspectionDailyWorklog)\nexport class BuildingInspectionDailyWorklogQuery {\n /**\n * 프로젝트와 날짜로 일일업무일지 조회. 없으면 새 문서번호를 생성해 빈 데이터를 반환\n */\n @Query(returns => BuildingInspectionDailyWorklog, { nullable: true })\n async buildingInspectionDailyWorklogByProjectIdAndDate(\n @Arg('projectId') projectId: string,\n @Arg('date') date: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionDailyWorklog> {\n const repository = getRepository(BuildingInspectionDailyWorklog)\n const worklogs = await repository.findOne({ where: { projectId, date } })\n\n // 워크로그가 존재하면 해당 데이터를 반환\n if (worklogs) return worklogs\n\n // 존재하지 않으면 새 문서번호와 검측되지 않은 검측 데이터를 반환\n const requestDate = moment(date).format('YYYY-MM-DD')\n const documentNo = await generateDailyWorklogDocumentNo(projectId)\n const buildingInspections = await getRepository('projects')\n .createQueryBuilder('p')\n .select('bi.id', 'buildingInspectionId')\n .addSelect('c.location', 'location')\n .addSelect('c.construction_type', 'constructionType')\n .leftJoin('building_complexes', 'bc', 'p.building_complex_id = bc.id')\n .leftJoin('buildings', 'b', 'b.building_complex_id = bc.id')\n .leftJoin('building_levels', 'bl', 'bl.building_id = b.id')\n .leftJoin('building_inspections', 'bi', 'bi.building_level_id = bl.id')\n .leftJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .where('p.id = :projectId', { projectId })\n .andWhere('bi.project_type = :projectType', { projectType })\n .andWhere('bi.worklog_id IS NULL')\n .andWhere('c.inspection_result_updated_at IS NOT NULL') // 검측 결과 요청서가 생성된 경우\n .andWhere('bi.request_date <= :requestDate', { requestDate })\n .getRawMany()\n\n // 선택된 검측 정보들의 정보 셋팅하여 신규 일일 업무일지에 기본 셋팅\n const worklogsData = buildingInspections.map(inspection => ({\n constructionType: inspection.constructionType,\n supervisoryTitle: inspection.constructionType,\n supervisorContent: `${inspection.location} - ${inspection.constructionType} 검측 완료`\n }))\n const buildingInspectionsIds = buildingInspections.map(inspection => ({\n id: inspection.buildingInspectionId\n }))\n\n return { documentNo, worklogs: worklogsData, buildingInspections: buildingInspectionsIds } as BuildingInspectionDailyWorklog\n }\n\n @Query(returns => [BuildingInspectionDailyWorklog])\n async dailyWorklogDatesOfProject(\n @Arg('projectId') projectId: string,\n @Arg('startDate') startDate: string,\n @Arg('endDate') endDate: string,\n @Ctx() context: ResolverContext\n ): Promise<BuildingInspectionDailyWorklog[]> {\n const result = await getRepository(BuildingInspectionDailyWorklog).find({\n where: { projectId, date: Between(startDate, endDate) },\n order: { date: 'ASC' }\n })\n\n return result\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() worklog: BuildingInspectionDailyWorklog): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: worklog.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() worklog: BuildingInspectionDailyWorklog): Promise<User> {\n return await getRepository(User).findOneBy({ id: worklog.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() worklog: BuildingInspectionDailyWorklog): Promise<User> {\n return await getRepository(User).findOneBy({ id: worklog.creatorId })\n }\n}\n\nexport async function generateDailyWorklogDocumentNo(projectId: string): Promise<string> {\n // 프로젝트의 documentNaming을 가져오고, 일일업무일지(04) 최신 번호를 찾아 +1\n const project = await getRepository<any>('projects').findOne({ where: { id: projectId } })\n const naming: string = project?.documentNaming || ''\n\n const latest = await getRepository(BuildingInspectionDailyWorklog)\n .createQueryBuilder('d')\n .where('d.project_id = :projectId', { projectId })\n .andWhere('d.document_no LIKE :pattern', { pattern: `${naming} 검측 제${DocumentNoType.DAILY_WORKLOG}-%` })\n .orderBy('d.created_at', 'DESC')\n .getOne()\n\n let sequence = '00001'\n if (latest?.documentNo) {\n const match = latest.documentNo.match(/\\-(\\d{5})호$/)\n if (match) sequence = (Number(match[1]) + 1).toString().padStart(5, '0')\n }\n\n return `${naming} 검측 제04-${sequence}호`\n}\n"]}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { BuildingInspectionDailyWorklog } from './building-inspection-daily-worklog';
|
|
2
|
+
export declare class BuildingInspectionDailyWorklogNew {
|
|
3
|
+
projectId: string;
|
|
4
|
+
date?: string;
|
|
5
|
+
worklogs?: any;
|
|
6
|
+
memo?: string;
|
|
7
|
+
directiveMemo?: string;
|
|
8
|
+
buildingInspectionIds?: string[];
|
|
9
|
+
}
|
|
2
10
|
export declare class BuildingInspectionDailyWorklogPatch {
|
|
3
11
|
id?: string;
|
|
4
|
-
|
|
5
|
-
date?: string;
|
|
12
|
+
worklogs?: any;
|
|
6
13
|
memo?: string;
|
|
7
|
-
|
|
14
|
+
directiveMemo?: string;
|
|
8
15
|
}
|
|
9
16
|
export declare class BuildingInspectionDailyWorklogList {
|
|
10
17
|
items: BuildingInspectionDailyWorklog[];
|
|
@@ -1,24 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BuildingInspectionDailyWorklogList = exports.BuildingInspectionDailyWorklogPatch = void 0;
|
|
3
|
+
exports.BuildingInspectionDailyWorklogList = exports.BuildingInspectionDailyWorklogPatch = exports.BuildingInspectionDailyWorklogNew = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
6
7
|
const building_inspection_daily_worklog_1 = require("./building-inspection-daily-worklog");
|
|
7
|
-
let
|
|
8
|
+
let BuildingInspectionDailyWorklogNew = class BuildingInspectionDailyWorklogNew {
|
|
8
9
|
};
|
|
9
|
-
exports.
|
|
10
|
+
exports.BuildingInspectionDailyWorklogNew = BuildingInspectionDailyWorklogNew;
|
|
10
11
|
tslib_1.__decorate([
|
|
11
|
-
(0, type_graphql_1.Field)(
|
|
12
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
12
13
|
tslib_1.__metadata("design:type", String)
|
|
13
|
-
],
|
|
14
|
+
], BuildingInspectionDailyWorklogNew.prototype, "projectId", void 0);
|
|
15
|
+
tslib_1.__decorate([
|
|
16
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], BuildingInspectionDailyWorklogNew.prototype, "date", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
21
|
+
tslib_1.__metadata("design:type", Object)
|
|
22
|
+
], BuildingInspectionDailyWorklogNew.prototype, "worklogs", void 0);
|
|
14
23
|
tslib_1.__decorate([
|
|
15
24
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
16
25
|
tslib_1.__metadata("design:type", String)
|
|
17
|
-
],
|
|
26
|
+
], BuildingInspectionDailyWorklogNew.prototype, "memo", void 0);
|
|
18
27
|
tslib_1.__decorate([
|
|
19
28
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
20
29
|
tslib_1.__metadata("design:type", String)
|
|
21
|
-
],
|
|
30
|
+
], BuildingInspectionDailyWorklogNew.prototype, "directiveMemo", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, type_graphql_1.Field)(type => [String], { nullable: true }),
|
|
33
|
+
tslib_1.__metadata("design:type", Array)
|
|
34
|
+
], BuildingInspectionDailyWorklogNew.prototype, "buildingInspectionIds", void 0);
|
|
35
|
+
exports.BuildingInspectionDailyWorklogNew = BuildingInspectionDailyWorklogNew = tslib_1.__decorate([
|
|
36
|
+
(0, type_graphql_1.InputType)()
|
|
37
|
+
], BuildingInspectionDailyWorklogNew);
|
|
38
|
+
let BuildingInspectionDailyWorklogPatch = class BuildingInspectionDailyWorklogPatch {
|
|
39
|
+
};
|
|
40
|
+
exports.BuildingInspectionDailyWorklogPatch = BuildingInspectionDailyWorklogPatch;
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: false }),
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
44
|
+
], BuildingInspectionDailyWorklogPatch.prototype, "id", void 0);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
47
|
+
tslib_1.__metadata("design:type", Object)
|
|
48
|
+
], BuildingInspectionDailyWorklogPatch.prototype, "worklogs", void 0);
|
|
22
49
|
tslib_1.__decorate([
|
|
23
50
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
24
51
|
tslib_1.__metadata("design:type", String)
|
|
@@ -26,7 +53,7 @@ tslib_1.__decorate([
|
|
|
26
53
|
tslib_1.__decorate([
|
|
27
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
28
55
|
tslib_1.__metadata("design:type", String)
|
|
29
|
-
], BuildingInspectionDailyWorklogPatch.prototype, "
|
|
56
|
+
], BuildingInspectionDailyWorklogPatch.prototype, "directiveMemo", void 0);
|
|
30
57
|
exports.BuildingInspectionDailyWorklogPatch = BuildingInspectionDailyWorklogPatch = tslib_1.__decorate([
|
|
31
58
|
(0, type_graphql_1.InputType)()
|
|
32
59
|
], BuildingInspectionDailyWorklogPatch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-daily-worklog-type.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,2FAAoF;AAG7E,IAAM,
|
|
1
|
+
{"version":3,"file":"building-inspection-daily-worklog-type.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.ts"],"names":[],"mappings":";;;;AAAA,+CAA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AM,kCAAkC,GAAxC,MAAM,kCAAkC;CAM9C,CAAA;AANY,gFAAkC;AAE7C;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,kEAA8B,CAAC,CAAC;;iEACT;AAGvC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;iEACN;6CALF,kCAAkC;IAD9C,IAAA,yBAAU,GAAE;GACA,kCAAkC,CAM9C","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ScalarObject } from '@things-factory/shell'\nimport { BuildingInspectionDailyWorklog } from './building-inspection-daily-worklog'\n\n@InputType()\nexport class BuildingInspectionDailyWorklogNew {\n @Field({ nullable: false })\n projectId!: string\n\n @Field({ nullable: false })\n date?: string\n\n @Field(type => ScalarObject, { nullable: true })\n worklogs?: any\n\n @Field({ nullable: true })\n memo?: string\n\n @Field({ nullable: true })\n directiveMemo?: string\n\n @Field(type => [String], { nullable: true })\n buildingInspectionIds?: string[]\n}\n\n@InputType()\nexport class BuildingInspectionDailyWorklogPatch {\n @Field(type => ID, { nullable: false })\n id?: string\n\n @Field(type => ScalarObject, { nullable: true })\n worklogs?: any\n\n @Field({ nullable: true })\n memo?: string\n\n @Field({ nullable: true })\n directiveMemo?: string\n}\n\n@ObjectType()\nexport class BuildingInspectionDailyWorklogList {\n @Field(type => [BuildingInspectionDailyWorklog])\n items: BuildingInspectionDailyWorklog[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Domain } from '@things-factory/shell';
|
|
2
2
|
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { BuildingInspection } from '../building-inspection/building-inspection';
|
|
3
4
|
export interface Worklog {
|
|
4
5
|
constructionType: string;
|
|
5
6
|
supervisoryTitle: string;
|
|
@@ -15,6 +16,7 @@ export declare class BuildingInspectionDailyWorklog {
|
|
|
15
16
|
worklogs?: Worklog[];
|
|
16
17
|
memo?: string;
|
|
17
18
|
directiveMemo?: string;
|
|
19
|
+
buildingInspections?: BuildingInspection[];
|
|
18
20
|
createdAt?: Date;
|
|
19
21
|
updatedAt?: Date;
|
|
20
22
|
deletedAt?: Date;
|
package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js
CHANGED
|
@@ -6,6 +6,7 @@ const typeorm_1 = require("typeorm");
|
|
|
6
6
|
const type_graphql_1 = require("type-graphql");
|
|
7
7
|
const shell_1 = require("@things-factory/shell");
|
|
8
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
9
10
|
let BuildingInspectionDailyWorklog = class BuildingInspectionDailyWorklog {
|
|
10
11
|
};
|
|
11
12
|
exports.BuildingInspectionDailyWorklog = BuildingInspectionDailyWorklog;
|
|
@@ -54,6 +55,11 @@ tslib_1.__decorate([
|
|
|
54
55
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
56
|
tslib_1.__metadata("design:type", String)
|
|
56
57
|
], BuildingInspectionDailyWorklog.prototype, "directiveMemo", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.OneToMany)(type => building_inspection_1.BuildingInspection, buildingInspection => buildingInspection.worklog),
|
|
60
|
+
(0, type_graphql_1.Field)(type => [building_inspection_1.BuildingInspection], { nullable: true }),
|
|
61
|
+
tslib_1.__metadata("design:type", Array)
|
|
62
|
+
], BuildingInspectionDailyWorklog.prototype, "buildingInspections", void 0);
|
|
57
63
|
tslib_1.__decorate([
|
|
58
64
|
(0, typeorm_1.CreateDateColumn)(),
|
|
59
65
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-daily-worklog.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"building-inspection-daily-worklog.js","sourceRoot":"","sources":["../../../server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAChD,oFAA+E;AAcxE,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;CAiE1C,CAAA;AAjEY,wEAA8B;AAGhC;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACnB;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;8DAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,OAAuC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;;gEACvD;AAIjB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC/C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iEACT;AAIlB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC,CAAC,oBAAoB;;IACvF,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACP;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC1D,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IA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,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;+DAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAuC,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;iEACvD;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;+DAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAuC,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;iEACvD;yCAhEP,8BAA8B;IAN1C,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC9B,IAAA,eAAK,EAAC,wCAAwC,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;QAC/H,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;GAC5D,8BAA8B,CAiE1C","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n OneToMany\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { BuildingInspection } from '../building-inspection/building-inspection'\n\nexport interface Worklog {\n constructionType: string\n supervisoryTitle: string\n supervisorContent: string\n}\n\n@Entity({ comment: '일일 업무일지' })\n@Index('ix_building_inspection_daily_worklog_0', (worklog: BuildingInspectionDailyWorklog) => [worklog.projectId, worklog.date], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: 'Entity for BuildingInspectionDailyWorklog' })\nexport class BuildingInspectionDailyWorklog {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: true })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((worklog: BuildingInspectionDailyWorklog) => worklog.domain)\n domainId?: string\n\n @Column({ nullable: false, comment: '프로젝트 ID' })\n @Field({ nullable: false })\n projectId!: string\n\n @Column({ nullable: true, comment: '문서번호 - {네이밍} 검측 제04-00001호)' }) // DocumentNoType 참조\n @Field({ nullable: true })\n documentNo?: string\n\n @Column({ type: 'date', nullable: true, comment: '작성 날짜' })\n @Field(type => String, { nullable: true })\n date?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: '작업사항' })\n @Field(type => ScalarObject, { nullable: true })\n worklogs?: Worklog[]\n\n @Column({ nullable: true, comment: '특기사항' })\n @Field({ nullable: true })\n memo?: string\n\n @Column({ nullable: true, comment: '지적 사항 및 처리결과' })\n @Field({ nullable: true })\n directiveMemo?: string\n\n @OneToMany(type => BuildingInspection, buildingInspection => buildingInspection.worklog)\n @Field(type => [BuildingInspection], { nullable: true })\n buildingInspections?: BuildingInspection[]\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((worklog: BuildingInspectionDailyWorklog) => worklog.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((worklog: BuildingInspectionDailyWorklog) => worklog.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -11,7 +11,7 @@ export * from './checklist-template-item/checklist-template-item';
|
|
|
11
11
|
export * from './building-inspection/building-inspection';
|
|
12
12
|
export * from './building-inspection/building-inspection-type';
|
|
13
13
|
export * from './building-inspection-daily-worklog/building-inspection-daily-worklog';
|
|
14
|
-
export declare const entities: (typeof import("./
|
|
14
|
+
export declare const entities: (typeof import("./issue/issue").Issue | typeof import("./action-plan/action-plan").ActionPlan | typeof import("./supervisor/supervisor").Supervisor | typeof import("./project-report/project-report").ProjectReport | typeof import("./checklist-type/checklist-type").ChecklistType | typeof import("./checklist-item-comment/checklist-item-comment").ChecklistItemComment | typeof import("./checklist-item/checklist-item").ChecklistItem | typeof import("./checklist/checklist").Checklist | typeof import("./building-inspection/building-inspection").BuildingInspection | typeof import("./building-inspection-daily-worklog/building-inspection-daily-worklog").BuildingInspectionDailyWorklog | typeof import("./checklist-template-item/checklist-template-item").ChecklistTemplateItem | typeof import("./checklist-template/checklist-template").ChecklistTemplate | typeof import("./checklist/checklist-history").ChecklistHistory | typeof import("./building-inspection/building-inspection-history").BuildingInspectionHistory)[];
|
|
15
15
|
export declare const schema: {
|
|
16
16
|
resolverClasses: typeof import("./checklist-item/checklist-item-mutation").ChecklistItemMutation[];
|
|
17
17
|
};
|