@dssp/supervision 0.0.24 → 0.0.25
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/client/pages/building-inspection/building-inspection-detail-checklist.ts +5 -0
- package/client/pages/building-inspection/building-inspection-list.ts +6 -3
- package/client/pages/building-inspection/component/building-inspection-detail-header.ts +24 -5
- package/client/pages/checklist/checklist-view.ts +69 -27
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +6 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +3 -1
- package/dist-client/pages/building-inspection/building-inspection-list.js +6 -3
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +23 -5
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.js +71 -31
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/building-inspection/building-inspection-history.js +4 -1
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.js +8 -8
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +2 -0
- package/dist-server/service/building-inspection/building-inspection.js +4 -2
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/building-inspection/building-inspection-history.ts +5 -1
- package/server/service/building-inspection/building-inspection-query.ts +24 -8
- package/server/service/building-inspection/building-inspection-type.ts +2 -2
- package/server/service/building-inspection/building-inspection.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dssp/supervision",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@dssp/building-complex": "^0.0.
|
|
31
|
-
"@dssp/project": "^0.0.
|
|
30
|
+
"@dssp/building-complex": "^0.0.25",
|
|
31
|
+
"@dssp/project": "^0.0.25",
|
|
32
32
|
"@operato/event-view": "^8.0.0-alpha",
|
|
33
33
|
"@operato/graphql": "^8.0.0-alpha",
|
|
34
34
|
"@operato/image-marker": "^8.0.0-alpha",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@things-factory/auth-base": "^8.0.0-alpha",
|
|
38
38
|
"@things-factory/shell": "^8.0.0-alpha"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "428e139a9391cfc5b3b376cf247d58c9fc02351a"
|
|
41
41
|
}
|
|
@@ -22,7 +22,11 @@ export class BuildingInspectionHistory implements HistoryEntityInterface<Buildin
|
|
|
22
22
|
@HistoryOriginalIdColumn()
|
|
23
23
|
public originalId!: string
|
|
24
24
|
|
|
25
|
-
@Column({
|
|
25
|
+
@Column({
|
|
26
|
+
nullable: false,
|
|
27
|
+
comment:
|
|
28
|
+
'상태(WAIT: 검측 대기, OVERALL_WAIT: 총괄자 검측 대기, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격, FAIL: 불합격)'
|
|
29
|
+
})
|
|
26
30
|
@Field({ nullable: true })
|
|
27
31
|
status?: BuildingInspectionStatus
|
|
28
32
|
|
|
@@ -112,8 +112,12 @@ export class BuildingInspectionQuery {
|
|
|
112
112
|
): Promise<BuildingInspectionSummary> {
|
|
113
113
|
const buildingInspectionSummary = await getRepository(BuildingInspection)
|
|
114
114
|
.createQueryBuilder('bi')
|
|
115
|
-
.select(
|
|
116
|
-
|
|
115
|
+
.select(
|
|
116
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`
|
|
117
|
+
)
|
|
118
|
+
.addSelect(
|
|
119
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`
|
|
120
|
+
)
|
|
117
121
|
.addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
118
122
|
.addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
119
123
|
.where('bi.building_level_id = :buildingLevelId', { buildingLevelId })
|
|
@@ -139,8 +143,12 @@ export class BuildingInspectionQuery {
|
|
|
139
143
|
const buildingInspectionSummary = await getRepository(BuildingInspection)
|
|
140
144
|
.createQueryBuilder('bi')
|
|
141
145
|
.select(`TO_CHAR(bi.request_date, 'YYYY-MM-DD') AS "requestDate"`)
|
|
142
|
-
.addSelect(
|
|
143
|
-
|
|
146
|
+
.addSelect(
|
|
147
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`
|
|
148
|
+
)
|
|
149
|
+
.addSelect(
|
|
150
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`
|
|
151
|
+
)
|
|
144
152
|
.addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
145
153
|
.addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
146
154
|
.where('bi.building_level_id = :buildingLevelId', { buildingLevelId })
|
|
@@ -157,8 +165,12 @@ export class BuildingInspectionQuery {
|
|
|
157
165
|
async buildingInspectionSummary(@Root() buildingLevel: BuildingLevel): Promise<BuildingInspectionSummary> {
|
|
158
166
|
const buildingInspectionSummary = await getRepository(BuildingInspection)
|
|
159
167
|
.createQueryBuilder('bi')
|
|
160
|
-
.select(
|
|
161
|
-
|
|
168
|
+
.select(
|
|
169
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`
|
|
170
|
+
)
|
|
171
|
+
.addSelect(
|
|
172
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`
|
|
173
|
+
)
|
|
162
174
|
.addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
163
175
|
.addSelect(`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
164
176
|
.where('bi.building_level_id = :buildingLevelId', { buildingLevelId: buildingLevel.id })
|
|
@@ -182,8 +194,12 @@ export class BuildingInspectionQuery {
|
|
|
182
194
|
|
|
183
195
|
const result = await getRepository(Project)
|
|
184
196
|
.createQueryBuilder('p')
|
|
185
|
-
.select(
|
|
186
|
-
|
|
197
|
+
.select(
|
|
198
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.WAIT}' OR bi.status='${BuildingInspectionStatus.OVERALL_WAIT}' THEN 1 ELSE NULL END) AS wait`
|
|
199
|
+
)
|
|
200
|
+
.addSelect(
|
|
201
|
+
`COUNT(CASE WHEN bi.status='${BuildingInspectionStatus.REQUEST}' OR bi.status='${BuildingInspectionStatus.OVERALL_REQUEST}' THEN 1 ELSE NULL END) AS request`
|
|
202
|
+
)
|
|
187
203
|
.addSelect(`COUNT(CASE WHEN bi.status = '${BuildingInspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
|
|
188
204
|
.addSelect(`COUNT(CASE WHEN bi.status = '${BuildingInspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
|
|
189
205
|
.innerJoin('p.buildingComplex', 'bc')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ObjectType, Field, InputType, Int
|
|
2
|
-
import { BuildingInspection
|
|
1
|
+
import { ObjectType, Field, InputType, Int } from 'type-graphql'
|
|
2
|
+
import { BuildingInspection } from './building-inspection'
|
|
3
3
|
|
|
4
4
|
@InputType()
|
|
5
5
|
class ChecklistInputType {
|
|
@@ -18,7 +18,9 @@ import { Checklist } from '../checklist/checklist'
|
|
|
18
18
|
|
|
19
19
|
export enum BuildingInspectionStatus {
|
|
20
20
|
WAIT = 'WAIT',
|
|
21
|
+
OVERALL_WAIT = 'OVERALL_WAIT',
|
|
21
22
|
REQUEST = 'REQUEST',
|
|
23
|
+
OVERALL_REQUEST = 'OVERALL_REQUEST',
|
|
22
24
|
PASS = 'PASS',
|
|
23
25
|
FAIL = 'FAIL'
|
|
24
26
|
}
|
|
@@ -46,8 +48,9 @@ export class BuildingInspection {
|
|
|
46
48
|
|
|
47
49
|
@Column({
|
|
48
50
|
nullable: false,
|
|
49
|
-
comment:
|
|
50
|
-
|
|
51
|
+
comment:
|
|
52
|
+
'상태(WAIT: 검측 대기, OVERALL_WAIT: 총괄자 검측 대기, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격, FAIL: 불합격)',
|
|
53
|
+
default: BuildingInspectionStatus.WAIT
|
|
51
54
|
})
|
|
52
55
|
@Field({ nullable: true })
|
|
53
56
|
status?: BuildingInspectionStatus
|