@things-factory/operato-pms 6.1.83 → 6.1.85
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-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -34
- package/server/constants/block.ts +0 -4
- package/server/constants/index.ts +0 -8
- package/server/constants/inventory.ts +0 -9
- package/server/constants/master.ts +0 -9
- package/server/constants/organization.ts +0 -5
- package/server/constants/ramp.ts +0 -9
- package/server/constants/record.ts +0 -4
- package/server/constants/template.ts +0 -3
- package/server/constants/transaction.ts +0 -9
- package/server/controllers/index.ts +0 -1
- package/server/controllers/render-dispatchment.ts +0 -53
- package/server/entities/block-detail.ts +0 -59
- package/server/entities/block.ts +0 -49
- package/server/entities/daily-block-detail.ts +0 -54
- package/server/entities/daily-dispatch-detail.ts +0 -64
- package/server/entities/daily-dispatch.ts +0 -90
- package/server/entities/daily-harvest-detail.ts +0 -56
- package/server/entities/daily-harvest.ts +0 -89
- package/server/entities/daily-loading-detail.ts +0 -68
- package/server/entities/daily-loading-ramp.ts +0 -56
- package/server/entities/daily-loading.ts +0 -70
- package/server/entities/index.ts +0 -57
- package/server/entities/organization-staff.ts +0 -60
- package/server/entities/organization.ts +0 -43
- package/server/entities/plantation-inventory.ts +0 -56
- package/server/entities/plantation-setting.ts +0 -60
- package/server/entities/ramp.ts +0 -47
- package/server/entities/record-transaction.ts +0 -76
- package/server/entities/truck.ts +0 -58
- package/server/graphql/index.ts +0 -9
- package/server/graphql/resolvers/block/block-query.ts +0 -36
- package/server/graphql/resolvers/block/delete-blocks.ts +0 -39
- package/server/graphql/resolvers/block/index.ts +0 -11
- package/server/graphql/resolvers/block/update-multiple-block.ts +0 -69
- package/server/graphql/resolvers/block-detail/block-detail-query.ts +0 -55
- package/server/graphql/resolvers/block-detail/delete-block-details.ts +0 -20
- package/server/graphql/resolvers/block-detail/index.ts +0 -12
- package/server/graphql/resolvers/block-detail/update-multiple-block-detail.ts +0 -55
- package/server/graphql/resolvers/daily-block-detail/create-daily-block-detail.ts +0 -14
- package/server/graphql/resolvers/daily-block-detail/daily-block-detail-query.ts +0 -36
- package/server/graphql/resolvers/daily-block-detail/delete-daily-block-detail.ts +0 -14
- package/server/graphql/resolvers/daily-block-detail/delete-daily-block-details.ts +0 -17
- package/server/graphql/resolvers/daily-block-detail/index.ts +0 -18
- package/server/graphql/resolvers/daily-block-detail/update-daily-block-detail.ts +0 -17
- package/server/graphql/resolvers/daily-block-detail/update-multiple-daily-block-detail.ts +0 -44
- package/server/graphql/resolvers/daily-dispatch/daily-dispatch-query.ts +0 -48
- package/server/graphql/resolvers/daily-dispatch/delete-daily-dispatch.ts +0 -34
- package/server/graphql/resolvers/daily-dispatch/generate-daily-dispatch.ts +0 -131
- package/server/graphql/resolvers/daily-dispatch/index.ts +0 -14
- package/server/graphql/resolvers/daily-dispatch/update-daily-dispatch.ts +0 -36
- package/server/graphql/resolvers/daily-dispatch-detail/daily-dispatch-detail-query.ts +0 -37
- package/server/graphql/resolvers/daily-dispatch-detail/index.ts +0 -6
- package/server/graphql/resolvers/daily-harvest/daily-harvest-query.ts +0 -46
- package/server/graphql/resolvers/daily-harvest/delete-daily-harvest.ts +0 -65
- package/server/graphql/resolvers/daily-harvest/generate-daily-harvest.ts +0 -205
- package/server/graphql/resolvers/daily-harvest/index.ts +0 -14
- package/server/graphql/resolvers/daily-harvest/update-daily-harvest.ts +0 -153
- package/server/graphql/resolvers/daily-harvest-detail/daily-harvest-detail-query.ts +0 -35
- package/server/graphql/resolvers/daily-harvest-detail/index.ts +0 -6
- package/server/graphql/resolvers/daily-loading/daily-loading-query.ts +0 -43
- package/server/graphql/resolvers/daily-loading/delete-daily-loading.ts +0 -38
- package/server/graphql/resolvers/daily-loading/generate-daily-loading.ts +0 -149
- package/server/graphql/resolvers/daily-loading/index.ts +0 -14
- package/server/graphql/resolvers/daily-loading/update-daily-loading.ts +0 -154
- package/server/graphql/resolvers/daily-loading-detail/daily-loading-detail-query.ts +0 -35
- package/server/graphql/resolvers/daily-loading-detail/index.ts +0 -6
- package/server/graphql/resolvers/daily-loading-ramp/daily-loading-ramp-query.ts +0 -34
- package/server/graphql/resolvers/daily-loading-ramp/delete-daily-loading-ramp.ts +0 -15
- package/server/graphql/resolvers/daily-loading-ramp/index.ts +0 -12
- package/server/graphql/resolvers/daily-loading-ramp/update-daily-loading-ramp.ts +0 -18
- package/server/graphql/resolvers/dashboard/dashboard-query.ts +0 -245
- package/server/graphql/resolvers/dashboard/index.ts +0 -5
- package/server/graphql/resolvers/index.ts +0 -20
- package/server/graphql/resolvers/organization/delete-organizations.ts +0 -40
- package/server/graphql/resolvers/organization/index.ts +0 -11
- package/server/graphql/resolvers/organization/organization-query.ts +0 -35
- package/server/graphql/resolvers/organization/update-multiple-organization.ts +0 -48
- package/server/graphql/resolvers/organization-staff/delete-organization-staffs.ts +0 -20
- package/server/graphql/resolvers/organization-staff/index.ts +0 -12
- package/server/graphql/resolvers/organization-staff/organization-staff-query.ts +0 -43
- package/server/graphql/resolvers/organization-staff/update-multiple-organization-staff.ts +0 -60
- package/server/graphql/resolvers/plantation-inventory/index.ts +0 -6
- package/server/graphql/resolvers/plantation-inventory/plantation-inventory-query.ts +0 -43
- package/server/graphql/resolvers/plantation-setting/create-plantation-setting.ts +0 -16
- package/server/graphql/resolvers/plantation-setting/delete-plantation-setting.ts +0 -13
- package/server/graphql/resolvers/plantation-setting/delete-plantation-settings.ts +0 -18
- package/server/graphql/resolvers/plantation-setting/index.ts +0 -19
- package/server/graphql/resolvers/plantation-setting/plantation-setting-query.ts +0 -38
- package/server/graphql/resolvers/plantation-setting/update-multiple-plantation-setting.ts +0 -46
- package/server/graphql/resolvers/plantation-setting/update-plantation-setting.ts +0 -20
- package/server/graphql/resolvers/ramp/delete-ramps.ts +0 -24
- package/server/graphql/resolvers/ramp/index.ts +0 -12
- package/server/graphql/resolvers/ramp/ramp-query.ts +0 -34
- package/server/graphql/resolvers/ramp/update-multiple-ramp.ts +0 -61
- package/server/graphql/resolvers/record-transaction/index.ts +0 -6
- package/server/graphql/resolvers/record-transaction/record-transaction-query.ts +0 -34
- package/server/graphql/resolvers/report/daily-ffb-dispatch-production-reports.ts +0 -149
- package/server/graphql/resolvers/report/daily-production-reports.ts +0 -167
- package/server/graphql/resolvers/report/daily-staff-harvest-reports.ts +0 -84
- package/server/graphql/resolvers/report/index.ts +0 -22
- package/server/graphql/resolvers/report/monthly-block-dispatch-reports.ts +0 -122
- package/server/graphql/resolvers/report/monthly-dispatch-summary-reports.ts +0 -114
- package/server/graphql/resolvers/report/monthly-ffb-sale-reports.ts +0 -111
- package/server/graphql/resolvers/report/monthly-production-reports.ts +0 -117
- package/server/graphql/resolvers/report/yearly-production-reports.ts +0 -101
- package/server/graphql/resolvers/truck/delete-trucks.ts +0 -21
- package/server/graphql/resolvers/truck/index.ts +0 -12
- package/server/graphql/resolvers/truck/truck-query.ts +0 -50
- package/server/graphql/resolvers/truck/update-multiple-truck.ts +0 -55
- package/server/graphql/types/block/block-list.ts +0 -8
- package/server/graphql/types/block/block-patch.ts +0 -13
- package/server/graphql/types/block/block.ts +0 -18
- package/server/graphql/types/block/index.ts +0 -18
- package/server/graphql/types/block/new-block.ts +0 -8
- package/server/graphql/types/block-detail/block-detail-list.ts +0 -8
- package/server/graphql/types/block-detail/block-detail-patch.ts +0 -16
- package/server/graphql/types/block-detail/block-detail.ts +0 -21
- package/server/graphql/types/block-detail/index.ts +0 -18
- package/server/graphql/types/block-detail/new-block-detail.ts +0 -13
- package/server/graphql/types/daily-block-detail/daily-block-detail-list.ts +0 -8
- package/server/graphql/types/daily-block-detail/daily-block-detail-patch.ts +0 -10
- package/server/graphql/types/daily-block-detail/daily-block-detail.ts +0 -18
- package/server/graphql/types/daily-block-detail/index.ts +0 -21
- package/server/graphql/types/daily-block-detail/new-daily-block-detail.ts +0 -8
- package/server/graphql/types/daily-dispatch/daily-dispatch-list.ts +0 -8
- package/server/graphql/types/daily-dispatch/daily-dispatch-patch.ts +0 -22
- package/server/graphql/types/daily-dispatch/daily-dispatch.ts +0 -27
- package/server/graphql/types/daily-dispatch/index.ts +0 -24
- package/server/graphql/types/daily-dispatch/new-daily-dispatch.ts +0 -20
- package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail-list.ts +0 -8
- package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail-patch.ts +0 -16
- package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail.ts +0 -21
- package/server/graphql/types/daily-dispatch-detail/index.ts +0 -14
- package/server/graphql/types/daily-dispatch-detail/new-daily-dispatch-detail.ts +0 -12
- package/server/graphql/types/daily-harvest/daily-harvest-list.ts +0 -8
- package/server/graphql/types/daily-harvest/daily-harvest-patch.ts +0 -17
- package/server/graphql/types/daily-harvest/daily-harvest.ts +0 -27
- package/server/graphql/types/daily-harvest/index.ts +0 -19
- package/server/graphql/types/daily-harvest/new-daily-harvest.ts +0 -15
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-list.ts +0 -8
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-patch.ts +0 -11
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail.ts +0 -20
- package/server/graphql/types/daily-harvest-detail/index.ts +0 -14
- package/server/graphql/types/daily-harvest-detail/new-daily-harvest-detail.ts +0 -10
- package/server/graphql/types/daily-loading/daily-loading-list.ts +0 -8
- package/server/graphql/types/daily-loading/daily-loading-patch.ts +0 -8
- package/server/graphql/types/daily-loading/daily-loading.ts +0 -21
- package/server/graphql/types/daily-loading/index.ts +0 -19
- package/server/graphql/types/daily-loading/new-daily-loading.ts +0 -8
- package/server/graphql/types/daily-loading-detail/daily-loading-detail-list.ts +0 -8
- package/server/graphql/types/daily-loading-detail/daily-loading-detail-patch.ts +0 -14
- package/server/graphql/types/daily-loading-detail/daily-loading-detail.ts +0 -23
- package/server/graphql/types/daily-loading-detail/index.ts +0 -14
- package/server/graphql/types/daily-loading-detail/new-daily-loading-detail.ts +0 -13
- package/server/graphql/types/daily-loading-ramp/daily-loading-ramp-list.ts +0 -8
- package/server/graphql/types/daily-loading-ramp/daily-loading-ramp-patch.ts +0 -13
- package/server/graphql/types/daily-loading-ramp/daily-loading-ramp.ts +0 -17
- package/server/graphql/types/daily-loading-ramp/index.ts +0 -18
- package/server/graphql/types/daily-loading-ramp/new-daily-loading-ramp.ts +0 -11
- package/server/graphql/types/dashboard/bunches-count.ts +0 -9
- package/server/graphql/types/dashboard/index.ts +0 -17
- package/server/graphql/types/dashboard/productions-overview.ts +0 -9
- package/server/graphql/types/dashboard/tonnage-bunches-inventories.ts +0 -8
- package/server/graphql/types/dashboard/tonnage-production.ts +0 -11
- package/server/graphql/types/dashboard/yield-production.ts +0 -11
- package/server/graphql/types/index.ts +0 -20
- package/server/graphql/types/organization/index.ts +0 -18
- package/server/graphql/types/organization/new-organization.ts +0 -9
- package/server/graphql/types/organization/organization-list.ts +0 -8
- package/server/graphql/types/organization/organization-patch.ts +0 -11
- package/server/graphql/types/organization/organization.ts +0 -16
- package/server/graphql/types/organization-staff/index.ts +0 -19
- package/server/graphql/types/organization-staff/new-organization-staff.ts +0 -8
- package/server/graphql/types/organization-staff/organization-staff-list.ts +0 -8
- package/server/graphql/types/organization-staff/organization-staff-patch.ts +0 -15
- package/server/graphql/types/organization-staff/organization-staff.ts +0 -21
- package/server/graphql/types/plantation-inventory/index.ts +0 -14
- package/server/graphql/types/plantation-inventory/new-plantation-inventory.ts +0 -8
- package/server/graphql/types/plantation-inventory/plantation-inventory-list.ts +0 -8
- package/server/graphql/types/plantation-inventory/plantation-inventory-patch.ts +0 -10
- package/server/graphql/types/plantation-inventory/plantation-inventory.ts +0 -22
- package/server/graphql/types/plantation-setting/index.ts +0 -21
- package/server/graphql/types/plantation-setting/new-plantation-setting.ts +0 -10
- package/server/graphql/types/plantation-setting/plantation-setting-list.ts +0 -8
- package/server/graphql/types/plantation-setting/plantation-setting-patch.ts +0 -12
- package/server/graphql/types/plantation-setting/plantation-setting.ts +0 -16
- package/server/graphql/types/ramp/index.ts +0 -18
- package/server/graphql/types/ramp/new-ramp.ts +0 -8
- package/server/graphql/types/ramp/ramp-list.ts +0 -8
- package/server/graphql/types/ramp/ramp-patch.ts +0 -12
- package/server/graphql/types/ramp/ramp.ts +0 -17
- package/server/graphql/types/record-transaction/index.ts +0 -14
- package/server/graphql/types/record-transaction/new-record-transaction.ts +0 -8
- package/server/graphql/types/record-transaction/record-transaction-list.ts +0 -8
- package/server/graphql/types/record-transaction/record-transaction-patch.ts +0 -10
- package/server/graphql/types/record-transaction/record-transaction.ts +0 -24
- package/server/graphql/types/report/daily-ffb-dispatch-production-report-list.ts +0 -8
- package/server/graphql/types/report/daily-ffb-dispatch-production-report.ts +0 -9
- package/server/graphql/types/report/daily-production-report-list.ts +0 -8
- package/server/graphql/types/report/daily-production-report.ts +0 -23
- package/server/graphql/types/report/daily-staff-harvest-report-list.ts +0 -8
- package/server/graphql/types/report/daily-staff-harvest-report.ts +0 -10
- package/server/graphql/types/report/index.ts +0 -62
- package/server/graphql/types/report/monthly-block-dispatch-report-list.ts +0 -7
- package/server/graphql/types/report/monthly-block-dispatch-report.ts +0 -13
- package/server/graphql/types/report/monthly-dispatch-summary-report-list.ts +0 -7
- package/server/graphql/types/report/monthly-dispatch-summary-report.ts +0 -19
- package/server/graphql/types/report/monthly-ffb-sale-report-list.ts +0 -7
- package/server/graphql/types/report/monthly-ffb-sale-report.ts +0 -18
- package/server/graphql/types/report/monthly-production-report-list.ts +0 -8
- package/server/graphql/types/report/monthly-production-report.ts +0 -25
- package/server/graphql/types/report/yearly-production-report-list.ts +0 -8
- package/server/graphql/types/report/yearly-production-report.ts +0 -18
- package/server/graphql/types/truck/index.ts +0 -18
- package/server/graphql/types/truck/new-truck.ts +0 -8
- package/server/graphql/types/truck/truck-list.ts +0 -8
- package/server/graphql/types/truck/truck-patch.ts +0 -11
- package/server/graphql/types/truck/truck.ts +0 -16
- package/server/index.ts +0 -6
- package/server/middlewares/index.ts +0 -3
- package/server/migrations/index.ts +0 -9
- package/server/routes.ts +0 -7
- package/server/utils/core-values.ts +0 -98
- package/server/utils/datetime-util.ts +0 -39
- package/server/utils/index.ts +0 -4
- package/server/utils/no-generator.ts +0 -64
- package/server/utils/transaction-util.ts +0 -101
package/server/entities/truck.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Column,
|
|
3
|
-
CreateDateColumn,
|
|
4
|
-
Entity,
|
|
5
|
-
Index,
|
|
6
|
-
ManyToOne,
|
|
7
|
-
PrimaryGeneratedColumn,
|
|
8
|
-
RelationId,
|
|
9
|
-
UpdateDateColumn
|
|
10
|
-
} from 'typeorm'
|
|
11
|
-
|
|
12
|
-
import { User } from '@things-factory/auth-base'
|
|
13
|
-
import { Domain } from '@things-factory/shell'
|
|
14
|
-
|
|
15
|
-
import { Organization } from '../entities'
|
|
16
|
-
|
|
17
|
-
@Entity()
|
|
18
|
-
@Index('ix_truck_0', (truck: Truck) => [truck.domain, truck.id], { unique: true })
|
|
19
|
-
export class Truck {
|
|
20
|
-
@PrimaryGeneratedColumn('uuid')
|
|
21
|
-
id: string
|
|
22
|
-
|
|
23
|
-
@ManyToOne(type => Domain)
|
|
24
|
-
domain: Domain
|
|
25
|
-
|
|
26
|
-
@RelationId((truck: Truck) => truck.domain)
|
|
27
|
-
domainId: string
|
|
28
|
-
|
|
29
|
-
@Column()
|
|
30
|
-
name: string
|
|
31
|
-
|
|
32
|
-
@Column({ nullable: true })
|
|
33
|
-
description: string
|
|
34
|
-
|
|
35
|
-
@ManyToOne(type => Organization)
|
|
36
|
-
organization: Organization
|
|
37
|
-
|
|
38
|
-
@Column({ nullable: true })
|
|
39
|
-
deletedAt: Date
|
|
40
|
-
|
|
41
|
-
@CreateDateColumn()
|
|
42
|
-
createdAt: Date
|
|
43
|
-
|
|
44
|
-
@UpdateDateColumn()
|
|
45
|
-
updatedAt: Date
|
|
46
|
-
|
|
47
|
-
@ManyToOne(type => User, { nullable: true })
|
|
48
|
-
creator: User
|
|
49
|
-
|
|
50
|
-
@RelationId((truck: Truck) => truck.creator)
|
|
51
|
-
creatorId: string
|
|
52
|
-
|
|
53
|
-
@ManyToOne(type => User, { nullable: true })
|
|
54
|
-
updater: User
|
|
55
|
-
|
|
56
|
-
@RelationId((truck: Truck) => truck.updater)
|
|
57
|
-
updaterId: string
|
|
58
|
-
}
|
package/server/graphql/index.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IsNull } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { buildQuery, ListParam } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { Block as BlockEntity } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const Query = {
|
|
8
|
-
async block(_: any, { name }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
|
|
11
|
-
return await tx.getRepository(BlockEntity).findOne({
|
|
12
|
-
where: { domain: { id: domain.id }, name, deletedAt: IsNull() },
|
|
13
|
-
relations: ['domain', 'creator', 'updater']
|
|
14
|
-
})
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
async blocks(_: any, params: ListParam, context: ResolverContext) {
|
|
18
|
-
const { tx } = context.state
|
|
19
|
-
|
|
20
|
-
const queryBuilder = tx.getRepository(BlockEntity).createQueryBuilder()
|
|
21
|
-
buildQuery(queryBuilder, params, context)
|
|
22
|
-
|
|
23
|
-
queryBuilder
|
|
24
|
-
.leftJoinAndSelect('Block.domain', 'Domain')
|
|
25
|
-
.leftJoinAndSelect('Block.parentBlock', 'ParentBlock')
|
|
26
|
-
.leftJoinAndSelect('Block.creator', 'Creator')
|
|
27
|
-
.leftJoinAndSelect('Block.updater', 'Updater')
|
|
28
|
-
|
|
29
|
-
if (params.filters?.length > 0) queryBuilder.andWhere('Block.deletedAt IS NULL')
|
|
30
|
-
else queryBuilder.where('Block.deletedAt IS NULL')
|
|
31
|
-
|
|
32
|
-
const [items, total] = await queryBuilder.getManyAndCount()
|
|
33
|
-
|
|
34
|
-
return { items, total }
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { In, IsNull, Not } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Block, BlockDetail } from '../../../entities'
|
|
4
|
-
|
|
5
|
-
export const deleteBlocks = {
|
|
6
|
-
async deleteBlocks(_: any, { ids }, context: ResolverContext) {
|
|
7
|
-
try {
|
|
8
|
-
const { tx, domain } = context.state
|
|
9
|
-
const block = await tx.getRepository(Block).find({ where: { id: In(ids), deletedAt: Not(IsNull()) } })
|
|
10
|
-
|
|
11
|
-
await tx.getRepository(Block).update(
|
|
12
|
-
{
|
|
13
|
-
domain: { id: domain.id },
|
|
14
|
-
id: In(ids)
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
deletedAt: new Date()
|
|
18
|
-
}
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
await Promise.all(
|
|
22
|
-
block.map(async blk => {
|
|
23
|
-
await tx.getRepository(BlockDetail).update(
|
|
24
|
-
{
|
|
25
|
-
domain: { id: domain.id },
|
|
26
|
-
block: { id: blk.id }
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
deletedAt: new Date()
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
})
|
|
33
|
-
)
|
|
34
|
-
return true
|
|
35
|
-
} catch (error) {
|
|
36
|
-
throw error
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Query } from './block-query'
|
|
2
|
-
import { updateMultipleBlockResolver } from './update-multiple-block'
|
|
3
|
-
import { deleteBlocks } from './delete-blocks'
|
|
4
|
-
|
|
5
|
-
export const BlockResolver = {
|
|
6
|
-
Query,
|
|
7
|
-
Mutation: {
|
|
8
|
-
...updateMultipleBlockResolver,
|
|
9
|
-
...deleteBlocks
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { EntityManager, Repository } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { User } from '@things-factory/auth-base'
|
|
4
|
-
import { getRepository } from '@things-factory/shell'
|
|
5
|
-
|
|
6
|
-
import { Block } from '../../../entities'
|
|
7
|
-
|
|
8
|
-
export const updateMultipleBlockResolver = {
|
|
9
|
-
updateMultipleBlock
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export async function updateMultipleBlock(_: any, { patches }, context: ResolverContext) {
|
|
13
|
-
const { domain, user, tx } = context.state
|
|
14
|
-
const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
|
|
15
|
-
const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
|
|
16
|
-
const blockRepo = tx.getRepository(Block)
|
|
17
|
-
|
|
18
|
-
let results = []
|
|
19
|
-
|
|
20
|
-
if (_createRecords.length > 0) {
|
|
21
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
22
|
-
const newRecord = _createRecords[i]
|
|
23
|
-
|
|
24
|
-
if (newRecord?.parentBlock) {
|
|
25
|
-
await updateParentBlock(tx, user, newRecord.parentBlock)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const result = await blockRepo.save({
|
|
29
|
-
...newRecord,
|
|
30
|
-
parentBlock: newRecord?.parentBlock ? await blockRepo.findOneBy({ id: newRecord.parentBlock.id }) : null,
|
|
31
|
-
hasChildren: false,
|
|
32
|
-
domain,
|
|
33
|
-
creator: user,
|
|
34
|
-
updater: user
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
results.push({ ...result, cuFlag: '+' })
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (_updateRecords.length > 0) {
|
|
42
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
43
|
-
const newRecord = _updateRecords[i]
|
|
44
|
-
const block = await blockRepo.findOneBy({ id: newRecord.id })
|
|
45
|
-
|
|
46
|
-
if (newRecord?.parentBlock) {
|
|
47
|
-
await updateParentBlock(tx, user, newRecord.parentBlock)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const result = await blockRepo.save({
|
|
51
|
-
...block,
|
|
52
|
-
...newRecord,
|
|
53
|
-
updater: user
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
results.push({ ...result, cuFlag: 'M' })
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return results
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export async function updateParentBlock(tx: EntityManager, user: User, parentBlock: Block): Promise<void> {
|
|
64
|
-
const blockRepo: Repository<Block> = tx ? tx.getRepository(Block) : getRepository(Block)
|
|
65
|
-
parentBlock = await blockRepo.findOneBy({ id: parentBlock.id })
|
|
66
|
-
parentBlock.hasChildren = true
|
|
67
|
-
parentBlock.updater = user
|
|
68
|
-
await blockRepo.save(parentBlock)
|
|
69
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { IsNull } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { buildQuery, getRepository, ListParam } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { Block, BlockDetail as BlockDetailEntity } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const Query = {
|
|
8
|
-
async blockDetail(_: any, { name }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
|
|
11
|
-
return await tx.getRepository(BlockDetailEntity).findOne({
|
|
12
|
-
where: { domain: { id: domain.id }, name, deletedAt: IsNull() },
|
|
13
|
-
relations: ['domain', 'block', 'creator', 'updater']
|
|
14
|
-
})
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
async blockDetails(_: any, params: ListParam, context: ResolverContext) {
|
|
18
|
-
const { tx } = context.state
|
|
19
|
-
|
|
20
|
-
const customFilterNames = ['blockId', 'yearPlanted']
|
|
21
|
-
const customFilters = params.filters.filter(x => customFilterNames.indexOf(x.name) >= 0)
|
|
22
|
-
|
|
23
|
-
const queryBuilder = tx.getRepository(BlockDetailEntity).createQueryBuilder()
|
|
24
|
-
buildQuery(queryBuilder, params, context)
|
|
25
|
-
|
|
26
|
-
queryBuilder
|
|
27
|
-
.leftJoinAndSelect('BlockDetail.domain', 'Domain')
|
|
28
|
-
.leftJoinAndSelect('BlockDetail.creator', 'Creator')
|
|
29
|
-
.leftJoinAndSelect('BlockDetail.updater', 'Updater')
|
|
30
|
-
.leftJoinAndSelect('BlockDetail.block', 'Block')
|
|
31
|
-
.where('BlockDetail.deletedAt IS NULL')
|
|
32
|
-
|
|
33
|
-
let blockId = customFilters.find(x => x.name == 'blockId')
|
|
34
|
-
if (blockId) {
|
|
35
|
-
queryBuilder.andWhere('"Block"."id" = :blockId', { blockId: blockId.value })
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
let yearPlanted = customFilters.find(x => x.name == 'yearPlanted')
|
|
39
|
-
if (yearPlanted) {
|
|
40
|
-
queryBuilder.andWhere('BlockDetail.yearPlanted = :yearPlanted', { yearPlanted: yearPlanted.value })
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
queryBuilder.orderBy('BlockDetail.validFrom', 'DESC')
|
|
44
|
-
|
|
45
|
-
const [items, total] = await queryBuilder.getManyAndCount()
|
|
46
|
-
|
|
47
|
-
return { items, total }
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const BlockDetail = {
|
|
52
|
-
async block(blockDetail) {
|
|
53
|
-
return await getRepository(Block).findOneBy({ id: blockDetail.blockId })
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { In } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { BlockDetail } from '../../../entities'
|
|
4
|
-
|
|
5
|
-
export const deleteBlockDetails = {
|
|
6
|
-
async deleteBlockDetails(_: any, { ids }, context: ResolverContext) {
|
|
7
|
-
const { domain, tx } = context.state
|
|
8
|
-
|
|
9
|
-
await tx.getRepository(BlockDetail).update(
|
|
10
|
-
{
|
|
11
|
-
domain: { id: domain.id },
|
|
12
|
-
id: In(ids)
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
deletedAt: new Date()
|
|
16
|
-
}
|
|
17
|
-
)
|
|
18
|
-
return true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Query, BlockDetail } from './block-detail-query'
|
|
2
|
-
import { updateMultipleBlockDetail } from './update-multiple-block-detail'
|
|
3
|
-
import { deleteBlockDetails } from './delete-block-details'
|
|
4
|
-
|
|
5
|
-
export const BlockDetailResolver = {
|
|
6
|
-
BlockDetail,
|
|
7
|
-
Query,
|
|
8
|
-
Mutation: {
|
|
9
|
-
...updateMultipleBlockDetail,
|
|
10
|
-
...deleteBlockDetails
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Block, BlockDetail } from '../../../entities'
|
|
2
|
-
import { NoGenerator } from '../../../utils'
|
|
3
|
-
|
|
4
|
-
export const updateMultipleBlockDetail = {
|
|
5
|
-
async updateMultipleBlockDetail(_: any, { patches }, context: ResolverContext) {
|
|
6
|
-
const { domain, user, tx } = context.state
|
|
7
|
-
|
|
8
|
-
let results = []
|
|
9
|
-
const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
|
|
10
|
-
const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
|
|
11
|
-
const blockDetailRepo = tx.getRepository(BlockDetail)
|
|
12
|
-
const blockRepo = tx.getRepository(Block)
|
|
13
|
-
|
|
14
|
-
if (_createRecords.length > 0) {
|
|
15
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
16
|
-
const newRecord = _createRecords[i]
|
|
17
|
-
|
|
18
|
-
if (!newRecord.block?.id) throw new Error('No block information found')
|
|
19
|
-
const block = await blockRepo.findOneBy({ id: newRecord.block.id })
|
|
20
|
-
|
|
21
|
-
const result = await blockDetailRepo.save({
|
|
22
|
-
...newRecord,
|
|
23
|
-
domain,
|
|
24
|
-
name: NoGenerator.blockDetail(),
|
|
25
|
-
block,
|
|
26
|
-
creator: user,
|
|
27
|
-
updater: user
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
results.push({ ...result, cuFlag: '+' })
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (_updateRecords.length > 0) {
|
|
35
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
36
|
-
const newRecord = _updateRecords[i]
|
|
37
|
-
const blockDetail = await blockDetailRepo.findOneBy({ id: newRecord.id })
|
|
38
|
-
|
|
39
|
-
if (!newRecord.block?.id) throw new Error('No block information found')
|
|
40
|
-
const block = await blockRepo.findOneBy({ id: newRecord.block.id })
|
|
41
|
-
|
|
42
|
-
const result = await blockDetailRepo.save({
|
|
43
|
-
...blockDetail,
|
|
44
|
-
...newRecord,
|
|
45
|
-
block,
|
|
46
|
-
updater: user
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
results.push({ ...result, cuFlag: 'M' })
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return results
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DailyBlockDetail } from '../../../entities'
|
|
2
|
-
|
|
3
|
-
export const createDailyBlockDetail = {
|
|
4
|
-
async createDailyBlockDetail(_: any, { dailyBlockDetail }, context: ResolverContext) {
|
|
5
|
-
const { domain, tx, user } = context.state
|
|
6
|
-
|
|
7
|
-
return await tx.getRepository(DailyBlockDetail).save({
|
|
8
|
-
...dailyBlockDetail,
|
|
9
|
-
domain,
|
|
10
|
-
creator: user,
|
|
11
|
-
updater: user
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { EntityManager, IsNull } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { buildQuery, Domain, ListParam } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { DailyBlockDetail as DailyBlockDetailEntity } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const Query = {
|
|
8
|
-
async dailyBlockDetail(_: any, { name }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
|
|
11
|
-
return await tx.getRepository(DailyBlockDetailEntity).findOne({
|
|
12
|
-
where: { domain: { id: domain.id }, name, deletedAt: IsNull() },
|
|
13
|
-
relations: ['domain', 'block', 'creator', 'updater']
|
|
14
|
-
})
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
async dailyBlockDetails(_: any, params: ListParam, context: ResolverContext) {
|
|
18
|
-
const { tx } = context.state
|
|
19
|
-
|
|
20
|
-
const queryBuilder = tx.getRepository(DailyBlockDetailEntity).createQueryBuilder()
|
|
21
|
-
buildQuery(queryBuilder, params, context)
|
|
22
|
-
|
|
23
|
-
queryBuilder
|
|
24
|
-
.leftJoinAndSelect('DailyBlockDetail.domain', 'Domain')
|
|
25
|
-
.leftJoinAndSelect('DailyBlockDetail.block', 'Block')
|
|
26
|
-
.leftJoinAndSelect('DailyBlockDetail.creator', 'Creator')
|
|
27
|
-
.leftJoinAndSelect('DailyBlockDetail.updater', 'Updater')
|
|
28
|
-
|
|
29
|
-
if (params.filters?.length > 0) queryBuilder.andWhere('DailyBlockDetail.deletedAt IS NULL')
|
|
30
|
-
else queryBuilder.where('DailyBlockDetail.deletedAt IS NULL')
|
|
31
|
-
|
|
32
|
-
const [items, total] = await queryBuilder.getManyAndCount()
|
|
33
|
-
|
|
34
|
-
return { items, total }
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { EntityManager } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Domain } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { DailyBlockDetail } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const deleteDailyBlockDetail = {
|
|
8
|
-
async deleteDailyBlockDetail(_: any, { name }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
|
|
11
|
-
await tx.getRepository(DailyBlockDetail).delete({ domain, name })
|
|
12
|
-
return true
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EntityManager, In } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Domain } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { DailyBlockDetail } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const deleteDailyBlockDetails = {
|
|
8
|
-
async deleteDailyBlockDetails(_: any, { names }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
|
|
11
|
-
await tx.getRepository(DailyBlockDetail).delete({
|
|
12
|
-
domain: { id: domain.id },
|
|
13
|
-
name: In(names)
|
|
14
|
-
})
|
|
15
|
-
return true
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Query } from './daily-block-detail-query'
|
|
2
|
-
|
|
3
|
-
import { updateDailyBlockDetail } from './update-daily-block-detail'
|
|
4
|
-
import { updateMultipleDailyBlockDetail } from './update-multiple-daily-block-detail'
|
|
5
|
-
import { createDailyBlockDetail } from './create-daily-block-detail'
|
|
6
|
-
import { deleteDailyBlockDetail } from './delete-daily-block-detail'
|
|
7
|
-
import { deleteDailyBlockDetails } from './delete-daily-block-details'
|
|
8
|
-
|
|
9
|
-
export const DailyBlockDetailResolver = {
|
|
10
|
-
Query,
|
|
11
|
-
Mutation: {
|
|
12
|
-
...updateDailyBlockDetail,
|
|
13
|
-
...updateMultipleDailyBlockDetail,
|
|
14
|
-
...createDailyBlockDetail,
|
|
15
|
-
...deleteDailyBlockDetail,
|
|
16
|
-
...deleteDailyBlockDetails
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DailyBlockDetail } from '../../../entities'
|
|
2
|
-
|
|
3
|
-
export const updateDailyBlockDetail = {
|
|
4
|
-
async updateDailyBlockDetail(_: any, { name, patch }, context: ResolverContext) {
|
|
5
|
-
const { domain, tx, user } = context.state
|
|
6
|
-
|
|
7
|
-
const dailyBlockDetail = await tx.getRepository(DailyBlockDetail).findOne({
|
|
8
|
-
where: { domain: { id: domain.id }, name }
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
return await tx.getRepository(DailyBlockDetail).save({
|
|
12
|
-
...dailyBlockDetail,
|
|
13
|
-
...patch,
|
|
14
|
-
updater: user
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DailyBlockDetail } from '../../../entities'
|
|
2
|
-
|
|
3
|
-
export const updateMultipleDailyBlockDetail = {
|
|
4
|
-
async updateMultipleDailyBlockDetail(_: any, { patches }, context: ResolverContext) {
|
|
5
|
-
const { domain, tx, user } = context.state
|
|
6
|
-
|
|
7
|
-
let results = []
|
|
8
|
-
const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
|
|
9
|
-
const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
|
|
10
|
-
const dailyBlockDetailRepo = tx.getRepository(DailyBlockDetail)
|
|
11
|
-
|
|
12
|
-
if (_createRecords.length > 0) {
|
|
13
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
14
|
-
const newRecord = _createRecords[i]
|
|
15
|
-
|
|
16
|
-
const result = await dailyBlockDetailRepo.save({
|
|
17
|
-
...newRecord,
|
|
18
|
-
domain,
|
|
19
|
-
creator: user,
|
|
20
|
-
updater: user
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
results.push({ ...result, cuFlag: '+' })
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (_updateRecords.length > 0) {
|
|
28
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
29
|
-
const newRecord = _updateRecords[i]
|
|
30
|
-
const dailyBlockDetail = await dailyBlockDetailRepo.findOneBy({ id: newRecord.id })
|
|
31
|
-
|
|
32
|
-
const result = await dailyBlockDetailRepo.save({
|
|
33
|
-
...dailyBlockDetail,
|
|
34
|
-
...newRecord,
|
|
35
|
-
updater: user
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
results.push({ ...result, cuFlag: 'M' })
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return results
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { EntityManager, IsNull } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { buildQuery, Domain, ListParam } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { DailyDispatch as DailyDispatchEntity } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const Query = {
|
|
8
|
-
async dailyDispatch(_: any, { name }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
|
|
11
|
-
return await tx.getRepository(DailyDispatchEntity).findOne({
|
|
12
|
-
where: { domain: { id: domain.id }, name, deletedAt: IsNull() },
|
|
13
|
-
relations: [
|
|
14
|
-
'domain',
|
|
15
|
-
'dailyDispatchDetails',
|
|
16
|
-
'dailyDispatchDetails.ramp',
|
|
17
|
-
'driver',
|
|
18
|
-
'dispatchTo',
|
|
19
|
-
'transport',
|
|
20
|
-
'creator',
|
|
21
|
-
'updater'
|
|
22
|
-
]
|
|
23
|
-
})
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
async dailyDispatches(_: any, params: ListParam, context: ResolverContext) {
|
|
27
|
-
const { tx } = context.state
|
|
28
|
-
|
|
29
|
-
const queryBuilder = tx.getRepository(DailyDispatchEntity).createQueryBuilder()
|
|
30
|
-
buildQuery(queryBuilder, params, context)
|
|
31
|
-
|
|
32
|
-
queryBuilder
|
|
33
|
-
.leftJoinAndSelect('DailyDispatch.domain', 'Domain')
|
|
34
|
-
.leftJoinAndSelect('DailyDispatch.driver', 'Driver')
|
|
35
|
-
.leftJoinAndSelect('DailyDispatch.dispatchTo', 'DispatchTo')
|
|
36
|
-
.leftJoinAndSelect('DailyDispatch.transport', 'Transport')
|
|
37
|
-
.leftJoinAndSelect('DailyDispatch.creator', 'Creator')
|
|
38
|
-
.leftJoinAndSelect('DailyDispatch.updater', 'Updater')
|
|
39
|
-
.leftJoinAndSelect('DailyDispatch.dailyDispatchDetails', 'DailyDispatchDetails')
|
|
40
|
-
|
|
41
|
-
if (params.filters?.length > 0) queryBuilder.andWhere('DailyDispatch.deletedAt IS NULL')
|
|
42
|
-
else queryBuilder.where('DailyDispatch.deletedAt IS NULL')
|
|
43
|
-
|
|
44
|
-
const [items, total] = await queryBuilder.getManyAndCount()
|
|
45
|
-
|
|
46
|
-
return { items, total }
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { EntityManager, IsNull } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Domain } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { DailyDispatch, DailyDispatchDetail } from '../../../entities'
|
|
6
|
-
|
|
7
|
-
export const deleteDailyDispatch = {
|
|
8
|
-
async deleteDailyDispatch(_: any, { name }, context: ResolverContext) {
|
|
9
|
-
const { domain, tx } = context.state
|
|
10
|
-
const dailyDispatch = await tx
|
|
11
|
-
.getRepository(DailyDispatch)
|
|
12
|
-
.findOneOrFail({ where: { name, deletedAt: IsNull() }, relations: ['dailyDispatchDetails'] })
|
|
13
|
-
|
|
14
|
-
await tx.getRepository(DailyDispatch).update(
|
|
15
|
-
{
|
|
16
|
-
domain: { id: domain.id },
|
|
17
|
-
name
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
deletedAt: new Date()
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
await tx.getRepository(DailyDispatchDetail).update(
|
|
25
|
-
{
|
|
26
|
-
domain: { id: domain.id },
|
|
27
|
-
dailyDispatch: { id: dailyDispatch.id }
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
deletedAt: new Date()
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
}
|