@things-factory/sales-base 8.0.0-beta.1 → 8.0.0-beta.4

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.
Files changed (177) hide show
  1. package/package.json +13 -13
  2. package/server/constants/attachment-type.ts +0 -9
  3. package/server/constants/index.ts +0 -7
  4. package/server/constants/load-type.ts +0 -4
  5. package/server/constants/order.ts +0 -203
  6. package/server/constants/product-group-type.ts +0 -4
  7. package/server/constants/release-good.ts +0 -9
  8. package/server/constants/transfer-order-type.ts +0 -6
  9. package/server/constants/validation-error-code.ts +0 -3
  10. package/server/constants/vas-target-type.ts +0 -25
  11. package/server/controllers/ecommerce/ecommerce-controller.ts +0 -122
  12. package/server/controllers/ecommerce/index.ts +0 -2
  13. package/server/controllers/ecommerce/sellercraft-controller.ts +0 -182
  14. package/server/controllers/index.ts +0 -2
  15. package/server/controllers/order-controller.ts +0 -296
  16. package/server/errors/index.ts +0 -1
  17. package/server/errors/validation-error.ts +0 -25
  18. package/server/index.ts +0 -5
  19. package/server/migrations/index.ts +0 -9
  20. package/server/service/arrival-notice/arrival-notice-mutation.ts +0 -1152
  21. package/server/service/arrival-notice/arrival-notice-query.ts +0 -549
  22. package/server/service/arrival-notice/arrival-notice-types.ts +0 -310
  23. package/server/service/arrival-notice/arrival-notice.ts +0 -202
  24. package/server/service/arrival-notice/index.ts +0 -9
  25. package/server/service/claim/claim-mutation.ts +0 -308
  26. package/server/service/claim/claim-query.ts +0 -122
  27. package/server/service/claim/claim-types.ts +0 -130
  28. package/server/service/claim/claim.ts +0 -140
  29. package/server/service/claim/index.ts +0 -9
  30. package/server/service/claim-detail/claim-detail-mutation.ts +0 -102
  31. package/server/service/claim-detail/claim-detail-query.ts +0 -55
  32. package/server/service/claim-detail/claim-detail-types.ts +0 -47
  33. package/server/service/claim-detail/claim-detail.ts +0 -69
  34. package/server/service/claim-detail/index.ts +0 -9
  35. package/server/service/claim-order/claim-order-mutation.ts +0 -101
  36. package/server/service/claim-order/claim-order-query.ts +0 -47
  37. package/server/service/claim-order/claim-order-types.ts +0 -35
  38. package/server/service/claim-order/claim-order.ts +0 -81
  39. package/server/service/claim-order/index.ts +0 -9
  40. package/server/service/collection-order/collection-order-mutation.ts +0 -245
  41. package/server/service/collection-order/collection-order-query.ts +0 -97
  42. package/server/service/collection-order/collection-order-types.ts +0 -165
  43. package/server/service/collection-order/collection-order.ts +0 -135
  44. package/server/service/collection-order/index.ts +0 -9
  45. package/server/service/delivery-order/delivery-order-mutation.ts +0 -967
  46. package/server/service/delivery-order/delivery-order-query.ts +0 -631
  47. package/server/service/delivery-order/delivery-order-types.ts +0 -268
  48. package/server/service/delivery-order/delivery-order.ts +0 -258
  49. package/server/service/delivery-order/index.ts +0 -9
  50. package/server/service/draft-release-good/draft-release-good-mutation.ts +0 -765
  51. package/server/service/draft-release-good/draft-release-good-query.ts +0 -354
  52. package/server/service/draft-release-good/draft-release-good-type.ts +0 -261
  53. package/server/service/draft-release-good/draft-release-good.ts +0 -284
  54. package/server/service/draft-release-good/index.ts +0 -9
  55. package/server/service/goods-receival-note/goods-receival-note-mutation.ts +0 -129
  56. package/server/service/goods-receival-note/goods-receival-note-query.ts +0 -280
  57. package/server/service/goods-receival-note/goods-receival-note-types.ts +0 -105
  58. package/server/service/goods-receival-note/goods-receival-note.ts +0 -127
  59. package/server/service/goods-receival-note/index.ts +0 -9
  60. package/server/service/index.ts +0 -238
  61. package/server/service/inventory-check/index.ts +0 -9
  62. package/server/service/inventory-check/inventory-check-mutation.ts +0 -149
  63. package/server/service/inventory-check/inventory-check-query.ts +0 -48
  64. package/server/service/inventory-check/inventory-check-types.ts +0 -48
  65. package/server/service/inventory-check/inventory-check.ts +0 -90
  66. package/server/service/invoice/index.ts +0 -9
  67. package/server/service/invoice/invoice-mutation.ts +0 -95
  68. package/server/service/invoice/invoice-query.ts +0 -53
  69. package/server/service/invoice/invoice-types.ts +0 -279
  70. package/server/service/invoice/invoice.ts +0 -230
  71. package/server/service/invoice-product/index.ts +0 -9
  72. package/server/service/invoice-product/invoice-product-mutation.ts +0 -54
  73. package/server/service/invoice-product/invoice-product-query.ts +0 -54
  74. package/server/service/invoice-product/invoice-product-types.ts +0 -84
  75. package/server/service/invoice-product/invoice-product.ts +0 -92
  76. package/server/service/job-sheet/index.ts +0 -9
  77. package/server/service/job-sheet/job-sheet-mutation.ts +0 -92
  78. package/server/service/job-sheet/job-sheet-query.ts +0 -112
  79. package/server/service/job-sheet/job-sheet-types.ts +0 -78
  80. package/server/service/job-sheet/job-sheet.ts +0 -102
  81. package/server/service/manifest/index.ts +0 -6
  82. package/server/service/manifest/manifest-mutation.ts +0 -190
  83. package/server/service/manifest/manifest-query.ts +0 -149
  84. package/server/service/manifest/manifest-type.ts +0 -84
  85. package/server/service/manifest/manifest.ts +0 -114
  86. package/server/service/order-inventory/index.ts +0 -9
  87. package/server/service/order-inventory/order-inventory-mutation.ts +0 -54
  88. package/server/service/order-inventory/order-inventory-query.ts +0 -722
  89. package/server/service/order-inventory/order-inventory-types.ts +0 -238
  90. package/server/service/order-inventory/order-inventory.ts +0 -401
  91. package/server/service/order-product/index.ts +0 -9
  92. package/server/service/order-product/order-product-mutation.ts +0 -48
  93. package/server/service/order-product/order-product-query.ts +0 -89
  94. package/server/service/order-product/order-product-types.ts +0 -335
  95. package/server/service/order-product/order-product.ts +0 -362
  96. package/server/service/order-tote/index.ts +0 -9
  97. package/server/service/order-tote/order-tote-mutation.ts +0 -31
  98. package/server/service/order-tote/order-tote-query.ts +0 -112
  99. package/server/service/order-tote/order-tote-types.ts +0 -47
  100. package/server/service/order-tote/order-tote.ts +0 -73
  101. package/server/service/order-tote-item/index.ts +0 -9
  102. package/server/service/order-tote-item/order-tote-item-mutation.ts +0 -31
  103. package/server/service/order-tote-item/order-tote-item-query.ts +0 -82
  104. package/server/service/order-tote-item/order-tote-item-types.ts +0 -56
  105. package/server/service/order-tote-item/order-tote-item.ts +0 -72
  106. package/server/service/order-tote-seal/index.ts +0 -9
  107. package/server/service/order-tote-seal/order-tote-seal-mutation.ts +0 -31
  108. package/server/service/order-tote-seal/order-tote-seal-query.ts +0 -59
  109. package/server/service/order-tote-seal/order-tote-seal-types.ts +0 -41
  110. package/server/service/order-tote-seal/order-tote-seal.ts +0 -46
  111. package/server/service/order-vas/index.ts +0 -9
  112. package/server/service/order-vas/order-vas-mutation.ts +0 -20
  113. package/server/service/order-vas/order-vas-query.ts +0 -72
  114. package/server/service/order-vas/order-vas-types.ts +0 -159
  115. package/server/service/order-vas/order-vas.ts +0 -207
  116. package/server/service/others/index.ts +0 -5
  117. package/server/service/others/other-query.ts +0 -563
  118. package/server/service/others/other-types.ts +0 -115
  119. package/server/service/purchase-order/index.ts +0 -9
  120. package/server/service/purchase-order/purchase-order-mutation.ts +0 -458
  121. package/server/service/purchase-order/purchase-order-query.ts +0 -90
  122. package/server/service/purchase-order/purchase-order-types.ts +0 -154
  123. package/server/service/purchase-order/purchase-order.ts +0 -172
  124. package/server/service/purchase-order-other-charge/index.ts +0 -9
  125. package/server/service/purchase-order-other-charge/purchase-order-other-charge-mutation.ts +0 -31
  126. package/server/service/purchase-order-other-charge/purchase-order-other-charge-query.ts +0 -52
  127. package/server/service/purchase-order-other-charge/purchase-order-other-charge-types.ts +0 -44
  128. package/server/service/purchase-order-other-charge/purchase-order-other-charge.ts +0 -68
  129. package/server/service/release-good/index.ts +0 -9
  130. package/server/service/release-good/release-good-mutation.ts +0 -1686
  131. package/server/service/release-good/release-good-query.ts +0 -980
  132. package/server/service/release-good/release-good-types.ts +0 -662
  133. package/server/service/release-good/release-good.ts +0 -490
  134. package/server/service/retail-replenishment-order/index.ts +0 -9
  135. package/server/service/retail-replenishment-order/retail-replenishment-order-mutation.ts +0 -382
  136. package/server/service/retail-replenishment-order/retail-replenishment-order-query.ts +0 -54
  137. package/server/service/retail-replenishment-order/retail-replenishment-order-types.ts +0 -101
  138. package/server/service/retail-replenishment-order/retail-replenishment-order.ts +0 -115
  139. package/server/service/return-order/index.ts +0 -9
  140. package/server/service/return-order/return-order-mutation.ts +0 -516
  141. package/server/service/return-order/return-order-query.ts +0 -226
  142. package/server/service/return-order/return-order-types.ts +0 -196
  143. package/server/service/return-order/return-order.ts +0 -127
  144. package/server/service/reverse-kitting-order/index.ts +0 -9
  145. package/server/service/reverse-kitting-order/reverse-kitting-order-mutation.ts +0 -500
  146. package/server/service/reverse-kitting-order/reverse-kitting-order-query.ts +0 -197
  147. package/server/service/reverse-kitting-order/reverse-kitting-order-type.ts +0 -173
  148. package/server/service/reverse-kitting-order/reverse-kitting-order.ts +0 -121
  149. package/server/service/reverse-kitting-order-inventory/index.ts +0 -9
  150. package/server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-mutation.ts +0 -129
  151. package/server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-query.ts +0 -52
  152. package/server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-type.ts +0 -95
  153. package/server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory.ts +0 -143
  154. package/server/service/shipping-order/index.ts +0 -9
  155. package/server/service/shipping-order/shipping-order-mutation.ts +0 -61
  156. package/server/service/shipping-order/shipping-order-query.ts +0 -61
  157. package/server/service/shipping-order/shipping-order-types.ts +0 -89
  158. package/server/service/shipping-order/shipping-order.ts +0 -129
  159. package/server/service/transfer-order/index.ts +0 -9
  160. package/server/service/transfer-order/transfer-order-mutation.ts +0 -309
  161. package/server/service/transfer-order/transfer-order-query.ts +0 -66
  162. package/server/service/transfer-order/transfer-order-types.ts +0 -97
  163. package/server/service/transfer-order/transfer-order.ts +0 -117
  164. package/server/service/vas/index.ts +0 -9
  165. package/server/service/vas/vas-mutation.ts +0 -106
  166. package/server/service/vas/vas-query.ts +0 -60
  167. package/server/service/vas/vas-types.ts +0 -71
  168. package/server/service/vas/vas.ts +0 -77
  169. package/server/service/vas-order/index.ts +0 -9
  170. package/server/service/vas-order/vas-order-mutation.ts +0 -259
  171. package/server/service/vas-order/vas-order-query.ts +0 -119
  172. package/server/service/vas-order/vas-order-types.ts +0 -49
  173. package/server/service/vas-order/vas-order.ts +0 -81
  174. package/server/utils/datetime-util.ts +0 -54
  175. package/server/utils/index.ts +0 -3
  176. package/server/utils/inventory-util.ts +0 -1155
  177. package/server/utils/order-no-generator.ts +0 -146
@@ -1,238 +0,0 @@
1
- import { Field, Float, InputType, Int, ObjectType } from 'type-graphql'
2
-
3
- import { NewProduct } from '@things-factory/product-base'
4
- import { ObjectRef } from '@things-factory/shell'
5
- import { InventoryPatch } from '@things-factory/warehouse-base'
6
-
7
- import { OrderInventory } from './order-inventory'
8
-
9
- @ObjectType()
10
- export class OrderInventoryList {
11
- @Field(type => [OrderInventory], { nullable: true })
12
- items: OrderInventory[]
13
-
14
- @Field(type => Int, { nullable: true })
15
- total: number
16
- }
17
-
18
- @InputType()
19
- export class NewOrderInventory {
20
- @Field({ nullable: true })
21
- name: string
22
-
23
- @Field({ nullable: true })
24
- description: string
25
-
26
- @Field({ nullable: true })
27
- type: string
28
-
29
- @Field(type => ObjectRef, { nullable: true })
30
- arrivalNotice: ObjectRef
31
-
32
- @Field(type => ObjectRef, { nullable: true })
33
- deliveryOrder: ObjectRef
34
-
35
- @Field(type => ObjectRef, { nullable: true })
36
- transferOrder: ObjectRef
37
-
38
- @Field(type => InventoryPatch, { nullable: true })
39
- inventory: InventoryPatch
40
-
41
- @Field(type => NewProduct, { nullable: true })
42
- product: NewProduct
43
-
44
- @Field({ nullable: true })
45
- productSKU: string
46
-
47
- @Field({ nullable: true })
48
- batchId: string
49
-
50
- @Field({ nullable: true })
51
- batchIdRef: string
52
-
53
- @Field({ nullable: true })
54
- productName: string
55
-
56
- @Field({ nullable: true })
57
- batchExp: string
58
-
59
- @Field({ nullable: true })
60
- packingType: string
61
-
62
- @Field(type => Float, { nullable: true })
63
- packingSize: number
64
-
65
- @Field(type => Float, { nullable: true })
66
- releaseQty: number
67
-
68
- @Field(type => Float, { nullable: true })
69
- pickedQty: number
70
-
71
- @Field(type => Float, { nullable: true })
72
- sortedQty: number
73
-
74
- @Field(type => Float, { nullable: true })
75
- packedQty: number
76
-
77
- @Field(type => Float, { nullable: true })
78
- releaseUomValue: number
79
-
80
- @Field({ nullable: true })
81
- uom: string
82
-
83
- @Field(type => Float, { nullable: true })
84
- palletQty: number
85
-
86
- @Field({ nullable: true })
87
- remark: string
88
-
89
- @Field({ nullable: true })
90
- issue: string
91
-
92
- @Field({ nullable: true })
93
- crossDocking: boolean
94
-
95
- @Field({ nullable: true })
96
- status: string
97
-
98
- @Field({ nullable: true })
99
- existingRow: boolean
100
-
101
- @Field(type => Float, { nullable: true })
102
- returnQty: number
103
-
104
- @Field(type => Float, { nullable: true })
105
- returnUomValue: number
106
-
107
- @Field(type => Float, { nullable: true })
108
- returnToLocationQty: number
109
-
110
- @Field(type => Float, { nullable: true })
111
- returnToLocationUomValue: number
112
- }
113
-
114
- @InputType()
115
- export class OrderInventoryPatch {
116
- @Field({ nullable: true })
117
- id: string
118
-
119
- @Field({ nullable: true })
120
- name: string
121
-
122
- @Field({ nullable: true })
123
- description: string
124
-
125
- @Field({ nullable: true })
126
- type: string
127
-
128
- @Field(type => ObjectRef, { nullable: true })
129
- arrivalNotice: ObjectRef
130
-
131
- @Field(type => ObjectRef, { nullable: true })
132
- deliveryOrder: ObjectRef
133
-
134
- @Field(type => ObjectRef, { nullable: true })
135
- transferOrder: ObjectRef
136
-
137
- @Field(type => ObjectRef, { nullable: true })
138
- returnOrder: ObjectRef
139
-
140
- @Field(type => ObjectRef, { nullable: true })
141
- inventory: ObjectRef
142
-
143
- @Field(type => Int, { nullable: true })
144
- inspectedQty: number
145
-
146
- @Field(type => Float, { nullable: true })
147
- inspectedUomValue: number
148
-
149
- @Field(type => ObjectRef, { nullable: true })
150
- inspectedLocation: ObjectRef
151
-
152
- @Field(type => ObjectRef, { nullable: true })
153
- binLocation: ObjectRef
154
-
155
- @Field({ nullable: true })
156
- inspectedBatchNo: string
157
-
158
- @Field(type => ObjectRef, { nullable: true })
159
- product: ObjectRef
160
-
161
- @Field(type => ObjectRef, { nullable: true })
162
- orderProduct: ObjectRef
163
-
164
- @Field({ nullable: true })
165
- batchId: string
166
-
167
- @Field({ nullable: true })
168
- batchIdRef: string
169
-
170
- @Field({ nullable: true })
171
- packingType: string
172
-
173
- @Field(type => Float, { nullable: true })
174
- packingSize: number
175
-
176
- @Field({ nullable: true })
177
- productName: string
178
-
179
- @Field({ nullable: true })
180
- pallet: string
181
-
182
- @Field({ nullable: true })
183
- extraJsonData: string
184
-
185
- @Field(type => Float, { nullable: true })
186
- releaseQty: number
187
-
188
- @Field({ nullable: true })
189
- serialNumber: string
190
-
191
- @Field(type => Int, { nullable: true })
192
- sortedQty: number
193
-
194
- @Field(type => Int, { nullable: true })
195
- pickedQty: number
196
-
197
- @Field(type => Int, { nullable: true })
198
- packedQty: number
199
-
200
- @Field({ nullable: true })
201
- productId: string
202
-
203
- @Field({ nullable: true })
204
- orderProductId: string
205
-
206
- @Field({ nullable: true })
207
- uom: string
208
-
209
- @Field(type => Float, { nullable: true })
210
- releaseUomValue: number
211
-
212
- @Field(type => Float, { nullable: true })
213
- returnUomValue: number
214
-
215
- @Field(type => Float, { nullable: true })
216
- actualPackQty: number
217
-
218
- @Field(type => Int, { nullable: true })
219
- actualPalletQty: number
220
-
221
- @Field({ nullable: true })
222
- remark: string
223
-
224
- @Field({ nullable: true })
225
- issue: string
226
-
227
- @Field({ nullable: true })
228
- crossDocking: Boolean
229
-
230
- @Field({ nullable: true })
231
- status: string
232
-
233
- @Field({ nullable: true })
234
- pickingStrategy: string
235
-
236
- @Field({ nullable: true })
237
- cuFlag?: string
238
- }
@@ -1,401 +0,0 @@
1
- import { Field, Float, ID, ObjectType } from 'type-graphql'
2
- import { Column, CreateDateColumn, Entity, Index, ManyToOne, OneToMany, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
3
-
4
- import { User } from '@things-factory/auth-base'
5
- import { Bizplace } from '@things-factory/biz-base'
6
- import { Product } from '@things-factory/product-base'
7
- import { Domain, roundTransformer } from '@things-factory/shell'
8
- import { Inventory, Location } from '@things-factory/warehouse-base'
9
-
10
- import { ArrivalNotice } from '../arrival-notice/arrival-notice'
11
- import { DeliveryOrder } from '../delivery-order/delivery-order'
12
- import { InventoryCheck } from '../inventory-check/inventory-check'
13
- import { OrderProduct } from '../order-product/order-product'
14
- import { OrderToteItem } from '../order-tote-item/order-tote-item'
15
- import { ReleaseGood } from '../release-good/release-good'
16
- import { ReturnOrder } from '../return-order/return-order'
17
- import { TransferOrder } from '../transfer-order/transfer-order'
18
-
19
- @Entity()
20
- @Index('ix_order-inventory_0', (orderInventory: OrderInventory) => [orderInventory.domain, orderInventory.name], {
21
- unique: true
22
- })
23
- @Index('ix_order-inventory_1', (orderInventory: OrderInventory) => [orderInventory.bizplace, orderInventory.inventoryCheck, orderInventory.inventory], { unique: true })
24
- @Index('ix_order-inventory_2', (orderInventory: OrderInventory) => [orderInventory.bizplace, orderInventory.deliveryOrder, orderInventory.inventory])
25
- @Index(
26
- 'ix_order-inventory_3',
27
- (orderInventory: OrderInventory) => [orderInventory.bizplace, orderInventory.transferOrder, orderInventory.deliveryOrder, orderInventory.inventory],
28
- { unique: true }
29
- )
30
- @Index('ix_order-inventory_4', (orderInventory: OrderInventory) => [
31
- orderInventory.status,
32
- orderInventory.batchId,
33
- orderInventory.product,
34
- orderInventory.packingType,
35
- orderInventory.packingSize,
36
- orderInventory.inventory,
37
- orderInventory.releaseQty,
38
- orderInventory.uom
39
- ])
40
- @Index('ix_order-inventory_5', (orderInventory: OrderInventory) => [orderInventory.releaseGood])
41
- @ObjectType()
42
- export class OrderInventory {
43
- @PrimaryGeneratedColumn('uuid')
44
- @Field(type => ID, { nullable: true })
45
- readonly id: string
46
-
47
- @ManyToOne(type => Domain)
48
- @Field(type => Domain, { nullable: true })
49
- domain: Domain
50
-
51
- @RelationId((orderInventory: OrderInventory) => orderInventory.domain)
52
- domainId: string
53
-
54
- @ManyToOne(type => Bizplace)
55
- @Field(type => Bizplace, { nullable: true })
56
- bizplace: Bizplace
57
-
58
- @RelationId((orderInventory: OrderInventory) => orderInventory.bizplace)
59
- bizplaceId: string
60
-
61
- @Column()
62
- @Field({ nullable: true })
63
- name: string
64
-
65
- @Column({ nullable: true })
66
- @Field({ nullable: true })
67
- type: string
68
-
69
- @Column({ nullable: true })
70
- @Field({ nullable: true })
71
- remark: string
72
-
73
- @Column({ nullable: true })
74
- @Field({ nullable: true })
75
- issue: string
76
-
77
- @Column({ nullable: true })
78
- @Field({ nullable: true })
79
- description: string
80
-
81
- @ManyToOne(type => Inventory, { nullable: true })
82
- @Field(type => Inventory, { nullable: true })
83
- inventory: Inventory
84
-
85
- @RelationId((orderInventory: OrderInventory) => orderInventory.inventory)
86
- inventoryId: string
87
-
88
- @ManyToOne(type => Product, { nullable: true })
89
- @Field(type => Product, { nullable: true })
90
- product: Product
91
-
92
- @RelationId((orderInventory: OrderInventory) => orderInventory.product)
93
- @Field({ nullable: true })
94
- productId: string
95
-
96
- @Column({ nullable: true })
97
- @Field({ nullable: true })
98
- batchId: string
99
-
100
- @Column({ nullable: true })
101
- @Field({ nullable: true })
102
- batchIdRef: string
103
-
104
- @Column({ nullable: true })
105
- @Field({ nullable: true })
106
- packingType: string
107
-
108
- @Column('float', { default: 1, transformer: roundTransformer })
109
- @Field({ nullable: true })
110
- packingSize?: number
111
-
112
- @ManyToOne(type => ArrivalNotice)
113
- @Field(type => ArrivalNotice, { nullable: true })
114
- arrivalNotice: ArrivalNotice
115
-
116
- @RelationId((orderInventory: OrderInventory) => orderInventory.arrivalNotice)
117
- arrivalNoticeId: string
118
-
119
- @ManyToOne(type => ReleaseGood)
120
- @Field(type => ReleaseGood, { nullable: true })
121
- releaseGood: ReleaseGood
122
-
123
- @RelationId((orderInventory: OrderInventory) => orderInventory.releaseGood)
124
- releaseGoodId: string
125
-
126
- @ManyToOne(type => InventoryCheck)
127
- @Field(type => InventoryCheck, { nullable: true })
128
- inventoryCheck: InventoryCheck
129
-
130
- @RelationId((orderInventory: OrderInventory) => orderInventory.inventoryCheck)
131
- inventoryCheckId: string
132
-
133
- @ManyToOne(type => DeliveryOrder)
134
- @Field(type => DeliveryOrder, { nullable: true })
135
- deliveryOrder: DeliveryOrder
136
-
137
- @RelationId((orderInventory: OrderInventory) => orderInventory.deliveryOrder)
138
- deliveryOrderId: string
139
-
140
- @ManyToOne(type => TransferOrder)
141
- @Field(type => TransferOrder, { nullable: true })
142
- transferOrder: TransferOrder
143
-
144
- @RelationId((orderInventory: OrderInventory) => orderInventory.transferOrder)
145
- transferOrderId: string
146
-
147
- @ManyToOne(type => ReturnOrder)
148
- @Field(type => ReturnOrder, { nullable: true })
149
- returnOrder: ReturnOrder
150
-
151
- @RelationId((orderInventory: OrderInventory) => orderInventory.returnOrder)
152
- returnOrderId: string
153
-
154
- @ManyToOne(type => OrderProduct)
155
- @Field(type => OrderProduct, { nullable: true })
156
- orderProduct: OrderProduct
157
-
158
- @RelationId((orderInventory: OrderInventory) => orderInventory.orderProduct)
159
- orderProductId: string
160
-
161
- @OneToMany(type => OrderToteItem, orderToteItem => orderToteItem.orderInventory, { nullable: true })
162
- @Field(type => [OrderToteItem], { nullable: true })
163
- orderToteItems: OrderToteItem[]
164
-
165
- @Column({ type: 'uuid', nullable: true })
166
- @Field({ nullable: true })
167
- refWorksheetId: string
168
-
169
- @Column({ nullable: true })
170
- @Field({ nullable: true })
171
- originQty: number
172
-
173
- @Column({ nullable: true })
174
- @Field({ nullable: true })
175
- inspectedQty: number
176
-
177
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
178
- @Field({ nullable: true })
179
- originUomValue: number
180
-
181
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
182
- @Field({ nullable: true })
183
- inspectedUomValue: number
184
-
185
- @Column({ nullable: true })
186
- @Field({ nullable: true })
187
- originBatchNo: string
188
-
189
- @Column({ nullable: true })
190
- @Field({ nullable: true })
191
- inspectedBatchNo: string
192
-
193
- @ManyToOne(type => Location, { nullable: true })
194
- @Field(type => Location, { nullable: true })
195
- originLocation: Location
196
-
197
- @RelationId((orderInventory: OrderInventory) => orderInventory.originLocation)
198
- originLocationId: string
199
-
200
- @ManyToOne(type => Location, { nullable: true })
201
- @Field(type => Location, { nullable: true })
202
- inspectedLocation: Location
203
-
204
- @RelationId((orderInventory: OrderInventory) => orderInventory.inspectedLocation)
205
- inspectedLocationId: string
206
-
207
- @ManyToOne(type => Location, { nullable: true })
208
- @Field(type => Location, { nullable: true })
209
- binLocation: Location
210
-
211
- @RelationId((orderInventory: OrderInventory) => orderInventory.binLocation)
212
- binLocationId: string
213
-
214
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
215
- @Field({ nullable: true })
216
- releaseQty: number
217
-
218
- @Column({ nullable: true, type: 'float', default: 0, transformer: roundTransformer })
219
- @Field({ nullable: true })
220
- pickedQty: number
221
-
222
- @Column({ nullable: true, type: 'float', default: 0, transformer: roundTransformer })
223
- @Field({ nullable: true })
224
- packedQty: number
225
-
226
- @Column({ nullable: true, type: 'float', default: 0, transformer: roundTransformer })
227
- @Field({ nullable: true })
228
- sortedQty: number
229
-
230
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
231
- @Field({ nullable: true })
232
- releaseUomValue: number
233
-
234
- @Column({ nullable: true })
235
- @Field({ nullable: true })
236
- uom: string
237
-
238
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
239
- @Field({ nullable: true })
240
- returnQty: number
241
-
242
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
243
- @Field({ nullable: true })
244
- returnUomValue: number
245
-
246
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
247
- @Field({ nullable: true })
248
- returnToLocationQty: number
249
-
250
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
251
- @Field({ nullable: true })
252
- returnToLocationUomValue: number
253
-
254
- @Column({ nullable: true, type: 'float', transformer: roundTransformer })
255
- @Field({ nullable: true })
256
- actualPackQty: number
257
-
258
- @Column('float', { nullable: true, transformer: roundTransformer })
259
- @Field({ nullable: true })
260
- palletQty: number
261
-
262
- @Column({ nullable: true })
263
- @Field({ nullable: true })
264
- actualPalletQty: number
265
-
266
- @Field({ nullable: true })
267
- systemRemark: string
268
-
269
- @Column({ nullable: true })
270
- @Field({ nullable: true })
271
- crossDocking: boolean
272
-
273
- @Column({ nullable: true })
274
- @Field({ nullable: true })
275
- serialNumber: string
276
-
277
- @Column()
278
- @Field({ nullable: true })
279
- status: string
280
-
281
- @ManyToOne(type => User)
282
- @Field(type => User, { nullable: true })
283
- pickedByUser: User
284
-
285
- @Column({ nullable: true })
286
- @Field({ nullable: true })
287
- pickedBy: string
288
-
289
- @Column({ nullable: true })
290
- @Field({ nullable: true })
291
- pickedAt: Date
292
-
293
- @ManyToOne(type => User)
294
- @Field(type => User, { nullable: true })
295
- packedByUser: User
296
-
297
- @Column({ nullable: true })
298
- @Field({ nullable: true })
299
- packedBy: string
300
-
301
- @Column({ nullable: true })
302
- @Field({ nullable: true })
303
- packedAt: Date
304
-
305
- @ManyToOne(type => User)
306
- @Field(type => User, { nullable: true })
307
- loadedByUser: User
308
-
309
- @Column({ nullable: true })
310
- @Field({ nullable: true })
311
- loadedBy: string
312
-
313
- @Column({ nullable: true })
314
- @Field({ nullable: true })
315
- loadedAt: Date
316
-
317
- @Field({ nullable: true })
318
- dispatchedAt: Date
319
-
320
- @CreateDateColumn()
321
- @Field()
322
- createdAt: Date
323
-
324
- @UpdateDateColumn()
325
- @Field()
326
- updatedAt: Date
327
-
328
- @ManyToOne(type => User)
329
- @Field(type => User, { nullable: true })
330
- creator: User
331
-
332
- @RelationId((orderInventory: OrderInventory) => orderInventory.creator)
333
- creatorId: string
334
-
335
- @ManyToOne(type => User)
336
- @Field(type => User, { nullable: true })
337
- updater: User
338
-
339
- @RelationId((orderInventory: OrderInventory) => orderInventory.updater)
340
- updaterId: string
341
-
342
- @Field(type => Float, { nullable: true })
343
- remainQty: number
344
-
345
- @Field({ nullable: true })
346
- remainUomValue: string
347
-
348
- @Field({ nullable: true })
349
- remainUomValueWithUom: string
350
-
351
- @Field({ nullable: true })
352
- isError: boolean
353
-
354
- @Field({ nullable: true })
355
- groupType: string
356
-
357
- @Field({ nullable: true })
358
- releaseUomValueWithUom: string
359
-
360
- @Field({ nullable: true })
361
- releaseGoodName: string
362
-
363
- @Field({ nullable: true })
364
- productName: string
365
-
366
- @Field({ nullable: true })
367
- productSKU: string
368
-
369
- @Field({ nullable: true })
370
- productBrand: string
371
-
372
- @Field({ nullable: true })
373
- pallet: string
374
-
375
- @Field({ nullable: true })
376
- palletId: string
377
-
378
- @Field({ nullable: true })
379
- pickedUomValue: number
380
-
381
- @Field({ nullable: true })
382
- extraJsonData: string
383
-
384
- @Field({ nullable: true })
385
- binNumber: string
386
-
387
- @Field({ nullable: true })
388
- toteNumber: string
389
-
390
- @Field({ nullable: true })
391
- routeId: string
392
-
393
- @Field({ nullable: true })
394
- storeId: string
395
-
396
- @Field({ nullable: true })
397
- storeName: string
398
-
399
- @Field({ nullable: true })
400
- stopId: string
401
- }
@@ -1,9 +0,0 @@
1
- import { OrderProduct } from './order-product'
2
- import { OrderProductMutation } from './order-product-mutation'
3
- import { OrderProductQuery } from './order-product-query'
4
-
5
- export const entities = [OrderProduct]
6
- export const resolvers = [OrderProductQuery, OrderProductMutation]
7
-
8
- export * from './order-product-mutation'
9
- export * from './order-product-query'
@@ -1,48 +0,0 @@
1
- import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'
2
- import { In } from 'typeorm'
3
-
4
- import { OrderProduct } from './order-product'
5
- import { OrderProductPatch } from './order-product-types'
6
-
7
- @Resolver(OrderProduct)
8
- export class OrderProductMutation {
9
- @Directive('@transaction')
10
- @Mutation(returns => OrderProduct)
11
- async updateOrderProduct(
12
- @Ctx() context: ResolverContext,
13
- @Arg('name') name: string,
14
- @Arg('patch', type => OrderProductPatch) patch: OrderProductPatch
15
- ): Promise<OrderProduct> {
16
- const { tx, domain, user } = context.state
17
-
18
- let foundOP: OrderProduct = await tx.getRepository(OrderProduct).findOne({
19
- where: { domain: { id: domain.id }, name }
20
- })
21
-
22
- return await tx.getRepository(OrderProduct).save({ ...foundOP, ...patch, updater: user })
23
- }
24
-
25
- @Directive('@transaction')
26
- @Mutation(returns => Boolean)
27
- async deleteOrderProduct(@Arg('name') name: string, @Ctx() context: ResolverContext): Promise<boolean> {
28
- const { tx, domain } = context.state
29
-
30
- await tx.getRepository(OrderProduct).delete({ domain: { id: domain.id }, name })
31
- return true
32
- }
33
-
34
- @Directive('@transaction')
35
- @Mutation(returns => Boolean)
36
- async deleteOrderProducts(
37
- @Arg('names', type => [String]) names: string[],
38
- @Ctx() context: ResolverContext
39
- ): Promise<boolean> {
40
- const { tx, domain } = context.state
41
-
42
- await tx.getRepository(OrderProduct).delete({
43
- domain: { id: domain.id },
44
- name: In(names)
45
- })
46
- return true
47
- }
48
- }