@dssp/project 0.0.5 → 0.0.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dssp/project",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -27,12 +27,12 @@
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.5",
30
+ "@dssp/building-complex": "^0.0.7",
31
31
  "@operato/graphql": "^7.0.0",
32
32
  "@operato/shell": "^7.0.0",
33
33
  "@things-factory/auth-base": "^7.0.0",
34
34
  "@things-factory/shell": "^7.0.0",
35
35
  "exceljs": "^4.4.0"
36
36
  },
37
- "gitHead": "5ccd5b966f8b5b5cabf6cb9f65f0d43d6c87c0c7"
37
+ "gitHead": "6a45880e93c5244bdd73a159ec0995e43c5fdd2f"
38
38
  }
@@ -41,17 +41,14 @@ export class ProjectQuery {
41
41
  }
42
42
 
43
43
  @Query(returns => InspectionSummary, { description: '프로젝트의 검측상태 별 카운트' })
44
- async inspectionSummary(
45
- @Arg('projectId') projectId: string,
46
- @Ctx() context: ResolverContext
47
- ): Promise<InspectionSummary> {
44
+ async inspectionSummary(@Arg('projectId') projectId: string, @Ctx() context: ResolverContext): Promise<InspectionSummary> {
48
45
  const { domain } = context.state
49
46
 
50
47
  const queryBuilder = getRepository(Project)
51
48
  .createQueryBuilder('p')
52
- .select(`COUNT(CASE WHEN bi.status="${InspectionStatus.REQUEST}" THEN 1 ELSE NULL END) AS request`)
53
- .addSelect(`COUNT(CASE WHEN bi.status="${InspectionStatus.PASS}" THEN 1 ELSE NULL END) AS pass`)
54
- .addSelect(`COUNT(CASE WHEN bi.status="${InspectionStatus.FAIL}" THEN 1 ELSE NULL END) AS fail`)
49
+ .select(`COUNT(CASE WHEN bi.status='${InspectionStatus.REQUEST}' THEN 1 ELSE NULL END) AS request`)
50
+ .addSelect(`COUNT(CASE WHEN bi.status='${InspectionStatus.PASS}' THEN 1 ELSE NULL END) AS pass`)
51
+ .addSelect(`COUNT(CASE WHEN bi.status='${InspectionStatus.FAIL}' THEN 1 ELSE NULL END) AS fail`)
55
52
  .innerJoin('p.buildingComplex', 'bc')
56
53
  .innerJoin('bc.buildings', 'b')
57
54
  .innerJoin('b.buildingLevels', 'bl')