@pksep/zod-shared 0.0.566 → 0.0.568
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 +1 -0
- package/dist/ai-mcp/index.js +1 -0
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +172 -3
- package/dist/ai-mcp/schemas/ai-mcp-shipment.schema.d.ts +109 -0
- package/dist/ai-mcp/schemas/ai-mcp-shipment.schema.js +110 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +59 -2
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +31 -3
- package/dist/assemble/interfaces/interfaces.d.ts +4 -0
- package/dist/document/dto/entity-document-command.dto.d.ts +14 -14
- package/dist/document/dto/entity-document-command.dto.js +2 -1
- package/dist/document/types/uploaded-file-map.type.d.ts +5 -0
- package/dist/document/types/uploaded-file-map.type.js +2 -0
- package/dist/excel-export/excel-export.dto.d.ts +990 -2555
- package/dist/excel-export/excel-export.dto.js +15 -116
- package/dist/excel-export/index.d.ts +0 -1
- package/dist/excel-export/index.js +0 -1
- package/dist/marks/dto/get-result-work.dto.d.ts +18 -4
- package/dist/marks/dto/get-result-work.dto.js +2 -1
- package/dist/production-tasks/dto/repair-production-task-priority.dto.d.ts +30 -0
- package/dist/production-tasks/dto/repair-production-task-priority.dto.js +18 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +28 -8
- package/dist/role/constants/permission.constants.d.ts +9 -0
- package/dist/role/constants/permission.constants.js +13 -0
- package/dist/role/dto/update-role-permissions.dto.d.ts +15 -0
- package/dist/role/dto/update-role-permissions.dto.js +9 -0
- package/dist/role/enums/permission.enum.d.ts +116 -0
- package/dist/role/enums/permission.enum.js +123 -0
- package/dist/role/schemas/permission.schema.d.ts +169 -0
- package/dist/role/schemas/permission.schema.js +44 -0
- package/dist/role/types/permission.types.d.ts +38 -0
- package/dist/role/types/permission.types.js +2 -0
- package/dist/sclad/schemas/revision.schema.d.ts +5 -5
- package/dist/stock-order/dto/get-stock-order-items-by-entity.dto.d.ts +19 -0
- package/dist/stock-order/dto/get-stock-order-items-by-entity.dto.js +11 -0
- package/dist/tech-process/types/tech-process-load-options.d.ts +3 -0
- package/dist/tech-process/types/tech-process-load-options.js +2 -0
- package/dist/utils/enums.d.ts +1 -0
- package/dist/utils/enums.js +1 -0
- package/dist/utils/sorting.d.ts +2 -1
- package/dist/utils/sorting.js +1 -0
- package/dist/utils/tables-config/enum.d.ts +2 -0
- package/dist/utils/tables-config/enum.js +2 -0
- package/dist/utils/tables-config/tables-array.js +8 -0
- package/package.json +2 -2
- package/dist/excel-export/warehouse-excel-export.d.ts +0 -269
- package/dist/excel-export/warehouse-excel-export.js +0 -76
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.ExcelExportReportTitles = exports.ExcelExportSeenSchema = exports.ExcelExportHistorySchema = exports.ExcelExportHistoryQuerySchema = exports.ExcelExportHistoryRecordSchema = exports.ExcelExportHistoryEntrySchema = exports.EXCEL_EXPORT_RETENTION_MS = exports.ExcelExportResultSchema = exports.ExcelExportJobDataSchema = exports.ExcelExportStatusSchema = exports.ExcelExportCreatedSchema = exports.CreateExcelExportDtoZod = void 0;
|
|
3
|
+
exports.ExcelExportResultSchema = exports.ExcelExportJobDataSchema = exports.ExcelExportStatusSchema = exports.ExcelExportCreatedSchema = exports.CreateExcelExportDtoZod = exports.CreateExcelExportRequestSchema = 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;
|
|
5
4
|
const zod_1 = require("zod");
|
|
6
|
-
const warehouse_excel_export_1 = require("./warehouse-excel-export");
|
|
7
5
|
const assemble_1 = require("../assemble");
|
|
8
6
|
const cbed_1 = require("../cbed");
|
|
9
7
|
const detal_1 = require("../detal");
|
|
@@ -11,11 +9,6 @@ const material_1 = require("../material");
|
|
|
11
9
|
const metaloworking_1 = require("../metaloworking");
|
|
12
10
|
const marks_1 = require("../marks");
|
|
13
11
|
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");
|
|
19
12
|
var ExcelExportReportType;
|
|
20
13
|
(function (ExcelExportReportType) {
|
|
21
14
|
ExcelExportReportType["assemblyList"] = "assembly.list";
|
|
@@ -31,12 +24,6 @@ var ExcelExportReportType;
|
|
|
31
24
|
ExcelExportReportType["cbedDeficitList"] = "warehouse.cbed-deficit-list";
|
|
32
25
|
ExcelExportReportType["detalDeficitList"] = "warehouse.detal-deficit-list";
|
|
33
26
|
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";
|
|
40
27
|
})(ExcelExportReportType || (exports.ExcelExportReportType = ExcelExportReportType = {}));
|
|
41
28
|
var OperationPathExcelExportSourceType;
|
|
42
29
|
(function (OperationPathExcelExportSourceType) {
|
|
@@ -49,8 +36,6 @@ var ExcelExportStatus;
|
|
|
49
36
|
ExcelExportStatus["processing"] = "processing";
|
|
50
37
|
ExcelExportStatus["completed"] = "completed";
|
|
51
38
|
ExcelExportStatus["failed"] = "failed";
|
|
52
|
-
ExcelExportStatus["cancelling"] = "cancelling";
|
|
53
|
-
ExcelExportStatus["cancelled"] = "cancelled";
|
|
54
39
|
})(ExcelExportStatus || (exports.ExcelExportStatus = ExcelExportStatus = {}));
|
|
55
40
|
exports.ExcelExportColumnDefinitionSchema = zod_1.z.object({
|
|
56
41
|
header: zod_1.z.string().min(1),
|
|
@@ -74,6 +59,10 @@ exports.AssemblyExcelExportColumnDefinitions = {
|
|
|
74
59
|
},
|
|
75
60
|
startTimeDelay: { header: 'Просрочка начала работ, ч', width: 24 },
|
|
76
61
|
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
62
|
+
calculatedStartTimeDelay: {
|
|
63
|
+
header: 'Просрочка расчётного начала работ, ч',
|
|
64
|
+
width: 28
|
|
65
|
+
},
|
|
77
66
|
complectataionReadiness: {
|
|
78
67
|
header: 'Готовность к комплектации',
|
|
79
68
|
width: 25
|
|
@@ -101,6 +90,10 @@ exports.MetalloworkingExcelExportColumnDefinitions = {
|
|
|
101
90
|
orderedByProduction: { header: 'Заказано по ПЗ', width: 18 },
|
|
102
91
|
ordered: { header: 'Заказано на складе', width: 20 },
|
|
103
92
|
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
93
|
+
calculatedStartTimeDelay: {
|
|
94
|
+
header: 'Просрочка расчётного начала работ, ч',
|
|
95
|
+
width: 28
|
|
96
|
+
},
|
|
104
97
|
workpieceParameters: { header: 'Параметры заготовки', width: 28 },
|
|
105
98
|
material: { header: 'Материал', width: 35 },
|
|
106
99
|
timeToProduction: {
|
|
@@ -303,6 +296,10 @@ exports.AssemblyStockOrderExcelExportColumnDefinitions = {
|
|
|
303
296
|
},
|
|
304
297
|
startTimeDelay: { header: 'Просрочка начала работ, ч', width: 24 },
|
|
305
298
|
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
299
|
+
calculatedStartTimeDelay: {
|
|
300
|
+
header: 'Просрочка расчётного начала работ, ч',
|
|
301
|
+
width: 28
|
|
302
|
+
},
|
|
306
303
|
orderDemand: {
|
|
307
304
|
header: 'Потребность по заказам склада или покупателя',
|
|
308
305
|
width: 31
|
|
@@ -516,50 +513,6 @@ exports.CreateMaterialDeficitExcelExportDtoZod = zod_1.z.object({
|
|
|
516
513
|
columns: createUniqueColumnsSchema(exports.MaterialDeficitExcelExportColumnSchema),
|
|
517
514
|
filters: material_1.GetMaterialDeficitDtoZod.omit({ page: true })
|
|
518
515
|
});
|
|
519
|
-
exports.CreateWarehouseShipmentExcelExportSchema = zod_1.z.object({
|
|
520
|
-
reportType: zod_1.z.literal(ExcelExportReportType.warehouseShipmentList),
|
|
521
|
-
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.WarehouseShipmentExcelExportColumnDefinitions))),
|
|
522
|
-
filters: shipments_1.ShipmentsPaginateSchema.omit({ offset: true, attributes: true })
|
|
523
|
-
});
|
|
524
|
-
exports.CreateShippedOrderExcelExportSchema = zod_1.z.object({
|
|
525
|
-
reportType: zod_1.z.literal(ExcelExportReportType.shippedOrderList),
|
|
526
|
-
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.ShippedOrderExcelExportColumnDefinitions))),
|
|
527
|
-
filters: shipments_1.ShipmentCheckPaginationSchema.omit({ page: true })
|
|
528
|
-
});
|
|
529
|
-
exports.CreateWarehouseConsumptionExcelExportSchema = zod_1.z.object({
|
|
530
|
-
reportType: zod_1.z.literal(ExcelExportReportType.warehouseConsumptionList),
|
|
531
|
-
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.WarehouseConsumptionExcelExportColumnDefinitions))),
|
|
532
|
-
filters: expenditure_1.GetExpenditureRequestSchema.omit({ page: true })
|
|
533
|
-
});
|
|
534
|
-
exports.CreateOrderToWayExcelExportSchema = zod_1.z.object({
|
|
535
|
-
reportType: zod_1.z.literal(ExcelExportReportType.orderToWayList),
|
|
536
|
-
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.OrderToWayExcelExportColumnDefinitions))),
|
|
537
|
-
filters: stock_order_1.GetStockOrderPaginationSchema.omit({ page: true }).extend({
|
|
538
|
-
type: zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2), zod_1.z.literal(3)]),
|
|
539
|
-
selectedIds: zod_1.z.array(zod_1.z.number().int().positive()).max(10000).optional()
|
|
540
|
-
})
|
|
541
|
-
});
|
|
542
|
-
exports.CreateWarehouseReceiptExcelExportSchema = zod_1.z.object({
|
|
543
|
-
reportType: zod_1.z.literal(ExcelExportReportType.warehouseReceiptList),
|
|
544
|
-
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.WarehouseReceiptExcelExportColumnDefinitions))),
|
|
545
|
-
filters: stock_order_1.GetStockOrderPaginationSchema.omit({ page: true }).extend({
|
|
546
|
-
typeComing: zod_1.z.nativeEnum(utils_1.WaybilTypeComingEnums)
|
|
547
|
-
})
|
|
548
|
-
});
|
|
549
|
-
exports.CreateMovementObjectExcelExportSchema = zod_1.z.object({
|
|
550
|
-
reportType: zod_1.z.literal(ExcelExportReportType.movementObjectList),
|
|
551
|
-
columns: createUniqueColumnsSchema(zod_1.z.enum(getColumnDefinitionKeys(warehouse_excel_export_1.MovementObjectExcelExportColumnDefinitions))),
|
|
552
|
-
filters: movement_object_1.GetOneObjectHistorySchema.innerType()
|
|
553
|
-
.omit({ page: true, isCheckChildrens: true })
|
|
554
|
-
.extend({
|
|
555
|
-
date: utils_1.DateRangeSchema
|
|
556
|
-
})
|
|
557
|
-
.refine(({ date }) => {
|
|
558
|
-
const start = new Date(date.start).getTime();
|
|
559
|
-
const end = new Date(date.end).getTime();
|
|
560
|
-
return Number.isFinite(start) && Number.isFinite(end) && start <= end;
|
|
561
|
-
}, { message: 'Укажите корректный диапазон дат', path: ['date'] })
|
|
562
|
-
});
|
|
563
516
|
exports.CreateExcelExportRequestSchema = zod_1.z.discriminatedUnion('reportType', [
|
|
564
517
|
exports.CreateAssemblyExcelExportDtoZod,
|
|
565
518
|
exports.CreateAssemblyOperationExcelExportDtoZod,
|
|
@@ -573,13 +526,7 @@ exports.CreateExcelExportRequestSchema = zod_1.z.discriminatedUnion('reportType'
|
|
|
573
526
|
exports.CreateProductDeficitExcelExportDtoZod,
|
|
574
527
|
exports.CreateCbedDeficitExcelExportDtoZod,
|
|
575
528
|
exports.CreateDetalDeficitExcelExportDtoZod,
|
|
576
|
-
exports.CreateMaterialDeficitExcelExportDtoZod
|
|
577
|
-
exports.CreateWarehouseShipmentExcelExportSchema,
|
|
578
|
-
exports.CreateShippedOrderExcelExportSchema,
|
|
579
|
-
exports.CreateWarehouseConsumptionExcelExportSchema,
|
|
580
|
-
exports.CreateOrderToWayExcelExportSchema,
|
|
581
|
-
exports.CreateWarehouseReceiptExcelExportSchema,
|
|
582
|
-
exports.CreateMovementObjectExcelExportSchema
|
|
529
|
+
exports.CreateMaterialDeficitExcelExportDtoZod
|
|
583
530
|
]);
|
|
584
531
|
// createZodDto requires an object schema as its class base. The refinement
|
|
585
532
|
// delegates validation to the strict discriminated report contract.
|
|
@@ -613,53 +560,5 @@ exports.ExcelExportResultSchema = zod_1.z.object({
|
|
|
613
560
|
objectName: zod_1.z.string().min(1),
|
|
614
561
|
fileName: zod_1.z.string().min(1),
|
|
615
562
|
contentType: zod_1.z.string().min(1),
|
|
616
|
-
rowCount: zod_1.z.number().int().nonnegative()
|
|
617
|
-
sizeBytes: zod_1.z.number().int().nonnegative().optional()
|
|
563
|
+
rowCount: zod_1.z.number().int().nonnegative()
|
|
618
564
|
});
|
|
619
|
-
/** Срок считается от готовности, скачивания не продлевают хранение. */
|
|
620
|
-
exports.EXCEL_EXPORT_RETENTION_MS = 5 * 24 * 60 * 60 * 1000;
|
|
621
|
-
exports.ExcelExportHistoryEntrySchema = exports.ExcelExportStatusSchema.extend({
|
|
622
|
-
reportType: zod_1.z.nativeEnum(ExcelExportReportType),
|
|
623
|
-
createdAt: zod_1.z.number().int().nonnegative(),
|
|
624
|
-
finishedAt: zod_1.z.number().int().nonnegative().optional(),
|
|
625
|
-
expiresAt: zod_1.z.number().int().nonnegative().optional(),
|
|
626
|
-
fileName: zod_1.z.string().optional(),
|
|
627
|
-
sizeBytes: zod_1.z.number().int().nonnegative().optional()
|
|
628
|
-
});
|
|
629
|
-
exports.ExcelExportHistoryRecordSchema = exports.ExcelExportHistoryEntrySchema.extend({
|
|
630
|
-
userId: zod_1.z.number().int().positive(),
|
|
631
|
-
result: exports.ExcelExportResultSchema.optional()
|
|
632
|
-
});
|
|
633
|
-
exports.ExcelExportHistoryQuerySchema = zod_1.z.object({
|
|
634
|
-
before: zod_1.z.coerce.number().int().positive().optional()
|
|
635
|
-
});
|
|
636
|
-
exports.ExcelExportHistorySchema = zod_1.z.object({
|
|
637
|
-
rows: zod_1.z.array(exports.ExcelExportHistoryEntrySchema),
|
|
638
|
-
nextCursor: zod_1.z.number().int().positive().nullable(),
|
|
639
|
-
unreadCount: zod_1.z.number().int().nonnegative(),
|
|
640
|
-
activeCount: zod_1.z.number().int().nonnegative()
|
|
641
|
-
});
|
|
642
|
-
exports.ExcelExportSeenSchema = zod_1.z.object({
|
|
643
|
-
ids: zod_1.z.array(zod_1.z.string().regex(/^\d+$/)).max(50)
|
|
644
|
-
});
|
|
645
|
-
exports.ExcelExportReportTitles = {
|
|
646
|
-
[ExcelExportReportType.assemblyList]: 'Сборка',
|
|
647
|
-
[ExcelExportReportType.assemblyOperationList]: 'Сборка по операциям',
|
|
648
|
-
[ExcelExportReportType.operationPath]: 'Производственный путь',
|
|
649
|
-
[ExcelExportReportType.assemblyStockOrderList]: 'Заказ склада на сборку',
|
|
650
|
-
[ExcelExportReportType.metalloworkingList]: 'Металлообработка',
|
|
651
|
-
[ExcelExportReportType.metalloworkingOperationList]: 'Металлообработка по операциям',
|
|
652
|
-
[ExcelExportReportType.metalloworkingComplectationList]: 'Комплектация металлообработки',
|
|
653
|
-
[ExcelExportReportType.metalloworkingStockOrderList]: 'Заказ склада на металлообработку',
|
|
654
|
-
[ExcelExportReportType.resultWorkList]: 'Результат работ',
|
|
655
|
-
[ExcelExportReportType.productDeficitList]: 'Дефицит продукции',
|
|
656
|
-
[ExcelExportReportType.cbedDeficitList]: 'Дефицит сборочных единиц',
|
|
657
|
-
[ExcelExportReportType.detalDeficitList]: 'Дефицит деталей',
|
|
658
|
-
[ExcelExportReportType.materialDeficitList]: 'Дефицит материалов',
|
|
659
|
-
[ExcelExportReportType.warehouseShipmentList]: 'Склад: задачи на отгрузку',
|
|
660
|
-
[ExcelExportReportType.shippedOrderList]: 'Отгруженные заказы',
|
|
661
|
-
[ExcelExportReportType.warehouseConsumptionList]: 'Расход со склада',
|
|
662
|
-
[ExcelExportReportType.orderToWayList]: 'Заказано / В пути',
|
|
663
|
-
[ExcelExportReportType.warehouseReceiptList]: 'Приход на склад',
|
|
664
|
-
[ExcelExportReportType.movementObjectList]: 'Движение объектов'
|
|
665
|
-
};
|
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { DateRangeType } from '../../utils';
|
|
3
2
|
export declare const getResultWorkingPaginationSchemaDto: z.ZodObject<{
|
|
4
3
|
page: z.ZodNumber;
|
|
5
4
|
responsibleUserIds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
6
5
|
selectTypeOperation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
6
|
searchString: z.ZodOptional<z.ZodString>;
|
|
8
|
-
dateRange: z.ZodOptional<z.ZodNullable<z.
|
|
7
|
+
dateRange: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
8
|
+
start: z.ZodUnion<[z.ZodString, z.ZodDate]>;
|
|
9
|
+
end: z.ZodUnion<[z.ZodString, z.ZodDate]>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
start: string | Date;
|
|
12
|
+
end: string | Date;
|
|
13
|
+
}, {
|
|
14
|
+
start: string | Date;
|
|
15
|
+
end: string | Date;
|
|
16
|
+
}>>>;
|
|
9
17
|
}, "strip", z.ZodTypeAny, {
|
|
10
18
|
page: number;
|
|
11
19
|
responsibleUserIds?: number[] | undefined;
|
|
12
20
|
selectTypeOperation?: number | null | undefined;
|
|
13
21
|
searchString?: string | undefined;
|
|
14
|
-
dateRange?:
|
|
22
|
+
dateRange?: {
|
|
23
|
+
start: string | Date;
|
|
24
|
+
end: string | Date;
|
|
25
|
+
} | null | undefined;
|
|
15
26
|
}, {
|
|
16
27
|
page: number;
|
|
17
28
|
responsibleUserIds?: number[] | undefined;
|
|
18
29
|
selectTypeOperation?: number | null | undefined;
|
|
19
30
|
searchString?: string | undefined;
|
|
20
|
-
dateRange?:
|
|
31
|
+
dateRange?: {
|
|
32
|
+
start: string | Date;
|
|
33
|
+
end: string | Date;
|
|
34
|
+
} | null | undefined;
|
|
21
35
|
}>;
|
|
22
36
|
export type GetResultWorkingPaginationDto = z.infer<typeof getResultWorkingPaginationSchemaDto>;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getResultWorkingPaginationSchemaDto = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
5
6
|
exports.getResultWorkingPaginationSchemaDto = zod_1.z.object({
|
|
6
7
|
page: zod_1.z.number().int().nonnegative(),
|
|
7
8
|
responsibleUserIds: zod_1.z.array(zod_1.z.number()).optional(),
|
|
8
9
|
selectTypeOperation: zod_1.z.number().int().nullish(),
|
|
9
10
|
searchString: zod_1.z.string().optional(),
|
|
10
|
-
dateRange:
|
|
11
|
+
dateRange: utils_1.DateRangeSchema.nullish().describe('Период включительно: объект {start, end}, обе границы — строки даты/времени ISO 8601 с часовым поясом. Для календарных дней задайте начало первого и конец последнего дня.')
|
|
11
12
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ProductionTaskPriorityOrderZod: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
|
|
3
|
+
export declare const RepairProductionTaskPriorityOptionsZod: z.ZodObject<{
|
|
4
|
+
taskOrder: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>>;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
apply: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
report: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
userId?: number | undefined;
|
|
10
|
+
taskOrder?: number[] | undefined;
|
|
11
|
+
apply?: boolean | undefined;
|
|
12
|
+
report?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
userId?: number | undefined;
|
|
15
|
+
taskOrder?: number[] | undefined;
|
|
16
|
+
apply?: boolean | undefined;
|
|
17
|
+
report?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type RepairProductionTaskPriorityOptions = z.infer<typeof RepairProductionTaskPriorityOptionsZod>;
|
|
20
|
+
export declare const ProductionTaskPrioritySnapshotRowZod: z.ZodObject<{
|
|
21
|
+
id: z.ZodNumber;
|
|
22
|
+
globalOrderIndex: z.ZodNumber;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
id: number;
|
|
25
|
+
globalOrderIndex: number;
|
|
26
|
+
}, {
|
|
27
|
+
id: number;
|
|
28
|
+
globalOrderIndex: number;
|
|
29
|
+
}>;
|
|
30
|
+
export type ProductionTaskPrioritySnapshotRow = z.infer<typeof ProductionTaskPrioritySnapshotRowZod>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductionTaskPrioritySnapshotRowZod = exports.RepairProductionTaskPriorityOptionsZod = exports.ProductionTaskPriorityOrderZod = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ProductionTaskPriorityOrderZod = zod_1.z
|
|
6
|
+
.array(zod_1.z.number().int().positive())
|
|
7
|
+
.min(2)
|
|
8
|
+
.refine(ids => new Set(ids).size === ids.length, 'ПЗ не должны повторяться');
|
|
9
|
+
exports.RepairProductionTaskPriorityOptionsZod = zod_1.z.object({
|
|
10
|
+
taskOrder: exports.ProductionTaskPriorityOrderZod.optional(),
|
|
11
|
+
userId: zod_1.z.number().int().positive().optional(),
|
|
12
|
+
apply: zod_1.z.boolean().optional(),
|
|
13
|
+
report: zod_1.z.string().min(1).optional()
|
|
14
|
+
});
|
|
15
|
+
exports.ProductionTaskPrioritySnapshotRowZod = zod_1.z.object({
|
|
16
|
+
id: zod_1.z.number().int().positive(),
|
|
17
|
+
globalOrderIndex: zod_1.z.number().int().positive()
|
|
18
|
+
});
|
|
@@ -60,7 +60,17 @@ export interface IFilterByDate<T> {
|
|
|
60
60
|
endDate?: Date;
|
|
61
61
|
startTime?: Date;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
/** Дата изготовления уже выбранной соседней операции. */
|
|
64
|
+
export interface IOperationReadiness {
|
|
65
|
+
calculateNeedsTime?: Date | string | null;
|
|
66
|
+
}
|
|
67
|
+
/** Исходные данные и результат просрочки готовности начала, в минутах. */
|
|
68
|
+
export interface IWorkStartReadinessDelay {
|
|
69
|
+
startTime?: Date | string | null;
|
|
70
|
+
prevOperation?: IOperationReadiness | null;
|
|
71
|
+
workStartReadinessDelay?: number | null;
|
|
72
|
+
}
|
|
73
|
+
export interface IGetByOperation extends IWorkStartReadinessDelay {
|
|
64
74
|
productionTaskDueData: Date | null;
|
|
65
75
|
productionTaskId: number;
|
|
66
76
|
productionTaskDescription: string;
|
|
@@ -81,7 +91,7 @@ export interface IGetByOperation {
|
|
|
81
91
|
entity: ModelDetal | ModelCbed | ModelProduct;
|
|
82
92
|
myQuantity: number;
|
|
83
93
|
operationsLength: number;
|
|
84
|
-
prevOperation: ModelOperation | null;
|
|
94
|
+
prevOperation: (ModelOperation & IOperationReadiness) | null;
|
|
85
95
|
nextOperation: ModelOperation | null;
|
|
86
96
|
mainOperation: ModelOperation | null;
|
|
87
97
|
remainingByProductionTask: number;
|
|
@@ -162,11 +172,19 @@ export interface ITaskByOperations {
|
|
|
162
172
|
fullName: string;
|
|
163
173
|
calculateNeedsTime?: Date | null;
|
|
164
174
|
}
|
|
165
|
-
|
|
175
|
+
/** Даты одной и той же позиции операции для расчёта просрочки начала. */
|
|
176
|
+
export interface ICalculatedStartTimeDelay {
|
|
177
|
+
calculatedStartTime?: Date | string | null;
|
|
178
|
+
startTime?: Date | string | null;
|
|
179
|
+
start_time?: Date | string | null;
|
|
180
|
+
calculatedStartTimeDelay?: number | null;
|
|
181
|
+
}
|
|
182
|
+
export interface IGetDeficitsDetalByProductionTask extends ICalculatedStartTimeDelay {
|
|
166
183
|
detalId: number;
|
|
167
184
|
isHasIncorrectDate: boolean;
|
|
168
185
|
productionTaskId: number;
|
|
169
|
-
startTimeDelay?: number;
|
|
186
|
+
startTimeDelay?: number | null;
|
|
187
|
+
productionDelay?: number;
|
|
170
188
|
detalProductionTaskId: number;
|
|
171
189
|
childrenCalculateNeedsTime: Date | 0;
|
|
172
190
|
totalProductionTaskOrdered: number;
|
|
@@ -243,6 +261,8 @@ export interface IGetLastOperation {
|
|
|
243
261
|
mainTime: number;
|
|
244
262
|
userId: number;
|
|
245
263
|
firstStartTime: Date;
|
|
264
|
+
firstCalculateStartTime?: Date | null;
|
|
265
|
+
calculate_start_time?: Date | null;
|
|
246
266
|
firstPlanReadyDate: Date;
|
|
247
267
|
quantity_max: number;
|
|
248
268
|
productionOperationId: number;
|
|
@@ -262,7 +282,7 @@ export interface IOperationPositionToChangeTime {
|
|
|
262
282
|
mainTime: number;
|
|
263
283
|
workStartCalcType?: string;
|
|
264
284
|
}
|
|
265
|
-
export interface IGetByEquipment {
|
|
285
|
+
export interface IGetByEquipment extends IWorkStartReadinessDelay {
|
|
266
286
|
mainEntity: {
|
|
267
287
|
avaPath: string;
|
|
268
288
|
name: string;
|
|
@@ -282,7 +302,7 @@ export interface IGetByEquipment {
|
|
|
282
302
|
totalProductionTAskOrdered: number;
|
|
283
303
|
mainOperation: ModelOperation;
|
|
284
304
|
equipmentIds: number[];
|
|
285
|
-
prevOperation: ModelOperation | null;
|
|
305
|
+
prevOperation: (ModelOperation & IOperationReadiness) | null;
|
|
286
306
|
nextOperation: ModelOperation | null;
|
|
287
307
|
orderedByCurrentTask: number;
|
|
288
308
|
timeToPrepare: number;
|
|
@@ -295,7 +315,7 @@ export interface IGetByEquipment {
|
|
|
295
315
|
parentProductionTaskId: number | null;
|
|
296
316
|
productionTaskDueData: Date;
|
|
297
317
|
}
|
|
298
|
-
export interface IGetByUser {
|
|
318
|
+
export interface IGetByUser extends IWorkStartReadinessDelay {
|
|
299
319
|
entity: {
|
|
300
320
|
avaPath: string;
|
|
301
321
|
name: string;
|
|
@@ -322,7 +342,7 @@ export interface IGetByUser {
|
|
|
322
342
|
calculateNeedsTime: number;
|
|
323
343
|
totalProductionTAskOrdered: number;
|
|
324
344
|
mainOperation: ModelOperation;
|
|
325
|
-
prevOperation: ModelOperation | null;
|
|
345
|
+
prevOperation: (ModelOperation & IOperationReadiness) | null;
|
|
326
346
|
nextOperation: ModelOperation | null;
|
|
327
347
|
remainingByProductionTask: number;
|
|
328
348
|
transferableQuantity: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Пользовательские названия действий разрешений. */
|
|
2
|
+
export declare const PERMISSION_ACTION_TITLES: {
|
|
3
|
+
readonly view: "просмотр";
|
|
4
|
+
readonly create: "создание";
|
|
5
|
+
readonly update: "обновление";
|
|
6
|
+
readonly archive: "архивирование";
|
|
7
|
+
readonly attach: "прикрепление";
|
|
8
|
+
readonly detach: "открепление";
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PERMISSION_ACTION_TITLES = void 0;
|
|
4
|
+
const permission_enum_1 = require("../enums/permission.enum");
|
|
5
|
+
/** Пользовательские названия действий разрешений. */
|
|
6
|
+
exports.PERMISSION_ACTION_TITLES = {
|
|
7
|
+
[permission_enum_1.PermissionActionEnum.View]: 'просмотр',
|
|
8
|
+
[permission_enum_1.PermissionActionEnum.Create]: 'создание',
|
|
9
|
+
[permission_enum_1.PermissionActionEnum.Update]: 'обновление',
|
|
10
|
+
[permission_enum_1.PermissionActionEnum.Archive]: 'архивирование',
|
|
11
|
+
[permission_enum_1.PermissionActionEnum.Attach]: 'прикрепление',
|
|
12
|
+
[permission_enum_1.PermissionActionEnum.Detach]: 'открепление'
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UpdateRolePermissionsDtoZod: z.ZodObject<{
|
|
3
|
+
roleId: z.ZodNumber;
|
|
4
|
+
permissionIds: z.ZodArray<z.ZodNumber, "many">;
|
|
5
|
+
permissionsVersion: z.ZodNumber;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
roleId: number;
|
|
8
|
+
permissionsVersion: number;
|
|
9
|
+
permissionIds: number[];
|
|
10
|
+
}, {
|
|
11
|
+
roleId: number;
|
|
12
|
+
permissionsVersion: number;
|
|
13
|
+
permissionIds: number[];
|
|
14
|
+
}>;
|
|
15
|
+
export type UpdateRolePermissionsDtoZodType = z.infer<typeof UpdateRolePermissionsDtoZod>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateRolePermissionsDtoZod = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.UpdateRolePermissionsDtoZod = zod_1.z.object({
|
|
6
|
+
roleId: zod_1.z.number().int().positive(),
|
|
7
|
+
permissionIds: zod_1.z.array(zod_1.z.number().int().positive()).max(10000),
|
|
8
|
+
permissionsVersion: zod_1.z.number().int().positive()
|
|
9
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** Действия, поддерживаемые системой ролевых разрешений. */
|
|
2
|
+
export declare enum PermissionActionEnum {
|
|
3
|
+
View = "view",
|
|
4
|
+
Create = "create",
|
|
5
|
+
Update = "update",
|
|
6
|
+
Archive = "archive",
|
|
7
|
+
Attach = "attach",
|
|
8
|
+
Detach = "detach"
|
|
9
|
+
}
|
|
10
|
+
/** Код ошибки, возвращаемой при отказе ролевой авторизации. */
|
|
11
|
+
export declare enum PermissionErrorCodeEnum {
|
|
12
|
+
Denied = "PERMISSION_DENIED"
|
|
13
|
+
}
|
|
14
|
+
/** Способ применения перечисленных в ответе обязательных разрешений. */
|
|
15
|
+
export declare enum PermissionRequirementModeEnum {
|
|
16
|
+
AnyOf = "anyOf",
|
|
17
|
+
AllOf = "allOf"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Стабильные коды ресурсов системы разрешений.
|
|
21
|
+
* Значения enum совпадают с кодами в authorization_resources.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum PermissionResource {
|
|
24
|
+
General = "general",
|
|
25
|
+
GeneralHome = "general.home",
|
|
26
|
+
GeneralWorkResults = "general.work-results",
|
|
27
|
+
GeneralProjects = "general.projects",
|
|
28
|
+
GeneralCalendar = "general.calendar",
|
|
29
|
+
Account = "account",
|
|
30
|
+
AccountProfile = "account.profile",
|
|
31
|
+
Catalog = "catalog",
|
|
32
|
+
CatalogProducts = "catalog.products",
|
|
33
|
+
CatalogCbeds = "catalog.cbeds",
|
|
34
|
+
CatalogDetals = "catalog.detals",
|
|
35
|
+
CatalogMaterials = "catalog.materials",
|
|
36
|
+
CatalogTools = "catalog.tools",
|
|
37
|
+
CatalogEquipment = "catalog.equipment",
|
|
38
|
+
CatalogInventory = "catalog.inventory",
|
|
39
|
+
CatalogContacts = "catalog.contacts",
|
|
40
|
+
CatalogCompanies = "catalog.companies",
|
|
41
|
+
Files = "files",
|
|
42
|
+
FilesLibrary = "files.library",
|
|
43
|
+
FilesAttachments = "files.attachments",
|
|
44
|
+
FilesAttachmentsProduct = "files.attachments.product",
|
|
45
|
+
FilesAttachmentsCbed = "files.attachments.cbed",
|
|
46
|
+
FilesAttachmentsDetal = "files.attachments.detal",
|
|
47
|
+
FilesAttachmentsMaterial = "files.attachments.material",
|
|
48
|
+
FilesAttachmentsProvider = "files.attachments.provider",
|
|
49
|
+
FilesAttachmentsCompany = "files.attachments.company",
|
|
50
|
+
FilesAttachmentsEquipment = "files.attachments.equipment",
|
|
51
|
+
FilesAttachmentsInstrument = "files.attachments.instrument",
|
|
52
|
+
FilesAttachmentsInventory = "files.attachments.inventory",
|
|
53
|
+
FilesAttachmentsUser = "files.attachments.user",
|
|
54
|
+
FilesAttachmentsWaybill = "files.attachments.waybill",
|
|
55
|
+
FilesAttachmentsDelivery = "files.attachments.delivery",
|
|
56
|
+
FilesAttachmentsShipment = "files.attachments.shipment",
|
|
57
|
+
FilesAttachmentsOperation = "files.attachments.operation",
|
|
58
|
+
FilesAttachmentsTechProcess = "files.attachments.tech-process",
|
|
59
|
+
FilesAttachmentsAssembleKit = "files.attachments.assemble-kit",
|
|
60
|
+
FilesAttachmentsMoving = "files.attachments.moving",
|
|
61
|
+
FilesAttachmentsShipmentCompletion = "files.attachments.shipment-completion",
|
|
62
|
+
Shipping = "shipping",
|
|
63
|
+
ShippingTasks = "shipping.tasks",
|
|
64
|
+
Warehouse = "warehouse",
|
|
65
|
+
WarehouseOverview = "warehouse.overview",
|
|
66
|
+
WarehouseReceipts = "warehouse.receipts",
|
|
67
|
+
WarehouseConsumption = "warehouse.consumption",
|
|
68
|
+
WarehouseCompletedKits = "warehouse.completed-kits",
|
|
69
|
+
WarehouseProductResiduals = "warehouse.product-residuals",
|
|
70
|
+
WarehouseOrderedInTransit = "warehouse.ordered-in-transit",
|
|
71
|
+
WarehouseShippingTasks = "warehouse.shipping-tasks",
|
|
72
|
+
WarehouseCbedCompletion = "warehouse.cbed-completion",
|
|
73
|
+
WarehouseProductCompletion = "warehouse.product-completion",
|
|
74
|
+
WarehouseSupplierOrders = "warehouse.supplier-orders",
|
|
75
|
+
WarehouseCbedDeficit = "warehouse.cbed-deficit",
|
|
76
|
+
WarehouseProductDeficit = "warehouse.product-deficit",
|
|
77
|
+
WarehouseMaterialDeficit = "warehouse.material-deficit",
|
|
78
|
+
WarehouseDetalDeficit = "warehouse.detal-deficit",
|
|
79
|
+
WarehouseShippedOrders = "warehouse.shipped-orders",
|
|
80
|
+
WarehouseRevision = "warehouse.revision",
|
|
81
|
+
WarehouseMovement = "warehouse.movement",
|
|
82
|
+
WarehouseMetalworkingOrders = "warehouse.metalworking-orders",
|
|
83
|
+
WarehouseAssemblyOrders = "warehouse.assembly-orders",
|
|
84
|
+
WarehouseRacks = "warehouse.racks",
|
|
85
|
+
Production = "production",
|
|
86
|
+
ProductionOverview = "production.overview",
|
|
87
|
+
ProductionTasks = "production.tasks",
|
|
88
|
+
ProductionMetalworking = "production.metalworking",
|
|
89
|
+
ProductionAssembly = "production.assembly",
|
|
90
|
+
ProductionOperationMetalworking = "production.operation-metalworking",
|
|
91
|
+
ProductionOperationAssembly = "production.operation-assembly",
|
|
92
|
+
ProductionBoard = "production.board",
|
|
93
|
+
ProductionBoardMetalworking = "production.board-metalworking",
|
|
94
|
+
ProductionOnlineBoard = "production.online-board",
|
|
95
|
+
Control = "control",
|
|
96
|
+
ControlArchive = "control.archive",
|
|
97
|
+
ControlActions = "control.actions",
|
|
98
|
+
ControlMarks = "control.marks",
|
|
99
|
+
Settings = "settings",
|
|
100
|
+
SettingsOverview = "settings.overview",
|
|
101
|
+
SettingsEmployees = "settings.employees",
|
|
102
|
+
SettingsUnits = "settings.units",
|
|
103
|
+
SettingsMaterials = "settings.materials",
|
|
104
|
+
SettingsOperations = "settings.operations",
|
|
105
|
+
SettingsTools = "settings.tools",
|
|
106
|
+
SettingsEquipment = "settings.equipment",
|
|
107
|
+
SettingsInventory = "settings.inventory",
|
|
108
|
+
SettingsDeficit = "settings.deficit",
|
|
109
|
+
SettingsTimeTracking = "settings.time-tracking",
|
|
110
|
+
SettingsRoles = "settings.roles",
|
|
111
|
+
SettingsPositions = "settings.positions",
|
|
112
|
+
SettingsNormHours = "settings.norm-hours",
|
|
113
|
+
SettingsBackups = "settings.backups",
|
|
114
|
+
SettingsNotifications = "settings.notifications",
|
|
115
|
+
SettingsExclusions = "settings.exclusions"
|
|
116
|
+
}
|