@pksep/zod-shared 0.0.560 → 0.0.562
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 +2 -0
- package/dist/{library → ai-mcp}/index.js +2 -5
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +358 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.d.ts +130 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.js +118 -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.schema.d.ts +384 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +210 -0
- package/dist/assemble/dto/get-assemble-operation-count.dto.d.ts +28 -0
- package/dist/assemble/dto/set-date-shipment.dto.d.ts +2 -2
- package/dist/assemble/interfaces/interfaces.d.ts +8 -0
- package/dist/assemble/schemas/assemble-coming.schema.d.ts +20 -0
- package/dist/assemble/schemas/assemble.schema.d.ts +20 -0
- package/dist/cbed/dto/up-create-cbed.dto.d.ts +3 -0
- package/dist/cbed/dto/up-create-cbed.dto.js +1 -0
- package/dist/deliveries/dto/create-deliveries.dto.d.ts +6 -6
- package/dist/detal/dto/archive-detal.dto.d.ts +17 -0
- package/dist/detal/dto/archive-detal.dto.js +10 -0
- package/dist/detal/dto/update-detal.dto.d.ts +342 -17
- package/dist/detal/dto/update-detal.dto.js +88 -27
- package/dist/detal/index.d.ts +1 -0
- package/dist/detal/index.js +1 -0
- package/dist/document/dto/entity-document-command.dto.d.ts +184 -0
- package/dist/document/dto/entity-document-command.dto.js +59 -0
- package/dist/document/index.d.ts +2 -0
- package/dist/document/index.js +2 -0
- package/dist/document/interfaces/entity-document.interface.d.ts +30 -0
- package/dist/excel-export/excel-export.dto.d.ts +2968 -0
- package/dist/excel-export/excel-export.dto.js +391 -0
- package/dist/excel-export/index.d.ts +1 -0
- package/dist/{issue → excel-export}/index.js +1 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/marks/type/type.d.ts +4 -4
- package/dist/material/dto/create-material.dto.d.ts +3 -0
- package/dist/material/dto/create-material.dto.js +2 -1
- package/dist/product/dto/up-create-product.dto.d.ts +3 -0
- package/dist/product/dto/up-create-product.dto.js +1 -0
- package/dist/production-tasks/dto/change-due-date.dto.d.ts +2 -2
- package/dist/production-tasks/dto/get-production-task-display-numbers.dto.d.ts +20 -0
- package/dist/production-tasks/dto/get-production-task-display-numbers.dto.js +11 -0
- package/dist/production-tasks/dto/plan-production-task.dto.d.ts +34 -0
- package/dist/production-tasks/dto/plan-production-task.dto.js +21 -2
- package/dist/production-tasks/dto/split-production-task.dto.d.ts +203 -0
- package/dist/production-tasks/dto/split-production-task.dto.js +71 -0
- package/dist/production-tasks/dto/update.dto.d.ts +2 -2
- package/dist/production-tasks/dto/workload-by-entity.dto.d.ts +2 -2
- package/dist/production-tasks/enums/production-tasks.d.ts +10 -0
- package/dist/production-tasks/enums/production-tasks.js +12 -1
- package/dist/production-tasks/index.d.ts +3 -0
- package/dist/production-tasks/index.js +3 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +4 -0
- package/dist/production-tasks/methods/methods.d.ts +9 -0
- package/dist/production-tasks/methods/methods.js +16 -1
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.d.ts +55 -8
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.js +9 -0
- package/dist/production-tasks/schemas/production-task-subtask.schema.d.ts +81 -0
- package/dist/production-tasks/schemas/production-task.schema.d.ts +14 -0
- package/dist/production-tasks/schemas/production-task.schema.js +4 -0
- package/dist/specification/dto/mutate-specification.dto.d.ts +58 -0
- package/dist/specification/dto/mutate-specification.dto.js +65 -0
- package/dist/specification/index.d.ts +1 -0
- package/dist/specification/index.js +1 -0
- package/dist/specification/interface/interface.d.ts +17 -0
- package/dist/utils/methods/sequelize.d.ts +2 -0
- package/dist/utils/methods/sequelize.js +4 -1
- package/dist/utils/methods.js +30 -10
- package/dist/utils/tables-config/enum.d.ts +5 -0
- package/dist/utils/tables-config/enum.js +10 -0
- package/dist/utils/types/types.d.ts +10 -1
- package/dist/utils/validation/transform.d.ts +2 -0
- package/dist/utils/validation/transform.js +25 -1
- package/package.json +1 -1
- package/dist/issue/dto/up-create-issue.dto.d.ts +0 -49
- package/dist/issue/dto/up-create-issue.dto.js +0 -21
- package/dist/issue/index.d.ts +0 -5
- package/dist/issue/interfaces/interface.d.ts +0 -4
- package/dist/issue/schemas/issue-user-controller.schema.d.ts +0 -15
- package/dist/issue/schemas/issue-user-controller.schema.js +0 -9
- package/dist/issue/schemas/issue-user.schema.d.ts +0 -15
- package/dist/issue/schemas/issue-user.schema.js +0 -9
- package/dist/issue/schemas/issue.schema.d.ts +0 -51
- package/dist/issue/schemas/issue.schema.js +0 -21
- package/dist/library/dto/create-chapter.dto.d.ts +0 -12
- package/dist/library/dto/create-chapter.dto.js +0 -8
- package/dist/library/dto/create-link.dto.d.ts +0 -30
- package/dist/library/dto/create-link.dto.js +0 -14
- package/dist/library/index.d.ts +0 -5
- package/dist/library/interfaces/interface.d.ts +0 -3
- package/dist/library/schemas/links-user.schema.d.ts +0 -15
- package/dist/library/schemas/links-user.schema.js +0 -9
- package/dist/library/schemas/links.schema.d.ts +0 -30
- package/dist/library/schemas/links.schema.js +0 -14
- package/dist/production-tasks/dto/update-marks.dto.d.ts +0 -13
- package/dist/production-tasks/dto/update-marks.dto.js +0 -8
- package/dist/production-tasks/dto/update-responsible.dto.d.ts +0 -12
- package/dist/production-tasks/dto/update-responsible.dto.js +0 -8
- package/dist/production-tasks/dto/update-status.dto.d.ts +0 -13
- package/dist/production-tasks/dto/update-status.dto.js +0 -9
- package/dist/shipments/dto/change-date-urgency.dto.d.ts +0 -12
- package/dist/shipments/dto/change-date-urgency.dto.js +0 -8
- package/dist/tech-process/schemas/tech-process-with-options.schema.d.ts +0 -306
- package/dist/tech-process/schemas/tech-process-with-options.schema.js +0 -8
- package/dist/utils/interface/mat.interface.d.ts +0 -10
- /package/dist/{issue/interfaces/interface.js → ai-mcp/interfaces/ai-mcp.interface.js} +0 -0
- /package/dist/{library/interfaces/interface.js → document/interfaces/entity-document.interface.js} +0 -0
- /package/dist/{utils/interface/mat.interface.js → production-tasks/schemas/production-task-subtask.schema.js} +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.CreateMetalloworkingExcelExportDtoZod = exports.CreateAssemblyExcelExportDtoZod = exports.MaterialDeficitExcelExportColumnSchema = exports.DetalDeficitExcelExportColumnSchema = exports.CbedDeficitExcelExportColumnSchema = exports.ProductDeficitExcelExportColumnSchema = exports.AssemblyStockOrderExcelExportColumnSchema = exports.OperationPathExcelExportColumnSchema = exports.AssemblyOperationExcelExportColumnSchema = exports.MetalloworkingExcelExportColumnSchema = exports.AssemblyExcelExportColumnSchema = exports.MaterialDeficitExcelExportColumnDefinitions = exports.DetalDeficitExcelExportColumnDefinitions = exports.CbedDeficitExcelExportColumnDefinitions = exports.ProductDeficitExcelExportColumnDefinitions = exports.AssemblyStockOrderExcelExportColumnDefinitions = exports.OperationPathExcelExportColumnDefinitions = exports.AssemblyOperationExcelExportColumnDefinitions = exports.MetalloworkingExcelExportColumnDefinitions = exports.AssemblyExcelExportColumnDefinitions = exports.ExcelExportColumnDefinitionSchema = exports.ExcelExportStatus = exports.OperationPathExcelExportSourceType = exports.ExcelExportReportType = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const assemble_1 = require("../assemble");
|
|
6
|
+
const cbed_1 = require("../cbed");
|
|
7
|
+
const detal_1 = require("../detal");
|
|
8
|
+
const material_1 = require("../material");
|
|
9
|
+
const metaloworking_1 = require("../metaloworking");
|
|
10
|
+
const product_1 = require("../product");
|
|
11
|
+
var ExcelExportReportType;
|
|
12
|
+
(function (ExcelExportReportType) {
|
|
13
|
+
ExcelExportReportType["assemblyList"] = "assembly.list";
|
|
14
|
+
ExcelExportReportType["assemblyOperationList"] = "assembly.operation-list";
|
|
15
|
+
ExcelExportReportType["operationPath"] = "production.operation-path";
|
|
16
|
+
ExcelExportReportType["assemblyStockOrderList"] = "assembly.stock-order-list";
|
|
17
|
+
ExcelExportReportType["metalloworkingList"] = "metalloworking.list";
|
|
18
|
+
ExcelExportReportType["productDeficitList"] = "warehouse.product-deficit-list";
|
|
19
|
+
ExcelExportReportType["cbedDeficitList"] = "warehouse.cbed-deficit-list";
|
|
20
|
+
ExcelExportReportType["detalDeficitList"] = "warehouse.detal-deficit-list";
|
|
21
|
+
ExcelExportReportType["materialDeficitList"] = "warehouse.material-deficit-list";
|
|
22
|
+
})(ExcelExportReportType || (exports.ExcelExportReportType = ExcelExportReportType = {}));
|
|
23
|
+
var OperationPathExcelExportSourceType;
|
|
24
|
+
(function (OperationPathExcelExportSourceType) {
|
|
25
|
+
OperationPathExcelExportSourceType["assembly"] = "assembly";
|
|
26
|
+
OperationPathExcelExportSourceType["metalworking"] = "metalworking";
|
|
27
|
+
})(OperationPathExcelExportSourceType || (exports.OperationPathExcelExportSourceType = OperationPathExcelExportSourceType = {}));
|
|
28
|
+
var ExcelExportStatus;
|
|
29
|
+
(function (ExcelExportStatus) {
|
|
30
|
+
ExcelExportStatus["queued"] = "queued";
|
|
31
|
+
ExcelExportStatus["processing"] = "processing";
|
|
32
|
+
ExcelExportStatus["completed"] = "completed";
|
|
33
|
+
ExcelExportStatus["failed"] = "failed";
|
|
34
|
+
})(ExcelExportStatus || (exports.ExcelExportStatus = ExcelExportStatus = {}));
|
|
35
|
+
exports.ExcelExportColumnDefinitionSchema = zod_1.z.object({
|
|
36
|
+
header: zod_1.z.string().min(1),
|
|
37
|
+
width: zod_1.z.number().positive()
|
|
38
|
+
});
|
|
39
|
+
exports.AssemblyExcelExportColumnDefinitions = {
|
|
40
|
+
number: { header: '№', width: 8 },
|
|
41
|
+
image: { header: 'Изображение', width: 20 },
|
|
42
|
+
type: { header: 'Тип', width: 10 },
|
|
43
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
44
|
+
name: { header: 'Наименование', width: 40 },
|
|
45
|
+
ordered: { header: 'Заказано на складе', width: 20 },
|
|
46
|
+
startTime: { header: 'Начало работ', width: 21 },
|
|
47
|
+
calculateNeedsTime: {
|
|
48
|
+
header: 'Требуемое время готовности',
|
|
49
|
+
width: 25
|
|
50
|
+
},
|
|
51
|
+
calculatedCreateTime: {
|
|
52
|
+
header: 'Расчётная дата изготовления',
|
|
53
|
+
width: 26
|
|
54
|
+
},
|
|
55
|
+
startTimeDelay: { header: 'Просрочка начала работ, ч', width: 24 },
|
|
56
|
+
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
57
|
+
complectataionReadiness: {
|
|
58
|
+
header: 'Готовность к комплектации',
|
|
59
|
+
width: 25
|
|
60
|
+
},
|
|
61
|
+
readinessToComplectation: {
|
|
62
|
+
header: 'Готово к комплектации',
|
|
63
|
+
width: 23
|
|
64
|
+
},
|
|
65
|
+
completionToBuild: { header: 'Готовность к сборке', width: 25 },
|
|
66
|
+
timeComplete: { header: 'Время на сборку, ч/мин', width: 24 }
|
|
67
|
+
};
|
|
68
|
+
exports.MetalloworkingExcelExportColumnDefinitions = {
|
|
69
|
+
number: { header: '№', width: 8 },
|
|
70
|
+
image: { header: 'Изображение', width: 20 },
|
|
71
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
72
|
+
name: { header: 'Наименование', width: 40 },
|
|
73
|
+
calculatedCreateTime: {
|
|
74
|
+
header: 'Требуемое время готовности',
|
|
75
|
+
width: 25
|
|
76
|
+
},
|
|
77
|
+
calculateNeedsTime: {
|
|
78
|
+
header: 'Расчётная дата изготовления',
|
|
79
|
+
width: 26
|
|
80
|
+
},
|
|
81
|
+
orderedByProduction: { header: 'Заказано по ПЗ', width: 18 },
|
|
82
|
+
ordered: { header: 'Заказано на складе', width: 20 },
|
|
83
|
+
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
84
|
+
workpieceParameters: { header: 'Параметры заготовки', width: 28 },
|
|
85
|
+
material: { header: 'Материал', width: 35 },
|
|
86
|
+
timeToProduction: {
|
|
87
|
+
header: 'Время на изготовление, ч/мин',
|
|
88
|
+
width: 26
|
|
89
|
+
},
|
|
90
|
+
waste: { header: 'Отходы (стружка), кг', width: 22 }
|
|
91
|
+
};
|
|
92
|
+
exports.AssemblyOperationExcelExportColumnDefinitions = {
|
|
93
|
+
number: { header: '№', width: 8 },
|
|
94
|
+
image: { header: 'Изображение', width: 20 },
|
|
95
|
+
type: { header: 'Тип', width: 10 },
|
|
96
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
97
|
+
name: { header: 'Наименование', width: 40 },
|
|
98
|
+
count: { header: 'Заказано на складе', width: 20 },
|
|
99
|
+
status: { header: 'Статус', width: 18 },
|
|
100
|
+
maked: { header: 'Сделано, шт', width: 16 },
|
|
101
|
+
remainder: { header: 'Осталось, шт', width: 16 },
|
|
102
|
+
preTime: { header: 'Норма времени: подготовительное, ч/мин', width: 28 },
|
|
103
|
+
auxTime: { header: 'Норма времени: вспомогательное, ч/мин', width: 28 },
|
|
104
|
+
mainTime: { header: 'Норма времени: основное, ч/мин', width: 25 },
|
|
105
|
+
dateExecution: { header: 'Дата исполнения', width: 20 },
|
|
106
|
+
countOfComplete: { header: 'Кол-во сделано', width: 18 },
|
|
107
|
+
executor: { header: 'Исполнитель', width: 24 }
|
|
108
|
+
};
|
|
109
|
+
exports.OperationPathExcelExportColumnDefinitions = {
|
|
110
|
+
number: { header: '№', width: 8 },
|
|
111
|
+
operation: { header: 'Операции', width: 40 },
|
|
112
|
+
startTime: { header: 'Начало работ по операции', width: 23 },
|
|
113
|
+
requiredTime: {
|
|
114
|
+
header: 'Дата требуемой готовности на операцию',
|
|
115
|
+
width: 28
|
|
116
|
+
},
|
|
117
|
+
calculatedTime: {
|
|
118
|
+
header: 'Расчётная дата изготовления на операцию',
|
|
119
|
+
width: 30
|
|
120
|
+
},
|
|
121
|
+
unitTime: { header: 'Норма вр. на 1 шт, ч/мин', width: 23 },
|
|
122
|
+
totalTime: { header: 'Норма вр. итого, ч/мин', width: 23 },
|
|
123
|
+
remainingTime: { header: 'Осталось в нормо ч/мин', width: 23 },
|
|
124
|
+
completionPercent: { header: 'Готовность в %', width: 18 },
|
|
125
|
+
maked: { header: 'Сделано, шт', width: 16 },
|
|
126
|
+
remainder: { header: 'Осталось сделать, шт', width: 20 },
|
|
127
|
+
dateExecution: { header: 'Дата исполнения', width: 20 },
|
|
128
|
+
countOfComplete: { header: 'Кол-во сделано, шт', width: 20 },
|
|
129
|
+
executor: { header: 'Исполнитель', width: 24 }
|
|
130
|
+
};
|
|
131
|
+
exports.AssemblyStockOrderExcelExportColumnDefinitions = {
|
|
132
|
+
number: { header: '№', width: 8 },
|
|
133
|
+
image: { header: 'Изображение', width: 20 },
|
|
134
|
+
type: { header: 'Тип', width: 10 },
|
|
135
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
136
|
+
name: { header: 'Наименование', width: 40 },
|
|
137
|
+
startTime: { header: 'Начало работ', width: 21 },
|
|
138
|
+
orderedByPz: { header: 'Заказано по ПЗ', width: 18 },
|
|
139
|
+
ordered: { header: 'Заказано на складе', width: 20 },
|
|
140
|
+
calculateNeedsTime: {
|
|
141
|
+
header: 'Расчётная дата изготовления',
|
|
142
|
+
width: 26
|
|
143
|
+
},
|
|
144
|
+
warehouseReadyDate: {
|
|
145
|
+
header: 'Дата плановой готовности склада',
|
|
146
|
+
width: 28
|
|
147
|
+
},
|
|
148
|
+
complectataionReadiness: {
|
|
149
|
+
header: 'Готовность к комплектации',
|
|
150
|
+
width: 25
|
|
151
|
+
},
|
|
152
|
+
calculatedCreateTime: {
|
|
153
|
+
header: 'Требуемое время готовности',
|
|
154
|
+
width: 25
|
|
155
|
+
},
|
|
156
|
+
startTimeDelay: { header: 'Просрочка начала работ, ч', width: 24 },
|
|
157
|
+
productionDelay: { header: 'Просрочка изготовления, ч', width: 25 },
|
|
158
|
+
orderDemand: {
|
|
159
|
+
header: 'Потребность по заказам склада или покупателя',
|
|
160
|
+
width: 31
|
|
161
|
+
},
|
|
162
|
+
deficit: { header: 'Дефицит', width: 16 },
|
|
163
|
+
countOfSclad: { header: 'Кол-во', width: 14 }
|
|
164
|
+
};
|
|
165
|
+
exports.ProductDeficitExcelExportColumnDefinitions = {
|
|
166
|
+
number: { header: '№', width: 8 },
|
|
167
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
168
|
+
article: { header: 'Артикул', width: 20 },
|
|
169
|
+
name: { header: 'Наименование', width: 40 },
|
|
170
|
+
warehouseReadinessDate: {
|
|
171
|
+
header: 'Дата плановой готовности склада',
|
|
172
|
+
width: 28
|
|
173
|
+
},
|
|
174
|
+
shipmentDate: { header: 'Дата плановой отгрузки', width: 23 },
|
|
175
|
+
deficit: { header: 'Общий дефицит', width: 18 },
|
|
176
|
+
orderDemand: { header: 'Потребность по заказам покупателя', width: 30 },
|
|
177
|
+
remaining: { header: 'Кол-во', width: 14 },
|
|
178
|
+
status: { header: 'Статус', width: 18 },
|
|
179
|
+
minRemaining: { header: 'Мин. остаток', width: 16 },
|
|
180
|
+
recommendedRemaining: { header: 'Рек. остаток', width: 16 },
|
|
181
|
+
timeNorm: {
|
|
182
|
+
header: 'Норма времени на одну единицу, ч/мин',
|
|
183
|
+
width: 29
|
|
184
|
+
},
|
|
185
|
+
ownQuantity: {
|
|
186
|
+
header: 'Кол-во (по ум.=рекомендуемому кол-ву)',
|
|
187
|
+
width: 31
|
|
188
|
+
},
|
|
189
|
+
ordered: { header: 'Заказано на складе', width: 20 },
|
|
190
|
+
realRemaining: {
|
|
191
|
+
header: 'Реальный остаток с учетом планируемых отгрузок и планируемого производства',
|
|
192
|
+
width: 35
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
exports.CbedDeficitExcelExportColumnDefinitions = {
|
|
196
|
+
number: { header: '№', width: 8 },
|
|
197
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
198
|
+
name: { header: 'Наименование', width: 40 },
|
|
199
|
+
warehouseReadinessDate: {
|
|
200
|
+
header: 'Дата плановой готовности склада',
|
|
201
|
+
width: 28
|
|
202
|
+
},
|
|
203
|
+
deficit: { header: 'Общий дефицит', width: 18 },
|
|
204
|
+
orderDemand: { header: 'Потребность по заказам', width: 24 },
|
|
205
|
+
remaining: { header: 'Кол-во', width: 14 },
|
|
206
|
+
status: { header: 'Статус', width: 18 },
|
|
207
|
+
minRemaining: { header: 'Мин. остаток', width: 16 },
|
|
208
|
+
recommendedRemaining: { header: 'Рек. остаток', width: 16 },
|
|
209
|
+
timeNorm: {
|
|
210
|
+
header: 'Норма времени на одну единицу, ч/мин',
|
|
211
|
+
width: 29
|
|
212
|
+
},
|
|
213
|
+
ownQuantity: {
|
|
214
|
+
header: 'Кол-во (по ум.=рекомендуемому кол-ву)',
|
|
215
|
+
width: 31
|
|
216
|
+
},
|
|
217
|
+
ordered: { header: 'Заказано на складе', width: 20 },
|
|
218
|
+
realRemaining: {
|
|
219
|
+
header: 'Реальный остаток с учетом планируемых отгрузок и планируемого производства',
|
|
220
|
+
width: 35
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
exports.DetalDeficitExcelExportColumnDefinitions = {
|
|
224
|
+
number: { header: '№', width: 8 },
|
|
225
|
+
designation: { header: 'Обозначение', width: 24 },
|
|
226
|
+
name: { header: 'Наименование', width: 40 },
|
|
227
|
+
warehouseReadinessDate: {
|
|
228
|
+
header: 'Дата плановой готовности склада',
|
|
229
|
+
width: 28
|
|
230
|
+
},
|
|
231
|
+
deficit: { header: 'Общий дефицит', width: 18 },
|
|
232
|
+
orderDemand: { header: 'Потребность по заказам склада', width: 28 },
|
|
233
|
+
remaining: { header: 'Кол-во', width: 14 },
|
|
234
|
+
status: { header: 'Статус', width: 18 },
|
|
235
|
+
minRemaining: { header: 'Мин. остаток', width: 16 },
|
|
236
|
+
recommendedRemaining: { header: 'Рек. остаток', width: 16 },
|
|
237
|
+
cnc: { header: 'ЧПУ', width: 12 },
|
|
238
|
+
timeNorm: {
|
|
239
|
+
header: 'Норма времени на одну единицу, ч/мин',
|
|
240
|
+
width: 29
|
|
241
|
+
},
|
|
242
|
+
ownQuantity: {
|
|
243
|
+
header: 'Кол-во (по ум.=рекомендуемому кол-ву)',
|
|
244
|
+
width: 31
|
|
245
|
+
},
|
|
246
|
+
ordered: { header: 'Заказано на складе', width: 20 },
|
|
247
|
+
deficitWithProduction: {
|
|
248
|
+
header: 'Дефицит с учетом производства',
|
|
249
|
+
width: 27
|
|
250
|
+
},
|
|
251
|
+
realRemaining: {
|
|
252
|
+
header: 'Реальный остаток с учетом планируемых отгрузок и планируемого производства',
|
|
253
|
+
width: 35
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
exports.MaterialDeficitExcelExportColumnDefinitions = {
|
|
257
|
+
number: { header: '№', width: 8 },
|
|
258
|
+
name: { header: 'Наименование', width: 40 },
|
|
259
|
+
plannedDeliveryDate: { header: 'Планируемая дата прихода', width: 24 },
|
|
260
|
+
shipmentDate: { header: 'Дата плановой отгрузки', width: 23 },
|
|
261
|
+
inKit: { header: 'В наборах', width: 14 },
|
|
262
|
+
measurement: { header: 'ЕИ', width: 12 },
|
|
263
|
+
deficit: { header: 'Общий дефицит', width: 18 },
|
|
264
|
+
orderDemand: { header: 'Потребность по ЗС', width: 21 },
|
|
265
|
+
remaining: { header: 'Остаток', width: 15 },
|
|
266
|
+
status: { header: 'Статус', width: 18 },
|
|
267
|
+
minRemaining: { header: 'Мин. остаток', width: 16 },
|
|
268
|
+
recommendedRemaining: { header: 'Рек. остаток', width: 16 },
|
|
269
|
+
ownQuantity: {
|
|
270
|
+
header: 'Кол-во (по ум.=рекомендуемому кол-ву)',
|
|
271
|
+
width: 31
|
|
272
|
+
},
|
|
273
|
+
ordered: { header: 'Заказано', width: 16 },
|
|
274
|
+
deficitWithIncoming: {
|
|
275
|
+
header: 'Дефицит с учетом прихода',
|
|
276
|
+
width: 25
|
|
277
|
+
},
|
|
278
|
+
realRemaining: {
|
|
279
|
+
header: 'Реальный остаток с учетом планируемых отгрузок и планируемого производства',
|
|
280
|
+
width: 35
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
const getColumnDefinitionKeys = (definitions) => Object.keys(definitions);
|
|
284
|
+
exports.AssemblyExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.AssemblyExcelExportColumnDefinitions));
|
|
285
|
+
exports.MetalloworkingExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.MetalloworkingExcelExportColumnDefinitions));
|
|
286
|
+
exports.AssemblyOperationExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.AssemblyOperationExcelExportColumnDefinitions));
|
|
287
|
+
exports.OperationPathExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.OperationPathExcelExportColumnDefinitions));
|
|
288
|
+
exports.AssemblyStockOrderExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.AssemblyStockOrderExcelExportColumnDefinitions));
|
|
289
|
+
exports.ProductDeficitExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.ProductDeficitExcelExportColumnDefinitions));
|
|
290
|
+
exports.CbedDeficitExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.CbedDeficitExcelExportColumnDefinitions));
|
|
291
|
+
exports.DetalDeficitExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.DetalDeficitExcelExportColumnDefinitions));
|
|
292
|
+
exports.MaterialDeficitExcelExportColumnSchema = zod_1.z.enum(getColumnDefinitionKeys(exports.MaterialDeficitExcelExportColumnDefinitions));
|
|
293
|
+
const createUniqueColumnsSchema = (columnSchema) => zod_1.z
|
|
294
|
+
.array(columnSchema)
|
|
295
|
+
.min(1)
|
|
296
|
+
.refine(columns => new Set(columns).size === columns.length, {
|
|
297
|
+
message: 'Столбцы отчёта не должны повторяться'
|
|
298
|
+
});
|
|
299
|
+
exports.CreateAssemblyExcelExportDtoZod = zod_1.z.object({
|
|
300
|
+
reportType: zod_1.z.literal(ExcelExportReportType.assemblyList),
|
|
301
|
+
columns: createUniqueColumnsSchema(exports.AssemblyExcelExportColumnSchema),
|
|
302
|
+
filters: assemble_1.GetAssemblePaginationDtoZod.omit({ page: true })
|
|
303
|
+
});
|
|
304
|
+
exports.CreateMetalloworkingExcelExportDtoZod = zod_1.z.object({
|
|
305
|
+
reportType: zod_1.z.literal(ExcelExportReportType.metalloworkingList),
|
|
306
|
+
columns: createUniqueColumnsSchema(exports.MetalloworkingExcelExportColumnSchema),
|
|
307
|
+
filters: metaloworking_1.GetMetaloworkingPaginationDtoZod.omit({ page: true })
|
|
308
|
+
});
|
|
309
|
+
exports.CreateAssemblyOperationExcelExportDtoZod = zod_1.z.object({
|
|
310
|
+
reportType: zod_1.z.literal(ExcelExportReportType.assemblyOperationList),
|
|
311
|
+
columns: createUniqueColumnsSchema(exports.AssemblyOperationExcelExportColumnSchema),
|
|
312
|
+
filters: assemble_1.GetAssembleByOperationPaginationDtoZod.omit({ page: true })
|
|
313
|
+
});
|
|
314
|
+
exports.CreateOperationPathExcelExportDtoZod = zod_1.z.object({
|
|
315
|
+
reportType: zod_1.z.literal(ExcelExportReportType.operationPath),
|
|
316
|
+
columns: createUniqueColumnsSchema(exports.OperationPathExcelExportColumnSchema).optional(),
|
|
317
|
+
filters: zod_1.z.object({
|
|
318
|
+
sourceType: zod_1.z.nativeEnum(OperationPathExcelExportSourceType),
|
|
319
|
+
sourceId: zod_1.z.number().int().positive()
|
|
320
|
+
})
|
|
321
|
+
});
|
|
322
|
+
exports.CreateAssemblyStockOrderExcelExportDtoZod = zod_1.z.object({
|
|
323
|
+
reportType: zod_1.z.literal(ExcelExportReportType.assemblyStockOrderList),
|
|
324
|
+
columns: createUniqueColumnsSchema(exports.AssemblyStockOrderExcelExportColumnSchema),
|
|
325
|
+
filters: assemble_1.GetAssembleScladPaginationDtoZod.omit({ page: true })
|
|
326
|
+
});
|
|
327
|
+
exports.CreateProductDeficitExcelExportDtoZod = zod_1.z.object({
|
|
328
|
+
reportType: zod_1.z.literal(ExcelExportReportType.productDeficitList),
|
|
329
|
+
columns: createUniqueColumnsSchema(exports.ProductDeficitExcelExportColumnSchema),
|
|
330
|
+
filters: product_1.GetDeficitProductSchema.omit({ page: true })
|
|
331
|
+
});
|
|
332
|
+
exports.CreateCbedDeficitExcelExportDtoZod = zod_1.z.object({
|
|
333
|
+
reportType: zod_1.z.literal(ExcelExportReportType.cbedDeficitList),
|
|
334
|
+
columns: createUniqueColumnsSchema(exports.CbedDeficitExcelExportColumnSchema),
|
|
335
|
+
filters: cbed_1.GetDeficitDtoZod.omit({ page: true })
|
|
336
|
+
});
|
|
337
|
+
exports.CreateDetalDeficitExcelExportDtoZod = zod_1.z.object({
|
|
338
|
+
reportType: zod_1.z.literal(ExcelExportReportType.detalDeficitList),
|
|
339
|
+
columns: createUniqueColumnsSchema(exports.DetalDeficitExcelExportColumnSchema),
|
|
340
|
+
filters: detal_1.GetDetalDeficitDtoZod.omit({ page: true })
|
|
341
|
+
});
|
|
342
|
+
exports.CreateMaterialDeficitExcelExportDtoZod = zod_1.z.object({
|
|
343
|
+
reportType: zod_1.z.literal(ExcelExportReportType.materialDeficitList),
|
|
344
|
+
columns: createUniqueColumnsSchema(exports.MaterialDeficitExcelExportColumnSchema),
|
|
345
|
+
filters: material_1.GetMaterialDeficitDtoZod.omit({ page: true })
|
|
346
|
+
});
|
|
347
|
+
exports.CreateExcelExportRequestSchema = zod_1.z.discriminatedUnion('reportType', [
|
|
348
|
+
exports.CreateAssemblyExcelExportDtoZod,
|
|
349
|
+
exports.CreateAssemblyOperationExcelExportDtoZod,
|
|
350
|
+
exports.CreateOperationPathExcelExportDtoZod,
|
|
351
|
+
exports.CreateAssemblyStockOrderExcelExportDtoZod,
|
|
352
|
+
exports.CreateMetalloworkingExcelExportDtoZod,
|
|
353
|
+
exports.CreateProductDeficitExcelExportDtoZod,
|
|
354
|
+
exports.CreateCbedDeficitExcelExportDtoZod,
|
|
355
|
+
exports.CreateDetalDeficitExcelExportDtoZod,
|
|
356
|
+
exports.CreateMaterialDeficitExcelExportDtoZod
|
|
357
|
+
]);
|
|
358
|
+
// createZodDto requires an object schema as its class base. The refinement
|
|
359
|
+
// delegates validation to the strict discriminated report contract.
|
|
360
|
+
exports.CreateExcelExportDtoZod = zod_1.z
|
|
361
|
+
.object({
|
|
362
|
+
reportType: zod_1.z.nativeEnum(ExcelExportReportType),
|
|
363
|
+
columns: zod_1.z.array(zod_1.z.string()).min(1).optional(),
|
|
364
|
+
filters: zod_1.z.object({}).passthrough()
|
|
365
|
+
})
|
|
366
|
+
.superRefine((value, context) => {
|
|
367
|
+
const result = exports.CreateExcelExportRequestSchema.safeParse(value);
|
|
368
|
+
if (result.success)
|
|
369
|
+
return;
|
|
370
|
+
result.error.issues.forEach(issue => context.addIssue(issue));
|
|
371
|
+
});
|
|
372
|
+
exports.ExcelExportCreatedSchema = zod_1.z.object({
|
|
373
|
+
id: zod_1.z.string().min(1),
|
|
374
|
+
status: zod_1.z.literal(ExcelExportStatus.queued)
|
|
375
|
+
});
|
|
376
|
+
exports.ExcelExportStatusSchema = zod_1.z.object({
|
|
377
|
+
id: zod_1.z.string().min(1),
|
|
378
|
+
status: zod_1.z.nativeEnum(ExcelExportStatus),
|
|
379
|
+
rowCount: zod_1.z.number().int().nonnegative().optional(),
|
|
380
|
+
error: zod_1.z.string().optional()
|
|
381
|
+
});
|
|
382
|
+
exports.ExcelExportJobDataSchema = zod_1.z.object({
|
|
383
|
+
userId: zod_1.z.number().int().positive(),
|
|
384
|
+
request: exports.CreateExcelExportRequestSchema
|
|
385
|
+
});
|
|
386
|
+
exports.ExcelExportResultSchema = zod_1.z.object({
|
|
387
|
+
objectName: zod_1.z.string().min(1),
|
|
388
|
+
fileName: zod_1.z.string().min(1),
|
|
389
|
+
contentType: zod_1.z.string().min(1),
|
|
390
|
+
rowCount: zod_1.z.number().int().nonnegative()
|
|
391
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './excel-export.dto';
|
|
@@ -14,8 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./schemas/issue-user.schema"), exports);
|
|
19
|
-
__exportStar(require("./schemas/issue-user-controller.schema"), exports);
|
|
20
|
-
__exportStar(require("./interfaces/interface"), exports);
|
|
21
|
-
__exportStar(require("./dto/up-create-issue.dto"), exports);
|
|
17
|
+
__exportStar(require("./excel-export.dto"), exports);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -56,3 +56,5 @@ __exportStar(require("./thread"), exports);
|
|
|
56
56
|
__exportStar(require("./movement-error"), exports);
|
|
57
57
|
__exportStar(require("./exclusion"), exports);
|
|
58
58
|
__exportStar(require("./planning"), exports);
|
|
59
|
+
__exportStar(require("./ai-mcp"), exports);
|
|
60
|
+
__exportStar(require("./excel-export"), exports);
|
|
@@ -28,9 +28,9 @@ export declare const getMarkForOperationTypeSchema: z.ZodObject<{
|
|
|
28
28
|
entityName: string;
|
|
29
29
|
entityDesignation: string;
|
|
30
30
|
tech_process?: any;
|
|
31
|
-
current?: any;
|
|
32
|
-
after?: any;
|
|
33
31
|
before?: any;
|
|
32
|
+
after?: any;
|
|
33
|
+
current?: any;
|
|
34
34
|
}, {
|
|
35
35
|
id: number;
|
|
36
36
|
operation_id: number;
|
|
@@ -43,8 +43,8 @@ export declare const getMarkForOperationTypeSchema: z.ZodObject<{
|
|
|
43
43
|
entityName: string;
|
|
44
44
|
entityDesignation: string;
|
|
45
45
|
tech_process?: any;
|
|
46
|
-
current?: any;
|
|
47
|
-
after?: any;
|
|
48
46
|
before?: any;
|
|
47
|
+
after?: any;
|
|
48
|
+
current?: any;
|
|
49
49
|
}>;
|
|
50
50
|
export type GetMarkForOperationType = z.infer<typeof getMarkForOperationTypeSchema>;
|
|
@@ -659,6 +659,7 @@ export declare const CreateMaterialDtoZod: z.ZodObject<{
|
|
|
659
659
|
}[] | undefined, unknown>>;
|
|
660
660
|
companyIds: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
661
661
|
file_base: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
662
|
+
deletedDocumentIds: z.ZodOptional<z.ZodString>;
|
|
662
663
|
}, "strip", z.ZodTypeAny, {
|
|
663
664
|
description: string;
|
|
664
665
|
name: string;
|
|
@@ -733,6 +734,7 @@ export declare const CreateMaterialDtoZod: z.ZodObject<{
|
|
|
733
734
|
deliveryTime?: number | null | undefined;
|
|
734
735
|
rootParentId?: number | undefined;
|
|
735
736
|
companyIds?: string | null | undefined;
|
|
737
|
+
deletedDocumentIds?: string | undefined;
|
|
736
738
|
subtypeMaterialId?: number | undefined;
|
|
737
739
|
material_aliases?: {
|
|
738
740
|
alias: string;
|
|
@@ -752,6 +754,7 @@ export declare const CreateMaterialDtoZod: z.ZodObject<{
|
|
|
752
754
|
rootParentId?: unknown;
|
|
753
755
|
companyIds?: string | null | undefined;
|
|
754
756
|
units_measurement?: unknown;
|
|
757
|
+
deletedDocumentIds?: string | undefined;
|
|
755
758
|
subtypeMaterialId?: unknown;
|
|
756
759
|
material_aliases?: unknown;
|
|
757
760
|
}>;
|
|
@@ -102,5 +102,6 @@ exports.CreateMaterialDtoZod = zod_1.z.object({
|
|
|
102
102
|
.preprocess(value => typeof value === 'string' ? (0, utils_1.parseParamsOrBody)({ value }, null) : value, zod_1.z.array(material_alias_schema_1.NormalizeMaterialAliasForSaveSchema).optional())
|
|
103
103
|
.optional(),
|
|
104
104
|
companyIds: zod_1.z.string().nullable().optional(),
|
|
105
|
-
file_base: zod_1.z.string().nullable().optional()
|
|
105
|
+
file_base: zod_1.z.string().nullable().optional(),
|
|
106
|
+
deletedDocumentIds: zod_1.z.string().optional()
|
|
106
107
|
});
|
|
@@ -17,6 +17,7 @@ export declare const UpCreateProductDtoZod: z.ZodObject<{
|
|
|
17
17
|
docs: z.ZodAny;
|
|
18
18
|
techProcessID: z.ZodString;
|
|
19
19
|
fileBase: z.ZodAny;
|
|
20
|
+
deletedDocumentIds: z.ZodOptional<z.ZodString>;
|
|
20
21
|
attention: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
21
22
|
is_custom: z.ZodOptional<z.ZodString>;
|
|
22
23
|
discontinued: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
@@ -39,6 +40,7 @@ export declare const UpCreateProductDtoZod: z.ZodObject<{
|
|
|
39
40
|
is_custom?: string | undefined;
|
|
40
41
|
docs?: any;
|
|
41
42
|
fileBase?: any;
|
|
43
|
+
deletedDocumentIds?: string | undefined;
|
|
42
44
|
}, {
|
|
43
45
|
designation: string;
|
|
44
46
|
description: string;
|
|
@@ -58,5 +60,6 @@ export declare const UpCreateProductDtoZod: z.ZodObject<{
|
|
|
58
60
|
is_custom?: string | undefined;
|
|
59
61
|
docs?: any;
|
|
60
62
|
fileBase?: any;
|
|
63
|
+
deletedDocumentIds?: string | undefined;
|
|
61
64
|
}>;
|
|
62
65
|
export type UpCreateProductDtoZodType = z.infer<typeof UpCreateProductDtoZod>;
|
|
@@ -19,6 +19,7 @@ exports.UpCreateProductDtoZod = zod_1.z.object({
|
|
|
19
19
|
docs: zod_1.z.any(),
|
|
20
20
|
techProcessID: zod_1.z.string(),
|
|
21
21
|
fileBase: zod_1.z.any(),
|
|
22
|
+
deletedDocumentIds: zod_1.z.string().optional(),
|
|
22
23
|
attention: zod_1.z.preprocess(val => (typeof val === 'string' ? (0, utils_1.parseBoolean)(val) : val), zod_1.z.boolean().optional()),
|
|
23
24
|
is_custom: zod_1.z.string().optional(),
|
|
24
25
|
discontinued: zod_1.z.preprocess(val => (typeof val === 'string' ? (0, utils_1.parseBoolean)(val) : val), zod_1.z.boolean().optional())
|
|
@@ -3,10 +3,10 @@ export declare const ChangeDueDateSchema: z.ZodObject<{
|
|
|
3
3
|
productionTaskId: z.ZodNumber;
|
|
4
4
|
dueDate: z.ZodString;
|
|
5
5
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
dueDate: string;
|
|
7
6
|
productionTaskId: number;
|
|
8
|
-
}, {
|
|
9
7
|
dueDate: string;
|
|
8
|
+
}, {
|
|
10
9
|
productionTaskId: number;
|
|
10
|
+
dueDate: string;
|
|
11
11
|
}>;
|
|
12
12
|
export type ChangeDueDateDto = z.infer<typeof ChangeDueDateSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GetProductionTaskDisplayNumbersDtoZod: z.ZodObject<{
|
|
3
|
+
productionTaskIds: z.ZodArray<z.ZodNumber, "many">;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
productionTaskIds: number[];
|
|
6
|
+
}, {
|
|
7
|
+
productionTaskIds: number[];
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ProductionTaskDisplayNumberZod: z.ZodObject<{
|
|
10
|
+
productionTaskId: z.ZodNumber;
|
|
11
|
+
displayNumber: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
productionTaskId: number;
|
|
14
|
+
displayNumber: string;
|
|
15
|
+
}, {
|
|
16
|
+
productionTaskId: number;
|
|
17
|
+
displayNumber: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type GetProductionTaskDisplayNumbersDtoZodType = z.infer<typeof GetProductionTaskDisplayNumbersDtoZod>;
|
|
20
|
+
export type ProductionTaskDisplayNumberZodType = z.infer<typeof ProductionTaskDisplayNumberZod>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductionTaskDisplayNumberZod = exports.GetProductionTaskDisplayNumbersDtoZod = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.GetProductionTaskDisplayNumbersDtoZod = zod_1.z.object({
|
|
6
|
+
productionTaskIds: zod_1.z.array(zod_1.z.number().int()).max(1000)
|
|
7
|
+
});
|
|
8
|
+
exports.ProductionTaskDisplayNumberZod = zod_1.z.object({
|
|
9
|
+
productionTaskId: zod_1.z.number().int(),
|
|
10
|
+
displayNumber: zod_1.z.string()
|
|
11
|
+
});
|
|
@@ -2,6 +2,22 @@ import { z } from 'zod';
|
|
|
2
2
|
import { SortReadinesEnum, StockOrderType } from '../../utils';
|
|
3
3
|
import { IFiltersByByOrder, IFiltersByParents } from '../interfaces/online-board';
|
|
4
4
|
import { ProductionTaskDeficitFilterEnum } from '../enums/production-tasks';
|
|
5
|
+
import { ProductionTaskPlanSortField } from '../enums/production-tasks';
|
|
6
|
+
export declare const DEFAULT_PRODUCTION_TASK_PLAN_SORT: {
|
|
7
|
+
sortField: ProductionTaskPlanSortField;
|
|
8
|
+
sortDesc: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const ProductionTaskPlanSortRuleZod: z.ZodObject<{
|
|
11
|
+
sortField: z.ZodNativeEnum<typeof ProductionTaskPlanSortField>;
|
|
12
|
+
sortDesc: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
sortField: ProductionTaskPlanSortField;
|
|
15
|
+
sortDesc: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
sortField: ProductionTaskPlanSortField;
|
|
18
|
+
sortDesc?: boolean | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type ProductionTaskPlanSortRuleZodType = z.infer<typeof ProductionTaskPlanSortRuleZod>;
|
|
5
21
|
export declare const PlanForProductionTaskDtoZod: z.ZodObject<{
|
|
6
22
|
workingType: z.ZodNativeEnum<typeof StockOrderType>;
|
|
7
23
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
@@ -25,7 +41,21 @@ export declare const PlanForProductionTaskDtoZod: z.ZodObject<{
|
|
|
25
41
|
page: z.ZodNumber;
|
|
26
42
|
excludeIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
27
43
|
sortReadiness: z.ZodDefault<z.ZodNativeEnum<typeof SortReadinesEnum>>;
|
|
44
|
+
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
45
|
+
sortField: z.ZodNativeEnum<typeof ProductionTaskPlanSortField>;
|
|
46
|
+
sortDesc: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
sortField: ProductionTaskPlanSortField;
|
|
49
|
+
sortDesc: boolean;
|
|
50
|
+
}, {
|
|
51
|
+
sortField: ProductionTaskPlanSortField;
|
|
52
|
+
sortDesc?: boolean | undefined;
|
|
53
|
+
}>, "many">>>;
|
|
28
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
sort: {
|
|
56
|
+
sortField: ProductionTaskPlanSortField;
|
|
57
|
+
sortDesc: boolean;
|
|
58
|
+
}[];
|
|
29
59
|
page: number;
|
|
30
60
|
workingType: StockOrderType;
|
|
31
61
|
typeOperationIds: number[];
|
|
@@ -45,6 +75,10 @@ export declare const PlanForProductionTaskDtoZod: z.ZodObject<{
|
|
|
45
75
|
}, {
|
|
46
76
|
page: number;
|
|
47
77
|
workingType: StockOrderType;
|
|
78
|
+
sort?: {
|
|
79
|
+
sortField: ProductionTaskPlanSortField;
|
|
80
|
+
sortDesc?: boolean | undefined;
|
|
81
|
+
}[] | undefined;
|
|
48
82
|
range?: {
|
|
49
83
|
start: string | null;
|
|
50
84
|
end: string | null;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlanForProductionTaskDtoZod = void 0;
|
|
3
|
+
exports.PlanForProductionTaskDtoZod = exports.ProductionTaskPlanSortRuleZod = exports.DEFAULT_PRODUCTION_TASK_PLAN_SORT = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const production_tasks_1 = require("../enums/production-tasks");
|
|
7
|
+
const production_tasks_2 = require("../enums/production-tasks");
|
|
8
|
+
exports.DEFAULT_PRODUCTION_TASK_PLAN_SORT = [
|
|
9
|
+
{
|
|
10
|
+
sortField: production_tasks_2.ProductionTaskPlanSortField.calculatedCreateTime,
|
|
11
|
+
sortDesc: false
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
sortField: production_tasks_2.ProductionTaskPlanSortField.maxAvailable,
|
|
15
|
+
sortDesc: true
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
exports.ProductionTaskPlanSortRuleZod = zod_1.z.object({
|
|
19
|
+
sortField: zod_1.z.nativeEnum(production_tasks_2.ProductionTaskPlanSortField),
|
|
20
|
+
sortDesc: zod_1.z.boolean().default(false)
|
|
21
|
+
});
|
|
7
22
|
exports.PlanForProductionTaskDtoZod = zod_1.z.object({
|
|
8
23
|
workingType: zod_1.z.nativeEnum(utils_1.StockOrderType),
|
|
9
24
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
@@ -31,5 +46,9 @@ exports.PlanForProductionTaskDtoZod = zod_1.z.object({
|
|
|
31
46
|
.nullish(),
|
|
32
47
|
page: zod_1.z.number().int(),
|
|
33
48
|
excludeIds: zod_1.z.array(zod_1.z.number()).optional().default([]),
|
|
34
|
-
sortReadiness: zod_1.z.nativeEnum(utils_1.SortReadinesEnum).default(utils_1.SortReadinesEnum.any)
|
|
49
|
+
sortReadiness: zod_1.z.nativeEnum(utils_1.SortReadinesEnum).default(utils_1.SortReadinesEnum.any),
|
|
50
|
+
sort: zod_1.z
|
|
51
|
+
.array(exports.ProductionTaskPlanSortRuleZod)
|
|
52
|
+
.optional()
|
|
53
|
+
.default(exports.DEFAULT_PRODUCTION_TASK_PLAN_SORT)
|
|
35
54
|
});
|