@things-factory/worksheet-base 5.0.0-alpha.3 → 5.0.0-alpha.32
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/controllers/inbound/unloading-worksheet-controller.js +301 -2
- package/dist-server/controllers/inbound/unloading-worksheet-controller.js.map +1 -1
- package/dist-server/controllers/outbound/loading-worksheet-controller.js +10 -0
- package/dist-server/controllers/outbound/loading-worksheet-controller.js.map +1 -1
- package/dist-server/controllers/outbound/packing-worksheet-controller.js +172 -7
- package/dist-server/controllers/outbound/packing-worksheet-controller.js.map +1 -1
- package/dist-server/controllers/outbound/picking-worksheet-controller.js +352 -11
- package/dist-server/controllers/outbound/picking-worksheet-controller.js.map +1 -1
- package/dist-server/controllers/outbound/returning-worksheet-controller.js +11 -1
- package/dist-server/controllers/outbound/returning-worksheet-controller.js.map +1 -1
- package/dist-server/controllers/outbound/sorting-worksheet-controller.js +110 -3
- package/dist-server/controllers/outbound/sorting-worksheet-controller.js.map +1 -1
- package/dist-server/controllers/render-grn.js +27 -3
- package/dist-server/controllers/render-grn.js.map +1 -1
- package/dist-server/controllers/render-invoices.js +103 -65
- package/dist-server/controllers/render-invoices.js.map +1 -1
- package/dist-server/controllers/render-orientage-do.js.map +1 -1
- package/dist-server/controllers/render-orientage-grn.js +1 -0
- package/dist-server/controllers/render-orientage-grn.js.map +1 -1
- package/dist-server/controllers/render-ro-do.js +65 -1
- package/dist-server/controllers/render-ro-do.js.map +1 -1
- package/dist-server/controllers/worksheet-controller.js +15 -0
- package/dist-server/controllers/worksheet-controller.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/find-release-orders-by-task-no.js +30 -1
- package/dist-server/graphql/resolvers/worksheet/find-release-orders-by-task-no.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/generate-worksheet/generate-arrival-notice-worksheet.js +27 -23
- package/dist-server/graphql/resolvers/worksheet/generate-worksheet/generate-arrival-notice-worksheet.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/inventories-by-pallet.js +3 -0
- package/dist-server/graphql/resolvers/worksheet/inventories-by-pallet.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/loading/complete-loading.js +16 -2
- package/dist-server/graphql/resolvers/worksheet/loading/complete-loading.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/packing/index.js +2 -1
- package/dist-server/graphql/resolvers/worksheet/packing/index.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/packing/packing.js +4 -4
- package/dist-server/graphql/resolvers/worksheet/packing/packing.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/packing/scan-product-packing.js +4 -4
- package/dist-server/graphql/resolvers/worksheet/packing/scan-product-packing.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/packing/undo-serial-number-packing.js +15 -0
- package/dist-server/graphql/resolvers/worksheet/packing/undo-serial-number-packing.js.map +1 -0
- package/dist-server/graphql/resolvers/worksheet/packing-worksheet.js +152 -132
- package/dist-server/graphql/resolvers/worksheet/packing-worksheet.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/picking/assign-picking-worker.js +13 -10
- package/dist-server/graphql/resolvers/worksheet/picking/assign-picking-worker.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/picking/complete-picking.js +0 -17
- package/dist-server/graphql/resolvers/worksheet/picking/complete-picking.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/picking/index.js +2 -1
- package/dist-server/graphql/resolvers/worksheet/picking/index.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/picking/picking-assignment-status-by-user.js +4 -7
- package/dist-server/graphql/resolvers/worksheet/picking/picking-assignment-status-by-user.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/picking/undo-serial-number-picking.js +15 -0
- package/dist-server/graphql/resolvers/worksheet/picking/undo-serial-number-picking.js.map +1 -0
- package/dist-server/graphql/resolvers/worksheet/sorting/scan-product-sorting.js +4 -4
- package/dist-server/graphql/resolvers/worksheet/sorting/scan-product-sorting.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/sorting/sorting-product.js +4 -4
- package/dist-server/graphql/resolvers/worksheet/sorting/sorting-product.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/sorting-worksheet.js +6 -0
- package/dist-server/graphql/resolvers/worksheet/sorting-worksheet.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/unloaded-inventories.js +3 -2
- package/dist-server/graphql/resolvers/worksheet/unloaded-inventories.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/unloading/index.js +3 -1
- package/dist-server/graphql/resolvers/worksheet/unloading/index.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/unloading/scan-serial-number-unload.js +15 -0
- package/dist-server/graphql/resolvers/worksheet/unloading/scan-serial-number-unload.js.map +1 -0
- package/dist-server/graphql/resolvers/worksheet/unloading/undo-serial-number-unload.js +15 -0
- package/dist-server/graphql/resolvers/worksheet/unloading/undo-serial-number-unload.js.map +1 -0
- package/dist-server/graphql/resolvers/worksheet/unloading/unload.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet/unloading-worksheet.js +3 -1
- package/dist-server/graphql/resolvers/worksheet/unloading-worksheet.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet-detail/generate-batch-picking-worksheet-details-by-bulk.js +4 -5
- package/dist-server/graphql/resolvers/worksheet-detail/generate-batch-picking-worksheet-details-by-bulk.js.map +1 -1
- package/dist-server/graphql/resolvers/worksheet-detail/generate-picking-worksheet-details.js +4 -2
- package/dist-server/graphql/resolvers/worksheet-detail/generate-picking-worksheet-details.js.map +1 -1
- package/dist-server/graphql/types/worksheet/find-release-orders-by-task-no.js +11 -0
- package/dist-server/graphql/types/worksheet/find-release-orders-by-task-no.js.map +1 -0
- package/dist-server/graphql/types/worksheet/index.js +30 -4
- package/dist-server/graphql/types/worksheet/index.js.map +1 -1
- package/dist-server/graphql/types/worksheet/worksheet-detail-info.js +3 -0
- package/dist-server/graphql/types/worksheet/worksheet-detail-info.js.map +1 -1
- package/dist-server/graphql/types/worksheet/worksheet-info.js +1 -0
- package/dist-server/graphql/types/worksheet/worksheet-info.js.map +1 -1
- package/dist-server/graphql/types/worksheet-detail/index.js +0 -2
- package/dist-server/graphql/types/worksheet-detail/index.js.map +1 -1
- package/dist-server/index.js +4 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/utils/inventory-util.js +14 -25
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/package.json +17 -17
- package/server/controllers/inbound/unloading-worksheet-controller.ts +363 -6
- package/server/controllers/outbound/loading-worksheet-controller.ts +13 -0
- package/server/controllers/outbound/packing-worksheet-controller.ts +224 -9
- package/server/controllers/outbound/picking-worksheet-controller.ts +465 -16
- package/server/controllers/outbound/returning-worksheet-controller.ts +12 -1
- package/server/controllers/outbound/sorting-worksheet-controller.ts +149 -4
- package/server/controllers/render-grn.ts +39 -5
- package/server/controllers/render-invoices.ts +119 -72
- package/server/controllers/render-orientage-do.ts +11 -11
- package/server/controllers/render-orientage-grn.ts +12 -11
- package/server/controllers/render-ro-do.ts +93 -8
- package/server/controllers/worksheet-controller.ts +18 -2
- package/server/graphql/resolvers/worksheet/find-release-orders-by-task-no.ts +35 -2
- package/server/graphql/resolvers/worksheet/generate-worksheet/generate-arrival-notice-worksheet.ts +35 -25
- package/server/graphql/resolvers/worksheet/inventories-by-pallet.ts +2 -0
- package/server/graphql/resolvers/worksheet/loading/complete-loading.ts +25 -6
- package/server/graphql/resolvers/worksheet/packing/index.ts +3 -1
- package/server/graphql/resolvers/worksheet/packing/packing.ts +5 -4
- package/server/graphql/resolvers/worksheet/packing/scan-product-packing.ts +9 -4
- package/server/graphql/resolvers/worksheet/packing/undo-serial-number-packing.ts +24 -0
- package/server/graphql/resolvers/worksheet/packing-worksheet.ts +167 -145
- package/server/graphql/resolvers/worksheet/picking/assign-picking-worker.ts +15 -11
- package/server/graphql/resolvers/worksheet/picking/complete-picking.ts +0 -18
- package/server/graphql/resolvers/worksheet/picking/index.ts +3 -1
- package/server/graphql/resolvers/worksheet/picking/picking-assignment-status-by-user.ts +5 -7
- package/server/graphql/resolvers/worksheet/picking/undo-serial-number-picking.ts +24 -0
- package/server/graphql/resolvers/worksheet/sorting/scan-product-sorting.ts +5 -4
- package/server/graphql/resolvers/worksheet/sorting/sorting-product.ts +5 -4
- package/server/graphql/resolvers/worksheet/sorting-worksheet.ts +6 -0
- package/server/graphql/resolvers/worksheet/unloaded-inventories.ts +6 -2
- package/server/graphql/resolvers/worksheet/unloading/index.ts +4 -0
- package/server/graphql/resolvers/worksheet/unloading/scan-serial-number-unload.ts +26 -0
- package/server/graphql/resolvers/worksheet/unloading/undo-serial-number-unload.ts +24 -0
- package/server/graphql/resolvers/worksheet/unloading/unload.ts +3 -1
- package/server/graphql/resolvers/worksheet/unloading-worksheet.ts +3 -1
- package/server/graphql/resolvers/worksheet-detail/generate-batch-picking-worksheet-details-by-bulk.ts +10 -12
- package/server/graphql/resolvers/worksheet-detail/generate-picking-worksheet-details.ts +4 -2
- package/server/graphql/types/worksheet/find-release-orders-by-task-no.ts +8 -0
- package/server/graphql/types/worksheet/index.ts +30 -4
- package/server/graphql/types/worksheet/worksheet-detail-info.ts +3 -0
- package/server/graphql/types/worksheet/worksheet-info.ts +1 -0
- package/server/graphql/types/worksheet-detail/index.ts +0 -2
- package/server/index.ts +4 -0
- package/server/utils/inventory-util.ts +15 -23
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
import { User } from '@things-factory/auth-base'
|
|
4
|
+
import { Domain } from '@things-factory/shell'
|
|
5
|
+
import { Inventory } from '@things-factory/warehouse-base'
|
|
6
|
+
|
|
7
|
+
import { UnloadingWorksheetController } from '../../../../controllers'
|
|
8
|
+
|
|
9
|
+
export const scanSerialNumberUnloadResolver = {
|
|
10
|
+
async scanSerialNumberUnload(_: any, { worksheetDetailName, serialNumber, inventory }, context: any) {
|
|
11
|
+
const { tx, domain, user }: { tx: EntityManager; domain: Domain; user: User } = context.state
|
|
12
|
+
await scanSerialNumberUnload(tx, domain, user, worksheetDetailName, serialNumber, inventory)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async function scanSerialNumberUnload(
|
|
17
|
+
tx: EntityManager,
|
|
18
|
+
domain: Domain,
|
|
19
|
+
user: User,
|
|
20
|
+
worksheetDetailName: string,
|
|
21
|
+
serialNumber: string,
|
|
22
|
+
inventory: Partial<Inventory>
|
|
23
|
+
): Promise<void> {
|
|
24
|
+
const worksheetController: UnloadingWorksheetController = new UnloadingWorksheetController(tx, domain, user)
|
|
25
|
+
await worksheetController.scanSerialNumberUnload(worksheetDetailName, serialNumber, inventory)
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
import { User } from '@things-factory/auth-base'
|
|
4
|
+
import { Domain } from '@things-factory/shell'
|
|
5
|
+
|
|
6
|
+
import { UnloadingWorksheetController } from '../../../../controllers'
|
|
7
|
+
|
|
8
|
+
export const undoSerialNumberUnloadResolver = {
|
|
9
|
+
async undoSerialNumberUnload(_: any, { worksheetDetailName, inventoryItemId }, context: any) {
|
|
10
|
+
const { tx, domain, user }: { tx: EntityManager; domain: Domain; user: User } = context.state
|
|
11
|
+
await undoSerialNumberUnload(tx, domain, user, worksheetDetailName, inventoryItemId)
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function undoSerialNumberUnload(
|
|
16
|
+
tx: EntityManager,
|
|
17
|
+
domain: Domain,
|
|
18
|
+
user: User,
|
|
19
|
+
worksheetDetailName: string,
|
|
20
|
+
inventoryItemId: string
|
|
21
|
+
): Promise<void> {
|
|
22
|
+
const worksheetController: UnloadingWorksheetController = new UnloadingWorksheetController(tx, domain, user)
|
|
23
|
+
await worksheetController.undoSerialNumberUnload(worksheetDetailName, inventoryItemId)
|
|
24
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
|
|
1
3
|
import { User } from '@things-factory/auth-base'
|
|
2
4
|
import { Domain } from '@things-factory/shell'
|
|
3
5
|
import { Inventory } from '@things-factory/warehouse-base'
|
|
4
|
-
|
|
6
|
+
|
|
5
7
|
import { UnloadingWorksheetController } from '../../../../controllers'
|
|
6
8
|
|
|
7
9
|
export const unloadResolver = {
|
|
@@ -59,6 +59,7 @@ export const unloadingWorksheetResolver = {
|
|
|
59
59
|
|
|
60
60
|
return {
|
|
61
61
|
worksheetInfo: {
|
|
62
|
+
arrivalNotice,
|
|
62
63
|
bizplaceName: customerBizplace.name,
|
|
63
64
|
partnerDomainId: customerBizplace?.domain.id,
|
|
64
65
|
customerCompanyDomainId: customerCompanyDomain.id,
|
|
@@ -90,7 +91,8 @@ export const unloadingWorksheetResolver = {
|
|
|
90
91
|
actualPackQty: targetProduct.actualPackQty,
|
|
91
92
|
remark: targetProduct.remark,
|
|
92
93
|
issue: productWSD.issue,
|
|
93
|
-
status: productWSD.status
|
|
94
|
+
status: productWSD.status,
|
|
95
|
+
manufactureDate: targetProduct.manufactureDate ? new Date(targetProduct.manufactureDate) : null
|
|
94
96
|
}
|
|
95
97
|
})
|
|
96
98
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import { EntityManager, getRepository } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
import { User } from '@things-factory/auth-base'
|
|
4
|
+
import { ORDER_INVENTORY_STATUS, ORDER_TYPES, OrderInventory, OrderNoGenerator } from '@things-factory/sales-base'
|
|
4
5
|
import { Setting } from '@things-factory/setting-base'
|
|
5
|
-
import {
|
|
6
|
+
import { Domain } from '@things-factory/shell'
|
|
7
|
+
import { Inventory } from '@things-factory/warehouse-base'
|
|
8
|
+
|
|
6
9
|
import { WORKSHEET_STATUS, WORKSHEET_TYPE } from '../../../constants'
|
|
7
10
|
import { Worksheet, WorksheetDetail } from '../../../entities'
|
|
8
|
-
import {
|
|
9
|
-
import { User } from '@things-factory/auth-base'
|
|
10
|
-
import { Domain } from '@things-factory/shell'
|
|
11
|
-
import { generateBatchPickingWorksheetDetailsResolver } from './generate-batch-picking-worksheet-details'
|
|
12
|
-
import orderBy from 'lodash/orderBy'
|
|
11
|
+
import { inventoriesByStrategy, WorksheetNoGenerator } from '../../../utils'
|
|
13
12
|
|
|
14
13
|
export const generateBatchPickingWorksheetDetailsByBulkResolver = {
|
|
15
14
|
async generateBatchPickingWorksheetDetailsByBulk(
|
|
16
15
|
_: any,
|
|
17
|
-
{ worksheetId, bizplaceId, selectedItems
|
|
16
|
+
{ worksheetId, bizplaceId, selectedItems },
|
|
18
17
|
context: any
|
|
19
18
|
): Promise<Boolean> {
|
|
20
19
|
const { tx, user, domain }: { tx: EntityManager; user: User; domain: Domain } = context.state
|
|
@@ -50,7 +49,7 @@ export const generateBatchPickingWorksheetDetailsByBulkResolver = {
|
|
|
50
49
|
})
|
|
51
50
|
|
|
52
51
|
await Promise.all(
|
|
53
|
-
selectedItems.map(async (oi: OrderInventory) => {
|
|
52
|
+
selectedItems.map(async (oi: OrderInventory & { pickingStrategy: string }) => {
|
|
54
53
|
try {
|
|
55
54
|
let pOrderInventories = tx.getRepository(OrderInventory).find({
|
|
56
55
|
where: {
|
|
@@ -72,7 +71,6 @@ export const generateBatchPickingWorksheetDetailsByBulkResolver = {
|
|
|
72
71
|
...oi,
|
|
73
72
|
worksheetId: worksheet.id,
|
|
74
73
|
bizplaceId,
|
|
75
|
-
pickingStrategy,
|
|
76
74
|
locationSortingRules: inventoryAssignmentSetting ? JSON.parse(inventoryAssignmentSetting.value) : false
|
|
77
75
|
},
|
|
78
76
|
domain,
|
|
@@ -20,7 +20,7 @@ import { WorksheetNoGenerator } from '../../../utils'
|
|
|
20
20
|
export const generatePickingWorksheetDetailsResolver = {
|
|
21
21
|
async generatePickingWorksheetDetails(
|
|
22
22
|
_: any,
|
|
23
|
-
{ bizplaceId, selectedItems,
|
|
23
|
+
{ bizplaceId, selectedItems, worksheetNo, locationSortingRules },
|
|
24
24
|
context: any
|
|
25
25
|
): Promise<Boolean> {
|
|
26
26
|
const { tx, user, domain }: { tx: EntityManager; user: User; domain: Domain } = context.state
|
|
@@ -54,7 +54,6 @@ export const generatePickingWorksheetDetailsResolver = {
|
|
|
54
54
|
bizplaceId,
|
|
55
55
|
worksheetId,
|
|
56
56
|
selectedItems,
|
|
57
|
-
pickingStrategy,
|
|
58
57
|
locationSortingRules,
|
|
59
58
|
tx
|
|
60
59
|
)
|
|
@@ -162,6 +161,9 @@ function _composeWorksheetDetails(
|
|
|
162
161
|
|
|
163
162
|
while (compReleaseQty < record.releaseQty) {
|
|
164
163
|
const inv = inventories[idx]
|
|
164
|
+
|
|
165
|
+
if (!inv) break
|
|
166
|
+
|
|
165
167
|
let releaseQty: number = 0
|
|
166
168
|
let releaseUomValue: number = 0
|
|
167
169
|
|
|
@@ -22,6 +22,7 @@ import { WorksheetInfo } from './worksheet-info'
|
|
|
22
22
|
import { WorksheetList } from './worksheet-list'
|
|
23
23
|
import { WorksheetPatch } from './worksheet-patch'
|
|
24
24
|
import { WorksheetWithPagination } from './worksheet-with-pagination'
|
|
25
|
+
import { FindReleaseOrdersByTaskNo } from './find-release-orders-by-task-no'
|
|
25
26
|
|
|
26
27
|
export const Mutation = /* GraphQL */ `
|
|
27
28
|
createWorksheet (
|
|
@@ -164,10 +165,20 @@ export const Mutation = /* GraphQL */ `
|
|
|
164
165
|
worksheetNo: [String!]!
|
|
165
166
|
): [Worksheet] @privilege(category: "worksheet_control", privilege: "mutation") @transaction
|
|
166
167
|
|
|
168
|
+
undoSerialNumberPacking (
|
|
169
|
+
worksheetDetailName: String!
|
|
170
|
+
inventoryItemId: String!
|
|
171
|
+
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
172
|
+
|
|
167
173
|
activateBatchPicking (
|
|
168
174
|
worksheetNo: String!
|
|
169
175
|
): Worksheet @privilege(category: "worksheet_control", privilege: "mutation") @transaction
|
|
170
176
|
|
|
177
|
+
undoSerialNumberPicking (
|
|
178
|
+
worksheetDetailName: String!
|
|
179
|
+
inventoryItemId: String!
|
|
180
|
+
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
181
|
+
|
|
171
182
|
unload (
|
|
172
183
|
worksheetDetailName: String!
|
|
173
184
|
inventory: InventoryPatch!
|
|
@@ -185,6 +196,12 @@ export const Mutation = /* GraphQL */ `
|
|
|
185
196
|
inventory: InventoryPatch!
|
|
186
197
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
187
198
|
|
|
199
|
+
scanSerialNumberUnload (
|
|
200
|
+
worksheetDetailName: String!
|
|
201
|
+
serialNumber: String!
|
|
202
|
+
inventory: InventoryPatch!
|
|
203
|
+
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
204
|
+
|
|
188
205
|
cycleCountAdjustment (
|
|
189
206
|
cycleCountNo: String!
|
|
190
207
|
): Boolean @transaction
|
|
@@ -195,6 +212,11 @@ export const Mutation = /* GraphQL */ `
|
|
|
195
212
|
inventoryIds: [String]!
|
|
196
213
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
197
214
|
|
|
215
|
+
undoSerialNumberUnload (
|
|
216
|
+
worksheetDetailName: String!
|
|
217
|
+
inventoryItemId: String!
|
|
218
|
+
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
219
|
+
|
|
198
220
|
completeUnloadingPartially (
|
|
199
221
|
arrivalNoticeNo: String!
|
|
200
222
|
worksheetDetail: [WorksheetDetailPatch!]
|
|
@@ -307,22 +329,26 @@ export const Mutation = /* GraphQL */ `
|
|
|
307
329
|
releaseGoodNo: String!
|
|
308
330
|
productId: String!
|
|
309
331
|
sortingQty: Float!
|
|
332
|
+
serialNumber: String
|
|
310
333
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
311
334
|
|
|
312
335
|
scanProductSorting (
|
|
313
336
|
taskNo: String!
|
|
314
337
|
releaseGoodNo: String!
|
|
315
338
|
productBarcode: String!
|
|
339
|
+
serialNumber: String
|
|
316
340
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
317
341
|
|
|
318
342
|
packing (
|
|
319
343
|
worksheetDetailName: String!
|
|
320
344
|
releaseQty: Int!
|
|
345
|
+
serialNumber: String
|
|
321
346
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
322
347
|
|
|
323
348
|
scanProductPacking (
|
|
324
349
|
worksheetDetailName: String!
|
|
325
350
|
productBarcode: String!
|
|
351
|
+
serialNumber: String
|
|
326
352
|
): Boolean @privilege(category: "worksheet_execute", privilege: "mutation") @transaction
|
|
327
353
|
|
|
328
354
|
batchPicking (
|
|
@@ -514,7 +540,7 @@ export const Mutation = /* GraphQL */ `
|
|
|
514
540
|
): Boolean @privilege(category: "worksheet_control", privilege: "mutation") @transaction
|
|
515
541
|
|
|
516
542
|
assignPickingWorker (
|
|
517
|
-
worksheetId: String!
|
|
543
|
+
worksheetId: [String]!
|
|
518
544
|
userId: String!
|
|
519
545
|
): Boolean @privilege(category: "worksheet_control", privilege: "mutation") @transaction
|
|
520
546
|
|
|
@@ -655,7 +681,6 @@ export const Query = /* GraphQL */ `
|
|
|
655
681
|
): [Inventory] @privilege(category: "worksheet", privilege: "query")
|
|
656
682
|
|
|
657
683
|
pickingAssignmentStatusByUsers(
|
|
658
|
-
bizplaceId: String!
|
|
659
684
|
name: String
|
|
660
685
|
email: String
|
|
661
686
|
): [PickingAssignmentStatus] @privilege(category: "worksheet", privilege: "query")
|
|
@@ -664,7 +689,7 @@ export const Query = /* GraphQL */ `
|
|
|
664
689
|
|
|
665
690
|
recommendPutawayLocation(worksheetDetailName: String!, optCnt: Int): [Location] @privilege(category: "worksheet", privilege: "query")
|
|
666
691
|
|
|
667
|
-
findReleaseOrdersByTaskNo(taskNo: String!):
|
|
692
|
+
findReleaseOrdersByTaskNo(taskNo: String!): FindReleaseOrdersByTaskNo @privilege(category: "worksheet", privilege: "query") @transaction
|
|
668
693
|
`
|
|
669
694
|
|
|
670
695
|
export const Types = /* GraphQL */ [
|
|
@@ -691,5 +716,6 @@ export const Types = /* GraphQL */ [
|
|
|
691
716
|
ProductApproval,
|
|
692
717
|
WorksheetWithPagination,
|
|
693
718
|
PickingAssignmentStatus,
|
|
694
|
-
MyPickingAssignmentStatus
|
|
719
|
+
MyPickingAssignmentStatus,
|
|
720
|
+
FindReleaseOrdersByTaskNo
|
|
695
721
|
]
|
|
@@ -41,13 +41,11 @@ export const Mutation = /* GraphQL */ `
|
|
|
41
41
|
bizplaceId: String
|
|
42
42
|
locationSortingRules: [Sorting]
|
|
43
43
|
selectedItems: [OrderInventoryPatch]!
|
|
44
|
-
pickingStrategy: String!
|
|
45
44
|
): Boolean @transaction
|
|
46
45
|
|
|
47
46
|
generatePickingWorksheetDetails(
|
|
48
47
|
bizplaceId: String!
|
|
49
48
|
selectedItems: [OrderInventoryPatch]!
|
|
50
|
-
pickingStrategy: String!
|
|
51
49
|
worksheetNo: String!
|
|
52
50
|
locationSortingRules: [Sorting]
|
|
53
51
|
): Boolean @transaction
|
package/server/index.ts
CHANGED
|
@@ -5,4 +5,8 @@ export * from './entities'
|
|
|
5
5
|
export * from './graphql'
|
|
6
6
|
export * from './graphql/resolvers/worksheet/generate-worksheet/generate-release-good-worksheet'
|
|
7
7
|
export * from './graphql/resolvers/worksheet-detail/generate-release-good-worksheet-details'
|
|
8
|
+
export * from './graphql/resolvers/worksheet/generate-worksheet/generate-arrival-notice-worksheet'
|
|
9
|
+
export * from './graphql/resolvers/worksheet-detail/generate-release-good-worksheet-details'
|
|
10
|
+
export * from './graphql/resolvers/worksheet/unloading/activate-unloading'
|
|
11
|
+
export * from './graphql/resolvers/worksheet/picking/activate-picking'
|
|
8
12
|
export * from './migrations'
|
|
@@ -265,7 +265,9 @@ export async function inventoriesByStrategy(
|
|
|
265
265
|
.andWhere('"INV"."packing_size" = :packingSize')
|
|
266
266
|
.andWhere('"INV"."uom" = :uom')
|
|
267
267
|
.andWhere('"INV"."status" = :status', { status: 'STORED' })
|
|
268
|
-
.andWhere('"LOC"."type" NOT IN (:...locationTypes)', {
|
|
268
|
+
.andWhere('"LOC"."type" NOT IN (:...locationTypes)', {
|
|
269
|
+
locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
|
|
270
|
+
})
|
|
269
271
|
.setParameters({
|
|
270
272
|
domainId: domain.id,
|
|
271
273
|
productId,
|
|
@@ -289,12 +291,7 @@ export async function inventoriesByStrategy(
|
|
|
289
291
|
qb.orderBy('"INV"."created_at"', 'ASC')
|
|
290
292
|
if (locationSortingRules) {
|
|
291
293
|
for (const key in locationSortingRules) {
|
|
292
|
-
|
|
293
|
-
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
294
|
-
} else {
|
|
295
|
-
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
296
|
-
}
|
|
297
|
-
++locIdx
|
|
294
|
+
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
298
295
|
}
|
|
299
296
|
}
|
|
300
297
|
break
|
|
@@ -303,12 +300,7 @@ export async function inventoriesByStrategy(
|
|
|
303
300
|
qb.orderBy('"INV"."created_at"', 'DESC')
|
|
304
301
|
if (locationSortingRules) {
|
|
305
302
|
for (const key in locationSortingRules) {
|
|
306
|
-
|
|
307
|
-
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
308
|
-
} else {
|
|
309
|
-
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
310
|
-
}
|
|
311
|
-
++locIdx
|
|
303
|
+
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
312
304
|
}
|
|
313
305
|
}
|
|
314
306
|
break
|
|
@@ -317,12 +309,16 @@ export async function inventoriesByStrategy(
|
|
|
317
309
|
qb.orderBy('"INV"."expiration_date"', 'ASC')
|
|
318
310
|
if (locationSortingRules) {
|
|
319
311
|
for (const key in locationSortingRules) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
312
|
+
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
break
|
|
316
|
+
|
|
317
|
+
case 'FMFO':
|
|
318
|
+
qb.orderBy('"INV"."manufacture_date"', 'ASC')
|
|
319
|
+
if (locationSortingRules) {
|
|
320
|
+
for (const key in locationSortingRules) {
|
|
321
|
+
qb.addOrderBy(`LOC.${key}`, locationSortingRules[key])
|
|
326
322
|
}
|
|
327
323
|
}
|
|
328
324
|
break
|
|
@@ -338,10 +334,6 @@ export async function inventoriesByStrategy(
|
|
|
338
334
|
++locIdx
|
|
339
335
|
}
|
|
340
336
|
} else qb.orderBy('"LOC"."name"', 'DESC')
|
|
341
|
-
break
|
|
342
|
-
default:
|
|
343
|
-
qb.orderBy('"INV"."created_at"', 'ASC')
|
|
344
|
-
|
|
345
337
|
break
|
|
346
338
|
}
|
|
347
339
|
|