@pksep/zod-shared 0.0.555 → 0.0.556
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/action/enums/enums.d.ts +10 -0
- package/dist/action/enums/enums.js +10 -0
- package/dist/assemble/dto/get-assemble-operation-count.dto.d.ts +24 -24
- package/dist/assemble/schemas/assemble-coming.schema.d.ts +18 -18
- package/dist/assemble/schemas/assemble.schema.d.ts +18 -18
- package/dist/assemble-kit/schemas/assemble-kit.schema.d.ts +6 -6
- package/dist/buyer/schemas/buyer.schema.d.ts +2 -2
- package/dist/buyer/schemas/purchases.schema.d.ts +2 -2
- package/dist/cbed/schemas/cbed.schema.d.ts +2 -2
- package/dist/company/schemas/companies.schema.d.ts +2 -2
- package/dist/detal/default-values/default-values.d.ts +4 -0
- package/dist/detal/default-values/default-values.js +4 -0
- package/dist/detal/schemas/detal-deficit.schema.d.ts +198 -28
- package/dist/detal/schemas/detal.schema.d.ts +192 -22
- package/dist/document/dto/update-document.dto.d.ts +2 -2
- package/dist/edizm/schemas/edizm.schema.d.ts +2 -2
- package/dist/edizm/schemas/type-edizm.schema.d.ts +6 -6
- package/dist/equipment/dto/udate-equipment-type.dto.d.ts +2 -2
- package/dist/equipment/dto/update-equipment.dto.d.ts +1 -1
- package/dist/equipment/schemas/equipment-pt.schema.d.ts +2 -2
- package/dist/equipment/schemas/equipment.schema.d.ts +6 -6
- package/dist/expenditure/schema/expenditure-consumption.schema.d.ts +4 -4
- package/dist/expenditure/schema/expenditure-position.schema.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/instrument/dto/update-instrument.dto.d.ts +2 -2
- package/dist/instrument/dto/update-pt.dto.d.ts +2 -2
- package/dist/instrument/schemas/pt-instrument.schema.d.ts +2 -2
- package/dist/inventary/dto/update-inventary.dto.d.ts +2 -2
- package/dist/material/dto/create-material.dto.d.ts +136 -0
- package/dist/material/dto/create-material.dto.js +16 -0
- package/dist/material/dto/up-create-type-material.dto.d.ts +4 -0
- package/dist/material/dto/up-create-type-material.dto.js +6 -1
- package/dist/material/enum/enum.d.ts +10 -0
- package/dist/material/enum/enum.js +12 -1
- package/dist/material/index.d.ts +1 -0
- package/dist/material/index.js +1 -0
- package/dist/material/interfaces/interface.d.ts +5 -0
- package/dist/material/schemas/material-characteristics.schema.d.ts +56 -0
- package/dist/material/schemas/material-characteristics.schema.js +3 -1
- package/dist/material/schemas/material-shipments-response.schema.d.ts +130 -6
- package/dist/material/schemas/material.schema.d.ts +130 -6
- package/dist/material/schemas/subtype-material.schema.d.ts +2 -2
- package/dist/material/schemas/subtype-material.schema.js +1 -1
- package/dist/material/schemas/type-material.schema.d.ts +118 -2
- package/dist/material/schemas/type-material.schema.js +9 -2
- package/dist/metaloworking/schemas/metaloworking-coming.schema.d.ts +2 -2
- package/dist/moving/schemas/moving.schema.d.ts +6 -6
- package/dist/operations/dto/get-type-operation-by-id.dto.d.ts +3 -3
- package/dist/operations/dto/update-type-operation.dto.d.ts +2 -2
- package/dist/planning/index.d.ts +1 -0
- package/dist/planning/index.js +17 -0
- package/dist/planning/types/planning.d.ts +187 -0
- package/dist/planning/types/planning.js +25 -0
- package/dist/product/schemas/product-deficit.schema.d.ts +6 -6
- package/dist/production-tasks/interfaces/production-tasks.d.ts +11 -3
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.d.ts +42 -0
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.js +9 -0
- package/dist/role/dto/update-role.dto.d.ts +2 -2
- package/dist/role/schemas/role.schema.d.ts +8 -8
- package/dist/sclad/schemas/remain.schema.d.ts +2 -2
- package/dist/sclad/schemas/remains.schema.d.ts +16 -16
- package/dist/settings/dto/update-edizm.dto.d.ts +2 -2
- package/dist/shipments/dto/shipments-list-pagination-response.dto.d.ts +18 -18
- package/dist/shipments/dto/up-create-shipments.dto.d.ts +4 -4
- package/dist/shipments/schemas/shipment-list-item.schema.d.ts +12 -12
- package/dist/shipments/schemas/shipments.schema.d.ts +4 -4
- package/dist/shipments/types/increment-shipments-kolvo.type.d.ts +12 -12
- package/dist/shipments/types/types.d.ts +1 -0
- package/dist/shipments/types/update-shipments-by-product.type.d.ts +12 -12
- package/dist/specification/schema/attributes.schema.d.ts +432 -46
- package/dist/tech-process/schemas/tech-process.schema.d.ts +2 -2
- package/dist/user/schemas/user.schema.d.ts +4 -4
- package/dist/utils/methods.js +4 -2
- package/dist/utils/schemas/schema.d.ts +2 -2
- package/dist/utils/tables-config/enum.d.ts +2 -1
- package/dist/utils/tables-config/enum.js +2 -0
- package/dist/utils/tables-config/tables-array.js +3 -0
- package/dist/utils/types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TypeMaterialSchema = exports.TypeMaterialCharacteristicsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const enum_1 = require("../enum/enum");
|
|
5
6
|
const utils_1 = require("../../utils");
|
|
6
7
|
const TypeMaterialCharacteristicsItemSchema = zod_1.z.object({
|
|
7
8
|
edizmId: zod_1.z.number().int(),
|
|
@@ -15,12 +16,18 @@ exports.TypeMaterialCharacteristicsSchema = zod_1.z.object({
|
|
|
15
16
|
wallThickness: TypeMaterialCharacteristicsItemSchema,
|
|
16
17
|
outsideDiameter: TypeMaterialCharacteristicsItemSchema,
|
|
17
18
|
thickness: TypeMaterialCharacteristicsItemSchema,
|
|
18
|
-
areaCrossSectional: TypeMaterialCharacteristicsItemSchema
|
|
19
|
+
areaCrossSectional: TypeMaterialCharacteristicsItemSchema,
|
|
20
|
+
acrossFlats: TypeMaterialCharacteristicsItemSchema,
|
|
21
|
+
massPerMeter: TypeMaterialCharacteristicsItemSchema
|
|
19
22
|
});
|
|
20
23
|
exports.TypeMaterialSchema = zod_1.z.object({
|
|
21
24
|
id: zod_1.z.number().int().positive(),
|
|
22
25
|
ban: zod_1.z.boolean(),
|
|
23
26
|
name: zod_1.z.string(),
|
|
24
27
|
characteristics: exports.TypeMaterialCharacteristicsSchema,
|
|
25
|
-
instance_type: zod_1.z.number().int().min(1).max(3)
|
|
28
|
+
instance_type: zod_1.z.number().int().min(1).max(3),
|
|
29
|
+
workpieceMassFormulaKey: zod_1.z
|
|
30
|
+
.nativeEnum(enum_1.WorkpieceMassFormulaKey)
|
|
31
|
+
.nullable()
|
|
32
|
+
.optional()
|
|
26
33
|
});
|
|
@@ -36,9 +36,9 @@ export declare const MetaloworkingComingSchema: z.ZodObject<{
|
|
|
36
36
|
wokrek_id: number;
|
|
37
37
|
designation?: string | undefined;
|
|
38
38
|
description?: string | undefined;
|
|
39
|
+
name?: string | undefined;
|
|
39
40
|
id?: number | null | undefined;
|
|
40
41
|
number_order?: string | undefined;
|
|
41
|
-
name?: string | undefined;
|
|
42
42
|
ava_path?: string | undefined;
|
|
43
43
|
detal_id?: number | null | undefined;
|
|
44
44
|
shipment_id?: number | null | undefined;
|
|
@@ -56,9 +56,9 @@ export declare const MetaloworkingComingSchema: z.ZodObject<{
|
|
|
56
56
|
ban?: boolean | undefined;
|
|
57
57
|
designation?: string | undefined;
|
|
58
58
|
description?: string | undefined;
|
|
59
|
+
name?: string | undefined;
|
|
59
60
|
id?: number | null | undefined;
|
|
60
61
|
number_order?: string | undefined;
|
|
61
|
-
name?: string | undefined;
|
|
62
62
|
ava_path?: string | undefined;
|
|
63
63
|
detal_id?: number | null | undefined;
|
|
64
64
|
shipment_id?: number | null | undefined;
|
|
@@ -131,8 +131,8 @@ export declare const MovingSchema: z.ZodObject<{
|
|
|
131
131
|
cbed: import("../..").CbedRelativeType[];
|
|
132
132
|
designation: string | null;
|
|
133
133
|
description: string | null;
|
|
134
|
-
id: number;
|
|
135
134
|
name: string;
|
|
135
|
+
id: number;
|
|
136
136
|
calculate_needs_time: Date | null;
|
|
137
137
|
entity_children_need_time: Date | null;
|
|
138
138
|
min_remaining: number;
|
|
@@ -162,8 +162,8 @@ export declare const MovingSchema: z.ZodObject<{
|
|
|
162
162
|
}, {
|
|
163
163
|
designation: string | null;
|
|
164
164
|
description: string | null;
|
|
165
|
-
id: number;
|
|
166
165
|
name: string;
|
|
166
|
+
id: number;
|
|
167
167
|
ava_path: string | null;
|
|
168
168
|
parametrs: import("../..").CbedParametrsField | null;
|
|
169
169
|
characteristic: import("../..").CbedCharacteristicField | null;
|
|
@@ -606,8 +606,8 @@ export declare const MovingSchema: z.ZodObject<{
|
|
|
606
606
|
cbed: import("../..").CbedRelativeType[];
|
|
607
607
|
designation: string | null;
|
|
608
608
|
description: string | null;
|
|
609
|
-
id: number;
|
|
610
609
|
name: string;
|
|
610
|
+
id: number;
|
|
611
611
|
calculate_needs_time: Date | null;
|
|
612
612
|
entity_children_need_time: Date | null;
|
|
613
613
|
min_remaining: number;
|
|
@@ -800,8 +800,8 @@ export declare const MovingSchema: z.ZodObject<{
|
|
|
800
800
|
cbeds: {
|
|
801
801
|
designation: string | null;
|
|
802
802
|
description: string | null;
|
|
803
|
-
id: number;
|
|
804
803
|
name: string;
|
|
804
|
+
id: number;
|
|
805
805
|
ava_path: string | null;
|
|
806
806
|
parametrs: import("../..").CbedParametrsField | null;
|
|
807
807
|
characteristic: import("../..").CbedCharacteristicField | null;
|
|
@@ -1095,8 +1095,8 @@ export declare const MovingSchema: z.ZodObject<{
|
|
|
1095
1095
|
cbed: import("../..").CbedRelativeType[];
|
|
1096
1096
|
designation: string | null;
|
|
1097
1097
|
description: string | null;
|
|
1098
|
-
id: number;
|
|
1099
1098
|
name: string;
|
|
1099
|
+
id: number;
|
|
1100
1100
|
calculate_needs_time: Date | null;
|
|
1101
1101
|
entity_children_need_time: Date | null;
|
|
1102
1102
|
min_remaining: number;
|
|
@@ -1317,8 +1317,8 @@ export declare const MovingSchema: z.ZodObject<{
|
|
|
1317
1317
|
cbeds: {
|
|
1318
1318
|
designation: string | null;
|
|
1319
1319
|
description: string | null;
|
|
1320
|
-
id: number;
|
|
1321
1320
|
name: string;
|
|
1321
|
+
id: number;
|
|
1322
1322
|
ava_path: string | null;
|
|
1323
1323
|
parametrs: import("../..").CbedParametrsField | null;
|
|
1324
1324
|
characteristic: import("../..").CbedCharacteristicField | null;
|
|
@@ -2,15 +2,15 @@ import z from 'zod';
|
|
|
2
2
|
import { ModelIncludeForTypeOperation } from '../enums/enums';
|
|
3
3
|
export declare const GetTypeOperationByIdDtoZod: z.ZodObject<{
|
|
4
4
|
id: z.ZodNumber;
|
|
5
|
-
attributes: z.ZodOptional<z.ZodArray<z.ZodEnum<["
|
|
5
|
+
attributes: z.ZodOptional<z.ZodArray<z.ZodEnum<["name", "id", "preTime", "helperTime", "mainTime", "cpu", "square", "list", "workStartCalcType", "countWorking"]>, "many">>;
|
|
6
6
|
modelInclude: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ModelIncludeForTypeOperation>, "many">>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
8
|
id: number;
|
|
9
|
-
attributes?: ("
|
|
9
|
+
attributes?: ("name" | "id" | "preTime" | "helperTime" | "mainTime" | "cpu" | "square" | "list" | "workStartCalcType" | "countWorking")[] | undefined;
|
|
10
10
|
modelInclude?: ModelIncludeForTypeOperation[] | undefined;
|
|
11
11
|
}, {
|
|
12
12
|
id: number;
|
|
13
|
-
attributes?: ("
|
|
13
|
+
attributes?: ("name" | "id" | "preTime" | "helperTime" | "mainTime" | "cpu" | "square" | "list" | "workStartCalcType" | "countWorking")[] | undefined;
|
|
14
14
|
modelInclude?: ModelIncludeForTypeOperation[] | undefined;
|
|
15
15
|
}>;
|
|
16
16
|
export type GetTypeOperationByIdDtoType = z.TypeOf<typeof GetTypeOperationByIdDtoZod>;
|
|
@@ -19,8 +19,8 @@ export declare const UpdateTypeOperationSchema: z.ZodObject<{
|
|
|
19
19
|
workStartCalcType: z.ZodDefault<z.ZodNativeEnum<typeof WorkStartCalcType>>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
21
|
metaloworking: boolean;
|
|
22
|
-
id: number;
|
|
23
22
|
name: string;
|
|
23
|
+
id: number;
|
|
24
24
|
preTime: boolean;
|
|
25
25
|
helperTime: boolean;
|
|
26
26
|
mainTime: boolean;
|
|
@@ -36,8 +36,8 @@ export declare const UpdateTypeOperationSchema: z.ZodObject<{
|
|
|
36
36
|
users?: any;
|
|
37
37
|
}, {
|
|
38
38
|
metaloworking: boolean;
|
|
39
|
-
id: number;
|
|
40
39
|
name: string;
|
|
40
|
+
id: number;
|
|
41
41
|
preTime: boolean;
|
|
42
42
|
helperTime: boolean;
|
|
43
43
|
mainTime: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types/planning';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/planning"), exports);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IShipmentCalculateObjecyt } from '../../shipments';
|
|
3
|
+
import { IzdType, Neo4jEntityTypes, RecursiveGraphParentType, RecursiveGraphType } from '../../utils';
|
|
4
|
+
export declare const CalculatePlanningSchema: z.ZodObject<{
|
|
5
|
+
itemId: z.ZodNumber;
|
|
6
|
+
itemType: z.ZodNativeEnum<typeof IzdType>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
itemId: number;
|
|
9
|
+
itemType: IzdType;
|
|
10
|
+
}, {
|
|
11
|
+
itemId: number;
|
|
12
|
+
itemType: IzdType;
|
|
13
|
+
}>;
|
|
14
|
+
export type CalculatePlanningData = z.infer<typeof CalculatePlanningSchema>;
|
|
15
|
+
export type PlanningGraphNode = {
|
|
16
|
+
itemId: number;
|
|
17
|
+
itemType: Neo4jEntityTypes;
|
|
18
|
+
isRelative: boolean;
|
|
19
|
+
hasPlanningOrder?: boolean;
|
|
20
|
+
childrens: PlanningGraphNode[];
|
|
21
|
+
};
|
|
22
|
+
export type PlanningGraphRelative = {
|
|
23
|
+
id: number;
|
|
24
|
+
type: Neo4jEntityTypes;
|
|
25
|
+
};
|
|
26
|
+
export declare const PlanningGraphNodeSchema: z.ZodType<PlanningGraphNode>;
|
|
27
|
+
export declare const PlanningGraphRelativeSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodNumber;
|
|
29
|
+
type: z.ZodNativeEnum<typeof Neo4jEntityTypes>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
type: Neo4jEntityTypes;
|
|
32
|
+
id: number;
|
|
33
|
+
}, {
|
|
34
|
+
type: Neo4jEntityTypes;
|
|
35
|
+
id: number;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const PlanningGraphResponseSchema: z.ZodObject<{
|
|
38
|
+
itemId: z.ZodNumber;
|
|
39
|
+
itemType: z.ZodNativeEnum<typeof Neo4jEntityTypes>;
|
|
40
|
+
graph: z.ZodArray<z.ZodType<PlanningGraphNode, z.ZodTypeDef, PlanningGraphNode>, "many">;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
graph: PlanningGraphNode[];
|
|
43
|
+
itemId: number;
|
|
44
|
+
itemType: Neo4jEntityTypes;
|
|
45
|
+
}, {
|
|
46
|
+
graph: PlanningGraphNode[];
|
|
47
|
+
itemId: number;
|
|
48
|
+
itemType: Neo4jEntityTypes;
|
|
49
|
+
}>;
|
|
50
|
+
export interface PlanningRecursiveCountPerShipment {
|
|
51
|
+
quantityArr: Map<string, IShipmentCalculateObjecyt>;
|
|
52
|
+
relativeProduct: any;
|
|
53
|
+
entityToFindId: number;
|
|
54
|
+
shipmentKol: number;
|
|
55
|
+
entityType: IzdType.detal | IzdType.cbed | IzdType.material;
|
|
56
|
+
}
|
|
57
|
+
export type PlanningRecursiveGraphEntityType = IzdType.product | IzdType.cbed | IzdType.detal | IzdType.material;
|
|
58
|
+
export type PlanningRecursiveGraphNode = RecursiveGraphType & {
|
|
59
|
+
id: number;
|
|
60
|
+
entity_type: PlanningRecursiveGraphEntityType;
|
|
61
|
+
quantity: number;
|
|
62
|
+
parent_id?: number;
|
|
63
|
+
parent_type?: PlanningRecursiveGraphEntityType;
|
|
64
|
+
count_to_obj?: number;
|
|
65
|
+
count_to_needs?: number;
|
|
66
|
+
needs?: number;
|
|
67
|
+
cbeds: PlanningRecursiveGraphNode[];
|
|
68
|
+
detals: PlanningRecursiveGraphNode[];
|
|
69
|
+
materials: PlanningRecursiveGraphNode[];
|
|
70
|
+
cbedGraph: PlanningRecursiveGraphNode[];
|
|
71
|
+
detalsGraph: PlanningRecursiveGraphNode[];
|
|
72
|
+
materialGraph: PlanningRecursiveGraphNode[];
|
|
73
|
+
};
|
|
74
|
+
export type PlanningRecursiveGraphTree = RecursiveGraphParentType & {
|
|
75
|
+
id: number;
|
|
76
|
+
entity_type: PlanningRecursiveGraphEntityType;
|
|
77
|
+
quantity: number;
|
|
78
|
+
cbeds: PlanningRecursiveGraphNode[];
|
|
79
|
+
detals: PlanningRecursiveGraphNode[];
|
|
80
|
+
materials: PlanningRecursiveGraphNode[];
|
|
81
|
+
cbedGraph: PlanningRecursiveGraphNode[];
|
|
82
|
+
detalsGraph: PlanningRecursiveGraphNode[];
|
|
83
|
+
materialGraph: PlanningRecursiveGraphNode[];
|
|
84
|
+
};
|
|
85
|
+
export type PlanningRecursiveCountByEntityShipment = Omit<PlanningRecursiveCountPerShipment, 'relativeProduct'> & {
|
|
86
|
+
relativeProduct: PlanningRecursiveGraphTree;
|
|
87
|
+
relativeProductType?: PlanningRecursiveGraphEntityType;
|
|
88
|
+
};
|
|
89
|
+
export type PlanningOrderDocumentType = 'shipment' | 'stock-order' | 'production-task';
|
|
90
|
+
export type PlanningOrderDocument = {
|
|
91
|
+
documentType: PlanningOrderDocumentType;
|
|
92
|
+
documentId: number;
|
|
93
|
+
entityId: number;
|
|
94
|
+
entityType: PlanningRecursiveGraphEntityType;
|
|
95
|
+
entityName: string | null;
|
|
96
|
+
entityDesignation: string | null;
|
|
97
|
+
entityAvatar: string | null;
|
|
98
|
+
entityAttention: boolean;
|
|
99
|
+
entityDiscontinued: boolean;
|
|
100
|
+
entityDescription: string;
|
|
101
|
+
numberOrder: string | null;
|
|
102
|
+
orderDate: Date | string | null;
|
|
103
|
+
plannedShipmentDate: Date | string | null;
|
|
104
|
+
warehouseReadinessDate: Date | string | null;
|
|
105
|
+
quantity: number;
|
|
106
|
+
completedQuantity: number;
|
|
107
|
+
remainingQuantity: number;
|
|
108
|
+
status?: string | null;
|
|
109
|
+
stockOrderItemId?: number;
|
|
110
|
+
productionOperationPosId?: number;
|
|
111
|
+
productionTaskDocuments?: PlanningOrderDocument[];
|
|
112
|
+
};
|
|
113
|
+
export type PlanningOrderAccordionDocument = PlanningOrderDocument & {
|
|
114
|
+
coveredQuantity: number;
|
|
115
|
+
};
|
|
116
|
+
export type PlanningOrderAccordionNode = {
|
|
117
|
+
entityId: number;
|
|
118
|
+
entityType: PlanningRecursiveGraphEntityType;
|
|
119
|
+
entityName: string | null;
|
|
120
|
+
entityDesignation: string | null;
|
|
121
|
+
entityAvatar: string | null;
|
|
122
|
+
entityAttention: boolean;
|
|
123
|
+
entityDiscontinued: boolean;
|
|
124
|
+
entityDescription: string;
|
|
125
|
+
isRelative: boolean;
|
|
126
|
+
parentId: number | null;
|
|
127
|
+
parentType: PlanningRecursiveGraphEntityType | null;
|
|
128
|
+
countToNeeds: number | null;
|
|
129
|
+
needDate: Date | string | null;
|
|
130
|
+
sourceDocument: PlanningOrderDocument | null;
|
|
131
|
+
quantity: number;
|
|
132
|
+
stockQuantity: number;
|
|
133
|
+
stockCoveredQuantity: number;
|
|
134
|
+
afterStockQuantity: number;
|
|
135
|
+
stockOrderCoveredQuantity: number;
|
|
136
|
+
deficitQuantity: number;
|
|
137
|
+
isSurplus: boolean;
|
|
138
|
+
isCovered: boolean;
|
|
139
|
+
coverDocuments: PlanningOrderAccordionDocument[];
|
|
140
|
+
children: PlanningOrderAccordionNode[];
|
|
141
|
+
};
|
|
142
|
+
export type PlanningPeggingEntityKey = string;
|
|
143
|
+
export type PlanningPeggingItem = {
|
|
144
|
+
key: PlanningPeggingEntityKey;
|
|
145
|
+
id: number;
|
|
146
|
+
type: PlanningRecursiveGraphEntityType;
|
|
147
|
+
name: string | null;
|
|
148
|
+
designation: string | null;
|
|
149
|
+
avatar: string | null;
|
|
150
|
+
attention: boolean;
|
|
151
|
+
discontinued: boolean;
|
|
152
|
+
description: string;
|
|
153
|
+
stock: number;
|
|
154
|
+
};
|
|
155
|
+
export type PlanningPeggingSpec = {
|
|
156
|
+
parent: PlanningPeggingEntityKey;
|
|
157
|
+
child: PlanningPeggingEntityKey;
|
|
158
|
+
qty: number;
|
|
159
|
+
};
|
|
160
|
+
export type PlanningPeggingPathNode = {
|
|
161
|
+
item: PlanningPeggingEntityKey;
|
|
162
|
+
qty: number;
|
|
163
|
+
stockCov?: number;
|
|
164
|
+
afterStock?: number;
|
|
165
|
+
zsCov?: number;
|
|
166
|
+
deficit?: number;
|
|
167
|
+
isCovered?: boolean;
|
|
168
|
+
cover?: PlanningOrderAccordionDocument[];
|
|
169
|
+
};
|
|
170
|
+
export type PlanningPeggingBranch = {
|
|
171
|
+
branchKey: string;
|
|
172
|
+
qty: number;
|
|
173
|
+
needDate: Date | string | null;
|
|
174
|
+
origin: PlanningOrderDocument;
|
|
175
|
+
path: PlanningPeggingPathNode[];
|
|
176
|
+
surplus?: boolean;
|
|
177
|
+
_self?: boolean;
|
|
178
|
+
stockCov?: number;
|
|
179
|
+
afterStock?: number;
|
|
180
|
+
zsCov?: number;
|
|
181
|
+
deficit?: number;
|
|
182
|
+
cover?: PlanningOrderAccordionDocument[];
|
|
183
|
+
};
|
|
184
|
+
export type PlanningPeggingStockOrder = PlanningOrderDocument & {
|
|
185
|
+
left: number;
|
|
186
|
+
productionTaskDocuments: PlanningOrderDocument[];
|
|
187
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlanningGraphResponseSchema = exports.PlanningGraphRelativeSchema = exports.PlanningGraphNodeSchema = exports.CalculatePlanningSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
exports.CalculatePlanningSchema = zod_1.z.object({
|
|
7
|
+
itemId: zod_1.z.number().int().positive(),
|
|
8
|
+
itemType: zod_1.z.nativeEnum(utils_1.IzdType)
|
|
9
|
+
});
|
|
10
|
+
exports.PlanningGraphNodeSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
11
|
+
itemId: zod_1.z.number().int(),
|
|
12
|
+
itemType: zod_1.z.nativeEnum(utils_1.Neo4jEntityTypes),
|
|
13
|
+
isRelative: zod_1.z.boolean(),
|
|
14
|
+
hasPlanningOrder: zod_1.z.boolean().optional(),
|
|
15
|
+
childrens: zod_1.z.array(exports.PlanningGraphNodeSchema)
|
|
16
|
+
}));
|
|
17
|
+
exports.PlanningGraphRelativeSchema = zod_1.z.object({
|
|
18
|
+
id: zod_1.z.number().int(),
|
|
19
|
+
type: zod_1.z.nativeEnum(utils_1.Neo4jEntityTypes)
|
|
20
|
+
});
|
|
21
|
+
exports.PlanningGraphResponseSchema = zod_1.z.object({
|
|
22
|
+
itemId: zod_1.z.number().int(),
|
|
23
|
+
itemType: zod_1.z.nativeEnum(utils_1.Neo4jEntityTypes),
|
|
24
|
+
graph: zod_1.z.array(exports.PlanningGraphNodeSchema)
|
|
25
|
+
});
|
|
@@ -56,8 +56,8 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
56
56
|
purchasesId: z.ZodOptional<z.ZodNumber>;
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
58
|
ban: boolean;
|
|
59
|
-
id: number;
|
|
60
59
|
name: string;
|
|
60
|
+
id: number;
|
|
61
61
|
attention: boolean;
|
|
62
62
|
description?: string | null | undefined;
|
|
63
63
|
contacts?: string | null | undefined;
|
|
@@ -66,8 +66,8 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
66
66
|
rekvisit?: string | null | undefined;
|
|
67
67
|
purchasesId?: number | undefined;
|
|
68
68
|
}, {
|
|
69
|
-
id: number;
|
|
70
69
|
name: string;
|
|
70
|
+
id: number;
|
|
71
71
|
ban?: boolean | undefined;
|
|
72
72
|
description?: string | null | undefined;
|
|
73
73
|
contacts?: string | null | undefined;
|
|
@@ -99,8 +99,8 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
99
99
|
product?: any;
|
|
100
100
|
buyer?: {
|
|
101
101
|
ban: boolean;
|
|
102
|
-
id: number;
|
|
103
102
|
name: string;
|
|
103
|
+
id: number;
|
|
104
104
|
attention: boolean;
|
|
105
105
|
description?: string | null | undefined;
|
|
106
106
|
contacts?: string | null | undefined;
|
|
@@ -127,8 +127,8 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
127
127
|
ban?: boolean | undefined;
|
|
128
128
|
product?: any;
|
|
129
129
|
buyer?: {
|
|
130
|
-
id: number;
|
|
131
130
|
name: string;
|
|
131
|
+
id: number;
|
|
132
132
|
ban?: boolean | undefined;
|
|
133
133
|
description?: string | null | undefined;
|
|
134
134
|
contacts?: string | null | undefined;
|
|
@@ -166,8 +166,8 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
166
166
|
product?: any;
|
|
167
167
|
buyer?: {
|
|
168
168
|
ban: boolean;
|
|
169
|
-
id: number;
|
|
170
169
|
name: string;
|
|
170
|
+
id: number;
|
|
171
171
|
attention: boolean;
|
|
172
172
|
description?: string | null | undefined;
|
|
173
173
|
contacts?: string | null | undefined;
|
|
@@ -224,8 +224,8 @@ export declare const ProductDeficitSchema: z.ZodObject<{
|
|
|
224
224
|
ban?: boolean | undefined;
|
|
225
225
|
product?: any;
|
|
226
226
|
buyer?: {
|
|
227
|
-
id: number;
|
|
228
227
|
name: string;
|
|
228
|
+
id: number;
|
|
229
229
|
ban?: boolean | undefined;
|
|
230
230
|
description?: string | null | undefined;
|
|
231
231
|
contacts?: string | null | undefined;
|
|
@@ -67,6 +67,7 @@ export interface IGetByOperation {
|
|
|
67
67
|
producitonTaskType: StockOrderType;
|
|
68
68
|
detalIdx: number;
|
|
69
69
|
planReadyTime: Date;
|
|
70
|
+
entityCalculatedCreateTime: Date | null;
|
|
70
71
|
startTime: Date | null;
|
|
71
72
|
metalloworkingId: number;
|
|
72
73
|
assembleId: number;
|
|
@@ -189,13 +190,18 @@ export interface IGetDeficitsDetalByProductionTask {
|
|
|
189
190
|
detalTechProcess: ModelTechProcess;
|
|
190
191
|
productionTimeMetalloworking: ProductionTimeType;
|
|
191
192
|
detalQuantity: number;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
productionTime: number;
|
|
194
|
+
productionTimeCurrent: number;
|
|
195
|
+
productionTimeRemaining: number;
|
|
195
196
|
shipmentByProductionTask: number;
|
|
196
197
|
deficitByDetal: number;
|
|
197
198
|
relativesIds: IRelativeIds;
|
|
198
199
|
}
|
|
200
|
+
export interface IDeficitsDetalProductionTime {
|
|
201
|
+
productionTime: number;
|
|
202
|
+
productionTimeCurrent: number;
|
|
203
|
+
productionTimeRemaining: number;
|
|
204
|
+
}
|
|
199
205
|
export interface IGetActualTaskRelative {
|
|
200
206
|
entityId: number;
|
|
201
207
|
entityType: Neo4jEntityTypes;
|
|
@@ -276,6 +282,7 @@ export interface IGetByEquipment {
|
|
|
276
282
|
operationQuantity: number;
|
|
277
283
|
entityType: IzdType;
|
|
278
284
|
planReadyTime: Date;
|
|
285
|
+
entityCalculatedCreateTime: Date | null;
|
|
279
286
|
operationPosType: StockOrderType;
|
|
280
287
|
productionTaskId: number;
|
|
281
288
|
productionTaskDueData: Date;
|
|
@@ -297,6 +304,7 @@ export interface IGetByUser {
|
|
|
297
304
|
deltaTime: number;
|
|
298
305
|
isHasIncorrectDate: boolean;
|
|
299
306
|
planReadyTime: Date;
|
|
307
|
+
entityCalculatedCreateTime: Date | null;
|
|
300
308
|
assembleTime: number;
|
|
301
309
|
createTimeMax: number;
|
|
302
310
|
metalloworkingTime: number;
|
|
@@ -20,8 +20,11 @@ export declare const OrdersSummaryShipmentZod: z.ZodObject<{
|
|
|
20
20
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
21
21
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
22
22
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
23
|
+
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
24
|
+
parentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
23
25
|
shipmentNumber: z.ZodNullable<z.ZodString>;
|
|
24
26
|
shipmentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
27
|
+
shipmentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
25
28
|
quantity: z.ZodNumber;
|
|
26
29
|
requiredReadyDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
27
30
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -31,8 +34,11 @@ export declare const OrdersSummaryShipmentZod: z.ZodObject<{
|
|
|
31
34
|
parentPTNumber: number | null;
|
|
32
35
|
parentPTQuantity: number | null;
|
|
33
36
|
parentPTNeed: number | null;
|
|
37
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
38
|
+
parentReadinessDate: string | Date | null;
|
|
34
39
|
shipmentNumber: string | null;
|
|
35
40
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
41
|
+
shipmentReadinessDate: string | Date | null;
|
|
36
42
|
}, {
|
|
37
43
|
quantity: number;
|
|
38
44
|
shipmentId: number | null;
|
|
@@ -40,8 +46,11 @@ export declare const OrdersSummaryShipmentZod: z.ZodObject<{
|
|
|
40
46
|
parentPTNumber: number | null;
|
|
41
47
|
parentPTQuantity: number | null;
|
|
42
48
|
parentPTNeed: number | null;
|
|
49
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
50
|
+
parentReadinessDate: string | Date | null;
|
|
43
51
|
shipmentNumber: string | null;
|
|
44
52
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
53
|
+
shipmentReadinessDate: string | Date | null;
|
|
45
54
|
}>;
|
|
46
55
|
export declare const OrdersSummaryStockOrderZod: z.ZodObject<{
|
|
47
56
|
stockOrderItemId: z.ZodNumber;
|
|
@@ -73,8 +82,11 @@ export declare const OrdersSummaryDemandRowZod: z.ZodObject<{
|
|
|
73
82
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
74
83
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
75
84
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
86
|
+
parentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
76
87
|
shipmentNumber: z.ZodNullable<z.ZodString>;
|
|
77
88
|
shipmentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
89
|
+
shipmentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
78
90
|
quantityByShipment: z.ZodNullable<z.ZodNumber>;
|
|
79
91
|
shipmentNeed: z.ZodNullable<z.ZodNumber>;
|
|
80
92
|
demandQuantity: z.ZodNumber;
|
|
@@ -87,8 +99,11 @@ export declare const OrdersSummaryDemandRowZod: z.ZodObject<{
|
|
|
87
99
|
parentPTNumber: number | null;
|
|
88
100
|
parentPTQuantity: number | null;
|
|
89
101
|
parentPTNeed: number | null;
|
|
102
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
103
|
+
parentReadinessDate: string | Date | null;
|
|
90
104
|
shipmentNumber: string | null;
|
|
91
105
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
106
|
+
shipmentReadinessDate: string | Date | null;
|
|
92
107
|
quantityByProductionTask: number;
|
|
93
108
|
quantityByShipment: number | null;
|
|
94
109
|
shipmentNeed: number | null;
|
|
@@ -101,8 +116,11 @@ export declare const OrdersSummaryDemandRowZod: z.ZodObject<{
|
|
|
101
116
|
parentPTNumber: number | null;
|
|
102
117
|
parentPTQuantity: number | null;
|
|
103
118
|
parentPTNeed: number | null;
|
|
119
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
120
|
+
parentReadinessDate: string | Date | null;
|
|
104
121
|
shipmentNumber: string | null;
|
|
105
122
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
123
|
+
shipmentReadinessDate: string | Date | null;
|
|
106
124
|
quantityByProductionTask: number;
|
|
107
125
|
quantityByShipment: number | null;
|
|
108
126
|
shipmentNeed: number | null;
|
|
@@ -117,8 +135,11 @@ export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
|
117
135
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
118
136
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
119
137
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
138
|
+
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
139
|
+
parentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
120
140
|
shipmentNumber: z.ZodNullable<z.ZodString>;
|
|
121
141
|
shipmentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
142
|
+
shipmentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
122
143
|
quantityByShipment: z.ZodNullable<z.ZodNumber>;
|
|
123
144
|
shipmentNeed: z.ZodNullable<z.ZodNumber>;
|
|
124
145
|
stockOrderItemId: z.ZodNullable<z.ZodNumber>;
|
|
@@ -139,8 +160,11 @@ export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
|
139
160
|
parentPTNumber: number | null;
|
|
140
161
|
parentPTQuantity: number | null;
|
|
141
162
|
parentPTNeed: number | null;
|
|
163
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
164
|
+
parentReadinessDate: string | Date | null;
|
|
142
165
|
shipmentNumber: string | null;
|
|
143
166
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
167
|
+
shipmentReadinessDate: string | Date | null;
|
|
144
168
|
stockOrderItemId: number | null;
|
|
145
169
|
stockOrderId: number | null;
|
|
146
170
|
quantityByProductionTask: number;
|
|
@@ -160,8 +184,11 @@ export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
|
160
184
|
parentPTNumber: number | null;
|
|
161
185
|
parentPTQuantity: number | null;
|
|
162
186
|
parentPTNeed: number | null;
|
|
187
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
188
|
+
parentReadinessDate: string | Date | null;
|
|
163
189
|
shipmentNumber: string | null;
|
|
164
190
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
191
|
+
shipmentReadinessDate: string | Date | null;
|
|
165
192
|
stockOrderItemId: number | null;
|
|
166
193
|
stockOrderId: number | null;
|
|
167
194
|
quantityByProductionTask: number;
|
|
@@ -182,8 +209,11 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
182
209
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
183
210
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
184
211
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
212
|
+
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
213
|
+
parentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
185
214
|
shipmentNumber: z.ZodNullable<z.ZodString>;
|
|
186
215
|
shipmentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
216
|
+
shipmentReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
187
217
|
quantityByShipment: z.ZodNullable<z.ZodNumber>;
|
|
188
218
|
shipmentNeed: z.ZodNullable<z.ZodNumber>;
|
|
189
219
|
stockOrderItemId: z.ZodNullable<z.ZodNumber>;
|
|
@@ -204,8 +234,11 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
204
234
|
parentPTNumber: number | null;
|
|
205
235
|
parentPTQuantity: number | null;
|
|
206
236
|
parentPTNeed: number | null;
|
|
237
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
238
|
+
parentReadinessDate: string | Date | null;
|
|
207
239
|
shipmentNumber: string | null;
|
|
208
240
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
241
|
+
shipmentReadinessDate: string | Date | null;
|
|
209
242
|
stockOrderItemId: number | null;
|
|
210
243
|
stockOrderId: number | null;
|
|
211
244
|
quantityByProductionTask: number;
|
|
@@ -225,8 +258,11 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
225
258
|
parentPTNumber: number | null;
|
|
226
259
|
parentPTQuantity: number | null;
|
|
227
260
|
parentPTNeed: number | null;
|
|
261
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
262
|
+
parentReadinessDate: string | Date | null;
|
|
228
263
|
shipmentNumber: string | null;
|
|
229
264
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
265
|
+
shipmentReadinessDate: string | Date | null;
|
|
230
266
|
stockOrderItemId: number | null;
|
|
231
267
|
stockOrderId: number | null;
|
|
232
268
|
quantityByProductionTask: number;
|
|
@@ -253,8 +289,11 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
253
289
|
parentPTNumber: number | null;
|
|
254
290
|
parentPTQuantity: number | null;
|
|
255
291
|
parentPTNeed: number | null;
|
|
292
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
293
|
+
parentReadinessDate: string | Date | null;
|
|
256
294
|
shipmentNumber: string | null;
|
|
257
295
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
296
|
+
shipmentReadinessDate: string | Date | null;
|
|
258
297
|
stockOrderItemId: number | null;
|
|
259
298
|
stockOrderId: number | null;
|
|
260
299
|
quantityByProductionTask: number;
|
|
@@ -281,8 +320,11 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
281
320
|
parentPTNumber: number | null;
|
|
282
321
|
parentPTQuantity: number | null;
|
|
283
322
|
parentPTNeed: number | null;
|
|
323
|
+
parentWarehouseReadinessDate: string | Date | null;
|
|
324
|
+
parentReadinessDate: string | Date | null;
|
|
284
325
|
shipmentNumber: string | null;
|
|
285
326
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
327
|
+
shipmentReadinessDate: string | Date | null;
|
|
286
328
|
stockOrderItemId: number | null;
|
|
287
329
|
stockOrderId: number | null;
|
|
288
330
|
quantityByProductionTask: number;
|