@pksep/zod-shared 0.0.563 → 0.0.565
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/ai-mcp/index.d.ts +3 -0
- package/dist/ai-mcp/index.js +3 -0
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +149 -1
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.d.ts +124 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.js +123 -0
- package/dist/ai-mcp/schemas/ai-mcp-specification.schema.d.ts +123 -0
- package/dist/ai-mcp/schemas/ai-mcp-specification.schema.js +110 -0
- package/dist/ai-mcp/schemas/ai-mcp-technology.schema.d.ts +225 -0
- package/dist/ai-mcp/schemas/ai-mcp-technology.schema.js +156 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +4 -1
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +6 -1
- package/dist/bull-queue/index.d.ts +1 -0
- package/dist/bull-queue/index.js +17 -0
- package/dist/bull-queue/schemas/queue-ownership.schema.d.ts +74 -0
- package/dist/bull-queue/schemas/queue-ownership.schema.js +33 -0
- package/dist/deficit/index.d.ts +1 -0
- package/dist/deficit/index.js +1 -0
- package/dist/deficit/schemas/deficit-queue.schema.d.ts +2 -0
- package/dist/deficit/schemas/deficit-queue.schema.js +7 -0
- package/dist/excel-export/excel-export.dto.d.ts +2021 -585
- package/dist/excel-export/excel-export.dto.js +65 -2
- package/dist/excel-export/index.d.ts +1 -0
- package/dist/excel-export/index.js +1 -0
- package/dist/excel-export/warehouse-excel-export.d.ts +269 -0
- package/dist/excel-export/warehouse-excel-export.js +76 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/production-tasks/dto/split-production-task.dto.js +1 -1
- package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
- package/dist/production-tasks/methods/methods.d.ts +3 -3
- package/dist/production-tasks/methods/methods.js +3 -3
- package/dist/specification/dto/mutate-specification.dto.d.ts +13 -0
- package/dist/specification/dto/mutate-specification.dto.js +14 -6
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CreateExcelExportRequestSchema = exports.CreateMovementObjectExcelExportSchema = exports.CreateWarehouseReceiptExcelExportSchema = exports.CreateOrderToWayExcelExportSchema = exports.CreateWarehouseConsumptionExcelExportSchema = exports.CreateShippedOrderExcelExportSchema = exports.CreateWarehouseShipmentExcelExportSchema = exports.CreateMaterialDeficitExcelExportDtoZod = exports.CreateDetalDeficitExcelExportDtoZod = exports.CreateCbedDeficitExcelExportDtoZod = exports.CreateProductDeficitExcelExportDtoZod = exports.CreateAssemblyStockOrderExcelExportDtoZod = exports.CreateOperationPathExcelExportDtoZod = exports.CreateAssemblyOperationExcelExportDtoZod = exports.CreateResultWorkExcelExportDtoZod = exports.CreateMetalloworkingStockOrderExcelExportDtoZod = exports.CreateMetalloworkingComplectationExcelExportDtoZod = exports.CreateMetalloworkingOperationExcelExportDtoZod = exports.CreateMetalloworkingExcelExportDtoZod = exports.CreateAssemblyExcelExportDtoZod = exports.MaterialDeficitExcelExportColumnSchema = exports.DetalDeficitExcelExportColumnSchema = exports.CbedDeficitExcelExportColumnSchema = exports.ProductDeficitExcelExportColumnSchema = exports.AssemblyStockOrderExcelExportColumnSchema = exports.OperationPathExcelExportColumnSchema = exports.AssemblyOperationExcelExportColumnSchema = exports.ResultWorkExcelExportColumnSchema = exports.MetalloworkingStockOrderExcelExportColumnSchema = exports.MetalloworkingComplectationExcelExportColumnSchema = exports.MetalloworkingOperationExcelExportColumnSchema = exports.MetalloworkingExcelExportColumnSchema = exports.AssemblyExcelExportColumnSchema = exports.MaterialDeficitExcelExportColumnDefinitions = exports.DetalDeficitExcelExportColumnDefinitions = exports.CbedDeficitExcelExportColumnDefinitions = exports.ProductDeficitExcelExportColumnDefinitions = exports.AssemblyStockOrderExcelExportColumnDefinitions = exports.OperationPathExcelExportColumnDefinitions = exports.AssemblyOperationExcelExportColumnDefinitions = exports.ResultWorkExcelExportColumnDefinitions = exports.MetalloworkingStockOrderExcelExportColumnDefinitions = exports.MetalloworkingComplectationExcelExportColumnDefinitions = exports.MetalloworkingOperationExcelExportColumnDefinitions = exports.MetalloworkingExcelExportColumnDefinitions = exports.AssemblyExcelExportColumnDefinitions = exports.ExcelExportColumnDefinitionSchema = exports.ExcelExportStatus = exports.OperationPathExcelExportSourceType = exports.ExcelExportReportType = void 0;
|
|
4
|
+
exports.ExcelExportResultSchema = exports.ExcelExportJobDataSchema = exports.ExcelExportStatusSchema = exports.ExcelExportCreatedSchema = exports.CreateExcelExportDtoZod = void 0;
|
|
4
5
|
const zod_1 = require("zod");
|
|
6
|
+
const warehouse_excel_export_1 = require("./warehouse-excel-export");
|
|
5
7
|
const assemble_1 = require("../assemble");
|
|
6
8
|
const cbed_1 = require("../cbed");
|
|
7
9
|
const detal_1 = require("../detal");
|
|
@@ -9,6 +11,11 @@ const material_1 = require("../material");
|
|
|
9
11
|
const metaloworking_1 = require("../metaloworking");
|
|
10
12
|
const marks_1 = require("../marks");
|
|
11
13
|
const product_1 = require("../product");
|
|
14
|
+
const shipments_1 = require("../shipments");
|
|
15
|
+
const expenditure_1 = require("../expenditure");
|
|
16
|
+
const stock_order_1 = require("../stock-order");
|
|
17
|
+
const movement_object_1 = require("../movement-object");
|
|
18
|
+
const utils_1 = require("../utils");
|
|
12
19
|
var ExcelExportReportType;
|
|
13
20
|
(function (ExcelExportReportType) {
|
|
14
21
|
ExcelExportReportType["assemblyList"] = "assembly.list";
|
|
@@ -24,6 +31,12 @@ var ExcelExportReportType;
|
|
|
24
31
|
ExcelExportReportType["cbedDeficitList"] = "warehouse.cbed-deficit-list";
|
|
25
32
|
ExcelExportReportType["detalDeficitList"] = "warehouse.detal-deficit-list";
|
|
26
33
|
ExcelExportReportType["materialDeficitList"] = "warehouse.material-deficit-list";
|
|
34
|
+
ExcelExportReportType["warehouseShipmentList"] = "warehouse.shipment-list";
|
|
35
|
+
ExcelExportReportType["shippedOrderList"] = "warehouse.shipped-order-list";
|
|
36
|
+
ExcelExportReportType["warehouseConsumptionList"] = "warehouse.consumption-list";
|
|
37
|
+
ExcelExportReportType["orderToWayList"] = "warehouse.order-to-way-list";
|
|
38
|
+
ExcelExportReportType["warehouseReceiptList"] = "warehouse.receipt-list";
|
|
39
|
+
ExcelExportReportType["movementObjectList"] = "warehouse.movement-object-list";
|
|
27
40
|
})(ExcelExportReportType || (exports.ExcelExportReportType = ExcelExportReportType = {}));
|
|
28
41
|
var OperationPathExcelExportSourceType;
|
|
29
42
|
(function (OperationPathExcelExportSourceType) {
|
|
@@ -501,6 +514,50 @@ exports.CreateMaterialDeficitExcelExportDtoZod = zod_1.z.object({
|
|
|
501
514
|
columns: createUniqueColumnsSchema(exports.MaterialDeficitExcelExportColumnSchema),
|
|
502
515
|
filters: material_1.GetMaterialDeficitDtoZod.omit({ page: true })
|
|
503
516
|
});
|
|
517
|
+
exports.CreateWarehouseShipmentExcelExportSchema = zod_1.z.object({
|
|
518
|
+
reportType: zod_1.z.literal(ExcelExportReportType.warehouseShipmentList),
|
|
519
|
+
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.WarehouseShipmentExcelExportColumnDefinitions))),
|
|
520
|
+
filters: shipments_1.ShipmentsPaginateSchema.omit({ offset: true, attributes: true })
|
|
521
|
+
});
|
|
522
|
+
exports.CreateShippedOrderExcelExportSchema = zod_1.z.object({
|
|
523
|
+
reportType: zod_1.z.literal(ExcelExportReportType.shippedOrderList),
|
|
524
|
+
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.ShippedOrderExcelExportColumnDefinitions))),
|
|
525
|
+
filters: shipments_1.ShipmentCheckPaginationSchema.omit({ page: true })
|
|
526
|
+
});
|
|
527
|
+
exports.CreateWarehouseConsumptionExcelExportSchema = zod_1.z.object({
|
|
528
|
+
reportType: zod_1.z.literal(ExcelExportReportType.warehouseConsumptionList),
|
|
529
|
+
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.WarehouseConsumptionExcelExportColumnDefinitions))),
|
|
530
|
+
filters: expenditure_1.GetExpenditureRequestSchema.omit({ page: true })
|
|
531
|
+
});
|
|
532
|
+
exports.CreateOrderToWayExcelExportSchema = zod_1.z.object({
|
|
533
|
+
reportType: zod_1.z.literal(ExcelExportReportType.orderToWayList),
|
|
534
|
+
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.OrderToWayExcelExportColumnDefinitions))),
|
|
535
|
+
filters: stock_order_1.GetStockOrderPaginationSchema.omit({ page: true }).extend({
|
|
536
|
+
type: zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2), zod_1.z.literal(3)]),
|
|
537
|
+
selectedIds: zod_1.z.array(zod_1.z.number().int().positive()).max(10000).optional()
|
|
538
|
+
})
|
|
539
|
+
});
|
|
540
|
+
exports.CreateWarehouseReceiptExcelExportSchema = zod_1.z.object({
|
|
541
|
+
reportType: zod_1.z.literal(ExcelExportReportType.warehouseReceiptList),
|
|
542
|
+
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.WarehouseReceiptExcelExportColumnDefinitions))),
|
|
543
|
+
filters: stock_order_1.GetStockOrderPaginationSchema.omit({ page: true }).extend({
|
|
544
|
+
typeComing: zod_1.z.nativeEnum(utils_1.WaybilTypeComingEnums)
|
|
545
|
+
})
|
|
546
|
+
});
|
|
547
|
+
exports.CreateMovementObjectExcelExportSchema = zod_1.z.object({
|
|
548
|
+
reportType: zod_1.z.literal(ExcelExportReportType.movementObjectList),
|
|
549
|
+
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.MovementObjectExcelExportColumnDefinitions))),
|
|
550
|
+
filters: movement_object_1.GetOneObjectHistorySchema.innerType()
|
|
551
|
+
.omit({ page: true, isCheckChildrens: true })
|
|
552
|
+
.extend({
|
|
553
|
+
date: utils_1.DateRangeSchema
|
|
554
|
+
})
|
|
555
|
+
.refine(({ date }) => {
|
|
556
|
+
const start = new Date(date.start).getTime();
|
|
557
|
+
const end = new Date(date.end).getTime();
|
|
558
|
+
return Number.isFinite(start) && Number.isFinite(end) && start <= end;
|
|
559
|
+
}, { message: 'Укажите корректный диапазон дат', path: ['date'] })
|
|
560
|
+
});
|
|
504
561
|
exports.CreateExcelExportRequestSchema = zod_1.z.discriminatedUnion('reportType', [
|
|
505
562
|
exports.CreateAssemblyExcelExportDtoZod,
|
|
506
563
|
exports.CreateAssemblyOperationExcelExportDtoZod,
|
|
@@ -514,7 +571,13 @@ exports.CreateExcelExportRequestSchema = zod_1.z.discriminatedUnion('reportType'
|
|
|
514
571
|
exports.CreateProductDeficitExcelExportDtoZod,
|
|
515
572
|
exports.CreateCbedDeficitExcelExportDtoZod,
|
|
516
573
|
exports.CreateDetalDeficitExcelExportDtoZod,
|
|
517
|
-
exports.CreateMaterialDeficitExcelExportDtoZod
|
|
574
|
+
exports.CreateMaterialDeficitExcelExportDtoZod,
|
|
575
|
+
exports.CreateWarehouseShipmentExcelExportSchema,
|
|
576
|
+
exports.CreateShippedOrderExcelExportSchema,
|
|
577
|
+
exports.CreateWarehouseConsumptionExcelExportSchema,
|
|
578
|
+
exports.CreateOrderToWayExcelExportSchema,
|
|
579
|
+
exports.CreateWarehouseReceiptExcelExportSchema,
|
|
580
|
+
exports.CreateMovementObjectExcelExportSchema
|
|
518
581
|
]);
|
|
519
582
|
// createZodDto requires an object schema as its class base. The refinement
|
|
520
583
|
// delegates validation to the strict discriminated report contract.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import type { ExcelExportColumnValue } from './excel-export.dto';
|
|
2
|
+
import type { ModelShipments } from '../shipments';
|
|
3
|
+
/** Дополнительные значения, которые штатная складская выборка рассчитывает для строки. */
|
|
4
|
+
export type WarehouseShipmentExportSource = ModelShipments & {
|
|
5
|
+
lvl_complectation?: number;
|
|
6
|
+
start_time?: Date | string | null;
|
|
7
|
+
calculateNeedsTime?: Date | string | null;
|
|
8
|
+
childrenCalculateNeedsTime?: Date | string | null;
|
|
9
|
+
startTimeDelay?: number | null;
|
|
10
|
+
productionDelay?: number | null;
|
|
11
|
+
comment?: {
|
|
12
|
+
content?: string;
|
|
13
|
+
documents?: unknown[];
|
|
14
|
+
} | null;
|
|
15
|
+
};
|
|
16
|
+
/** Полные заголовки основных складских таблиц; служебные ячейки исключены. */
|
|
17
|
+
export declare const WarehouseShipmentExcelExportColumnDefinitions: {
|
|
18
|
+
readonly number: {
|
|
19
|
+
readonly header: "№";
|
|
20
|
+
readonly width: 8;
|
|
21
|
+
};
|
|
22
|
+
readonly order: {
|
|
23
|
+
readonly header: "Заказ";
|
|
24
|
+
readonly width: 24;
|
|
25
|
+
};
|
|
26
|
+
readonly article: {
|
|
27
|
+
readonly header: "Артикул изделия";
|
|
28
|
+
readonly width: 24;
|
|
29
|
+
};
|
|
30
|
+
readonly name: {
|
|
31
|
+
readonly header: "Наименование изделия";
|
|
32
|
+
readonly width: 40;
|
|
33
|
+
};
|
|
34
|
+
readonly quantity: {
|
|
35
|
+
readonly header: "Потребность по заказам покупателя";
|
|
36
|
+
readonly width: 25;
|
|
37
|
+
};
|
|
38
|
+
readonly days: {
|
|
39
|
+
readonly header: "Кол-во дней";
|
|
40
|
+
readonly width: 16;
|
|
41
|
+
};
|
|
42
|
+
readonly remainingDays: {
|
|
43
|
+
readonly header: "Осталось дней";
|
|
44
|
+
readonly width: 16;
|
|
45
|
+
};
|
|
46
|
+
readonly base: {
|
|
47
|
+
readonly header: "Основание";
|
|
48
|
+
readonly width: 32;
|
|
49
|
+
};
|
|
50
|
+
readonly buyer: {
|
|
51
|
+
readonly header: "Покупатель";
|
|
52
|
+
readonly width: 30;
|
|
53
|
+
};
|
|
54
|
+
readonly completion: {
|
|
55
|
+
readonly header: "Уровень комплектации";
|
|
56
|
+
readonly width: 23;
|
|
57
|
+
};
|
|
58
|
+
readonly status: {
|
|
59
|
+
readonly header: "Статус";
|
|
60
|
+
readonly width: 22;
|
|
61
|
+
};
|
|
62
|
+
readonly startTime: {
|
|
63
|
+
readonly header: "Начало работ";
|
|
64
|
+
readonly width: 24;
|
|
65
|
+
};
|
|
66
|
+
readonly calculatedTime: {
|
|
67
|
+
readonly header: "Расчётная дата изготовления";
|
|
68
|
+
readonly width: 26;
|
|
69
|
+
};
|
|
70
|
+
readonly warehouseDate: {
|
|
71
|
+
readonly header: "Дата плановой готовности склада";
|
|
72
|
+
readonly width: 28;
|
|
73
|
+
};
|
|
74
|
+
readonly shipmentDate: {
|
|
75
|
+
readonly header: "Дата плановой отгрузки";
|
|
76
|
+
readonly width: 24;
|
|
77
|
+
};
|
|
78
|
+
readonly actualDate: {
|
|
79
|
+
readonly header: "Дата фактической отгрузки";
|
|
80
|
+
readonly width: 25;
|
|
81
|
+
};
|
|
82
|
+
readonly readiness: {
|
|
83
|
+
readonly header: "Готовность к комплектации";
|
|
84
|
+
readonly width: 25;
|
|
85
|
+
};
|
|
86
|
+
readonly startDelay: {
|
|
87
|
+
readonly header: "Просрочка начала работ, ч";
|
|
88
|
+
readonly width: 25;
|
|
89
|
+
};
|
|
90
|
+
readonly productionDelay: {
|
|
91
|
+
readonly header: "Просрочка изготовления, ч";
|
|
92
|
+
readonly width: 25;
|
|
93
|
+
};
|
|
94
|
+
readonly comment: {
|
|
95
|
+
readonly header: "Комментарии";
|
|
96
|
+
readonly width: 40;
|
|
97
|
+
};
|
|
98
|
+
readonly metalTime: {
|
|
99
|
+
readonly header: "Время на МО ч/мин";
|
|
100
|
+
readonly width: 24;
|
|
101
|
+
};
|
|
102
|
+
readonly assemblyTime: {
|
|
103
|
+
readonly header: "Время на сборку ч/мин";
|
|
104
|
+
readonly width: 24;
|
|
105
|
+
};
|
|
106
|
+
readonly totalTime: {
|
|
107
|
+
readonly header: "Общая трудоемкость ч/мин";
|
|
108
|
+
readonly width: 26;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export declare const ShippedOrderExcelExportColumnDefinitions: {
|
|
112
|
+
readonly number: {
|
|
113
|
+
readonly header: "№";
|
|
114
|
+
readonly width: 8;
|
|
115
|
+
};
|
|
116
|
+
readonly date: {
|
|
117
|
+
readonly header: "Дата фактической отгрузки";
|
|
118
|
+
readonly width: 25;
|
|
119
|
+
};
|
|
120
|
+
readonly shipment: {
|
|
121
|
+
readonly header: "№ Отгрузки";
|
|
122
|
+
readonly width: 24;
|
|
123
|
+
};
|
|
124
|
+
readonly buyer: {
|
|
125
|
+
readonly header: "Покупатель";
|
|
126
|
+
readonly width: 30;
|
|
127
|
+
};
|
|
128
|
+
readonly order: {
|
|
129
|
+
readonly header: "№ заказа и дата";
|
|
130
|
+
readonly width: 24;
|
|
131
|
+
};
|
|
132
|
+
readonly article: {
|
|
133
|
+
readonly header: "Артикул";
|
|
134
|
+
readonly width: 24;
|
|
135
|
+
};
|
|
136
|
+
readonly name: {
|
|
137
|
+
readonly header: "Наименование изделия";
|
|
138
|
+
readonly width: 40;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export declare const WarehouseConsumptionExcelExportColumnDefinitions: {
|
|
142
|
+
readonly number: {
|
|
143
|
+
readonly header: "№";
|
|
144
|
+
readonly width: 8;
|
|
145
|
+
};
|
|
146
|
+
readonly date: {
|
|
147
|
+
readonly header: "Дата";
|
|
148
|
+
readonly width: 18;
|
|
149
|
+
};
|
|
150
|
+
readonly base: {
|
|
151
|
+
readonly header: "Основание";
|
|
152
|
+
readonly width: 30;
|
|
153
|
+
};
|
|
154
|
+
readonly order: {
|
|
155
|
+
readonly header: "№ заказа";
|
|
156
|
+
readonly width: 24;
|
|
157
|
+
};
|
|
158
|
+
readonly type: {
|
|
159
|
+
readonly header: "Тип сущности";
|
|
160
|
+
readonly width: 18;
|
|
161
|
+
};
|
|
162
|
+
readonly name: {
|
|
163
|
+
readonly header: "Наименование";
|
|
164
|
+
readonly width: 40;
|
|
165
|
+
};
|
|
166
|
+
readonly quantity: {
|
|
167
|
+
readonly header: "Кол-во";
|
|
168
|
+
readonly width: 18;
|
|
169
|
+
};
|
|
170
|
+
readonly customer: {
|
|
171
|
+
readonly header: "Заказчик";
|
|
172
|
+
readonly width: 30;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
export declare const OrderToWayExcelExportColumnDefinitions: {
|
|
176
|
+
readonly number: {
|
|
177
|
+
readonly header: "№";
|
|
178
|
+
readonly width: 8;
|
|
179
|
+
};
|
|
180
|
+
readonly order: {
|
|
181
|
+
readonly header: "№ Заказа";
|
|
182
|
+
readonly width: 28;
|
|
183
|
+
};
|
|
184
|
+
readonly date: {
|
|
185
|
+
readonly header: "Дата создания";
|
|
186
|
+
readonly width: 18;
|
|
187
|
+
};
|
|
188
|
+
readonly provider: {
|
|
189
|
+
readonly header: "Поставщик";
|
|
190
|
+
readonly width: 30;
|
|
191
|
+
};
|
|
192
|
+
readonly bill: {
|
|
193
|
+
readonly header: "№ Счета и дата";
|
|
194
|
+
readonly width: 30;
|
|
195
|
+
};
|
|
196
|
+
readonly sum: {
|
|
197
|
+
readonly header: "Сумма,руб";
|
|
198
|
+
readonly width: 18;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
export declare const WarehouseReceiptExcelExportColumnDefinitions: {
|
|
202
|
+
readonly number: {
|
|
203
|
+
readonly header: "№";
|
|
204
|
+
readonly width: 8;
|
|
205
|
+
};
|
|
206
|
+
readonly waybill: {
|
|
207
|
+
readonly header: "№ Накладной";
|
|
208
|
+
readonly width: 24;
|
|
209
|
+
};
|
|
210
|
+
readonly date: {
|
|
211
|
+
readonly header: "Дата прихода";
|
|
212
|
+
readonly width: 18;
|
|
213
|
+
};
|
|
214
|
+
readonly order: {
|
|
215
|
+
readonly header: "№ Заказа";
|
|
216
|
+
readonly width: 28;
|
|
217
|
+
};
|
|
218
|
+
readonly provider: {
|
|
219
|
+
readonly header: "Поставщик";
|
|
220
|
+
readonly width: 30;
|
|
221
|
+
};
|
|
222
|
+
readonly base: {
|
|
223
|
+
readonly header: "Основание";
|
|
224
|
+
readonly width: 30;
|
|
225
|
+
};
|
|
226
|
+
readonly sum: {
|
|
227
|
+
readonly header: "Сумма,руб";
|
|
228
|
+
readonly width: 18;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
export declare const MovementObjectExcelExportColumnDefinitions: {
|
|
232
|
+
readonly number: {
|
|
233
|
+
readonly header: "№";
|
|
234
|
+
readonly width: 8;
|
|
235
|
+
};
|
|
236
|
+
readonly date: {
|
|
237
|
+
readonly header: "Дата и время создания";
|
|
238
|
+
readonly width: 26;
|
|
239
|
+
};
|
|
240
|
+
readonly name: {
|
|
241
|
+
readonly header: "Наименование";
|
|
242
|
+
readonly width: 40;
|
|
243
|
+
};
|
|
244
|
+
readonly user: {
|
|
245
|
+
readonly header: "Ответственный";
|
|
246
|
+
readonly width: 24;
|
|
247
|
+
};
|
|
248
|
+
readonly type: {
|
|
249
|
+
readonly header: "Тип";
|
|
250
|
+
readonly width: 18;
|
|
251
|
+
};
|
|
252
|
+
readonly before: {
|
|
253
|
+
readonly header: "Начальный остаток";
|
|
254
|
+
readonly width: 22;
|
|
255
|
+
};
|
|
256
|
+
readonly movement: {
|
|
257
|
+
readonly header: "Приход / Расход";
|
|
258
|
+
readonly width: 22;
|
|
259
|
+
};
|
|
260
|
+
readonly remainder: {
|
|
261
|
+
readonly header: "Конечный остаток";
|
|
262
|
+
readonly width: 22;
|
|
263
|
+
};
|
|
264
|
+
readonly base: {
|
|
265
|
+
readonly header: "Основание";
|
|
266
|
+
readonly width: 32;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
export type WarehouseExcelExportRow = Record<string, ExcelExportColumnValue>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MovementObjectExcelExportColumnDefinitions = exports.WarehouseReceiptExcelExportColumnDefinitions = exports.OrderToWayExcelExportColumnDefinitions = exports.WarehouseConsumptionExcelExportColumnDefinitions = exports.ShippedOrderExcelExportColumnDefinitions = exports.WarehouseShipmentExcelExportColumnDefinitions = void 0;
|
|
4
|
+
/** Полные заголовки основных складских таблиц; служебные ячейки исключены. */
|
|
5
|
+
exports.WarehouseShipmentExcelExportColumnDefinitions = {
|
|
6
|
+
number: { header: '№', width: 8 },
|
|
7
|
+
order: { header: 'Заказ', width: 24 },
|
|
8
|
+
article: { header: 'Артикул изделия', width: 24 },
|
|
9
|
+
name: { header: 'Наименование изделия', width: 40 },
|
|
10
|
+
quantity: { header: 'Потребность по заказам покупателя', width: 25 },
|
|
11
|
+
days: { header: 'Кол-во дней', width: 16 },
|
|
12
|
+
remainingDays: { header: 'Осталось дней', width: 16 },
|
|
13
|
+
base: { header: 'Основание', width: 32 },
|
|
14
|
+
buyer: { header: 'Покупатель', width: 30 },
|
|
15
|
+
completion: { header: 'Уровень комплектации', width: 23 },
|
|
16
|
+
status: { header: 'Статус', width: 22 },
|
|
17
|
+
startTime: { header: 'Начало работ', width: 24 },
|
|
18
|
+
calculatedTime: { header: 'Расчётная дата изготовления', width: 26 },
|
|
19
|
+
warehouseDate: { header: 'Дата плановой готовности склада', width: 28 },
|
|
20
|
+
shipmentDate: { header: 'Дата плановой отгрузки', width: 24 },
|
|
21
|
+
actualDate: { header: 'Дата фактической отгрузки', width: 25 },
|
|
22
|
+
readiness: { header: 'Готовность к комплектации', width: 25 },
|
|
23
|
+
startDelay: { header: 'Просрочка начала работ, ч', width: 25 },
|
|
24
|
+
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
25
|
+
comment: { header: 'Комментарии', width: 40 },
|
|
26
|
+
metalTime: { header: 'Время на МО ч/мин', width: 24 },
|
|
27
|
+
assemblyTime: { header: 'Время на сборку ч/мин', width: 24 },
|
|
28
|
+
totalTime: { header: 'Общая трудоемкость ч/мин', width: 26 }
|
|
29
|
+
};
|
|
30
|
+
exports.ShippedOrderExcelExportColumnDefinitions = {
|
|
31
|
+
number: { header: '№', width: 8 },
|
|
32
|
+
date: { header: 'Дата фактической отгрузки', width: 25 },
|
|
33
|
+
shipment: { header: '№ Отгрузки', width: 24 },
|
|
34
|
+
buyer: { header: 'Покупатель', width: 30 },
|
|
35
|
+
order: { header: '№ заказа и дата', width: 24 },
|
|
36
|
+
article: { header: 'Артикул', width: 24 },
|
|
37
|
+
name: { header: 'Наименование изделия', width: 40 }
|
|
38
|
+
};
|
|
39
|
+
exports.WarehouseConsumptionExcelExportColumnDefinitions = {
|
|
40
|
+
number: { header: '№', width: 8 },
|
|
41
|
+
date: { header: 'Дата', width: 18 },
|
|
42
|
+
base: { header: 'Основание', width: 30 },
|
|
43
|
+
order: { header: '№ заказа', width: 24 },
|
|
44
|
+
type: { header: 'Тип сущности', width: 18 },
|
|
45
|
+
name: { header: 'Наименование', width: 40 },
|
|
46
|
+
quantity: { header: 'Кол-во', width: 18 },
|
|
47
|
+
customer: { header: 'Заказчик', width: 30 }
|
|
48
|
+
};
|
|
49
|
+
exports.OrderToWayExcelExportColumnDefinitions = {
|
|
50
|
+
number: { header: '№', width: 8 },
|
|
51
|
+
order: { header: '№ Заказа', width: 28 },
|
|
52
|
+
date: { header: 'Дата создания', width: 18 },
|
|
53
|
+
provider: { header: 'Поставщик', width: 30 },
|
|
54
|
+
bill: { header: '№ Счета и дата', width: 30 },
|
|
55
|
+
sum: { header: 'Сумма,руб', width: 18 }
|
|
56
|
+
};
|
|
57
|
+
exports.WarehouseReceiptExcelExportColumnDefinitions = {
|
|
58
|
+
number: { header: '№', width: 8 },
|
|
59
|
+
waybill: { header: '№ Накладной', width: 24 },
|
|
60
|
+
date: { header: 'Дата прихода', width: 18 },
|
|
61
|
+
order: { header: '№ Заказа', width: 28 },
|
|
62
|
+
provider: { header: 'Поставщик', width: 30 },
|
|
63
|
+
base: { header: 'Основание', width: 30 },
|
|
64
|
+
sum: { header: 'Сумма,руб', width: 18 }
|
|
65
|
+
};
|
|
66
|
+
exports.MovementObjectExcelExportColumnDefinitions = {
|
|
67
|
+
number: { header: '№', width: 8 },
|
|
68
|
+
date: { header: 'Дата и время создания', width: 26 },
|
|
69
|
+
name: { header: 'Наименование', width: 40 },
|
|
70
|
+
user: { header: 'Ответственный', width: 24 },
|
|
71
|
+
type: { header: 'Тип', width: 18 },
|
|
72
|
+
before: { header: 'Начальный остаток', width: 22 },
|
|
73
|
+
movement: { header: 'Приход / Расход', width: 22 },
|
|
74
|
+
remainder: { header: 'Конечный остаток', width: 22 },
|
|
75
|
+
base: { header: 'Основание', width: 32 }
|
|
76
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -57,4 +57,5 @@ __exportStar(require("./movement-error"), exports);
|
|
|
57
57
|
__exportStar(require("./exclusion"), exports);
|
|
58
58
|
__exportStar(require("./planning"), exports);
|
|
59
59
|
__exportStar(require("./ai-mcp"), exports);
|
|
60
|
+
__exportStar(require("./bull-queue"), exports);
|
|
60
61
|
__exportStar(require("./excel-export"), exports);
|
|
@@ -17,7 +17,7 @@ exports.SplitProductionTaskPositionDtoZod = zod_1.z.object({
|
|
|
17
17
|
exports.SplitProductionTaskDtoZod = zod_1.z.object({
|
|
18
18
|
positions: zod_1.z
|
|
19
19
|
.array(exports.SplitProductionTaskPositionDtoZod)
|
|
20
|
-
.length(1, 'За один раз можно
|
|
20
|
+
.length(1, 'За один раз можно разделить только одну сущность ПЗ')
|
|
21
21
|
.superRefine((positions, ctx) => {
|
|
22
22
|
const positionIds = positions.map(position => position.productionOperationPosId);
|
|
23
23
|
if (new Set(positionIds).size !== positionIds.length) {
|
|
@@ -217,7 +217,9 @@ export interface IGetActualTaskRelative {
|
|
|
217
217
|
}
|
|
218
218
|
export interface IRelevanceOfProductionTask {
|
|
219
219
|
operationId: number;
|
|
220
|
+
forceRedistributeMarks?: boolean;
|
|
220
221
|
isStopActualPositions?: boolean;
|
|
222
|
+
redistributeMarksByGlobalPriority?: boolean;
|
|
221
223
|
transaction?: any;
|
|
222
224
|
}
|
|
223
225
|
export interface IActualOperationPos {
|
|
@@ -5,9 +5,9 @@ import { ModelProductionOperationPos } from '../schemas/production-operation-pos
|
|
|
5
5
|
* Возвращает пользовательский номер производственного задания.
|
|
6
6
|
* @param productionTaskId - Внутренний идентификатор ПЗ.
|
|
7
7
|
* @param parentProductionTaskId - Идентификатор родительского ПЗ.
|
|
8
|
-
* @param subtaskNumber - Неизменяемый порядковый номер
|
|
9
|
-
* @param hasSubtasks - Признак наличия
|
|
10
|
-
* @returns Номер обычного, родительского либо
|
|
8
|
+
* @param subtaskNumber - Неизменяемый порядковый номер разделённого ПЗ в семье.
|
|
9
|
+
* @param hasSubtasks - Признак наличия разделённых ПЗ у корневого задания.
|
|
10
|
+
* @returns Номер обычного, родительского либо разделённого ПЗ.
|
|
11
11
|
*/
|
|
12
12
|
export declare const formatProductionTaskDisplayNumber: (productionTaskId: number, parentProductionTaskId: number | null | undefined, subtaskNumber: number | null | undefined, hasSubtasks?: boolean) => string;
|
|
13
13
|
export declare const findMinGlobalIndex: (operationPosItems: ModelOperationPosition[]) => number;
|
|
@@ -6,9 +6,9 @@ const lodash_1 = require("lodash");
|
|
|
6
6
|
* Возвращает пользовательский номер производственного задания.
|
|
7
7
|
* @param productionTaskId - Внутренний идентификатор ПЗ.
|
|
8
8
|
* @param parentProductionTaskId - Идентификатор родительского ПЗ.
|
|
9
|
-
* @param subtaskNumber - Неизменяемый порядковый номер
|
|
10
|
-
* @param hasSubtasks - Признак наличия
|
|
11
|
-
* @returns Номер обычного, родительского либо
|
|
9
|
+
* @param subtaskNumber - Неизменяемый порядковый номер разделённого ПЗ в семье.
|
|
10
|
+
* @param hasSubtasks - Признак наличия разделённых ПЗ у корневого задания.
|
|
11
|
+
* @returns Номер обычного, родительского либо разделённого ПЗ.
|
|
12
12
|
*/
|
|
13
13
|
const formatProductionTaskDisplayNumber = (productionTaskId, parentProductionTaskId, subtaskNumber, hasSubtasks = false) => {
|
|
14
14
|
if (parentProductionTaskId == null) {
|
|
@@ -3,10 +3,23 @@ import { IzdType, SpetificationEntityKeys } from '../../utils';
|
|
|
3
3
|
export declare const SpecificationParentTypeZod: z.ZodEnum<[IzdType.product, IzdType.cbed, IzdType.detal]>;
|
|
4
4
|
export declare const SpecificationSectionZod: z.ZodNativeEnum<typeof SpetificationEntityKeys>;
|
|
5
5
|
export declare const SpecificationMutationOperationZod: z.ZodEnum<["add", "update", "move", "remove"]>;
|
|
6
|
+
export declare const SPECIFICATION_QUANTITY_MIN = 0.000001;
|
|
7
|
+
export declare const SPECIFICATION_QUANTITY_MAX = 1000000;
|
|
8
|
+
export declare const SPECIFICATION_POSITION_MIN = 1;
|
|
6
9
|
/**
|
|
7
10
|
* Единая команда точечного изменения спецификации.
|
|
8
11
|
* position задаётся в привычном пользователю формате: первый элемент имеет позицию 1.
|
|
9
12
|
*/
|
|
13
|
+
export declare const MutateSpecificationDtoShape: {
|
|
14
|
+
parentType: z.ZodEnum<[IzdType.product, IzdType.cbed, IzdType.detal]>;
|
|
15
|
+
parentId: z.ZodNumber;
|
|
16
|
+
section: z.ZodNativeEnum<typeof SpetificationEntityKeys>;
|
|
17
|
+
operation: z.ZodEnum<["add", "update", "move", "remove"]>;
|
|
18
|
+
itemId: z.ZodNumber;
|
|
19
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
measureId: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
};
|
|
10
23
|
export declare const MutateSpecificationDtoZod: z.ZodEffects<z.ZodObject<{
|
|
11
24
|
parentType: z.ZodEnum<[IzdType.product, IzdType.cbed, IzdType.detal]>;
|
|
12
25
|
parentId: z.ZodNumber;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MutateSpecificationDtoZod = exports.SpecificationMutationOperationZod = exports.SpecificationSectionZod = exports.SpecificationParentTypeZod = void 0;
|
|
3
|
+
exports.MutateSpecificationDtoZod = exports.MutateSpecificationDtoShape = exports.SPECIFICATION_POSITION_MIN = exports.SPECIFICATION_QUANTITY_MAX = exports.SPECIFICATION_QUANTITY_MIN = exports.SpecificationMutationOperationZod = exports.SpecificationSectionZod = exports.SpecificationParentTypeZod = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
exports.SpecificationParentTypeZod = zod_1.z.enum([
|
|
@@ -15,21 +15,29 @@ exports.SpecificationMutationOperationZod = zod_1.z.enum([
|
|
|
15
15
|
'move',
|
|
16
16
|
'remove'
|
|
17
17
|
]);
|
|
18
|
+
exports.SPECIFICATION_QUANTITY_MIN = 0.000001;
|
|
19
|
+
exports.SPECIFICATION_QUANTITY_MAX = 1000000;
|
|
20
|
+
exports.SPECIFICATION_POSITION_MIN = 1;
|
|
18
21
|
/**
|
|
19
22
|
* Единая команда точечного изменения спецификации.
|
|
20
23
|
* position задаётся в привычном пользователю формате: первый элемент имеет позицию 1.
|
|
21
24
|
*/
|
|
22
|
-
exports.
|
|
23
|
-
.object({
|
|
25
|
+
exports.MutateSpecificationDtoShape = {
|
|
24
26
|
parentType: exports.SpecificationParentTypeZod,
|
|
25
27
|
parentId: zod_1.z.coerce.number().int().min(1),
|
|
26
28
|
section: exports.SpecificationSectionZod,
|
|
27
29
|
operation: exports.SpecificationMutationOperationZod,
|
|
28
30
|
itemId: zod_1.z.coerce.number().int().min(1),
|
|
29
|
-
quantity: zod_1.z.coerce
|
|
31
|
+
quantity: zod_1.z.coerce
|
|
32
|
+
.number()
|
|
33
|
+
.min(exports.SPECIFICATION_QUANTITY_MIN)
|
|
34
|
+
.max(exports.SPECIFICATION_QUANTITY_MAX)
|
|
35
|
+
.optional(),
|
|
30
36
|
measureId: zod_1.z.coerce.number().int().min(1).optional(),
|
|
31
|
-
position: zod_1.z.coerce.number().int().min(
|
|
32
|
-
}
|
|
37
|
+
position: zod_1.z.coerce.number().int().min(exports.SPECIFICATION_POSITION_MIN).optional()
|
|
38
|
+
};
|
|
39
|
+
exports.MutateSpecificationDtoZod = zod_1.z
|
|
40
|
+
.object(exports.MutateSpecificationDtoShape)
|
|
33
41
|
.superRefine((command, context) => {
|
|
34
42
|
if (command.parentType === utils_1.IzdType.detal &&
|
|
35
43
|
command.section !== utils_1.SpetificationEntityKeys.materialList) {
|